Torizon OS 7: lvds touchscreen device tree fail

Hello,

I was using Torizon OS 6.7.0 with toradex_5.15-2.2.x-imx with a custom device tree for my touchscreen on verdin module with a mallow carrier board. It works perfectly.

Now I try to migrate to Torizon OS 7.1 with toradex_6.6-2.1.x-imx. I saw that they were some changes needed for the device tree. I made the adaptation based on verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts as reference.

At the boot I got those error messages:

[ 6.452868] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with panel-lvds-native
[ 6.468871] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 6.469210] imx-drm display-subsystem: bound ldb-display-controller (ops imx8mp_ldb_ops [imx8mp_ldb])
[ 6.469559] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[ 6.475328] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device
[ 6.507249] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with 32e90000.lcd-controller
[ 6.530687] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with phy-lvds

the full dmesg logs:
dmesg.txt (38.2 KB)

Could you help me to understand where is the issue ?
best regards,
David

my device tree:

/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>
#include “…/…/linux/arch/arm64/boot/dts/freescale/imx8mp-pinfunc.h”

/ {
compatible = “toradex,verdin-imx8mp”;
};

&{/} {
backlight_lvds_native: backlight-lvds-native {
compatible = “pwm-backlight”;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>;
brightness-levels = <0 45 63 88 119 158 203 255>;
default-brightness-level = <4>;
/* Verdin I2S_2_D_OUT as GPIO (SODIMM 46) /
enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
/
Verdin PWM_2 (SODIMM 16) */
pwms = <&pwm2 0 6666667 PWM_POLARITY_INVERTED>;

};

panel-lvds-native {
compatible = “panel-lvds”;
backlight = <&backlight_lvds_native>;
data-mapping = “vesa-24”;
height-mm = <163>;
width-mm = <261>;

  panel-timing {
  	clock-frequency = <66300000 72400000 78900000>;
  	de-active = <1>;
  	hactive = <1280 1280 1280>;
  	hback-porch = <88 88 88>;
  	hfront-porch = <12 72 132>;
  	hsync-active = <0>;
  	hsync-len = <2 20 40>;
  	pixelclk-active = <0>; /* negative edge */
  	vactive = <800 800 800>;
  	vback-porch = <23 23 23>;
  	vfront-porch = <1 15 49>;
  	vsync-active = <0>;
  	vsync-len = <2 10 20>;
  };

  port {
  	panel_lvds_native_in: endpoint {
  		remote-endpoint = <&lvds_out>;
  	};
  };

};
};

&gpu_2d {
status = “okay”;
};

&gpu_3d {
status = “okay”;
};

/* Verdin I2C_2_DSI */
&i2c2 {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;

touch@41 {
compatible = “ilitek,ili251x”;
reg = <0x41>;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>,
<&pinctrl_i2s_2_sync_gpio>;
/* Verdin I2S_2_SYNC as GPIO (SODIMM 44) /
interrupt-parent = <&gpio4>;
interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
/
Verdin I2S_2_D_IN as GPIO (SODIMM 48) */
reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>;
status = “okay”;
};
};

&lcdif2 {
status = “okay”;
};

&ldb {
status = “okay”;

lvds-channel@0 {
fsl,data-mapping = “spwg”;
fsl,data-width = <24>;
status = “okay”;

  port@1 {
  	reg = <1>;
  	
  	lvds_out: endpoint {
  		remote-endpoint = <&panel_lvds_native_in>;
  	};
  };

};
};

&ldb_phy {
status = “okay”;
};

&mix_gpu_ml {
status = “okay”;
};

&ml_vipsi {
status = “okay”;
};

/* Verdin PWM_2 */
&pwm2 {
status = “okay”;
};

&iomuxc {
pinctrl_i2s_2_d_in_gpio: gpio4io30grp {
fsl,pins =
<MX8MP_IOMUXC_SAI3_RXD__GPIO4_IO30 0x1c4>; /* SODIMM 48 */
};

pinctrl_i2s_2_sync_gpio: gpio4io31grp {
fsl,pins =
<MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31 0x184>; /* SODIMM 44 */
};
};

Software summary

Bootloader: U-Boot
Kernel version: 6.6.54-7.1.0-g3493ccd66900 #1-Torizon SMP PREEMPT Tue Dec 17 21:04:41 UTC 2024
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/ec39a895dec4315dbfdde3e821ad27f63fec50ded44db0ab3a117ff64daab758/0
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.1.0-build.4
Distro variant: VARIANT=“Docker”
Hostname: verdin-imx8mp-15336641

Hardware info

HW model: Toradex Verdin iMX8M Plus WB on Mallow Board
Toradex version: 0064 V1.1A
Serial number: 15336641
Processor arch: aarch64

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello!

It sounds like you’re working on configuring LVDS for your Verdin iMX8M Plus module with Torizon 7.x. Here are some key points and steps to help you resolve the issues you’re encountering:

  1. LVDS Configuration Overview:

    • The Verdin iMX8M Plus supports single or dual-channel LVDS with 18 and 24-bit configurations. Ensure your setup aligns with these specifications.
    • Note that LVDS signals are on module-specific pins and may not be compatible with other Verdin modules.
    • A single channel LVDS interface can support resolutions up to 1366x768 pixels at 60fps, with a maximum pixel clock of 80MHz.
  2. Device Tree Configuration:

    • Ensure the LVDS data mapping is correctly set to either VESA or JEIDA format.
    • Verify the color depth is configured for either 18 or 24-bit, and check the channel configuration (single or dual).
  3. Troubleshooting Steps:

    • The error messages you mentioned might be due to changes in device tree binding requirements between kernel versions. To address this:
      • Verify that the LVDS PHY configuration is correct.
      • Check that your panel timing parameters match your display specifications.
      • Ensure the LVDS channel properties are properly configured.
  4. Using Pre-built Device Tree Overlays:

    • Consider using pre-built device tree overlays as a reference, such as:
      • verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo
      • verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.dtbo
  5. Comparing with Previous Configurations:

    • If issues persist, compare your current device tree with a working configuration from Torizon OS 6.7.0 to identify any differences in the binding structure.

I hope these steps help you resolve the issues with your LVDS configuration. If you have further questions, feel free to ask.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Device Tree Overlays on Toradex System on Modules | Toradex Developer Center.

This may or may not be a solution for you, but I recently had a similar problem where my display wasn’t working when going from v5 to v7 Torizon, and the issues were due to Uboot being outdated, and updating uboot causes the display to start working.

I still get those kernel error message you are getting, but assumed they were just messages to notify that those interfaces defined in the device tree were not being used.

Hello @davidcosta,

Can you send me your device tree for both the working configuration and non-working configuration?

A better starting point for the native LVDS would be the following overlay: verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts « overlays - device-tree-overlays.git - Sources for Device Tree Overlays
The reason for this is that the verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts uses a DSI to LVDS converter and not the native LVDS interface of the Verdin iMX8MP module which is exposed on the Mallow board.
You can see the changes we made to the overlay between Torizon OS 6 and Torizon OS 7 here:

Overlay Diff
diff --git a/verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.kirkstone.dts b/verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.scarthgap.dts
index 4aca1ae..08b4666 100644
--- a/verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.kirkstone.dts
+++ b/verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.scarthgap.dts
@@ -10,6 +10,37 @@
 
 / {
 	compatible = "toradex,verdin-imx8mp";
+
+};
+
+&{/} {
+	panel-lvds-mez {
+		compatible = "panel-lvds";
+		backlight = <&backlight_mezzanine>;
+		data-mapping = "vesa-24";
+		height-mm = <136>;
+		width-mm = <217>;
+
+		panel-timing {
+			clock-frequency = <68900000 71100000 73400000>;
+			de-active = <1>;
+			hactive = <1280 1280 1280>;
+			hback-porch = <23 60 71>;
+			hfront-porch = <23 60 71>;
+			hsync-len = <15 40 47>;
+			pixelclk-active = <1>; /* positive edge */
+			vactive = <800 800 800>;
+			vback-porch = <5 7 10>;
+			vfront-porch = <5 7 10>;
+			vsync-len = <6 9 12>;
+		};
+
+		port {
+			panel_lvds_in: endpoint {
+				remote-endpoint = <&lvds_out>;
+			};
+		};
+	};
 };
 
 &atmel_mxt_ts_mezzanine {
@@ -34,6 +65,21 @@
 
 &ldb {
 	status = "okay";
+
+	lvds-channel@0 {
+		fsl,data-mapping = "spwg";
+		fsl,data-width = <24>;
+		status = "okay";
+
+		port@1 {
+			reg = <1>;
+
+			lvds_out: endpoint {
+				remote-endpoint = <&panel_lvds_in>;
+			};
+		};
+	};
+
 };
 
 &ldb_phy {
@@ -48,26 +94,6 @@
 	status = "okay";
 };
 
-&panel_lvds_mez {
-	height-mm = <136>;
-	width-mm = <217>;
-	status = "okay";
-
-	panel-timing {
-		clock-frequency = <68900000 71100000 73400000>;
-		de-active = <1>;
-		hactive = <1280 1280 1280>;
-		hback-porch = <23 60 71>;
-		hfront-porch = <23 60 71>;
-		hsync-len = <15 40 47>;
-		pixelclk-active = <1>; /* positive edge */
-		vactive = <800 800 800>;
-		vback-porch = <5 7 10>;
-		vfront-porch = <5 7 10>;
-		vsync-len = <6 9 12>;
-	};
-};
-
 &pwm2 {
 	status = "okay";
 };

Best Regards,
Bruno

thanks for you comments.

I havechecked, I have the last u-boot version.

After more analysis (no changes). The device tree works well with the Kernel, my touchscreen works (display and touch).
But during the u-boot phase, there are those device tree failures and I don’t see the booting logo as the touchscreen cannot be initialized. Looks like the same issue than @dTanks.

There is maybe an issue in the u-boot.

I share the full logs during the boot:

U-Boot SPL 2024.07-7.1.0+git.3f772959501c (Jan 01 1970 - 00:00:00 +0000)
Training FAILED
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x4802f000, size 1068
Need continue download 1024
NOTICE: Do not release JR0 to NS as it can be used by HAB
NOTICE: BL31: v2.10.0 (release):android-14.0.0_2.2.0-rc2-0-g7c64d4e86-dirty
NOTICE: BL31: Built : 00:00:00, Jan 1 1970

U-Boot 2024.07-7.1.0+git.3f772959501c (Jan 01 1970 - 00:00:00 +0000)

CPU: Freescale i.MX8MP[6] rev1.1 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 46C
Reset cause: POR
DRAM: 2 GiB
Core: 176 devices, 31 uclasses, devicetree: separate
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC… Reading from MMC(2)… OK
In: serial@30880000
Out: serial@30880000
Err: serial@30880000
Model: Toradex 0064 Verdin iMX8M Plus Quad 2GB WB IT V1.1A
Serial#: 15336641
Carrier: Toradex UNKNOWN CARRIER BOARD V1.1B, Serial# 11420925
SEC0: RNG instantiated
Net: eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME]
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc2(part 0) is current device
Scanning mmc 2:1…
Found U-Boot script /boot.scr
969 bytes read in 1 ms (946.3 KiB/s)

Executing script at 50280000

7031 bytes read in 2 ms (3.4 MiB/s)
87783 bytes read in 3 ms (27.9 MiB/s)
41 bytes read in 2 ms (19.5 KiB/s)
Working FDT set to 50200000
Applying Overlay: Riverdi_12_inch_touch2.dtbo
4193 bytes read in 3 ms (1.3 MiB/s)
11342096 bytes read in 40 ms (270.4 MiB/s)
13203689 bytes read in 46 ms (273.7 MiB/s)
Uncompressing Kernel Image to 0

Flattened Device Tree blob at 50200000

Booting using the fdt blob at 0x50200000
Working FDT set to 50200000
Loading Device Tree to 00000000beaa0000, end 00000000bead8fff … OK
Working FDT set to beaa0000
Modify /vipsi@38500000:status disabled

Starting kernel …

[ 1.106039] debugfs: Directory ‘audiomix’ with parent ‘pm_genpd’ already present!
Starting systemd-udevd version 255.13^
sysroot.readonly configuration value: 0 (fs writable: 1)
Using legacy ostree bind mount for /
[ 6.325582] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with panel-lvds-native
[ 6.340617] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with phy-lvds
[ 6.558733] imx8mp-ldb ldb-display-controller: Failed to create device link (0x180) with 32e90000.lcd-controller
[ 6.790016] imx-bus-devfreq 32700000.interconnect: failed to fetch clk: -2
[ 6.893930] fsl-aud2htx 30cb0000.aud2htx: failed to pcm register
[ 6.902554] fsl-aud2htx 30cb0000.aud2htx: failed to pcm register
[ 6.915044] fsl-aud2htx 30cb0000.aud2htx: failed to pcm register
[ 6.923140] fsl-aud2htx 30cb0000.aud2htx: failed to pcm register
[ 6.940060] fsl-aud2htx 30cb0000.aud2htx: failed to pcm register
[ 9.195401] tpm tpm0: A TPM error (256) occurred attempting the self test

Hello @davidcosta,

Sorry for the delay here.

These warnings actually happen in Linux, not in u-boot.

Therefore, it is unclear to me under which scenario the screen is not working.
Can you clarify when the screen is not working?

Best Regards,
Bruno

I’ve got these same messages in my log. My screen is working fine. Are they worth investigating or should I ignore them?

Hi @phil !

If the device is working fine for your use-case, the messages can usually be ignored.

Best regards,