Difference between revisions of "Rock3/hardware/radxa-e25-gpio"
(Created page with "{{rocke25_header}} {{Languages|rocke25/hardware/gpio}} ROCK E25 > Hardware > ROCK E25 GPIO == <s...") |
|||
Line 1: | Line 1: | ||
− | {{ | + | {{rock3_header}} |
− | {{Languages| | + | {{Languages|rock3/hardware/gpio}} |
+ | |||
+ | [[rock3 | ROCK 3]] > [[rock3/hardware | Hardware]] > [[rock3/hardware/rock3a-gpio | ROCK E25 GPIO]] | ||
− | |||
== <span id="gpio">General purpose input-output (GPIO) connector</span> == | == <span id="gpio">General purpose input-output (GPIO) connector</span> == |
Revision as of 08:25, 20 January 2022
ROCK 3 > Hardware > ROCK E25 GPIO
General purpose input-output (GPIO) connector
ROCK E 25 has a 10-pin expansion header.
GPIO number | Function4 | Function3 | Function2 | Function1 | Pin# |
---|---|---|---|---|---|
12 | MCU_JTAG_TCK | PCIE20_BUTTONRSTn | CAN0_RX_M0 | I2C1_SDA | 1 |
114 | I2S1_SDO3_M2 | UART5_TX_M1 | SPI1_MISO_M1 | 2 | |
115 | I2S1_SCLK_RX_M2 | UART5_RX_M1 | SPI1_CLK_M1 | 3 | |
112 | PDM_SDI3_M2 | UART3_RX_M1 | PWM13_M0 | 4 | |
GDD | 5 | ||||
33 | ACODEC_ADC_CLK | CAN1_TX_M0 | UART3_TX_M0 | I2C3_SCL_M0 | 6 |
32 | ACODEC_ADC_DATA | CAN1_RX_M0 | UART3_RX_M0 | I2C3_SDA_M0 | 7 |
97 | SDMMC2_D0_M1 | PCIE30X1_PERSTn_M1 | SPI1_CS0_M1 | 8 | |
129 | I2S1_SDO2_M2 | PCIE20_PERSTn_M1 | SPI1_MOSI_M1 | 9 | |
11 | PCIE30X1_BUTTONRSTn | CAN0_TX_M0 | I2C1_SCL | 10 |
GPIO number
Rockchip RK3568 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.19 kernel, the GPIO number can be calculated as below, take GPIO4_D1 (PIN26 on 4-0PIN HEADER) as an example:
GPIO4_D1 = 4*32 + 3*8 + 1 = 153 (A=0, B=1, C=2, D=3)
To set GPIO4_D1 output
cd /sys/class/gpio echo 153 > export cd gpio153 echo out > direction echo 1 > value # output high echo 0 > value # output low