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

Difference between revisions of "Device-tree-overlays"

(RK3308 Available Overlay (ROCK Pi S))
Line 1: Line 1:
 
{{Languages|rockpiN10}}
 
{{Languages|rockpiN10}}
  
__NOTOC__
+
= Introduction of Radxa Boards Device Tree Overlays =
  
== Introduction of ROCK Pi Device Tree Overlays ==
+
This document describes Radxa Boards device tree overlays provided in kernel packages.
  
This document describes ROCK Pi device tree overlays provided in kernel packages.
+
== Platform and Chips ==
  
=== Platform and Chips ===
+
* rockchip (Rockchip)
 +
** RK3399PRO
 +
** RK3328
 +
** RK3308
  
rockchip (Rockchip)
+
*Meson (Amlogic)
* rk3399pro
+
** Meson G12A: S905Y2
* rk3328
+
* rk3308
+
  
=== Usage ===
+
== Part One: Rockchip ==
  
 
Kernel provided DT overlay files are in /boot/dtbs/$(uname -r)/rockchip/overlay/
 
Kernel provided DT overlay files are in /boot/dtbs/$(uname -r)/rockchip/overlay/
Line 442: Line 443:
  
 
</div>
 
</div>
 +
 +
== Part Two: Meson ==

Revision as of 13:35, 10 October 2021

Introduction of Radxa Boards Device Tree Overlays

This document describes Radxa Boards device tree overlays provided in kernel packages.

Platform and Chips

  • rockchip (Rockchip)
    • RK3399PRO
    • RK3328
    • RK3308
  • Meson (Amlogic)
    • Meson G12A: S905Y2

Part One: Rockchip

Kernel provided DT overlay files are in /boot/dtbs/$(uname -r)/rockchip/overlay/

/boot/uEnv.txt contents:

 overlays=rk3399pro-i2c2 rk3399pro-console-on-uart2 rk3399pro-pwm0 rk3399pro-w1-gpio rk3399pro-spi-spidev
 param_spidev_spi_bus=1
 param_spidev_max_freq=10000000
 param_w1_pin=GPIO2_A2

Add names of overlays you want to activate to overlays= line in /boot/uEnv.txt, separated with spaces.

Add required parameters with their values to /boot/uEnv.txt, one per line.

Add optional parameters with their values to /boot/uEnv.txt if you want to change the default value, one per line.

U-Boot Environment Variable

  • verbosity

Kernel log level: 1~7

 verbosity=7
  • rootfstype

root filesystem type: ext4

 rootfstype=ext4
  • fdtfile

Kernel device tree name with the prefix, rockchip/

 fdtfile=rockchip/rk3399pro-rockpi-n10-linux.dtb
  • extraargs
    • Driver module parameters
 extraargs=mem=512MB max_loop=8

RK3399PRO Available Overlay (ROCK Pi N10)

  • rk3399pro-i2c2, rk3399pro-i2c6, rk3399pro-i2c7
  • rk3399pro-spi-spidev
  • rk3399pro-pwm0, rk3399pro-pwm1
  • rk3399pro-uart2, rk3399pro-uart4
  • rk3399pro-console-on-uart2, rk3399pro-console-on-uart4
  • rk3399pro-w1-gpio
rk3399pro-i2c2

Activates I2C bus 2

I2C2 pins (SCL, SDA): GPIO2_A1, GPIO2_A0

Usage: add one line in /boot/uEnv.txt overlays=rk3399pro-i2c2

rk3399pro-i2c6

Activates I2C bus 6

I2C7 pins (SCL, SDA): GPIO2_B2, GPIO2_A1

rk3399pro-i2c7

Activates I2C bus 7

I2C7 pins (SCL, SDA): GPIO2_B0, GPIO2_A7

rk3399pro-spi-spidev

Activates spidev device node (/dev/spidevX.Y) for userspace SPI access, where X is the bus number and Y is the CS number

SPI 1 pins (MOSI, MISO, SCK, CS): GPIO1_B0, GPIO1_A7, GPIO1_B1, GPIO1_B2

Parameters:

  • param_spidev_spi_bus (int)
    • SPI bus to activate SPIdev support on
    • Required
    • Supported values: 0, 1
  • param_spidev_spi_cs (int)
    • SPI chip select number
    • Optional
    • Default: 0
    • Supported values: 0, 1
    • Using chip select 1 requires using "spi-add-cs1" overlay
  • param_spidev_max_freq (int)
    • Maximum SPIdev frequency
    • Optional
    • Default: 10000000
    • Range: 3000 - 100000000
rk3399pro-pwm0

Activates PWM0

rk3399pro-pwm1

Activates PWM1

rk3399pro-uart2

Activates serial port 2 (/dev/ttyS2)

UART2 pins (RXD, TXD): GPIO4_C3, GPIO4_C4

Notice: rk3399pro-uart2 and rk3399pro-console-on-uart2 cannnot be added together in /boot/uEnv.txt.

rk3399pro-uart4

Activates serial port 4 (/dev/ttyS4)

UART4 pins (RXD, TXD): GPIO1_A7, GPIO1_B0

Notice: UART4 cannot be activated together with SPI1 since they share the same pins. Also, rk3399pro-uart4 and rk3399pro-console-on-uart4 cannnot be added together in /boot/uEnv.txt.

rk3399pro-console-on-uart2

Activates debug console on UART2

console pins (RXD, TXD): GPIO4_C3, GPIO4_C4

Notice: rk3399pro-console-on-uart2 and rk3399pro-uart2 cannnot be added together in /boot/uEnv.txt.

rk3399pro-console-on-uart4

Activates debug console on UART4

console pins (RXD, TXD): GPIO1_A7, GPIO1_B0

Notice: rk3399pro-console-on-uart4 and rk3399pro-uart4 cannnot be added together in /boot/uEnv.txt.

rk3399pro-w1-gpio

Activates 1-Wire GPIO master

Requires an external pull-up resistor on the data pin

Parameters:

  • param_w1_pin (pin)
    • Data pin for 1-Wire master
    • Optional
    • Default: GPIO2_A2
rk3399pro-raspberrypi-7-inch-lcd

Activates Raspberry Pi 7-inch LCD

Notice: In term of hardware, use a 15-pin FPC cable to connect RPI LCD to ROCK Pi N10.

For power supply, both 5V pin and GND pin on 5-pin connector on RPI LCD are connected to the 40-pin connector on ROCK Pi N10.

rk3399pro-pcie-gen2

Activates PCIe Gen2 Mode

RK3328 Available Overlay (ROCK Pi E)

  • rk3328-i2c1
  • rk3328-spi-spidev
  • rk3328-uart1, rk3328-uart2
  • rk3328-console-on-uart1, rk3328-console-on-uart2
  • rk3328-w1-gpio
rk3328-i2c1

Activates I2C bus 2

I2C2 pins (SCL, SDA): GPIO2_A1, GPIO2_A0

Usage: add one line in /boot/uEnv.txt

overlays=rk3328-i2c1

rk3328-spi-spidev

Activates spidev device node (/dev/spidevX.Y) for userspace SPI access, where X is the bus number and Y is the CS number

SPI 0 pins (MOSI, MISO, SCK, CS): GPIO3_A1, GPIO3_A2, GPIO3_A0, GPIO3_B0

Parameters:

  • param_spidev_spi_bus (int)
    • SPI bus to activate SPIdev support on
    • Required
    • Supported values: 0
  • param_spidev_spi_cs (int)
    • SPI chip select number
    • Optional
    • Default: 0
    • Supported values: 0
  • param_spidev_max_freq (int)
    • Maximum SPIdev frequency
    • Optional
    • Default: 10000000
    • Range: 3000 - 100000000
rk3328-uart1

Activates serial port 1 (/dev/ttyS1)

UART1 pins (RXD, TXD): GPIO3_A6, GPIO3_A4

Notice: rk3328-uart1 and rk3328-console-on-uart1 cannnot be added together in /boot/uEnv.txt.

rk3328-uart2

Activates serial port 2 (/dev/ttyS2)

UART2 pins (RXD, TXD): GPIO2_A1, GPIO2_A0

Notice: rk3328-uart2 and rk3328-console-on-uart2 cannnot be added together in /boot/uEnv.txt.

rk3328-console-on-uart

Activates debug console on UART1

console pins (RXD, TXD): GPIO3_A6, GPIO3_A4

Notice: rk3328-console-on-uart1 and rk3328-uart1 cannnot be added together in /boot/uEnv.txt.

rk3328-console-on-uart2

Activates debug console on UART2

console pins (RXD, TXD): GPIO2_A1, GPIO2_A0

Notice: rk3328-console-on-uart2 and rk3328-uart2 cannnot be added together in /boot/uEnv.txt.

rk3328-w1-gpio

Activates 1-Wire GPIO master

Requires an external pull-up resistor on the data pin

Parameters:

  • param_w1_pin (pin)
    • Data pin for 1-Wire master
    • Optional
    • Default: GPIO2_D2

RK3308 Available Overlay (ROCK Pi S)

  • i2c1-hym8563
  • rk3308-i2c0, rk3308-i2c1, rk3308-i2c2, rk3308-i2c3
  • rk3308-spi-spidev
  • rk3308-uart0, rk3308-uart1, rk3308-uart2
  • rk3308-pwm1, rk3308-pwm2, rk3308-pwm3
  • rk3308-console-on-uart0, rk3308-console-on-uart1, rk3308-console-on-uart2
  • rk3308-w1-gpio
  • rockpis-v11-spi2-waveshare35b-v2, rockpis-v11-spi2-waveshare35c, rockpis-v12-spi2-waveshare35b-v2, rockpis-v12-spi2-waveshare35c

Notes:.
1.I2C0, UART1 and SPI2 cannot be enabled at the same time.
2.I2C2 and SPI0 cannot be enabled at the same time..
3.I2C3 and PWM2 cannot be enabled at the same time..
4.I2C3 and PWM3 cannot be enabled at the same time..
5.SPI0 and UART0 cannot be enabled at the same time..
6.SPI2 and UART2 cannot be enabled at the same time..
7.Waveshare 3.5 inch LCD related pins on 40-PIN HEADER 1: PIN#11/18/19/21/22/23/24/26


i2c1-hym8563

Activates hym8563 RTC

Related pins: I2C1(SCL/SDA), nINT(GPIO0_C1)

rk3308-i2c0

Activates I2C bus 0

I2C0 pins (SCL, SDA): GPIO1_D1, GPIO1_D0

rk3308-i2c1

Activates I2C bus 1

I2C1 pins (SCL, SDA): GPIO0_B4, GPIO0_B3

rk3308-i2c2

Activates I2C bus 2

I2C2 pins (SCL, SDA): GPIO2_A3, GPIO2_A2

rk3308-i2c3

Activates I2C bus 3

I2C3 pins (SCL, SDA): GPIO0_C0, GPIO0_B7

rk3308-spi-spidev

Activates SPIdev device node (/dev/spidevX.Y) for userspace SPI access, where X is the bus number and Y is the CS number

SPI 0 pins (MOSI, MISO, SCK, CS): GPIO2_A1, GPIO2_A0, GPIO2_A2, GPIO2_A3 SPI 1 pins (MOSI, MISO, SCK, CS): GPIO3_B4, GPIO3_B2, GPIO3_B3, GPIO3_B5 SPI 2 pins (MOSI, MISO, SCK, CS): GPIO1_C7, GPIO1_C6, GPIO1_D0, GPIO1_D1

Parameters:

  • param_spidev_spi_bus (int)
    • SPI bus to activate SPIdev support on
    • Required
    • Supported values: 0
  • param_spidev_spi_cs (int)
    • SPI chip select number
    • Optional
    • Default: 0
    • Supported values: 0
  • param_spidev_max_freq (int)
    • Maximum SPIdev frequency
    • Optional
    • Default: 10000000
    • Range: 3000 - 100000000
rk3308-uart0

Activates serial port 0 (/dev/ttyS0)

UART0 pins (RXD, TXD): GPIO2_A0, GPIO2_A1

rk3308-uart1

Activates serial port 1 (/dev/ttyS1)

UART1 pins (RXD, TXD): GPIO1_D0, GPIO1_D1

rk3308-uart2

Activates serial port 2 (/dev/ttyS2)

UART2 pins (RXD, TXD): GPIO1_C6, GPIO1_C7

rk3308-pwm1

Activates PWM1

rk3308-pwm2

Activates PWM2

rk3308-pwm3

Activates PWM3

rk3308-console-on-uart0

Activates debug console on UART0

console pins (RXD, TXD): GPIO2_A0, GPIO2_A1

Notes:
1.rk3308-console-on-uart0 and rk3308-uart0 cannnot be added together in /boot/uEnv.txt.

rk3308-console-on-uart1

Activates debug console on UART1

console pins (RXD, TXD): GPIO1_D0, GPIO1_D1

Notes:
1.rk3308-console-on-uart1 and rk3308-uart1 cannnot be added together in /boot/uEnv.txt.

rk3308-console-on-uart2

Activates debug console on UART2

console pins (RXD, TXD): GPIO1_C6, GPIO1_C7

Notes:
1.rk3308-console-on-uart2 and rk3308-uart2 cannnot be added together in /boot/uEnv.txt.

rk3308-w1-gpio

Activates 1-Wire GPIO master

Requires an external pull-up resistor on the data pin

Parameters:

  • param_w1_pin (pin)
    • Data pin for 1-Wire master
    • Optional
    • Default: GPIO0_C1
rockpis-v11-spi2-waveshare35b-v2

Activates waveshare 3.5inch lcd(B v2) on ROCK Pi S V1.1

rockpis-v11-spi2-waveshare35c

Activates waveshare 3.5inch lcd(C) on ROCK Pi S V1.1

rockpis-v12spi2-waveshare35b-v2

Activates waveshare 3.5inch lcd(B v2) on ROCK Pi S V1.2

rockpis-v12-spi2-waveshare35c

Activates waveshare 3.5inch lcd(C) on ROCK Pi S V1.2

Part Two: Meson