Torizon: LVDS and device tree overlay does not apply panel-timings

Hi colleagues!

I have a correct custom image (Apalis iMX6) with updated core + device tree and it works fine with 2 LVDS displays. I would like to check new features with Torizon and I tried to activate my LVDS overlay but without success.

Device tree modifications used in my previous custom image:

&clks {
	fsl,ldb-di0-parent = <&clks IMX6QDL_CLK_MMDC_CH1_AXI>; // 528 MHz, separate from HDMI clock parent (PLL5)
	fsl,ldb-di1-parent = <&clks IMX6QDL_CLK_MMDC_CH1_AXI>;
};

&ldb {
	ipu_id = <1>; /* IPU numbers start from 0 here */
	
	lvds-channel@0 {
		fsl,data-width = <24>;
		disp_id = <0>;
		crtc = "ipu2-di0"; /* IPU numbers start from 1 here */
		display-timings {
		
			/* Ampire AM-1280800P2TZQW-00H */
		timing_wxga: 1280x800 {
				clock-frequency = <75428571>; // 528/7
				hactive = <1280>;
				vactive = <800>;
				hback-porch = <5>;
				hfront-porch = <121>;
				vback-porch = <2>;
				vfront-porch = <90>;
				hsync-len = <1>;
				vsync-len = <1>;
				hsync-active = <0>;
				vsync-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
	
	lvds-channel@1 {
		fsl,data-width = <24>;
		disp_id = <1>;
		crtc = "ipu2-di1"; /* IPU numbers start from 1 here */
		display-timings {
		
			/* NLT Technologies NL12880AC20-14D */
			timing_wxga12: 1280x800 {
				clock-frequency = <75428571>; // 528/7
				hactive = <1280>;
				vactive = <800>;
				hback-porch = <5>;
				hfront-porch = <121>;
				vback-porch = <2>;
				vfront-porch = <90>;
				hsync-len = <1>;
				vsync-len = <1>;
				hsync-active = <0>;
				vsync-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
};

Steps I did:

  1. installed Torizon 5, started Docker container with developer tools
  2. Activated LVDS overlay (apalis-imx6-lvds-overlay.dts)
  3. Activated my overlay

apalis-additional-overlay.dts

/dts-v1/;
 /plugin/; 
 / {
     compatible = "toradex,apalis_imx6q";
      fragment@0 {
         target-path="/panel-lvds";
         __overlay__ {
             status = "okay";
             data-mapping = "vesa-24";
             width-mm = <193>;
             height-mm = <130>;
             panel-timing {
				clock-frequency = <75428571>; 
				hactive = <1280>;
				vactive = <800>;
				hback-porch = <5>;
				hfront-porch = <121>;
				vback-porch = <2>;
				vfront-porch = <90>;
				hsync-len = <1>;
				vsync-len = <1>;
				hsync-active = <0>;
				vsync-active = <0>;
				pixelclk-active = <0>;
             };
         };
     };
 };

and checked that these overlays were applied ok.

After the system was restarted I checked dmesg:

apalis-imx6-05186757:~$ dmesg | grep fb                                                                                                                                                                                                                                                                     
[    0.000000] Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash ostree=/ostree/boot.1/torizon/f46c3c780ebf0456b2908b6e7325693465a4f7c37df2d25fd65fb5ab88853ef1/0
[    1.795921] imx-drm display-subsystem: fb0: imx-drmdrmfb frame buffer device

But, when I called “fbset” there were no timings and frequencies:

apalis-imx6-05186757:~$ sudo fbset                                                                                                                                                                                                                                                                          
Password:                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                            
mode "1280x800-0"                                                                                                                                                                                                                                                                                           
        # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz                                                                                                                                                                                                                                                           
        geometry 1280 800 1920 1080 16                                                                                                                                                                                                                                                                      
        timings 0 0 0 0 0 0 0                                                                                                                                                                                                                                                                               
        accel true                                                                                                                                                                                                                                                                                          
        rgba 5/11,6/5,5/0,0/0                                                                                                                                                                                                                                                                               
endmode  

Could you please what is wrong with my overlay?
Thanks!

Greetings @ivank

Just to clarify do your LVDS displays also not work then after applying the overlays? Or is it just a matter of fbset not showing the full timings?

Just for reference your overlay is fairly similar to our pre-provided LVDS overlay here: device-tree-overlays/display-lt170410-overlay.dts at toradex_5.4.y · toradex/device-tree-overlays · GitHub

So I think your overlay is fine.

As for the fbset timings I tested our overlay on both Torizon 4.0 and 5.0 and in both versions fbset always had 0 for all the timings. Meaning I think it was always like this then, not sure why as this is the first time it’s been pointed out to me. Otherwise our LVDS overlay is known to work on 4.0, not sure if it has been tested on 5.0 yet. But there should be little to no kernel difference between 4.0 and 5.0 on the i.MX6 at this point.

So I guess back to my earlier question, could you clarify if your LVDS displays work or not with your overlay then?

Best Regards,
Jeremias

Hi Jeremias,
Thanks for your reply.

could you clarify if your LVDS displays work or not with your overlay then?

No, there is no anything on LVDS displays. I thought they should duplicate the same output to HDMI, but I it is not so. I can tune Torizon containers by web-interface only by HDMI output. Perhaps, I missed some additional settings to enable LVDS displays…
I would be grateful for any advice!

Thanks,
Ivan

Hi @ivank,

Please send the output of “dtconf status” being executed from Torizon 5, at Docker container with developer tools.

Best regards,
André Curvello

 apalis-imx6-05186757:~$ docker run -it --rm --privileged -v /dev:/dev -v /boot:/boot torizon/arm32v7-debian-dev-tools
 root@3e6df065f317:/# dtconf status
 Device is apalis imx6(0027)
 Mounting /mnt/part
 Currently active overlays:
 apalis-imx6-lvds-overlay.dts.dtbo
 LVDS_display-Ampire-6-overlay.dts.dtbo
 Available base device trees:
         imx6q-apalis-eval.dtb
         imx6q-apalis-ixora-v1.1.dtb
 Available overlays for running kernel:
         apalis-imx6-atmel-mxt-overlay.dts:
                 Atmel MXT touchscreen for the 7inch and 10inch display orderable at Toradex.
         apalis-imx6-lvds-overlay.dts:
                 Enable the LVDS interface on the Apalis iMX6Q. Make sure to also select a valid display configuration.
         apalis-imx6-parallel-rgb-overlay.dts:
                 Enable the parallel RGB interface on the Apalis iMX6Q. Make sure to also select a valid display configuration.
         display-edt5.7-overlay.dts:
                 EDT5.7 display with a resolution of 640x480 pixel
         display-edt7-overlay.dts:
                 EDT7 display with a resolution of 800x480 pixel
         display-lt161010-overlay.dts:
                 LT161010 display (7inch) with a resolution of 800x480 pixel. This display can be ordered at Toradex.
         display-lt170410-overlay.dts:
                 LT170410 display (10inch) with a resolution of 1280x800 pixel. This display can be ordered at Toradex.

LVDS_display-Ampire-6-overlay.dts.dtbo
is the same file “apalis-additional-overlay.dts” from my first question.

Best Regards,
Ivan

Is this the datasheet for your LVDS display? http://www.ampdisplay.com/documents/pdf/AM-1280800P2TZQW-00H.pdf

If not could you share where you got your timing numbers from. Also are you trying to use 1 or 2 LVDS displays on Torizon. The overlay you’re trying to apply will only enable 1 LVDS display I believe, additional changes are needed for 2 displays.

Finally it was a little unclear to me, but when you did the original device tree modifications where this worked. Was that also on Torizon or our non-Torizon BSP?

Best Regards,
Jeremias