Difference between revisions of "RockpiS/hardware/gpio"
(13 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
[[rockpiS | ROCK Pi S]] > [[rockpiS/hardware | Hardware]] > [[rockpiS/hardware/gpio | GPIO]] | [[rockpiS | ROCK Pi S]] > [[rockpiS/hardware | Hardware]] > [[rockpiS/hardware/gpio | GPIO]] | ||
+ | |||
+ | __NOTOC__ | ||
== <span id="gpio">General purpose input-output (GPIO) connector</span> == | == <span id="gpio">General purpose input-output (GPIO) connector</span> == | ||
− | ROCK Pi S has two 26-pin expansion header. Each pin is distinguished by color. | + | ROCK Pi S has two 26-pin expansion header. Each pin is distinguished by color, pin name and location are named as bellow. |
+ | [[File:Rockpis_top-latest.jpg | 500px | left]] | ||
<div class="col-md-12 "> | <div class="col-md-12 "> | ||
Line 53: | Line 56: | ||
! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ||
|- | |- | ||
− | | || || || GND || style="background:black; color:white"| | + | | || || || GND || style="background:black; color:white"| 27 || ||style="background:black; color:white"| 28 || GPIO2_A6 || I2S0_8CH_SCLK_RX || PDM_CLK_S_M2 ||| 70 |
|- | |- | ||
− | | || || || ADC_KEY_IN1 || style="background:black; color:white"| | + | | || || || ADC_KEY_IN1 || style="background:black; color:white"| 29 || || style="background:black; color:white"| 30 || GPIO2_B5 || I2S0_8CH_SDI0 || PDM_SDI0_M2 || 77 |
|- | |- | ||
− | | || || || MICBIAS2 || style="background:black; color:white"| | + | | || || || MICBIAS2 || style="background:black; color:white"| 31 || || style="background:black; color:white"| 32 || GPIO2_B6 || I2S0_8CH_SDI1 || PDM_SDI1_M2 || 78 |
|- | |- | ||
− | | || || || MICBIAS1 || style="background:black; color:white"| | + | | || || || MICBIAS1 || style="background:black; color:white"| 33 || || style="background:black; color:white"| 34 || GPIO2_B7 || I2S0_8CH_SDI2 || PDM_SDI2_M2 || 79 |
|- | |- | ||
− | | || || || MICN8 || style="background:black; color:white"| | + | | || || || MICN8 || style="background:black; color:white"| 35 || || style="background:black; color:white"|36 || MCIP8 || || || |
|- | |- | ||
− | | || || || MICN7 || style="background:black; color:white"| | + | | || || || MICN7 || style="background:black; color:white"|37 || || style="background:black; color:white"|38 || MCIP7 || || || |
|- | |- | ||
− | | || || || MICN6 || style="background:black; color:white"| | + | | || || || MICN6 || style="background:black; color:white"|39 || || style="background:black; color:white"|40 || MCIP6 || || || |
|- | |- | ||
− | | || || || MICN5 || style="background:black; color:white"| | + | | || || || MICN5 || style="background:black; color:white"|41 || || style="background:black; color:white"|42 || MCIP5 || || || |
|- | |- | ||
− | | || || || MICN4 || style="background:black; color:white"| | + | | || || || MICN4 || style="background:black; color:white"|43 || || style="background:black; color:white"|44 || MCIP4 || || || |
|- | |- | ||
− | | || || || MICN3 || style="background:black; color:white"| | + | | || || || MICN3 || style="background:black; color:white"|45 || ||style="background:black; color:white"|46 || MCIP3 || || || |
|- | |- | ||
− | | || || || MICN2 || style="background:black; color:white"| | + | | || || || MICN2 || style="background:black; color:white"|47 || || style="background:black; color:white"|48 || MCIP2 || || || |
|- | |- | ||
− | | || || || MICN1 || style="background:black; color:white"| | + | | || || || MICN1 || style="background:black; color:white"|49 || || style="background:black; color:white"|50 || MCIP1 || || || |
|- | |- | ||
− | | || || || LINEOUT_R || style="background:black; color:white"| | + | | || || || LINEOUT_R || style="background:black; color:white"|51 || || style="background:black; color:white"|52 || LINEOUT_L || || || |
|} | |} | ||
</div> | </div> | ||
Line 135: | Line 138: | ||
! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ||
|- | |- | ||
− | | || || || GND || style="background:black; color:white"| | + | | || || || GND || style="background:black; color:white"| 27 || ||style="background:black; color:white"| 28 || GPIO2_A6 || I2S0_8CH_SCLK_RX || PDM_CLK_S_M2 ||| 70 |
|- | |- | ||
− | | || || || ADC_KEY_IN1 || style="background:black; color:white"| | + | | || || || ADC_KEY_IN1 || style="background:black; color:white"| 29 || || style="background:black; color:white"| 30 || GPIO2_B5 || I2S0_8CH_SDI0 || PDM_SDI0_M2 || 77 |
|- | |- | ||
− | | || || || MICBIAS2 || style="background:black; color:white"| | + | | || || || MICBIAS2 || style="background:black; color:white"| 31 || || style="background:black; color:white"| 32 || GPIO2_B6 || I2S0_8CH_SDI1 || PDM_SDI1_M2 || 78 |
|- | |- | ||
− | | || || || MICBIAS1 || style="background:black; color:white"| | + | | || || || MICBIAS1 || style="background:black; color:white"| 33 || || style="background:black; color:white"| 34 || GPIO2_B7 || I2S0_8CH_SDI2 || PDM_SDI2_M2 || 79 |
|- | |- | ||
− | | || || || MICN8 || style="background:black; color:white"| | + | | || || || MICN8 || style="background:black; color:white"| 35 || || style="background:black; color:white"|36 || MCIP8 || || || |
|- | |- | ||
− | | || || || MICN7 || style="background:black; color:white"| | + | | || || || MICN7 || style="background:black; color:white"|37 || || style="background:black; color:white"|38 || MCIP7 || || || |
|- | |- | ||
− | | || || || MICN6 || style="background:black; color:white"| | + | | || || || MICN6 || style="background:black; color:white"|39 || || style="background:black; color:white"|40 || MCIP6 || || || |
|- | |- | ||
− | | || || || MICN5 || style="background:black; color:white"| | + | | || || || MICN5 || style="background:black; color:white"|41 || || style="background:black; color:white"|42 || MCIP5 || || || |
|- | |- | ||
− | | || || || MICN4 || style="background:black; color:white"| | + | | || || || MICN4 || style="background:black; color:white"|43 || || style="background:black; color:white"|44 || MCIP4 || || || |
|- | |- | ||
− | | || || || MICN3 || style="background:black; color:white"| | + | | || || || MICN3 || style="background:black; color:white"|45 || ||style="background:black; color:white"|46 || MCIP3 || || || |
|- | |- | ||
− | | || || || MICN2 || style="background:black; color:white"| | + | | || || || MICN2 || style="background:black; color:white"|47 || || style="background:black; color:white"|48 || MCIP2 || || || |
|- | |- | ||
− | | || || || MICN1 || style="background:black; color:white"| | + | | || || || MICN1 || style="background:black; color:white"|49 || || style="background:black; color:white"|50 || MCIP1 || || || |
|- | |- | ||
− | | || || || LINEOUT_R || style="background:black; color:white"| | + | | || || || LINEOUT_R || style="background:black; color:white"|51 || || style="background:black; color:white"|52 || LINEOUT_L || || || |
|} | |} | ||
</div> | </div> | ||
Line 218: | Line 221: | ||
! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ! GPIO number || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || GPIO number | ||
|- | |- | ||
− | | || || || GND || style="background:black; color:white"| | + | | || || || GND || style="background:black; color:white"| 27 || ||style="background:black; color:white"|28 || GPIO2_B5 || I2S0_8CH_SDI0 || PDM_SDI0_M2 ||| 77 |
|- | |- | ||
− | | || || || ADC_KEY_IN1 || style="background:black; color:white"| | + | | || || || ADC_KEY_IN1 || style="background:black; color:white"| 29 || || style="background:black; color:white"|30 || GPIO2_B6 || I2S0_8CH_SDI1 || PDM_SDI1_M2 || 78 |
|- | |- | ||
− | | || || || MICBIAS2 || style="background:black; color:white"| | + | | || || || MICBIAS2 || style="background:black; color:white"| 31 || || style="background:black; color:white"|32 || GPIO2_B7 || I2S0_8CH_SDI2 || PDM_SDI2_M2 || 79 |
|- | |- | ||
− | | || || || MICBIAS1 || style="background:black; color:white"| | + | | || || || MICBIAS1 || style="background:black; color:white"|33 || || style="background:black; color:white"|34 || GPIO2_C0 || I2S0_8CH_SDI3 || PDM_SDI3_M2 || 80 |
|- | |- | ||
− | | || || || MICN8 || style="background:black; color:white"| | + | | || || || MICN8 || style="background:black; color:white"| 35 || || style="background:black; color:white"|36 || MCIP8 || || || |
|- | |- | ||
− | | || || || MICN7 || style="background:black; color:white"| | + | | || || || MICN7 || style="background:black; color:white"|37 || || style="background:black; color:white"|38 || MCIP7 || || || |
|- | |- | ||
− | | || || || MICN6 || style="background:black; color:white"| | + | | || || || MICN6 || style="background:black; color:white"|39 || || style="background:black; color:white"|40 || MCIP6 || || || |
|- | |- | ||
− | | || || || MICN5 || style="background:black; color:white"| | + | | || || || MICN5 || style="background:black; color:white"|41 || || style="background:black; color:white"|42 || MCIP5 || || || |
|- | |- | ||
− | | 76 || || I2S0_8CH_SDO3 || GPIO2_B4 || style="background:black; color:white"| | + | | 76 || || I2S0_8CH_SDO3 || GPIO2_B4 || style="background:black; color:white"|43 || || style="background:black; color:white"|44 || GPIO2_B3 || I2S0_8CH_SDO2 || || 75 |
|- | |- | ||
− | | 72 || || I2S0_8CH_LRCK_RX || GPIO2_B0 || style="background:black; color:white"| | + | | 72 || || I2S0_8CH_LRCK_RX || GPIO2_B0 || style="background:black; color:white"|45 || ||style="background:black; color:white"|46 || GPIO2_A6 || I2S0_8CH_SCLK_RX || PDM_CLK_S_M2 || 70 |
|- | |- | ||
− | | || || || MICN2 || style="background:black; color:white"| | + | | || || || MICN2 || style="background:black; color:white"|47 || || style="background:black; color:white"|48 || MCIP2 || || || |
|- | |- | ||
− | | || || || MICN1 || style="background:black; color:white"| | + | | || || || MICN1 || style="background:black; color:white"|49 || || style="background:black; color:white"|50 || MCIP1 || || || |
|- | |- | ||
− | | || || || LINEOUT_R || style="background:black; color:white"| | + | | || || || LINEOUT_R || style="background:black; color:white"|51 || || style="background:black; color:white"|52 || LINEOUT_L || || || |
|} | |} | ||
Line 264: | Line 267: | ||
==== 26-pin Header 1 ==== | ==== 26-pin Header 1 ==== | ||
+ | |||
{| class="mw-collapsible wikitable" | {| class="mw-collapsible wikitable" | ||
Line 300: | Line 304: | ||
! GPIO number || Func4 || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || Func4 || GPIO number | ! GPIO number || Func4 || Func3 || Func2 || Func1 || Pin# || || Pin# || Func1 || Func2 || Func3 || Func4 || GPIO number | ||
|- | |- | ||
− | | || || || || GND || style="background:black; color:white"| | + | | || || || || GND || style="background:black; color:white"|27 || ||style="background:black; color:white"|28 || GPIO2_B5 || I2S0_8CH_SDI0 || PDM_SDI0_M2 || || 77 |
|- | |- | ||
− | | || || || || ADC_KEY_IN1 || style="background:black; color:white"| | + | | || || || || ADC_KEY_IN1 || style="background:black; color:white"| 29 || || style="background:black; color:white"|30 || GPIO2_B6 || I2S0_8CH_SDI1 || PDM_SDI1_M2 || || 78 |
|- | |- | ||
− | | || || || || MICBIAS2 || style="background:black; color:white"| | + | | || || || || MICBIAS2 || style="background:black; color:white"| 31 || || style="background:black; color:white"|32|| GPIO2_B7 || I2S0_8CH_SDI2 || PDM_SDI2_M2 || || 79 |
|- | |- | ||
− | | || || || || MICBIAS1 || style="background:black; color:white"| | + | | || || || || MICBIAS1 || style="background:black; color:white"| 33 || || style="background:black; color:white"|34 || GPIO2_C0 || I2S0_8CH_SDI3 || PDM_SDI3_M2 || || 80 |
|- | |- | ||
− | | || || || || MICN8 || style="background:black; color:white"| | + | | || || || || MICN8 || style="background:black; color:white"| 35 || || style="background:black; color:white"|36 || MCIP8 || || || || |
|- | |- | ||
− | | || || || || MICN7 || style="background:black; color:white"| | + | | || || || || MICN7 || style="background:black; color:white"|37 || || style="background:black; color:white"|38 || MCIP7 || || || || |
|- | |- | ||
− | | 109 || UART3_TX || I2C3_SCL_M1 || SPI1_CSN0 || GPOI3_B5 || style="background:black; color: | + | | 109 || UART3_TX || I2C3_SCL_M1 || SPI1_CSN0 || GPOI3_B5 || style="background:black; color:green"|39|| || style="background:black; color:green"|40|| GPOI3_B4 || SPI1_MOSI || I2C3_SDA_M1 || UART3_RX || 108 |
|- | |- | ||
− | | 107 || || || SPI1_CLK || GPOI3_B3 || style="background:black; color: | + | | 107 || || || SPI1_CLK || GPOI3_B3 || style="background:black; color:green"|41 || || style="background:black; color:green"|42 || GPOI3_B2 || SPI1_MISO || || || 106 |
|- | |- | ||
− | | 76 || |||| I2S0_8CH_SDO3 || GPIO2_B4 || style="background:black; color:white"| | + | | 76 || |||| I2S0_8CH_SDO3 || GPIO2_B4 || style="background:black; color:white"|43|| || style="background:black; color:white"|44 || GPIO2_B3 || I2S0_8CH_SDO2 || || || 75 |
|- | |- | ||
− | | 72 || || || I2S0_8CH_LRCK_RX || GPIO2_B0 || style="background:black; color:white"| | + | | 72 || || || I2S0_8CH_LRCK_RX || GPIO2_B0 || style="background:black; color:white"|45 || ||style="background:black; color:white"|46 || GPIO2_A6 || I2S0_8CH_SCLK_RX || PDM_CLK_S_M2 || || 70 |
|- | |- | ||
− | | || || || || MICN2 || style="background:black; color:white"| | + | | || || || || MICN2 || style="background:black; color:white"|47 || || style="background:black; color:white"|48 || MCIP2 || || || || |
|- | |- | ||
− | | || || || || MICN1 || style="background:black; color:white"| | + | | || || || || MICN1 || style="background:black; color:white"|49|| || style="background:black; color:white"|50 || MCIP1 || || || || |
|- | |- | ||
− | | || || || || LINEOUT_R || style="background:black; color:white"| | + | | || || || || LINEOUT_R || style="background:black; color:white"|51 || || style="background:black; color:white"|52|| LINEOUT_L || || || || |
|} | |} | ||
Line 333: | Line 337: | ||
==== More details about V13 Headers ==== | ==== More details about V13 Headers ==== | ||
+ | * The difference between V12 and V13 is determined by PIN#13/14/15/16 on 26-pin Header 2. | ||
* Pins marked with color orange are designed for default debug console. | * Pins marked with color orange are designed for default debug console. | ||
* PWM: x2, PWM2/PWM3 | * PWM: x2, PWM2/PWM3 | ||
Line 339: | Line 344: | ||
* UART: x4, UART0/UART1/UART2/UART3 | * UART: x4, UART0/UART1/UART2/UART3 | ||
* ADC: x1, ADC_IN0. The max input voltage is 1.8V. | * ADC: x1, ADC_IN0. The max input voltage is 1.8V. | ||
+ | * When I2C3 is used, you should only select one of the two groups, PIN#11/13 on 26-pin Header 1 and PIN#13/14 on 26-pin Header 2. | ||
== IO Voltage == | == IO Voltage == | ||
Line 367: | Line 373: | ||
echo 1 > value # output high | echo 1 > value # output high | ||
echo 0 > value # output low | echo 0 > value # output low | ||
+ | |||
+ | == Power supply == | ||
+ | |||
+ | 1.The pins, <code>PIN#2 and PIN#4</code>, can supply power of <code>5V</code>. The maximum current that can output depends on the power adapter. | ||
+ | |||
+ | 2.The pins, <code>PIN#1 and PIN#17</code>, can supply power of <code>3.3V</code>. The maximum current that can output is <code>200mA</code>. |
Latest revision as of 01:49, 21 September 2022
ROCK Pi S > Hardware > GPIO
General purpose input-output (GPIO) connector
ROCK Pi S has two 26-pin expansion header. Each pin is distinguished by color, pin name and location are named as bellow.
Hardware V10
26-pin Header 1
GPIO number | Func4 | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | Func4 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | |||||||||
12 | I2C1_SCL | GPIO0_B4 | 3 | 4 | +5.0V | |||||||
11 | I2C1_SDA | GPIO0_B3 | 5 | 6 | GND | |||||||
69 | I2S0_SCLK_TX | GPIO2_A5 | 7 | 8 | GPIO4_D3 | SDMMC_D3 | UART2_TX_M1 | PMU_ST3 | 155 | |||
64 | SPI0_MISO | UART0_RX | GPIO2_A0 | 9 | 10 | GPIO4_D2 | SDMMC_D2 | UART2_RX_M1 | PMU_ST2 | 154 | ||
65 | SPI0_MOSI | UART0_TX | GPIO2_A1 | 11 | 12 | GPIO0_C0 | PWM3 | I2C3_SCL_M0 | 16 | |||
66 | I2C2_SDA | SPI0_CLK | UART0_CTSN | GPIO2_A2 | 13 | 14 | GND | |||||
67 | I2C2_SCL | SPI0_CSN0 | UART0_RTSN | GPIO2_A3 | 15 | 16 | GPIO2_A7 | I2S0_8CH_LRCK_TX | 71 | |||
+3.3V | 17 | 18 | GPIO2_B1 | I2S0_8CH_SDO0 | 73 | |||||||
55 | SPI2_MOSI | UART2_TX_M0 | UART1_RTSN | GPIO1_C7 | 19 | 20 | GND | |||||
54 | SPI2_MISO | UART2_RX_M0 | UART1_CTSN | GPIO1_C6 | 21 | 22 | GPIO0_B6 | PWM1 | 14 | |||
56 | SPI2_CLK | I2C0_SDA | UART1_RX | GPIO1_D0 | 23 | 24 | GPIO1_D1 | UART1_TX | I2C0_SCL | SPI2_CSN0 | 57 | |
GND | 25 | 26 | GPIO0_B7 | PWM2 | I2C3_SDA_M0 | 15 |
Warning
- Pin#8 and Pin#10 cannot be used as GPIO, UART function pins since they are the data pins of SDMMC.
26-pin Header 2
GPIO number | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|
GND | 27 | 28 | GPIO2_A6 | I2S0_8CH_SCLK_RX | PDM_CLK_S_M2 | 70 | ||||
ADC_KEY_IN1 | 29 | 30 | GPIO2_B5 | I2S0_8CH_SDI0 | PDM_SDI0_M2 | 77 | ||||
MICBIAS2 | 31 | 32 | GPIO2_B6 | I2S0_8CH_SDI1 | PDM_SDI1_M2 | 78 | ||||
MICBIAS1 | 33 | 34 | GPIO2_B7 | I2S0_8CH_SDI2 | PDM_SDI2_M2 | 79 | ||||
MICN8 | 35 | 36 | MCIP8 | |||||||
MICN7 | 37 | 38 | MCIP7 | |||||||
MICN6 | 39 | 40 | MCIP6 | |||||||
MICN5 | 41 | 42 | MCIP5 | |||||||
MICN4 | 43 | 44 | MCIP4 | |||||||
MICN3 | 45 | 46 | MCIP3 | |||||||
MICN2 | 47 | 48 | MCIP2 | |||||||
MICN1 | 49 | 50 | MCIP1 | |||||||
LINEOUT_R | 51 | 52 | LINEOUT_L |
More details about V10 Headers
- Pins marked with color orange are designed for default debug console.
- PWM: x3, PWM1/PWM2/PWM3
- SPI: x2, SPI0/SPI2
- I2C: x4, I2C0/I2C1/I2C2/I2C3
- UART: x3, UART0/UART1/UART2
Hardware V11
26-pin Header 1
GPIO number | Func4 | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | Func4 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | |||||||||
11 | I2C1_SDA | GPIO0_B3 | 3 | 4 | +5.0V | |||||||
12 | I2C1_SCL | GPIO0_B4 | 5 | 6 | GND | |||||||
69 | I2S0_SCLK_TX | GPIO2_A5 | 7 | 8 | GPIO2_A1 | UART0_TX | SPI0_MOSI | 65 | ||||
GND | 9 | 10 | GPIO2_A0 | UART0_RX | SPI0_MISO | 64 | ||||||
15 | I2C3_SDA_M0 | PWM2 | GPIO0_B7 | 11 | 12 | GPIO2_A2 | UART0_CTSN | SPI0_CLK | I2C2_SDA | 66 | ||
16 | I2C3_SCL_M0 | PWM3 | GPIO0_C0 | 13 | 14 | GND | ||||||
17 | SPDIF_TX | GPIO0_C1 | 15 | 16 | GPIO2_A3 | UART0_RTSN | SPI0_CSN0 | I2C2_SCL | 67 | |||
+3.3V | 17 | 18 | GPIO2_B1 | I2S0_8CH_SDO0 | 73 | |||||||
55 | SPI2_MOSI | UART2_TX_M0 | UART1_RTSN | GPIO1_C7 | 19 | 20 | GND | |||||
54 | SPI2_MISO | UART2_RX_M0 | UART1_CTSN | GPIO1_C6 | 21 | 22 | GPIO0_B6 | PWM1 | 14 | |||
56 | SPI2_CLK | I2C0_SDA | UART1_RX | GPIO1_D0 | 23 | 24 | GPIO1_D1 | UART1_TX | I2C0_SCL | SPI2_CSN0 | 57 | |
GND | 25 | 26 | ADC_IN0 |
26-pin Header 2
GPIO number | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|
GND | 27 | 28 | GPIO2_A6 | I2S0_8CH_SCLK_RX | PDM_CLK_S_M2 | 70 | ||||
ADC_KEY_IN1 | 29 | 30 | GPIO2_B5 | I2S0_8CH_SDI0 | PDM_SDI0_M2 | 77 | ||||
MICBIAS2 | 31 | 32 | GPIO2_B6 | I2S0_8CH_SDI1 | PDM_SDI1_M2 | 78 | ||||
MICBIAS1 | 33 | 34 | GPIO2_B7 | I2S0_8CH_SDI2 | PDM_SDI2_M2 | 79 | ||||
MICN8 | 35 | 36 | MCIP8 | |||||||
MICN7 | 37 | 38 | MCIP7 | |||||||
MICN6 | 39 | 40 | MCIP6 | |||||||
MICN5 | 41 | 42 | MCIP5 | |||||||
MICN4 | 43 | 44 | MCIP4 | |||||||
MICN3 | 45 | 46 | MCIP3 | |||||||
MICN2 | 47 | 48 | MCIP2 | |||||||
MICN1 | 49 | 50 | MCIP1 | |||||||
LINEOUT_R | 51 | 52 | LINEOUT_L |
More details about V11 Headers
- Pins marked with color orange are designed for default debug console.
- PWM: x3, PWM1/PWM2/PWM3
- SPI: x2, SPI0/SPI2
- I2C: x4, I2C0/I2C1/I2C2/I2C3
- UART: x3, UART0/UART1/UART2
- ADC: x1, ADC_IN0. The max input voltage is 1.8V.
Hardware V12
26-pin Header 1
GPIO number | Func4 | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | Func4 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | |||||||||
11 | I2C1_SDA | GPIO0_B3 | 3 | 4 | +5.0V | |||||||
12 | I2C1_SCL | GPIO0_B4 | 5 | 6 | GND | |||||||
68 | PDM_CLK_M_M2 | I2S0_8CH_MCLK | GPIO2_A4 | 7 | 8 | GPIO2_A1 | UART0_TX | SPI0_MOSI | 65 | |||
GND | 9 | 10 | GPIO2_A0 | UART0_RX | SPI0_MISO | 64 | ||||||
15 | I2C3_SDA_M0 | PWM2 | GPIO0_B7 | 11 | 12 | GPIO2_A5 | I2S0_8CH_SCLK_TX | 69 | ||||
16 | I2C3_SCL_M0 | PWM3 | GPIO0_C0 | 13 | 14 | GND | ||||||
17 | SPDIF_TX | GPIO0_C1 | 15 | 16 | GPIO2_B2 | I2S0_8CH_SDO1 | 74 | |||||
+3.3V | 17 | 18 | GPIO2_B1 | I2S0_8CH_SDO0 | 73 | |||||||
55 | SPI2_MOSI | UART2_TX_M0 | UART1_RTSN | GPIO1_C7 | 19 | 20 | GND | |||||
54 | SPI2_MISO | UART2_RX_M0 | UART1_CTSN | GPIO1_C6 | 21 | 22 | GPIO2_A7 | I2S0_8CH_LRCK_TX | 71 | |||
56 | SPI2_CLK | I2C0_SDA | UART1_RX | GPIO1_D0 | 23 | 24 | GPIO1_D1 | UART1_TX | I2C0_SCL | SPI2_CSN0 | 57 | |
GND | 25 | 26 | ADC_IN0 |
26-pin Header 2
GPIO number | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|
GND | 27 | 28 | GPIO2_B5 | I2S0_8CH_SDI0 | PDM_SDI0_M2 | 77 | ||||
ADC_KEY_IN1 | 29 | 30 | GPIO2_B6 | I2S0_8CH_SDI1 | PDM_SDI1_M2 | 78 | ||||
MICBIAS2 | 31 | 32 | GPIO2_B7 | I2S0_8CH_SDI2 | PDM_SDI2_M2 | 79 | ||||
MICBIAS1 | 33 | 34 | GPIO2_C0 | I2S0_8CH_SDI3 | PDM_SDI3_M2 | 80 | ||||
MICN8 | 35 | 36 | MCIP8 | |||||||
MICN7 | 37 | 38 | MCIP7 | |||||||
MICN6 | 39 | 40 | MCIP6 | |||||||
MICN5 | 41 | 42 | MCIP5 | |||||||
76 | I2S0_8CH_SDO3 | GPIO2_B4 | 43 | 44 | GPIO2_B3 | I2S0_8CH_SDO2 | 75 | |||
72 | I2S0_8CH_LRCK_RX | GPIO2_B0 | 45 | 46 | GPIO2_A6 | I2S0_8CH_SCLK_RX | PDM_CLK_S_M2 | 70 | ||
MICN2 | 47 | 48 | MCIP2 | |||||||
MICN1 | 49 | 50 | MCIP1 | |||||||
LINEOUT_R | 51 | 52 | LINEOUT_L |
More details about V12 Headers
- Pins marked with color orange are designed for default debug console.
- PWM: x2, PWM2/PWM3
- SPI: x1, SPI2
- I2C: x3, I2C0/I2C1/I2C3
- UART: x3, UART0/UART1/UART2
- ADC: x1, ADC_IN0. The max input voltage is 1.8V.
Hardware V13
26-pin Header 1
GPIO number | Func4 | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | Func4 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | |||||||||
11 | I2C1_SDA | GPIO0_B3 | 3 | 4 | +5.0V | |||||||
12 | I2C1_SCL | GPIO0_B4 | 5 | 6 | GND | |||||||
68 | PDM_CLK_M_M2 | I2S0_8CH_MCLK | GPIO2_A4 | 7 | 8 | GPIO2_A1 | UART0_TX | SPI0_MOSI | 65 | |||
GND | 9 | 10 | GPIO2_A0 | UART0_RX | SPI0_MISO | 64 | ||||||
15 | I2C3_SDA_M0 | PWM2 | GPIO0_B7 | 11 | 12 | GPIO2_A5 | I2S0_8CH_SCLK_TX | 69 | ||||
16 | I2C3_SCL_M0 | PWM3 | GPIO0_C0 | 13 | 14 | GND | ||||||
17 | SPDIF_TX | GPIO0_C1 | 15 | 16 | GPIO2_B2 | I2S0_8CH_SDO1 | 74 | |||||
+3.3V | 17 | 18 | GPIO2_B1 | I2S0_8CH_SDO0 | 73 | |||||||
55 | SPI2_MOSI | UART2_TX_M0 | UART1_RTSN | GPIO1_C7 | 19 | 20 | GND | |||||
54 | SPI2_MISO | UART2_RX_M0 | UART1_CTSN | GPIO1_C6 | 21 | 22 | GPIO2_A7 | I2S0_8CH_LRCK_TX | 71 | |||
56 | SPI2_CLK | I2C0_SDA | UART1_RX | GPIO1_D0 | 23 | 24 | GPIO1_D1 | UART1_TX | I2C0_SCL | SPI2_CSN0 | 57 | |
GND | 25 | 26 | ADC_IN0 |
26-pin Header 2
GPIO number | Func4 | Func3 | Func2 | Func1 | Pin# | Pin# | Func1 | Func2 | Func3 | Func4 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
GND | 27 | 28 | GPIO2_B5 | I2S0_8CH_SDI0 | PDM_SDI0_M2 | 77 | ||||||
ADC_KEY_IN1 | 29 | 30 | GPIO2_B6 | I2S0_8CH_SDI1 | PDM_SDI1_M2 | 78 | ||||||
MICBIAS2 | 31 | 32 | GPIO2_B7 | I2S0_8CH_SDI2 | PDM_SDI2_M2 | 79 | ||||||
MICBIAS1 | 33 | 34 | GPIO2_C0 | I2S0_8CH_SDI3 | PDM_SDI3_M2 | 80 | ||||||
MICN8 | 35 | 36 | MCIP8 | |||||||||
MICN7 | 37 | 38 | MCIP7 | |||||||||
109 | UART3_TX | I2C3_SCL_M1 | SPI1_CSN0 | GPOI3_B5 | 39 | 40 | GPOI3_B4 | SPI1_MOSI | I2C3_SDA_M1 | UART3_RX | 108 | |
107 | SPI1_CLK | GPOI3_B3 | 41 | 42 | GPOI3_B2 | SPI1_MISO | 106 | |||||
76 | I2S0_8CH_SDO3 | GPIO2_B4 | 43 | 44 | GPIO2_B3 | I2S0_8CH_SDO2 | 75 | |||||
72 | I2S0_8CH_LRCK_RX | GPIO2_B0 | 45 | 46 | GPIO2_A6 | I2S0_8CH_SCLK_RX | PDM_CLK_S_M2 | 70 | ||||
MICN2 | 47 | 48 | MCIP2 | |||||||||
MICN1 | 49 | 50 | MCIP1 | |||||||||
LINEOUT_R | 51 | 52 | LINEOUT_L |
More details about V13 Headers
- The difference between V12 and V13 is determined by PIN#13/14/15/16 on 26-pin Header 2.
- Pins marked with color orange are designed for default debug console.
- PWM: x2, PWM2/PWM3
- SPI: x2, SPI1, SPI2
- I2C: x3, I2C0/I2C1/I2C3
- UART: x4, UART0/UART1/UART2/UART3
- ADC: x1, ADC_IN0. The max input voltage is 1.8V.
- When I2C3 is used, you should only select one of the two groups, PIN#11/13 on 26-pin Header 1 and PIN#13/14 on 26-pin Header 2.
IO Voltage
RK3308 have two IO voltages, 1.8V/3.3V. For ROCK Pi S, the voltage level of GPIOs showed in the tables above are 3.3V and tolerance of those are 3.63V. For hardware V11 and V12, an ADC input is included (ADC_IN0). This ADC has an input voltage range of 0-1.8V.
GPIO number
Rockchip RK3308 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_D3(PIN8 on 26PIN GPIO) as an example:
GPIO4_D3 = 32*4 + 8*3 + 3 = 155
To set GPIO4_D3 output
cd /sys/class/gpio echo 155 > export cd gpio155 echo out > direction echo 1 > value # output high echo 0 > value # output low
Power supply
1.The pins, PIN#2 and PIN#4
, can supply power of 5V
. The maximum current that can output depends on the power adapter.
2.The pins, PIN#1 and PIN#17
, can supply power of 3.3V
. The maximum current that can output is 200mA
.