mt7621 GPIO mapping mystery
Rosen Penev
rosenp at gmail.com
Fri Jan 20 17:19:23 PST 2023
CC: Sergio
On Fri, Jan 20, 2023 at 11:29 AM Peter Naulls <peter at chocky.org> wrote:
>
>
>
> I posted previously on GPIOs, which caused some debate; this may or may not
> be relevant, but I'd be remiss to not mention it:
>
> http://lists.openwrt.org/pipermail/openwrt-devel/2022-October/039593.html
>
> I've been chasing an issue with GPIO mapping in for an mt7621 on the OpenWrt
> 5.10.161 etc kernels.
>
> In short, GPIOS up to at least 17 work, but 22 and beyond do not - 5-17 and
> 22-24 are LEDs, so their operation should be immediately obvious. The are all
> active high and are all wired as you'd expect.
>
> This all works as expected on a previous 4.14 kernel. To say that there
> have been significant changes in drivers, GPIO handling and device tree since
> that kernel would be an understatement.
>
> I have tried exporting the GPIOS as LEDs, named GPIOs, direct manipulation in
> /sys/class/gpio and libgpiod, but something is amiss. The actual value of the
> GPIO as seen in software can manipulated in all cases, but the physical value
> does not change.
>
> Suspiciously, MDIO/MDC are at GPIOs 20 and 21, so I don't know if these are
> upsetting the physical mapping. I've also turned off as much as possible in
> the device tree, and built the kernel without switch and ethernet drivers, etc.
>
> I'm tearing my hair out here, so any clues at all would be appreciated.
>
> Thanks!
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list