diff mbox series

[v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support

Message ID 1590534014-2203-1-git-send-email-marian-cristian.rotariu.rb@bp.renesas.com (mailing list archive)
State Changes Requested
Headers show
Series [v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support | expand

Commit Message

Marian-Cristian Rotariu May 26, 2020, 11 p.m. UTC
From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.

The iwg20d comes with a 7" capacitive touch screen, therefore
add support for it.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.castro@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
(remove the LVDS decoder as there is no driver for it;
add panel timings to panel node since the LVDS driver reads them off the
panel DT node)
Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
---
 arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81 +++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

Comments

Nobuhiro Iwamatsu May 27, 2020, 6:05 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: cip-dev@lists.cip-project.org [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian Rotariu
> Sent: Wednesday, May 27, 2020 8:00 AM
> To: cip-dev@lists.cip-project.org
> Cc: Chris Paterson <chris.paterson2@renesas.com>; fabrizio.castro.jz@renesas.com
> Subject: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support
> 
> From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> 
> commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.
> 
> The iwg20d comes with a 7" capacitive touch screen, therefore
> add support for it.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Link: https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.castro@bp.renesas.com
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> (remove the LVDS decoder as there is no driver for it;
> add panel timings to panel node since the LVDS driver reads them off the
> panel DT node)
> Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
> ---
>  arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81 +++++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
> 

I think you forget adding a fix to arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi.

> diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> index 011dbab..52c1787 100644
> --- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> +++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> @@ -49,6 +49,40 @@
>  		clock-frequency = <26000000>;
>  	};
> 
> +	lcd_backlight: backlight {
> +		compatible = "pwm-backlight";
> +
> +		pwms = <&pwm3 0 5000000 0>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		default-brightness-level = <7>;
> +		enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
> +	};
> +
> +	panel {
> +	    compatible = "edt,etm0700g0dh6", "simple-panel";
> +	    backlight = <&lcd_backlight>;
> +
> +	    port {
> +		    panel_in: endpoint {
> +			    remote-endpoint = <&du_out_lvds0>;
> +		    };
> +	    };
> +
> +	    panel-timing {
> +		    clock-frequency = <33260>;
> +		    hactive = <800>;
> +		    vactive = <480>;
> +
> +		    hfront-porch = <40>;
> +		    hback-porch = <88>;
> +		    hsync-len = <128>;
> +
> +		    vback-porch = <33>;
> +		    vfront-porch = <10>;
> +		    vsync-len = <2>;
> +	    };
> +	};
> +
>  	reg_1p5v: 1p5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "1P5V";
> @@ -123,6 +157,35 @@
>  	status = "okay";
>  };
> 
> +&du {
> +	status = "okay";
> +
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		port@0 {
> +			reg = <0>;
> +			du_out_rgb: endpoint {
> +			};
> +		};
> +		port@1 {
> +			reg = <1>;
> +			du_out_lvds0: endpoint {
> +			       remote-endpoint = <&panel_in>;
> +			};
> +		};
> +	};
> +};
> +
> +&gpio2 {
> +	touch-interrupt {
> +		gpio-hog;
> +		gpios = <12 GPIO_ACTIVE_LOW>;
> +		input;
> +	};
> +};
> +
>  &hsusb {
>  	status = "okay";
>  	pinctrl-0 = <&usb0_pins>;
> @@ -150,6 +213,13 @@
>  		VDDIO-supply = <&reg_3p3v>;
>  		VDDD-supply = <&reg_1p5v>;
>  	};
> +
> +	touch: touchpanel@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio2>;
> +		interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
> +	};
>  };
> 
>  &pci0 {
> @@ -183,6 +253,11 @@
>  		function = "i2c2";
>  	};
> 
> +	pwm3_pins: pwm3 {
> +		groups = "pwm3";
> +		function = "pwm3";
> +	};
> +
>  	scif0_pins: scif0 {
>  		groups = "scif0_data_d";
>  		function = "scif0";
> @@ -215,6 +290,12 @@
>  	};
>  };
> 
> +&pwm3 {
> +	pinctrl-0 = <&pwm3_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins>;
>  	pinctrl-names = "default";
> --
> 2.7.4
Best regards,
  Nobuhiro
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4645): https://lists.cip-project.org/g/cip-dev/message/4645
Mute This Topic: https://lists.cip-project.org/mt/74489071/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy  [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
Marian-Cristian Rotariu June 1, 2020, 11:14 a.m. UTC | #2
Hi Nobuhiro,

Thank you for your review!

> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> Behalf Of Nobuhiro Iwamatsu via lists.cip-project.org
> Sent: 27 May 2020 07:06
> To: cip-dev@lists.cip-project.org
> Cc: Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>
> Subject: Re: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add
> LCD support
> 
> Hi,
> 
> > -----Original Message-----
> > From: cip-dev@lists.cip-project.org
> > [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian
> > Rotariu
> > Sent: Wednesday, May 27, 2020 8:00 AM
> > To: cip-dev@lists.cip-project.org
> > Cc: Chris Paterson <chris.paterson2@renesas.com>;
> > fabrizio.castro.jz@renesas.com
> > Subject: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add
> > LCD support
> >
> > From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >
> > commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.
> >
> > The iwg20d comes with a 7" capacitive touch screen, therefore add
> > support for it.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Link:
> > https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.
> > castro@bp.renesas.com
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> (remove
> > the LVDS decoder as there is no driver for it; add panel timings to
> > panel node since the LVDS driver reads them off the panel DT node)
> > Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
> > ---
> >  arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81
> > +++++++++++++++++++++++++++++++++
> >  1 file changed, 81 insertions(+)
> >
> 
> I think you forget adding a fix to arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi.

Can you please be more specific? There should not be a conflict between the two dev
board configurations. I double checked the two dts, but it seems to be no issue and they
resemble what is in the upstream kernel.

Cheers,
Marian
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4655): https://lists.cip-project.org/g/cip-dev/message/4655
Mute This Topic: https://lists.cip-project.org/mt/74489071/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy  [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
Nobuhiro Iwamatsu June 2, 2020, 4:35 a.m. UTC | #3
Hi,

> -----Original Message-----
> From: cip-dev@lists.cip-project.org [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian Rotariu
> Sent: Monday, June 1, 2020 8:14 PM
> To: cip-dev@lists.cip-project.org
> Cc: Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro <fabrizio.castro.jz@renesas.com>
> Subject: Re: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support
> 
> Hi Nobuhiro,
> 
> Thank you for your review!
> 
> > -----Original Message-----
> > From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> > Behalf Of Nobuhiro Iwamatsu via lists.cip-project.org
> > Sent: 27 May 2020 07:06
> > To: cip-dev@lists.cip-project.org
> > Cc: Chris Paterson <Chris.Paterson2@renesas.com>; Fabrizio Castro
> > <fabrizio.castro.jz@renesas.com>
> > Subject: Re: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add
> > LCD support
> >
> > Hi,
> >
> > > -----Original Message-----
> > > From: cip-dev@lists.cip-project.org
> > > [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian
> > > Rotariu
> > > Sent: Wednesday, May 27, 2020 8:00 AM
> > > To: cip-dev@lists.cip-project.org
> > > Cc: Chris Paterson <chris.paterson2@renesas.com>;
> > > fabrizio.castro.jz@renesas.com
> > > Subject: [cip-dev] [PATCH v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add
> > > LCD support
> > >
> > > From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > >
> > > commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.
> > >
> > > The iwg20d comes with a 7" capacitive touch screen, therefore add
> > > support for it.
> > >
> > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Link:
> > > https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.
> > > castro@bp.renesas.com
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> (remove
> > > the LVDS decoder as there is no driver for it; add panel timings to
> > > panel node since the LVDS driver reads them off the panel DT node)
> > > Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
> > > ---
> > >  arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81
> > > +++++++++++++++++++++++++++++++++
> > >  1 file changed, 81 insertions(+)
> > >
> >
> > I think you forget adding a fix to arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi.
> 
> Can you please be more specific? There should not be a conflict between the two dev
> board configurations. I double checked the two dts, but it seems to be no issue and they
> resemble what is in the upstream kernel.

Commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 provides a fix for two files.
The patch you posted is arch/arm/boot/dts/iwg20d-q7-common.dtsi only, there is no fix for
arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi.

---
diff --git a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
index 0e99df218252..ede2e0c999b1 100644
--- a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
@@ -39,7 +39,6 @@
 &du {
 	pinctrl-0 = <&du_pins>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	ports {
 		port@0 {
---

Best regards,
  Nobuhiro

> 
> Cheers,
> Marian
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4657): https://lists.cip-project.org/g/cip-dev/message/4657
Mute This Topic: https://lists.cip-project.org/mt/74489071/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy  [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
Marian-Cristian Rotariu June 2, 2020, 8:37 a.m. UTC | #4
Hi,

> > > I think you forget adding a fix to arch/arm/boot/dts/iwg20d-q7-dbcm-
> ca.dtsi.
> >
> > Can you please be more specific? There should not be a conflict
> > between the two dev board configurations. I double checked the two
> > dts, but it seems to be no issue and they resemble what is in the upstream
> kernel.
> 
> Commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 provides a fix for two
> files.
> The patch you posted is arch/arm/boot/dts/iwg20d-q7-common.dtsi only,
> there is no fix for arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi.
> 
> ---
> diff --git a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
> b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
> index 0e99df218252..ede2e0c999b1 100644
> --- a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
> +++ b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
> @@ -39,7 +39,6 @@
>  &du {
>  	pinctrl-0 = <&du_pins>;
>  	pinctrl-names = "default";
> -	status = "okay";
> 
>  	ports {
>  		port@0 {
> ---

Indeed, there is an overlapping property. I will post v2.
Thank you for pointing that out.

Marian
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4660): https://lists.cip-project.org/g/cip-dev/message/4660
Mute This Topic: https://lists.cip-project.org/mt/74489071/4520428
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy  [patchwork-cip-dev@patchwork.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
index 011dbab..52c1787 100644
--- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
@@ -49,6 +49,40 @@ 
 		clock-frequency = <26000000>;
 	};
 
+	lcd_backlight: backlight {
+		compatible = "pwm-backlight";
+
+		pwms = <&pwm3 0 5000000 0>;
+		brightness-levels = <0 4 8 16 32 64 128 255>;
+		default-brightness-level = <7>;
+		enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
+	};
+
+	panel {
+	    compatible = "edt,etm0700g0dh6", "simple-panel";
+	    backlight = <&lcd_backlight>;
+
+	    port {
+		    panel_in: endpoint {
+			    remote-endpoint = <&du_out_lvds0>;
+		    };
+	    };
+
+	    panel-timing {
+		    clock-frequency = <33260>;
+		    hactive = <800>;
+		    vactive = <480>;
+
+		    hfront-porch = <40>;
+		    hback-porch = <88>;
+		    hsync-len = <128>;
+
+		    vback-porch = <33>;
+		    vfront-porch = <10>;
+		    vsync-len = <2>;
+	    };
+	};
+
 	reg_1p5v: 1p5v {
 		compatible = "regulator-fixed";
 		regulator-name = "1P5V";
@@ -123,6 +157,35 @@ 
 	status = "okay";
 };
 
+&du {
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			du_out_rgb: endpoint {
+			};
+		};
+		port@1 {
+			reg = <1>;
+			du_out_lvds0: endpoint {
+			       remote-endpoint = <&panel_in>;
+			};
+		};
+	};
+};
+
+&gpio2 {
+	touch-interrupt {
+		gpio-hog;
+		gpios = <12 GPIO_ACTIVE_LOW>;
+		input;
+	};
+};
+
 &hsusb {
 	status = "okay";
 	pinctrl-0 = <&usb0_pins>;
@@ -150,6 +213,13 @@ 
 		VDDIO-supply = <&reg_3p3v>;
 		VDDD-supply = <&reg_1p5v>;
 	};
+
+	touch: touchpanel@38 {
+		compatible = "edt,edt-ft5406";
+		reg = <0x38>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+	};
 };
 
 &pci0 {
@@ -183,6 +253,11 @@ 
 		function = "i2c2";
 	};
 
+	pwm3_pins: pwm3 {
+		groups = "pwm3";
+		function = "pwm3";
+	};
+
 	scif0_pins: scif0 {
 		groups = "scif0_data_d";
 		function = "scif0";
@@ -215,6 +290,12 @@ 
 	};
 };
 
+&pwm3 {
+	pinctrl-0 = <&pwm3_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins>;
 	pinctrl-names = "default";