Re: [PATCH v5 1/5] dt-bindings: remoteproc: imx_rproc: Add "rpmsg" subnode support

Shenwei Wang
2025-11-12T15:36:22Z

> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Wednesday, November 12, 2025 6:53 AM
> To: Shenwei Wang <shenwei.wang@nxp.com>
> Cc: Bjorn Andersson <andersson@kernel.org>; Mathieu Poirier
> <mathieu.poirier@linaro.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor
> Dooley <conor+dt@kernel.org>; Shawn Guo <shawnguo@kernel.org>; Sascha
> Hauer <s.hauer@pengutronix.de>; Jonathan Corbet <corbet@lwn.net>; Linus
> Walleij <linus.walleij@linaro.org>; Bartosz Golaszewski <brgl@bgdev.pl>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam
> <festevam@gmail.com>; Peng Fan <peng.fan@nxp.com>; linux-
> remoteproc@vger.kernel.org; devicetree@vger.kernel.org; imx@lists.linux.dev;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
> doc@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>
> 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