How to output to multiple displays with imx8mp?

We want to output video from imx8mp on a custom board via MIPI-DSI and native-LVDS0.

We could output video from MIPI-DSI.
But we don’t know how to output from native-LVDS0.

I have two questions.

  1. Device tree
    I added a device tree as follows.
    Is the description of this device tree correct?

  2. Frame Buffer
    If the device tree is correctly configured, how do I access it?
    Will a file like /dev/fb1 be generated?

&gpu_2d {
	status = "okay";
};

&gpu_3d {
	status = "okay";
};

&lcdif2 {
	status = "okay";
};

&ldb {
	status = "okay";
};

&ldb_phy {
	status = "okay";
};

&mix_gpu_ml {
	status = "okay";
};

&ml_vipsi {
	status = "okay";
};

&panel_lvds {
        status = "okay";
        data-mapping = "vesa-24";
        width-mm = <199>;
        height-mm = <112>;
        panel-timing {
                clock-frequency = <60000000>;
                hactive = <1280>;
                hback-porch = <148>;
                hfront-porch = <88>;
                hsync-len = <44>;
                vactive = <720>;
                vback-porch = <36>;
                vfront-porch = <4>;
                vsync-len = <5>;
        };
};

Greetings @p-uchi,

Your device tree changes look close, but there’s a small issue. Here is the device tree overlay we use to enable native LVDS on Verdin i.MX8MP: verdin-imx8mp_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts « overlays - device-tree-overlays.git - Sources for Device Tree Overlays

As you can see we change the panel_lvds_mez node not the panel_lvds node. The panel_lvds node goes to the DSI to LVDS interface not the native LVDS interface. If you check the base device tree you can see both of these LVDS panel nodes: imx8mp-verdin.dtsi « freescale « dts « boot « arm64 « arch - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

But only panel_lvds_mez is actually attached to the native LVDS interface. Another thing is I noticed you don’t have any backlight in your changes. Does your display not need this?

Will a file like /dev/fb1 be generated?

I don’t think a /dev/* entry would get generated here. You should see something in /sys/class/drm for each display interface on the system however. This could be an indication.

Best Regards,
Jeremias

Thank you @jeremias.tx ,

I use device tree version device tree overlay git (toradex_5.4-2.3.x-imx).
In this version, I thought palel_lvds was native LVDS, am I wrong?

	panel_lvds: panel-lvds {
		compatible = "panel-lvds";
		backlight = <&backlight>;
		data-mapping = "vesa-24";
		status = "disabled";

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

One thing I found out, if I write verdin-imx8mp_mezzanine-lvds-dual-channel_overlay.dtbo in overlays.txt, card2-LVDS-1 appears in /sys/class/drm (not verdin-imx8mp_mezzanine-lvds-single-channel_overlay.dtbo).

When I examine the difference, it seems that the difference in the following panel_lvds settings leads to the difference in the successful generation of card2-LVDS-1.
I am not sure why, but I would like to believe that we now have two systems, MIPI-DSI and LVDS, which is what we want to do.

&backlight_mezzanine {
	status = "okay";
};

&gpu_2d {
	status = "okay";
};

&gpu_3d {
	status = "okay";
};

&lcdif2 {
	status = "okay";
};

&ldb {
	status = "okay";
};

&ldb_phy {
	status = "okay";
};

&mix_gpu_ml {
	status = "okay";
};

&ml_vipsi {
	status = "okay";
};

&panel_lvds {
	backlight = <&backlight_mezzanine>;
	data-mapping = "jeida-18";
	height-mm = <194>;
	width-mm = <345>;
	status = "okay";

	panel-timing {
		clock-frequency = <138500000>;
		hactive = <1920>;
		hback-porch = <40>;
		hfront-porch = <24>;
		hsync-len = <16>;
		pixelclk-active = <0>;
		vactive = <1080>;
		vback-porch = <23>;
		vfront-porch = <3>;
		vsync-len = <5>;
	};
};

&pwm2 {
	status = "okay";
};

In this version, I thought palel_lvds was native LVDS, am I wrong?

I see you’re using the older kernel. In that case apologies you are correct panel_lvds is the correct node for native LVDS in this version of the kernel.

So I just did a test with our 10’’ LVDS display. I applied the following overlays:

verdin-imx8mp_mezzanine-lvds-single-channel_overlay.dtbo display-lt170410_overlay.dtbo

The display works and I see:

/sys/class/drm/card0-LVDS-1

That tells me these overlays and the changes within them are good. Now the question is why this isn’t working for you?

At this point the only difference between our display and your display could be the following:

  • Display timing values
  • Single channel versus dual channel LVDS. Is your display dual channel?
  • Hardware
    • Perhaps the display is faulty?
    • Or there’s an issue with the hardware connection?
    • Are you using a custom carrier board?

It has to be some difference between my setup and yours since the device tree changes should be good as I just tested.

Best Regards,
Jeremias

Thanks for the advice, @jeremias.tx.

It seems that the setting of panel_lvds was not good.
By doing the following, it now works.
Thanks for your help.


&panel_lvds {
	backlight = <&backlight_mezzanine>;
	data-mapping = "vesa-24";
	height-mm = <134>;
	width-mm = <181>;
	status = "okay";

	panel-timing {
		clock-frequency = <37125000>;
		hactive = <1280>;
		hback-porch = <30>;
		hfront-porch = <332>;
		hsync-len = <8>;
		pixelclk-active = <0>;
		vactive = <720>;
		vback-porch = <2>;
		vfront-porch = <27>;
		vsync-len = <1>;
	};
};

Glad I was able to help!