How the exact device tree is selected by u-boot#

Each of the ARM based MSCPlus SOMs is shipped with an U-Boot bootloader that is capable of booting different variants.

The exact variant to be booted, and therefore a matching device tree, is determined using the builtin boardinfo tool.

This tool uses the manufacturing data found in the EEPROM and assembles it to a device tree file name, like shown in the following code snippet for an iMX8-mini board

fdt = env_get("fdt_module");
if (!strcmp(fdt, "undefined")) {
    snprintf(buff, ENV_FDTFILE_MAX_SIZE, "%s-%s-imx8m-mini-%s-module.dtb",
            bi_get_company(binfo), bi_get_form_factor(binfo),
            bi_get_feature(binfo));
    env_set("fdt_module", buff);
}

the individual settings can also be viewed using boardinfo show.

For example this returns

company .......... msc
form factor ...... sm2s
platform ......... imx8mm
processor ........ imx8mm
feature .......... 13N4200I
serial ........... 1009750325
revision (MES) ... C0
boot count ....... 336

so for this particular board msc-sm2s-imx8m-mini-13N4200I-module.dtb would be the exact device tree passed to the kernel.

You can double check by running printenv fdt_module from the U-Boot console.