Document the Lontium LT9721 HDMI 1.4 to 1/2/4-lane eDP 1.4 bridge
device tree binding, including power supplies, reset GPIO, OF graph
input/output endpoints with lane/polarity remapping, and the DP AUX bus.

Signed-off-by: Gianfranco Mariotti <[email protected]>
---
 .../display/bridge/lontium,lt9721.yaml        | 169 ++++++++++++++++++
 MAINTAINERS                                   |   7 +
 2 files changed, 176 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml

diff --git 
a/Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml 
b/Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml
new file mode 100644
index 0000000000000..88c5c75c0d49c
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml
@@ -0,0 +1,169 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/lontium,lt9721.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lontium LT9721 HDMI 1.4 to eDP 1.4 Bridge
+
+maintainers:
+  - Gianfranco Mariotti <[email protected]>
+
+description:
+  The Lontium LT9721 is a bridge device that converts an HDMI 1.4 input
+  (up to 3.4 Gbps/lane) to a 1-, 2-, or 4-lane eDP 1.4 output (1.62 Gbps
+  RBR or 2.7 Gbps HBR per lane), controlled over I2C.
+
+properties:
+  compatible:
+    const: lontium,lt9721
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+    description: Active-low GPIO connected to the RST_N pin.
+
+  vcc-supply:
+    description: Regulator for 3.3V analog and I/O power (VCC33_RX, VCC33_TX).
+
+  vdd-supply:
+    description: Regulator for 1.8V analog and core power (VCC18_RX, VCC18_TX, 
VDD).
+
+  aux-bus:
+    $ref: /schemas/display/dp-aux-bus.yaml#
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: HDMI 1.4 input port.
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              lane-polarities:
+                minItems: 4
+                maxItems: 4
+                items:
+                  enum: [0, 1]
+                description:
+                  TMDS pair P/N polarity inversion for clock and data lanes.
+                  The LT9721 applies P/N inversion globally across all four
+                  TMDS pairs, so all entries must match.
+
+      port@1:
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
+        description: eDP 1.4 output port.
+
+        properties:
+          endpoint:
+            $ref: /schemas/media/video-interfaces.yaml#
+            unevaluatedProperties: false
+
+            properties:
+              data-lanes:
+                oneOf:
+                  - minItems: 1
+                    maxItems: 1
+                    items:
+                      enum: [0, 1, 2, 3]
+                  - minItems: 2
+                    maxItems: 2
+                    uniqueItems: true
+                    items:
+                      enum: [0, 1, 2, 3]
+                  - minItems: 4
+                    maxItems: 4
+                    uniqueItems: true
+                    items:
+                      enum: [0, 1, 2, 3]
+
+              lane-polarities:
+                minItems: 1
+                maxItems: 4
+                items:
+                  enum: [0, 1]
+
+            dependencies:
+              lane-polarities: [data-lanes]
+
+    required:
+      - port@0
+      - port@1
+
+required:
+  - compatible
+  - reg
+  - vcc-supply
+  - vdd-supply
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        bridge@33 {
+            compatible = "lontium,lt9721";
+            reg = <0x33>;
+            reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
+            vcc-supply = <&reg_3v3>;
+            vdd-supply = <&reg_1v8>;
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+
+                    lt9721_in: endpoint {
+                        remote-endpoint = <&hdmi_out>;
+                        lane-polarities = <1 1 1 1>;
+                    };
+                };
+
+                port@1 {
+                    reg = <1>;
+
+                    lt9721_out: endpoint {
+                        remote-endpoint = <&edp_panel_in>;
+                        data-lanes = <0 1>;
+                    };
+                };
+            };
+
+            aux-bus {
+                panel {
+                    compatible = "edp-panel";
+                    power-supply = <&reg_panel_3v3>;
+                    backlight = <&backlight>;
+                    no-hpd;
+
+                    port {
+                        edp_panel_in: endpoint {
+                            remote-endpoint = <&lt9721_out>;
+                        };
+                    };
+                };
+            };
+        };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index c00d3612c9acf..707cd862d4fc4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15790,6 +15790,13 @@ S:     Maintained
 F:     Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml
 F:     drivers/gpu/drm/bridge/lontium-lt8912b.c
 
+LONTIUM LT9721 HDMI TO EDP BRIDGE
+M:     Gianfranco Mariotti <[email protected]>
+L:     [email protected]
+S:     Maintained
+T:     git https://gitlab.freedesktop.org/drm/misc/kernel.git
+F:     Documentation/devicetree/bindings/display/bridge/lontium,lt9721.yaml
+
 LOONGARCH
 M:     Huacai Chen <[email protected]>
 R:     WANG Xuerui <[email protected]>
-- 
2.25.1

Reply via email to