GPIO full name: General Purpose Input/Output is a general-purpose pin that can be dynamically configured and controlled during software operation. On the RK platform, except for some pins with specialized purposes (such as DDR, MIPI, etc.), other pins, if not configured for reuse, default reuse status is GPIO. RK's GPIO driver provides the standard GPIO interface for Linux. There is a set of sysfs nodes in Linux that operate GPIO in user mode. The application layer mainly implements GPIO programming by manipulating these nodes.
##GPIO pin naming convention
The Rockchip Pin ID is composed of the controller (bank), port (port), and index number (pin).
Under the general Linux framework, all GPIO are numbered with numbers.
For chips on the RK platform, the numbering calculation method is: (gpio controller number -0) * 32+(port number -'A ') * 8+index number
##View the user layer interface of GPIO
# ls -l /sys/class/gpio/
Total 0
--W-------1 root 4096 June 16th 09:46 export
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip0->..// devices/platform/pinctrl/fd8a0000.gpio/gpio/gpiochip0
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip128->..// devices/platform/pinctrl/fec50000.gpio/gpio/gpiochip128
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip32->..// devices/platform/pinctrl/fec20000.gpio/gpio/gpiochip32
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip509->..// devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk806-pinctrl.0.auto/gpio/gpiochip509
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip64->..// devices/platform/pinctrl/fec30000.gpio/gpio/gpiochip64
Lrwxrwxrwx 1 root 0 June 16th 09:44 gpiochip96->..// devices/platform/pinctrl/fec40000.gpio/gpio/gpiochip96
--W--------1 root 4096 June 16th 09:46 unexport