FDT_ERR_NOTFOUND Error DTB Verdin iMX8MM

Hi everyone,

I’m encountering an issue while trying to apply the overlay verdin-imx8mm_dsi-to-hdmi_overlay.dtbo on my Verdin development board V1.1F. Here are the steps and the error message I receive:

Applying Overlay: verdin-imx8mm_dsi-to-hdmi_overlay.dtbo
2317 bytes read in 2 ms (1.1 MiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
  • Board: Verdin development board V1.1F
  • DTB Source: toradex-linux-5.15.2.2.x
  • Verdin iMX8MM

It seems that the error occurs during the application of the Device Tree Overlay. If I remove the dtbo from the overlays.txt it boot perfect.

Has anyone faced a similar issue or can provide guidance on how to resolve this?

Thank you.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The FDT_ERR_NOTFOUND error you’re encountering when applying the verdin-imx8mm_dsi-to-hdmi_overlay.dtbo suggests that the base Device Tree Blob (DTB) does not have the required nodes or labels that the overlay expects to modify or append to. This can happen for several reasons:

  1. Mismatch Between Overlay and Base DTB: Ensure that the overlay is compatible with the base DTB version you are using. Overlays depend on specific nodes and labels being present in the base DTB. If the base DTB structure has changed (due to a different kernel version or modifications), the overlay may not apply correctly.

  2. Incorrect Overlay File: Verify that the verdin-imx8mm_dsi-to-hdmi_overlay.dtbo is intended for use with your specific version of the Verdin iMX8MM module and the Toradex Linux version you are running. It’s possible that the overlay is meant for a different hardware revision or software version.

  3. Base DTB Not Configured for Overlays: Some base DTBs need to be specifically prepared to support overlays, including having certain placeholders or labels. Ensure your base DTB is configured to support overlays.

  4. Corrupted Overlay or Base DTB File: The overlay or base DTB file might be corrupted. Try recompiling the overlay or using a fresh copy of the base DTB to rule out file corruption.

To troubleshoot and resolve this issue, you can:

  • Check Compatibility: Ensure that both the base DTB and the overlay are compatible with each other and with your hardware version. This might involve checking the documentation or release notes for your specific Toradex Linux version to ensure compatibility.

  • Inspect the Base DTB and Overlay: Use tools like fdtdump to inspect the base DTB and the overlay DTBO file. Look for the nodes and labels that the overlay attempts to modify or add to ensure they are present in the base DTB.

  • Update Your Environment: If you’re not already using the latest version of the Toradex Linux and the overlays, consider updating. It’s possible that compatibility issues have been resolved in newer versions.

  • Recompile the Overlay: If you have the source for the overlay, try recompiling it against the DTB source for the version of the kernel you are using. This ensures that the overlay is correctly matched to the base DTB structure.

If after these steps the issue persists

Please, also check if these links can help you solve your problem:

TorizonCore Builder Tool - Commands Manual | Toradex Developer Center.

Hi @Frank ,

Normally this issue happens when mismatching the kernel branch with the device-tree-overlays branch.

In your case, you mentioned that you are using the branch toradex_5.15-2.2.x-imx for the device-trees repository. In this case, you should use the Torizon 6 as a base image. Can you verify it, please?

I made a small test on my side and was able to apply this overlay using the below data on the tcbuild.yaml:

input:
  easy-installer:
    local: torizon-core-docker-verdin-imx8mm-Tezi_6.5.0+build.8.tar
customization:
  device-tree:
    include-dirs:
      - linux/include
    custom: linux/arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dts
    overlays:
      clear: true
      add:
        - device-trees/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts
output:
  easy-installer:
    local: output_directory

Below are the used kernel and device-trees repositories branches:

daniel (linux) $ git branch
* remotes/origin/toradex_5.15-2.2.x-imx
daniel (device-trees) $ git branch
* toradex_5.15-2.2.x-imx

Please let me know if you have any issues.

Best regards,
Daniel Morais

Hi @daniel_m.tx!

Thank you for the response!

Just to clarify, do I need to make any changes to my DTB? I am compiling the kernel and U-Boot from scratch and using the DTB that comes with toradex_5.15-2.2.x-imx.

Additionally, I am using Toradex easy installer (Download Toradex Easy Installer | Toradex Developer Center) as a guide for my project. I compiled everything from scratch based on this. However, I noticed that the DTB from the Toradex Easy Installer is different from the one in toradex_5.15-2.2.x-imx. When I compile my project with the DTB from the Toradex Easy Installer, it works. But when I try to apply the overlay using the DTB from toradex_5.15-2.2.x-imx, it fails.

Best regards,
Frank

Hi @Frank ,

It depends, you can see here the changes the overlay verdin-imx8mp_dsi-to-hdmi_overlay.dts on the branch toradex_5.15-2.2.x-imx does, you have to make sure that all these nodes mentions exist inside your base dtb.

Can you please share the steps you are executing to build your image? In this case, you are building your entire image based on Toradex Easy Installer image?

Best regards,
Daniel Morais

Here are the steps I am following to build my image:

I used the Toradex Easy Installer as a guide for my project.

  • Compile Kernel and U-Boot:

I compile the kernel from scratch using the toradex_5.15-2.2.x-imx branch.
Also, I compile U-Boot from scratch too.

  • Device Tree:

I use the DTB provided in the toradex_5.15-2.2.x-imx branch.
Apply Overlay:

When applying the verdin-imx8mm_dsi-to-hdmi_overlay.dtbo overlay, I encounter the FDT_ERR_NOTFOUND error.

That’s the part where I get lost. I don’t understand why I should make changes to the DTB. Shouldn’t it already come pre-loaded with those nodes? Or do the DTBs inside toradex_5.15-2.2.x-imx not come with those nodes? I’m running Buildroot on my Verdin IMX8MM.

And yes, I decompiled the DTB and it doesn’t reference the nodes mentioned in the overlay.
Could you please provide more on how to add those nodes?

Thank you for your assistance!

Best regards,
Frank

Hi @Frank ,

Thanks for the explanation! Now things are clearer.

The issue you are facing is still strange to me since you are using the same branches, we expect that all the nodes should exist in this file or in this file.

Since you are building using Buildroot and some components from scratch, you can check the two files above if every node mentioned in the overlay exists.

Another alternative is, since you are already building the kernel from scratch, you can insert all the changes into your device tree and not use an overlay. I prepared a patch that does all the necessary modifications so you can base yourself on it, you can download it below:
verdin-imx8mm_dsi-to-hdmi_overlay_changes-on-tree.patch (4.2 KB)

Can you please try what is mentioned above and check if your problem is solved?

Best regards,
Daniel Morais

Hi @daniel_m.tx

First I want to thank you for your time and your help.
I tried applying the patch and recompiling the DTB, but it didn’t change anything. Additionally, I attempted to compile the imx8mm-verdin-wifi-dev.dts from scratch (which includes imx8mm-verdin.dtsi, imx8mm-verdin-wifi.dtsi, and imx8mm-verdin-dev.dtsi). However, when I decompile it, the nodes I need are not present, even though they are defined in the included .dtsi files.

Here’s what I did step-by-step:

  1. Took the DTS from toradex_5.15-2.2.x-imx and compiled it into a DTB.
  2. Applied the verdin-imx8mm_dsi-to-hdmi_overlay.dtbo.
  3. Encountered the error failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND.
  4. Decompiled the DTB and found that none of the necessary nodes were present to reference my DTBO.
  5. Tried manually adding those nodes into my DTS, but encountered multiple errors, not just with GPIOs.

I have two main questions:

  1. How should I modify my decompiled DTS to be able to correctly apply the DTBO? Are there specific changes or nodes that need to be present?
  2. When decompiling with the dtc tool, should I be able to see the entire DTS, including all included .dtsi files, or might I be missing something?

I am not sure what I am doing wrong, as the nodes I need are present in the .dtsi files I included.

Best regards,
Frank

Hi @Frank ,

About these questions, what you are doing is a bit different from our normal perspective when building a device tree blob. I don’t see decompiling with the dtc tool as an elegant approach because you can face issues when maintaining it over time. The best approach here is compiling all the dtb and dtbo from the source inside a kernel repository, in this way you can manage the source code, and maintain and update it over time.

I suggest we take some steps back and try to compile the device tree and device tree overlays in another way, and check if you will still face the same issues.

For the device tree, I recommend you compile it following this article alongside with the kernel, on this specific topic you can see the commands to execute.

For the device tree overlay, you can check this article which explains how we normally do it, you can see that we use the STAGING_KERNEL_DIR pointing to the same kernel repository you built your .dtb, which would probably minimize the issues.

Can you please try this approach and check if it solves the issue?

Best regards,
Daniel Morais

Hi @daniel_m.tx!
Thanks for your answer! I was able to compile my DTB with all the necessary modules. However, I’m currently encountering an error when I try to use the bridge. I have to load imx-sdma as a module with modprobe because if I don’t load it as a module, it throws an error. Here’s the error log:

# modprobe imx-sdma
[  330.370071] imx-sdma 302c0000.dma-controller: firmware found.
[  330.376284] imx-sdma 302c0000.dma-controller: loaded firmware 4.6
[  330.386366] imx-drm 32c00000.bus:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[  330.395357] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[  330.395724] imx-sdma 302b0000.dma-controller: firmware found.
[  330.402609] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -517
[  330.419826] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[  330.420352] imx-sdma 30bd0000.dma-controller: firmware found.
[  330.428136] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
[  330.432941] imx-drm 32c00000.bus:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[  330.450721] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[  330.457823] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -517
[  330.469598] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[  330.477898] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517
# [  330.491390] imx-drm 32c00000.bus:display-subsystem: bound imx-lcdif-crtc.0 (ops lcdif_crtc_ops)
[  330.500307] imx_sec_dsim_drv 32e10000.mipi_dsi: version number is 0x1060200
[  330.507332] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -517
[  330.519102] imx_sec_dsim_drv 32e10000.mipi_dsi: Failed to attach bridge: 32e10000.mipi_dsi
[  330.527383] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -517

I’m not sure where to start looking for this issue. I’ve tried searching the forums, but I haven’t found anyone who has faced this error. Any advice would be greatly appreciated.

Regards,
Frank

I was able to fix it, thank you @daniel_m.tx for your help!

Regards,
Frank