[PATCH 4.4.y-cip 9/9] ARM: dts: r8a7742-iwg21d-q7: Add LCD support


Lad Prabhakar
 

commit 9b533dc8f340f5e9e7f2ed610510b2191d5e447c upstream.

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

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20200929140502.16017-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[PL: 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; dropped power-supply property from panel node; dropped vcc_3v3_tft1
node; dropped vcc-supply property from touch node]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 73 +++++++++++++++++++++++++
1 file changed, 73 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
index 958edef2004c..e876ba63c8c3 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
@@ -51,6 +51,41 @@
clock-frequency = <26000000>;
};

+ lcd_backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&tpu 2 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ pinctrl-0 = <&backlight_pins>;
+ pinctrl-names = "default";
+ default-brightness-level = <7>;
+ enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ panel {
+ compatible = "edt,etm0700g0dh6";
+ 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";
@@ -128,6 +163,15 @@
VDDIO-supply = <&reg_3p3v>;
VDDD-supply = <&reg_1p5v>;
};
+
+ touch: touchpanel@38 {
+ compatible = "edt,edt-ft5406";
+ reg = <0x38>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
+ /* GP1_29 is also shared with audio codec reset pin */
+ reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+ };
};

&can1 {
@@ -141,6 +185,26 @@
status = "okay";
};

+&du {
+ status = "okay";
+
+ ports {
+ port@1 {
+ endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&gpio0 {
+ touch-interrupt {
+ gpio-hog;
+ gpios = <24 GPIO_ACTIVE_LOW>;
+ input;
+ };
+};
+
&gpio1 {
can-trx-en-gpio{
gpio-hog;
@@ -218,6 +282,11 @@
function = "avb";
};

+ backlight_pins: backlight {
+ groups = "tpu0_to2";
+ function = "tpu0";
+ };
+
can1_pins: can1 {
groups = "can1_data_b";
function = "can1";
@@ -303,6 +372,10 @@
shared-pin;
};

+&tpu {
+ status = "okay";
+};
+
&usbphy {
status = "okay";
};
--
2.17.1

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