Difference between revisions of "Rock5/hardware/5a/gpio"
(12 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
ROCK 5A has one 40-pin expansion header. Each pin is distinguished by color. | ROCK 5A has one 40-pin expansion header. Each pin is distinguished by color. | ||
+ | |||
+ | <div class="col-md-12 "> | ||
+ | <div class="panel panel-midnight-white"> | ||
+ | <div class="panel-heading"><h3>Hardware X1.2</h3></div> | ||
+ | <div class="panel-body"> | ||
+ | |||
+ | {| class="wikitable" style="text-align:center;" | ||
+ | |- style="font-weight:bold;" | ||
+ | ! style="vertical-align:middle;" | GPIO number | ||
+ | ! Function7 | ||
+ | ! style="vertical-align:middle;" | Function6 | ||
+ | ! style="vertical-align:middle;" | Function5 | ||
+ | ! style="vertical-align:middle;" | Function4 | ||
+ | ! style="vertical-align:middle;" | Function3 | ||
+ | ! style="vertical-align:middle;" | Function2 | ||
+ | ! style="vertical-align:middle;" | Function1 | ||
+ | ! style="vertical-align:middle;" | Pin# | ||
+ | ! style="vertical-align:middle;" | | ||
+ | ! style="vertical-align:middle;" | Pin# | ||
+ | ! style="vertical-align:middle;" | Function1 | ||
+ | ! style="vertical-align:middle;" | Function2 | ||
+ | ! style="vertical-align:middle;" | Function3 | ||
+ | ! style="vertical-align:middle;" | Function4 | ||
+ | ! style="vertical-align:middle;" | Function5 | ||
+ | ! style="vertical-align:middle;" | Function6 | ||
+ | ! style="vertical-align:middle;" | Function7 | ||
+ | ! style="vertical-align:middle;" | GPIO number | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | +3.3V | ||
+ | | style="vertical-align:middle; background-color:#FF0;" | 1 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#F00;" | 2 | ||
+ | | style="vertical-align:middle;" | +5.0V | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 63 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | PWM15_IR_M3 | ||
+ | | style="vertical-align:middle;" | UART1_CTSN_M1 | ||
+ | | style="vertical-align:middle;" | I2C8_SDA_M2 | ||
+ | | style="vertical-align:middle;" | GPIO1_D7 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 3 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#F00;" | 4 | ||
+ | | style="vertical-align:middle;" | +5.0V | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 62 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | PWM14_M2 | ||
+ | | style="vertical-align:middle;" | UART1_RTSN_M1 | ||
+ | | style="vertical-align:middle;" | I2C8_SCL_M2 | ||
+ | | style="vertical-align:middle;" | GPIO1_D6 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 5 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#000000; color:#F9F9F9;" | 6 | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 43 | ||
+ | | style="text-align:left;" | | ||
+ | | | ||
+ | | | ||
+ | | UART4_TX_M2 | ||
+ | | SPI0_CLK_M2 | ||
+ | | PDM1_CLK1_M1 | ||
+ | | style="vertical-align:middle;" | GPIO1_B3 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 7 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 8 | ||
+ | | style="vertical-align:middle;" | GPIO0_B5 | ||
+ | | style="vertical-align:middle; background-color:#FF8D02;" | UART2_TX_M0 | ||
+ | | style="vertical-align:middle;" | I2C1_SCL_M0 | ||
+ | | style="vertical-align:middle; background-color:#FFF;" | I2S1_MCLK_M1 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 13 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 9 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 10 | ||
+ | | style="vertical-align:middle;" | GPIO0_B6 | ||
+ | | style="vertical-align:middle; background-color:#FF8D02;" | UART2_RX_M0 | ||
+ | | style="vertical-align:middle;" | I2C1_SDA_M0 | ||
+ | | style="vertical-align:middle; background-color:#FFF;" | I2S1_SCLK_M1 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 14 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 139 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | CAN1_TX_M1 | ||
+ | | style="vertical-align:middle;" | PWM15_IR_M1 | ||
+ | | style="vertical-align:middle;" | I2S1_SDO2_M0 | ||
+ | | style="vertical-align:middle;" | UART8_CTSN_M0 | ||
+ | | style="vertical-align:middle;" | I2C7_SDA_M3 | ||
+ | | style="vertical-align:middle;" | GPIO4_B3 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 11 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 12 | ||
+ | | style="vertical-align:middle;" | GPIO4_A1 | ||
+ | | style="vertical-align:middle;" | SPI0_MOSI_M1 | ||
+ | | style="vertical-align:middle;" | UART9_CTSN_M1 | ||
+ | | style="vertical-align:middle;" | I2S1_SCLK_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 129 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 138 | ||
+ | | style="text-align:left;" | CAN1_RX_M1 | ||
+ | | style="vertical-align:middle;" | PWM14_M1 | ||
+ | | style="vertical-align:middle;" | I2S1_SDO1_M0 | ||
+ | | style="vertical-align:middle;" | UART8_RTSN_M0 | ||
+ | | style="vertical-align:middle;" | SPI0_CS0_M1 | ||
+ | | style="vertical-align:middle;" | I2C7_SCL_M3 | ||
+ | | style="vertical-align:middle;" | GPIO4_B2 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 13 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 14 | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 140 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | I2S1_SDO3_M0 | ||
+ | | style="vertical-align:middle;" | SPDIF0_TX_M1 | ||
+ | | style="vertical-align:middle;" | PWM11_IR_M1 | ||
+ | | style="vertical-align:middle;" | UART9_TX_M1 | ||
+ | | style="vertical-align:middle;" | GPIO4_B4 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 15 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 16 | ||
+ | | style="vertical-align:middle;" | GPIO1_A5 | ||
+ | | style="vertical-align:middle;" | SPI2_MOSI_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 37 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | +3.3V | ||
+ | | style="vertical-align:middle; background-color:#FF0;" | 17 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 18 | ||
+ | | style="vertical-align:middle;" | GPIO1_B0 | ||
+ | | style="vertical-align:middle;" | PDM1_SDI1_M1 | ||
+ | | style="vertical-align:middle;" | SPI2_CS1_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 40 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 33 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | UART6_TX_M1 | ||
+ | | style="vertical-align:middle;" | SPI4_MOSI_M2 | ||
+ | | style="vertical-align:middle;" | I2C2_SCL_M4 | ||
+ | | style="vertical-align:middle;" | GPIO1_A1 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 19 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 20 | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 32 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | UART6_RX_M1 | ||
+ | | style="vertical-align:middle;" | SPI4_MISO_M2 | ||
+ | | style="vertical-align:middle;" | I2C2_SDA_M4 | ||
+ | | style="vertical-align:middle;" | GPIO1_A0 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 21 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 22 | ||
+ | | style="vertical-align:middle;" | GPIO1_B5 | ||
+ | | style="vertical-align:middle;" | SPI0_CS1_M2 | ||
+ | | style="vertical-align:middle;" | UART7_TX_M2 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 45 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 34 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | PWM0_M2 | ||
+ | | style="vertical-align:middle;" | UART6_RTSN_M1 | ||
+ | | style="vertical-align:middle;" | SPI4_CLK_M2 | ||
+ | | style="vertical-align:middle;" | I2C4_SDA_M3 | ||
+ | | style="vertical-align:middle;" | GPIO1_A2 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 23 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 24 | ||
+ | | style="vertical-align:middle;" | GPIO1_A3 | ||
+ | | style="vertical-align:middle;" | I2C4_SCL_M3 | ||
+ | | style="vertical-align:middle;" | SPI4_CS0_M2 | ||
+ | | style="vertical-align:middle;" | UART6_CTSN_M1 | ||
+ | | style="vertical-align:middle;" | PWM1_M2 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 35 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 25 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 26 | ||
+ | | style="vertical-align:middle;" | GPIO1_A4 | ||
+ | | style="vertical-align:middle;" | SPI2_MISO_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 36 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 23 | ||
+ | | style="text-align:left;" | SPI0_MISO_M0 | ||
+ | | style="vertical-align:middle;" | I2S1_SDI2_M1 | ||
+ | | style="vertical-align:middle;" | I2C6_SDA_M0 | ||
+ | | style="vertical-align:middle;" | PDM0_SDI0_M1 | ||
+ | | style="vertical-align:middle;" | UART1_RTSN_M2 | ||
+ | | style="vertical-align:middle;" | PWM6_M0 | ||
+ | | style="vertical-align:middle;" | GPIO0_C7 | ||
+ | | style="vertical-align:middle; background-color:#00F; color:#FFF;" | 27 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#00F; color:#FFF;" | 28 | ||
+ | | style="vertical-align:middle;" | GPIO0_D0 | ||
+ | | style="vertical-align:middle;" | PWM7_IR_M0 | ||
+ | | style="vertical-align:middle;" | UART1_CTSN_M2 | ||
+ | | style="vertical-align:middle;" | PDM0_SDI1_M1 | ||
+ | | style="vertical-align:middle;" | I2C6_SCL_M0 | ||
+ | | style="vertical-align:middle;" | I2S1_SDI3_M1 | ||
+ | | style="vertical-align:middle;" | SPI3_MISO_M2 | ||
+ | | style="vertical-align:middle;" | 24 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 42 | ||
+ | | style="text-align:left;" | | ||
+ | | | ||
+ | | | ||
+ | | UART4_RX_M2 | ||
+ | | SPI0_MOSI_M2 | ||
+ | | PDM1_SDI3_M1 | ||
+ | | style="vertical-align:middle;" | GPIO1_B2 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 29 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 30 | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 41 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | SPI0_MISO_M2 | ||
+ | | PDM1_SDI2_M1 | ||
+ | | style="vertical-align:middle;" | GPIO1_B1 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 31 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 32 | ||
+ | | style="vertical-align:middle;" | GPIO4_B0 | ||
+ | | style="vertical-align:middle;" | I2C6_SDA_M3 | ||
+ | | style="vertical-align:middle;" | SPI2_CS1_M1 | ||
+ | | UART8_TX_M0 | ||
+ | | I2S1_SDI3_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 136 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 44 | ||
+ | | style="text-align:left;" | | ||
+ | | | ||
+ | | | ||
+ | | UART7_RX_M2 | ||
+ | | SPI0_CS0_M2 | ||
+ | | PDM1_CLK0_M1 | ||
+ | | style="vertical-align:middle;" | GPIO1_B4 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 33 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#330001; color:#FFF;" | 34 | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | 128 | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | I2S1_MCLK_M0 | ||
+ | | style="vertical-align:middle;" | UART9_RTSN_M1 | ||
+ | | style="vertical-align:middle;" | SPI0_MISO_M1 | ||
+ | | style="vertical-align:middle;" | GPIO4_A0 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 35 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 36 | ||
+ | | style="vertical-align:middle;" | GPIO4_A2 | ||
+ | | style="vertical-align:middle;" | SPI0_CLK_M1 | ||
+ | | style="vertical-align:middle;" | I2S1_LRCK_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 130 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | SARADC_VIN2 | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 37 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 38 | ||
+ | | style="vertical-align:middle;" | GPIO4_A5 | ||
+ | | style="vertical-align:middle;" | I2C3_SDA_M2 | ||
+ | | style="vertical-align:middle;" | UART3_TX_M2 | ||
+ | | I2S1_SDI0_M0 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 133 | ||
+ | |- | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="text-align:left;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | GND | ||
+ | | style="vertical-align:middle; background-color:#333; color:#FFF;" | 39 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle; background-color:#008000; color:#FFF;" | 40 | ||
+ | | style="vertical-align:middle;" | GPIO4_B1 | ||
+ | | style="vertical-align:middle;" | I2C6_SCL_M3 | ||
+ | | style="vertical-align:middle;" | SPI0_CS1_M1 | ||
+ | | style="vertical-align:middle;" | UART8_RX_M0 | ||
+ | | style="vertical-align:middle;" | I2S1_SDO0_M0 | ||
+ | | style="vertical-align:middle;" | SPDIF1_TX_M1 | ||
+ | | style="vertical-align:middle;" | | ||
+ | | style="vertical-align:middle;" | 137 | ||
+ | |} | ||
+ | |||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <div class="clearfix"></div> | ||
+ | |||
+ | ==== More details about X1.2 Headers ==== | ||
+ | |||
+ | * Pins marked with color orange are designed for debug console. | ||
+ | * PWM: X6 | ||
+ | ** PWM0 | ||
+ | *** Pin#23 PWM0_M2 | ||
+ | ** PWM6 | ||
+ | *** Pin#27 PWM6_M0 | ||
+ | ** PWM7 | ||
+ | *** Pin#28 PWM7_IR_M0 | ||
+ | ** PWM11 | ||
+ | *** Pin#15 PWM11_IR_M1 | ||
+ | ** PWM14 | ||
+ | *** Pin#5 PWM14_M2 | ||
+ | *** Pin#13 PWM14_M1 | ||
+ | ** PWM15 | ||
+ | *** Pin#3 PWM15_IR_M3 | ||
+ | *** Pin#11 PWM15_IR_M1 | ||
+ | * I2C: X5 | ||
+ | ** I2C-1 | ||
+ | *** Pin#10 I2C1_SDA_M0 + Pin#8 I2C1_SCL_M0 | ||
+ | ** I2C-4 | ||
+ | *** Pin#23 I2C4_SDA_M3 + Pin#24 I2C4_SCL_M3 | ||
+ | ** I2C-6 | ||
+ | *** Pin#27 I2C6_SDA_M0 + Pin#28 I2C6_SCL_M0 | ||
+ | *** Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor. | ||
+ | ** I2C-7 | ||
+ | *** Pin#11 I2C7_SDA_M3 + Pin#13 I2C7_SCL_M3 | ||
+ | *** Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor. | ||
+ | ** I2C-8 | ||
+ | *** Pin#3 I2C8_SDA_M2 + Pin#5 I2C8_SCL_M2 | ||
+ | *** Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor. | ||
+ | * SPI: X3 | ||
+ | ** SPI0 | ||
+ | ** SPI4 | ||
+ | * UART: X5 | ||
+ | ** UART2 | ||
+ | ** UART4 | ||
+ | ** UART6 | ||
+ | ** UART7 | ||
+ | ** UART8 | ||
+ | * ADC: X1 | ||
+ | ** Pin#37 SARADC_VIN2 | ||
+ | ** Input voltage: <code>0-3.3 V</code> | ||
+ | * CAN: X1, CAN1 | ||
+ | * USB 2.0: X1, USB_DP(PIN#27) + USB_DM(PIN#28) | ||
+ | ** When selecting the USB function, we need to rework the hardware like this. | ||
+ | *** Add R104 and R106 | ||
+ | *** Remove R169 and R170 | ||
+ | * I2S | ||
+ | * PDM | ||
+ | * S/PDIF | ||
+ | |||
+ | <div class="col-md-12 "> | ||
+ | <div class="panel panel-midnight-white"> | ||
+ | <div class="panel-heading"><h3>Hardware X1.1</h3></div> | ||
+ | <div class="panel-body"> | ||
{| class="wikitable" style="vertical-align:middle;" | {| class="wikitable" style="vertical-align:middle;" | ||
Line 412: | Line 903: | ||
|} | |} | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
− | ==== | + | <div class="clearfix"></div> |
+ | |||
+ | ==== More details about X1.1 Headers ==== | ||
* Pins marked with color orange are designed for debug console. | * Pins marked with color orange are designed for debug console. | ||
* PWM: X6 | * PWM: X6 | ||
** PWM0 | ** PWM0 | ||
− | + | *** Pin#11 PWM0_M2 | |
− | *** Pin#11 | + | |
** PWM1 | ** PWM1 | ||
− | + | *** Pin#13 PWM1_M2 | |
− | *** Pin#13 | + | |
** PWM3 | ** PWM3 | ||
− | + | *** Pin#24 PWM3_IR_M3 | |
− | *** Pin#24 | + | |
** PWM11 | ** PWM11 | ||
− | + | *** Pin#15 PWM11_IR_M1 | |
− | *** Pin#15 | + | |
** PWM14 | ** PWM14 | ||
− | + | *** Pin#16 PWM14_M2 | |
− | *** Pin#16 | + | *** Pin#28 PWM14_M1 |
− | *** Pin#28 | + | |
** PWM15 | ** PWM15 | ||
− | + | *** Pin#18 PWM15_IR_M3 | |
− | *** Pin#18 | + | *** Pin#27 PWM15_IR_M1 |
− | *** Pin#27 | + | * I2C: X5 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * I2C: | + | |
** I2C-1 | ** I2C-1 | ||
− | ** | + | *** Pin#10 I2C1_SDA_M0 + Pin#8 I2C1_SCL_M0 |
** I2C-4 | ** I2C-4 | ||
+ | *** Pin#11 I2C4_SDA_M3 + Pin#13 I2C4_SCL_M3 | ||
** I2C-6 | ** I2C-6 | ||
+ | *** Pin#32 I2C6_SDA_M3 + Pin#40 I2C6_SCL_M3 | ||
** I2C-7 | ** I2C-7 | ||
+ | *** Pin#27 I2C7_SDA_M3 + Pin#28 I2C7_SCL_M3 | ||
+ | *** Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor. | ||
** I2C-8 | ** I2C-8 | ||
− | * UART: | + | *** Pin#18 I2C8_SDA_M2 + Pin#16 I2C8_SCL_M2 |
− | ** UART6 | + | * SPI: X3 |
− | ** UART7 | + | ** SPI0 |
− | ** UART8 | + | ** SPI2 |
+ | ** SPI4 | ||
+ | * UART: X5 | ||
+ | ** UART2-m0 | ||
+ | ** UART4-m2 | ||
+ | ** UART6-m1 | ||
+ | ** UART7-m2 | ||
+ | ** UART8-m0 | ||
* ADC: X1 | * ADC: X1 | ||
− | ** SARADC_VIN5 | + | ** Pin#26 SARADC_VIN5 |
+ | ** Input voltage: <code>0-1.8 V</code> | ||
* CAN: X1, CAN1 | * CAN: X1, CAN1 | ||
* USB 2.0: X1, USB_DP(PIN#27) + USB_DM(PIN#28) | * USB 2.0: X1, USB_DP(PIN#27) + USB_DM(PIN#28) |
Latest revision as of 03:23, 23 April 2023
ROCK 5 > Hardware > ROCK 5A hardware details > GPIO
General purpose input-output (GPIO) connector
ROCK 5A has one 40-pin expansion header. Each pin is distinguished by color.
Hardware X1.2
GPIO number | Function7 | Function6 | Function5 | Function4 | Function3 | Function2 | Function1 | Pin# | Pin# | Function1 | Function2 | Function3 | Function4 | Function5 | Function6 | Function7 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | |||||||||||||||
63 | PWM15_IR_M3 | UART1_CTSN_M1 | I2C8_SDA_M2 | GPIO1_D7 | 3 | 4 | +5.0V | |||||||||||
62 | PWM14_M2 | UART1_RTSN_M1 | I2C8_SCL_M2 | GPIO1_D6 | 5 | 6 | GND | |||||||||||
43 | UART4_TX_M2 | SPI0_CLK_M2 | PDM1_CLK1_M1 | GPIO1_B3 | 7 | 8 | GPIO0_B5 | UART2_TX_M0 | I2C1_SCL_M0 | I2S1_MCLK_M1 | 13 | |||||||
GND | 9 | 10 | GPIO0_B6 | UART2_RX_M0 | I2C1_SDA_M0 | I2S1_SCLK_M1 | 14 | |||||||||||
139 | CAN1_TX_M1 | PWM15_IR_M1 | I2S1_SDO2_M0 | UART8_CTSN_M0 | I2C7_SDA_M3 | GPIO4_B3 | 11 | 12 | GPIO4_A1 | SPI0_MOSI_M1 | UART9_CTSN_M1 | I2S1_SCLK_M0 | 129 | |||||
138 | CAN1_RX_M1 | PWM14_M1 | I2S1_SDO1_M0 | UART8_RTSN_M0 | SPI0_CS0_M1 | I2C7_SCL_M3 | GPIO4_B2 | 13 | 14 | GND | ||||||||
140 | I2S1_SDO3_M0 | SPDIF0_TX_M1 | PWM11_IR_M1 | UART9_TX_M1 | GPIO4_B4 | 15 | 16 | GPIO1_A5 | SPI2_MOSI_M0 | 37 | ||||||||
+3.3V | 17 | 18 | GPIO1_B0 | PDM1_SDI1_M1 | SPI2_CS1_M0 | 40 | ||||||||||||
33 | UART6_TX_M1 | SPI4_MOSI_M2 | I2C2_SCL_M4 | GPIO1_A1 | 19 | 20 | GND | |||||||||||
32 | UART6_RX_M1 | SPI4_MISO_M2 | I2C2_SDA_M4 | GPIO1_A0 | 21 | 22 | GPIO1_B5 | SPI0_CS1_M2 | UART7_TX_M2 | 45 | ||||||||
34 | PWM0_M2 | UART6_RTSN_M1 | SPI4_CLK_M2 | I2C4_SDA_M3 | GPIO1_A2 | 23 | 24 | GPIO1_A3 | I2C4_SCL_M3 | SPI4_CS0_M2 | UART6_CTSN_M1 | PWM1_M2 | 35 | |||||
GND | 25 | 26 | GPIO1_A4 | SPI2_MISO_M0 | 36 | |||||||||||||
23 | SPI0_MISO_M0 | I2S1_SDI2_M1 | I2C6_SDA_M0 | PDM0_SDI0_M1 | UART1_RTSN_M2 | PWM6_M0 | GPIO0_C7 | 27 | 28 | GPIO0_D0 | PWM7_IR_M0 | UART1_CTSN_M2 | PDM0_SDI1_M1 | I2C6_SCL_M0 | I2S1_SDI3_M1 | SPI3_MISO_M2 | 24 | |
42 | UART4_RX_M2 | SPI0_MOSI_M2 | PDM1_SDI3_M1 | GPIO1_B2 | 29 | 30 | GND | |||||||||||
41 | SPI0_MISO_M2 | PDM1_SDI2_M1 | GPIO1_B1 | 31 | 32 | GPIO4_B0 | I2C6_SDA_M3 | SPI2_CS1_M1 | UART8_TX_M0 | I2S1_SDI3_M0 | 136 | |||||||
44 | UART7_RX_M2 | SPI0_CS0_M2 | PDM1_CLK0_M1 | GPIO1_B4 | 33 | 34 | GND | |||||||||||
128 | I2S1_MCLK_M0 | UART9_RTSN_M1 | SPI0_MISO_M1 | GPIO4_A0 | 35 | 36 | GPIO4_A2 | SPI0_CLK_M1 | I2S1_LRCK_M0 | 130 | ||||||||
SARADC_VIN2 | 37 | 38 | GPIO4_A5 | I2C3_SDA_M2 | UART3_TX_M2 | I2S1_SDI0_M0 | 133 | |||||||||||
GND | 39 | 40 | GPIO4_B1 | I2C6_SCL_M3 | SPI0_CS1_M1 | UART8_RX_M0 | I2S1_SDO0_M0 | SPDIF1_TX_M1 | 137 |
More details about X1.2 Headers
- Pins marked with color orange are designed for debug console.
- PWM: X6
- PWM0
- Pin#23 PWM0_M2
- PWM6
- Pin#27 PWM6_M0
- PWM7
- Pin#28 PWM7_IR_M0
- PWM11
- Pin#15 PWM11_IR_M1
- PWM14
- Pin#5 PWM14_M2
- Pin#13 PWM14_M1
- PWM15
- Pin#3 PWM15_IR_M3
- Pin#11 PWM15_IR_M1
- PWM0
- I2C: X5
- I2C-1
- Pin#10 I2C1_SDA_M0 + Pin#8 I2C1_SCL_M0
- I2C-4
- Pin#23 I2C4_SDA_M3 + Pin#24 I2C4_SCL_M3
- I2C-6
- Pin#27 I2C6_SDA_M0 + Pin#28 I2C6_SCL_M0
- Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor.
- I2C-7
- Pin#11 I2C7_SDA_M3 + Pin#13 I2C7_SCL_M3
- Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor.
- I2C-8
- Pin#3 I2C8_SDA_M2 + Pin#5 I2C8_SCL_M2
- Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor.
- I2C-1
- SPI: X3
- SPI0
- SPI4
- UART: X5
- UART2
- UART4
- UART6
- UART7
- UART8
- ADC: X1
- Pin#37 SARADC_VIN2
- Input voltage:
0-3.3 V
- CAN: X1, CAN1
- USB 2.0: X1, USB_DP(PIN#27) + USB_DM(PIN#28)
- When selecting the USB function, we need to rework the hardware like this.
- Add R104 and R106
- Remove R169 and R170
- When selecting the USB function, we need to rework the hardware like this.
- I2S
- PDM
- S/PDIF
Hardware X1.1
GPIO number | Function6 | Function5 | Function4 | Function3 | Function2 | Function1 | Pin# | Pin# | Function1 | Function2 | Function3 | Function4 | Function5 | Function6 | Function7 | GPIO number | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+3.3V | 1 | 2 | +5.0V | ||||||||||||||
32 | UART6_RX_M1 | SPI4_MISO_M2 | I2C2_SDA_M4 | GPIO1_A0 | 3 | 4 | +5.0V | ||||||||||
33 | UART6_TX_M1 | SPI4_MOSI_M2 | I2C2_SCL_M4 | GPIO1_A1 | 5 | 6 | GND | ||||||||||
43 | PDM1_CLK1_M1 | UART4_TX_M2 | SPI0_CLK_M2 | GPIO1_B3 | 7 | 8 | GPIO0_B5 | UART2_TX_M0 | I2C1_SCL_M0 | I2S1_MCLK_M1 | 13 | ||||||
GND | 9 | 10 | GPIO0_B6 | UART2_RX_M0 | I2C1_SDA_M0 | I2S1_SCLK_M1 | 14 | ||||||||||
34 | PWM0_M2 | UART6_RTSN_M1 | SPI4_CLK_M2 | I2C4_SDA_M3 | GPIO1_A2 | 11 | 12 | GPIO4_A1 | SPI0_MOSI_M1 | UART9_CTSN_M1 | I2S1_SCLK_M0 | 129 | |||||
35 | PWM1_M2 | UART6_CTSN_M1 | SPI4_CS0_M2 | I2C4_SCL_M3 | GPIO1_A3 | 13 | 14 | GND | |||||||||
140 | I2S1_SDO3_M0 | SPDIF0_TX_M1 | PWM11_IR_M1 | UART9_TX_M1 | GPIO4_B4 | 15 | 16 | GPIO1_D6 | I2C8_SCL_M2 | UART1_RTSN_M1 | PWM14_M2 | 62 | |||||
+3.3V | 17 | 18 | GPIO1_D7 | I2C8_SDA_M2 | UART1_CTSN_M1 | PWM15_IR_M3 | 63 | ||||||||||
37 | SPI2_MOSI_M0 | GPIO1_A5 | 19 | 20 | GND | ||||||||||||
36 | SPI2_MISO_M0 | GPIO1_A4 | 21 | 22 | GPIO1_B5 | SPI0_CS1_M2 | UART7_TX_M2 | 45 | |||||||||
38 | SPI2_CLK_M0 | GPIO1_A6 | 23 | 24 | GPIO1_A7 | SPI2_CS0_M0 | PDM1_SDI0_M1 | PWM3_IR_M3 | 39 | ||||||||
GND | 25 | 26 | SARADC_VIN5 | ||||||||||||||
139 | CAN1_TX_M1 | I2S1_SDO2_M0 | PWM15_IR_M1 | UART8_CTSN_M0 | I2C7_SDA_M3 | GPIO4_B3 | 27 | 28 | GPIO4_B2 | I2C7_SCL_M3 | SPI0_CS0_M1 | UART8_RTSN_M0 | PWM14_M1 | I2S1_SDO1_M0 | CAN1_RX_M1 | 138 | |
42 | PDM1_SDI3_M1 | UART4_RX_M2 | SPI0_MOSI_M2 | GPIO1_B2 | 29 | 30 | GND | ||||||||||
41 | PDM1_SDI2_M1 | SPI0_MISO_M2 | GPIO1_B1 | 31 | 32 | GPIO4_B0 | I2C6_SDA_M3 | UART8_TX_M0 | I2S1_SDI3_M0 | 136 | |||||||
44 | PDM1_CLK0_M1 | UART7_RX_M2 | SPI0_CS0_M2 | GPIO1_B4 | 33 | 34 | GND | ||||||||||
128 | I2S1_MCLK_M0 | UART9_RTSN_M1 | SPI0_MISO_M1 | GPIO4_A0 | 35 | 36 | GPIO4_A2 | SPI0_CLK_M1 | I2S1_LRCK_M0 | 130 | |||||||
40 | PDM1_SDI1_M1 | SPI2_CS1_M0 | GPIO1_B0 | 37 | 38 | GPIO4_A5 | I2C3_SDA_M2 | UART3_TX_M2 | I2S1_SDI0_M0 | 133 | |||||||
GND | 39 | 40 | GPIO4_B1 | I2C6_SCL_M3 | SPI0_CS1_M1 | UART8_RX_M0 | SPDIF1_TX_M1 | I2S1_SDO0_M0 | 137 |
More details about X1.1 Headers
- Pins marked with color orange are designed for debug console.
- PWM: X6
- PWM0
- Pin#11 PWM0_M2
- PWM1
- Pin#13 PWM1_M2
- PWM3
- Pin#24 PWM3_IR_M3
- PWM11
- Pin#15 PWM11_IR_M1
- PWM14
- Pin#16 PWM14_M2
- Pin#28 PWM14_M1
- PWM15
- Pin#18 PWM15_IR_M3
- Pin#27 PWM15_IR_M1
- PWM0
- I2C: X5
- I2C-1
- Pin#10 I2C1_SDA_M0 + Pin#8 I2C1_SCL_M0
- I2C-4
- Pin#11 I2C4_SDA_M3 + Pin#13 I2C4_SCL_M3
- I2C-6
- Pin#32 I2C6_SDA_M3 + Pin#40 I2C6_SCL_M3
- I2C-7
- Pin#27 I2C7_SDA_M3 + Pin#28 I2C7_SCL_M3
- Each pin is connected to the 3.3V supply through a 2.2K pull-up resistor.
- I2C-8
- Pin#18 I2C8_SDA_M2 + Pin#16 I2C8_SCL_M2
- I2C-1
- SPI: X3
- SPI0
- SPI2
- SPI4
- UART: X5
- UART2-m0
- UART4-m2
- UART6-m1
- UART7-m2
- UART8-m0
- ADC: X1
- Pin#26 SARADC_VIN5
- Input voltage:
0-1.8 V
- CAN: X1, CAN1
- USB 2.0: X1, USB_DP(PIN#27) + USB_DM(PIN#28)
- When selecting the USB function, we need to rework the hardware like this.
- Add R104 and R106
- Remove R169 and R170
- When selecting the USB function, we need to rework the hardware like this.
- I2S
- PDM
- S/PDIF
IO Voltage
GPIO | Voltage Level | Tolerance |
---|---|---|
All GPIO | 3.3V | 3.63V |
SARADC_IN5 | 1.8V | 1.98V |
GPIO number
Rockchip RK3588 GPIO has 5 banks, GPIO0 to GPIO4, each bank has 32 pins, naming as below:
GPIO0_A0 ~ A7 GPIO0_B0 ~ B7 GPIO0_C0 ~ C7 GPIO0_D0 ~ D7 GPIO1_A0 ~ A7 .... GPIO1_D0 ~ D7
GPIO2_A0 ~ A7 .... GPIO2_D0 ~ D7
GPIO3_A0 ~ A7 .... GPIO3_D0 ~ D7
GPIO4_A0 ~ A7 .... GPIO4_D0 ~ D7
For Rockchip 5.10 kernel, the GPIO number can be calculated as below, take GPIO4_D5 as an example:
GPIO4_D5 = 32*4 + 8*3 + 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