Can't attach overlay

Hi,

I’m trying to attach overlay to my custom image. I have colibri-imx6_800x600_overlay.dts which I compile to colibri-imx6_800x600_overlay.dtbo

colibri-imx6_800x600_overlay.dts (424 Bytes)

I insert to /boot/overlays and I adapt overlay.txt into:
fdt_overlays=colibri-imx6_vga-640x480_overlay.dtbo colibri-imx6_800x600_overlay.dtbo

I have one version of colibri-imx6_800x600_overlay.dtbo which works and change resolotion of screen, but since I change this files on multiple ways I lost the working content.
So my question is what is wrong with my colibri-imx6_800x600_overlay.dts that after I change overlay.txt the boot process hangs with error:

Applying Overlay: colibri-imx6_vga-640x480_overlay.dtbo
1364 bytes read in 1 ms (1.3 MiB/s)
Applying Overlay: colibri-imx6_800x600_overlay.dtbo
471 bytes read in 1 ms (460 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
8079208 bytes read in 218 ms (35.3 MiB/s)
Bootargs: root=PARTUUID=327179e7-02 ro rootwait console=ttymxc0,115200
Kernel image @ 0x14200000 \[ 0x000000 - 0x7b4768 \]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
Booting from mmc failed!
SCRIPT FAILED: continuing…

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Troubleshooting Your Device Tree Overlay Issue

The error failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND indicates that your overlay is trying to reference a device tree node that doesn’t exist in the base device tree(1). This is a common issue when creating custom overlays.

Common Causes and Solutions

1. Check Node References

Your overlay must reference nodes that exist in the base device tree(1). The error suggests your overlay is trying to modify a node that can’t be found.

2. Verify Compatible String

Ensure your overlay’s compatible string matches your hardware platform(2). For Colibri iMX6, it should be:

/ {
    compatible = "toradex,colibri_imx6dl-eval-v3";
};

(2)

3. Check Pin References

Make sure you’re using the correct pin definitions. For Colibri iMX6, you need to include the proper header file(2):

#include "linux/arch/arm/boot/dts/nxp/imx/imx6dl-pinfunc.h"

(2)

Recommended Debugging Steps

  1. Use Existing Overlays as Reference
    Start with a working overlay and modify it gradually(3). You can find compatible overlays using:

    $ torizoncore-builder dto list --device-tree ./linux/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
    

    (3)

  2. Validate Your Overlay Structure
    A proper overlay should follow this template(1):

    /dts-v1/;
    /plugin/;
    
    #include <soc-pinfunc.h>
    
    / {
        compatible = "toradex,colibri_imx6dl-eval-v3";
    };
    
    &iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_my_pins>;
        
        pinctrl_my_pins: my_muxgrp {
            fsl,pins = <
                PIN_NAME_PIN_MUX   PAD_CTRL
            >;
        };
    };
    

    (1)

  3. Check Available Overlays
    For Colibri iMX6, you can see available overlays that work with your device tree(3):

    $ find linux -name "*imx6dl-colibri*.dts"
    

    (3)

Development Workflow

For testing and development, you can use TorizonCore Builder’s dto command for compilation and validation(1):

$ torizoncore-builder dto apply custom-overlay.dts

(1)

For production, use the build command with a tcbuild.yaml configuration(3):

customization:
  device-tree:
    include-dirs:
      - linux/include
    custom: linux/arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
    overlays:
      add:
        - device-trees/overlays/colibri-imx6_800x600_overlay.dts

(3)

Next Steps

Since you mentioned you had a working version, I recommend:

  1. Compare your current overlay with the working Toradex-provided overlays(3)
  2. Ensure all referenced nodes exist in the base device tree
  3. Validate the compatible string matches your hardware configuration
  4. Test incrementally by starting with minimal changes

The most common issue is referencing nodes that don’t exist in the target device tree, so focus on verifying all your node references are correct(1).

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi @medicalSpark,

Do you need both the overlays (colibri-imx6_vga-640x480_overlay.dtbo and colibri-imx6_800x600_overlay.dtbo) enabled at the same time? If you are trying to just adjust the resolution of the VGA display to 800x600, why don’t you modify the colibri-imx6_vga-640x480_overlay file (by adding the panel timings and backlight values as you want) instead of creating a new one? It should look something like this:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

// Enable the parallel RGB interface on the Colibri iMX6 and the
// video DAC providing analog RGB on the VGA connector.

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "colibri-imx6_parallel-rgb_overlay.dtsi"
#include "display-vga-640x480_overlay.dtsi"

/dts-v1/;
/plugin/;

/ {
        compatible = "toradex,colibri_imx6dl";
};

&backlight {
    pwms = <&pwm3 0 5000000 1>;
    brightness-levels = <0 90 140 180 200 220 236 248>;
    default-brightness-level = <6>;
    status = "okay";
};

&panel_dpi {
	compatible = "panel-dpi";
	status = "okay";

	/* for 0.3mm pixels */
	width-mm = <192>;
	height-mm = <144>;

	panel-timing {
		hactive = <800>;
		vactive = <600>;

	 };
};

I think the error you are seeing right now is due to missing include files in your new overlay. I would suggest testing the one I posted above and then creating the new overlay and include files with the right names.

Hi Rudhi and others,

thank you very much for your help. It work this part now, but I want to have complete working overlay before closing the topic. I also follow your tip regarding two overlays and I change in colibri-imx6.inc

from:
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:use-mainline-bsp = "
colibri-imx6_vga-640x480_overlay.dtbo
"
to
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:use-mainline-bsp = "
colibri-imx6_800x600_overlay-standAlone.dtbo
"
is this correct approach?

Second I would like to change strength of LCD pins. Here is my overlay:

colibri-imx6_800x600_overlay-standAlone.dts (2.2 KB)

I also try this:
&{/soc/bus@2000000/pinctrl@20e0000} {
ipu1lcdifgrp {
fsl,pins = <…

and this:
&pinctrl_ipu1_lcdif {
ipu1_lcdif_pins: ipu1-lcdif-pins {
fsl,pins = <

but when I check pins with command: **hexdump -C /proc/device-tree/soc/bus@2000000/pinctrl@20e0000/ipu1lcdifgrp/fsl,pins
it’s allways shows its original state.

Thank you for all your help.

If I insert in overlay:

&iomuxc {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_ipu1_lcdif_strength>;
pinctrl_ipu1_lcdif_strength: ipu1lcdifgrp {
fsl,pins = <
MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x58
MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x08
MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x08
MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x08
MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x08
MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x08
MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x08
MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x08
MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x08
MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x08
MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x08
MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x08
MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x08
MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x08
MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x08
MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x08
MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x08
MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x08
MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x08
MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x08
MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x08
MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x08

;
};
};

Than pins are setted correctly, but than framebuffer won’t start. I get boot error:
imx-parallel-display disp0: prop pinctrl-0 index 0 invalid phandle

this solution should also work:

/ 1. STEP : define new group pinctrl inside of iomuxc /*
&iomuxc {
pinctrl_for_rgb_LCD: test_rgb_LCD {
fsl,pins = <
MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x58
MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x08
MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x08
MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x08
MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x08
MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x08
MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x08
MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x08
MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x08
MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x08
MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x08
MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x08
MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x08
MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x08
MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x08
MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x08
MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x08
MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x08
MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x08
MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x08
MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x08
MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x08

;
};
};
/* 2. STEP
&ipu1_di0_disp0 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_for_rgb_LCD>;
status = “okay”;
};

There is no error, but register value also doesn’t change :frowning:

this is my final overlay which works:


/*
 * Copyright 2022 Toradex
 */

/* Enable the parallel RGB interface on the Colibri iMX6 and the
 video DAC providing analog RGB on the VGA connector.
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <imx6dl-pinfunc.h>

/dts-v1/;
/plugin/;

/ {
        compatible = "toradex,colibri_imx6dl";
};

&pinctrl_ipu1_lcdif {
    fsl,pins = <
        MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x58
        MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15      0x08
        MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02       0x08
        MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03       0x08
        MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00  0x08
        MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01  0x08
        MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02  0x08
        MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03  0x08
        MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04  0x08
        MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05  0x08
        MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06  0x08
        MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07  0x08
        MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08  0x08
        MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09  0x08
        MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x08
        MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x08
        MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x08
        MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x08
        MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x08
        MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x08
        MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x08
        MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x08
    >;
};

&backlight {
    pwms = <&pwm3 0 5000000 0>;
    brightness-levels = <0 90 140 180 200 220 236 248>;
    default-brightness-level = <6>;
    status = "okay";
};

&lcd_display {
	/* use the bus-format as specified from the panel */
	interface-pix-fmt = "";
	status = "okay";
};

&pwm3 {
	status = "okay";
};

#include "display-vga-640x480_overlay.dtsi"

&panel_dpi {
	data-mapping = "bgr666";
	status = "okay";
	compatible = "panel-dpi";

	/* for 0.3mm pixels */
	width-mm = <192>;
	height-mm = <144>;

	panel-timing {
		hactive = <800>;
		vactive = <600>;
		hsync-len = <96>;
		hfront-porch = <16>;
		hback-porch = <48>;
		vsync-len = <2>;
		vfront-porch = <10>;
		vback-porch = <33>;
		hsync-active = <0>;
		vsync-active = <0>;
		pixelclk-active = <0>;		
	 };	
};

if I don’t include #include “display-vga-640x480_overlay.dtsi” than overlay doesn’t work I don’t why maybe some dependencies.