diff mbox series

[v2,09/19] ARM: dts: sunxi: h3/h5: Add CSI controller port for parallel input

Message ID 20201128142839.517949-10-paul.kocialkowski@bootlin.com
State New
Headers show
Series Allwinner MIPI CSI-2 support for A31/V3s/A83T | expand

Commit Message

Paul Kocialkowski Nov. 28, 2020, 2:28 p.m. UTC
Since the CSI controller binding is getting a bit more complex due
to the addition of MIPI CSI-2 bridge support, make the ports node
explicit with the parallel port.

This way, it's clear that the controller only supports parallel
interface input and there's no confusion about the port number.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Maxime Ripard Dec. 1, 2020, 12:14 p.m. UTC | #1
On Sat, Nov 28, 2020 at 03:28:29PM +0100, Paul Kocialkowski wrote:
> Since the CSI controller binding is getting a bit more complex due
> to the addition of MIPI CSI-2 bridge support, make the ports node
> explicit with the parallel port.
> 
> This way, it's clear that the controller only supports parallel
> interface input and there's no confusion about the port number.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
>  arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
> index 9be13378d4df..02b698cace6a 100644
> --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
> +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
> @@ -803,6 +803,15 @@ csi: camera@1cb0000 {
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&csi_pins>;
>  			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				csi_in_parallel: port@0 {
> +					reg = <0>;
> +				};
> +			};
>  		};

This will create a DTC warning, since port@0 is the only node, and is
equivalent to port

Maxime
Paul Kocialkowski Dec. 2, 2020, 3:02 p.m. UTC | #2
Hi,

On Tue 01 Dec 20, 13:14, Maxime Ripard wrote:
> On Sat, Nov 28, 2020 at 03:28:29PM +0100, Paul Kocialkowski wrote:

> > Since the CSI controller binding is getting a bit more complex due

> > to the addition of MIPI CSI-2 bridge support, make the ports node

> > explicit with the parallel port.

> > 

> > This way, it's clear that the controller only supports parallel

> > interface input and there's no confusion about the port number.

> > 

> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> > ---

> >  arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 +++++++++

> >  1 file changed, 9 insertions(+)

> > 

> > diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > index 9be13378d4df..02b698cace6a 100644

> > --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > @@ -803,6 +803,15 @@ csi: camera@1cb0000 {

> >  			pinctrl-names = "default";

> >  			pinctrl-0 = <&csi_pins>;

> >  			status = "disabled";

> > +

> > +			ports {

> > +				#address-cells = <1>;

> > +				#size-cells = <0>;

> > +

> > +				csi_in_parallel: port@0 {

> > +					reg = <0>;

> > +				};

> > +			};

> >  		};

> 

> This will create a DTC warning, since port@0 is the only node, and is

> equivalent to port


I'm not seeing the warning when running dtbs_check.
More generally, why is it a problem that there's only one node defined?

One issue that I did see is that the port node doesn't have an endpoint
here, so I will remove the requirement to have an endpoint in the bindings
documentation to allow this kind of definition.

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Maxime Ripard Dec. 2, 2020, 3:46 p.m. UTC | #3
On Wed, Dec 02, 2020 at 04:02:09PM +0100, Paul Kocialkowski wrote:
> Hi,

> 

> On Tue 01 Dec 20, 13:14, Maxime Ripard wrote:

> > On Sat, Nov 28, 2020 at 03:28:29PM +0100, Paul Kocialkowski wrote:

> > > Since the CSI controller binding is getting a bit more complex due

> > > to the addition of MIPI CSI-2 bridge support, make the ports node

> > > explicit with the parallel port.

> > > 

> > > This way, it's clear that the controller only supports parallel

> > > interface input and there's no confusion about the port number.

> > > 

> > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

> > > ---

> > >  arch/arm/boot/dts/sunxi-h3-h5.dtsi | 9 +++++++++

> > >  1 file changed, 9 insertions(+)

> > > 

> > > diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > > index 9be13378d4df..02b698cace6a 100644

> > > --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > > +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi

> > > @@ -803,6 +803,15 @@ csi: camera@1cb0000 {

> > >  			pinctrl-names = "default";

> > >  			pinctrl-0 = <&csi_pins>;

> > >  			status = "disabled";

> > > +

> > > +			ports {

> > > +				#address-cells = <1>;

> > > +				#size-cells = <0>;

> > > +

> > > +				csi_in_parallel: port@0 {

> > > +					reg = <0>;

> > > +				};

> > > +			};

> > >  		};

> > 

> > This will create a DTC warning, since port@0 is the only node, and is

> > equivalent to port

> 

> I'm not seeing the warning when running dtbs_check.


Some are silenced by the Linux build system. You can pass W=1 to your
make command line enable all of them.

> More generally, why is it a problem that there's only one node defined?

> 

> One issue that I did see is that the port node doesn't have an endpoint

> here, so I will remove the requirement to have an endpoint in the bindings

> documentation to allow this kind of definition.


We definitely want to have the endpoint required. If the CSI node is
disabled, the error should be ignored by the dt-validate tool though

Maxime
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 9be13378d4df..02b698cace6a 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -803,6 +803,15 @@  csi: camera@1cb0000 {
 			pinctrl-names = "default";
 			pinctrl-0 = <&csi_pins>;
 			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				csi_in_parallel: port@0 {
+					reg = <0>;
+				};
+			};
 		};
 
 		hdmi: hdmi@1ee0000 {