Wednesday, December 18, 2024
ExplainerIoT Hardwares

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 4K@60 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

Hi, I'm Harshvardhan Mishra. Tech enthusiast and IT professional with a B.Tech in IT, PG Diploma in IoT from CDAC, and 6 years of industry experience. Founder of HVM Smart Solutions, blending technology for real-world solutions. As a passionate technical author, I simplify complex concepts for diverse audiences. Let's connect and explore the tech world together! If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning! Linkedin

One thought on “Rock Pi 4 GPIO Description

Leave a Reply

Your email address will not be published. Required fields are marked *