Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

For 1.8V/3.0V Dual Voltage IO (DVIO) pins,we pins, we offer several properties to select their voltage in pinctrl node in DTS file.

propertyProperties

pinsPins

valueValue

sunplus,ms-dvio-group-0

G_MX21~G_MX27

“3V0“ for 3.0V; “1V8“ for 1.8V.

sunplus,ms-dvio-group-1

G_MX20, G_MX28~G_MX37

“3V0“ for 3.0V; “1V8“ for 1.8V.

sunplus,ms-dvio-ao-group-0

AO_MX0~AO_MX9

“3V0“ for 3.0V; “1V8“ for 1.8V.

sunplus,ms-dvio-ao-group-1

AO_MX10~AO_MX19

“3V0“ for 3.0V; “1V8“ for 1.8V.

sunplus,ms-dvio-ao-group-2

AO_MX20~AO_MX29

“3V0“ for 3.0V; “1V8“ for 1.8V.

...

Boards

Device-tree source files

C3V-W EVB

sp7350-ev.dts

Example

Voltage Mode Select

For 1.8V/3.0V Dual Voltage IO (DVIO) pins,we pins, we need to select their voltage in pinctrl top node in DTS file. As below:For example,

Code Block
languagetext
pctl: pinctrl@f8800080 {
    compatible = "sunplus,sp7350-pctl";
    :
    :
    sunplus,ms-dvio-group-0 = "1V8";
    sunplus,ms-dvio-group-1 = "1V8";
    sunplus,ms-dvio-ao-group-0 = "1V8";
    sunplus,ms-dvio-ao-group-1 = "3V0";
    sunplus,ms-dvio-ao-group-2 = "3V0";
    :
    :
};

In this example, DVIO groups 0 and 1 are configured to operate at 1.8V, while DVIO AO group 0 is designated with a voltage setting of 1.8V. Conversely, DVIO AO groups 1 and 2 are specifically set to operate at 3.0V. It is crucial to note that in the absence of a specified selection, the default voltage for these groups is set to 3.0V.

GPIO

SP7350 has 106 general purpose IO (GPIO) pins. Most of them are multiplexed with other special function pins. This section explains how to modify device-tree source file to set up GPIO pins as digital input or output pins.

...