Skip to contentSkip to conversation

drm/panel: simple: Add Logic PD Type 28 display support

PATCH Superseded Adam Ford 2 participants 8 messages Sep 17, 2019 – Sep 23, 2019

Subsystems (4)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/3 drm/panel: simple: Add Logic PD Type 28 display support

Previously, there was an omap panel-dpi driver that would read generic timings from the device tree and set the display timing accordingly. This driver was removed so the screen no longer functions. This patch modifies the panel-simple file to setup the timings to the same values previously used.

Fixes 8bf4b1621178 ("drm/omap: Remove panel-dpi driver")
drivers/gpu/drm/panel/panel-simple.c +37 -0
index 5a93c4edf1e4..c86c30f3a8a1 100644
@@ -1900,6 +1900,40 @@ static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
 	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
 };
 
+static const struct drm_display_mode logicpd_type_28_mode = {
+	.clock = 9000,
+	.hdisplay = 480,
+	.hsync_start = 480 + 3,
+	.hsync_end = 480 + 3 + 42,
+	.htotal = 480 + 3 + 42 + 2,
+
+	.vdisplay = 272,
+	.vsync_start = 272 + 2,
+	.vsync_end = 272 + 2 + 11,
+	.vtotal = 272 + 2 + 11 + 3,
+	.vrefresh = 60,
+	.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
+};
+
+static const struct panel_desc logicpd_type_28 = {
+	.modes = &logicpd_type_28_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 105,
+		.height = 67,
+	},
+	.delay = {
+		.prepare = 200,
+		.enable = 200,
+		.unprepare = 200,
+		.disable = 200,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
+		     DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
+};
+
 static const struct panel_desc mitsubishi_aa070mc01 = {
 	.modes = &mitsubishi_aa070mc01_mode,
 	.num_modes = 1,
@@ -2948,6 +2982,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "lg,lp129qe",
 		.data = &lg_lp129qe,
+	}, {
+		.compatible = "logicpd,type28",
+		.data = &logicpd_type_28,
 	}, {
 		.compatible = "mitsubishi,aa070mc01-ca1",
 		.data = &mitsubishi_aa070mc01,
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 dt-bindings: Add Logic PD Type 28 display panel

This patch adds documentation of device tree bindings for the WVGA panel Logic PD Type 28 display.

Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +26 -0
new file mode 100644
index 000000000000..829fc5210e06
@@ -0,0 +1,26 @@
+Logic PD Type 28 4.3" WQVGA TFT LCD panel
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
+
+Required properties:
+- compatible: should be "logicpd,type28"
+
+Optional properties:
+- power-supply: regulator to provide the supply voltage
+- enable-gpios: GPIO pin to enable or disable the panel
+- backlight: phandle of the backlight device attached to the panel
+
+Optional nodes:
+- Video port for RGB input.
+
+Example:
+	lcd0: display {
+		compatible = "logicpd,type28";
+		enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/3] dt-bindings: Add Logic PD Type 28 display panel

Hi Adam.

Good with even more panels.
But for new bindings please use meta-schema (.yaml) format. This is what we use for new bindings as it allows better validation.

Sam

Quoted 13 lines · Adam Ford

This patch adds documentation of device tree bindings for the WVGA panel Logic PD Type 28 display.

Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +2 -0
new file mode 100644
index 000000000000..829fc5210e06
@@ -0,0 +1,26 @@
+Logic PD Type 28 4.3" WQVGA TFT LCD panel
+

Documentation/devicetree/bindings/display/panel/logicpd,type28.txt line 12

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +10 -0
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
+
+Required properties:
+- compatible: should be "logicpd,type28"
+
+Optional properties:
+- power-supply: regulator to provide the supply voltage
+- enable-gpios: GPIO pin to enable or disable the panel
+- backlight: phandle of the backlight device attached to the panel

Is it correct that these are optional for the descrivbed panel?

Quoted 16 lines
Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +14 -0
+
+Optional nodes:
+- Video port for RGB input.
+
+Example:
+	lcd0: display {
+		compatible = "logicpd,type28";
+		enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
Signature · 1 line
2.17.1
author
#3 lore raw

Re: [PATCH 2/3] dt-bindings: Add Logic PD Type 28 display panel

Quoted 7 lines · Sam Ravnborg

Hi Adam.

Good with even more panels.
But for new bindings please use meta-schema (.yaml) format. This is what we use for new bindings as it allows better validation.

I don't know that syntax, but I'll try to piece together a few different examples to come up with something. I should have a V2 today.

adam

Quoted 45 lines

Sam

Quoted 13 lines · Adam Ford

This patch adds documentation of device tree bindings for the WVGA panel Logic PD Type 28 display.

Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +2 -0
new file mode 100644
index 000000000000..829fc5210e06
@@ -0,0 +1,26 @@
+Logic PD Type 28 4.3" WQVGA TFT LCD panel
+

Documentation/devicetree/bindings/display/panel/logicpd,type28.txt line 12

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +10 -0
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
+
+Required properties:
+- compatible: should be "logicpd,type28"
+
+Optional properties:
+- power-supply: regulator to provide the supply voltage
+- enable-gpios: GPIO pin to enable or disable the panel
+- backlight: phandle of the backlight device attached to the panel

Is it correct that these are optional for the descrivbed panel?

Quoted 16 lines
Documentation/devicetree/bindings/display/panel/logicpd,type28.txt new file +14 -1
+
+Optional nodes:
+- Video port for RGB input.
+
+Example:
+     lcd0: display {
+             compatible = "logicpd,type28";
+             enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;
+             port {
+                     lcd_in: endpoint {
+                             remote-endpoint = <&dpi_out>;
+                     };
+             };
+     };
--

2.17.1

author
#4 lore raw

PATCH 3/3 ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel

In reply to Adam Ford

With the removal of the panel-dpi from the omap drivers, the LCD no longer works. This patch points the device tree to a newly created panel named "logicpd,type28"

Fixes 8bf4b1621178 ("drm/omap: Remove panel-dpi driver")
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +3 -17
index 07ac99b9cda6..00c426bd51a0 100644
@@ -11,22 +11,8 @@
 #include "logicpd-torpedo-37xx-devkit.dts"
 
 &lcd0 {
-
+	/* This isn't the exact LCD, but the timings meet spec */
+	/* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */
+	compatible = "logicpd,type28";
 	label = "28";
-
-	panel-timing {
-		clock-frequency = <9000000>;
-		hactive = <480>;
-		vactive = <272>;
-		hfront-porch = <3>;
-		hback-porch = <2>;
-		hsync-len = <42>;
-		vback-porch = <3>;
-		vfront-porch = <2>;
-		vsync-len = <11>;
-		hsync-active = <1>;
-		vsync-active = <1>;
-		de-active = <1>;
-		pixelclk-active = <0>;
-	};
 };
Signature · 1 line
2.17.1
Acked-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel

Hi Adam.

Quoted 7 lines · Adam Ford

With the removal of the panel-dpi from the omap drivers, the LCD no longer works. This patch points the device tree to a newly created panel named "logicpd,type28"

Fixes 8bf4b1621178 ("drm/omap: Remove panel-dpi driver")

Looks good.
One nit below.

With this addressed:

Sam

Quoted 6 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +0 -0
index 07ac99b9cda6..00c426bd51a0 100644

arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts line 17

Quoted 8 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +3 -1
@@ -11,22 +11,8 @@
 #include "logicpd-torpedo-37xx-devkit.dts"
 
 &lcd0 {
-
+	/* This isn't the exact LCD, but the timings meet spec */
+	/* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */
+	compatible = "logicpd,type28";
 	label = "28";

You left this property - but us it documented and what use has it?

Quoted 19 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +0 -16
-
-	panel-timing {
-		clock-frequency = <9000000>;
-		hactive = <480>;
-		vactive = <272>;
-		hfront-porch = <3>;
-		hback-porch = <2>;
-		hsync-len = <42>;
-		vback-porch = <3>;
-		vfront-porch = <2>;
-		vsync-len = <11>;
-		hsync-active = <1>;
-		vsync-active = <1>;
-		de-active = <1>;
-		pixelclk-active = <0>;
-	};
 };
Signature · 1 line
2.17.1
author
#6 lore raw

Re: [PATCH 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel

Quoted 27 lines · Sam Ravnborg

Hi Adam.

Quoted 7 lines · Adam Ford

With the removal of the panel-dpi from the omap drivers, the LCD no longer works. This patch points the device tree to a newly created panel named "logicpd,type28"

Fixes 8bf4b1621178 ("drm/omap: Remove panel-dpi driver")

Looks good.
One nit below.

With this addressed:

Sam

Quoted 8 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +0 -0
index 07ac99b9cda6..00c426bd51a0 100644
@@ -11,22 +11,8 @@
 #include "logicpd-torpedo-37xx-devkit.dts"
 
Quoted 7 lines

arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts line 17

Quoted 6 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +3 -1
 &lcd0 {
-
+     /* This isn't the exact LCD, but the timings meet spec */
+     /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */
+     compatible = "logicpd,type28";
      label = "28";

You left this property - but us it documented and what use has it?

Good catch, I'll remove it and post a V2 today once I can figure out the yaml stuff.

adam

Quoted 12 lines
Quoted 12 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +0 -11
-
-     panel-timing {
-             clock-frequency = <9000000>;
-             hactive = <480>;
-             vactive = <272>;
-             hfront-porch = <3>;
-             hback-porch = <2>;
-             hsync-len = <42>;
-             vback-porch = <3>;
-             vfront-porch = <2>;
-             vsync-len = <11>;
Quoted 8 lines
Quoted 8 lines
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts +0 -6
-             hsync-active = <1>;
-             vsync-active = <1>;
-             de-active = <1>;
-             pixelclk-active = <0>;
-     };
 };
--

2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on v1 1/3
#7 lore raw
In reply to Adam Ford

Hi Adam.

Quoted 9 lines · Adam Ford

Previously, there was an omap panel-dpi driver that would read generic timings from the device tree and set the display timing accordingly. This driver was removed so the screen no longer functions. This patch modifies the panel-simple file to setup the timings to the same values previously used.

Fixes 8bf4b1621178 ("drm/omap: Remove panel-dpi driver")

Patch looks good.

Quoted 58 lines
drivers/gpu/drm/panel/panel-simple.c +37 -0
index 5a93c4edf1e4..c86c30f3a8a1 100644
@@ -1900,6 +1900,40 @@ static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
 	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
 };
 
+static const struct drm_display_mode logicpd_type_28_mode = {
+	.clock = 9000,
+	.hdisplay = 480,
+	.hsync_start = 480 + 3,
+	.hsync_end = 480 + 3 + 42,
+	.htotal = 480 + 3 + 42 + 2,
+
+	.vdisplay = 272,
+	.vsync_start = 272 + 2,
+	.vsync_end = 272 + 2 + 11,
+	.vtotal = 272 + 2 + 11 + 3,
+	.vrefresh = 60,
+	.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
+};
+
+static const struct panel_desc logicpd_type_28 = {
+	.modes = &logicpd_type_28_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 105,
+		.height = 67,
+	},
+	.delay = {
+		.prepare = 200,
+		.enable = 200,
+		.unprepare = 200,
+		.disable = 200,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
+		     DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
+};
+
 static const struct panel_desc mitsubishi_aa070mc01 = {
 	.modes = &mitsubishi_aa070mc01_mode,
 	.num_modes = 1,
@@ -2948,6 +2982,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "lg,lp129qe",
 		.data = &lg_lp129qe,
+	}, {
+		.compatible = "logicpd,type28",
+		.data = &logicpd_type_28,
 	}, {
 		.compatible = "mitsubishi,aa070mc01-ca1",
 		.data = &mitsubishi_aa070mc01,
Signature · 1 line
2.17.1