Rock Pi 4 GPIO Description

ROCK Pi 4 is a Rockchip RK3399 based SBC(Single Board Computer) by Radxa. It can run android or some Linux distributions. ROCK Pi 4 features a six core ARM processor, 64bit dual channel 3200Mb/s LPDDR4, up to [email protected] HDMI, MIPI DSI, MIPI CSI, 3.5mm jack with mic, 802.11 ac WIFI, Bluetooth 5.0, USB Port, GbE LAN, 40-pin color expansion header, RTC. Also, ROCK Pi 4 supports USB PD and QC powering.

ROCK Pi 4 comes in two models, Model A and Model B, each model has 1GB, 2GB or 4GB ram options. for detailed difference of Model A and Model B. This is best alternative of Raspberry Pi.

If you Dont know about ROCK Pi 4, Visit this : ROCK Pi 4 : Overview | Installation

General purpose input-output (GPIO) connector

ROCK Pi 4 has a 40-pin expansion header. Each pin is distinguished by color.

Rock pi 4 gpio

RK3399 have three IO voltages, 1.8V/3.0V/3.3V. For ROCK Pi 4, below is the default voltage:

| GPIO       | Voltage Level | Tolerance |
| ---------- | ------------- | --------- |
| GPIO3_C0   | 3.3V          | 3.465V    |
| ADC_IN0    | 1.8V          | 1.98V     |
| Other GPIO | 3.0V          | 3.14V     |


GPIO number

Rockchip RK3399 GPIO has 5 banks, GPIO0 to GPIO4, each bank has 32pins, naming as below:

   GPIO0_A0 ~ A7 
   GPIO0_B0 ~ B7
   GPIO0_C0 ~ C7
   GPIO0_D0 ~ D7
   
   GPIO1_A0 ~ A7
   ....
   GPIO1_D0 ~ D7

For Rockchip 4.4 kernel, the GPIO number can be calculated as below, take GPIO4_D5(PIN22 on 40PIN GPIO) as an example:

   GPIO4_D5 = 32*4 + 8*3 + 5 = 157

To set GPIO4_D5 output

   cd /sys/class/gpio
   echo 157 > export
   cd gpio157
   echo out > direction
   echo 1 > value     # output high
   echo 0 > value     # output low


Recommended: Setup Docker on Rock Pi 4


I hope you like this post. Do you have any questions? Leave a comment down below! Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog.

Explore Some more Raspberry Pi Tutorials :


Buy now : Raspberry PI 3 Model B+ Motherboard


Harshvardhan Mishra

I am an IoT (Internet of Things) Enthusiast and Blogging is my Passion. Follow and send tweets me on @harshvardhanrvm

Leave a Reply

%d bloggers like this: