Monday, April 15, 2024

[fedora-arm] Mapping GPIO Pins from Wandboard to Fedora/libpiod

Hi Arm Team,

I have a Wandboard (yeah, I know, OLD Hardware) currently running a
project, and I'm trying to add some GPIO inputs to it. In previous GPIO
handling (on a different platform) I used the /sys/class/gpio interfaces
to set up the GPIO, but I've discovered this is now deprecated and removed
from Fedora. So I installed libgpiod and am trying to use it.

I'm using
as a reference for the board layout. Specifically, on page 27, it shows
me that the JP4 header connects to GPIO3_12, GPIO3_27, GPIO6_31, CPIO1_24,
GPIO7_8, GPIO3_26, GPIO_18, and GPIO_19.

I figure that GPIO_18 is going to be gpiochip0 line 18, and GPIO3_12 will
be gpiochip3 line 12.. Except that gpiodetect only tells me I have
gpiochip0 through gpiochip6, so I'm not sure where GPIO7_8 would get
mapped. That's the first issue I have.

The second issue is that the kernel does not have any named mappings, so
running gpioinfo just displays generic data, like:

gpiochip6 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high

Except, of course, looking at gpiochip3 line 12 shows me:

gpiochip3 - 32 lines:
line 12: unnamed "scl" output active-high [used open-drain]

Which seems to imply that that GPIO3_12 is actually used for something
else -- or my mapping strategy is off.

I'd appreciate any guidance anyone might have on this subject.



Derek Atkins 617-623-3745
Computer and Internet Security Consultant
arm mailing list --
To unsubscribe send an email to
Fedora Code of Conduct:
List Guidelines:
List Archives:
Do not reply to spam, report it:

No comments:

Post a Comment