Hello,
I have a custom carrier board with microusb port for flashing, and I’m attempting to use it in otg mode. For this, according to Adaptation guide I need to modify the device tree.
I’m using Jetson Orin Nano 8GB, Jetpack 6.0 (rev. 1)
My plan is following:
- Decompile current .dtb file into .dts and apply modification
- Compile the modified file back into .dtb
- Use device tree overlay method to apply the new device tree
I’ve identified tegra234-p3768-0000+p3767-0003-nv.dtb located in /rootfs/boot as the main device tree.
I decompiled it into temp.dts with
sudo dtc tegra234-p3768-0000+p3767-0003-nv.dtb -o temp.dts
Added the modification (starting at line 3706):
ports {
usb2-0 {
status = "okay";
mode = "otg";
vbus-supply = <0xe9>;
usb-role-switch;
connector {
compatible = "gpio-usb-b-connector";
label = "micro-USB";
type = "micro";
vbus-gpio = <&gpio TEGRA234_MAIN_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
id-gpio = <&gpio TEGRA234_MAIN_GPIO(H, 0) GPIO_ACTIVE_HIGH>;
};
port {
endpoint {
remote-endpoint = <0xea>;
phandle = <0xf7>;
};
};
};
When I try to compile it back with
sudo dtc temp.dts -o tegra234-p3768-0000+p3767-0003-mod-nv.dtb
I get:
Error: temp.dts:3717.26-27 syntax error
FATAL ERROR: Unable to parse input tree
which indicates an error on this line:
vbus-gpio = <&gpio TEGRA234_MAIN_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
Could you please tell me what I’m doing wrong?