diff mbox

[v4,5/9] ARM: shmobile: marzen: Enable DU device in DT

Message ID 1414152241-5390-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State Superseded
Headers show

Commit Message

Laurent Pinchart Oct. 24, 2014, 12:03 p.m. UTC
Specify the DU output topology, enable the DU device and configure the
related pins.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

Comments

Sergei Shtylyov Oct. 24, 2014, 12:36 p.m. UTC | #1
Hello.

On 10/24/2014 4:03 PM, Laurent Pinchart wrote:

> Specify the DU output topology, enable the DU device and configure the
> related pins.

> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>   arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++++++++
>   1 file changed, 81 insertions(+)

> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
> index 9e1b859190ca..64a5d634edc1 100644
> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> @@ -69,6 +69,76 @@
>   			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
>   		};
>   	};
> +
> +	vga-encoder {
> +		compatible = "adi,adv7123";
[...]
> +	lvds-enc {

    Using "lvds-encoder" would have been more consistent.

> +		compatible = "thine,thc63lvdm83d";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			port@0 {

    Hm, I don't see the "reg" prop, where is it?

> +				lvds_enc_in: endpoint {
> +					remote-endpoint = <&du_out_rgb1>;
> +				};
> +			};
> +			port@1 {
> +				lvds_connector: endpoint {
> +				};
> +			};
> +		};
> +	};
> +};
[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Oct. 26, 2014, 12:49 p.m. UTC | #2
Hi Sergei,

Thank you for the review.

On Friday 24 October 2014 16:36:38 Sergei Shtylyov wrote:
> On 10/24/2014 4:03 PM, Laurent Pinchart wrote:
> > Specify the DU output topology, enable the DU device and configure the
> > related pins.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >   arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++
> >   1 file changed, 81 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts
> > b/arch/arm/boot/dts/r8a7779-marzen.dts index 9e1b859190ca..64a5d634edc1
> > 100644
> > --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> > +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> > @@ -69,6 +69,76 @@
> >   			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
> >   		};
> >   	};
> > +
> > +	vga-encoder {
> > +		compatible = "adi,adv7123";
> 
> [...]
> 
> > +	lvds-enc {
> 
> Using "lvds-encoder" would have been more consistent.

I'll fix that.

> > +		compatible = "thine,thc63lvdm83d";
> > +
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		ports {
> > +			port@0 {
> 
> Hm, I don't see the "reg" prop, where is it?

In arch/arm/boot/dts/r8a7779.dtsi.

> > +				lvds_enc_in: endpoint {
> > +					remote-endpoint = <&du_out_rgb1>;
> > +				};
> > +			};
> > +			port@1 {
> > +				lvds_connector: endpoint {
> > +				};
> > +			};
> > +		};
> > +	};
> > +};
Sergei Shtylyov Oct. 26, 2014, 1:04 p.m. UTC | #3
Hello.

On 10/26/2014 3:49 PM, Laurent Pinchart wrote:

>>> Specify the DU output topology, enable the DU device and configure the
>>> related pins.

>>> Signed-off-by: Laurent Pinchart
>>> <laurent.pinchart+renesas@ideasonboard.com>
>>> ---

>>>    arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++
>>>    1 file changed, 81 insertions(+)

>>> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts
>>> b/arch/arm/boot/dts/r8a7779-marzen.dts index 9e1b859190ca..64a5d634edc1
>>> 100644
>>> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
>>> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
>>> @@ -69,6 +69,76 @@
>>>    			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
>>>    		};
>>>    	};
>>> +
>>> +	vga-encoder {
>>> +		compatible = "adi,adv7123";

>> [...]

>>> +	lvds-enc {

>> Using "lvds-encoder" would have been more consistent.

> I'll fix that.

>>> +		compatible = "thine,thc63lvdm83d";
>>> +
>>> +		#address-cells = <1>;
>>> +		#size-cells = <0>;
>>> +
>>> +		ports {
>>> +			port@0 {

>> Hm, I don't see the "reg" prop, where is it?

> In arch/arm/boot/dts/r8a7779.dtsi.

    Hm, you're describing a board specific device, how it would get into the 
SoC specific device tree?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Oct. 26, 2014, 1:16 p.m. UTC | #4
Hi Sergei,

On Sunday 26 October 2014 16:04:45 Sergei Shtylyov wrote:
> On 10/26/2014 3:49 PM, Laurent Pinchart wrote:
> >>> Specify the DU output topology, enable the DU device and configure the
> >>> related pins.
> >>> 
> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>
> >>> ---
> >>> 
> >>>  arch/arm/boot/dts/r8a7779-marzen.dts | 81 +++++++++++++++++++++++++++
> >>>  1 file changed, 81 insertions(+)
> >>> 
> >>> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts
> >>> b/arch/arm/boot/dts/r8a7779-marzen.dts index 9e1b859190ca..64a5d634edc1
> >>> 100644
> >>> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> >>> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> >>> @@ -69,6 +69,76 @@
> >>>    			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
> >>>    		};
> >>>    	};
> >>> +
> >>> +	vga-encoder {
> >>> +		compatible = "adi,adv7123";
> >> 
> >> [...]
> >> 
> >>> +	lvds-enc {
> >> 
> >> Using "lvds-encoder" would have been more consistent.
> > 
> > I'll fix that.
> > 
> >>> +		compatible = "thine,thc63lvdm83d";
> >>> +
> >>> +		#address-cells = <1>;
> >>> +		#size-cells = <0>;
> >>> +
> >>> +		ports {
> >>> +			port@0 {
> >> 
> >> Hm, I don't see the "reg" prop, where is it?
> > 
> > In arch/arm/boot/dts/r8a7779.dtsi.
> 
> Hm, you're describing a board specific device, how it would get into the SoC
> specific device tree?

Sorry, my bad, I somehow considered this was referring to the DU ports. I'll 
fix the problem.
Simon Horman Oct. 27, 2014, 1:23 a.m. UTC | #5
On Fri, Oct 24, 2014 at 03:03:57PM +0300, Laurent Pinchart wrote:
> Specify the DU output topology, enable the DU device and configure the
> related pins.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

I have this patch queued up but I notice that it seems to introduce
the following warnings. Can this be addressed somehow?

Warning (reg_format): "reg" property in /lvds-encoder/ports/port@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (reg_format): "reg" property in /lvds-encoder/ports/port@1 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /lvds-encoder/ports/port@0
Warning (avoid_default_addr_size): Relying on default #size-cells value for /lvds-encoder/ports/port@0
Warning (avoid_default_addr_size): Relying on default #address-cells value for /lvds-encoder/ports/port@1
Warning (avoid_default_addr_size): Relying on default #size-cells value for /lvds-encoder/ports/port@1

> ---
>  arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
> index 9e1b859190ca..64a5d634edc1 100644
> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> @@ -69,6 +69,76 @@
>  			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
>  		};
>  	};
> +
> +	vga-encoder {
> +		compatible = "adi,adv7123";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				vga_enc_in: endpoint {
> +					remote-endpoint = <&du_out_rgb0>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				vga_enc_out: endpoint {
> +					remote-endpoint = <&vga_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	vga {
> +		compatible = "vga-connector";
> +
> +		port {
> +			vga_in: endpoint {
> +				remote-endpoint = <&vga_enc_out>;
> +			};
> +		};
> +	};
> +
> +	lvds-enc {
> +		compatible = "thine,thc63lvdm83d";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ports {
> +			port@0 {
> +				lvds_enc_in: endpoint {
> +					remote-endpoint = <&du_out_rgb1>;
> +				};
> +			};
> +			port@1 {
> +				lvds_connector: endpoint {
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&du {
> +	pinctrl-0 = <&du_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
> +	ports {
> +		port@0 {
> +			endpoint {
> +				remote-endpoint = <&vga_enc_in>;
> +			};
> +		};
> +		port@1 {
> +			endpoint {
> +				remote-endpoint = <&lvds_enc_in>;
> +			};
> +		};
> +	};
>  };
>  
>  &irqpin0 {
> @@ -84,6 +154,17 @@
>  };
>  
>  &pfc {
> +	du_pins: du {
> +		du0 {
> +			renesas,groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0";
> +			renesas,function = "du0";
> +		};
> +		du1 {
> +			renesas,groups = "du1_rgb666", "du1_sync_1", "du1_clk_out";
> +			renesas,function = "du1";
> +		};
> +	};
> +
>  	lan0_pins: lan0 {
>  		intc {
>  			renesas,groups = "intc_irq1_b";
> -- 
> 2.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Oct. 27, 2014, 9:18 a.m. UTC | #6
On Mon, Oct 27, 2014 at 2:23 AM, Simon Horman <horms@verge.net.au> wrote:
> I have this patch queued up but I notice that it seems to introduce
> the following warnings. Can this be addressed somehow?
>
> Warning (reg_format): "reg" property in /lvds-encoder/ports/port@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
> Warning (reg_format): "reg" property in /lvds-encoder/ports/port@1 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
> Warning (avoid_default_addr_size): Relying on default #address-cells value for /lvds-encoder/ports/port@0
> Warning (avoid_default_addr_size): Relying on default #size-cells value for /lvds-encoder/ports/port@0
> Warning (avoid_default_addr_size): Relying on default #address-cells value for /lvds-encoder/ports/port@1
> Warning (avoid_default_addr_size): Relying on default #size-cells value for /lvds-encoder/ports/port@1

>> ---
>>  arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 81 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
>> index 9e1b859190ca..64a5d634edc1 100644
>> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
>> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
>> @@ -69,6 +69,76 @@
>>                       gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
>>               };
>>       };
>> +
>> +     vga-encoder {
>> +             compatible = "adi,adv7123";
>> +
>> +             ports {
>> +                     #address-cells = <1>;
>> +                     #size-cells = <0>;
>> +
>> +                     port@0 {
>> +                             reg = <0>;
>> +                             vga_enc_in: endpoint {
>> +                                     remote-endpoint = <&du_out_rgb0>;
>> +                             };
>> +                     };
>> +                     port@1 {
>> +                             reg = <1>;
>> +                             vga_enc_out: endpoint {
>> +                                     remote-endpoint = <&vga_in>;
>> +                             };
>> +                     };
>> +             };
>> +     };
>> +
>> +     vga {
>> +             compatible = "vga-connector";
>> +
>> +             port {
>> +                     vga_in: endpoint {
>> +                             remote-endpoint = <&vga_enc_out>;
>> +                     };
>> +             };
>> +     };
>> +
>> +     lvds-enc {
>> +             compatible = "thine,thc63lvdm83d";
>> +
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;

I think the two properties above should be moved to the ports node below.

>> +
>> +             ports {

---> HERE.

Yes, this can be a real PITA. I had to sprinkle lots of #address-cells = <1>
and #size-cells = <0> to the hierarchical PM domain nodes, too.

>> +                     port@0 {
>> +                             lvds_enc_in: endpoint {
>> +                                     remote-endpoint = <&du_out_rgb1>;
>> +                             };
>> +                     };
>> +                     port@1 {
>> +                             lvds_connector: endpoint {
>> +                             };
>> +                     };
>> +             };
>> +     };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Oct. 27, 2014, 9:27 a.m. UTC | #7
On Monday 27 October 2014 10:18:16 Geert Uytterhoeven wrote:
> On Mon, Oct 27, 2014 at 2:23 AM, Simon Horman <horms@verge.net.au> wrote:
> > I have this patch queued up but I notice that it seems to introduce
> > the following warnings. Can this be addressed somehow?
> > 
> > Warning (reg_format): "reg" property in /lvds-encoder/ports/port@0 has
> > invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning
> > (reg_format): "reg" property in /lvds-encoder/ports/port@1 has invalid
> > length (4 bytes) (#address-cells == 2, #size-cells == 1) Warning
> > (avoid_default_addr_size): Relying on default #address-cells value for
> > /lvds-encoder/ports/port@0 Warning (avoid_default_addr_size): Relying on
> > default #size-cells value for /lvds-encoder/ports/port@0 Warning
> > (avoid_default_addr_size): Relying on default #address-cells value for
> > /lvds-encoder/ports/port@1 Warning (avoid_default_addr_size): Relying on
> > default #size-cells value for /lvds-encoder/ports/port@1> 
> >> ---
> >> 
> >>  arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++
> >>  1 file changed, 81 insertions(+)
> >> 
> >> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts
> >> b/arch/arm/boot/dts/r8a7779-marzen.dts index 9e1b859190ca..64a5d634edc1
> >> 100644
> >> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> >> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> >> @@ -69,6 +69,76 @@
> >>                       gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
> >>               };
> >>       };
> >> +
> >> +     vga-encoder {
> >> +             compatible = "adi,adv7123";
> >> +
> >> +             ports {
> >> +                     #address-cells = <1>;
> >> +                     #size-cells = <0>;
> >> +
> >> +                     port@0 {
> >> +                             reg = <0>;
> >> +                             vga_enc_in: endpoint {
> >> +                                     remote-endpoint = <&du_out_rgb0>;
> >> +                             };
> >> +                     };
> >> +                     port@1 {
> >> +                             reg = <1>;
> >> +                             vga_enc_out: endpoint {
> >> +                                     remote-endpoint = <&vga_in>;
> >> +                             };
> >> +                     };
> >> +             };
> >> +     };
> >> +
> >> +     vga {
> >> +             compatible = "vga-connector";
> >> +
> >> +             port {
> >> +                     vga_in: endpoint {
> >> +                             remote-endpoint = <&vga_enc_out>;
> >> +                     };
> >> +             };
> >> +     };
> >> +
> >> +     lvds-enc {
> >> +             compatible = "thine,thc63lvdm83d";
> >> +
> >> +             #address-cells = <1>;
> >> +             #size-cells = <0>;
> 
> I think the two properties above should be moved to the ports node below.
> 
> >> +
> >> +             ports {
> 
> ---> HERE.

That's correct. Sorry for the oversight. I've submitted a patch to fix this.

> Yes, this can be a real PITA. I had to sprinkle lots of #address-cells = <1>
> and #size-cells = <0> to the hierarchical PM domain nodes, too.

I wonder if there's a reason why those properties are not inherited.

> >> +                     port@0 {
> >> +                             lvds_enc_in: endpoint {
> >> +                                     remote-endpoint = <&du_out_rgb1>;
> >> +                             };
> >> +                     };
> >> +                     port@1 {
> >> +                             lvds_connector: endpoint {
> >> +                             };
> >> +                     };
> >> +             };
> >> +     };
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index 9e1b859190ca..64a5d634edc1 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -69,6 +69,76 @@ 
 			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
 		};
 	};
+
+	vga-encoder {
+		compatible = "adi,adv7123";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				vga_enc_in: endpoint {
+					remote-endpoint = <&du_out_rgb0>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				vga_enc_out: endpoint {
+					remote-endpoint = <&vga_in>;
+				};
+			};
+		};
+	};
+
+	vga {
+		compatible = "vga-connector";
+
+		port {
+			vga_in: endpoint {
+				remote-endpoint = <&vga_enc_out>;
+			};
+		};
+	};
+
+	lvds-enc {
+		compatible = "thine,thc63lvdm83d";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ports {
+			port@0 {
+				lvds_enc_in: endpoint {
+					remote-endpoint = <&du_out_rgb1>;
+				};
+			};
+			port@1 {
+				lvds_connector: endpoint {
+				};
+			};
+		};
+	};
+};
+
+&du {
+	pinctrl-0 = <&du_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	ports {
+		port@0 {
+			endpoint {
+				remote-endpoint = <&vga_enc_in>;
+			};
+		};
+		port@1 {
+			endpoint {
+				remote-endpoint = <&lvds_enc_in>;
+			};
+		};
+	};
 };
 
 &irqpin0 {
@@ -84,6 +154,17 @@ 
 };
 
 &pfc {
+	du_pins: du {
+		du0 {
+			renesas,groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0";
+			renesas,function = "du0";
+		};
+		du1 {
+			renesas,groups = "du1_rgb666", "du1_sync_1", "du1_clk_out";
+			renesas,function = "du1";
+		};
+	};
+
 	lan0_pins: lan0 {
 		intc {
 			renesas,groups = "intc_irq1_b";