Creating a Custom Device Tree for U-Boot with Yocto
Based on your boot log showing repeated I2C timeout errors, you need to create a custom device tree to disable the unused I2C buses. Here’s how to do this using the Toradex Yocto build system:
1. Create a Custom Meta Layer
First, create your own meta layer for customizations(1):
# Run `. export` or `source setup-environment` when building Torizon OS
$ . export # will take you to the `build` directory
$ bitbake-layers create-layer ../layers/meta-customer # inside the build directory
(1)
2. Set Up Device Tree Customization Structure
Create the necessary directory structure for your device tree customization(1):
$ cd ../layers/meta-customer/
$ mkdir -p recipes-bsp/u-boot
(1)
3. Create U-Boot Recipe Append
For the Verdin AM62, create a U-Boot append file(1):
touch recipes-bsp/u-boot/u-boot-toradex_%.bbappend
(1)
4. Add Your Custom Device Tree
The .bbappend contents should include your custom device tree modifications(1):
do_configure:append() {
# Remove exisiting fdtfile, if there is one
sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h
# Add new fdtfile, "my-custom-devicetree.dtb" should be replaced with your device tree binary file
sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n "fdtfile=my-custom-devicetree.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h
}
(1)
5. Create Custom Device Tree File
Create your custom device tree that disables the unused I2C buses. For the AM62, create a file like k3-am625-verdin-wifi-dev-custom.dts(1):
/dts-v1/;
#include <dt-bindings/pwm/pwm.h>
#include "k3-am625-verdin-wifi-dev.dts"
/ {
model = "Customer Carrier Board with Toradex Verdin AM62";
compatible = "customer,verdin_am62",
"toradex,verdin-am62-wifi",
"toradex,verdin_am62",
"ti,am625";
};
&i2c3 {
status = "disabled";
};
&i2c4 {
status = "disabled";
};
(1)
6. Add Device Tree to Build Configuration
You need to add the device tree file to the variable KERNEL_DEVICETREE(1). Create a machine-specific configuration file:
KERNEL_DEVICETREE:append = " ti/k3-am625-verdin-wifi-dev-custom.dtb"
(1)
Include this in your conf/layer.conf file(1):
include conf/machine/verdin-am62-extra.conf
(1)
7. Configure U-Boot Environment Variable
The U-Boot uses the fdtfile variable to determine which device tree to load(2). You can modify this through the U-Boot environment or by customizing the U-Boot configuration(2).
8. Build Your Custom Image
After setting up your custom meta layer, build your image(3):
$ bitbake <your-image-name>
(3)
This approach will create a custom device tree that disables the unused I2C buses, eliminating the timeout errors you’re seeing during U-Boot initialization on your custom carrier board.
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.