Re: [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI

From
Peter Hilber <hidden>
Date
2021-07-01 08:43:12
Also in
linux-arm-kernel, lkml
Reply to
Cristian Marussi, 2021-06-11
On 11.06.21 18:59, Cristian Marussi wrote:
quoted hunk ↗ jump to hunk
From: Igor Skalkin <redacted>

Document the properties for arm,scmi-virtio compatible nodes.
The backing virtio SCMI device is described in patch [1].

While doing that, make shmem property required only for pre-existing
mailbox and smc transports, since virtio-scmi does not need it.

[1] https://lists.oasis-open.org/archives/virtio-comment/202102/msg00018.html

CC: Rob Herring <robh+dt@kernel.org>
CC: <redacted>
Signed-off-by: Igor Skalkin <redacted>
[ Peter: Adapted patch for submission to upstream. ]
Co-developed-by: Peter Hilber <redacted>
Signed-off-by: Peter Hilber <redacted>
[ Cristian: converted to yaml format, moved shmen required property. ]
Co-developed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
v3 --> V4
- convertd to YAML
- make shmem required only for pre-existing mailbox and smc transport
- updated VirtIO specification patch message reference
- dropped virtio-mmio SCMI device example since really not pertinent to
   virtio-scmi dt bindings transport: it is not even referenced in SCMI
   virtio DT node since they are enumerated by VirtIO subsystem and there
   could be PCI based SCMI devices anyway.
---
  Documentation/devicetree/bindings/firmware/arm,scmi.yaml | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index cebf6ffe70d5..5c4c6782e052 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -34,6 +34,10 @@ properties:
        - description: SCMI compliant firmware with ARM SMC/HVC transport
          items:
            - const: arm,scmi-smc
+      - description: SCMI compliant firmware with SCMI Virtio transport.
+                     The virtio transport only supports a single device.
+        items:
+          - const: arm,scmi-virtio
  
    interrupts:
      description:
@@ -172,6 +176,7 @@ patternProperties:
        Each sub-node represents a protocol supported. If the platform
        supports a dedicated communication channel for a particular protocol,
        then the corresponding transport properties must be present.
+      The virtio transport does not support a dedicated communication channel.
  
      properties:
        reg:
@@ -195,7 +200,6 @@ patternProperties:
  
  required:
    - compatible
-  - shmem
  
  if:
    properties:
@@ -209,6 +213,7 @@ then:
  
    required:
      - mboxes
+    - shmem
  
  else:
    if:
@@ -219,6 +224,7 @@ else:
    then:
      required:
        - arm,smc-id
+      - shmem
  
  examples:
    - |
Maybe a minimal example for arm,scmi-virtio could be added, such as below:
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index 5c4c6782e052..576faf970c1b 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -344,4 +344,19 @@ examples:
         };
     };

+  - |
+    firmware {
+        scmi {
+            compatible = "arm,scmi-virtio";
+
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            scmi_devpd2: protocol@11 {
+                reg = <0x11>;
+                #power-domain-cells = <1>;
+            };
+        };
+    };
+
 ...
Thread (4 messages) 4 messages, 3 authors, last reply 2021-07-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help