mt7621 GPIO mapping mystery

Lukas Zeller luz at plan44.ch
Sat Jan 21 04:19:46 PST 2023


Hi,

> On 21 Jan 2023, at 08:56, Sergio Paracuellos <sergio.paracuellos at gmail.com> wrote:
> 
> [...] Yes, you have to claim the pin group as gpio on the device tree to
> make this work.

This revals a underlying problem I tried to ask about back in June 2022 [1] - what is the state of userland GPIO support in OpenWrt?

Changing the DT is *not* something an user of an educational/experimental device based on OpenWrt is able to do, as long as the DT is baked into the firmware image, and not modifiable from user space.

Allowing configfs loadable device tree overlays would make that possible, but that path was decided against (so far) [2].

So while I understand that using only the DT mechanisms for configuring GPIO modes, named gpios and libgpiod instead of /sys/class/gpio etc. is the way to go, I must also state that without loadable DT overlays, this essentially makes openwrt unsuitable for experimental/educational devices.

I could also understand if this was an intentional decision, after all OpenWrt is a router OS.

But *is* it intentional? I find OpenWrt highly useful as a base OS for small networked devices that are not routers, to cover the mostly empty space between Arduino and RaspberryPi. Useful Linux in 16M flash rather than 32GB, with no flash wear problems by design...

[1] http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038912.html
[2] http://lists.openwrt.org/pipermail/openwrt-devel/2021-November/037139.html

Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20230121/dcd727da/attachment.sig>


More information about the openwrt-devel mailing list