> -----Original Message-----
> From: Rob Herring <[email protected]>
> Sent: Wednesday, November 12, 2025 6:53 AM
> To: Shenwei Wang <[email protected]>
> Cc: Bjorn Andersson <[email protected]>; Mathieu Poirier
> <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor
> Dooley <[email protected]>; Shawn Guo <[email protected]>; Sascha
> Hauer <[email protected]>; Jonathan Corbet <[email protected]>; Linus
> Walleij <[email protected]>; Bartosz Golaszewski <[email protected]>;
> Pengutronix Kernel Team <[email protected]>; Fabio Estevam
> <[email protected]>; Peng Fan <[email protected]>; linux-
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; dl-linux-imx <[email protected]>
> Subject: [EXT] Re: [PATCH v5 1/5] dt-bindings: remoteproc: imx_rproc: Add
> "rpmsg" subnode support
> > +        patternProperties:
> > +          "gpio@[0-9a-f]+$":
> > +            type: object
> > +            unevaluatedProperties: false
> > +            properties:
> > +              compatible:
> > +                enum:
> > +                  - fsl,imx-rpmsg-gpio
> > +
> > +              reg:
> > +                maxItems: 1
> 
> I still don't understand what the numbers for 'reg' mean here. You explained 
> it
> and I still don't understand. In any case, it needs to be explained in the 
> schema.
> 
> For example, why do GPIO and I2C each have their own number space?
> 

Hi Rob,

The reg property represents the index of the GPIO controllers. Since the driver 
manages controllers 
on a remote system, this index tells the remote system which controller to 
operate.

For example, if the remote system has four GPIO controllers but only allocates 
two (indices 0 and 2) 
to Linux, the DTS might look like this:

          gpio@0 {
            compatible = "fsl,imx-rpmsg-gpio";
            reg = <0>;
          };

          gpio@2 {
            compatible = "fsl,imx-rpmsg-gpio";
            reg = <2>;
          }

Similarly, I²C numbers are mapped to their corresponding remote controllers in 
the same way. That's why
each has their own number space.

Thanks,
Shenwei

> > +
> > +              "#gpio-cells":
> > +                const: 2
> > +
> > +              gpio-controller: true

Reply via email to