Difference between revisions of "GPIO"

From FriendlyELEC WiKi
Jump to: navigation, search
(Created page with "查看中文")
 
(updated by API)
Line 1: Line 1:
 
[[GPIO/zh|查看中文]]
 
[[GPIO/zh|查看中文]]
 +
===S5P4418/S5P6818 GPIO pin definition===
 +
See pin definition, total GPIOA ~ GPIOD 4 group,<br />
 +
Use the following command to see the GPIO pins.<br />
 +
<syntaxhighlight lang="bash">
 +
#/bin/sh
 +
cd /sys/class/gpio
 +
for i in gpiochip* ; do echo `cat $i/label`: `cat $i/base` ; done
 +
</syntaxhighlight>
 +
Output on T2:
 +
<syntaxhighlight lang="bash">
 +
nxp-gpio.0: 0
 +
nxp-gpio.4: 128
 +
nxp-gpio.5: 160
 +
nxp-gpio.1: 32
 +
nxp-gpio.2: 64
 +
nxp-gpio.3: 96
 +
</syntaxhighlight>
 +
Each label represents a group, and the above shows 6 groups.<br />
 +
Then the corresponding is:<br />
 +
<syntaxhighlight lang="bash">
 +
nxp-gpio.0: 0        -> GPIOA
 +
nxp-gpio.4: 128        -> GPIOE  ->AliveGPIO3
 +
nxp-gpio.5: 160        -> GPIOF  ->AliveGPIO5
 +
nxp-gpio.1: 32        -> GPIOB
 +
nxp-gpio.2: 64        -> GPIOC
 +
nxp-gpio.3: 96        -> GPIOD
 +
</syntaxhighlight>
 +
The difference between each group is 32, which is checked by the cat gpiochip0/ngpio command.

Revision as of 03:30, 20 March 2019

查看中文

S5P4418/S5P6818 GPIO pin definition

See pin definition, total GPIOA ~ GPIOD 4 group,
Use the following command to see the GPIO pins.

#/bin/sh
cd /sys/class/gpio
for i in gpiochip* ; do echo `cat $i/label`: `cat $i/base` ; done

Output on T2:

nxp-gpio.0: 0
nxp-gpio.4: 128
nxp-gpio.5: 160
nxp-gpio.1: 32
nxp-gpio.2: 64
nxp-gpio.3: 96

Each label represents a group, and the above shows 6 groups.
Then the corresponding is:

nxp-gpio.0: 0         -> GPIOA
nxp-gpio.4: 128         -> GPIOE  ->AliveGPIO3
nxp-gpio.5: 160         -> GPIOF  ->AliveGPIO5
nxp-gpio.1: 32         -> GPIOB
nxp-gpio.2: 64         -> GPIOC
nxp-gpio.3: 96         -> GPIOD

The difference between each group is 32, which is checked by the cat gpiochip0/ngpio command.