* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-29 16:41 ` [PATCH 1/2] dt-bindings: spi: add " Francesco Valla
@ 2026-09-29 16:50 ` sashiko-bot
2026-09-30 6:19 ` Francesco Valla
2026-09-30 12:03 ` Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: sashiko-bot @ 2026-09-29 16:50 UTC (permalink / raw)
To: Francesco Valla
Cc: devicetree, virtualization, Eugenio Perez, robh, conor+dt,
Michael S. Tsirkin
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: spi-virtio: undocumented compatible in example
--
commit eb6ae8a9a8b3aa403347f70589897a8c7d297186
Author: Francesco Valla <francesco@valla.it>
dt-bindings: spi: add bindings for spi-virtio
This commit adds device tree bindings for spi-virtio based on virtio-device.
It defines the properties and node dependencies for the virtio SPI controller.
> diff --git a/Documentation/devicetree/bindings/spi/spi-virtio.yaml b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> new file mode 100644
> index 0000000000000..5b8639dd2e1f1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
[ ... ]
> +examples:
> + - |
> + virtio@3000 {
> + compatible = "virtio,mmio";
> + reg = <0x3000 0x100>;
> + interrupts = <41>;
> +
> + spi {
> + compatible = "virtio,device2d";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sram@0 {
> + compatible = "microchip,mchp23k256";
[Severity: Low]
Is this compatible string documented in any existing binding schema?
The dt_binding_check tool strictly validates all compatible strings against
known schemas, so an undocumented compatible string in an example will emit a
schema validation warning.
When running make dt_binding_check on the new spi-virtio.yaml file, it
parses the example and attempts to match microchip,mchp23k256 against
registered bindings, which fails if none exist.
> + reg = <0>;
> + spi-max-frequency = <20000000>;
> + };
> + };
> + };
> +
> +...
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260929-spi-virtio-bindings-v1-0-6a0eef3213b3@valla.it?part=1
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-29 16:50 ` sashiko-bot
@ 2026-09-30 6:19 ` Francesco Valla
0 siblings, 0 replies; 11+ messages in thread
From: Francesco Valla @ 2026-09-30 6:19 UTC (permalink / raw)
To: sashiko-reviews
Cc: devicetree, virtualization, Eugenio Perez, robh, conor+dt,
Michael S. Tsirkin
On Tue, Sep 29, 2026 at 04:50:14PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] dt-bindings: spi-virtio: undocumented compatible in example
> --
>
> commit eb6ae8a9a8b3aa403347f70589897a8c7d297186
> Author: Francesco Valla <francesco@valla.it>
>
> dt-bindings: spi: add bindings for spi-virtio
>
> This commit adds device tree bindings for spi-virtio based on virtio-device.
> It defines the properties and node dependencies for the virtio SPI controller.
>
> > diff --git a/Documentation/devicetree/bindings/spi/spi-virtio.yaml b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> > new file mode 100644
> > index 0000000000000..5b8639dd2e1f1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
>
> [ ... ]
>
> > +examples:
> > + - |
> > + virtio@3000 {
> > + compatible = "virtio,mmio";
> > + reg = <0x3000 0x100>;
> > + interrupts = <41>;
> > +
> > + spi {
> > + compatible = "virtio,device2d";
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + sram@0 {
> > + compatible = "microchip,mchp23k256";
>
> [Severity: Low]
> Is this compatible string documented in any existing binding schema?
>
Yes - the compatible fot the Microchip MCHP23K256 is documented in:
Documentation/devicetree/bindings/mtd/microchip,mchp23k256.yaml
> The dt_binding_check tool strictly validates all compatible strings against
> known schemas, so an undocumented compatible string in an example will emit a
> schema validation warning.
>
> When running make dt_binding_check on the new spi-virtio.yaml file, it
> parses the example and attempts to match microchip,mchp23k256 against
> registered bindings, which fails if none exist.
>
> > + reg = <0>;
> > + spi-max-frequency = <20000000>;
> > + };
> > + };
> > + };
> > +
> > +...
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260929-spi-virtio-bindings-v1-0-6a0eef3213b3@valla.it?part=1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-29 16:41 ` [PATCH 1/2] dt-bindings: spi: add " Francesco Valla
2026-09-29 16:50 ` sashiko-bot
@ 2026-09-30 12:03 ` Krzysztof Kozlowski
2026-09-30 16:22 ` Francesco Valla
2026-10-26 22:05 ` Rob Herring
2026-10-26 22:07 ` Rob Herring
3 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-30 12:03 UTC (permalink / raw)
To: Francesco Valla
Cc: Michael S. Tsirkin, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Haixu Cui, Jason Wang, Viresh Kumar, Xuan Zhuo,
Eugenio Pérez, linux-spi, devicetree, linux-kernel,
virtualization
On Tue, Sep 29, 2026 at 06:41:55PM +0200, Francesco Valla wrote:
> Add bindings for spi-virtio based on virtio-device, reflecting what
> already exists for gpio-virtio and i2c-virtio. A node using the bindings
Existing code is not a reason to add more code. Existing bugs are not a
reason to add more bugs. Please provide proper rationale why this suits
DT.
> is not used to instantiate the device, which is registered by the
> transport (e.g.: virtio-mmio), but to define its properties and
> establish dependencies with other nodes.
>
> Add the new bindings inside the MAINTAINERS file.
>
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
> .../devicetree/bindings/spi/spi-virtio.yaml | 53 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 54 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-virtio.yaml b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> new file mode 100644
> index 000000000000..5b8639dd2e1f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/spi-virtio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Virtio SPI controller device
> +
> +maintainers:
> + - Francesco Valla <francesco@valla.it>
> +
> +allOf:
> + - $ref: /schemas/spi/spi-controller.yaml#
> + - $ref: /schemas/virtio/virtio-device.yaml#
> +
> +description:
> + Virtio SPI controller device, see /schemas/virtio/virtio-device.yaml for
> + more details.
> +
> +properties:
> + $nodename:
> + const: spi
> +
> + compatible:
> + const: virtio,device2d
From where does the compatible come from?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-30 12:03 ` Krzysztof Kozlowski
@ 2026-09-30 16:22 ` Francesco Valla
0 siblings, 0 replies; 11+ messages in thread
From: Francesco Valla @ 2026-09-30 16:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Michael S. Tsirkin, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Haixu Cui, Jason Wang, Viresh Kumar, Xuan Zhuo,
Eugenio Pérez, linux-spi, devicetree, linux-kernel,
virtualization
Hello Krzysztof,
On Wed, Sep 30, 2026 at 02:03:17PM +0200, Krzysztof Kozlowski wrote:
> On Tue, Sep 29, 2026 at 06:41:55PM +0200, Francesco Valla wrote:
> > Add bindings for spi-virtio based on virtio-device, reflecting what
> > already exists for gpio-virtio and i2c-virtio. A node using the bindings
>
> Existing code is not a reason to add more code. Existing bugs are not a
> reason to add more bugs. Please provide proper rationale why this suits
> DT.
>
When a non-discoverable bus (SPI in this case, but that's true also for
e.g. the I2C and GPIO cases I mentioned) made available by a virtio
transport is registered, the devicetree can be used to declare its child
devices (if any) and/or other properties (say,i GPIOs tied to CS lines
for the SPI usecase).
The virtio framework already searches for a node with a suitable
compatible when registering a device [1]; this binding is thus not
introducing a new functionality, but allowing proper validation of
nodes tied to spi-virtio devices.
> > is not used to instantiate the device, which is registered by the
> > transport (e.g.: virtio-mmio), but to define its properties and
> > establish dependencies with other nodes.
> >
> > Add the new bindings inside the MAINTAINERS file.
> >
> > Signed-off-by: Francesco Valla <francesco@valla.it>
> > ---
> > .../devicetree/bindings/spi/spi-virtio.yaml | 53 ++++++++++++++++++++++
> > MAINTAINERS | 1 +
> > 2 files changed, 54 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/spi-virtio.yaml b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> > new file mode 100644
> > index 000000000000..5b8639dd2e1f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> > @@ -0,0 +1,53 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/spi/spi-virtio.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Virtio SPI controller device
> > +
> > +maintainers:
> > + - Francesco Valla <francesco@valla.it>
> > +
> > +allOf:
> > + - $ref: /schemas/spi/spi-controller.yaml#
> > + - $ref: /schemas/virtio/virtio-device.yaml#
> > +
> > +description:
> > + Virtio SPI controller device, see /schemas/virtio/virtio-device.yaml for
> > + more details.
> > +
> > +properties:
> > + $nodename:
> > + const: spi
> > +
> > + compatible:
> > + const: virtio,device2d
>
> From where does the compatible come from?
>
This is the compatible the virtio framework is expecting [1]; '2d' is the
hexadecimal representation of 45, which is the virtio identifier for a
SPI device [2].
> Best regards,
> Krzysztof
>
Thank you
Regards,
Francesco
[1] https://elixir.bootlin.com/linux/v7.2.8/source/drivers/virtio/virtio.c#L488
[2] https://docs.oasis-open.org/virtio/virtio/v1.4/virtio-v1.4.html @ 5.21.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-29 16:41 ` [PATCH 1/2] dt-bindings: spi: add " Francesco Valla
2026-09-29 16:50 ` sashiko-bot
2026-09-30 12:03 ` Krzysztof Kozlowski
@ 2026-10-26 22:05 ` Rob Herring
2026-10-26 22:07 ` Rob Herring
3 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2026-10-26 22:05 UTC (permalink / raw)
To: Francesco Valla
Cc: Michael S. Tsirkin, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
Haixu Cui, Jason Wang, Viresh Kumar, Xuan Zhuo,
Eugenio Pérez, linux-spi, devicetree, linux-kernel,
virtualization
On Tue, Sep 29, 2026 at 06:41:55PM +0200, Francesco Valla wrote:
> Add bindings for spi-virtio based on virtio-device, reflecting what
> already exists for gpio-virtio and i2c-virtio. A node using the bindings
> is not used to instantiate the device, which is registered by the
> transport (e.g.: virtio-mmio), but to define its properties and
> establish dependencies with other nodes.
>
> Add the new bindings inside the MAINTAINERS file.
>
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
> .../devicetree/bindings/spi/spi-virtio.yaml | 53 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 54 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-virtio.yaml b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> new file mode 100644
> index 000000000000..5b8639dd2e1f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/spi-virtio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Virtio SPI controller device
> +
> +maintainers:
> + - Francesco Valla <francesco@valla.it>
> +
> +allOf:
> + - $ref: /schemas/spi/spi-controller.yaml#
> + - $ref: /schemas/virtio/virtio-device.yaml#
> +
> +description:
> + Virtio SPI controller device, see /schemas/virtio/virtio-device.yaml for
> + more details.
Drop. This just repeats the title and $ref.
> +
> +properties:
> + $nodename:
> + const: spi
Drop. spi-controller.yaml already defines this.
Rob
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] dt-bindings: spi: add bindings for spi-virtio
2026-09-29 16:41 ` [PATCH 1/2] dt-bindings: spi: add " Francesco Valla
` (2 preceding siblings ...)
2026-10-26 22:05 ` Rob Herring
@ 2026-10-26 22:07 ` Rob Herring
3 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2026-10-26 22:07 UTC (permalink / raw)
To: Francesco Valla
Cc: Michael S. Tsirkin, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
Haixu Cui, Jason Wang, Viresh Kumar, Xuan Zhuo,
Eugenio Pérez, linux-spi, devicetree, linux-kernel,
virtualization
On Tue, Sep 29, 2026 at 06:41:55PM +0200, Francesco Valla wrote:
> Add bindings for spi-virtio based on virtio-device, reflecting what
> already exists for gpio-virtio and i2c-virtio. A node using the bindings
> is not used to instantiate the device, which is registered by the
> transport (e.g.: virtio-mmio), but to define its properties and
> establish dependencies with other nodes.
Also drop 'bindings for ' in the subject. No need to say bindings twice.
Rob
^ permalink raw reply [flat|nested] 11+ messages in thread