mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francesco Valla <francesco@valla.it>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Mark Brown <broonie@kernel.org>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Haixu Cui <quic_haixcui@quicinc.com>,
	 Jason Wang <jasowangio@gmail.com>
Cc: "Viresh Kumar" <viresh.kumar@linaro.org>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Mathieu Poirier" <mathieu.poirier@linaro.org>,
	linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, virtualization@lists.linux.dev,
	"Francesco Valla" <francesco@valla.it>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Subject: [PATCH v3 1/2] dt-bindings: spi: add spi-virtio
Date: Thu, 29 Oct 2026 17:27:43 +0100	[thread overview]
Message-ID: <20261029-spi-virtio-bindings-v3-1-ef30217abefd@valla.it> (raw)
In-Reply-To: <20261029-spi-virtio-bindings-v3-0-ef30217abefd@valla.it>

Add bindings for spi-virtio based on virtio-device, allowing proper
validation of SPI controller nodes declared as children of virtio
transports (e.g.: virtio-mmio). Such nodes are not used to instantiate
devices, which are registered by the virtio transport, but to define
their properties and establish dependencies with other nodes.

The compatible follows what the virtio framework already searches for,
"2d" being the hexadecimal representation of the SPI controller device
ID defined by the virtio specification [1].

[1] https://docs.oasis-open.org/virtio/virtio/v1.4/virtio-v1.4.html

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Francesco Valla <francesco@valla.it>
---
 .../devicetree/bindings/spi/spi-virtio.yaml        | 46 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 47 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..5fc04a9c62cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-virtio.yaml
@@ -0,0 +1,46 @@
+# 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#
+
+properties:
+  compatible:
+    const: virtio,device2d
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+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";
+                reg = <0>;
+                spi-max-frequency = <20000000>;
+            };
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 03649f08c7c7..5724645bf703 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -29675,6 +29675,7 @@ VIRTIO SPI DRIVER
 M:	Haixu Cui <quic_haixcui@quicinc.com>
 L:	virtualization@lists.linux.dev
 S:	Maintained
+F:	Documentation/devicetree/bindings/spi/spi-virtio.yaml
 F:	drivers/spi/spi-virtio.c
 F:	include/uapi/linux/virtio_spi.h
 

-- 
2.56.0


  reply	other threads:[~2026-10-29 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 16:27 [PATCH v3 0/2] Add devicetree bindings and maintainer for spi-virtio Francesco Valla
2026-10-29 16:27 ` Francesco Valla [this message]
2026-10-29 16:27 ` [PATCH v3 2/2] MAINTAINERS: replace spi-virtio maintainer Francesco Valla
2026-10-29 19:23   ` Krzysztof Kozlowski
2026-10-30  4:08 ` [PATCH v3 0/2] Add devicetree bindings and maintainer for spi-virtio Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029-spi-virtio-bindings-v3-1-ef30217abefd@valla.it \
    --to=francesco@valla.it \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eperezma@redhat.com \
    --cc=jasowangio@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mst@redhat.com \
    --cc=quic_haixcui@quicinc.com \
    --cc=robh@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®