Overview
The aim of this document is to explain how to setup pins of SP7350 in device-tree source.
SP7350 has 106 general purpose IO (GPIO) pins which are multiplexed with other special functions, like eMMC device, SPI-NOR flash, SPI-NAND flash, Ethernet phyPHY (RGMII or RMII interface), UART, I2C control pins, and etc.
The following sections will explain how to setup GPIOs and special function pins in device-tree source file. Note that the device-tree source file in Linuxis used by U-Boot and Linux in SP7350.
Properties
function
The mux function to be applied on particular pins or groups. See section "Functions" below.
...
We define a bunch of functions as listed in appendix function_table below.
Pins
SP7350 has 106 GPIO pins. ID is from 0 to 105, name is in form of GPIO(id). Like GPIO0~GPIO105.See GPIO pins. ID is from 0 to 105. Name is in form of GPIO(id), like GPIO0, GPIO1, GPIO2, GPIO99, GPIO105, and etc. There are two kinds of GPIO pins. One is 1.8V GPIO pins, and the other is 1.8V/3.0V Dual Voltage IO (DVIO) pins. Beside configure 1.8V or 3.0V power to power supply to a DVIO group in your circuit boards (hardware), you need to setup MS control in device-tree source. Refer to groups of GPIO and DVIO in appendix gpio_table below for details.
...
Code Block | ||
---|---|---|
| ||
uart7_pins: pinmux_uart7-pins { function = "UART7"; groups = "UART7"; drive-strength-microamp = <SPPCTRL_GPIO_DRV_IOH_6600_IOL_6600UA>; }; |
Appendix
gpio_table
GPIO # | Pin type | Pin name | Power-supply | Power domain |
0 - 19 | 1.8V GPIO | G_MX0 - G_MX19 | VDDPST18_GPIO | Main |
20 | 1.8V |
/3.0V DVIO | G_MX20 | VDDPST3018_DVIO_2 |
21 - 27 | G_MX21 - G_MX27 | VDDPST3018_DVIO_1 |
28 - 37 | G_MX28 - G_MX37 | VDDPST3018_DVIO_2 |
38 - 43 | G_ |
MX38 - G_ |
Main
20 - 49
MX43 | AVDDIO_3018_SD |
44 - 49 | G_ |
MX44 - G_MX49 |
AVDDIO_3018_SDIO |
50 - |
1.8V/3.0V DVIO
59 | AO_MX0 - AO_MX9 | VDDPST3018_DVIO_AO_1 | CM4 (AO) |
60 - 69 | AO_MX10 - AO_MX19 | VDDPST3018_DVIO_AO_2 | |
70 - 79 | AO_MX20 - AO_MX29 |
VDDPST3018_DVIO_AO_3 | ||
80 - 98 | 1.8V GPIO | AO_MX30 - AO_MX48 |
VDDPST18_GPIO_AO |
99 - 105 |
1.8V GPIO
IV_MX0 - IV_MX6 |
CM4 (AO)
drive_strength_table
Source current (mA)for (mA) for GPIO | |||
Min Value | Typical Value | Max Value | MACRO |
0.8 | 1.1 | 1.5 | SPPCTRL_GPIO_DRV_IOH_1100_IOL_1100UA |
1.1 | 1.6 | 2.2 | SPPCTRL_GPIO_DRV_IOH_1600_IOL_1700UA |
2.3 | 3.3 | 4.3 | SPPCTRL_GPIO_DRV_IOH_3300_IOL_3300UA |
3.4 | 4.9 | 6.5 | SPPCTRL_GPIO_DRV_IOH_4900_IOL_5000UA |
4.5 | 6.6 | 8.6 | SPPCTRL_GPIO_DRV_IOH_6600_IOL_6600UA |
5.7 | 8.2 | 10.8 | SPPCTRL_GPIO_DRV_IOH_8200_IOL_8300UA |
6.8 | 9.9 | 13.0 | SPPCTRL_GPIO_DRV_IOH_9900_IOL_9900UA |
7.9 | 11.5 | 15.1 | SPPCTRL_GPIO_DRV_IOH_11500_IOL_11600UA |
9.0 | 13.1 | 17.2 | SPPCTRL_GPIO_DRV_IOH_13100_IOL_13200UA |
10.2 | 14.8 | 19.4 | SPPCTRL_GPIO_DRV_IOH_14800_IOL_14800UA |
11.3 | 16.4 | 21.6 | SPPCTRL_GPIO_DRV_IOH_16400_IOL_16500UA |
12.4 | 18.1 | 23.7 | SPPCTRL_GPIO_DRV_IOH_18100_IOL_18100UA |
13.5 | 19.6 | 25.8 | SPPCTRL_GPIO_DRV_IOH_19600_IOL_19700UA |
14.7 | 21.3 | 28.0 | SPPCTRL_GPIO_DRV_IOH_21300_IOL_21400UA |
15.8 | 22.9 | 30.1 | SPPCTRL_GPIO_DRV_IOH_22900_IOL_23000UA |
16.9 | 24.6 | 32.3 | SPPCTRL_GPIO_DRV_IOH_24600_IOL_24600UA |
Sink current (mA)for (mA) for GPIO | |||
Min Value | Typical Value | Max Value | MACRO |
0.7 | 1.1 | 1.6 | SPPCTRL_GPIO_DRV_IOH_1100_IOL_1100UA |
1.1 | 1.7 | 2.3 | SPPCTRL_GPIO_DRV_IOH_1600_IOL_1700UA |
2.1 | 3.3 | 4.7 | SPPCTRL_GPIO_DRV_IOH_3300_IOL_3300UA |
3.2 | 5.0 | 7.0 | SPPCTRL_GPIO_DRV_IOH_4900_IOL_5000UA |
4.2 | 6.6 | 9.3 | SPPCTRL_GPIO_DRV_IOH_6600_IOL_6600UA |
5.3 | 8.3 | 11.7 | SPPCTRL_GPIO_DRV_IOH_8200_IOL_8300UA |
6.3 | 9.9 | 13.9 | SPPCTRL_GPIO_DRV_IOH_9900_IOL_9900UA |
7.4 | 11.6 | 16.2 | SPPCTRL_GPIO_DRV_IOH_11500_IOL_11600UA |
8.4 | 13.2 | 18.5 | SPPCTRL_GPIO_DRV_IOH_13100_IOL_13200UA |
9.4 | 14.8 | 20.8 | SPPCTRL_GPIO_DRV_IOH_14800_IOL_14800UA |
10.5 | 16.5 | 23.1 | SPPCTRL_GPIO_DRV_IOH_16400_IOL_16500UA |
11.5 | 18.1 | 25.4 | SPPCTRL_GPIO_DRV_IOH_18100_IOL_18100UA |
12.6 | 19.7 | 27.6 | SPPCTRL_GPIO_DRV_IOH_19600_IOL_19700UA |
13.6 | 21.4 | 29.9 | SPPCTRL_GPIO_DRV_IOH_21300_IOL_21400UA |
14.6 | 23.0 | 32.1 | SPPCTRL_GPIO_DRV_IOH_22900_IOL_23000UA |
15.7 | 24.6 | 34.4 | SPPCTRL_GPIO_DRV_IOH_24600_IOL_24600UA |
...