summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-09-05 10:31:18 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2023-09-13 11:10:29 +0200
commit45b24b4fabd79c3dc473218c8518e6ad89e5a4dd (patch)
treeb0352f19836a9e05e6d6dbe04da5cda41083ef46
parenta698db0dfb1a6d57f4698be898e1f9eff20a4d1b (diff)
verdin-imx8mp: add dsi-to-hdmi overlay
Add Verdin DSI to HDMI Adapter (dsi-to-hdmi) with Lontium LT8912B MIPI DSI to HDMI bridge chip device tree overlay compatible with mainline/ master/upstream v6.5 Linux kernel and device trees. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--overlays/Makefile1
-rw-r--r--overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts109
2 files changed, 110 insertions, 0 deletions
diff --git a/overlays/Makefile b/overlays/Makefile
index 2ebd04f..94ddfcc 100644
--- a/overlays/Makefile
+++ b/overlays/Makefile
@@ -57,6 +57,7 @@ dtb-y += verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo
dtb-y += verdin-imx8mm_hmp_overlay.dtbo
dtb-y += verdin-imx8mm_nau8822-btl_overlay.dtbo
dtb-y += verdin-imx8mm_spidev_overlay.dtbo
+dtb-y += verdin-imx8mp_dsi-to-hdmi_overlay.dtbo
dtb-y += verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo
dtb-y += verdin-imx8mp_nau8822-btl_overlay.dtbo
dtb-y += verdin-imx8mp_spidev_overlay.dtbo
diff --git a/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts
new file mode 100644
index 0000000..5cece29
--- /dev/null
+++ b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts
@@ -0,0 +1,109 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2023 Toradex
+ */
+
+// Verdin DSI to HDMI Adapter orderable at Toradex.
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+ compatible = "toradex,verdin-imx8mp";
+};
+
+&{/} {
+ hdmi-connector {
+ compatible = "hdmi-connector";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm_3_dsi_hpd_gpio>;
+ ddc-i2c-bus = <&i2c2>;
+ /* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */
+ hpd-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+ label = "hdmi";
+ type = "a";
+
+ port {
+ hdmi_connector_in: endpoint {
+ remote-endpoint = <&lt8912_1_out>;
+ };
+ };
+ };
+};
+
+/* Verdin I2C_2_DSI */
+&i2c2 {
+ status = "okay";
+};
+
+/* Verdin I2C_1 */
+&i2c4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ hdmi@48 {
+ compatible = "lontium,lt8912b";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio_10_dsi>;
+ reg = <0x48>;
+ /* Verdin GPIO_9_DSI (LT8912 INT, SODIMM 17, unused) */
+ /* Verdin GPIO_10_DSI (SODIMM 21) */
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ lt8912_1_in: endpoint {
+ data-lanes = <1 2 3 4>;
+ remote-endpoint = <&mipi_dsi_bridge1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ lt8912_1_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+ };
+ };
+ };
+};
+
+/* LCDIF to MIPI-DSI */
+&lcdif1 {
+ status = "okay";
+};
+
+&mipi_dsi {
+ samsung,esc-clock-frequency = <16000000>;
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ mipi_dsi_bridge1_out: endpoint {
+ attach-bridge;
+ remote-endpoint = <&lt8912_1_in>;
+ };
+ };
+ };
+};
+
+&pwm3 {
+ /* PWM 3 conflicts with the HPD signal from the adapter */
+ status = "disabled";
+};