Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock3/extlinux"

(Created page with "=== <span id="common_hardware_interface">Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc</span> === The ROCK 3 system images use configuration file /boot/uEnv.txt....")
 
(Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc)
Line 1: Line 1:
 
=== <span id="common_hardware_interface">Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc</span> ===
 
=== <span id="common_hardware_interface">Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc</span> ===
  
The ROCK 3 system images use configuration file /boot/uEnv.txt.
+
This page teaches how to enable  overlays in file '''/boot/extlinux/extlinux.conf'''.  The directory '''/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/''' includes  overlays you can enable, to enable overlay, we just need add an  absolute path of overlay after  the key word '''fdtoverlays''', there is a space between each overlay and a space between '''fdtoverlays''' and overlay's absolute path,  for example,
 +
fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-fiq-debugger-uart2m0.dtbo /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-disable-npu.dtbo  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-spi3-m1-cs0-spidev.dtbo 
  
'''Warning: Remember there is only one line including item "overlays=" in file /boot/uEnv.txt.'''
+
The  examples above indicates that '''rk3568-fiq-debugger-uart2m0''' and '''rk3568-disable-npu''' and '''rk3568-spi3-m1-cs0-spidev''' and are enabled
  
 
To enable I2C, PWM, SPI, UART, CAN, etc, please see '''RK3566/RK3568 Available Overlay (ROCK 3A, ROCK 3B, Radxa CM3)''' part of [[rock3/Debian/device-tree-overlays | Device Tree Overlays]]
 
To enable I2C, PWM, SPI, UART, CAN, etc, please see '''RK3566/RK3568 Available Overlay (ROCK 3A, ROCK 3B, Radxa CM3)''' part of [[rock3/Debian/device-tree-overlays | Device Tree Overlays]]

Revision as of 03:55, 8 November 2022

Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc

This page teaches how to enable overlays in file /boot/extlinux/extlinux.conf. The directory /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/ includes overlays you can enable, to enable overlay, we just need add an absolute path of overlay after the key word fdtoverlays, there is a space between each overlay and a space between fdtoverlays and overlay's absolute path, for example,

fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-fiq-debugger-uart2m0.dtbo /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-disable-npu.dtbo  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-spi3-m1-cs0-spidev.dtbo  

The examples above indicates that rk3568-fiq-debugger-uart2m0 and rk3568-disable-npu and rk3568-spi3-m1-cs0-spidev and are enabled

To enable I2C, PWM, SPI, UART, CAN, etc, please see RK3566/RK3568 Available Overlay (ROCK 3A, ROCK 3B, Radxa CM3) part of Device Tree Overlays

I2C

To enable I2C-2 (/dev/i2c-2), add item "rk3568-i2c2-m0" to the "overlays=" line.

 overlays=rk3568-i2c2-m0

To enable I2C-3 (/dev/i2c-3), add item "rk3568-i2c3-m0" to the "overlays=" line.

 overlays=rk3568-i2c3-m0

PWM

PWM0
Option 1: PWM0-M0

To enable PWM0-M0, add item "rk3568-pwm0-m0" to the "overlays=" line.

overlays=rk3568-pwm0-m0

The related directory /sys/devices/platform/fdd70000.pwm/pwm/pwmchip* will be created. And you can do the operation in the directory.

Option 2: PWM0-M1

To enable PWM0-M0, add item "rk3568-pwm0-m1" to the "overlays=" line.

overlays=rk3568-pwm0-m1

The related directory /sys/devices/platform/fdd70000.pwm/pwm/pwmchip* will be created.

PWM1
PWM1-M1

To enable PWM11-M1, add item "rk3568-pwm1-m1" to the "overlays=" line.

overlays=rk3568-pwm1-m1

The related directory /sys/devices/platform/fdd70010.pwm/pwm/pwmchip* will be created.

SPI

UART

System default enable uart2-m0 (/dev/ttyS2) to be debug console.

 overlays=rk3568-fiq-debugger-uart2m0

If you want to enable uart2-m0 (/dev/ttyS2) to be normal console, modify item "rk3568-uart2-m0" to the "overlays=" line.

 overlays=rk3568-uart2-m0

CAN

I2C

PWM

SPI

UART

CAN


I2C

PWM

SPI

UART