[PATCH RFC 08/12] dt-bindings: remoteproc: add remoteproc-virtio
Mathieu Poirier
mathieu.poirier at linaro.org
Wed Sep 23 07:56:38 PDT 2026
On Tue, 22 Sept 2026 at 13:44, Francesco Valla <francesco at valla.it> wrote:
>
> On Tue, Sep 22, 2026 at 09:40:31AM -0600, Mathieu Poirier wrote:
> > On Wed, Sep 16, 2026 at 11:10:53PM +0200, Francesco Valla wrote:
> > > Add a new binding to describe remoteproc-provided virtio devices; while
> > > these are discovered through a resource table parsed by the remoteproc
> > > infrastructure at runtime, their description can be needed to probe
> > > non-discoverable buses (such as I2C) or to link consumers and suppliers.
> > >
> > > Each vdev is described by a dedicated "group" node, which then includes
> > > a virtio-device node, which binding is already existent and used by
> > > virtio-mmio. Each vdev shall be stattically linked to a "group" node
> > > using its index inside the resource table as the reg property of the
> > > node; this permits to have multiple instances of the same type of
> > > device.
> > >
> > > The binding is intended to be generic and adopted by any remoteproc
> > > provider.
> > >
> > > Signed-off-by: Francesco Valla <francesco at valla.it>
> > > ---
> > > .../bindings/remoteproc/remoteproc-virtio.yaml | 89 ++++++++++++++++++++++
> > > 1 file changed, 89 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/remoteproc/remoteproc-virtio.yaml b/Documentation/devicetree/bindings/remoteproc/remoteproc-virtio.yaml
> > > new file mode 100644
> > > index 000000000000..c4a0d84b1460
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/remoteproc/remoteproc-virtio.yaml
> > > @@ -0,0 +1,89 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/remoteproc/remoteproc-virtio.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Virtio devices over remoteproc
> > > +
> > > +description: |
> > > + Virtio devices ("vdevs") can be exposed using the remoteproc infrastructure
> > > + and its resource table. For some of them, a device tree node might be needed
> > > + to describe remote undiscoverable hardware and/or connect consumers and
> > > + providers.
> > > +
> > > +maintainers:
> > > + - Francesco Valla <francesco at valla.it>
> > > +
> > > +properties:
> > > + virtio:
> > > + description: Contains a group of Virtio devices exposed by the remoteproc.
> > > +
> > > + properties:
> > > + '#address-cells':
> > > + const: 1
> > > +
> > > + '#size-cells':
> > > + const: 0
> > > +
> > > + patternProperties:
> > > + "^vdev@[0-9a-f]+$":
> > > + type: object
> > > +
> > > + properties:
> > > + reg:
> > > + description: Virtio device index inside the resource table.
> > > + maxItems: 1
> > > +
> > > + additionalProperties:
> > > + type: object
> > > + $ref: /schemas/virtio/virtio-device.yaml
> > > + maxItems: 1
> > > +
> > > + required:
> > > + - reg
> > > +
> > > + additionalProperties: false
> > > +
> > > + required:
> > > + - '#address-cells'
> > > + - '#size-cells'
> > > +
> > > +additionalProperties: true
> > > +
> > > +examples:
> > > + - |
> > > + remoteproc-cm33 {
> > > + virtio {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + vdev at 0 {
> > > + reg = <0>;
> > > +
> >
> > Do we need the 'reg' since we already have vdev at X? I'll let the DT people
> > provide their input on this.
> >
>
> AFAIK yes, because the rproc_get_vdev_fwnode() helpers search for indexed
> child nodes using the 'reg' property, not the node name. This I believe
> is the preferred way of doing things.
>
> > > + gpio {
> > > + compatible = "virtio,device29";
> > > +
> > > + gpio-controller;
> > > + #gpio-cells = <2>;
> > > + };
> > > + };
> > > +
> > > + vdev at 1 {
> > > + reg = <1>;
> > > +
> > > + i2c {
> > > + compatible = "virtio,device22";
> > > +
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + eeprom at 50 {
> > > + compatible = "atmel,24c1025";
> > > + reg = <0x50>;
> > > + };
> >
> > The previous patch introduced bindings for virtio SPI while the above two are
> > for GPIO and I2c, which is very confusing. I suggest you pick one and apply
> > everywhere.
> >
>
> This is because both GPIO and I2C bindings are already defined - even if
> not used in the devicetree files part of the kernel tree.
>
> Moving forward, I plan to submit at least the spi-virtio bindings as a
> separate patch set, as they can be used independently of this one.
I suggest you leave spi-virtio out of this patchset. That way we can
concentrate on doing only one thing.
>
> > > + };
> > > + };
> > > + };
> > > + };
> > > +...
> > >
> > > --
> > > 2.55.0
> > >
>
> Regards,
> Francesco
>
More information about the linux-arm-kernel
mailing list