All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 1/3] drm/panel: simple: Add Logic PD Type 28 display support
@ 2019-09-25 18:42 Adam Ford
  2019-09-25 18:42 ` [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel Adam Ford
  2019-09-25 18:42 ` [PATCH V3 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel Adam Ford
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Ford @ 2019-09-25 18:42 UTC (permalink / raw)
  To: dri-devel
  Cc: adam.ford, Adam Ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Mark Rutland, devicetree,
	linux-kernel

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")

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
---
V3:  No change
V2:  No change

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 28fa6ba7b767..8abb31f83ffc 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2048,6 +2048,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,
@@ -3264,6 +3298,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,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel
  2019-09-25 18:42 [PATCH V3 1/3] drm/panel: simple: Add Logic PD Type 28 display support Adam Ford
@ 2019-09-25 18:42 ` Adam Ford
  2019-09-27 18:51   ` Rob Herring
  2019-09-25 18:42 ` [PATCH V3 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel Adam Ford
  1 sibling, 1 reply; 6+ messages in thread
From: Adam Ford @ 2019-09-25 18:42 UTC (permalink / raw)
  To: dri-devel
  Cc: adam.ford, Adam Ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Mark Rutland, devicetree,
	linux-kernel

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

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V3:  Correct build errors from 'make dt_binding_check'
V2:  Use YAML instead of TXT for binding

diff --git a/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
new file mode 100644
index 000000000000..74ba650ea7a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: (GPL-2.0+ OR X11)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/logicpd,type28.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Logic PD Type 28 4.3" WQVGA TFT LCD panel
+
+maintainers:
+  - Adam Ford <aford173@gmail.com>
+
+properties:
+  compatible:
+    const: logicpd,type28
+
+  power-supply:
+    description: Regulator to provide the supply voltage
+    maxItems: 1
+
+  enable-gpios:
+    description: GPIO pin to enable or disable the panel
+    maxItems: 1
+
+  backlight:
+    description: Backlight used by the panel
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+
+required:
+  - compatible
+
+additionalProperties: false
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V3 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel
  2019-09-25 18:42 [PATCH V3 1/3] drm/panel: simple: Add Logic PD Type 28 display support Adam Ford
  2019-09-25 18:42 ` [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel Adam Ford
@ 2019-09-25 18:42 ` Adam Ford
  1 sibling, 0 replies; 6+ messages in thread
From: Adam Ford @ 2019-09-25 18:42 UTC (permalink / raw)
  To: dri-devel
  Cc: adam.ford, Adam Ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Mark Rutland, devicetree,
	linux-kernel

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")

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
V3:  No change
V2:  Remove legacy 'label' from binding

diff --git a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts
index 07ac99b9cda6..cdb89b3e2a9b 100644
--- a/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts
+++ b/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit-28.dts
@@ -11,22 +11,6 @@
 #include "logicpd-torpedo-37xx-devkit.dts"
 
 &lcd0 {
-
-	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>;
-	};
+	/* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */
+	compatible = "logicpd,type28";
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel
  2019-09-25 18:42 ` [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel Adam Ford
@ 2019-09-27 18:51   ` Rob Herring
  2019-09-27 19:02       ` Adam Ford
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2019-09-27 18:51 UTC (permalink / raw)
  To: Adam Ford
  Cc: dri-devel, adam.ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Mark Rutland, devicetree, linux-kernel

On Wed, Sep 25, 2019 at 01:42:37PM -0500, Adam Ford wrote:
> This patch adds documentation of device tree bindings for the WVGA panel
> Logic PD Type 28 display.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V3:  Correct build errors from 'make dt_binding_check'
> V2:  Use YAML instead of TXT for binding
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> new file mode 100644
> index 000000000000..74ba650ea7a0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> @@ -0,0 +1,31 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR X11)

(GPL-2.0-only OR BSD-2-Clause) please.

X11 is pretty much never right unless this is copyright X Consortium.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/logicpd,type28.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Logic PD Type 28 4.3" WQVGA TFT LCD panel
> +
> +maintainers:
> +  - Adam Ford <aford173@gmail.com>
> +

You need:

allOf:
  - $ref: panel-common.yaml#

> +properties:
> +  compatible:
> +    const: logicpd,type28
> +

> +  power-supply:
> +    description: Regulator to provide the supply voltage
> +    maxItems: 1
> +
> +  enable-gpios:
> +    description: GPIO pin to enable or disable the panel
> +    maxItems: 1
> +
> +  backlight:
> +    description: Backlight used by the panel
> +    $ref: "/schemas/types.yaml#/definitions/phandle"

These 3 are all defined in the common schema, so you just need 'true' 
for the value to indicate they apply to this panel and to make 
'additionalProperties: false' happy.

> +
> +required:
> +  - compatible

Are the rest really optional? 

> +
> +additionalProperties: false
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel
  2019-09-27 18:51   ` Rob Herring
@ 2019-09-27 19:02       ` Adam Ford
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Ford @ 2019-09-27 19:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: dri-devel, Adam Ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Mark Rutland, devicetree,
	Linux Kernel Mailing List

On Fri, Sep 27, 2019 at 1:51 PM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 25, 2019 at 01:42:37PM -0500, Adam Ford wrote:
> > This patch adds documentation of device tree bindings for the WVGA panel
> > Logic PD Type 28 display.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V3:  Correct build errors from 'make dt_binding_check'
> > V2:  Use YAML instead of TXT for binding
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> > new file mode 100644
> > index 000000000000..74ba650ea7a0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> > @@ -0,0 +1,31 @@
> > +# SPDX-License-Identifier: (GPL-2.0+ OR X11)
>
> (GPL-2.0-only OR BSD-2-Clause) please.
>
> X11 is pretty much never right unless this is copyright X Consortium.
>

I copied the example from
Documentation/devicetree/bindings/display/panel/ronbo,rb070d30.yaml

Is there a better example I can use?  If what I did is wrong, then it
seems like that board is wrong too.

> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/logicpd,type28.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Logic PD Type 28 4.3" WQVGA TFT LCD panel
> > +
> > +maintainers:
> > +  - Adam Ford <aford173@gmail.com>
> > +
>
> You need:
>
> allOf:
>   - $ref: panel-common.yaml#
>
> > +properties:
> > +  compatible:
> > +    const: logicpd,type28
> > +
>
> > +  power-supply:
> > +    description: Regulator to provide the supply voltage
> > +    maxItems: 1
> > +
> > +  enable-gpios:
> > +    description: GPIO pin to enable or disable the panel
> > +    maxItems: 1
> > +
> > +  backlight:
> > +    description: Backlight used by the panel
> > +    $ref: "/schemas/types.yaml#/definitions/phandle"
>
> These 3 are all defined in the common schema, so you just need 'true'
> for the value to indicate they apply to this panel and to make
> 'additionalProperties: false' happy.

Sorry for my ignorance, but I am not familiar with the syntax here,
nor do I understand what is required.  Since there aren't many display
panels with yaml docs, I don't know what is expected and clearly the
one I used as a template didn't do it right either.

Is there a branch  where this stuff is located? I am just using the
latest linux-stable branch.

>
> > +
> > +required:
> > +  - compatible
>
> Are the rest really optional?

From what I can tell, they are optional.  I am just adding some timing
info to an already existing driver.  It's not my driver.


>
> > +
> > +additionalProperties: false
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel
@ 2019-09-27 19:02       ` Adam Ford
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Ford @ 2019-09-27 19:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: dri-devel, Adam Ford, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Mark Rutland, devicetree,
	Linux Kernel Mailing List

On Fri, Sep 27, 2019 at 1:51 PM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 25, 2019 at 01:42:37PM -0500, Adam Ford wrote:
> > This patch adds documentation of device tree bindings for the WVGA panel
> > Logic PD Type 28 display.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V3:  Correct build errors from 'make dt_binding_check'
> > V2:  Use YAML instead of TXT for binding
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> > new file mode 100644
> > index 000000000000..74ba650ea7a0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/logicpd,type28.yaml
> > @@ -0,0 +1,31 @@
> > +# SPDX-License-Identifier: (GPL-2.0+ OR X11)
>
> (GPL-2.0-only OR BSD-2-Clause) please.
>
> X11 is pretty much never right unless this is copyright X Consortium.
>

I copied the example from
Documentation/devicetree/bindings/display/panel/ronbo,rb070d30.yaml

Is there a better example I can use?  If what I did is wrong, then it
seems like that board is wrong too.

> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/logicpd,type28.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Logic PD Type 28 4.3" WQVGA TFT LCD panel
> > +
> > +maintainers:
> > +  - Adam Ford <aford173@gmail.com>
> > +
>
> You need:
>
> allOf:
>   - $ref: panel-common.yaml#
>
> > +properties:
> > +  compatible:
> > +    const: logicpd,type28
> > +
>
> > +  power-supply:
> > +    description: Regulator to provide the supply voltage
> > +    maxItems: 1
> > +
> > +  enable-gpios:
> > +    description: GPIO pin to enable or disable the panel
> > +    maxItems: 1
> > +
> > +  backlight:
> > +    description: Backlight used by the panel
> > +    $ref: "/schemas/types.yaml#/definitions/phandle"
>
> These 3 are all defined in the common schema, so you just need 'true'
> for the value to indicate they apply to this panel and to make
> 'additionalProperties: false' happy.

Sorry for my ignorance, but I am not familiar with the syntax here,
nor do I understand what is required.  Since there aren't many display
panels with yaml docs, I don't know what is expected and clearly the
one I used as a template didn't do it right either.

Is there a branch  where this stuff is located? I am just using the
latest linux-stable branch.

>
> > +
> > +required:
> > +  - compatible
>
> Are the rest really optional?

>From what I can tell, they are optional.  I am just adding some timing
info to an already existing driver.  It's not my driver.


>
> > +
> > +additionalProperties: false
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-27 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 18:42 [PATCH V3 1/3] drm/panel: simple: Add Logic PD Type 28 display support Adam Ford
2019-09-25 18:42 ` [PATCH V3 2/3] dt-bindings: Add Logic PD Type 28 display panel Adam Ford
2019-09-27 18:51   ` Rob Herring
2019-09-27 19:02     ` Adam Ford
2019-09-27 19:02       ` Adam Ford
2019-09-25 18:42 ` [PATCH V3 3/3] ARM: logicpd-torpedo-37xx-devkit-28: Reference new DRM panel Adam Ford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.