UP Core Plus with libgpiod
I'm trying to make sense of GPIO pin numbers and I don't understand how they are mapped into what libgpiod returns.
gpiodetect
returns
gpiochip0 [INT3452:00] (78 lines)
gpiochip1 [INT3452:01] (77 lines)
gpiochip2 [INT3452:02] (47 lines)
gpiochip3 [INT3452:03] (43 lines)
and
sudo cat /sys/kernel/debug/gpio
returns
gpiochip3: GPIOs 267-309, parent: platform/INT3452:03, INT3452:03:
gpiochip2: GPIOs 310-356, parent: platform/INT3452:02, INT3452:02:
gpiochip1: GPIOs 357-433, parent: platform/INT3452:01, INT3452:01:
gpiochip0: GPIOs 434-511, parent: platform/INT3452:00, INT3452:00:
Can you please explain how these lines are mapped into those numbers you mentioned in specs https://up-board.org/upcoreplus/specifications/
To be exact, what I want is reading GPIO 0 and 1. What kind of gpioget command I would use for this?
Just incase, I have installed your custom kernel:
uname -a
Linux dizzy 4.15.0-37-generic #40~upboard04-Ubuntu SMP Thu Feb 14 13:49:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Comments
-
The information/mapping of the 100pin header which includes the exposed GPIO are available in our wiki: https://wiki.up-community.org/Pinout_UP_Core_Plus
-
Added information about libgpiod in section 4.6.2 ... libphy: 2188000.ethernet:02 - Link is Up