Apalis iMX8 LVDS device tree overlays

Hi, I’ve added a device tree overlay to be compiled with BSP 5. The device tree is compiled and applied in the image successfully, however it still does not appear to work with my display. Before iMX8’s required BSP 5 I created entire device trees in yocto that just included the dtsi’s and made the changes necessary which worked fine. I’m not sure what I’m doing wrong or how to debug so here’s the previous device tree I used that worked for this display.

/dts-v1/;

#include "fsl-imx8qm-apalis.dtsi"
#include "fsl-imx8qm-apalis-eval.dtsi"

/ {
    model = "Toradex Apalis iMX8QM/QP on Apalis Evaluation Board";
    compatible = "toradex,apalis-imx8qm-eval", "toradex,apalis-imx8qm", "fsl,imx8qm";
    /delete-node/ lvds1_panel;
};
&ldb2 {
    status = "okay";
    lvds-channel@0 {
    fsl,data-width = <24>;
    /delete-node/ port@1;
    display-timings {
        native-mode = <&timing_agilas>;
        timing_agilas: 1024x768 {
            clock-frequency = <65000000>;
            hactive = <1024>;
            vactive = <768>;
            hback-porch = <160>;
            hfront-porch = <24>;
            vback-porch = <29>;
            vfront-porch = <3>;
            hsync-len = <136>;
            vsync-len = <6>;
            hsync-active = <0>;
            vsync-active = <0>;
            pixelclk-active = <0>;
        };
    };
};
    lvds-channel@1 {
        status = "disabled";
    };
};

Here is the dtbo I’m attempting to use

/dts-v1/;
/plugin/;

/ {
    compatible = "toradex,apalis_imx6q",
                 "toradex,apalis-imx8",
                 "toradex,apalis-imx8x";
};

&ldb2 {
    status = "okay";
    lvds-channel@1 {
            status = "disabled";
    };
};

&{/panel-lvds} {
    status = "okay";

    data-width = "vesa-24";
    width-mm = <210>;
    height-mm = <158>;
    panel-timing {
            clock-frequency = <65000000>;
            hactive = <1024>;
            vactive = <768>;
            hback-porch = <160>;
            hfront-porch = <24>;
            vback-porch = <29>;
            vfront-porch = <3>;
            hsync-len = <136>;
            vsync-len = <6>;
            hsync-active = <0>;
            vsync-active = <0>;
            pixelclk-active = <0>;
    };
};

I currently have apalis-imx8_lvds_overlay.dtbo and my own dtbo within overlays.txt
It looks like this fdt_overlays=apalis-imx8_lvds_overlay.dtbo agilas-screen-overlay.dtbo

Greetings @matthewh628,

You don’t need to create your own overlay from scratch for LVDS you can just use our pre-made ones here: overlays - device-tree-overlays.git - Sources for Device Tree Overlays

Then you can just slightly modify it to apply your own timings. Furthermore on 5.X BSP these overlays should be pre-compiled on the device in /boot/overlays.

By the way what specific version of 5.X BSP are you working on?

Best Regards,
Jeremias

Hi @jeremias.tx,

I’ve tested with using your pre-made ones along with greeting my own however neither seems to work. I created another question here thinking it may not be a device tree issue however I’m not sure.

I’m not entirely sure how to answer what exact version I’m working on. I get the repo via repo init -u https://git.toradex.com/toradex-manifest.git -b dunfell-5.x.y -m tdxref/default.xml. Lemme know how I can better answer your question

I’m going to delete your other question. Let’s keep the conversation focused here on this thread.

You can list the exact BSP version your device is running by running cat /etc/os-release on your device.

Can you list what overlays you currently have applied?

Also can you make sure the overlays are actually being applied. When you boot the device during the boot messages there should be messages listing what overlays are being applied on boot.

By the way have you done any other kinds of alterations/modifications to the base OS image?

Finally can you check for any messages relating to ldb or panel-lvds in dmesg.

I will say that the pre-made overlays provided by us for LVDS should work. I currently have an Apalis i.MX8 using these overlays and the attached LVDS display is working. The exact timings will probably differ for your display, but the main LVDS interface should be working with these overlays.

Best Regards,
Jeremias

I’m running TDX Wayland with XWayland 5.3.0-devel-20210512231746+build.0 (dunfell).
I just attempted to use the multimedia base image however that also did not work so I’ll revert back.
The overlays I have applied at the moment is the exact overlay I mentioned in the original question. my overlays.txt is as follows fdt_overlays=agilas-screen-overlay.dtbo

The only thing in dmesg I can find is panel-generic panel-lvds: /panel-lvds: invalid or missing data-mapping DT property I’m not entirely sure what that means. However even with the overlays provided by toradex I get an error with drm saying operation is not supported but if the issue truly was just timing related i’d assume the error would either be mode not found for incorrect resolution or no error and the display would just look wrong or not display at all.

After typing all this I attempted to load fdt_overlays=apalis-imx8_lvds_overlay.dtbo display-lt170410_overlay.dtbo as my overlays and that actually does work. Surprisingly the timings were mostly correct for my display, the resolution was just incorrect. Using those two overlays it works and I know get the error from drm I expected which was that it couldn’t find the correct mode.

So I suppose the question is now what am I doing wrong in my overlay for timings.
Thanks

Ah I think I see the issue now in your self-made overlay you have:

data-width = "vesa-24";

But in the Toradex overlay the proper variable name is:

data-mapping = "vesa-24";

The dmesg error was complaining because it couldn’t evaluate your data-width variable.

Best Regards,
Jeremias