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"

(Option 1: PWM0-M0)
(Common Hardware Interfaces, I2C, PWM, SPI, UART, CAN, etc)
 
(7 intermediate revisions by the same user not shown)
Line 18: Line 18:
  
 
             <div class="tab-pane active" id="common-hardware-interface-3a">
 
             <div class="tab-pane active" id="common-hardware-interface-3a">
 +
 +
==== I2C ====
 +
 +
==== PWM ====
 +
 +
==== SPI ====
 +
 +
==== UART ====
 +
 +
==== CAN ====
 +
 +
            </div> <!--  id="common-hardware-interface-3a" end-->
 +
 +
            <div id="common-hardware-interface-3b" class="tab-pane">
 +
 +
==== I2C ====
 +
 +
==== PWM ====
 +
 +
==== SPI ====
 +
 +
==== UART ====
 +
 +
==== CAN ====
 +
 +
 +
            </div> <!--  id="common-hardware-interface-3b" end-->
 +
            <div id="common-hardware-interface-3c" class="tab-pane">
  
 
==== I2C ====
 
==== I2C ====
Line 37: Line 65:
  
 
====== Option 2: PWM0-M1 ======
 
====== Option 2: PWM0-M1 ======
To enable PWM0-M0, add item "rk3568-pwm0-m1" to the "overlays=" line.
+
To enable PWM0-M0, add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m1.dtbo" to the "fdtoverlays " line.
  
overlays=rk3568-pwm0-m1
+
  fdtoverlyas /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-pwm0-m1.dtbo
  
 
The related directory <code>/sys/devices/platform/fdd70000.pwm/pwm/pwmchip*</code> will be created.
 
The related directory <code>/sys/devices/platform/fdd70000.pwm/pwm/pwmchip*</code> 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 <code>/sys/devices/platform/fdd70010.pwm/pwm/pwmchip*</code> will be created.
 
  
 
==== SPI ====
 
==== 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 ====
 
==== UART ====
System default enable uart2-m0 (/dev/ttyS2) to be debug console.  
+
System default enable uart2-m0 to be debug console.  
  
   overlays=rk3568-fiq-debugger-uart2m0
+
   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 console, modify item "rk3568-uart2-m0" to the "overlays=" line.  
+
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.  
  
   overlays=rk3568-uart2-m0
+
   fdtoverlays  /dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-uart2-m0.dtbo
  
 
==== CAN ====
 
==== CAN ====
 +
To enable can (can0), add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-can1-m0.dtbo" to the "fdtovlays " line.
  
            </div> <!-- id="common-hardware-interface-3a" end-->
+
fdtoverlays  /boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-can1-m0.dtbo
 
+
            <div id="common-hardware-interface-3b" class="tab-pane">
+
 
+
==== I2C ====
+
 
+
==== PWM ====
+
 
+
==== SPI ====
+
 
+
==== UART ====
+
 
+
==== CAN ====
+
 
+
 
+
            </div> <!--  id="common-hardware-interface-3b" end-->
+
  
 +
            </div><!--  id="common-hardware-interface-3c" end-->
  
 
             <div id="common-hardware-interface-cm3io" class="tab-pane">
 
             <div id="common-hardware-interface-cm3io" class="tab-pane">

Latest revision as of 07:05, 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

PWM

SPI

UART

CAN

I2C

PWM

SPI

UART

CAN

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

To enable can (can0), add item "/boot/dtbs/4.19.193-53-rockchip-gc36f859f0a63/rockchip/overlay/rk3568-can1-m0.dtbo" to the "fdtovlays " line.

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

I2C

PWM

SPI

UART