[PATCH v2 3/3] [DNI/WIP] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL

Alexander Stein alexander.stein at ew.tq-group.com
Wed Jun 22 04:49:49 PDT 2022


This adds an overlay for the supported LVDS display tianma tm070jvhg33.

Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
---
This is the current WIP LVDS overlay which demonstrates how the compatible is
added this late. The display is not fixed and can optionally be attached,
but some connections like power-supply etc are set.
To get this overlay to work or even compile, imx8mp.dtsi patches are required,
e.g. [1].

I also noticed on issue when using ldb_lvds_ch0 (the endpoint node from lcdif):
Apparently in the overlay dtc is not able to determine that the phandle refers
to a node which is named endpoint. See the following warnings:

  DTC     arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo
arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo: Warning (graph_port): /fragment at 4: graph port node name should be 'port'
../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts:26.15-28.3: Warning (graph_endpoint): /fragment at 4/__overlay__: graph endpoint node name should be 'endpoint'
  DTOVL   arch/arm64/boot/dts/freescale/tqma8mpql-mba8mpxl-lvds.dtb

Using the configuration as subnodes to lvds_bridge (commented out right now),
the warnings are gone. But this seems a bit tedious. What is the right way
to configure this?

[1] https://gitlab.collabora.com/martyn/linux/-/commit/3830154763ff4a1c77ae0118d76bdb0465e94307

 arch/arm64/boot/dts/freescale/Makefile        |  2 +
 .../imx8mp-tqma8mpql-mba8mpxl-lvds.dts        | 44 +++++++++++++++++++
 .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts   |  6 +++
 3 files changed, 52 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index f814595cd351..64e999f006e1 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -84,6 +84,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl.dtb
+tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo
+dtb-$(CONFIG_ARCH_MXC) += tqma8mpql-mba8mpxl-lvds.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-venice-gw74xx.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts
new file mode 100644
index 000000000000..1d57e96d669b
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright 2022 TQ-Systems GmbH
+ * Author: Alexander Stein <alexander.stein at tq-group.com>
+ */
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
+};
+
+&backlight_lvds {
+	status = "okay";
+};
+
+&display {
+	compatible = "tianma,tm070jvhg33";
+	status = "okay";
+};
+
+&lcdif2 {
+	status = "okay";
+};
+
+&ldb_lvds_ch0 {
+	remote-endpoint = <&panel_in_lvds0>;
+};
+
+&lvds_bridge {
+	status = "okay";
+
+	// ports {
+	// 	port at 1 {
+	// 		ldb_lvds_ch0: endpoint {
+	// 			remote-endpoint = <&panel_in_lvds0>;
+	// 		};
+	// 	};
+	// };
+};
+
+&pwm2 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
index d8ca52976170..772cbb664b2a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts
@@ -106,6 +106,12 @@ display: display {
 		enable-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
 		backlight = <&backlight_lvds>;
 		status = "disabled";
+
+		port {
+			panel_in_lvds0: endpoint {
+				remote-endpoint = <&ldb_lvds_ch0>;
+			};
+		};
 	};
 
 	reg_usdhc2_vmmc: regulator-usdhc2 {
-- 
2.25.1




More information about the linux-arm-kernel mailing list