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

From: Herve Codina

Date: Wed Feb 11 2026 - 04:58:22 EST


Hi,

On Wed, 11 Feb 2026 10:47:53 +0100
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:

> Hi James,
>
> CC Hervé
>
> On Wed, 11 Feb 2026 at 09:35, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> > On Wed, Feb 11, 2026 at 1:26 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > > On Wed, 11 Feb 2026 at 09:14, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> > > > Document the gpio-aggregator virtual GPIO controller with a dedicated
> > > > schema and compatible string.
> > > >
> > > > Also extend the GPIO AGGREGATOR MAINTAINERS entry to cover the new
> > > > binding file.
> > > >
> > > > Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> > >
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/gpio/gpio-aggregator.yaml
> > > > @@ -0,0 +1,54 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/gpio/gpio-aggregator.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: GPIO aggregator controller
> > > > +
> > > > +maintainers:
> > > > + - Alexander Stein <linux@xxxxxxxxxxxxxxx>
> > > > +
> > > > +description:
> > > > + GPIO aggregator forwards selected GPIO lines from one or more GPIO
> > > > + controllers and exposes them as a virtual GPIO controller.
> > >
> > > > +examples:
> > > > + - |
> > > > + #include <dt-bindings/gpio/gpio.h>
> > > > +
> > > > + gpio_agg: gpio-aggregator {
> > > > + compatible = "gpio-aggregator";
> > > > + #gpio-cells = <2>;
> > > > + gpio-controller;
> > > > + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>,
> > > > + <&gpio3 1 GPIO_ACTIVE_HIGH>;
> > > > + gpio-line-names = "modem-reset", "modem-enable";
> > > > + };
> > >
> > > Looking at the example, it seems you intend to use the gpio-aggregator
> > > as a "Generic GPIO Driver", like in the example in the documentation[1].
> > > Hence I think you should not introduce and abuse the "gpio-aggregator"
> > > compatible value for this, but instead:
> > > 1. Use a proper compatible value that matches your device,
> > > 2. Write proper DT bindings for the device,
> > > 3. Add the proper device's compatible value to the gpio-aggregator
> > > driver's match table.
> > > The above is very similar to how spidev is handled, which also forbids
> > > using the spidev compatible value in DTS.
> >
> > Isn't this gpio-aggregator driver supposed to be non-hardware
> > specific?
> >
> > I'm trying to use it as described here, I noticed the compatible
> > in the blog post was missing and just needed adding to the
> > driver: https://bootlin.com/blog/gpio-aggregator-a-virtual-gpio-chip/
>
> Let's kick Hervé to fix that ;-)

Where is it missing ?

In the DTS snippet example I see:
--- 8< ---
gpio-aggregator {
pinctrl-names = "default";
pinctrl-0 = <&gpio_pins>;
compatible = "gpio-aggregator";
...
};
--- 8< ---

Best regards,
Hervé