Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:configurations:device-tree-overlay

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:configurations:device-tree-overlay [2022/09/28 09:04]
nick [Make custom DT overlays]
products:sbc:common:configurations:device-tree-overlay [2023/11/07 04:18] (current)
nick
Line 2: Line 2:
  
 We can use DT overlays to enable/disable or change configuration for peripherals without recompiling the DT kernel source code. We can use DT overlays to enable/disable or change configuration for peripherals without recompiling the DT kernel source code.
 +
 +===== DT collections  =====
 +
 +https://github.com/khadas/khadas-linux-kernel-dt-overlays
  
 ===== Device Reference Table ====== ===== Device Reference Table ======
  
-^          DT overlays folder                                 ^  DT overlays list variable  ^  DT overlays config file                           +^         ^  Kernel Version  ^  DT overlays folder                                    ^  DT overlays list variable  ^  DT overlays config file                                  
-^  VIM1    /boot/dtb/overlays/kvim                                overlays          |  /boot/env.txt                                            | +^  VIM1   |  4.9/mainline    |  /boot/dtb/overlays/kvim                                overlays                   |  /boot/env.txt                                            | 
-^  VIM2    /boot/dtb/overlays/kvim2                              | :::                | :::                                                       | +^  VIM2   |  4.9/mainline    |  /boot/dtb/overlays/kvim2                              | :::                         | :::                                                       | 
-^  VIM3    /boot/dtb/overlays/kvim3                              | :::                | :::                                                       | +^  VIM3   |  4.9/mainline    |  /boot/dtb/overlays/kvim3                              | :::                         | :::                                                       
-^  VIM3L  |  /boot/dtb/overlays/kvim3l                             :::                | :::                                                       +| :::      5.15            |  /boot/dtb/amlogic/kvim3.dtb.overlays                  |  fdt_overlays                /boot/dtb/amlogic/kvim3l.dtb.overlay.env                 
-^  VIM1S  |  /boot/dtb/amlogic/kvim1s.dtb.overlays                  fdt_overlays      |  /boot/dtb/amlogic/kvim1s.dtb.overlay.env                 | +^  VIM3L  |  4.9/mainline    |  /boot/dtb/overlays/kvim3l                              overlays                    /boot/env.txt                                            | 
-^  VIM4    /boot/dtb/amlogic/kvim4.dtb.overlays                  | :::                |  /boot/dtb/amlogic/kvim4.dtb.overlay.env                  | +| :::     |  5.15            |  /boot/dtb/amlogic/kvim3l.dtb.overlays                  fdt_overlays                /boot/dtb/amlogic/kvim3l.dtb.overlay.env                 
-^  Edge2  |  /boot/dtb/rockchip/rk3588s-khadas-edge2.dtb.overlays  :::               |  /boot/dtb/rockchip/rk3588s-khadas-edge2.dtb.overlay.env +^  VIM1S  |  5.4/5.15        |  /boot/dtb/amlogic/kvim1s.dtb.overlays                 :::                         |  /boot/dtb/amlogic/kvim1s.dtb.overlay.env                 | 
-^  Edge1  |  /boot/dtb/rockchip/overlays/caption                   |  overlays          |  /boot/env.txt                                            | +^  VIM4   |  5.4/5.15        |  /boot/dtb/amlogic/kvim4.dtb.overlays                  | :::                         |  /boot/dtb/amlogic/kvim4.dtb.overlay.env                  | 
-| :::      /boot/dtb/rockchip/overlays/edgev                     | :::                | :::                                                       |+^  Edge2  |  5.10            |  /boot/dtb/rockchip/rk3588s-khadas-edge2.dtb.overlays  | :::                         |  /boot/dtb/rockchip/rk3588s-khadas-edge2.dtb.overlay.env 
 +^  Edge1  |  4.4             |  /boot/dtb/rockchip/overlays/captain                   |  overlays                   |  /boot/env.txt                                            | 
 +| :::     | :::              |  /boot/dtb/rockchip/overlays/edgev                     | :::                         | :::                                                       |
  
 ===== Device Configurations ===== ===== Device Configurations =====
Line 61: Line 67:
   * If you want to disable ''pwm_f'' you can remove ''pwm_f'' from ''overlays'' list variable   * If you want to disable ''pwm_f'' you can remove ''pwm_f'' from ''overlays'' list variable
   * If you want to enable ''onewire'', you can add ''onewire'' to ''overlays'' list variable   * If you want to enable ''onewire'', you can add ''onewire'' to ''overlays'' list variable
 +
 +<tabbox VIM3 with 5.15 kernel>
 +
 +DT-overlays ''dtbo'' directory: ''/boot/dtb/amlogic/kvim3.dtb.overlays''.
 +
 +```shell
 +khadas@Khadas:~$ ls -1 /boot/dtb/amlogic/kvim3.dtb.overlays/
 +uart3.dtbo
 +pwm_f.dtbo
 +i2c3.dtbo
 +spi1.dtbo
 +os08a10.dtbo
 +onewire.dtbo
 +disable-ts050.dtbo
 +m2x-eth.dtbo
 +otg-device.dtbo
 +```
 +
 +DT-overlays configuration file: ''/boot/dtb/amlogic/kvim3.dtb.overlay.env''.
 +
 +<tabbox VIM3L with 5.15 kernel>
 +
 +DT-overlays ''dtbo'' directory: ''/boot/dtb/amlogic/kvim3l.dtb.overlays''.
 +
 +```shell
 +khadas@Khadas:~$ ls -1 /boot/dtb/amlogic/kvim3.dtb.overlays/
 +uart3.dtbo
 +pwm_f.dtbo
 +i2c3.dtbo
 +spi1.dtbo
 +os08a10.dtbo
 +onewire.dtbo
 +disable-ts050.dtbo
 +m2x-eth.dtbo
 +otg-device.dtbo
 +```
 +
 +DT-overlays configuration file: ''/boot/dtb/amlogic/kvim3l.dtb.overlay.env''.
  
 <tabbox VIM4> <tabbox VIM4>
  
-DT-overlays ''dtbo'' directory: ''/boot/dtb/amlogic/kvim4.dtb.overlays''+DT-overlays ''dtbo'' directory: ''/boot/dtb/amlogic/kvim4.dtb.overlays''.
  
 ```shell ```shell
Line 105: Line 149:
 ===== Configuration DT Overlays ===== ===== Configuration DT Overlays =====
  
-Need edit the DT overlays configuration file and add custom DT overlays ''dtbo'' files to special folder.+You need to edit the DT overlays configuration file and add custom DT overlays ''dtbo'' files to special folder.
  
 ===== Make custom DT Overlays ===== ===== Make custom DT Overlays =====
Line 138: Line 182:
 ==== Copy DT Overlays to Special Folder ==== ==== Copy DT Overlays to Special Folder ====
  
 +  * VIM3 with 5.15 kernel is ''/boot/dtb/amlogic/kvim3.dtb.overlays'' 
 +  * VIM3L with 5.15 kernel is ''/boot/dtb/amlogic/kvim3l.dtb.overlays'' 
   * VIM4 is ''/boot/dtb/amlogic/kvim4.dtb.overlays''    * VIM4 is ''/boot/dtb/amlogic/kvim4.dtb.overlays'' 
   * VIM1S is ''/boot/dtb/amlogic/kvim1s.dtb.overlays''   * VIM1S is ''/boot/dtb/amlogic/kvim1s.dtb.overlays''
Line 152: Line 198:
    
   * VIM1/2/3/3L/Edge1 is ''/boot/env.txt''   * VIM1/2/3/3L/Edge1 is ''/boot/env.txt''
 +  * VIM3 with 5.15 kernel is ''/boot/dtb/amlogic/kvim3.dtb.overlay.env''
 +  * VIM3L with 5.15 kernel is ''/boot/dtb/amlogic/kvim3l.dtb.overlay.env''
   * VIM4 is ''/boot/dtb/amlogic/kvim4.dtb.overlay.env''   * VIM4 is ''/boot/dtb/amlogic/kvim4.dtb.overlay.env''
   * VIM1S is ''/boot/dtb/amlogic/kvim4.dtb.overlay.env''   * VIM1S is ''/boot/dtb/amlogic/kvim4.dtb.overlay.env''
Last modified: 2022/09/28 09:04 by nick