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"

(UART)
(UART)
Line 49: Line 49:
  
 
==== UART ====
 
==== UART ====
System default enable uart2-m0 (/dev/ttyS2) to be debug console.  
+
System default enable uart2-m0 to be debug console.  
  
 
   fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-fiq-debugger-uart2m0.dtbo
 
   fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-fiq-debugger-uart2m0.dtbo

Revision as of 06:53, 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-3 (/dev/i2c-3), add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-i2c2-m0.dtbo" to the "fdtovlays " line.

 fdtoverlays  /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-i2c3-m0.dtbo

PWM

PWM0
Option 1: PWM0-M0

To enable PWM0-M0, add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m0.dtbo" to the "fdtoverlays " line.

  fdtoverlays /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m0.dtbo

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 "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m1.dtbo" to the "fdtoverlays " line.

  fdtoverlyas /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m1.dtbo

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

SPI

To enable spi3 (/dev/spidev3.0), add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-spi3-m0-cs0-spidev.dtbo" to the "fdtovlays " line.

fdtoverlays  /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-spi3-m0-cs0-spidev.dtbo

UART

System default enable uart2-m0 to be debug console.

 fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-fiq-debugger-uart2m0.dtbo

If you want to enable uart2-m0 (/dev/ttyS2) to be normal uart, modify item "/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-uart2-m0.dtbo" to the "fdtoverlays " line.

 fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-uart2-m0.dtbo

CAN

I2C

PWM

SPI

UART

CAN


I2C

PWM

SPI

UART