Genio 520/720-EVK
I2C
There are 9 I2C adapters on Genio 520/720-EVK:
I2C-0 shared with Raspberry Pi HAT
I2C-1 shared with Raspberry Pi HAT
I2C-2 shared with Current Monitor
I2C-3 shared with NA
I2C-4 shared with Charger IC, Buck IC
I2C-5 shared with PD Controller
I2C-6 shared with Touch, SBU MUX
I2C-7 shared with CAM0
I2C-8 shared with CAM1
SPI
There are 2 master SPI devices on Genio 520/720-EVK:
SPI-0 shared with CAN bus MCP2518
SPI-1 on Raspberry Pi HAT Pin #19(MOSI) #21(MISO) #23(SCLK) #24(CS)
PWM
There are 3 general PWM devices on Genio 520/720-EVK, but only two PWM pin are exported out:
PWM_1 on Raspberry Pi HAT Pin #32
PWM_2 on Raspberry Pi HAT Pin #33
Note
By default, PWM_1 and PWM_2 are inactive. You have to set pinmux to enable them. And also need to power on the raspi pin via setting GPIO81 as output-high.
You can use sysfs to operate PWM devices.
First, you need to export the PWM node.
echo 1 > /sys/class/pwm/pwmchip0/export
Second, you need to set the period and the duty cycle.
echo 2000000 > /sys/class/pwm/pwmchip0/pwm1/period
echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
Finally, you can enable the PWM device.
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable
You can also use the kernel debugfs to check the value of PMW devices.
cat /sys/kernel/debug/pwm
platform/11008000.pwm, 3 PWM devices
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: normal
pwm-1 (sysfs ): requested enabled period: 2000000 ns duty: 1000000 ns polarity: normal
pwm-2 ((null) ): period: 0 ns duty: 0 ns polarity: normal
UART
There are 4 UART devices on Genio 520/720-EVK. The supported baud is from 300 bps to 3000000 bps:
UART0: Connect to USB bridge(FT232RL), USB Type-C UART0 connector
UART1: Connect to USB bridge(FT232RL), USB Type-C UART1 connector
UART2: Shared with pin header(J477) and Raspberry Pi HAT
J470/J471/J514/J515 pin1,pin2 short: Pin Header(J477)
J470/J471/J514/J515 pin2,pin3 short: Raspberry Pi HAT Pin #8(Tx) #10(Rx) #11(RTS) #36(CTS)
UART3: Connect to pin header(J490)
Pin # |
Pin source |
|---|---|
1 |
GND |
2 |
UART2_RTS |
3 |
UART2_VIO |
4 |
UART2_RXD |
5 |
UART2_TXD |
6 |
UART2_CTS |
Pin # |
Pin source |
|---|---|
1 |
GND |
2 |
UART3_RTS |
3 |
UART3_VIO |
4 |
UART3_RXD |
5 |
UART3_TXD |
6 |
UART3_CTS |
Note
UART0 is used for AP debug console
GPIO
The SoC features a total of 182 GPIO pins. However, due to the limitation on the number of physical pins, only a subset of GPIO pins are available for use. The actual positions of the available GPIO pins are shown in Raspberry Pi HAT.
You can use the kernel debugfs to check the status of the GPIO devices.
cat /sys/kernel/debug/pinctrl/10005000.pinctrl-pinctrl_paris/pins
pin 0 (GPIO0) 0:pinctrl_paris 000: 0000011110
pin 1 (GPIO1) 1:pinctrl_paris 001: 0000011110
pin 2 (GPIO2) 2:pinctrl_paris 002: 0000011111
pin 3 (GPIO3) 3:pinctrl_paris 003: 0001011110
pin 4 (GPIO4) 4:pinctrl_paris 004: 0000011110
pin 5 (GPIO5) 5:pinctrl_paris 005: 0000011110
The format of the dump result is as follows:
(MODE) (DIR) (DOUT) (DIN) (DRIVE) (SMT) (IES) (PULL_EN) (PULL_SEL) (R1 R0 or RSEL)
Item |
Description |
|---|---|
MODE |
Current GPIO multiplexer mode |
DIR |
Pin direction (0: input; 1: output) |
DOUT |
Current output value. Valid when DIR=1. (0: low; 1: high) |
DIN |
Current input value (0: low; 1: high) |
DRIVE |
2 bits indicating the pin’s driving strength |
SMT |
Schmitt trigger function status (0: disabled; 1: enabled) |
IES |
Input function status (0: disabled; 1: enabled) |
PULL_EN |
Pull function status (0: disabled; 1: enabled) |
PULL_SEL |
Current pull direction (only valid when PULL_EN=1). (0: pull down; 1: pull up) |
R1 R0 or RSEL |
Pull resistor selection (Some pins can select the pull resistor value) |
Raspberry Pi HAT
There is a 40-pin Raspberry Pi HAT on Genio 520/720-EVK. It contains several peripheral interfaces. By default, it follows the official Raspberry Pi setting. For more details about RPi HAT, please refer to GPIO and the 40-pin Header. You can use the header to connect your external devices.
Pin # |
Main |
Pin # |
Main |
|---|---|---|---|
1 |
VDD_3V3 |
2 |
VDD_5V |
3 |
I2C1_SDA |
4 |
VDD_5V |
5 |
I2C1_SCL |
6 |
GND |
7 |
GPIO107 |
8 |
UART2_TXD |
9 |
GND |
10 |
UART2_RXD |
11 |
UART2_RTS |
12 |
PCM_CLK |
13 |
GPIO108 |
14 |
GND |
15 |
GPIO109 |
16 |
GPIO110 |
17 |
VDD_3V3 |
18 |
GPIO42 |
19 |
SPI1_MOSI |
20 |
GND |
21 |
SPI1_MISO |
22 |
GPIO106 |
23 |
SPI1_SCLK |
24 |
SPI1_CS |
25 |
GND |
26 |
GPIO85 |
27 |
I2C0_SDA |
28 |
I2C0_SCL |
29 |
GPIO104 |
30 |
GND |
31 |
GPIO105 |
32 |
PWM0 |
33 |
PWM1 |
34 |
GND |
35 |
PCM_SYNC |
36 |
UART2_CTS |
37 |
GPIO103 |
38 |
PCM_DI |
39 |
GND |
40 |
PCM_DO |
Note
VDD_5V power can provide 5V/2A maximum but share with USB Host VBUS 5V output.
VGPIOEXT_3V3 power can deliver 3.3V/300mA
Black words are ground pins.
Red words are power pins.
Green words are special function pins.
Blue words are GPIOs.
Pink words are pins, which are default used by other modules. Please refer to function select of Raspberry Pi HAT jumper for more detailed information.
Warning
The default input/output voltage of the GPIO pins on the header is 3.3V. Before using them, please make sure the voltage is suitable for your external device. Otherwise, the unmatched voltage may destroy both Genio 520/720-EVK and external devices.
On the Genio 520/720-EVK, there are several jumpers used to select the pinout of Raspberry Pi HAT pins. To select the function, please short the pins according to the table below:
Jumper # |
Pin source |
1-2 |
2-3 |
|---|---|---|---|
J470 |
UART2_RXD |
Pin Header(J477) |
RasPi Header #10 |
J471 |
UART2_TXD |
Pin Header(J477) |
RasPi Header #8 |
J514 |
UART2_CTS |
Pin Header(J477) |
RasPi Header #36 |
J515 |
UART2_RTS |
Pin Header(J477) |
RasPi Header #11 |
J474 |
BT_RST |
WIFI_BT_RST_R |
RasPi Header #26 |
J475 |
I2SOUT0_BCK |
EDP_BL_EN_1V8 |
RasPi Header #13 |
J476 |
I2SOUT0_LRCK |
EDP_3V3_EN |
RasPi Header #15 |
J478 |
I2SIN0_MCK |
I2SIN0_MCK_T |
RasPi Header #37 |
J479 |
I2SIN0_BCK |
I2SIN0_BCK_T |
RasPi Header #29 |
J480 |
I2SIN0_LRCK |
I2SIN0_LRCK_T |
RasPi Header #31 |
J481 |
PCM_SYNC |
MT7921_PCM_SYNC |
RasPi Header #35 |
J482 |
PCM_CLK |
MT7921_PCM_CLK |
RasPi Header #12 |
J483 |
I2SOUT0_DO |
EDP_12V_EN |
RasPi Header #16 |
J484 |
JTDO |
DBG1_TDO |
RasPi Header #18 |
J485 |
I2SIN0_DI |
I2SIN0_DI_T |
RasPi Header #22 |
J487 |
PCM_DI |
MT7921_PCM_DI |
RasPi Header #38 |
J488 |
PCM_DO |
MT7921_PCM_DO |
RasPi Header #40 |
J502 |
SPIM1_MOSI |
WCN_3V3_EN |
RasPi Header #19 |
J503 |
SPIM1_MISO |
CAN_INT_GPIO |
RasPi Header #21 |
J504 |
SPIM1_CLK |
CMMPDN0 |
RasPi Header #23 |
J505 |
SPIM1_CSB |
CMMPDN1 |
RasPi Header #24 |
J506 |
I2SOUT0_MCK |
CSR_EN_GPIO107 |
RasPi Header #5 |