mbox series

[0/5] Support Geekworm MZP280 Panel for Raspberry Pi

Message ID 20220103174106.907-1-macroalpha82@gmail.com
Headers show
Series Support Geekworm MZP280 Panel for Raspberry Pi | expand

Message

Chris Morgan Jan. 3, 2022, 5:41 p.m. UTC
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(-)

Comments

Dave Stevenson Jan. 4, 2022, 11:49 a.m. UTC | #1
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
>
maxime@cerno.tech Jan. 11, 2022, 10:39 a.m. UTC | #2
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