Using DSI to HDMI Adapter with BSP 3.0b2

I’m using Colibri iMX8QPX on Iris carrier board with DSI to HDMI Adapter.

This works correctly with previous version using meta-fsl-bsl-release/toradex-sumo-4.14.78-1.0.0_ga-bringup, but no longer with the latest meta-toradex* BSP release 3.0b2.

Changing to fsl-imx8qxp-colibri-dsihdmi-eval-v3.dtb causes lots of kernel stack traces during boot:

[    2.116665] imx-drm display-subsystem: bound imx-drm-dpu-bliteng.2 (ops dpu_bliteng_ops)
[    2.125115] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[    2.132659] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[    2.140153] ------------[ cut here ]------------
[    2.144792] WARNING: CPU: 2 PID: 1 at /work/build/build/tmp/work-shared/colibri-imx8x/kernel-source/drivers/gpu/drm/drm_bridge.c:155 drm_bridge_detach+0x44/0x50
[    2.159155] Modules linked in:
[    2.162222] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.117-0+ge43e3a26e1b7 #1
[    2.169720] Hardware name: Toradex Colibri iMX8QXP/DX with LT8912 MIPI-DSI 2 HDMI bridge (DT)
[    2.178260] task: ffff80007a3b8000 task.stack: ffff000008048000
[    2.184191] PC is at drm_bridge_detach+0x44/0x50
[    2.188814] LR is at drm_encoder_cleanup+0x28/0xa0
[    2.193616] pc : [<ffff0000086e5be4>] lr : [<ffff0000086e9218>] pstate: 60000045
[    2.201019] sp : ffff00000804ba90
[    2.204341] x29: ffff00000804ba90 x28: 0000000000000000 
[    2.209659] x27: 0000000000000000 x26: 0000000000000001 
[    2.214985] x25: ffff0000093ab960 x24: ffff000008fcc598 
[    2.220310] x23: ffff80007aa7c800 x22: ffff000008fcc1e0 
[    2.225636] x21: ffff80007aa7c800 x20: 0000000000000000 
[    2.230961] x19: ffff80007aa7c030 x18: 00000000fffffffd 
[    2.236286] x17: 0000000000000000 x16: 0000000000000000 
[    2.241612] x15: 0000000000000001 x14: ffffffffffffffff 
[    2.246938] x13: ffff80007afd1d07 x12: ffff80007afd1d04 
[    2.252263] x11: 0000000000000038 x10: 0101010101010101 
[    2.257588] x9 : 0000000000000002 x8 : 0000000000000002 
[    2.262914] x7 : ffff0000090c0d70 x6 : 000000000000008c 
[    2.268239] x5 : 0000000000000090 x4 : 0000000000000000 
[    2.273564] x3 : 0000000000000040 x2 : 0000000000000000 
[    2.278890] x1 : 0000000000000000 x0 : ffff80007aa7c030 
[    2.284217] Call trace:
[    2.286667] Exception stack(0xffff00000804b950 to 0xffff00000804ba90)
[    2.293115] b940:                                   ffff80007aa7c030 0000000000000000
[    2.300965] b960: 0000000000000000 0000000000000040 0000000000000000 0000000000000090
[    2.308808] b980: 000000000000008c ffff0000090c0d70 0000000000000002 0000000000000002
[    2.316655] b9a0: 0101010101010101 0000000000000038 ffff80007afd1d04 ffff80007afd1d07
[    2.324498] b9c0: ffffffffffffffff 0000000000000001 0000000000000000 0000000000000000
[    2.332343] b9e0: 00000000fffffffd ffff80007aa7c030 0000000000000000 ffff80007aa7c800
[    2.340188] ba00: ffff000008fcc1e0 ffff80007aa7c800 ffff000008fcc598 ffff0000093ab960
[    2.348032] ba20: 0000000000000001 0000000000000000 0000000000000000 ffff00000804ba90
[    2.355878] ba40: ffff0000086e9218 ffff00000804ba90 ffff0000086e5be4 0000000060000045
[    2.363722] ba60: ffff80007aa7c030 ffff80007afb2e18 ffffffffffffffff ffff000008fcc1e0
[    2.371567] ba80: ffff00000804ba90 ffff0000086e5be4
[    2.376455] [<ffff0000086e5be4>] drm_bridge_detach+0x44/0x50
[    2.382128] [<ffff0000086e9218>] drm_encoder_cleanup+0x28/0xa0
[    2.387979] [<ffff00000870a8f4>] imx_nwl_dsi_bind+0x104/0x178
[    2.393737] [<ffff000008720bb8>] component_bind_all+0xf8/0x260
[    2.399583] [<ffff000008705fb8>] imx_drm_bind+0x1e0/0x2f8
[    2.404994] [<ffff000008720824>] try_to_bring_up_master+0x14c/0x1a8
[    2.411275] [<ffff000008720918>] component_add+0x98/0x160
[    2.416687] [<ffff0000087110b0>] dpu_bliteng_probe+0x20/0x30
[    2.422362] [<ffff000008728758>] platform_drv_probe+0x58/0xb8
[    2.428120] [<ffff0000087268d4>] driver_probe_device+0x204/0x2c0
[    2.434140] [<ffff000008726a48>] __driver_attach+0xb8/0xc0
[    2.439640] [<ffff000008724b1c>] bus_for_each_dev+0x6c/0xa8
[    2.445224] [<ffff0000087260c8>] driver_attach+0x20/0x28
[    2.450550] [<ffff000008725dcc>] bus_add_driver+0x1dc/0x208
[    2.456138] [<ffff000008727688>] driver_register+0x60/0xf8
[    2.461636] [<ffff0000087286ac>] __platform_driver_register+0x44/0x50
[    2.468095] [<ffff000009561a58>] dpu_bliteng_driver_init+0x1c/0x24
[    2.474287] [<ffff000008083c08>] do_one_initcall+0x38/0x11c
[    2.479873] [<ffff000009500cd4>] kernel_init_freeable+0x17c/0x210
[    2.485982] [<ffff000008e4727c>] kernel_init+0x10/0xfc
[    2.491129] [<ffff000008084e90>] ret_from_fork+0x10/0x18
[    2.496459] ---[ end trace a28a4ec5ff94382e ]---
[    2.501126] imx-drm display-subsystem: failed to bind mipi_dsi@56228000 (ops imx_nwl_dsi_component_ops): -517
[    2.511280] imx-drm display-subsystem: master bind failed: -517

Hi @sapiippo

Could you provide the exact version ( uname -a ) of the software of your module?
Have you made any changes to the software?

It will be helpful if you can share the complete dmesg log ( dmesg > dmesg.txt ) in a text file?

Thanks and best regards,
Jaski

Linux b2qt-colibri-imx8x 4.14.117-0+ge43e3a26e1b7 #1 SMP PREEMPT Tue Sep 24 08:42:16 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

This is a Boot2Qt image that’s based on the 3.0b2, kernel and u-boot parts are unmodified, Qt has been added to the image.

link text

Same behaviour also with the Toradex Console Image Colibri iMX8X (3.0b2 | 2019-08-30 | 99.24 MB)link text

Didn’t think to check if there are multiple versions of the adapter. Mine is V1.0 and the dtb is now configured for V1.1 only. I’m guess this would be the cause.

Yes, the DSI to HDMI adapter V1.0A is obsolete and no longer supported out-of-the-box. That said it can be made to work again with a hard-coded resolution with the following device tree patch:

diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qxp-colibri-dsihdmi-eval-v3.dts b/arch/arm64/boot/dts/freescale/fsl-imx8qxp-colibri-dsihdmi-eval-v3.dts
index 3ebbcef280ad..44cd3ca53804 100644
--- a/arch/arm64/boot/dts/freescale/fsl-imx8qxp-colibri-dsihdmi-eval-v3.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-imx8qxp-colibri-dsihdmi-eval-v3.dts
@@ -60,40 +60,53 @@
 &i2c0_mipi_lvds0 {
 	status = "okay";
 
-	/* DSI to HDMI Adapter V1.1A */
-	i2c-switch@70 {
-		compatible = "nxp,pca9540";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		reg = <0x70>;
-		i2c-mux-idle-disconnect;
-
-		i2c_sw0: i2c-sw@0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <0>;
-
-			/* DDC/EDID */
+	/* DSI to HDMI Adapter V1.0A */
+	lt8912@48 {
+		compatible = "lontium,lt8912";
+		hpd-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpio_hpd>;
+		reg = <0x48>;
+
+		port {
+			lt8912_1_in: endpoint {
+				remote-endpoint = <&mipi_dsi_bridge1_out>;
+			};
 		};
 
-		i2c-sw@1 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <1>;
-
-			lt8912@48 {
-				compatible = "lontium,lt8912";
-				ddc-i2c-bus = <&i2c_sw0>;
-				hpd-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
-				pinctrl-names = "default";
-				pinctrl-0 = <&pinctrl_gpio_hpd>;
-				reg = <0x48>;
-
-				port {
-					lt8912_1_in: endpoint {
-						remote-endpoint = <&mipi_dsi_bridge1_out>;
-					};
-				};
+		display-timings {
+			native-mode = <&timing1>;
+
+			timing0: timing0 {
+				clock-frequency = <74250000>;
+				hactive = <1280>;
+				vactive = <720>;
+				hfront-porch = <110>;
+				hsync-len = <40>;
+				hback-porch = <220>;
+				vfront-porch = <5>;
+				vsync-len = <5>;
+				vback-porch = <20>;
+				hsync-active = <0>;
+				vsync-active = <0>;
+				de-active = <0>;
+				pixelclk-active = <0>;
+			};
+
+			timing1: timing1 {
+				clock-frequency = <148500000>;
+				hactive = <1920>;
+				vactive = <1080>;
+				hfront-porch = <88>;
+				hsync-len = <44>;
+				hback-porch = <148>;
+				vfront-porch = <4>;
+				vsync-len = <5>;
+				vback-porch = <36>;
+				hsync-active = <0>;
+				vsync-active = <0>;
+				de-active = <0>;
+				pixelclk-active = <0>;
 			};
 		};
 	};