Default base DTB file in Yocto build (verdin am62)

Hello Toradex Team,

I’m building a Yocto with the tdx-reference-multimedia-image for the Verdin AM62. How is determined which base DTB is used?

The file layers/meta-toradex-ti/conf/machine/verdin-am62.conf contains all the possible DTBSs like:

KERNEL_DTB_PREFIX = "ti/"
KERNEL_DEVICETREE = " \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-nonwifi-dahlia.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-nonwifi-dev.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-nonwifi-ivy.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-nonwifi-mallow.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-nonwifi-yavia.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-wifi-dahlia.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-wifi-dev.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-wifi-ivy.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-wifi-mallow.dtb \
    ${KERNEL_DTB_PREFIX}k3-am625-verdin-wifi-yavia.dtb \
"

…and the uboot returnes the following:

Verdin AM62 # printenv fdtfile
fdtfile=k3-am625-verdin-nonwifi-dev.dtb

But how is it determined? Where is the code in the yocto structure for that? I just want to understand how the base dtb is selected and how i can modify this if necessary?

Thanks in advance :slight_smile:
Uwe

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello!

For the Verdin AM62, the following device tree binaries are supported:

k3-am625-verdin-wifi-dahlia.dtb
k3-am625-verdin-wifi-dev.dtb  
k3-am625-verdin-wifi-yavia.dtb  
k3-am625-verdin-nonwifi-dahlia.dtb  
k3-am625-verdin-nonwifi-dev.dtb  
k3-am625-verdin-nonwifi-yavia.dtb

The device tree is crucial for platform identification, runtime configuration, and device population. However, specific details on how the default DTB file is selected in the Yocto build system for the Verdin AM62 are not provided in the available documentation.

For modifying device trees, you can utilize device tree overlays. The Verdin AM62 supports several pre-enabled device tree overlays, such as:

verdin-am62_dsi-to-hdmi_overlay.dtbo
verdin-am62_spidev_overlay.dtbo

These overlays allow for customization and extension of the base device tree to suit specific hardware configurations.

If you have any more questions or need further clarification, feel free to ask!

Best regards, Toradex AI Assistant.

Hello AI,

I already read the doku for the overlays and know (in theory) how to use them. But what if my base DTB should be e.g. k3-am625-verdin-wifi-dev.dtb instead of the curretly used one k3-am625-verdin-nonwifi-dev.dtb?

I want to understand how I can modify this?
Depending on the base DTB I may need to use other overlays.

Kind Regard
Uwe

Hello @buw3,

By default, the base device tree is resolved at boot time in u-boot.
If the u-boot variable fdtfile is set in u-boot, it uses that as the device tree, otherwise it resolves the following:

k3-am625-verdin-${variant}-${fdt_board}.dtb

This behavior is configured here: verdin-am62_a53_defconfig « configs - u-boot-toradex.git - U-Boot bootloader for Apalis and Colibri modules

More details about these variables are available here: U-Boot | Toradex Developer Center

Currently there is no logic implemented to detect the carrier board, so it will default to dev.
Where there is some logic is to detect the wifi and nonwifi variants.
If you are using a module with WiFi, the wifi device tree should be loaded.
Otherwise, the nonwifi device tree should be loaded.
If you need to override this logic, the recommended approach is to set the fdtfile to a fixed value in u-boot.

Best Regards,
Bruno