uart0: serial@1e000000 { compatible = "ns16550a"; reg = <0x1e000000 0x1000>; interrupts = <1>; clock-frequency = <24000000>; current-speed = <115200>; status = "okay"; };
dtc -I dts -O dtb -o myboard.dtb myboard.dts To decompile an existing DTB back to DTS for inspection: dtb firmware
dtc -I dtb -O dts -o extracted.dts myboard.dtb The DTB is typically loaded by the bootloader (U-Boot, barebox, or directly by the kernel). Example U-Boot commands: uart0: serial@1e000000 { compatible = "ns16550a"; reg =
tftp myboard.dtb fdt addr $loadaddr bootz $kernel_addr - $fdt_addr Or when building a Linux kernel with the DTB appended: uart0: serial@1e000000 { compatible = "ns16550a"
cpu@0 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <0>; clock-frequency = <1200000000>; }; };
/dts-v1/; / { model = "MyCustomBoard v1.0"; compatible = "mycompany,myboard"; #address-cells = <1>; #size-cells = <1>;
usb@1e200000 { compatible = "generic-ehci"; reg = <0x1e200000 0x1000>; interrupts = <3>; status = "okay"; }; }; }; Save the .dts file, then use the Device Tree Compiler: