Radxa · Single-board computer
Radxa ROCK 5B
RK3588S octa-core board with a Raspberry-Pi-shaped 40-pin header. The holes line up; almost nothing else does.
- Logic level
- 3.3 V GPIO, 1.8 V ADC
- Package
- 2x20 2.54 mm header
1.Pinout diagram
Highlight a signalhover to preview, click to keep
Odd pins
ROCK 5B
Even pins
Pin detail
Hover a pin for its mappings and gotchas. Click to keep it here.
- Logic level
- 3.3 V GPIO, 1.8 V ADC
- Package
- 2x20 2.54 mm header
Fig. 1. Radxa ROCK 5B, 2x20 2.54 mm header. Hover or tap a signal to light up every pin that carries it.
2.Watch out
- Pin 22 is an analog input with a 1.8 V ceiling, where a Raspberry Pi has GPIO25. Any HAT that drives pin 22 at 3.3 V will damage it. This is the most dangerous difference between the two headers.
- Power and ground land in the Raspberry Pi positions, so a HAT will power up. Everything else is Rockchip's own mapping and no Pi GPIO number means anything here.
- Pin names are GPIO<bank>_<group><index>. The sysfs number is bank x 32 plus group x 8 plus index, with A=0 and D=3, so GPIO4_B3 is 139. Nothing in Pi tutorials translates.
- The _M0, _M1, _M2 suffixes in Rockchip's documentation are mux variants: the same peripheral can appear on several pin groups, and which one is live depends on the device tree overlay. A pin listing SPI1_MOSI_M1 only does that once the matching overlay is enabled.
- Pins 29 and 31 differ between the ROCK 5B and the ROCK 5B+. The 5B+ has GPIO1_A3 and GPIO1_A2 there, carrying I2C4 and PWM0/1 instead.
- GPIO is 3.3 V with an absolute maximum of 3.63 V, so there is very little headroom. Nothing on the header is 5 V tolerant.
- Software support is the real cost against a Raspberry Pi. Vendor kernels, fewer overlays, and far less of the internet has hit your problem before.
3.Full pin reference
Every pin, alias and mapping. This is the table that prints.
Table 1. Pin assignments.
| Pin | Name | Also called | Functions | Notes |
|---|---|---|---|---|
| 1 | 3V33.3 V | - | 3.3 V supply out | |
| 2 | 5V5 V | - | 5 V supply out | |
| 3 | GPIO4_B3I²CUARTPWM | sysfs 139 | I2C7 SDA, I2S1 SDO2, UART8 CTS, PWM15 | |
| 4 | 5V5 V | - | 5 V supply out | |
| 5 | GPIO4_B2I²CUARTPWM | sysfs 138 | I2C7 SCL, I2S1 SDO1, UART8 RTS, PWM14 | |
| 6 | GND | - | Ground | |
| 7 | GPIO3_C3SPII²CUARTPWM | sysfs 115 | SPI1 CS1, I2C8 SDA, UART7 CTS, PWM15 | |
| 8 | GPIO0_B5UARTI²C | sysfs 13 | UART2 TX, I2C1 SCL, I2S1 MCLK | |
| 9 | GND | - | Ground | |
| 10 | GPIO0_B6UARTI²C | sysfs 14 | UART2 RX, I2C1 SDA, I2S1 SCLK | |
| 11 | GPIO3_C1SPIUARTClock | sysfs 113 | SPI1 CLK, UART7 RX | |
| 12 | GPIO3_B5PWMUART | sysfs 109 | PWM12, UART3 TX, I2S2 SCLK | |
| 13 | GPIO3_B7SPII²C | sysfs 111 | SPI1 MOSI, I2C3 SCL | |
| 14 | GND | - | Ground | |
| 15 | GPIO3_C0SPII²CUART | sysfs 112 | SPI1 MISO, I2C3 SDA, UART7 TX | |
| 16 | GPIO3_A4 | sysfs 100 | GPIO only | |
| 17 | 3V33.3 V | - | 3.3 V supply out | |
| 18 | GPIO4_C4PWMSPI | sysfs 148 | PWM5, SPI3 MISO | |
| 19 | GPIO1_B2SPIUART | sysfs 42 | SPI0 MOSI, UART4 RX | |
| 20 | GND | - | Ground | |
| 21 | GPIO1_B1SPI | sysfs 41 | SPI0 MISO | |
| 22 | SARADC_IN41.8 V maxADC | - | ADC input 4 | 1.8 V MAXIMUM, absolute max 1.98 V. A Raspberry Pi has GPIO25 here, so a HAT that drives pin 22 will destroy this input. |
| 23 | GPIO1_B3SPIUARTClock | sysfs 43 | SPI0 CLK, UART4 TX | |
| 24 | GPIO1_B4UARTSPI | sysfs 44 | UART7 RX, SPI0 CS0 | |
| 25 | GND | - | Ground | |
| 26 | GPIO1_B5UARTSPI | sysfs 45 | UART7 TX, SPI0 CS1 | |
| 27 | GPIO4_C6SPII²CPWMClock | sysfs 150 | SPI3 CLK, I2C0 SDA, PWM7 | |
| 28 | GPIO4_C5PWMI²CSPI | sysfs 149 | PWM6, I2C0 SCL, SPI3 MOSI | |
| 29 | GPIO1_D7UARTPWM | sysfs 63 | UART1 CTS, PWM15 | Differs on the ROCK 5B+, which has GPIO1_A3 (I2C4 SCL, PWM1) here. |
| 30 | GND | - | Ground | |
| 31 | GPIO1_B7UARTPWM | sysfs 47 | SPDIF TX, UART1 RX, PWM13 | Differs on the ROCK 5B+, which has GPIO1_A2 (I2C4 SDA, PWM0) here. |
| 32 | GPIO3_C2PWMUARTI²CSPI | sysfs 114 | PWM14, UART7 RTS, I2C8 SCL, SPI1 CS0 | |
| 33 | GPIO3_A7PWM | sysfs 103 | PWM8 | |
| 34 | GND | - | Ground | |
| 35 | GPIO3_B6UARTPWM | sysfs 110 | I2S2 LRCK, UART3 RX, PWM13 | |
| 36 | GPIO3_B1PWMUART | sysfs 105 | PWM2, UART2 TX | |
| 37 | GPIO0_A0 | sysfs 0 | GPIO only | |
| 38 | GPIO3_B2PWMUART | sysfs 106 | PWM3, UART2 RX, I2S2 SDI | |
| 39 | GND | - | Ground | |
| 40 | GPIO3_B3UART | sysfs 107 | UART2 RTS, I2S2 SDO |
Primary sources
Found a wrong pin? The whole board is one file, data/boards/radxa-rock-5b.json.