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 PHY (RGMII or RMII interface), UART, I2C pins, and etc.
...
SP7350 has 106 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 of a DVIO group in your circuit boards (hardware), you need to setup Voltage Mode Select (MS control) in device-tree source. Refer to groups of GPIO and DVIO in appendix GPIO Table below in details.
...
Properties | Values | Descriptions |
bias-disable | NA | Disable pull-up, pull-down and strong pull-up |
bias-high-impedance | NA | |
bias-pull-up | NA | |
bias-pull-down | NA | |
drive-open-drain | NA | |
drive-strength-microamp | … | Refer to Driving-strength Table of GPIO and DVIO. |
function | … | Refer to Function-group Table |
groups | … | Refer to Function-group Table |
input-disable | NA | |
input-enable | NA | |
input-schmitt-disable | NA | |
input-schmitt-enable | NA | |
output-disable | NA | |
output-enable | NA | |
output-high | NA | |
output-low | NA | |
pins | “GPIO0” ~ “GPIO105” | |
sunplus,bias-strong-pull-up | NA | For GPIO only, excluding DVIO |
sunplus,input-invert-disable | NA | |
sunplus,input-invert-enable | NA | |
sunplus,ms-dvio-group-0 | “1V8” or “3V0” | For G_MX21 - G_MX27 |
sunplus,ms-dvio-group-1 | “1V8” or “3V0” | For G_MX20, G_MX28 - G_MX37 |
sunplus,ms-dvio-ao-group-0 | “1V8” or “3V0” | For AO_MX0 - AO_MX9 |
sunplus,ms-dvio-ao-group-1 | “1V8” or “3V0” | For AO_MX10 - AO_MX19 |
sunplus,ms-dvio-ao-group-2 | “1V8” or “3V0” | For AO_MX20 - AO_MX29 |
sunplus,output-invert-disable | NA | |
sunplus,output-invert-enable | NA | |
sunplus,slew-rate-control-disable | NA | |
sunplus,slew-rate-control-enable | NA |
GPIO Table
GPIO # | Power domain | Pin type | Pin name | Power-supply |
0 - 19 | Main | 1.8V GPIO | G_MX0 - G_MX19 | VDDPST18_GPIO |
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_MX43 | AVDDIO_3018_SD | ||
44 - 49 | G_MX44 - G_MX49 | AVDDIO_3018_SDIO | ||
50 - 59 | CM4 (AO) | AO_MX0 - AO_MX9 | VDDPST3018_DVIO_AO_1 | |
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 | IV_MX0 - IV_MX6 |
...