Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver

From: Shenwei Wang

Date: Tue Feb 24 2026 - 17:35:45 EST




> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Tuesday, February 24, 2026 4:23 PM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>
> Cc: Arnaud POULIQUEN <arnaud.pouliquen@xxxxxxxxxxx>; Linus Walleij
> <linusw@xxxxxxxxxx>; Bartosz Golaszewski <brgl@xxxxxxxxxx>; Jonathan Corbet
> <corbet@xxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzk+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Bjorn Andersson
> <andersson@xxxxxxxxxx>; Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>; Frank Li
> <frank.li@xxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Shuah Khan
> <skhan@xxxxxxxxxxxxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx; linux-
> doc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>; Peng Fan
> <peng.fan@xxxxxxx>; devicetree@xxxxxxxxxxxxxxx; linux-
> remoteproc@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Bartosz
> Golaszewski <brgl@xxxxxxxx>
> Subject: Re: [EXT] Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver
>
> Caution: This is an external email. Please take care when clicking links or opening
> attachments. When in doubt, report the message using the 'Report this email'
> button
>
>
> > > > + remote_cm33{
> > > > + rpmsg {
> > > > + rpmsg-io-channel {
> > > > + #address-cells = <1>;
> > > > + #size-cells = <0>;
> > > > +
> > > > + gpio@0 {
> > > > + compatible = "rpmsg-gpio";
> > > > + reg = <0>;
> > > > + gpio-controller;
> > > > + #gpio-cells = <2>;
> > > > + #interrupt-cells = <2>;
> > > > + interrupt-controller;
> > > > + };
> > > > + gpio@1 {
> > > > + compatible = "rpmsg-gpio";
> > > > + reg = <1>;
> > > > + gpio-controller;
> > > > + #gpio-cells = <2>;
> > > > + #interrupt-cells = <2>;
> > > > + interrupt-controller;
> > > > + };
>
> > Then how would you distinguish gpio@0 from gpio@1 on the CM33 RPMSG bus
> in the example above?
> > They are running on the same transport.
>
> Doesn't reg indicate the channel number? gpio@0 is on rpmsg channel 0. gpio@1
> is on channel 1? The reg value gets filled into struct rpmsg_channel_info when
> the endpoints are created?

There is only a single RPMSG channel for the CM33 remoteproc in this example-its name
is "rpmsg-io-channel". As I mentioned above, both gpio@0 and gpio@1 run over this same transport.
The transport here is the RPMSG channel, so multiple GPIO controllers share that channel.

Thanks,
Shenwei

>
> Andrew