Enabling ldb1 causes warning/errors at boot time

Hi,

I’m currently doing a proof-of-concept project with a colibri imx8x module (on an Iris v2 carrier board) where I’m limited to use a specific dual-channel lvds vesa-24 display. Since the colibri SODIMM interface is only 18bit, I was hoping to use the X2 FFC connector until we get a PCB designed.

I found quite some information already using the forum, however I still can’t seem to be able to enable the interface, on the contrary, it seems some other stuff gets disabled as well in the process.

Here is a snippet of the kernel boot log:

[    0.331623] platform bus@56220000:ldb@562210e0: Fixing up cyclic dependency with 56180000.dpu
[    0.341479] platform panel-dpi: Fixing up cyclic dependency with 5a180000.lcdif
[    0.350264] platform lvds0_panel: Fixing up cyclic dependency with bus@56220000:ldb@562210e0

Only the panel-dpi message was there before. Not sure if I can ignore this, because in drivers/base/core.c, it’s actually returning an -EINVAL

Before applying my device-tree patch, I had 3 DRM devices (using the standard imx8dx-colibri-eval-v3.dts as a base and also leaving the default colibri-imx8x_vg-640x480_overlay.dtsi in place), after application I had only 2. Obviously I didn’t get a signal on X2 either.

I’m building a custom linux with yocto kirkstone, I’m currently on toradex kirkstone-6.x.y (latest), below is the patch file I’m using. I’m patching the dts file because using an overlay throws away the lvds0_panel definition, still need to figure that out as well. Also, this is a slimmed down version of my full patch file, just to debug the ldb issue. (I started with the dual-lvds example in kernel 4.x)

diff --git a/arch/arm64/boot/dts/freescale/imx8dx-colibri-eval-v3.dts b/arch/arm64/boot/dts/freescale/imx8dx-colibri-eval-v3.dts
index a03e08694623..41ab32242147 100644
--- a/arch/arm64/boot/dts/freescale/imx8dx-colibri-eval-v3.dts
+++ b/arch/arm64/boot/dts/freescale/imx8dx-colibri-eval-v3.dts
@@ -13,4 +13,38 @@ / {
 	compatible = "toradex,colibri-imx8x-eval-v3",
 		     "toradex,colibri-imx8x",
 		     "fsl,imx8qxp", "fsl,imx8dx";
+	
+	lvds0_panel {
+		compatible = "jdi,tx26d202vm0bwa";
+		status = "okay";
+
+		port {
+			panel_lvds0_in: endpoint {
+				remote-endpoint = <&lvds0_out>;
+			};
+		};
+	};
 };
+
+&ldb1 {
+	fsl,dual-channel;
+	status = "okay";
+
+	lvds-channel@0 {
+		fsl,data-mapping = "spwg";
+		fsl,data-width = <24>;
+		status = "okay";
+
+		port@1 {
+			reg = <1>;
+
+			lvds0_out: endpoint {
+				remote-endpoint = <&panel_lvds0_in>;
+			};
+		};
+	};
+};
+
+&ldb1_phy {
+	status = "okay";
+};

Hints, tips, tricks, solutions,…all are welcome! More info available upon request.

Cheers!
Nic

Hi @Devnician !

There is this device tree file which enable LVDS single channel for BSP 5 (toradex_5.4-2.3.x-imx):

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8qxp-colibri-lvds-single-channel.dts?h=toradex_5.4-2.3.x-imx

You can try to base on this to enable for BSP 6.

Best regards,

Hi Henrique,

thanks for you response! Unfortunately that doesn’t work for me either, my own patch was based off of the dts file you mentioned. Are you saying if I switch to dunfell-5.x.y that I should get it working? It’s a verified dts then (at least for single channel lvds)?

I’ll let bitbake chew on 5.x.y in the mean time.

Nic.

As a follow-up, progress has been made using the dunfell-5.x.y branch! I can confirm that dual-lvds on X2 works in this version! I did have to make a minor change to the dts file because the width-mm, height-mm and data-mapping fields were missing in the the panel_lvds section (just copied them over from the imx8qxp-colibri-lvds-single-channel.dts and I was good to go)

Too bad it doesn’t work on the ‘latest and greatest’ though, I’m guessing something must’ve gone wrong in the iMX ldb drivers, merging the device-tree changes didn’t cut it (and yes, I did spend many hours converting the dtb’s back to dts and comparing them!)

Anyway, now I have a different problem, I can’t get USB to work. I’m using the tdx-reference-image-minimal as a starting point. Any ideas? I do get the following message during boot:

[    0.255838] imx8qxp-lpcg-clk 37620000.clock-controller: failed to get clock parent names
[    0.255948] imx8qxp-lpcg-clk: probe of 37620000.clock-controller failed with error -22
...
[    2.596972] imx8qxp-lpcg-clk 59580000.clock-controller: ignoring dependency for device, assuming no driver
[    2.613255] imx8qxp-lpcg-clk 5a4d0000.clock-controller: ignoring dependency for device, assuming no driver
[    2.629585] imx8qxp-lpcg-clk 5ac90000.clock-controller: ignoring dependency for device, assuming no driver
[    2.645911] imx8qxp-lpcg-clk 5b260000.clock-controller: ignoring dependency for device, assuming no driver

Things like that always make me nervous :slight_smile:

Thanks!

Hi @Devnician !

Thanks for the information!

It is great that you got it working!

Did it stop working after you enabled the overlay for the LVDS on X2? If you disable the overlay for the LVDS on X2, does it come back to life?

Quickly going through the overlay, nothing tells me that it might be related, but I think it is worth asking :slight_smile:

Best regards,

Hi @henrique.tx

Apologies for the late reply, this is a side-project for me at the moment :slight_smile:

I had some yocto issues and had to recompile everything from scratch (and if you’ve ever compiled flutter in yocto on a virtual Ubuntu, you know what I’m talking about :smiley: )

Anyway, a fresh 5.7.3 with the standard dts works fine. I’ll enable my own dts again and see. I did notice that I didn’t include the imx8x-colibri-iris-v2.dtsi file, so that will most likely be the culprit, however it remains to be seen if the dual LVDS will still work with that file included :slight_smile:

/EDIT: sure enough, that fixed it! Full steam ahead now! :partying_face:

Cheers,
Nic.

Hi @Devnician !

OUCH :rofl:
Too bad you need to go through this… If you were using Torizon, you most probably wouldn’t need to have this kind of issue and your development could be accelerated :wink:

It is great to see that your problem was solved! Thanks for the feedback :smiley:

Have a nice day!