AOBUS
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@14/gpio-ranges GPIO ranges handled: 0: aobus-banks GPIOS [501 - 511] PINS [0 - 10]
|
AOBUS的Range Base
为501
。
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13
| $ cat /sys/kernel/debug/pinctrl/pinctrl@14/pins registered pins: 11 pin 0 (GPIOAO_0) pinctrl@14 pin 1 (GPIOAO_1) pinctrl@14 pin 2 (GPIOAO_2) pinctrl@14 pin 3 (GPIOAO_3) pinctrl@14 pin 4 (GPIOAO_4) pinctrl@14 pin 5 (GPIOAO_5) pinctrl@14 pin 6 (GPIOAO_6) pinctrl@14 pin 7 (GPIOAO_7) pinctrl@14 pin 8 (GPIOAO_8) pinctrl@14 pin 9 (GPIOAO_9) pinctrl@14 pin 10 (GPIO_TEST_N) pinctrl@14
|
管脚对应的Pin Index
如上。
Periphs
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@4b0/gpio-ranges GPIO ranges handled: 0: periphs-banks GPIOS [401 - 500] PINS [0 - 99]
|
Periphs’ Range Base
is 401
.
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| $ cat /sys/kernel/debug/pinctrl/pinctrl@4b0/pins registered pins: 100 pin 0 (GPIOZ_0) pinctrl@4b0 pin 1 (GPIOZ_1) pinctrl@4b0 pin 2 (GPIOZ_2) pinctrl@4b0 pin 3 (GPIOZ_3) pinctrl@4b0 pin 4 (GPIOZ_4) pinctrl@4b0 pin 5 (GPIOZ_5) pinctrl@4b0 pin 6 (GPIOZ_6) pinctrl@4b0 pin 7 (GPIOZ_7) pinctrl@4b0 pin 8 (GPIOZ_8) pinctrl@4b0 pin 9 (GPIOZ_9) pinctrl@4b0 pin 93 (GPIOX_14) pinctrl@4b0 pin 94 (GPIOX_15) pinctrl@4b0 pin 95 (GPIOX_16) pinctrl@4b0 pin 96 (GPIOX_17) pinctrl@4b0 pin 97 (GPIOX_18) pinctrl@4b0 pin 98 (GPIOCLK_0) pinctrl@4b0 pin 99 (GPIOCLK_1) pinctrl@4b0
|
- 计算GPIO数值:
以GPIOX_14
为例。
GPIOX_14
= Range Base
+ Pin Index
= 401
+ 93
= 494
.
AOBUS
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@14/gpio-ranges GPIO ranges handled: 0: aobus-banks GPIOS [501 - 511] PINS [0 - 10]
|
AOBUS的Range Base
为501
。
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13
| $ cat /sys/kernel/debug/pinctrl/pinctrl@14/pins registered pins: 11 pin 0 (GPIOAO_0) pinctrl@14 pin 1 (GPIOAO_1) pinctrl@14 pin 2 (GPIOAO_2) pinctrl@14 pin 3 (GPIOAO_3) pinctrl@14 pin 4 (GPIOAO_4) pinctrl@14 pin 5 (GPIOAO_5) pinctrl@14 pin 6 (GPIOAO_6) pinctrl@14 pin 7 (GPIOAO_7) pinctrl@14 pin 8 (GPIOAO_8) pinctrl@14 pin 9 (GPIOAO_9) pinctrl@14 pin 10 (GPIO_TEST_N) pinctrl@14
|
管脚对应的Pin Index
如上。
Periphs
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@4b0/gpio-ranges GPIO ranges handled: 0: periphs-banks GPIOS [401 - 500] PINS [0 - 99]
|
Periphs的Range Base
为401
。
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| $ cat /sys/kernel/debug/pinctrl/pinctrl@4b0/pins registered pins: 100 pin 0 (GPIOZ_0) pinctrl@4b0 pin 1 (GPIOZ_1) pinctrl@4b0 pin 2 (GPIOZ_2) pinctrl@4b0 pin 3 (GPIOZ_3) pinctrl@4b0 pin 4 (GPIOZ_4) pinctrl@4b0 pin 5 (GPIOZ_5) pinctrl@4b0 pin 6 (GPIOZ_6) pinctrl@4b0 pin 7 (GPIOZ_7) pinctrl@4b0 pin 8 (GPIOZ_8) pinctrl@4b0 pin 9 (GPIOZ_9) pinctrl@4b0 pin 93 (GPIOX_14) pinctrl@4b0 pin 94 (GPIOX_15) pinctrl@4b0 pin 95 (GPIOX_16) pinctrl@4b0 pin 96 (GPIOX_17) pinctrl@4b0 pin 97 (GPIOX_18) pinctrl@4b0 pin 98 (GPIOCLK_0) pinctrl@4b0 pin 99 (GPIOCLK_1) pinctrl@4b0
|
- 计算GPIO数值:
以GPIOX_14
为例。
GPIOX_14
= Range Base
+ Pin Index
= 401
+ 93
= 494
AOBUS
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@ff800014/gpio-ranges GPIO ranges handled: 0: aobus-banks GPIOS [496 - 511] PINS [0 - 15]
|
AOBUS的Range Base
为496
。
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| $ cat /sys/kernel/debug/pinctrl/pinctrl@ff800014/pins registered pins: 16 pin 0 (GPIOAO_0) pinctrl@ff800014 pin 1 (GPIOAO_1) pinctrl@ff800014 pin 2 (GPIOAO_2) pinctrl@ff800014 pin 3 (GPIOAO_3) pinctrl@ff800014 pin 4 (GPIOAO_4) pinctrl@ff800014 pin 5 (GPIOAO_5) pinctrl@ff800014 pin 6 (GPIOAO_6) pinctrl@ff800014 pin 7 (GPIOAO_7) pinctrl@ff800014 pin 8 (GPIOAO_8) pinctrl@ff800014 pin 9 (GPIOAO_9) pinctrl@ff800014 pin 10 (GPIOAO_10) pinctrl@ff800014 pin 11 (GPIOAO_11) pinctrl@ff800014 pin 12 (GPIOE_0) pinctrl@ff800014 pin 13 (GPIOE_1) pinctrl@ff800014 pin 14 (GPIOE_2) pinctrl@ff800014 pin 15 (GPIO_TEST_N) pinctrl@ff800014
|
管脚对应的Pin Index
如上。
Periphs
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/pinctrl@ff634480/gpio-ranges GPIO ranges handled: 0: periphs-banks GPIOS [410 - 495] PINS [0 - 85]
|
Periphs的Range Base
为410
。
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| $ cat /sys/kernel/debug/pinctrl/pinctrl@ff634480/pins registered pins: 86 pin 0 (GPIOV_0) pinctrl@ff634480 pin 1 (GPIOZ_0) pinctrl@ff634480 pin 2 (GPIOZ_1) pinctrl@ff634480 pin 3 (GPIOZ_2) pinctrl@ff634480 pin 4 (GPIOZ_3) pinctrl@ff634480 pin 5 (GPIOZ_4) pinctrl@ff634480 pin 6 (GPIOZ_5) pinctrl@ff634480 pin 7 (GPIOZ_6) pinctrl@ff634480 pin 8 (GPIOZ_7) pinctrl@ff634480 pin 9 (GPIOZ_8) pinctrl@ff634480 ... pin 76 (GPIOX_10) pinctrl@ff634480 pin 77 (GPIOX_11) pinctrl@ff634480dd pin 78 (GPIOX_12) pinctrl@ff634480 pin 79 (GPIOX_13) pinctrl@ff634480 pin 80 (GPIOX_14) pinctrl@ff634480 pin 81 (GPIOX_15) pinctrl@ff634480 pin 82 (GPIOX_16) pinctrl@ff634480 pin 83 (GPIOX_17) pinctrl@ff634480 pin 84 (GPIOX_18) pinctrl@ff634480 pin 85 (GPIOX_19) pinctrl@ff634480
|
- 计算GPIO数值:
以GPIOX_10
为例。
GPIOX_10
= Range Base
+ Pin Index
= 410
+ 76
= 486
.
- 获取
Range Base
:
1 2 3
| $ cat /sys/kernel/debug/pinctrl/fe000000.apb4\:pinctrl\@4000-pinctrl-meson/gpio-ranges GPIO ranges handled: 0: periphs-banks GPIOS [355 - 511] PINS [0 - 156]
|
- 获取
Pin Index
:
1 2 3 4 5 6 7 8 9 10 11 12
| $ cat /sys/kernel/debug/pinctrl/fe000000.apb4\:pinctrl\@4000-pinctrl-meson/pins registered pins: 157 pin 0 (GPIOB_0) fe000000.apb4:pinctrl@4000 pin 1 (GPIOB_1) fe000000.apb4:pinctrl@4000 pin 2 (GPIOB_2) fe000000.apb4:pinctrl@4000 pin 3 (GPIOB_3) fe000000.apb4:pinctrl@4000 pin 4 (GPIOB_4) fe000000.apb4:pinctrl@4000 pin 5 (GPIOB_5) fe000000.apb4:pinctrl@4000 pin 6 (GPIOB_6) fe000000.apb4:pinctrl@4000 pin 7 (GPIOB_7) fe000000.apb4:pinctrl@4000 pin 8 (GPIOB_8) fe000000.apb4:pinctrl@4000 pin 9 (GPIOB_9) fe000000.apb4:pinctrl@4000
|
- 获取GPIO数值:
以GPIOT_19
为例。
GPIOT_19
= Range Base
+ Pin Index
= 355
+ 110
= 465
.