diff mbox series

[3/3] arm64: dts: renesas: hihope-common: Add HDMI support

Message ID 1560871119-16570-4-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Simon Horman
Headers show
Series Add HDMI support to HiHope RZ/G2M | expand

Commit Message

Fabrizio Castro June 18, 2019, 3:18 p.m. UTC
Add HDMI support to the HiHope RZ/G2[MN] mother board common
dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

---
Please note that this patch was tested with a 4K monitor and cma=96M

 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

Comments

Laurent Pinchart June 19, 2019, 12:41 p.m. UTC | #1
Hi Fabrizio,

Thank you for the patch.

On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> Add HDMI support to the HiHope RZ/G2[MN] mother board common
> dtsi.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>
> ---
> Please note that this patch was tested with a 4K monitor and cma=96M
> 
>  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> index 625c3aa..e7568e1 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> @@ -17,6 +17,18 @@
>  		stdout-path = "serial0:115200n8";
>  	};
>  
> +	hdmi0-out {
> +		compatible = "hdmi-connector";
> +		label = "HDMI0 OUT";

Is the label physically present on the device (printed on the board or
the case) ?

Apart from that, without access to the schematics I can't really tell if
the DT is correct, but nothing strikes me as really wrong, so

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +		type = "a";
> +
> +		port {
> +			hdmi0_con: endpoint {
> +				remote-endpoint = <&rcar_dw_hdmi0_out>;
> +			};
> +		};
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
>  
> @@ -82,6 +94,30 @@
>  		states = <3300000 1
>  			  1800000 0>;
>  	};
> +
> +	x302_clk: x302-clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <33000000>;
> +	};
> +
> +	x304_clk: x304-clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <25000000>;
> +	};
> +};
> +
> +&du {
> +	clocks = <&cpg CPG_MOD 724>,
> +		 <&cpg CPG_MOD 723>,
> +		 <&cpg CPG_MOD 722>,
> +		 <&versaclock5 1>,
> +		 <&x302_clk>,
> +		 <&versaclock5 2>;
> +	clock-names = "du.0", "du.1", "du.2",
> +		      "dclkin.0", "dclkin.1", "dclkin.2";
> +	status = "okay";
>  };
>  
>  &ehci0 {
> @@ -109,11 +145,37 @@
>  	};
>  };
>  
> +&hdmi0 {
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			reg = <1>;
> +			rcar_dw_hdmi0_out: endpoint {
> +				remote-endpoint = <&hdmi0_con>;
> +			};
> +		};
> +	};
> +};
> +
>  &hsusb {
>  	dr_mode = "otg";
>  	status = "okay";
>  };
>  
> +&i2c4 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	versaclock5: clock-generator@6a {
> +		compatible = "idt,5p49v5923";
> +		reg = <0x6a>;
> +		#clock-cells = <1>;
> +		clocks = <&x304_clk>;
> +		clock-names = "xin";
> +	};
> +};
> +
>  &ohci0 {
>  	status = "okay";
>  };
Fabrizio Castro June 19, 2019, 12:48 p.m. UTC | #2
Hi Laurent,

> From: linux-renesas-soc-owner@vger.kernel.org <linux-renesas-soc-owner@vger.kernel.org> On Behalf Of Laurent Pinchart
> Sent: 19 June 2019 13:42
> Subject: Re: [PATCH 3/3] arm64: dts: renesas: hihope-common: Add HDMI support
> 
> Hi Fabrizio,
> 
> Thank you for the patch.
> 
> On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> > Add HDMI support to the HiHope RZ/G2[MN] mother board common
> > dtsi.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > ---
> > Please note that this patch was tested with a 4K monitor and cma=96M
> >
> >  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
> >  1 file changed, 62 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > index 625c3aa..e7568e1 100644
> > --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > @@ -17,6 +17,18 @@
> >  		stdout-path = "serial0:115200n8";
> >  	};
> >
> > +	hdmi0-out {
> > +		compatible = "hdmi-connector";
> > +		label = "HDMI0 OUT";
> 
> Is the label physically present on the device (printed on the board or
> the case) ?

I am afraid it's not. Shall I send a v2? Or perhaps Simon could take it out while applying?

> 
> Apart from that, without access to the schematics I can't really tell if
> the DT is correct, but nothing strikes me as really wrong, so

I didn't know you had no access to the schematics, on their way...

Thanks,
Fab

> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > +		type = "a";
> > +
> > +		port {
> > +			hdmi0_con: endpoint {
> > +				remote-endpoint = <&rcar_dw_hdmi0_out>;
> > +			};
> > +		};
> > +	};
> > +
> >  	leds {
> >  		compatible = "gpio-leds";
> >
> > @@ -82,6 +94,30 @@
> >  		states = <3300000 1
> >  			  1800000 0>;
> >  	};
> > +
> > +	x302_clk: x302-clock {
> > +		compatible = "fixed-clock";
> > +		#clock-cells = <0>;
> > +		clock-frequency = <33000000>;
> > +	};
> > +
> > +	x304_clk: x304-clock {
> > +		compatible = "fixed-clock";
> > +		#clock-cells = <0>;
> > +		clock-frequency = <25000000>;
> > +	};
> > +};
> > +
> > +&du {
> > +	clocks = <&cpg CPG_MOD 724>,
> > +		 <&cpg CPG_MOD 723>,
> > +		 <&cpg CPG_MOD 722>,
> > +		 <&versaclock5 1>,
> > +		 <&x302_clk>,
> > +		 <&versaclock5 2>;
> > +	clock-names = "du.0", "du.1", "du.2",
> > +		      "dclkin.0", "dclkin.1", "dclkin.2";
> > +	status = "okay";
> >  };
> >
> >  &ehci0 {
> > @@ -109,11 +145,37 @@
> >  	};
> >  };
> >
> > +&hdmi0 {
> > +	status = "okay";
> > +
> > +	ports {
> > +		port@1 {
> > +			reg = <1>;
> > +			rcar_dw_hdmi0_out: endpoint {
> > +				remote-endpoint = <&hdmi0_con>;
> > +			};
> > +		};
> > +	};
> > +};
> > +
> >  &hsusb {
> >  	dr_mode = "otg";
> >  	status = "okay";
> >  };
> >
> > +&i2c4 {
> > +	clock-frequency = <400000>;
> > +	status = "okay";
> > +
> > +	versaclock5: clock-generator@6a {
> > +		compatible = "idt,5p49v5923";
> > +		reg = <0x6a>;
> > +		#clock-cells = <1>;
> > +		clocks = <&x304_clk>;
> > +		clock-names = "xin";
> > +	};
> > +};
> > +
> >  &ohci0 {
> >  	status = "okay";
> >  };
> 
> --
> Regards,
> 
> Laurent Pinchart
Simon Horman June 19, 2019, 2:06 p.m. UTC | #3
On Wed, Jun 19, 2019 at 12:48:17PM +0000, Fabrizio Castro wrote:
> Hi Laurent,
> 
> > From: linux-renesas-soc-owner@vger.kernel.org <linux-renesas-soc-owner@vger.kernel.org> On Behalf Of Laurent Pinchart
> > Sent: 19 June 2019 13:42
> > Subject: Re: [PATCH 3/3] arm64: dts: renesas: hihope-common: Add HDMI support
> > 
> > Hi Fabrizio,
> > 
> > Thank you for the patch.
> > 
> > On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> > > Add HDMI support to the HiHope RZ/G2[MN] mother board common
> > > dtsi.
> > >
> > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > >
> > > ---
> > > Please note that this patch was tested with a 4K monitor and cma=96M
> > >
> > >  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
> > >  1 file changed, 62 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > index 625c3aa..e7568e1 100644
> > > --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > @@ -17,6 +17,18 @@
> > >  		stdout-path = "serial0:115200n8";
> > >  	};
> > >
> > > +	hdmi0-out {
> > > +		compatible = "hdmi-connector";
> > > +		label = "HDMI0 OUT";
> > 
> > Is the label physically present on the device (printed on the board or
> > the case) ?
> 
> I am afraid it's not. Shall I send a v2? Or perhaps Simon could take it out while applying?

Thanks,

I have removed the label attribute when queuing this patch up for v5.3.
The result is as follows:

From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Date: Tue, 18 Jun 2019 16:18:39 +0100
Subject: [PATCH] arm64: dts: renesas: hihope-common: Add HDMI support

Add HDMI support to the HiHope RZ/G2[MN] mother board common
dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi | 61 ++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
index 625c3aaead14..9f05e80cee10 100644
--- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
@@ -17,6 +17,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi0-out {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi0_con: endpoint {
+				remote-endpoint = <&rcar_dw_hdmi0_out>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -82,6 +93,30 @@
 		states = <3300000 1
 			  1800000 0>;
 	};
+
+	x302_clk: x302-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <33000000>;
+	};
+
+	x304_clk: x304-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+};
+
+&du {
+	clocks = <&cpg CPG_MOD 724>,
+		 <&cpg CPG_MOD 723>,
+		 <&cpg CPG_MOD 722>,
+		 <&versaclock5 1>,
+		 <&x302_clk>,
+		 <&versaclock5 2>;
+	clock-names = "du.0", "du.1", "du.2",
+		      "dclkin.0", "dclkin.1", "dclkin.2";
+	status = "okay";
 };
 
 &ehci0 {
@@ -109,11 +144,37 @@
 	};
 };
 
+&hdmi0 {
+	status = "okay";
+
+	ports {
+		port@1 {
+			reg = <1>;
+			rcar_dw_hdmi0_out: endpoint {
+				remote-endpoint = <&hdmi0_con>;
+			};
+		};
+	};
+};
+
 &hsusb {
 	dr_mode = "otg";
 	status = "okay";
 };
 
+&i2c4 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	versaclock5: clock-generator@6a {
+		compatible = "idt,5p49v5923";
+		reg = <0x6a>;
+		#clock-cells = <1>;
+		clocks = <&x304_clk>;
+		clock-names = "xin";
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };
Fabrizio Castro June 19, 2019, 2:15 p.m. UTC | #4
Hello Simon,

Thank you for your feedback!

> From: Simon Horman <horms@verge.net.au>
> Sent: 19 June 2019 15:07
> Subject: Re: [PATCH 3/3] arm64: dts: renesas: hihope-common: Add HDMI support
> 
> On Wed, Jun 19, 2019 at 12:48:17PM +0000, Fabrizio Castro wrote:
> > Hi Laurent,
> >
> > > From: linux-renesas-soc-owner@vger.kernel.org <linux-renesas-soc-owner@vger.kernel.org> On Behalf Of Laurent Pinchart
> > > Sent: 19 June 2019 13:42
> > > Subject: Re: [PATCH 3/3] arm64: dts: renesas: hihope-common: Add HDMI support
> > >
> > > Hi Fabrizio,
> > >
> > > Thank you for the patch.
> > >
> > > On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> > > > Add HDMI support to the HiHope RZ/G2[MN] mother board common
> > > > dtsi.
> > > >
> > > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > > >
> > > > ---
> > > > Please note that this patch was tested with a 4K monitor and cma=96M
> > > >
> > > >  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
> > > >  1 file changed, 62 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > > index 625c3aa..e7568e1 100644
> > > > --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > > +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > > > @@ -17,6 +17,18 @@
> > > >  		stdout-path = "serial0:115200n8";
> > > >  	};
> > > >
> > > > +	hdmi0-out {
> > > > +		compatible = "hdmi-connector";
> > > > +		label = "HDMI0 OUT";
> > >
> > > Is the label physically present on the device (printed on the board or
> > > the case) ?
> >
> > I am afraid it's not. Shall I send a v2? Or perhaps Simon could take it out while applying?
> 
> Thanks,
> 
> I have removed the label attribute when queuing this patch up for v5.3.
> The result is as follows:

Great, thank you Simon!

Fab

> 
> From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Date: Tue, 18 Jun 2019 16:18:39 +0100
> Subject: [PATCH] arm64: dts: renesas: hihope-common: Add HDMI support
> 
> Add HDMI support to the HiHope RZ/G2[MN] mother board common
> dtsi.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 61 ++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> index 625c3aaead14..9f05e80cee10 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> @@ -17,6 +17,17 @@
>  		stdout-path = "serial0:115200n8";
>  	};
> 
> +	hdmi0-out {
> +		compatible = "hdmi-connector";
> +		type = "a";
> +
> +		port {
> +			hdmi0_con: endpoint {
> +				remote-endpoint = <&rcar_dw_hdmi0_out>;
> +			};
> +		};
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
> 
> @@ -82,6 +93,30 @@
>  		states = <3300000 1
>  			  1800000 0>;
>  	};
> +
> +	x302_clk: x302-clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <33000000>;
> +	};
> +
> +	x304_clk: x304-clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <25000000>;
> +	};
> +};
> +
> +&du {
> +	clocks = <&cpg CPG_MOD 724>,
> +		 <&cpg CPG_MOD 723>,
> +		 <&cpg CPG_MOD 722>,
> +		 <&versaclock5 1>,
> +		 <&x302_clk>,
> +		 <&versaclock5 2>;
> +	clock-names = "du.0", "du.1", "du.2",
> +		      "dclkin.0", "dclkin.1", "dclkin.2";
> +	status = "okay";
>  };
> 
>  &ehci0 {
> @@ -109,11 +144,37 @@
>  	};
>  };
> 
> +&hdmi0 {
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			reg = <1>;
> +			rcar_dw_hdmi0_out: endpoint {
> +				remote-endpoint = <&hdmi0_con>;
> +			};
> +		};
> +	};
> +};
> +
>  &hsusb {
>  	dr_mode = "otg";
>  	status = "okay";
>  };
> 
> +&i2c4 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	versaclock5: clock-generator@6a {
> +		compatible = "idt,5p49v5923";
> +		reg = <0x6a>;
> +		#clock-cells = <1>;
> +		clocks = <&x304_clk>;
> +		clock-names = "xin";
> +	};
> +};
> +
>  &ohci0 {
>  	status = "okay";
>  };
> --
> 2.11.0
Laurent Pinchart June 19, 2019, 2:36 p.m. UTC | #5
Hi Fabrizio,

On Wed, Jun 19, 2019 at 12:48:17PM +0000, Fabrizio Castro wrote:
> On Sent: 19 June 2019 13:42 Laurent Pinchart wrote:
> > On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> >> Add HDMI support to the HiHope RZ/G2[MN] mother board common
> >> dtsi.
> >>
> >> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >>
> >> ---
> >> Please note that this patch was tested with a 4K monitor and cma=96M
> >>
> >>  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
> >>  1 file changed, 62 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> >> index 625c3aa..e7568e1 100644
> >> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> >> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> >> @@ -17,6 +17,18 @@
> >>  		stdout-path = "serial0:115200n8";
> >>  	};
> >>
> >> +	hdmi0-out {
> >> +		compatible = "hdmi-connector";
> >> +		label = "HDMI0 OUT";
> > 
> > Is the label physically present on the device (printed on the board or
> > the case) ?
> 
> I am afraid it's not. Shall I send a v2? Or perhaps Simon could take it out while applying?
> 
> > Apart from that, without access to the schematics I can't really tell if
> > the DT is correct, but nothing strikes me as really wrong, so
> 
> I didn't know you had no access to the schematics, on their way...

Thank you. I confirm the DT looks good.

On a side note, there's an ESD protection and level shifter chip between
the HDMI output and the HDMI connector. On this board all its control
pins are hardwired to fixed levels, so it's completely transparent, but
in other cases it should be modelled in DT. I'm working on a driver for
the TPD12S015 which should be quite similar, I will post it soon.

> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> >> +		type = "a";
> >> +
> >> +		port {
> >> +			hdmi0_con: endpoint {
> >> +				remote-endpoint = <&rcar_dw_hdmi0_out>;
> >> +			};
> >> +		};
> >> +	};
> >> +
> >>  	leds {
> >>  		compatible = "gpio-leds";
> >>
> >> @@ -82,6 +94,30 @@
> >>  		states = <3300000 1
> >>  			  1800000 0>;
> >>  	};
> >> +
> >> +	x302_clk: x302-clock {
> >> +		compatible = "fixed-clock";
> >> +		#clock-cells = <0>;
> >> +		clock-frequency = <33000000>;
> >> +	};
> >> +
> >> +	x304_clk: x304-clock {
> >> +		compatible = "fixed-clock";
> >> +		#clock-cells = <0>;
> >> +		clock-frequency = <25000000>;
> >> +	};
> >> +};
> >> +
> >> +&du {
> >> +	clocks = <&cpg CPG_MOD 724>,
> >> +		 <&cpg CPG_MOD 723>,
> >> +		 <&cpg CPG_MOD 722>,
> >> +		 <&versaclock5 1>,
> >> +		 <&x302_clk>,
> >> +		 <&versaclock5 2>;
> >> +	clock-names = "du.0", "du.1", "du.2",
> >> +		      "dclkin.0", "dclkin.1", "dclkin.2";
> >> +	status = "okay";
> >>  };
> >>
> >>  &ehci0 {
> >> @@ -109,11 +145,37 @@
> >>  	};
> >>  };
> >>
> >> +&hdmi0 {
> >> +	status = "okay";
> >> +
> >> +	ports {
> >> +		port@1 {
> >> +			reg = <1>;
> >> +			rcar_dw_hdmi0_out: endpoint {
> >> +				remote-endpoint = <&hdmi0_con>;
> >> +			};
> >> +		};
> >> +	};
> >> +};
> >> +
> >>  &hsusb {
> >>  	dr_mode = "otg";
> >>  	status = "okay";
> >>  };
> >>
> >> +&i2c4 {
> >> +	clock-frequency = <400000>;
> >> +	status = "okay";
> >> +
> >> +	versaclock5: clock-generator@6a {
> >> +		compatible = "idt,5p49v5923";
> >> +		reg = <0x6a>;
> >> +		#clock-cells = <1>;
> >> +		clocks = <&x304_clk>;
> >> +		clock-names = "xin";
> >> +	};
> >> +};
> >> +
> >>  &ohci0 {
> >>  	status = "okay";
> >>  };
Fabrizio Castro June 19, 2019, 2:51 p.m. UTC | #6
Hello Laurent,

Thank you for your feedback!

> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: 19 June 2019 15:36
> Subject: Re: [PATCH 3/3] arm64: dts: renesas: hihope-common: Add HDMI support
> 
> Hi Fabrizio,
> 
> On Wed, Jun 19, 2019 at 12:48:17PM +0000, Fabrizio Castro wrote:
> > On Sent: 19 June 2019 13:42 Laurent Pinchart wrote:
> > > On Tue, Jun 18, 2019 at 04:18:39PM +0100, Fabrizio Castro wrote:
> > >> Add HDMI support to the HiHope RZ/G2[MN] mother board common
> > >> dtsi.
> > >>
> > >> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > >>
> > >> ---
> > >> Please note that this patch was tested with a 4K monitor and cma=96M
> > >>
> > >>  arch/arm64/boot/dts/renesas/hihope-common.dtsi | 62 ++++++++++++++++++++++++++
> > >>  1 file changed, 62 insertions(+)
> > >>
> > >> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > >> index 625c3aa..e7568e1 100644
> > >> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > >> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> > >> @@ -17,6 +17,18 @@
> > >>  		stdout-path = "serial0:115200n8";
> > >>  	};
> > >>
> > >> +	hdmi0-out {
> > >> +		compatible = "hdmi-connector";
> > >> +		label = "HDMI0 OUT";
> > >
> > > Is the label physically present on the device (printed on the board or
> > > the case) ?
> >
> > I am afraid it's not. Shall I send a v2? Or perhaps Simon could take it out while applying?
> >
> > > Apart from that, without access to the schematics I can't really tell if
> > > the DT is correct, but nothing strikes me as really wrong, so
> >
> > I didn't know you had no access to the schematics, on their way...
> 
> Thank you. I confirm the DT looks good.

Thank you!

> 
> On a side note, there's an ESD protection and level shifter chip between
> the HDMI output and the HDMI connector. On this board all its control
> pins are hardwired to fixed levels, so it's completely transparent, but
> in other cases it should be modelled in DT. I'm working on a driver for
> the TPD12S015 which should be quite similar, I will post it soon.

Good to know, I am looking forward to see it.

Thanks,
Fab

> 
> > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >
> > >> +		type = "a";
> > >> +
> > >> +		port {
> > >> +			hdmi0_con: endpoint {
> > >> +				remote-endpoint = <&rcar_dw_hdmi0_out>;
> > >> +			};
> > >> +		};
> > >> +	};
> > >> +
> > >>  	leds {
> > >>  		compatible = "gpio-leds";
> > >>
> > >> @@ -82,6 +94,30 @@
> > >>  		states = <3300000 1
> > >>  			  1800000 0>;
> > >>  	};
> > >> +
> > >> +	x302_clk: x302-clock {
> > >> +		compatible = "fixed-clock";
> > >> +		#clock-cells = <0>;
> > >> +		clock-frequency = <33000000>;
> > >> +	};
> > >> +
> > >> +	x304_clk: x304-clock {
> > >> +		compatible = "fixed-clock";
> > >> +		#clock-cells = <0>;
> > >> +		clock-frequency = <25000000>;
> > >> +	};
> > >> +};
> > >> +
> > >> +&du {
> > >> +	clocks = <&cpg CPG_MOD 724>,
> > >> +		 <&cpg CPG_MOD 723>,
> > >> +		 <&cpg CPG_MOD 722>,
> > >> +		 <&versaclock5 1>,
> > >> +		 <&x302_clk>,
> > >> +		 <&versaclock5 2>;
> > >> +	clock-names = "du.0", "du.1", "du.2",
> > >> +		      "dclkin.0", "dclkin.1", "dclkin.2";
> > >> +	status = "okay";
> > >>  };
> > >>
> > >>  &ehci0 {
> > >> @@ -109,11 +145,37 @@
> > >>  	};
> > >>  };
> > >>
> > >> +&hdmi0 {
> > >> +	status = "okay";
> > >> +
> > >> +	ports {
> > >> +		port@1 {
> > >> +			reg = <1>;
> > >> +			rcar_dw_hdmi0_out: endpoint {
> > >> +				remote-endpoint = <&hdmi0_con>;
> > >> +			};
> > >> +		};
> > >> +	};
> > >> +};
> > >> +
> > >>  &hsusb {
> > >>  	dr_mode = "otg";
> > >>  	status = "okay";
> > >>  };
> > >>
> > >> +&i2c4 {
> > >> +	clock-frequency = <400000>;
> > >> +	status = "okay";
> > >> +
> > >> +	versaclock5: clock-generator@6a {
> > >> +		compatible = "idt,5p49v5923";
> > >> +		reg = <0x6a>;
> > >> +		#clock-cells = <1>;
> > >> +		clocks = <&x304_clk>;
> > >> +		clock-names = "xin";
> > >> +	};
> > >> +};
> > >> +
> > >>  &ohci0 {
> > >>  	status = "okay";
> > >>  };
> 
> --
> Regards,
> 
> Laurent Pinchart
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
index 625c3aa..e7568e1 100644
--- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
@@ -17,6 +17,18 @@ 
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi0-out {
+		compatible = "hdmi-connector";
+		label = "HDMI0 OUT";
+		type = "a";
+
+		port {
+			hdmi0_con: endpoint {
+				remote-endpoint = <&rcar_dw_hdmi0_out>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -82,6 +94,30 @@ 
 		states = <3300000 1
 			  1800000 0>;
 	};
+
+	x302_clk: x302-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <33000000>;
+	};
+
+	x304_clk: x304-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+};
+
+&du {
+	clocks = <&cpg CPG_MOD 724>,
+		 <&cpg CPG_MOD 723>,
+		 <&cpg CPG_MOD 722>,
+		 <&versaclock5 1>,
+		 <&x302_clk>,
+		 <&versaclock5 2>;
+	clock-names = "du.0", "du.1", "du.2",
+		      "dclkin.0", "dclkin.1", "dclkin.2";
+	status = "okay";
 };
 
 &ehci0 {
@@ -109,11 +145,37 @@ 
 	};
 };
 
+&hdmi0 {
+	status = "okay";
+
+	ports {
+		port@1 {
+			reg = <1>;
+			rcar_dw_hdmi0_out: endpoint {
+				remote-endpoint = <&hdmi0_con>;
+			};
+		};
+	};
+};
+
 &hsusb {
 	dr_mode = "otg";
 	status = "okay";
 };
 
+&i2c4 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	versaclock5: clock-generator@6a {
+		compatible = "idt,5p49v5923";
+		reg = <0x6a>;
+		#clock-cells = <1>;
+		clocks = <&x304_clk>;
+		clock-names = "xin";
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };