devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI
       [not found] <20210611165937.701-1-cristian.marussi@arm.com>
@ 2021-06-11 16:59 ` Cristian Marussi
  2021-06-24 19:22   ` Rob Herring
  2021-07-01  8:43   ` Peter Hilber
  0 siblings, 2 replies; 4+ messages in thread
From: Cristian Marussi @ 2021-06-11 16:59 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, virtualization, virtio-dev
  Cc: sudeep.holla, james.quinlan, Jonathan.Cameron, f.fainelli,
	etienne.carriere, vincent.guittot, souvik.chakravarty,
	cristian.marussi, igor.skalkin, peter.hilber, alex.bennee,
	jean-philippe, mikhail.golubev, anton.yakovlev, Vasyl.Vavrychuk,
	Andriy.Tryshnivskyy, Rob Herring, devicetree

From: Igor Skalkin <igor.skalkin@opensynergy.com>

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: devicetree@vger.kernel.org
Signed-off-by: Igor Skalkin <igor.skalkin@opensynergy.com>
[ Peter: Adapted patch for submission to upstream. ]
Co-developed-by: Peter Hilber <peter.hilber@opensynergy.com>
Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
[ 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:
   - |
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI
  2021-06-11 16:59 ` [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI Cristian Marussi
@ 2021-06-24 19:22   ` Rob Herring
  2021-07-01  8:43   ` Peter Hilber
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-06-24 19:22 UTC (permalink / raw)
  To: Cristian Marussi
  Cc: jean-philippe, Rob Herring, vincent.guittot, alex.bennee,
	virtio-dev, virtualization, Jonathan.Cameron, f.fainelli,
	igor.skalkin, Vasyl.Vavrychuk, linux-kernel, sudeep.holla,
	peter.hilber, Andriy.Tryshnivskyy, anton.yakovlev,
	souvik.chakravarty, mikhail.golubev, linux-arm-kernel,
	devicetree, james.quinlan, etienne.carriere

On Fri, 11 Jun 2021 17:59:34 +0100, Cristian Marussi wrote:
> From: Igor Skalkin <igor.skalkin@opensynergy.com>
> 
> 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: devicetree@vger.kernel.org
> Signed-off-by: Igor Skalkin <igor.skalkin@opensynergy.com>
> [ Peter: Adapted patch for submission to upstream. ]
> Co-developed-by: Peter Hilber <peter.hilber@opensynergy.com>
> Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
> [ 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(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI
  2021-06-11 16:59 ` [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI Cristian Marussi
  2021-06-24 19:22   ` Rob Herring
@ 2021-07-01  8:43   ` Peter Hilber
  2021-07-01 10:31     ` Cristian Marussi
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Hilber @ 2021-07-01  8:43 UTC (permalink / raw)
  To: Cristian Marussi, linux-kernel, linux-arm-kernel, virtualization,
	virtio-dev
  Cc: sudeep.holla, james.quinlan, Jonathan.Cameron, f.fainelli,
	etienne.carriere, vincent.guittot, souvik.chakravarty,
	igor.skalkin, alex.bennee, jean-philippe, mikhail.golubev,
	anton.yakovlev, Vasyl.Vavrychuk, Andriy.Tryshnivskyy,
	Rob Herring, devicetree

On 11.06.21 18:59, Cristian Marussi wrote:
> From: Igor Skalkin <igor.skalkin@opensynergy.com>
> 
> 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: devicetree@vger.kernel.org
> Signed-off-by: Igor Skalkin <igor.skalkin@opensynergy.com>
> [ Peter: Adapted patch for submission to upstream. ]
> Co-developed-by: Peter Hilber <peter.hilber@opensynergy.com>
> Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
> [ 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>;
+            };
+        };
+    };
+
  ...

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI
  2021-07-01  8:43   ` Peter Hilber
@ 2021-07-01 10:31     ` Cristian Marussi
  0 siblings, 0 replies; 4+ messages in thread
From: Cristian Marussi @ 2021-07-01 10:31 UTC (permalink / raw)
  To: Peter Hilber
  Cc: linux-kernel, linux-arm-kernel, virtualization, virtio-dev,
	sudeep.holla, james.quinlan, Jonathan.Cameron, f.fainelli,
	etienne.carriere, vincent.guittot, souvik.chakravarty,
	igor.skalkin, alex.bennee, jean-philippe, mikhail.golubev,
	anton.yakovlev, Vasyl.Vavrychuk, Andriy.Tryshnivskyy,
	Rob Herring, devicetree

Hi,

On Thu, Jul 01, 2021 at 10:43:02AM +0200, Peter Hilber wrote:
> On 11.06.21 18:59, Cristian Marussi wrote:
> > From: Igor Skalkin <igor.skalkin@opensynergy.com>
> > 
> > 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: devicetree@vger.kernel.org
> > Signed-off-by: Igor Skalkin <igor.skalkin@opensynergy.com>
> > [ Peter: Adapted patch for submission to upstream. ]
> > Co-developed-by: Peter Hilber <peter.hilber@opensynergy.com>
> > Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
> > [ 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>;
> +            };
> +        };
> +    };
> +

Not sure about this, I explicitly removed the arm,scmi-virtio example
because with the current bindings it won't really exemplify anything
really specific to the virtio transport if not the usage of the compatible
string, and moreover the mmio case is just a case, there could be PCI
based virtio SCMI device that would have even less to show here as an
example.

Thanks,
Cristian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-01 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210611165937.701-1-cristian.marussi@arm.com>
2021-06-11 16:59 ` [PATCH v4 13/16] dt-bindings: arm: Add virtio transport for SCMI Cristian Marussi
2021-06-24 19:22   ` Rob Herring
2021-07-01  8:43   ` Peter Hilber
2021-07-01 10:31     ` Cristian Marussi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).