Thread (59 messages) 59 messages, 7 authors, 2026-02-20

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

From: James Hilliard <hidden>
Date: 2026-02-13 18:34:18
Also in: linux-gpio, lkml

On Fri, Feb 13, 2026 at 1:25 AM Geert Uytterhoeven [off-list ref] wrote:
Hi James,

On Thu, 12 Feb 2026 at 22:22, James Hilliard [off-list ref] wrote:
quoted
On Thu, Feb 12, 2026 at 12:54 PM Rob Herring [off-list ref] wrote:
quoted
Humm, peripheral boards! So there's a connector. You need a connector
binding. And the one solved binding for such a thing is GPIO! The
gpio-map property lets you remap GPIOs from one provider (the connector)
to a parent provider (soc_gpio). It would look something like this:
Well...some GPIOs are wired to peripheral board connectors...but
some are wired to things like built in LEDs and a few different
on-controller components as well which vary by controller hardware
revisions.
Different controller hardware revisions with different wiring mean
different DTS/DTB files anyway, right?
Just different dtso files, the primary dts can be the same since the
board designs are similar enough.
quoted
This gpio-map feature doesn't exist in the mainline kernel does it?
Yes it is.
Oh, where in the mainline kernel is the code for it? I searched and
couldn't find any references to it.
quoted
In my device everything I'm wanting to name is off the same gpiochip.
That would depend on the SoC: some SoCs have a single bank,
others have multiple banks. The more generic is supported, the better.
quoted
quoted
conn_gpio: connector {
        #gpio-cells = <1>;
        gpio-map = <0 &soc_gpio 3>,
                   <1 &soc_gpio 123>;
        gpio-line-names = "GPIO0", "GPIO1";

        /* in an overlay */
        device {
                foo-gpios = <&conn_gpio 1>; /* soc_gpio 123 */
};
I think in my case the entire connector would be in the overlay, as
the connector GPIO lines vary by control board hardware revisions.
Would that still work?
Why in the overlay? If the controller hardware differs in wiring,
it needs a different DTS/DTB.
The differences are relatively minor so creating separate DTS
files for each subversion of the control board doesn't seem ideal,
I use a unified dts for both uboot and linux and only apply
overlays when loading linux as uboot doesn't really care about
the minor differences as uboot doesn't really do anything with
the hardware on those lines.
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help