Device tree basics
Typically, <.dtsi> file contain definitions of SoC-level information.
The <.dts> file contains board-level information.
Using device tree compiler
sudo apt install -y device-tree-compiler
Check nodes and properties
/proc/device-tree/ and / node of a device tree source(DTS) are the same.
If a DTS is
/ {
model = "A";
}
The structure of /proc/device-tree/ is as follows.
/proc/device-tree
└── model
$ cat /proc/device-tree
A
So, you can check DTS with one of the following commands.
tree /proc/device-tree
fdtdump <.dtb file name> | vim -
DTS modification
fdtget/fdtput
fdtget <.dtb> <node> <property>
fdtput -t <type> <.dtb> <node> <property> <value>
- type
- s=string, i=int, u=unsigned, x=hex
- Optional modifier prefix: hh or b=byte, h=2 byte, l=4 byte (default)