Allwinner H3 (NanoPi Neo): Getting PORTL (on /dev/gpioc1) to work

Michael Hrabanek hrabanek at gmail.com
Tue Sep 19 07:45:25 UTC 2017


Hi everybody,
I'm running 12.0-CURRENT (rev 323710) using GENERIC kernel on NanoPi Neo
(allwinner H3). I can use and control all gpio pins on /dev/gpioc0 without
any issue, but if I try to configure any pin on /dev/gpioc1 (there are only
PORTL pins there), nothing happens (pin configuration stays the same,
gpioctl returns 0 and no error in log).

root at nanopi-neo:~ # gpioctl -f /dev/gpioc1 -lv
pin 00: 0       PL0<PU>, caps:<IN,OUT,PU,PD>
pin 01: 0       PL1<PU>, caps:<IN,OUT,PU,PD>
pin 02: 0       PL2<>, caps:<IN,OUT,PU,PD>
pin 03: 0       PL3<>, caps:<IN,OUT,PU,PD>
pin 04: 0       PL4<>, caps:<IN,OUT,PU,PD>
pin 05: 0       PL5<>, caps:<IN,OUT,PU,PD>
pin 06: 0       PL6<>, caps:<IN,OUT,PU,PD>
pin 07: 0       PL7<>, caps:<IN,OUT,PU,PD>
pin 08: 0       PL8<>, caps:<IN,OUT,PU,PD>
pin 09: 0       PL9<>, caps:<IN,OUT,PU,PD>
pin 10: 0       PL10<>, caps:<IN,OUT,PU,PD>
pin 11: 0       PL11<>, caps:<IN,OUT,PU,PD>

root at nanopi-neo:~ # gpioctl -f /dev/gpioc1 -c 10 OUT

root at nanopi-neo:~ # gpioctl -f /dev/gpioc1 -lv
<...>
pin 10: 0       PL10<>, caps:<IN,OUT,PU,PD>
pin 11: 0       PL11<>, caps:<IN,OUT,PU,PD>

Did anyone managed to get pins on PORTL working? (btw there are two LEDs on
nanopi neo, the blue one on PA10, which I can control normally and the
green (pwr) one, wired to PL10, which only slightly dims (ie. pin is not
configured as output)).
Any idea what's wrong? Is there an issue with FDT config? (I'm using
default one from src nanopi-neo.dtb) Or some bug in kernel? I'm not afraid
of some kernel hacking, but I'd welcome some pointers where to look first.
Any suggestions would be greatly appreciated,
Michael


More information about the freebsd-arm mailing list