Skip to contentSkip to conversation

ARM: dts: imx7d-sdb: Add DRM panel support

PATCH New Marco Franchi 2 participants 3 messages Jul 17, 2017 – Jul 25, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 ARM: dts: imx7d-sdb: Add DRM panel support

It is preferred to use the panel compatible string rather than passing the LCD timming in the device tree.

So pass the "innolux,at043tn24" compatible string to describe the parallel LCD on this board.

---
Changes since v3:
- none

 arch/arm/boot/dts/imx7d-sdb.dts | 36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)
arch/arm/boot/dts/imx7d-sdb.dts +13 -23
index 2dce141..5827ae3 100644
@@ -117,6 +117,16 @@
 		regulator-max-microvolt = <3300000>;
 		startup-delay-us = <200000>;
 	};
+
+	panel {
+		compatible = "innolux,at043tn24";
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display_out>;
+			};
+		};
+	};
 };
 
 &adc1 {
@@ -323,31 +333,11 @@
 &lcdif {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_lcdif>;
-	display = <&display0>;
 	status = "okay";
 
-	display0: display {
-		bits-per-pixel = <16>;
-		bus-width = <24>;
-
-		display-timings {
-			native-mode = <&timing0>;
-
-			timing0: timing0 {
-				clock-frequency = <9200000>;
-				hactive = <480>;
-				vactive = <272>;
-				hfront-porch = <8>;
-				hback-porch = <4>;
-				hsync-len = <41>;
-				vback-porch = <2>;
-				vfront-porch = <4>;
-				vsync-len = <10>;
-				hsync-active = <0>;
-				vsync-active = <0>;
-				de-active = <1>;
-				pixelclk-active = <0>;
-			};
+	port {
+		display_out: endpoint {
+			remote-endpoint = <&panel_in>;
 		};
 	};
 };
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 2/2 ARM: dts: imx7d-sdb: Pass 'enable-gpios' and 'power-supply' properties

Currently the LCD is turned on thanks to the bootloader initialization.

In order to make the kernel to turn on the LCD on is own, pass the 'enable-gpios' and 'power-supply' properties.

Also, the GPIO1_IO01 is not used as PWM functionality on this board. It is connected to the PWREN pin of connector J14 and has a GPIO function, so remove the PWM1 node and change the GPIO1_IO01 IOMUX to GPIO function.

---
Changes since v3:
- fix subject name

 arch/arm/boot/dts/imx7d-sdb.dts | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
arch/arm/boot/dts/imx7d-sdb.dts +13 -8
index 1600c7d..a01e6b3 100644
@@ -118,8 +118,19 @@
 		startup-delay-us = <200000>;
 	};
 
+	reg_lcd_3v3: regulator-lcd-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "lcd-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&extended_io 7 GPIO_ACTIVE_LOW>;
+	};
+
 	panel {
 		compatible = "innolux,at043tn24";
+		pinctrl-0 = <&pinctrl_backlight>;
+		enable-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+		power-supply = <&reg_lcd_3v3>;
 
 		port {
 			panel_in: endpoint {
@@ -347,12 +358,6 @@
 	status = "okay";
 };
 
-&pwm1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_pwm1>;
-	status = "okay";
-};
-
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
@@ -684,9 +689,9 @@
 		>;
 	};
 
-	pinctrl_pwm1: pwm1grp {
+	pinctrl_backlight: backlightgrp {
 		fsl,pins = <
-			MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT		0x110b0
+			MX7D_PAD_LPSR_GPIO1_IO01__GPIO1_IO1		0x110b0
 		>;
 
 		pinctrl_spi4: spi4grp {
Signature · 1 line
2.7.4
Applied
#2 lore raw

PATCH v4 1/2 ARM: dts: imx7d-sdb: Add DRM panel support

In reply to Marco Franchi
Quoted 7 lines · Marco Franchi

It is preferred to use the panel compatible string rather than passing the LCD timming in the device tree.

So pass the "innolux,at043tn24" compatible string to describe the parallel LCD on this board.

Applied both, thanks.