[PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver
Mathieu Poirier
mathieu.poirier at linaro.org
Tue Feb 24 14:47:02 PST 2026
On Tue, 24 Feb 2026 at 15:32, Shenwei Wang <shenwei.wang at nxp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Andrew Lunn <andrew at lunn.ch>
> > Sent: Tuesday, February 24, 2026 4:23 PM
> > To: Shenwei Wang <shenwei.wang at nxp.com>
> > Cc: Arnaud POULIQUEN <arnaud.pouliquen at foss.st.com>; Linus Walleij
> > <linusw at kernel.org>; Bartosz Golaszewski <brgl at kernel.org>; Jonathan Corbet
> > <corbet at lwn.net>; Rob Herring <robh at kernel.org>; Krzysztof Kozlowski
> > <krzk+dt at kernel.org>; Conor Dooley <conor+dt at kernel.org>; Bjorn Andersson
> > <andersson at kernel.org>; Mathieu Poirier <mathieu.poirier at linaro.org>; Frank Li
> > <frank.li at nxp.com>; Sascha Hauer <s.hauer at pengutronix.de>; Shuah Khan
> > <skhan at linuxfoundation.org>; linux-gpio at vger.kernel.org; linux-
> > doc at vger.kernel.org; linux-kernel at vger.kernel.org; Pengutronix Kernel Team
> > <kernel at pengutronix.de>; Fabio Estevam <festevam at gmail.com>; Peng Fan
> > <peng.fan at nxp.com>; devicetree at vger.kernel.org; linux-
> > remoteproc at vger.kernel.org; imx at lists.linux.dev; linux-arm-
> > kernel at lists.infradead.org; dl-linux-imx <linux-imx at nxp.com>; Bartosz
> > Golaszewski <brgl at bgdev.pl>
> > 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 at 0 {
> > > > > + compatible = "rpmsg-gpio";
> > > > > + reg = <0>;
> > > > > + gpio-controller;
> > > > > + #gpio-cells = <2>;
> > > > > + #interrupt-cells = <2>;
> > > > > + interrupt-controller;
> > > > > + };
> > > > > + gpio at 1 {
> > > > > + compatible = "rpmsg-gpio";
> > > > > + reg = <1>;
> > > > > + gpio-controller;
> > > > > + #gpio-cells = <2>;
> > > > > + #interrupt-cells = <2>;
> > > > > + interrupt-controller;
> > > > > + };
> >
> > > Then how would you distinguish gpio at 0 from gpio at 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 at 0 is on rpmsg channel 0. gpio at 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 at 0 and gpio at 1 run over this same transport.
> The transport here is the RPMSG channel, so multiple GPIO controllers share that channel.
>
That is one of my main problem with this proposal - multiplexing
several GPIO controllers over the same RPMSG channel adds complexity.
RPMSG can already handle multiplexing via channels, use one RPMSG
channel per GPIO controller.
> Thanks,
> Shenwei
>
> >
> > Andrew
>
More information about the linux-arm-kernel
mailing list