adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
437 stars 327 forks source link

add support for walnutpi-1b board #830

Closed sc-bin closed 3 weeks ago

sc-bin commented 1 month ago

hello,we want to add support for the walnutpi-1b board -> walnutpi.com

about the commit modify pin.py for h616 : auto choose gpiochip I have used kernel version 5.16 and 6.1 on our board , run the gpiodetect ,That's always the result

pi@WalnutPi:~$ gpiodetect
gpiochip0 [300b000.pinctrl] (288 lines)
gpiochip1 [7022000.pinctrl] (32 lines)

But it seems to be on some H616 board, the [300b000.pinctrl] is belong th gpiochip1。-> the pull #749

so i modfly the pin.py , it will read the system file /sys/class/gpio/gpiochip0/label ,if the label for gpiochip0 is [300b000.pinctrl] ,then all the pins will Be registered as 0 ,If not, register as 1.