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


Nobuhiro Iwamatsu
 

Hi,

-----Original Message-----
From: cip-dev@lists.cip-project.org [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian Rotariu
Sent: Tuesday, June 2, 2020 5:43 PM
To: cip-dev@lists.cip-project.org
Cc: Chris Paterson <chris.paterson2@renesas.com>; fabrizio.castro.jz@renesas.com
Subject: [cip-dev] [PATCH v2 v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support

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 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi | 1 -
2 files changed, 81 insertions(+), 1 deletion(-)

Looks good to me this patch.
BTW, when you confirmed this patch, did you update the kernel config?
If we need to add drivers, please tell us what kernel config you used.

Best regards,
Nobuhiro

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";
diff --git a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
index e643064..ec4c29a 100644
--- a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
@@ -42,7 +42,6 @@
&du {
pinctrl-0 = <&du_pins>;
pinctrl-names = "default";
- status = "okay";

ports {
port@0 {
--
2.7.4

Join cip-dev@lists.cip-project.org to automatically receive all group messages.