diff mbox series

[4.19.y-cip,20/35] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS support

Message ID 1580935141-1173-21-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive)
State Accepted
Delegated to: Pavel Machek
Headers show
Series Renesas RZ/G2 extend peripheral support | expand

Commit Message

Lad Prabhakar Feb. 5, 2020, 8:38 p.m. UTC
From: Biju Das <biju.das@bp.renesas.com>

commit 642a33259bdfd5aebca24a4b7b05681239873157 upstream.

This patch adds LVDS support for RZ/G2[MN] boards.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/1570029619-43238-9-git-send-email-biju.das@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 29 +++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Pavel Machek Feb. 7, 2020, 1:10 p.m. UTC | #1
Hi!

> +&lvds0 {
> +	/*
> +	 * Please include the LVDS panel .dtsi file and uncomment the below line
> +	 * to enable LVDS panel connected to RZ/G2[MN] boards.
> +	 */
> +
> +	/* status = "okay"; */
> +
> +	ports {
> +		port@1 {
> +			lvds_connector: endpoint {
> +			};
> +		};
> +	};
> +};

Mainline does this so I applied it, but I don't believe you want
boards to modify the dtsi -- it will get problematic if you want to
support two different boards with different LVDS panels in one source
code.

Best regards,
								Pavel
Lad Prabhakar Feb. 7, 2020, 1:19 p.m. UTC | #2
Hi Pavel,

> -----Original Message-----
> From: Pavel Machek <pavel@denx.de>
> Sent: 07 February 2020 13:10
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Cc: cip-dev@lists.cip-project.org; Nobuhiro Iwamatsu
> <nobuhiro1.iwamatsu@toshiba.co.jp>; Pavel Machek <pavel@denx.de>;
> Chris Paterson <Chris.Paterson2@renesas.com>
> Subject: Re: [PATCH 4.19.y-cip 20/35] arm64: dts: renesas: hihope-rzg2-ex:
> Add LVDS support
>
> Hi!
>
> > +&lvds0 {
> > +/*
> > + * Please include the LVDS panel .dtsi file and uncomment the below
> line
> > + * to enable LVDS panel connected to RZ/G2[MN] boards.
> > + */
> > +
> > +/* status = "okay"; */
> > +
> > +ports {
> > +port@1 {
> > +lvds_connector: endpoint {
> > +};
> > +};
> > +};
> > +};
>
> Mainline does this so I applied it, but I don't believe you want boards to
> modify the dtsi -- it will get problematic if you want to support two different
> boards with different LVDS panels in one source code.
>
Agreed, ideally that must go into board specific file.

Cheers,
--Prabhakar

> Best regards,
> Pavel
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
index 31c3520..28fe17e 100644
--- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
@@ -51,6 +51,35 @@ 
 	status = "okay";
 };
 
+&gpio1 {
+	/*
+	 * When GP1_20 is LOW LVDS0 is connected to the LVDS connector
+	 * When GP1_20 is HIGH LVDS0 is connected to the LT8918L
+	 */
+	lvds-connector-en-gpio {
+		gpio-hog;
+		gpios = <20 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "lvds-connector-en-gpio";
+	};
+};
+
+&lvds0 {
+	/*
+	 * Please include the LVDS panel .dtsi file and uncomment the below line
+	 * to enable LVDS panel connected to RZ/G2[MN] boards.
+	 */
+
+	/* status = "okay"; */
+
+	ports {
+		port@1 {
+			lvds_connector: endpoint {
+			};
+		};
+	};
+};
+
 &pciec0 {
 	status = "okay";
 };