From release V0.9.3-20200814 device tree overlay is enabled.
You can edit environment file /boot/env.txt
to setup the device tree overlays to enable or disable the peripherals.
In this documentation, we will take Edge as an example to descripe how to use the device tree overlays.
How To Use
You can find the device tree overlays configuration in /boot/env.txt
for Edge.
1 | # Device Tree Overlays |
NoteYou need to save the file
/boot/env.txt
and reboot the board to take effect.
Make Your Own DTBO Files
There are some ready to use dtbo files, you can also add your own dtbos to enable or disable the peripherals.
The default dtbo files are stored in directory: /boot/dtb/overlays/#BOARD#
1 | khadas@Khadas:~$ ll /boot/dtb/overlays/kedge |
- Write your own device tree overlay file, for example
example.dts
:
1 | /dts-v1/; |
This device tree overlay is to enable i2c0
.
- Compile it to dtbo
1 | khadas@Khadas:~$ dtc -I dts -O dtb -o example.dtbo example.dts |
Move the dtbo file to
/boot/dtb/overlays/kedge
Edit
/boot/env.txt
to add in nodeoverlays
Reboot the board