Hi I could not find any similar topic. I am trying to load a custom device tree blob on my Iotgate-IMX8-Plus and cannot seem to find how to do that. The .dtb file I want to use (iot-gate-imx8plus-usbdev.dtb) is already in the boot directory, but I have no idea how to configure the balena os bootloader to load it.
Am I missing something ?
Thanks
Hi @essenlive, the custom device tree support in balenaCloud is only available for a subset of device types and unfortunately the iot-gate-imx8plus
is not currently one of them.
You could of course open a feature request so our product team is aware of the request.
What are the custom changes in the device tree? If they are changes that will benefit the device type as a whole we could consider enhancing the default device tree with this changes, or if they apply to a variant, detect the variant and apply an overlay.
Let us know,
Alex
1 Like
Hi Alex, thank you for your answer !
To be honest, I am not a big expert in terms of device trees. I am trying to use the front usb port of the iotgateIMX8plus to work in USB device mode. From my exchanges with the Compulab Support team, this can be done by loading the iot-gate-imx8plus-usbdev.dtb
file that is already present.
The changes seem rather minimal, this is what returns a diff between iot-gate-imx8plus-usbdev.dts
and iot-gate-imx8plus.dts
:
--- iot-gate-imx8plus-usbdev.dts 2025-05-14 11:29:04.186385954 +0200
+++ iot-gate-imx8plus.dts 2025-05-14 11:28:56.432447135 +0200
@@ -4,7 +4,7 @@
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
- model = "CompuLab IOT-GATE-IMX8PLUS (usbdev)";
+ model = "CompuLab IOT-GATE-IMX8PLUS";
compatible = "compulab,iot-gate-imx8plus\0compulab,ucm-imx8m-plus-som\0fsl,imx8mp";
aliases {
@@ -2496,7 +2496,7 @@
phys = <0x69 0x69>;
phy-names = "usb2-phy\0usb3-phy";
snps,dis-u2-freeclk-exists-quirk;
- dr_mode = "peripheral";
+ dr_mode = "host";
status = "okay";
};
};
Best
Hi, for an individual device, one thing you can try is to modify /mnt/boot/extra_uEnv.txt
to something like:
fdtfile=iot-gate-imx8plus-usbdev.dtb
However, balenaCloud is not currently able to apply this change to a fleet of devices, so if this feature is interesting to you please raise it in the feature request section so our product team takes it into account.
Hi alexgg,
Thanks for the help and sorry for the late reply. I have tried doing so but it did not seem to have an impact, but maybe I modified the wrong file. I’ll look back into it if I have some time.
For information, I found a workaround by using an extra usb to serial converter.
Thanks again
HI @essenlive I did try it myself and it worked for me. U-boot reads that file to load extra environmental variables, and uses the fdfile variable to select which device tree to load. In my case, after modifying that file I could see the new device tree name looking in `/proc/device-tree’ after booting Linux.