Is there a GPIO pin mapping document anywhere? I’m trying to use gpiod to test out the IO with a breakyBreaky, and libgpio looks like it’s supported:
`
admin@snickerdoodle:~$ sudo gpioinfo
[sudo] password for admin:
gpiochip0 - 118 lines:
line 0: unnamed “interrupt” input active-high [used]
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed “fixed-regulator-wlen” output active-high [used]
…
line 113: unnamed unused input active-high
line 114: unnamed unused input active-high
line 115: unnamed unused input active-high
line 116: unnamed unused input active-high
line 117: unnamed unused input active-high
`
What I’m looking for is some sort of doc that says “gpiochip0.1 –> JA1.2” or similar.
ctacke, I believe this is what you’re looking for: https://krtkl.com/resources/docs/#pin-snickerdoodle
There are also a few example projects here if it’s helpful: https://github.com/krtkl/snickerdoodle-examples/tree/master/snickerdoodle-black
Let me know if you need anything else/more specific.
-Ryan
Sorry for the delay getting back to you. The doc above is somewhat helpful, but still missing what I need.
gpiod has a single chip mapped on the device. Totally fine, and normal. It says there are 117 lines, which seems reasonable for this device.
If I run gpioinfo, the are listed by number, but all the names are empty (often the OEM will fill these names out with header/pin number, or similar). So, for example, I can open line offset 1, set it as an output, and toggle its state. What I don’t have, though, is a key that says something like “gpiod offset 1 == fpga pin A23” (that’s a random pin, not an actual map). So right now I’d have to toggle a line, then probe every pin on the breakout until I find the one that’s moving, which sounds tedious.
I’m fairly sure this is the driver:
https://github.com/krtkl/snickerdoodle-linux/blob/master/drivers/gpio/gpio-zynq.c
But there’s no clear/obvious mapping in there