iMX8QM LVDS Display Device Tree


I’m trying to configure LVDS output for my custom Yocto build by patching the BSP 5.2.0 kernel device tree. I’ve done this in the past for previous Yocto generations on the iMX6Q without issue, but the documented process for the iMX8 within the current Yocto environment is slightly different.

I generate a patch of the device tree file and include it in my custom Yocto layer as per the standard process. I’ve used the information from here as the guideline for putting the below device tree nodes and properties together. I’ve edited and created the device tree patch from the ‘imx8qm-apalis-eval.dts’ file.

// SPDX-License-Identifier: GPL-2.0+ OR X11
 * Copyright 2019-2020 Toradex


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

/ {
	model = "Toradex Apalis iMX8QM/QP on Apalis Evaluation Board";
	compatible = "toradex,apalis-imx8-eval",

	panel_lvds: panel-lvds {
        	compatible = "panel-lvds";
        	backlight = <&backlight>;
        	data-mapping = "vesa-24";
        	width-mm = <152>;
        	height-mm = <91>;

        	panel-timing {
                	clock-frequency = <33200000>;
                	hactive = <800>;
                	vactive = <480>;
                	hfront-porch = <88>;
                	hback-porch = <40>;
                	hsync-len = <60>;
                	vfront-porch = <23>;
                	vback-porch = <1>;
                	vsync-len = <10>;

                	hsync-active = <0>;
                	vsync-active = <0>;
                	pixelclk-active = <0>;

        	port {
                	panel_lvds_in_custom: endpoint {
                        	remote-endpoint = <&lvds_out_custom>;

&iomuxc {
        apalis-imx8qm {

                //Display Backlight
                pinctrl_gpio_bkl_on: gpio-bkl-on {
                        fsl,pins = <
                                IMX8QM_GPT0_COMPARE_LSIO_GPIO0_IO16	0x00000021

&backlight {
        pinctrl-0 = <&pinctrl_gpio_bkl_on>;
        enable-gpios = <&lsio_gpio0 16 GPIO_ACTIVE_HIGH>;
        default-brightness-level = <4>;
        brightness-levels = <0 45 63 88 119 158 203 255>;
        pwms = <&pwm_lvds1 0 6666667 PWM_POLARITY_INVERTED>;
        status = "okay";

&ldb2 {
        status = "okay";

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

                port@1 {
                        reg = <1>;

                        lvds_out_custom: endpoint {
                                remote-endpoint = <&panel_lvds_in_custom>;

What have I missed or got wrong in the above device tree configuration? Both the panel-timing and carrier board hardware is correct, as I’ve used the same panel-timing configuration on an iMX6Q and confirmed that the LVDS display works perfectly on the same carrier board.

At the moment, the backlight does turn on when the board is powered and using the iMX8QM, but nothing is shown on the display. I’ve tried the various ‘modeset’ commands as outlined here, but no display interfaces are found.

I’ve solved this issue. I made a few minor changes to the device tree (shown above) based on some device tree overlay files I reviewed in the directory. The second issue I picked up, was that the default fdtfile property in the resultant u-boot-initial-env-sd file (part of the TEZI directory output at the end of the build process) was set to the incorrect .dtb file. I changed the fdtfile to the correct device tree binary (based on the patch I had created and used in the build) and the LVDS display worked as intended.

Hello @jars121 ,

Thank you for your feedback. It will help our other community members who have a similar issue. I am glad your issue is solved.

Best Regards,