Skip to contentSkip to conversation

Add support for Waveshare DSI2DPI unit

PATCH Applied Joseph Guo 2 participants 5 messages Aug 6, 2025

Subsystems (5)
lore
Share & tools
lore

Joseph Guo

author
#0 lore raw

v3 cover Add support for Waveshare DSI2DPI unit

This patchset add support for waveshare DSI2DPI unit.

---
Changes in v3:
- Add Suggested-by tags
- s/R-b/A-b/ in patch 2
- Sort the config names alphabetically
- Add depends on BACKLIGHT_CLASS_DEVICE
- Drop disable_debugfs in regmap_config
- Sort the variables in reverse Christmas tree
- Drop inappropriate blank line
- Drop duplicate backlight variable
- Change API to upstream version
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- /s/i2c0/i2c/ in patch 1
- Add Review tags
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Joseph Guo (3):
dt-bindings: display: bridge: Add waveshare DSI2DPI unit support
dt-bindings: display: panel: Add waveshare DPI panel support
drm: bridge: Add waveshare DSI2DPI unit driver

 .../bindings/display/bridge/waveshare,dsi2dpi.yaml | 103 +++++++++++
 .../bindings/display/panel/panel-simple.yaml       |   4 +
 drivers/gpu/drm/bridge/Kconfig                     |  12 ++
 drivers/gpu/drm/bridge/Makefile                    |   1 +
 drivers/gpu/drm/bridge/waveshare-dsi.c             | 203 +++++++++++++++++++++
 5 files changed, 323 insertions(+)

---
base-commit: ade011daf9e9e0d0180d8bc85b9abc8a67a8d489
change-id: 20250715-waveshare-dad93ea9980f

Best regards,

Signature · 1 line
Joseph Guo <[email protected]>
author
#1 lore raw

PATCH v3 1/3 dt-bindings: display: bridge: Add waveshare DSI2DPI unit support

Add dt-binding documentation for waveshare DSI2DPI unit

---
Change from v1 to v2
- /s/i2c0/i2c/

---
 .../bindings/display/bridge/waveshare,dsi2dpi.yaml | 103 +++++++++++++++++++++
 1 file changed, 103 insertions(+)
Documentation/devicetree/bindings/display/bridge/waveshare,dsi2dpi.yaml new file +103 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5e8498c8303dd7415ecca97d12ac97362db73cf5
@@ -0,0 +1,103 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/waveshare,dsi2dpi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Waveshare MIPI-DSI to DPI Converter bridge
+
+maintainers:
+  - Joseph Guo <[email protected]>
+
+description:
+  Waveshare bridge board is part of Waveshare panel which converts DSI to DPI.
+
+properties:
+  compatible:
+    const: waveshare,dsi2dpi
+
+  reg:
+    maxItems: 1
+    description: base I2C address of the device
+
+  power-supply: true
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description:
+          Video port for MIPI DSI input
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              data-lanes:
+                description: array of physical DSI data lane indexes.
+                items:
+                  - const: 1
+                  - const: 2
+
+            required:
+              - data-lanes
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Video port for MIPI DPI output panel.
+
+    required:
+      - port@0
+      - port@1
+
+required:
+  - compatible
+  - reg
+  - ports
+  - power-supply
+
+additionalProperties: false
+
+examples:
+  - |
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      bridge@45 {
+        compatible = "waveshare,dsi2dpi";
+        reg = <0x45>;
+        power-supply = <&reg_3p3v>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+
+            waveshare_from_dsim: endpoint {
+              data-lanes = <1 2>;
+              remote-endpoint = <&dsim_to_waveshare>;
+            };
+          };
+
+          port@1 {
+            reg = <1>;
+
+            waveshare_to_panel: endpoint {
+              remote-endpoint = <&panel_to_waveshare>;
+            };
+          };
+        };
+      };
+    };
+
+...
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH v3 2/3 dt-bindings: display: panel: Add waveshare DPI panel support

In reply to Joseph Guo

Add dt-binding documentation for waveshare DPI panel

---
 Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple.yaml +4 -0
index b89e3979057911ab9e669e97e71c16578d9e0150..16465fe3333948909c5d1fdc2a4ddf231bfbce70 100644
@@ -301,6 +301,10 @@ properties:
       - vivax,tpc9150-panel
         # VXT 800x480 color TFT LCD panel
       - vxt,vl050-8048nt-c01
+        # Waveshare 13.3" FHD (1920x1080) LCD panel
+      - waveshare,13.3inch-panel
+        # Waveshare 7.0" WSVGA (1024x600) LCD panel
+      - waveshare,7.0inch-c-panel
         # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
       - winstar,wf35ltiacd
         # Yes Optoelectronics YTC700TLAG-05-201C 7" TFT LCD panel
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH v3 3/3 drm: bridge: Add waveshare DSI2DPI unit driver

In reply to Joseph Guo

Waveshare touchscreen consists of a DPI panel and a driver board. The waveshare driver board consists of ICN6211 and a MCU to convert DSI to DPI and control the backlight.
This driver treats the MCU and ICN6211 board as a whole unit. It can support all resolution waveshare DSI2DPI based panel, the timing table should come from 'panel-dpi' panel in the device tree.

---
Change from v2 to v3
- Sort the config names alphabetically
- Add depends on BACKLIGHT_CLASS_DEVICE
- Drop disable_debugfs in regmap_config
- Sort the variables in reverse Christmas tree
- Drop inappropriate blank line
- Drop duplicate backlight variable
- Change API to upstream version

---
 drivers/gpu/drm/bridge/Kconfig         |  12 ++
 drivers/gpu/drm/bridge/Makefile        |   1 +
 drivers/gpu/drm/bridge/waveshare-dsi.c | 203 +++++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+)
drivers/gpu/drm/bridge/Kconfig +12 -0
index cb3b797fcea1c73e83c9187fef6582296b340305..0447967d125fe8c4cb7dccf3f55323086e7c6ef7 100644
@@ -446,6 +446,18 @@ config DRM_TI_TPD12S015
 	  Texas Instruments TPD12S015 HDMI level shifter and ESD protection
 	  driver.
 
+config DRM_WAVESHARE_BRIDGE
+	tristate "Waveshare DSI bridge"
+	depends on OF
+	depends on BACKLIGHT_CLASS_DEVICE
+	select DRM_PANEL_BRIDGE
+	select DRM_KMS_HELPER
+	select DRM_MIPI_DSI
+	select REGMAP_I2C
+	help
+	  Driver for waveshare DSI to DPI bridge board.
+	  Please say Y if you have such hardware
+
 source "drivers/gpu/drm/bridge/analogix/Kconfig"
 
 source "drivers/gpu/drm/bridge/adv7511/Kconfig"
drivers/gpu/drm/bridge/Makefile +1 -0
index 72185bfd87e4ff6e6ef367edb9d9f52d92bc75fa..fcec44cb273eb99fce08fc924d0d86eab67356ad 100644
@@ -38,6 +38,7 @@ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o
 obj-$(CONFIG_DRM_TI_TDP158) += ti-tdp158.o
 obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o
 obj-$(CONFIG_DRM_TI_TPD12S015) += ti-tpd12s015.o
+obj-$(CONFIG_DRM_WAVESHARE_BRIDGE) += waveshare-dsi.o
 obj-$(CONFIG_DRM_NWL_MIPI_DSI) += nwl-dsi.o
 obj-$(CONFIG_DRM_ITE_IT66121) += ite-it66121.o
 
drivers/gpu/drm/bridge/waveshare-dsi.c new file +203 -0

203 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer Applied
#4 lore raw
In reply to Joseph Guo

Hi,

Quoted 3 lines · Joseph Guo

This patchset add support for waveshare DSI2DPI unit.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/3] dt-bindings: display: bridge: Add waveshare DSI2DPI unit support

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/01048738d6b618fc1dba564b38b3df06b0937eb0
[2/3] dt-bindings: display: panel: Add waveshare DPI panel support
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/80b0eb11f8e0a504078c3b405b54cddaf535ff97
[3/3] drm: bridge: Add waveshare DSI2DPI unit driver
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/dbdea37add132a0f5d96006ea01fa73280984b88
Signature · 1 line
Neil