Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/bridge: Add Rockchip RK628 video interface bridge support
@ 2026-12-03  1:33 Gianfranco Mariotti
  2026-12-03  1:33 ` [PATCH 1/2] dt-bindings: display: bridge: Add Rockchip RK628 video interface bridge Gianfranco Mariotti
  0 siblings, 1 reply; 2+ messages in thread
From: Gianfranco Mariotti @ 2026-12-03  1:33 UTC (permalink / raw)
  To: Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
	Jernej Skrabec, Luca Ceresoli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Heiko Stuebner, dri-devel, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel,
	Gianfranco Mariotti

This series adds device tree bindings for the Rockchip RK628 (RK628D and
RK628F) multi-interface video bridge IC and an atomic DRM bridge driver
implementing HDMI-to-LVDS mode.

The RK628 integrates an HDMI 1.4/2.0 receiver, a bidirectional parallel
RGB/YUV/BT.1120 interface, an internal clock and reset unit (CRU) with
fractional dividers, a line-buffered post-processor (scaler, timing
generator, and CSC), a dual-channel combo TX PHY (LVDS, MIPI DSI, MIPI
CSI-2 TX, or GVI), and an HDMI 1.4/2.0 transmitter.

Patch 1 documents the complete hardware DT binding (port@0..port@4,
supplies, optional reference clock, interrupt, and reset) for
rockchip,rk628d and rockchip,rk628f so future support for the remaining
input/output interfaces can be added without DT ABI changes.

Patch 2 adds the atomic DRM bridge driver (drivers/gpu/drm/bridge/rockchip-rk628.c)
for the HDMI RX (port@0) to single- or dual-link LVDS TX (port@1,
port@2) pipeline, tested on NXP i.MX8MP hardware driving a 1920x1080
dual-link LVDS panel via RK628D.

Hardware note on HDMI RX vs. DVI framing:
Unlike simpler HDMI 1.4/DVI receivers, the RK628 HDMI receiver requires
true HDMI TMDS framing (preambles and guard bands) to lock symbol
alignment and color depth; raw DVI TMDS signalling is not supported.
When chained directly to an upstream HDMI transmitter bridge with
DRM_BRIDGE_ATTACH_NO_CONNECTOR (where no HDMI sink EDID/VSDB is read),
the upstream transmitter must emit HDMI framing rather than defaulting
to DVI mode.

Gianfranco Mariotti (2):
  dt-bindings: display: bridge: Add Rockchip RK628 video interface
    bridge
  drm/bridge: Add Rockchip RK628 HDMI to LVDS bridge driver

 .../display/bridge/rockchip,rk628.yaml        |  253 +++
 MAINTAINERS                                   |    9 +
 drivers/gpu/drm/bridge/Kconfig                |   16 +
 drivers/gpu/drm/bridge/Makefile               |    1 +
 drivers/gpu/drm/bridge/rockchip-rk628.c       | 1907 +++++++++++++++++
 5 files changed, 2186 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml
 create mode 100644 drivers/gpu/drm/bridge/rockchip-rk628.c

-- 
2.25.1



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

* [PATCH 1/2] dt-bindings: display: bridge: Add Rockchip RK628 video interface bridge
  2026-12-03  1:33 [PATCH 0/2] drm/bridge: Add Rockchip RK628 video interface bridge support Gianfranco Mariotti
@ 2026-12-03  1:33 ` Gianfranco Mariotti
  0 siblings, 0 replies; 2+ messages in thread
From: Gianfranco Mariotti @ 2026-12-03  1:33 UTC (permalink / raw)
  To: Neil Armstrong, Dmitry Baryshkov, Robert Foss, Laurent Pinchart,
	Jernej Skrabec, Luca Ceresoli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Heiko Stuebner, dri-devel, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel,
	Gianfranco Mariotti

Document the Rockchip RK628 (RK628D and RK628F) multi-interface video
bridge and scaler IC, including power supplies, optional 24 MHz
reference clock, interrupt and reset lines, and OF graph ports for all
hardware video interfaces:
- port@0: HDMI 1.4/2.0 input (HDMIRX; requires HDMI TMDS framing, raw
  DVI is not supported)
- port@1: Combo TX PHY Channel A output (LVDS ChA, MIPI DSI0, MIPI
  CSI-2 TX, or GVI)
- port@2: Combo TX PHY Channel B output (LVDS ChB or MIPI DSI1)
- port@3: HDMI 1.4/2.0 output (HDMITX)
- port@4: Parallel 24-bit RGB / YUV / BT.1120 input or output

Signed-off-by: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
---
 .../display/bridge/rockchip,rk628.yaml        | 253 ++++++++++++++++++
 MAINTAINERS                                   |   8 +
 2 files changed, 261 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml

diff --git a/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml b/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml
new file mode 100644
index 0000000000000..5186a20da7124
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml
@@ -0,0 +1,253 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/rockchip,rk628.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip RK628 Video Interface Bridge
+
+maintainers:
+  - Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
+
+description: |
+  The Rockchip RK628 (RK628D and RK628F) is a multi-interface video bridge and
+  scaler IC controlled over I2C. It integrates an internal clock and reset unit
+  (CRU), a line-buffered post-processor (scaler, timing generator, and color
+  space converter), two video input paths, and multiple video output
+  interfaces:
+    - HDMI 1.4/2.0 receiver (input)
+    - Parallel 24-bit RGB / YUV / BT.1120 interface (input or output)
+    - Combo TX PHY Channel A (LVDS Channel A, MIPI DSI0, MIPI CSI-2 TX, or GVI)
+    - Combo TX PHY Channel B (LVDS Channel B or MIPI DSI1)
+    - HDMI 1.4/2.0 transmitter (output)
+
+properties:
+  compatible:
+    enum:
+      - rockchip,rk628d
+      - rockchip,rk628f
+
+  reg:
+    enum: [0x50, 0x51]
+
+  clocks:
+    maxItems: 1
+    description:
+      Optional 24 MHz reference clock if driven by an external oscillator
+      instead of a crystal across OSC_IN/OSC_OUT.
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+    description: Active-low GPIO connected to the RESETN pin.
+
+  vdd-supply:
+    description:
+      Regulator for 1.1V digital core and analog PHY power (DVDD, AVDD_1V1).
+
+  vccio-supply:
+    description:
+      Regulator for 3.3V I/O and analog PHY power (VDDIO1, AVDD_3V3).
+
+  vddio2-supply:
+    description:
+      Optional 1.8V or 3.3V I/O supply for the parallel RGB/BT.1120 interface
+      bank (VDDIO2).
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          HDMI 1.4/2.0 input port (HDMIRX). Requires HDMI TMDS framing with
+          preambles and guard bands; raw DVI streams are not supported.
+
+      port@1:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description:
+          Combo TX PHY Channel A output port (TX0..TX4), configurable as
+          single-link LVDS, dual-link LVDS Channel A, MIPI DSI0, MIPI CSI-2 TX,
+          or GVI.
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              data-lanes:
+                minItems: 1
+                maxItems: 8
+                uniqueItems: true
+                items:
+                  minimum: 1
+                  maximum: 8
+                description:
+                  Active serial data lanes when operating in MIPI DSI (1..4),
+                  MIPI CSI-2 TX (1..4), or GVI (1..8) mode.
+
+      port@2:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description:
+          Combo TX PHY Channel B output port (TX5..TX9), configurable as
+          dual-link LVDS Channel B or MIPI DSI1.
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              data-lanes:
+                minItems: 1
+                maxItems: 4
+                uniqueItems: true
+                items:
+                  minimum: 1
+                  maximum: 4
+                description:
+                  Active serial data lanes when operating in MIPI DSI1 mode.
+
+      port@3:
+        $ref: /schemas/graph.yaml#/properties/port
+        description: HDMI 1.4/2.0 output port (HDMITX).
+
+      port@4:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description:
+          Parallel 24-bit RGB / YUV / BT.1120 input or output port
+          (VOP_D[23:0]).
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              bus-width:
+                enum: [16, 18, 24]
+
+              pclk-sample: true
+
+    dependencies:
+      port@2: [port@1]
+
+    anyOf:
+      - required:
+          - port@0
+        anyOf:
+          - required: [port@1]
+          - required: [port@3]
+          - required: [port@4]
+      - required:
+          - port@4
+        anyOf:
+          - required: [port@1]
+          - required: [port@3]
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+  - vccio-supply
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    /* HDMI input to dual-link LVDS output */
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        bridge@51 {
+            compatible = "rockchip,rk628d";
+            reg = <0x51>;
+            reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+            vdd-supply = <&reg_1v1>;
+            vccio-supply = <&reg_3v3>;
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+
+                    rk628_in_hdmi: endpoint {
+                        remote-endpoint = <&hdmi_out>;
+                    };
+                };
+
+                port@1 {
+                    reg = <1>;
+
+                    rk628_out_lvds0: endpoint {
+                        remote-endpoint = <&panel_in_lvds_odd>;
+                    };
+                };
+
+                port@2 {
+                    reg = <2>;
+
+                    rk628_out_lvds1: endpoint {
+                        remote-endpoint = <&panel_in_lvds_even>;
+                    };
+                };
+            };
+        };
+    };
+
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    /* Parallel RGB input to HDMI output */
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        bridge@50 {
+            compatible = "rockchip,rk628f";
+            reg = <0x50>;
+            interrupt-parent = <&gpio3>;
+            interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
+            reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+            vdd-supply = <&reg_1v1>;
+            vccio-supply = <&reg_3v3>;
+            vddio2-supply = <&reg_1v8>;
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@3 {
+                    reg = <3>;
+
+                    rk628_out_hdmi: endpoint {
+                        remote-endpoint = <&hdmi_connector_in>;
+                    };
+                };
+
+                port@4 {
+                    reg = <4>;
+
+                    rk628_in_rgb: endpoint {
+                        remote-endpoint = <&dpi_out>;
+                        bus-width = <24>;
+                    };
+                };
+            };
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index c00d3612c9acf..0e0caed96838e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -24599,6 +24599,14 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/media/rockchip-rga.yaml
 F:	drivers/media/platform/rockchip/rga/
 
+ROCKCHIP RK628 VIDEO INTERFACE BRIDGE
+M:	Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
+L:	dri-devel@lists.freedesktop.org
+L:	linux-rockchip@lists.infradead.org
+S:	Maintained
+T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
+F:	Documentation/devicetree/bindings/display/bridge/rockchip,rk628.yaml
+
 ROCKCHIP RKVDEC VIDEO DECODER DRIVER
 M:	Detlev Casanova <detlev.casanova@collabora.com>
 M:	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-- 
2.25.1



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

end of thread, other threads:[~2026-12-03  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  1:33 [PATCH 0/2] drm/bridge: Add Rockchip RK628 video interface bridge support Gianfranco Mariotti
2026-12-03  1:33 ` [PATCH 1/2] dt-bindings: display: bridge: Add Rockchip RK628 video interface bridge Gianfranco Mariotti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox