Skip to contentSkip to conversation

Add support of Lontium lt8912 MIPI to HDMI bridge

PATCH Superseded Adrien Grassein 2 participants 5 messages Jan 24, 2021 – Feb 9, 2021

Subsystems (4)

v1 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

cover Add support of Lontium lt8912 MIPI to HDMI bridge

Hello,

this patch set adds the support of the Lontium lt8912 MIPI to HDMI bridge in the kernel.

It's only support the video part, not the audio part yet since I don't have the datasheet of this component. I get the current i2c configuration from Digi and Boundary drivers.
Developed using the DB_DSIHD board from BoundaryDevices.

Thanks,
Adrien Grassein

Adrien Grassein (2):
dt-bindings: display: bridge: Add documentation for LT8912 drm/bridge: Introduce LT8912 DSI to HDMI bridge

 .../display/bridge/lontium,lt8912.yaml        |  92 +++
 MAINTAINERS                                   |   6 +
 drivers/gpu/drm/bridge/Kconfig                |  14 +
 drivers/gpu/drm/bridge/Makefile               |   1 +
 drivers/gpu/drm/bridge/lontium-lt8912.c       | 749 ++++++++++++++++++
 5 files changed, 862 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
 create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 dt-bindings: display: bridge: Add documentation for LT8912

Lontium LT8912 is a DSI to HDMI bridge.

---
 .../display/bridge/lontium,lt8912.yaml        | 92 +++++++++++++++++++
 MAINTAINERS                                   |  5 +
 2 files changed, 97 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +92 -0
new file mode 100644
index 000000000000..ed1a6ddaab2f
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/lontium,lt8912.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lontium LT8912 MIPI to HDMI Bridge
+
+maintainers:
+  - Adrien Grassein <[email protected]>
+
+description: |
+  The LT8912 is a bridge device which convert DSI to HDMI
+
+properties:
+  compatible:
+    enum:
+      - lontium,lt8912
+
+  reg:
+    maxItems: 1
+
+  ddc-i2c-bus:
+    maxItems: 1
+    description: i2c bus used to read EDID of the connected display.
+
+  dsi-lanes:
+    maxItems: 1
+    description: dsi lanes count interconnected with lt8912.
+
+  reset-gpios:
+    maxItems: 1
+    description: GPIO connected to active high RESET pin.
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Primary MIPI port-1 for MIPI input
+
+    required:
+      - port@0
+
+required:
+  - compatible
+  - ddc-i2c-bus
+  - dsi-lanes
+  - reg
+  - reset-gpios
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c4 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      hdmi-bridge@48 {
+        compatible = "lontium,lt8912";
+        reg = <0x48>;
+        reset-gpios = <&max7323 0 GPIO_ACTIVE_LOW>;
+        dsi-lanes = <4>;
+        ddc-i2c-bus = <&ddc_i2c_bus>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+
+            hdmi_out_in: endpoint {
+              remote-endpoint = <&mipi_dsi_out>;
+            };
+          };
+        };
+      };
+    };
+
+    ddc_i2c_bus: i2c5 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+    };
+
+...
MAINTAINERS +5 -0
index 5aa18cbfb883..01e7e356bfac 100644
@@ -10472,6 +10472,11 @@ S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
 F:	drivers/hid/hid-lg-g15.c
 
+LONTIUM LT8912 MIPI TO HDMI BRIDGE
+M:	Adrien Grassein <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
+
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 M:	Sathya Prakash <[email protected]>
 M:	Sreekanth Reddy <[email protected]>
Signature · 1 line
2.25.1
#2 lore raw

PATCH 1/2 dt-bindings: display: bridge: Add documentation for LT8912

In reply to Adrien Grassein

Lontium LT8912 is a DSI to HDMI bridge.

---
 .../display/bridge/lontium,lt8912.yaml        | 92 +++++++++++++++++++
 MAINTAINERS                                   |  5 +
 2 files changed, 97 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +92 -0
new file mode 100644
index 000000000000..ed1a6ddaab2f
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/lontium,lt8912.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lontium LT8912 MIPI to HDMI Bridge
+
+maintainers:
+  - Adrien Grassein <[email protected]>
+
+description: |
+  The LT8912 is a bridge device which convert DSI to HDMI
+
+properties:
+  compatible:
+    enum:
+      - lontium,lt8912
+
+  reg:
+    maxItems: 1
+
+  ddc-i2c-bus:
+    maxItems: 1
+    description: i2c bus used to read EDID of the connected display.
+
+  dsi-lanes:
+    maxItems: 1
+    description: dsi lanes count interconnected with lt8912.
+
+  reset-gpios:
+    maxItems: 1
+    description: GPIO connected to active high RESET pin.
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Primary MIPI port-1 for MIPI input
+
+    required:
+      - port@0
+
+required:
+  - compatible
+  - ddc-i2c-bus
+  - dsi-lanes
+  - reg
+  - reset-gpios
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c4 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      hdmi-bridge@48 {
+        compatible = "lontium,lt8912";
+        reg = <0x48>;
+        reset-gpios = <&max7323 0 GPIO_ACTIVE_LOW>;
+        dsi-lanes = <4>;
+        ddc-i2c-bus = <&ddc_i2c_bus>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+
+            hdmi_out_in: endpoint {
+              remote-endpoint = <&mipi_dsi_out>;
+            };
+          };
+        };
+      };
+    };
+
+    ddc_i2c_bus: i2c5 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+    };
+
+...
MAINTAINERS +5 -0
index 5aa18cbfb883..01e7e356bfac 100644
@@ -10472,6 +10472,11 @@ S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
 F:	drivers/hid/hid-lg-g15.c
 
+LONTIUM LT8912 MIPI TO HDMI BRIDGE
+M:	Adrien Grassein <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
+
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 M:	Sathya Prakash <[email protected]>
 M:	Sreekanth Reddy <[email protected]>
Signature · 1 line
2.25.1
maintainer
#3 lore raw

Re: [PATCH 1/2] dt-bindings: display: bridge: Add documentation for LT8912

Quoted 28 lines · Adrien Grassein

Lontium LT8912 is a DSI to HDMI bridge.

---
 .../display/bridge/lontium,lt8912.yaml        | 92 +++++++++++++++++++
 MAINTAINERS                                   |  5 +
 2 files changed, 97 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +13 -0
new file mode 100644
index 000000000000..ed1a6ddaab2f
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/lontium,lt8912.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Lontium LT8912 MIPI to HDMI Bridge
+
+maintainers:
+  - Adrien Grassein <[email protected]>
+
+description: |
+  The LT8912 is a bridge device which convert DSI to HDMI

Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +10 -0
+
+properties:
+  compatible:
+    enum:
+      - lontium,lt8912
+
+  reg:
+    maxItems: 1
+
+  ddc-i2c-bus:

This belongs in an hdmi-connector node.

Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml line 29

Quoted 6 lines
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +6 -0
+    maxItems: 1
+    description: i2c bus used to read EDID of the connected display.
+
+  dsi-lanes:
+    maxItems: 1
+    description: dsi lanes count interconnected with lt8912.

'data-lanes' in the graph is the standard way to do this.

You'll need video-interfaces.yaml which is pending in the media tree.

Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml line 42

Quoted 13 lines
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +13 -0
+
+  reset-gpios:
+    maxItems: 1
+    description: GPIO connected to active high RESET pin.
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Primary MIPI port-1 for MIPI input

You're going to need a port for the connector.

Quoted 69 lines
Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file +50 -0
+
+    required:
+      - port@0
+
+required:
+  - compatible
+  - ddc-i2c-bus
+  - dsi-lanes
+  - reg
+  - reset-gpios
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c4 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      hdmi-bridge@48 {
+        compatible = "lontium,lt8912";
+        reg = <0x48>;
+        reset-gpios = <&max7323 0 GPIO_ACTIVE_LOW>;
+        dsi-lanes = <4>;
+        ddc-i2c-bus = <&ddc_i2c_bus>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+
+            hdmi_out_in: endpoint {
+              remote-endpoint = <&mipi_dsi_out>;
+            };
+          };
+        };
+      };
+    };
+
+    ddc_i2c_bus: i2c5 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+    };
+
+...
MAINTAINERS +5 -0
index 5aa18cbfb883..01e7e356bfac 100644
@@ -10472,6 +10472,11 @@ S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git
 F:	drivers/hid/hid-lg-g15.c
 
+LONTIUM LT8912 MIPI TO HDMI BRIDGE
+M:	Adrien Grassein <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
+
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 M:	Sathya Prakash <[email protected]>
 M:	Sreekanth Reddy <[email protected]>
Signature · 1 line
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

PATCH 2/2 drm/bridge: Introduce LT8912 DSI to HDMI bridge

In reply to Adrien Grassein

Lontium Lt8912 is a DSI to HDMI bridge.

---
 MAINTAINERS                             |   1 +
 drivers/gpu/drm/bridge/Kconfig          |  14 +
 drivers/gpu/drm/bridge/Makefile         |   1 +
 drivers/gpu/drm/bridge/lontium-lt8912.c | 749 ++++++++++++++++++++++++
 4 files changed, 765 insertions(+)
 create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c
MAINTAINERS +1 -0
index 01e7e356bfac..65fb19382e40 100644
@@ -10476,6 +10476,7 @@ LONTIUM LT8912 MIPI TO HDMI BRIDGE
 M:	Adrien Grassein <[email protected]>
 S:	Maintained
 F:	Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml
+F:	drivers/gpu/drm/bridge/lontium-lt8912.c
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 M:	Sathya Prakash <[email protected]>
drivers/gpu/drm/bridge/Kconfig +14 -0
index e4110d6ca7b3..5b36d4b86e3c 100644
@@ -48,6 +48,20 @@ config DRM_DISPLAY_CONNECTOR
 	  on ARM-based platforms. Saying Y here when this driver is not needed
 	  will not cause any issue.
 
+config DRM_LONTIUM_LT8912
+	tristate "Lontium LT8912 DSI/HDMI bridge"
+	depends on OF
+	select DRM_PANEL_BRIDGE
+	select DRM_KMS_HELPER
+	select REGMAP_I2C
+	help
+	  Driver for Lontium LT8912 DSI to HDMI bridge
+	  chip driver.
+	  Please say Y if you have such hardware.
+
+	  Say M here if you want to support this hardware as a module.
+	  The module will be named "lontium-lt8912".
+
 config DRM_LONTIUM_LT9611
 	tristate "Lontium LT9611 DSI/HDMI bridge"
 	select SND_SOC_HDMI_CODEC if SND_SOC
drivers/gpu/drm/bridge/Makefile +1 -0
index 86e7acc76f8d..5a1b201cea1f 100644
@@ -2,6 +2,7 @@
 obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o
 obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o
 obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o
+obj-$(CONFIG_DRM_LONTIUM_LT8912) += lontium-lt8912.o
 obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o
 obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o
 obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o
drivers/gpu/drm/bridge/lontium-lt8912.c new file +749 -0

749 lines not on this page · raw message

Signature · 1 line
2.25.1