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 VIM3 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 VIM3.
1 | # Device Tree Overlays |
uart3 pwm_f i2c3 os08a10
are enabled by default.
If you want to disable
pwm_f
you can removepwm_f
inoverlays
node.If you want to enable
onewire
, you can addonewire
tooverlays
node.
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/kvim3 |
- Write your own device tree overlay file, for example
example.dts
:
1 | /dts-v1/; |
This device tree overlay is to enable i2c3
.
- 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/kvim3
Edit
/boot/env.txt
to add in nodeoverlays
Reboot the board