Skip to contentSkip to conversation

Add PinePhone Pro display support

PATCH In review Javier Martinez Canillas 2 participants 6 messages Jan 2, 2023 – Jan 10, 2023

Subsystems (5)
lore
Share & tools
lore

Javier Martinez Canillas

author maintainer
#0 lore raw

v5 cover Add PinePhone Pro display support

This series adds support for the display present in the PinePhone Pro.

Patch #1 adds a devicetree binding schema for panels based on the Himax HX8394 controller, such as the HSD060BHW4 720x1440 TFT LCD panel present in the PinePhone Pro. Patch #2 adds the panel driver for this controller and finally patch #3 adds an entry for the driver in MAINTAINERS file.

This version doesn't include the DTS changes, since Ondrej mentioned that there are still things to sort out before enabling it. The DTS bits will be proposed as a follow-up patch series.

This allows for example the Fedora distro to support the PinePhone Pro with a DTB provided by the firmware.

This is a v5 of the patch-set that addresses issues pointed out in v4:

https://lists.freedesktop.org/archives/dri-devel/2022-December/384810.html

The patches were tested on a PinePhone Pro Explorer Edition using a Fedora 37 Workstation image.

Best regards,
Javier

Changes in v5:
- List Ondrej Jirman as a maintainer in the DT binding schema document.
- Add Peter Robinson's Tested-by tag.
- List Ondrej Jirman as a maintainer in the driver's MAINTAINERS entry.

Changes in v4:
- Add fallback "himax,hx8394" compatible for the panel controller (Jagan Teki).
- Add Tom Fitzhenry's Tested-by tag.
- Add Sam Ravnborg's Acked-by tag.

Changes in v3:
- Fix example snippet for make dt_binding_check to pass (Krzysztof Kozlowski).
- Add Sam Ravnborg's reviwed-by tag.
- Move driver patch after one introducing the DT binding (Sam Ravnborg).

Changes in v2:
- Drop redundant "bindings" in subject (Krzysztof Kozlowski).
- Drop "device tree bindings" in title (Krzysztof Kozlowski).
- Put port next to other "true" properties (Krzysztof Kozlowski).
- Add Krzysztof Kozlowski's Reviewed-by tag.
- Add year to driver's copyright notice (Sam Ravnborg)
- Remove unused <video/display_timing.h> header include (Sam Ravnborg).
- Use mipi_dsi_dcs_write_seq() helper and drop custom macro (Sam Ravnborg).
- Drop unnecessary info messages and move useful one to debug (Sam Ravnborg).

Javier Martinez Canillas (2):
dt-bindings: display: Add Himax HX8394 panel controller
MAINTAINERS: Add entry for Himax HX8394 panel controller driver

Kamil Trzciński (1):
drm: panel: Add Himax HX8394 panel controller driver

 .../bindings/display/panel/himax,hx8394.yaml  |  76 +++
 MAINTAINERS                                   |   8 +
 drivers/gpu/drm/panel/Kconfig                 |  12 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-himax-hx8394.c    | 451 ++++++++++++++++++
 5 files changed, 548 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
 create mode 100644 drivers/gpu/drm/panel/panel-himax-hx8394.c
Signature · 1 line
2.38.1
author maintainer
#1 lore raw

PATCH v5 1/3 dt-bindings: display: Add Himax HX8394 panel controller

Add device tree bindings for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that is connected through a MIPI-DSI video interface.

---

Changes in v5:
- List Ondrej Jirman as a maintainer in the DT binding schema document.

Changes in v4:
- Add fallback "himax,hx8394" compatible for the panel controller (Jagan Teki).

Changes in v3:
- Fix example snippet for make dt_binding_check to pass (Krzysztof Kozlowski).

Changes in v2:
- Drop redundant "bindings" in subject (Krzysztof Kozlowski).
- Drop "device tree bindings" in title (Krzysztof Kozlowski).
- Put port next to other "true" properties (Krzysztof Kozlowski).
- Add Krzysztof Kozlowski's Reviewed-by tag.

 .../bindings/display/panel/himax,hx8394.yaml  | 76 +++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml new file +76 -0
new file mode 100644
index 000000000000..1b2a1baa26f9
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/himax,hx8394.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Himax HX8394 MIPI-DSI LCD panel controller
+
+maintainers:
+  - Ondrej Jirman <[email protected]>
+  - Javier Martinez Canillas <[email protected]>
+
+description:
+  Device tree bindings for panels based on the Himax HX8394 controller,
+  such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
+  a MIPI-DSI video interface.
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - hannstar,hsd060bhw4
+      - const: himax,hx8394
+
+  reg: true
+
+  reset-gpios: true
+
+  backlight: true
+
+  port: true
+
+  vcc-supply:
+    description: Panel power supply
+
+  iovcc-supply:
+    description: I/O voltage supply
+
+required:
+  - compatible
+  - reg
+  - reset-gpios
+  - backlight
+  - port
+  - vcc-supply
+  - iovcc-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        panel@0 {
+            compatible = "hannstar,hsd060bhw4", "himax,hx8394";
+            reg = <0>;
+            vcc-supply = <&reg_2v8_p>;
+            iovcc-supply = <&reg_1v8_p>;
+            reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
+            backlight = <&backlight>;
+
+            port {
+                mipi_in_panel: endpoint {
+                    remote-endpoint = <&mipi_out_panel>;
+                };
+            };
+        };
+    };
+
+...
Signature · 1 line
2.38.1
author maintainer
#2 lore raw

PATCH v5 2/3 drm: panel: Add Himax HX8394 panel controller driver

In reply to Javier Martinez Canillas

From: Kamil Trzciński <[email protected]>

The driver is for panels based on the Himax HX8394 controller, such as the HannStar HSD060BHW4 720x1440 TFT LCD panel that uses a MIPI-DSI interface.

---

Changes in v5:
- Add Peter Robinson's Tested-by tag.

Changes in v4:
- Add Tom Fitzhenry's Tested-by tag.

Changes in v3:
- Add Sam Ravnborg's reviwed-by tag.
- Move driver patch after one introducing the DT binding (Sam Ravnborg).

Changes in v2:
- Add year to driver's copyright notice (Sam Ravnborg)
- Remove unused <video/display_timing.h> header include (Sam Ravnborg).
- Use mipi_dsi_dcs_write_seq() helper and drop custom macro (Sam Ravnborg).
- Drop unnecessary info messages and move useful one to debug (Sam Ravnborg).

 drivers/gpu/drm/panel/Kconfig              |  12 +
 drivers/gpu/drm/panel/Makefile             |   1 +
 drivers/gpu/drm/panel/panel-himax-hx8394.c | 451 +++++++++++++++++++++
 3 files changed, 464 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-himax-hx8394.c
drivers/gpu/drm/panel/Kconfig +12 -0
index 737edcdf9eef..7ee9c83f09a7 100644
@@ -154,6 +154,18 @@ config DRM_PANEL_FEIYANG_FY07024DI26A30D
 	  Say Y if you want to enable support for panels based on the
 	  Feiyang FY07024DI26A30-D MIPI-DSI interface.
 
+config DRM_PANEL_HIMAX_HX8394
+	tristate "HIMAX HX8394 MIPI-DSI LCD panels"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	help
+	  Say Y if you want to enable support for panels based on the
+	  Himax HX8394 controller, such as the HannStar HSD060BHW4
+	  720x1440 TFT LCD panel that uses a MIPI-DSI interface.
+
+	  If M is selected the module will be called panel-himax-hx8394.
+
 config DRM_PANEL_ILITEK_IL9322
 	tristate "Ilitek ILI9322 320x240 QVGA panels"
 	depends on OF && SPI
drivers/gpu/drm/panel/Makefile +1 -0
index f8f9d9f6a307..84c01adafd4c 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_PANEL_EBBG_FT8719) += panel-ebbg-ft8719.o
 obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o
 obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o
 obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o
+obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o
 obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o
drivers/gpu/drm/panel/panel-himax-hx8394.c new file +451 -0

451 lines not on this page · raw message

Signature · 1 line
2.38.1
author maintainer
#3 lore raw

PATCH v5 3/3 MAINTAINERS: Add entry for Himax HX8394 panel controller driver

In reply to Javier Martinez Canillas

Add myself as maintainer for the driver and devicetree bindings schema.

---

Changes in v5:
- List Ondrej Jirman as a maintainer in the driver's MAINTAINERS entry.

Changes in v4:
- Add Sam Ravnborg's Acked-by tag.

 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
index 7729a30b9609..4e049faf2f51 100644
@@ -6551,6 +6551,14 @@ S:	Maintained
 T:	git git://anongit.freedesktop.org/drm/drm-misc
 F:	drivers/gpu/drm/tiny/gm12u320.c
 
+DRM DRIVER FOR HIMAX HX8394 MIPI-DSI LCD panels
+M:	Ondrej Jirman <[email protected]>
+M:	Javier Martinez Canillas <[email protected]>
+S:	Maintained
+T:	git git://anongit.freedesktop.org/drm/drm-misc
+F:	Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
+F:	drivers/gpu/drm/panel/panel-himax-hx8394.c
+
 DRM DRIVER FOR HX8357D PANELS
 M:	Emma Anholt <[email protected]>
 S:	Maintained
Signature · 1 line
2.38.1
#4 lore raw
In reply to Javier Martinez Canillas
Quoted 7 lines · Javier Martinez Canillas

This series adds support for the display present in the PinePhone Pro.

Patch #1 adds a devicetree binding schema for panels based on the Himax HX8394 controller, such as the HSD060BHW4 720x1440 TFT LCD panel present in the PinePhone Pro. Patch #2 adds the panel driver for this controller and finally patch #3 adds an entry for the driver in MAINTAINERS file.

Quoted 8 lines

This version doesn't include the DTS changes, since Ondrej mentioned that there are still things to sort out before enabling it. The DTS bits will be proposed as a follow-up patch series.

This allows for example the Fedora distro to support the PinePhone Pro with a DTB provided by the firmware.

This is a v5 of the patch-set that addresses issues pointed out in v4:

I looked over the patches a last time. This driver looks great. Acks by Krzysztof and Sam are in place.
Patches applied to drm-misc-next!

Yours,
Linus Walleij

author maintainer
#5 lore raw

Hello Linus,

Quoted 14 lines · Linus Walleij
Quoted 11 lines · Javier Martinez Canillas

This series adds support for the display present in the PinePhone Pro.

Patch #1 adds a devicetree binding schema for panels based on the Himax HX8394 controller, such as the HSD060BHW4 720x1440 TFT LCD panel present in the PinePhone Pro. Patch #2 adds the panel driver for this controller and finally patch #3 adds an entry for the driver in MAINTAINERS file.

This version doesn't include the DTS changes, since Ondrej mentioned that there are still things to sort out before enabling it. The DTS bits will be proposed as a follow-up patch series.

Quoted 9 lines
Quoted 4 lines

This allows for example the Fedora distro to support the PinePhone Pro with a DTB provided by the firmware.

This is a v5 of the patch-set that addresses issues pointed out in v4:

I looked over the patches a last time. This driver looks great. Acks by Krzysztof and Sam are in place.
Patches applied to drm-misc-next!

Awesome. Thanks a lot!

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat