All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Support Geekworm MZP280 Panel for Raspberry Pi
@ 2022-01-03 17:41 ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

This patch series is to add support for the MZP280 panel for the
Raspberry Pi. This panel requires adding support for Mode 3 of the
Raspberry Pi DPI connector, which necessitates a new media bus format.

This patch series has been tested on my Raspberry Pi 4 with version 1
of the panel in question.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Chris Morgan (5):
  media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  dt-bindings: display: simple: add Geekworm MZP280 Panel
  drm/panel: simple: add Geekworm MZP280 Panel
  drm/vc4: dpi: Support DPI interface in mode3 for RGB565

 .../bindings/display/panel/panel-simple.yaml  |  2 +
 .../media/v4l/subdev-formats.rst              | 37 +++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c          | 29 +++++++++++++++
 drivers/gpu/drm/vc4/vc4_dpi.c                 |  4 ++
 include/uapi/linux/media-bus-format.h         |  3 +-
 5 files changed, 74 insertions(+), 1 deletion(-)

-- 
2.25.1


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

* [PATCH 0/5] Support Geekworm MZP280 Panel for Raspberry Pi
@ 2022-01-03 17:41 ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

This patch series is to add support for the MZP280 panel for the
Raspberry Pi. This panel requires adding support for Mode 3 of the
Raspberry Pi DPI connector, which necessitates a new media bus format.

This patch series has been tested on my Raspberry Pi 4 with version 1
of the panel in question.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Chris Morgan (5):
  media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  dt-bindings: display: simple: add Geekworm MZP280 Panel
  drm/panel: simple: add Geekworm MZP280 Panel
  drm/vc4: dpi: Support DPI interface in mode3 for RGB565

 .../bindings/display/panel/panel-simple.yaml  |  2 +
 .../media/v4l/subdev-formats.rst              | 37 +++++++++++++++++++
 drivers/gpu/drm/panel/panel-simple.c          | 29 +++++++++++++++
 drivers/gpu/drm/vc4/vc4_dpi.c                 |  4 ++
 include/uapi/linux/media-bus-format.h         |  3 +-
 5 files changed, 74 insertions(+), 1 deletion(-)

-- 
2.25.1


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

* [PATCH 1/5] media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  2022-01-03 17:41 ` Chris Morgan
@ 2022-01-03 17:41   ` Chris Morgan
  -1 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI. This format is used
by the Geekworm MZP280 panel which interfaces with the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../media/v4l/subdev-formats.rst              | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index bd68588b2683..f3dcfa763ebc 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -624,6 +624,43 @@ The following tables list existing packed RGB formats.
       - b\ :sub:`2`
       - b\ :sub:`1`
       - b\ :sub:`0`
+    * .. _MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+
+      - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
+      - 0x101e
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      - 0
+      - 0
+      - 0
+      - r\ :sub:`4`
+      - r\ :sub:`3`
+      - r\ :sub:`2`
+      - r\ :sub:`1`
+      - r\ :sub:`0`
+      - 0
+      - 0
+      - g\ :sub:`5`
+      - g\ :sub:`4`
+      - g\ :sub:`3`
+      - g\ :sub:`2`
+      - g\ :sub:`1`
+      - g\ :sub:`0`
+      - 0
+      - 0
+      - 0
+      - b\ :sub:`4`
+      - b\ :sub:`3`
+      - b\ :sub:`2`
+      - b\ :sub:`1`
+      - b\ :sub:`0`
     * .. _MEDIA-BUS-FMT-BGR565-2X8-BE:
 
       - MEDIA_BUS_FMT_BGR565_2X8_BE
-- 
2.25.1


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

* [PATCH 1/5] media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI
@ 2022-01-03 17:41   ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI. This format is used
by the Geekworm MZP280 panel which interfaces with the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../media/v4l/subdev-formats.rst              | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index bd68588b2683..f3dcfa763ebc 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -624,6 +624,43 @@ The following tables list existing packed RGB formats.
       - b\ :sub:`2`
       - b\ :sub:`1`
       - b\ :sub:`0`
+    * .. _MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+
+      - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
+      - 0x101e
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      -
+      - 0
+      - 0
+      - 0
+      - r\ :sub:`4`
+      - r\ :sub:`3`
+      - r\ :sub:`2`
+      - r\ :sub:`1`
+      - r\ :sub:`0`
+      - 0
+      - 0
+      - g\ :sub:`5`
+      - g\ :sub:`4`
+      - g\ :sub:`3`
+      - g\ :sub:`2`
+      - g\ :sub:`1`
+      - g\ :sub:`0`
+      - 0
+      - 0
+      - 0
+      - b\ :sub:`4`
+      - b\ :sub:`3`
+      - b\ :sub:`2`
+      - b\ :sub:`1`
+      - b\ :sub:`0`
     * .. _MEDIA-BUS-FMT-BGR565-2X8-BE:
 
       - MEDIA_BUS_FMT_BGR565_2X8_BE
-- 
2.25.1


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

* [PATCH 2/5] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
  2022-01-03 17:41 ` Chris Morgan
@ 2022-01-03 17:41   ` Chris Morgan
  -1 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
MZP280 panel for the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 include/uapi/linux/media-bus-format.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 0dfc11ee243a..a7b7654985ee 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,13 +34,14 @@
 
 #define MEDIA_BUS_FMT_FIXED			0x0001
 
-/* RGB - next is	0x101e */
+/* RGB - next is	0x101f */
 #define MEDIA_BUS_FMT_RGB444_1X12		0x1016
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002
 #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE	0x1003
 #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE	0x1004
 #define MEDIA_BUS_FMT_RGB565_1X16		0x1017
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI	0x101e
 #define MEDIA_BUS_FMT_BGR565_2X8_BE		0x1005
 #define MEDIA_BUS_FMT_BGR565_2X8_LE		0x1006
 #define MEDIA_BUS_FMT_RGB565_2X8_BE		0x1007
-- 
2.25.1


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

* [PATCH 2/5] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
@ 2022-01-03 17:41   ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
MZP280 panel for the Raspberry Pi.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 include/uapi/linux/media-bus-format.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 0dfc11ee243a..a7b7654985ee 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,13 +34,14 @@
 
 #define MEDIA_BUS_FMT_FIXED			0x0001
 
-/* RGB - next is	0x101e */
+/* RGB - next is	0x101f */
 #define MEDIA_BUS_FMT_RGB444_1X12		0x1016
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE	0x1001
 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE	0x1002
 #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE	0x1003
 #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE	0x1004
 #define MEDIA_BUS_FMT_RGB565_1X16		0x1017
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI	0x101e
 #define MEDIA_BUS_FMT_BGR565_2X8_BE		0x1005
 #define MEDIA_BUS_FMT_BGR565_2X8_LE		0x1006
 #define MEDIA_BUS_FMT_RGB565_2X8_BE		0x1007
-- 
2.25.1


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

* [PATCH 3/5] dt-bindings: display: simple: add Geekworm MZP280 Panel
  2022-01-03 17:41 ` Chris Morgan
@ 2022-01-03 17:41   ` Chris Morgan
  -1 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

The Geekworm MZP280 panel is a 480x640 (portrait) panel with a
capacitive touch interface and a 40 pin header meant to interface
directly with the Raspberry Pi. The screen is 2.8 inches diagonally,
and there appear to be at least 4 distinct versions all with the same
panel timings.

Timings were derived from drivers posted on the github located here:
https://github.com/tianyoujian/MZDPI/tree/master/vga

Additional details about this panel family can be found here:
https://wiki.geekworm.com/2.8_inch_Touch_Screen_for_Pi_zero

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index f3c9395d23b6..659db7206c96 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -148,6 +148,8 @@ properties:
       - frida,frd350h54004
         # FriendlyELEC HD702E 800x1280 LCD panel
       - friendlyarm,hd702e
+        # Geekworm MZP280 2.8" 480x640 LCD panel with capacitive touch
+      - geekworm,mzp280
         # GiantPlus GPG48273QS5 4.3" (480x272) WQVGA TFT LCD panel
       - giantplus,gpg48273qs5
         # GiantPlus GPM940B0 3.0" QVGA TFT LCD panel
-- 
2.25.1


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

* [PATCH 3/5] dt-bindings: display: simple: add Geekworm MZP280 Panel
@ 2022-01-03 17:41   ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

The Geekworm MZP280 panel is a 480x640 (portrait) panel with a
capacitive touch interface and a 40 pin header meant to interface
directly with the Raspberry Pi. The screen is 2.8 inches diagonally,
and there appear to be at least 4 distinct versions all with the same
panel timings.

Timings were derived from drivers posted on the github located here:
https://github.com/tianyoujian/MZDPI/tree/master/vga

Additional details about this panel family can be found here:
https://wiki.geekworm.com/2.8_inch_Touch_Screen_for_Pi_zero

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index f3c9395d23b6..659db7206c96 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -148,6 +148,8 @@ properties:
       - frida,frd350h54004
         # FriendlyELEC HD702E 800x1280 LCD panel
       - friendlyarm,hd702e
+        # Geekworm MZP280 2.8" 480x640 LCD panel with capacitive touch
+      - geekworm,mzp280
         # GiantPlus GPG48273QS5 4.3" (480x272) WQVGA TFT LCD panel
       - giantplus,gpg48273qs5
         # GiantPlus GPM940B0 3.0" QVGA TFT LCD panel
-- 
2.25.1


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

* [PATCH 4/5] drm/panel: simple: add Geekworm MZP280 Panel
  2022-01-03 17:41 ` Chris Morgan
@ 2022-01-03 17:41   ` Chris Morgan
  -1 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Geekworm MZP280 Panel

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index eb475a3a774b..f40f4e9a0e08 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1824,6 +1824,32 @@ static const struct panel_desc friendlyarm_hd702e = {
 	},
 };
 
+static const struct drm_display_mode geekworm_mzp280_mode = {
+	.clock = 32000,
+	.hdisplay = 480,
+	.hsync_start = 480 + 41,
+	.hsync_end = 480 + 41 + 20,
+	.htotal = 480 + 41 + 20 + 60,
+	.vdisplay = 640,
+	.vsync_start = 640 + 5,
+	.vsync_end = 640 + 5 + 10,
+	.vtotal = 640 + 5 + 10 + 10,
+	.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc geekworm_mzp280 = {
+	.modes = &geekworm_mzp280_mode,
+	.num_modes = 1,
+	.bpc = 6,
+	.size = {
+		.width = 47,
+		.height = 61,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB565_1X24_CPADHI,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_DPI,
+};
+
 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
 	.clock = 9000,
 	.hdisplay = 480,
@@ -3713,6 +3739,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "friendlyarm,hd702e",
 		.data = &friendlyarm_hd702e,
+	}, {
+		.compatible = "geekworm,mzp280",
+		.data = &geekworm_mzp280,
 	}, {
 		.compatible = "giantplus,gpg482739qs5",
 		.data = &giantplus_gpg482739qs5
-- 
2.25.1


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

* [PATCH 4/5] drm/panel: simple: add Geekworm MZP280 Panel
@ 2022-01-03 17:41   ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the Geekworm MZP280 Panel

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index eb475a3a774b..f40f4e9a0e08 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1824,6 +1824,32 @@ static const struct panel_desc friendlyarm_hd702e = {
 	},
 };
 
+static const struct drm_display_mode geekworm_mzp280_mode = {
+	.clock = 32000,
+	.hdisplay = 480,
+	.hsync_start = 480 + 41,
+	.hsync_end = 480 + 41 + 20,
+	.htotal = 480 + 41 + 20 + 60,
+	.vdisplay = 640,
+	.vsync_start = 640 + 5,
+	.vsync_end = 640 + 5 + 10,
+	.vtotal = 640 + 5 + 10 + 10,
+	.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc geekworm_mzp280 = {
+	.modes = &geekworm_mzp280_mode,
+	.num_modes = 1,
+	.bpc = 6,
+	.size = {
+		.width = 47,
+		.height = 61,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB565_1X24_CPADHI,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_DPI,
+};
+
 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
 	.clock = 9000,
 	.hdisplay = 480,
@@ -3713,6 +3739,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "friendlyarm,hd702e",
 		.data = &friendlyarm_hd702e,
+	}, {
+		.compatible = "geekworm,mzp280",
+		.data = &geekworm_mzp280,
 	}, {
 		.compatible = "giantplus,gpg482739qs5",
 		.data = &giantplus_gpg482739qs5
-- 
2.25.1


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

* [PATCH 5/5] drm/vc4: dpi: Support DPI interface in mode3 for RGB565
  2022-01-03 17:41 ` Chris Morgan
@ 2022-01-03 17:41   ` Chris Morgan
  -1 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, thierry.reding, sam, airlied, daniel, robh+dt,
	mchehab, emma, mripard, linux-media, Chris Morgan

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the VC4 DPI driver to utilize DPI mode 3. This is
defined here as xxxRRRRRxxGGGGGGxxxBBBBB:

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi

This mode is required to use the Geekworm MZP280 DPI display.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index c180eb60bee8..3c58ade2549e 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -173,6 +173,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
 			dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
 					       DPI_FORMAT);
 			break;
+		case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+			dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
+					       DPI_FORMAT);
+			break;
 		default:
 			DRM_ERROR("Unknown media bus format %d\n", bus_format);
 			break;
-- 
2.25.1


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

* [PATCH 5/5] drm/vc4: dpi: Support DPI interface in mode3 for RGB565
@ 2022-01-03 17:41   ` Chris Morgan
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Morgan @ 2022-01-03 17:41 UTC (permalink / raw)
  To: dri-devel
  Cc: devicetree, Chris Morgan, emma, airlied, robh+dt, thierry.reding,
	mchehab, sam, linux-media

From: Chris Morgan <macromorgan@hotmail.com>

Add support for the VC4 DPI driver to utilize DPI mode 3. This is
defined here as xxxRRRRRxxGGGGGGxxxBBBBB:

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi

This mode is required to use the Geekworm MZP280 DPI display.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index c180eb60bee8..3c58ade2549e 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -173,6 +173,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
 			dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
 					       DPI_FORMAT);
 			break;
+		case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+			dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
+					       DPI_FORMAT);
+			break;
 		default:
 			DRM_ERROR("Unknown media bus format %d\n", bus_format);
 			break;
-- 
2.25.1


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

* Re: [PATCH 5/5] drm/vc4: dpi: Support DPI interface in mode3 for RGB565
  2022-01-03 17:41   ` Chris Morgan
@ 2022-01-04 11:49     ` Dave Stevenson
  -1 siblings, 0 replies; 18+ messages in thread
From: Dave Stevenson @ 2022-01-04 11:49 UTC (permalink / raw)
  To: Chris Morgan
  Cc: DRI Development, devicetree, Thierry Reding, Sam Ravnborg,
	David Airlie, Daniel Vetter, Rob Herring, Mauro Carvalho Chehab,
	Eric Anholt, Maxime Ripard, Linux Media Mailing List,
	Chris Morgan

Hi Chris

Thanks for the patch.

On Mon, 3 Jan 2022 at 17:41, Chris Morgan <macroalpha82@gmail.com> wrote:
>
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add support for the VC4 DPI driver to utilize DPI mode 3. This is
> defined here as xxxRRRRRxxGGGGGGxxxBBBBB:
>
> https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi
>
> This mode is required to use the Geekworm MZP280 DPI display.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

The other patches all look valid to me, but I'll leave those for the
more experienced maintainers.

  Dave

> ---
>  drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
> index c180eb60bee8..3c58ade2549e 100644
> --- a/drivers/gpu/drm/vc4/vc4_dpi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
> @@ -173,6 +173,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
>                         dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
>                                                DPI_FORMAT);
>                         break;
> +               case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
> +                       dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
> +                                              DPI_FORMAT);
> +                       break;
>                 default:
>                         DRM_ERROR("Unknown media bus format %d\n", bus_format);
>                         break;
> --
> 2.25.1
>

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

* Re: [PATCH 5/5] drm/vc4: dpi: Support DPI interface in mode3 for RGB565
@ 2022-01-04 11:49     ` Dave Stevenson
  0 siblings, 0 replies; 18+ messages in thread
From: Dave Stevenson @ 2022-01-04 11:49 UTC (permalink / raw)
  To: Chris Morgan
  Cc: devicetree, Chris Morgan, Eric Anholt, David Airlie,
	DRI Development, Rob Herring, Thierry Reding,
	Mauro Carvalho Chehab, Sam Ravnborg, Linux Media Mailing List

Hi Chris

Thanks for the patch.

On Mon, 3 Jan 2022 at 17:41, Chris Morgan <macroalpha82@gmail.com> wrote:
>
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add support for the VC4 DPI driver to utilize DPI mode 3. This is
> defined here as xxxRRRRRxxGGGGGGxxxBBBBB:
>
> https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#parallel-display-interface-dpi
>
> This mode is required to use the Geekworm MZP280 DPI display.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

The other patches all look valid to me, but I'll leave those for the
more experienced maintainers.

  Dave

> ---
>  drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
> index c180eb60bee8..3c58ade2549e 100644
> --- a/drivers/gpu/drm/vc4/vc4_dpi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
> @@ -173,6 +173,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
>                         dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
>                                                DPI_FORMAT);
>                         break;
> +               case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
> +                       dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
> +                                              DPI_FORMAT);
> +                       break;
>                 default:
>                         DRM_ERROR("Unknown media bus format %d\n", bus_format);
>                         break;
> --
> 2.25.1
>

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

* Re: [PATCH 3/5] dt-bindings: display: simple: add Geekworm MZP280 Panel
  2022-01-03 17:41   ` Chris Morgan
@ 2022-01-11 10:39     ` Maxime Ripard
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2022-01-11 10:39 UTC (permalink / raw)
  To: Chris Morgan
  Cc: dri-devel, devicetree, thierry.reding, sam, airlied, daniel,
	robh+dt, mchehab, emma, linux-media, Chris Morgan

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

Hi,

On Mon, Jan 03, 2022 at 11:41:04AM -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> The Geekworm MZP280 panel is a 480x640 (portrait) panel with a
> capacitive touch interface and a 40 pin header meant to interface
> directly with the Raspberry Pi. The screen is 2.8 inches diagonally,
> and there appear to be at least 4 distinct versions all with the same
> panel timings.
> 
> Timings were derived from drivers posted on the github located here:
> https://github.com/tianyoujian/MZDPI/tree/master/vga
> 
> Additional details about this panel family can be found here:
> https://wiki.geekworm.com/2.8_inch_Touch_Screen_for_Pi_zero
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> index f3c9395d23b6..659db7206c96 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> @@ -148,6 +148,8 @@ properties:
>        - frida,frd350h54004
>          # FriendlyELEC HD702E 800x1280 LCD panel
>        - friendlyarm,hd702e
> +        # Geekworm MZP280 2.8" 480x640 LCD panel with capacitive touch
> +      - geekworm,mzp280

The vendor prefix must be documented in Documentation/devicetree/bindings/vendor-prefixes.yaml

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 3/5] dt-bindings: display: simple: add Geekworm MZP280 Panel
@ 2022-01-11 10:39     ` Maxime Ripard
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2022-01-11 10:39 UTC (permalink / raw)
  To: Chris Morgan
  Cc: devicetree, Chris Morgan, emma, airlied, dri-devel, robh+dt,
	thierry.reding, mchehab, sam, linux-media

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

Hi,

On Mon, Jan 03, 2022 at 11:41:04AM -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> The Geekworm MZP280 panel is a 480x640 (portrait) panel with a
> capacitive touch interface and a 40 pin header meant to interface
> directly with the Raspberry Pi. The screen is 2.8 inches diagonally,
> and there appear to be at least 4 distinct versions all with the same
> panel timings.
> 
> Timings were derived from drivers posted on the github located here:
> https://github.com/tianyoujian/MZDPI/tree/master/vga
> 
> Additional details about this panel family can be found here:
> https://wiki.geekworm.com/2.8_inch_Touch_Screen_for_Pi_zero
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> index f3c9395d23b6..659db7206c96 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> @@ -148,6 +148,8 @@ properties:
>        - frida,frd350h54004
>          # FriendlyELEC HD702E 800x1280 LCD panel
>        - friendlyarm,hd702e
> +        # Geekworm MZP280 2.8" 480x640 LCD panel with capacitive touch
> +      - geekworm,mzp280

The vendor prefix must be documented in Documentation/devicetree/bindings/vendor-prefixes.yaml

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 4/5] drm/panel: simple: add Geekworm MZP280 Panel
  2022-01-03 17:41   ` Chris Morgan
@ 2022-01-11 10:40     ` Maxime Ripard
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2022-01-11 10:40 UTC (permalink / raw)
  To: Chris Morgan
  Cc: dri-devel, devicetree, thierry.reding, sam, airlied, daniel,
	robh+dt, mchehab, emma, linux-media, Chris Morgan

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

On Mon, Jan 03, 2022 at 11:41:05AM -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Geekworm MZP280 Panel
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 4/5] drm/panel: simple: add Geekworm MZP280 Panel
@ 2022-01-11 10:40     ` Maxime Ripard
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2022-01-11 10:40 UTC (permalink / raw)
  To: Chris Morgan
  Cc: devicetree, Chris Morgan, emma, airlied, dri-devel, robh+dt,
	thierry.reding, mchehab, sam, linux-media

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

On Mon, Jan 03, 2022 at 11:41:05AM -0600, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Add support for the Geekworm MZP280 Panel
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Acked-by: Maxime Ripard <maxime@cerno.tech>

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2022-01-11 10:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 17:41 [PATCH 0/5] Support Geekworm MZP280 Panel for Raspberry Pi Chris Morgan
2022-01-03 17:41 ` Chris Morgan
2022-01-03 17:41 ` [PATCH 1/5] media: uapi: Document format MEDIA_BUS_FMT_RGB565_1X24_CPADHI Chris Morgan
2022-01-03 17:41   ` Chris Morgan
2022-01-03 17:41 ` [PATCH 2/5] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI Chris Morgan
2022-01-03 17:41   ` Chris Morgan
2022-01-03 17:41 ` [PATCH 3/5] dt-bindings: display: simple: add Geekworm MZP280 Panel Chris Morgan
2022-01-03 17:41   ` Chris Morgan
2022-01-11 10:39   ` Maxime Ripard
2022-01-11 10:39     ` Maxime Ripard
2022-01-03 17:41 ` [PATCH 4/5] drm/panel: " Chris Morgan
2022-01-03 17:41   ` Chris Morgan
2022-01-11 10:40   ` Maxime Ripard
2022-01-11 10:40     ` Maxime Ripard
2022-01-03 17:41 ` [PATCH 5/5] drm/vc4: dpi: Support DPI interface in mode3 for RGB565 Chris Morgan
2022-01-03 17:41   ` Chris Morgan
2022-01-04 11:49   ` Dave Stevenson
2022-01-04 11:49     ` Dave Stevenson

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.