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

RockpiN10/hardware/gpio

< RockpiN10‎ | hardware
Revision as of 11:47, 31 December 2019 by Stephen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi N10 >  Hardware >  GPIO

General purpose input-output (GPIO) connector

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

GPIO number Function3 Function2 Function1 Pin# Pin# Function1 Function2 Function3 GPIO number
+3.3V 1 2 +5.0V
71 I2C7_SDA GPIO2_A7 3 4 +5.0V
72 I2C7_SCL GPIO2_B0 5 6 GND
13 GPIO0_B5 7 8 GPIO4_C4 UART2_TXD 148
GND 9 10 GPIO4_C3 UART2_RXD 147
146 PWM0 GPIO4_C2 11 12 GPIO0_B1 9
150 PWM1 GPIO4_C6 13 14 GND
149 SPDIF_TX GPIO4_C5 15 16 GPIO0_B0 8
+3.3V 17 18 GPIO2_A6 70
40 UART4_TXD SPI1_TXD GPIO1_B0 19 20 GND
39 UART4_RXD SPI1_RXD GPIO1_A7 21 22 GPIO3_D4 124
41 SPI1_CLK GPIO1_B1 23 24 GPIO1_B2 SPI1_CSN0 42
GND 25 26 ADC_IN1
64 I2C2_SDA GPIO2_A0 27 28 GPIO2_A1 I2C2_CLK 65
74 I2C6_SCL GPIO2_B2 29 30 GND
73 I2C6_SDA GPIO2_B1 31 32 GPIO3_D5 125
157 GPIO4_D5 33 34 GND
68 GPIO2_A4 35 36 GPIO2_A2 66
126 GPIO3_D6 37 38 GPIO2_A3 67
GND 39 40 GPIO1_A2 34

IO Voltage

RK3399PRO have three IO voltages, 1.8V/3.0V/3.3V. For ROCK Pi N10, 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 RK3399PRO 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 = 4*32 + 3*8 + 5 = 157
   (A=0, B=1, C=2, D=3)

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