This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:common:configurations:android-device-tree-overlay [2024/12/18 21:26] xiong [Device Reference Table] |
products:sbc:common:configurations:android-device-tree-overlay [2024/12/20 03:26] (current) william |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== Android Device Tree Overlay ====== |
| - | We can use DT overlays to enable/ | + | We can use DT overlays to enable/ |
| ===== Device Reference Table ====== | ===== Device Reference Table ====== | ||
| - | ^ | + | ^ |
| - | ^ Edge2 | 14.0 | + | ^ Edge2 | 14 |
| + | ^ VIM4 | ||
| ===== Device Configurations ===== | ===== Device Configurations ===== | ||
| - | DT-overlays '' | + | |
| + | <tabbox Edge2 > | ||
| + | |||
| + | DT-overlays '' | ||
| ```shell | ```shell | ||
| Line 18: | Line 22: | ||
| ``` | ``` | ||
| - | DT-overlays configuration file: '' | + | DT-overlays configuration file: '' |
| Enable: | Enable: | ||
| Line 40: | Line 44: | ||
| ``` | ``` | ||
| + | <tabbox VIM4> | ||
| + | DT-overlays '' | ||
| - | ===== Write DT Overlay Source | + | ```shell |
| + | khadas@Khadas: | ||
| + | i2s.dtbo | ||
| + | pwm_f.dtbo | ||
| + | spdifout.dtbo | ||
| + | uart_e.dtbo | ||
| + | ``` | ||
| + | DT-overlays configuration file: ''/ | ||
| + | |||
| + | Enable: | ||
| + | ```shell | ||
| + | $ echo fdt_overlays=i2s > / | ||
| + | ``` | ||
| + | ```shell | ||
| + | $ cat kvim4.dtb.overlay.env | ||
| + | fdt_overlays=i2s | ||
| + | |||
| + | ``` | ||
| + | |||
| + | Disable: | ||
| + | ```shell | ||
| + | $ echo fdt_overlays= > / | ||
| + | ``` | ||
| + | ```shell | ||
| + | $ cat kvim4.dtb.overlay.env | ||
| + | fdt_overlays= | ||
| + | |||
| + | ``` | ||
| + | </ | ||
| + | |||
| + | ===== Configuration DT Overlays ===== | ||
| + | |||
| + | You need to edit the DT overlays configuration file and add custom DT overlays dtbo files to a special folder. | ||
| + | |||
| + | ===== Make custom DT Overlays ===== | ||
| + | |||
| + | There are some preparation steps for DT overlays dtbo files, you can also add custom DT overlays. | ||
| + | |||
| + | ==== Write DT Overlay Source==== | ||
| - | Basic DT overlay source | + | Basic DT overlay source |
| - | ```dts | + | ```dts |
| /dts-v1/; | /dts-v1/; | ||
| /plugin/; | /plugin/; | ||
| / { | / { | ||
| - | fragment@0 { | + | |
| - | target = <&spi1>; | + | target = <&i2c3>; |
| - | + | __overlay__ { | |
| - | __overlay__ { | + | status = " |
| - | status = " | + | }; |
| - | }; | + | }; |
| - | }; | + | |
| }; | }; | ||
| ``` | ``` | ||
| - | ===== Compile DT Overlay Source | + | ==== Compile DT Overlay Source ==== |
| ```sh | ```sh | ||
| - | dtc -I dts -O dtb -o edge2-io-spi.dtbo edge2-io-spi.dts | + | dtc -I dts -O dtb -o example.dtbo example.dts |
| ``` | ``` | ||