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

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...")
 
(GPIO number)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{rocke25_header}}
+
{{rock3_header}}
{{Languages|rocke25/hardware/gpio}}
+
{{Languages|rock3/hardware/gpio}}
 +
 
 +
    [[rock3 | ROCK 3]] > [[rock3/hardware | Hardware]] > [[rock3/hardware/radxa-e25-gpio | Radxa E25 GPIO]]
  
    [[rocke25 | ROCK E25]] > [[rocke25/hardware | Hardware]] > [[rocke25/hardware/rocke25-gpio | ROCK E25 GPIO]]
 
  
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
 
== <span id="gpio">General purpose input-output (GPIO) connector</span> ==
  
ROCK E 25 has a 10-pin expansion header.  
+
Radxa E25 has a 10-pin expansion header.  
  
 
{| class="wikitable" style="vertical-align:middle;"
 
{| class="wikitable" style="vertical-align:middle;"
 
|- style="font-weight:bold; text-align:center;"
 
|- style="font-weight:bold; text-align:center;"
! GPIO number
+
!Pin#
 +
! Function1
 +
! Function2
 +
! Function3
 
! Function4
 
! Function4
! Function3
+
! GPIO Number
! Function2
+
! Function1
+
! Pin#
+
 
|-
 
|-
 +
| style="background-color:#008000; color:#FFF;" | 1
 +
| GPIO0_B4
 +
| CAN0_RX_M0
 +
| I2C1_SDA
 +
|
 
| 12
 
| 12
| MCU_JTAG_TCK
 
| PCIE20_BUTTONRSTn
 
| CAN0_RX_M0 
 
|I2C1_SDA 
 
| 1
 
 
|-
 
|-
| 114
+
| style="background-color:#008000; color:#FFF;" | 2
 +
| GPIO3_C2
 +
| SPI1_MISO_M1
 +
| UART5_TX_M1
 
| I2S1_SDO3_M2
 
| I2S1_SDO3_M2
| UART5_TX_M1
+
|114
| SPI1_MISO_M1
+
|
+
|2
+
 
|-
 
|-
 +
| style="background-color:#008000; color:#FFF;" | 3
 +
| GPIO3_C3
 +
| SPI1_CLK_M1
 +
| UART5_RX_M1
 +
| I2S1_SCLK_RX_M2
 
| 115
 
| 115
|I2S1_SCLK_RX_M2
 
|UART5_RX_M1
 
|SPI1_CLK_M1
 
|
 
|3
 
 
|-
 
|-
 +
| style="background-color:#008000; color:#FFF;" | 4
 +
| GPIO3_C0
 +
| PWM13_M0
 +
| UART3_RX_M1
 +
|
 
|112
 
|112
|PDM_SDI3_M2
 
|UART3_RX_M1
 
|PWM13_M0
 
|
 
|4
 
 
|-
 
|-
 +
| style="background-color:#000; color:#FFF" | 5
 +
| GND
 
|
 
|
| GDD
 
 
|
 
|
 
|
 
|
 
|
 
|
|5
 
 
|-
 
|-
|33
+
| style="background-color:#008000; color:#FFF;" | 6
|ACODEC_ADC_CLK
+
| GPIO1_A1
|CAN1_TX_M0
+
| CAN1_TX_M0
|UART3_TX_M0
+
| UART3_TX_M0
|I2C3_SCL_M0
+
| I2C3_SCL_M0
|6
+
| 33
 
|-
 
|-
|32
+
| style="background-color:#008000; color:#FFF;" | 7
|ACODEC_ADC_DATA
+
| GPIO1_A0
|CAN1_RX_M0
+
| CAN1_RX_M0
|UART3_RX_M0
+
| UART3_RX_M0
|I2C3_SDA_M0
+
| I2C3_SDA_M0
|7
+
| 32
 
|-
 
|-
|97
+
| style="background-color:#008000; color:#FFF;" | 8
|SDMMC2_D0_M1
+
| GPIO3_A1
|PCIE30X1_PERSTn_M1
+
| SPI1_CS0_M1
|SPI1_CS0_M1
+
|
 
|
 
|
|8
+
| 97
 
|-
 
|-
|129
+
| style="background-color:#008000; color:#FFF;" | 9
|I2S1_SDO2_M2
+
| GPIO3_C1
|PCIE20_PERSTn_M1
+
| I2S1_SDO2_M2
|SPI1_MOSI_M1
+
| SPI1_MOSI_M1
 +
|
 +
| 113
 +
|-
 +
| style="background-color:#008000; color:#FFF;" | 10
 +
| GPIO0_B3
 +
| CAN0_TX_M0
 +
| I2C1_SCL
 
|
 
|
|9
 
|-
 
 
| 11
 
| 11
|PCIE30X1_BUTTONRSTn
 
|CAN0_TX_M0
 
|I2C1_SCL
 
|
 
|10
 
 
|-
 
|-
  
  
 
|}
 
|}
 +
 +
==== 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
  
 
=== GPIO number ===
 
=== GPIO number ===
Line 104: Line 112:
 
  GPIO1_D0 ~ D7
 
  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:
+
For Rockchip 4.19 kernel, the GPIO number can be calculated as below, take GPIO4_D1 (PIN26 on 40-PIN HEADER) as an example:
  
 
  GPIO4_D1 = 4*32 + 3*8 + 1 = 153
 
  GPIO4_D1 = 4*32 + 3*8 + 1 = 153

Latest revision as of 06:12, 27 January 2022

    ROCK 3 >  Hardware >  Radxa E25 GPIO


General purpose input-output (GPIO) connector

Radxa E25 has a 10-pin expansion header.

Pin# Function1 Function2 Function3 Function4 GPIO Number
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

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

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 40-PIN 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