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

Difference between revisions of "Rock3/CM/CM3I/E25/GPIO"

< Rock3‎ | CM‎ | CM3I‎ | E25
(Created page with "{{rock3_header}} {{Languages|rock3/CM/CM3I/E25/GPIO}} ROCK 3 > Compute Module > CM3 Industrial > rock3/CM/CM3I/E25 | Ra...")
 
Line 6: Line 6:
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
  
Radxa E25 has a 10-pin expansion header.  
+
====Radxa E25 V1.3 has a 10-pin expansion header. ====
  
 
{| class="wikitable" style="vertical-align:middle;"
 
{| class="wikitable" style="vertical-align:middle;"
Line 89: Line 89:
  
  
 +
|}
 +
 +
====Radxa E25 V1.4 has a 24-pin expansion header. ====
 +
 +
{| class="wikitable" style="text-align:center; vertical-align:middle;"
 +
|- style="text-align:left;"
 +
! style="text-align:center; font-size:100%;" |
 +
!
 +
!
 +
!
 +
!
 +
!
 +
! colspan="5" style="text-align:center; font-weight:bold; background-color:#FFC000;" | E25 V1.4
 +
!
 +
!
 +
!
 +
!
 +
!
 +
! style="text-align:center;" |
 +
|- style="text-align:left;"
 +
| style="text-align:center; font-size:100%;" | Gpio number
 +
| Function5
 +
| Function4
 +
| Function3
 +
| Function2
 +
| Function1
 +
| style="text-align:center; background-color:#F4B084;" | GPIO
 +
| colspan="3" style="text-align:center; font-weight:bold; font-size:100%;" | PIN26
 +
| style="text-align:center; background-color:#F4B084;" | GPIO
 +
| Function1
 +
| Function2
 +
| Function3
 +
| Function4
 +
| Function5
 +
| style="text-align:center;" | Gpio number
 +
|-
 +
| style="font-size:100%;" |
 +
|
 +
|
 +
|
 +
|
 +
|
 +
| style="background-color:#F00;" | +3.3V
 +
| style="font-size:100%; background-color:#F00; color:#FFF;" | 1
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#F00; color:#FFF;" | 2
 +
| style="background-color:#F00;" | +5V
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
|
 +
|-
 +
| style="font-size:100%;" | 32
 +
| I2C3_SDA_M0
 +
| CAN1_RX_M0
 +
| UART3_RX_M0
 +
|
 +
|
 +
| GPIO1_A0
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 3
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#F00; color:#FFF;" | 4
 +
| style="background-color:#F00;" | +5V
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
|
 +
|-
 +
| style="font-size:100%;" | 33
 +
| I2C3_SCL_M0
 +
| CAN1_TX_M0
 +
| UART3_TX_M0
 +
|
 +
|
 +
| GPIO1_A1
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 5
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 6
 +
| style="background-color:#000000; color:#FFF;" | GND
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
|
 +
|-
 +
| style="font-size:100%;" | 111
 +
|
 +
|
 +
| UART3_TX_M1
 +
| PWM12_M0
 +
|
 +
| GPIO3_B7
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 7
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 8
 +
| GPIO3_C2
 +
| style="text-align:left;" | SPI1_MISO_M1
 +
| style="text-align:left;" |
 +
| style="text-align:left;" | UART5_TX_M1
 +
| style="text-align:left;" |
 +
| style="text-align:left;" | I2S1_SDO3_M2
 +
| 114
 +
|-
 +
| style="font-size:100%;" |
 +
|
 +
|
 +
|
 +
|
 +
|
 +
| style="background-color:#000000; color:#FFF;" | GND
 +
| style="font-size:100%; background-color:#000000; color:#FFF;" | 9
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 10
 +
| GPIO3_C3
 +
| style="text-align:left;" | SPI1_CLK_M1
 +
| style="text-align:left;" |
 +
| style="text-align:left;" | UART5_RX_M1
 +
| style="text-align:left;" |
 +
| style="text-align:left;" | I2S1_SCLK_RX_M2
 +
| 115
 +
|-
 +
| style="font-size:100%;" | 116
 +
|
 +
|
 +
| UART7_TX_M1
 +
| PWM14_M0
 +
|
 +
| GPIO3_C4
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 11
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 12
 +
| GPIO3_A3
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| 99
 +
|-
 +
| style="font-size:100%;" | 117
 +
| I2S1_LRCK_RX_M2
 +
|
 +
| UART7_RX_M1
 +
| PWM15_IR_M0
 +
|
 +
| GPIO3_C5
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 13
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#000000; color:#FFF;" | 14
 +
| style="background-color:#000000; color:#FFF;" | GND
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
|
 +
|-
 +
| style="font-size:100%;" | 113
 +
| I2S1_SDO2_M2
 +
|
 +
|
 +
|
 +
| SPI1_MOSI_M1
 +
| GPIO3_C1
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 15
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 16
 +
| GPIO2_D2
 +
| style="text-align:left;" | SPI0_CSO_M1
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" | I2S1_LRCK_TX_M2
 +
| 90
 +
|-
 +
| style="font-size:100%;" | 97
 +
|
 +
|
 +
|
 +
|
 +
| SPI1_CSO_M1
 +
| GPIO3_A1
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 17
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 18
 +
| GPIO0_C6
 +
| style="text-align:left;" | SPI0_CS0_M0
 +
| style="text-align:left;" | PWM7_IR
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| 22
 +
|-
 +
| style="font-size:100%;" | 89
 +
| I2S1_SCLK_TX_M2
 +
|
 +
|
 +
|
 +
| SPI0_MOSI_M1
 +
| GPIO2_D1
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 19
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#000000; color:#FFF;" | 20
 +
| style="background-color:#000000; color:#FFF;" | GND
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
| style="text-align:left;" |
 +
|
 +
|-
 +
| style="font-size:100%;" | 88
 +
| I2S1_MCLK_M2
 +
|
 +
|
 +
|
 +
| SPI0_MISO_M1
 +
| GPIO2_D0
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 21
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 22
 +
| style="background-color:#ffffff;" |
 +
|
 +
|
 +
|
 +
| SARADC_VIN5
 +
|
 +
|
 +
|-
 +
| style="font-size:100%;" | 91
 +
| I2S1_SDI0_M2
 +
|
 +
|
 +
|
 +
| SPI0_CLK_M1
 +
| GPIO2_D3
 +
| style="font-size:100%; background-color:#036400; color:#FFF;" | 23
 +
| style="color:#FFF; text-align:left;" |
 +
| style="background-color:#036400; color:#FFF;" | 24
 +
| GPIO4_C6
 +
|
 +
| PWM13_M1
 +
|
 +
|
 +
|
 +
| 150
 +
|- style="text-align:left;"
 +
| style="text-align:center; font-size:100%;" |
 +
|
 +
|
 +
|
 +
|
 +
|
 +
| style="text-align:center; background-color:#000000; color:#FFF;" | GND
 +
| style="text-align:center; font-size:100%; background-color:#000000; color:#FFF;" | 25
 +
| style="color:#FFF;" |
 +
| style="text-align:center; background-color:#036400; color:#FFF;" | 26
 +
| style="text-align:center;" | GPIO3_C0
 +
|
 +
| PWM13_M0
 +
| UART3_RX_M1
 +
|
 +
|
 +
| style="text-align:center;" | 112
 
|}
 
|}
  
Line 94: Line 363:
 
* PWM;x1; PWM13
 
* PWM;x1; PWM13
 
* SPI: x1; PSI1
 
* SPI: x1; PSI1
* I2C: x2;I2C1/I2C3/
+
* I2C: x2;I2C1/I2C3
 
* UART: x2;UART3/UART5
 
* UART: x2;UART3/UART5
 
* CAN: x1;CAN0
 
* CAN: x1;CAN0
 +
 +
==== More details about 10-pin Header In V1.4 ====
 +
* PWM;x6; PWM7_IR/PWM12_M0/PWM13_M0/PWM13_M1/PWM14_M0/PWM15_IR_M0
 +
* SPI: x2; SPI0/SPI1
 +
* I2C: x1;I2C3_M0
 +
* UART: x3;UART3_M0/UART3_M1/UART5_M1
 +
* CAN: x1;CAN1_M0
  
 
=== GPIO number ===
 
=== GPIO number ===

Revision as of 12:07, 1 September 2022

     ROCK 3 >  Compute Module >  CM3 Industrial  >  Radxa E25 >  GPIO

General purpose input-output (GPIO) connector

Radxa E25 V1.3 has a 10-pin expansion header.

Pin# Function1 Function2 Function3 Function4 Gpionumber
1 GPIO0_B4 CAN0_RX_M0 I2C1_SDA 12
2 GPIO3_C2 SPI1_MISO_M1 UART5_TX_M1 I2S1_SDO3_M2 114
3 GPIO3_C3 SPI1_CLK_M1 UART5_RX_M1 I2S1_SCLK_RX_M2 115
4 GPIO3_C0 PWM13_M0 UART3_RX_M1 112
5 GND
6 GPIO1_A1 CAN1_TX_M0 UART3_TX_M0 I2C3_SCL_M0 33
7 GPIO1_A0 CAN1_RX_M0 UART3_RX_M0 I2C3_SDA_M0 32
8 GPIO3_A1 SPI1_CS0_M1 97
9 GPIO3_C1 I2S1_SDO2_M2 SPI1_MOSI_M1 113
10 GPIO0_B3 CAN0_TX_M0 I2C1_SCL 11

Radxa E25 V1.4 has a 24-pin expansion header.

E25 V1.4
Gpio number Function5 Function4 Function3 Function2 Function1 GPIO PIN26 GPIO Function1 Function2 Function3 Function4 Function5 Gpio number
+3.3V 1 2 +5V
32 I2C3_SDA_M0 CAN1_RX_M0 UART3_RX_M0 GPIO1_A0 3 4 +5V
33 I2C3_SCL_M0 CAN1_TX_M0 UART3_TX_M0 GPIO1_A1 5 6 GND
111 UART3_TX_M1 PWM12_M0 GPIO3_B7 7 8 GPIO3_C2 SPI1_MISO_M1 UART5_TX_M1 I2S1_SDO3_M2 114
GND 9 10 GPIO3_C3 SPI1_CLK_M1 UART5_RX_M1 I2S1_SCLK_RX_M2 115
116 UART7_TX_M1 PWM14_M0 GPIO3_C4 11 12 GPIO3_A3 99
117 I2S1_LRCK_RX_M2 UART7_RX_M1 PWM15_IR_M0 GPIO3_C5 13 14 GND
113 I2S1_SDO2_M2 SPI1_MOSI_M1 GPIO3_C1 15 16 GPIO2_D2 SPI0_CSO_M1 I2S1_LRCK_TX_M2 90
97 SPI1_CSO_M1 GPIO3_A1 17 18 GPIO0_C6 SPI0_CS0_M0 PWM7_IR 22
89 I2S1_SCLK_TX_M2 SPI0_MOSI_M1 GPIO2_D1 19 20 GND
88 I2S1_MCLK_M2 SPI0_MISO_M1 GPIO2_D0 21 22 SARADC_VIN5
91 I2S1_SDI0_M2 SPI0_CLK_M1 GPIO2_D3 23 24 GPIO4_C6 PWM13_M1 150
GND 25 26 GPIO3_C0 PWM13_M0 UART3_RX_M1 112

More details about 10-pin Header In V1.3

  • PWM;x1; PWM13
  • SPI: x1; PSI1
  • I2C: x2;I2C1/I2C3
  • UART: x2;UART3/UART5
  • CAN: x1;CAN0

More details about 10-pin Header In V1.4

  • PWM;x6; PWM7_IR/PWM12_M0/PWM13_M0/PWM13_M1/PWM14_M0/PWM15_IR_M0
  • SPI: x2; SPI0/SPI1
  • I2C: x1;I2C3_M0
  • UART: x3;UART3_M0/UART3_M1/UART5_M1
  • CAN: x1;CAN1_M0

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 GPIO3_C2 (PIN2 on 10-PIN HEADER) as an example:

GPIO3_C2 = 3*32 + 2*8 + 2 = 114 
(A=0, B=1, C=2, D=3)

To set GPIO3_C2 output

cd /sys/class/gpio
echo 114> export
cd gpio114
echo out > direction
echo 1 > value     # output high
echo 0 > value     # output low