Re: [PATCH v2 1/2] dt-bindings: gpio: add gpio-aggregator binding

From: James Hilliard

Date: Thu Feb 12 2026 - 11:58:32 EST


On Thu, Feb 12, 2026 at 7:50 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> Hi James,
>
> On Wed, 11 Feb 2026 at 18:01, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> > On Wed, Feb 11, 2026 at 1:44 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
> > > On 11/02/2026 09:28, James Hilliard wrote:
> > > > virtual gpio driver though so AFAIU it's not hardware specific.
> > >
> > > You can give example of any hardware where this is useful. You need to
> > > make your case with actual arguments.
> >
> > The sunxi h616 board I have has hundreds of GPIOs, only
> > a few of which are needed, I want to map them in device
> > tree overlays since there's some minor variants with different
> > hardware gpio configurations.
> >
> > Setting the gpio names on the parent controller is not practical
> > since doing so would require setting hundreds of values for
> > gpio-line-names, you also can't really combine sets of pin
> > names across device tree overlays AFAIU.
> >
> > > > Use case is I have a device with something like 300 gpio
> > > > lines...and I want to name/group a small subset of those
> > > > lines for delegation to a userspace app rather than trying
> > > > to set 300 or something gpio-line-names values, also I'm
> > >
> > > So if I change the approach in user-space or use different user-space
> > > app then I change the DTS?
> >
> > The idea is to make it practical to set gpio-line-names for a
> > subset of the GPIOs that are wired to peripheral boards.
> >
> > Say for example I have a control board connected to a few
> > different peripheral boards, there may be different mixtures
> > of peripheral boards, some of which can be used at the same
> > time as they use different GPIOs.
> >
> > The idea is we load device tree overlays for the detected
> > peripheral boards with detection done in uboot based on a
> > GPIO pin strapping based detection.
>
> Sounds like the work being done in "[RFC PATCH 00/77] Add support for
> dtb metadata and addon device-trees" [1] can be helpful for you, too.

I think I came across this as well, it did look potentially useful for
moving hardware variant device detection out of uboot, but doesn't
really seem to help with the gpio-line-names definition problem
that I was trying to solve with the gpio-aggregator.

The hardware I'm working with isn't really designed for runtime
hotplugging but the eeprom based detection could be useful
it seems(currently that's mostly done in userspace logic for the
peripheral boards). The line naming is more for dealing with
control card variant detection so that I can pass line names to
a username application via device tree.

Even defining line names for boards without overlays or any
runtime detection seems to require a ridiculous amount of ""
placeholders at the moment, i.e.:
https://github.com/torvalds/linux/blob/v6.19/arch/arm/boot/dts/allwinner/sun7i-a20-bananapi.dts#L227-L276

Is there any work going on to allow offset based gpio-line-names
definitions so that it's not required to set all gpio-line-names at the
same time(essentially making individual line name overrides
in either device tree includes/overlays impossible)?


>
> [1] https://lore.kernel.org/20260112142009.1006236-1-herve.codina@xxxxxxxxxxx
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds