Hi
I installed a bare minimal Debian 11 (Bullseye) distribution on a Nano Pi M1 single board computer. I would like to use it to control external devices using its GPIO pins. I was not able to find a suitable port of Python packages such RPi.GPIO for this purpose. Besides I understand the current best practice for controlling gpio pins is to use libgpiod. The gpio device is detected by the kernel as shown below
Code:
$ sudo gpiodetect
gpiochip0 [1c20800.pinctrl] (224 lines)
gpiochip1 [1f02c00.pinctrl] (32 lines)
However the pins are not named and so it is not obvious how the libgpiod pin numbers map to pins on the Nano Pi M1 board as shown below
Code:
$ sudo gpioinfo gpiochip0
gpiochip0 - 224 lines:
line 0: unnamed unused input active-high
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 unused input active-high
line 10: unnamed "nanopi:blue:status" output active-high [used]
How do I find out what libgpiod pin numbers map to what pins on the Nano Pi M1 board ? As I understand this may require a Device Tree Overlay. If this is indeed what is required, how do I understand how to write the Device Tree Overlay file to give me the required pin mapping. I have familiarised myself the device tree source file format but even to write the DTS file I need to know the pin mapping in the first place.
Thank you