beb2d99f8cdd5bc705484a507aff4913cd4707e1
[AGL/meta-agl-devel.git] / meta-egvirt / recipes-kernel / linux / linux-yocto / virtio-scmi / 0009-dt-bindings-arm-Add-virtio-transport-for-SCMI.patch
1 From 592064dd36739ad5f3d885b9880ee1bc2d66e2df Mon Sep 17 00:00:00 2001
2 From: Igor Skalkin <igor.skalkin@opensynergy.com>
3 Date: Thu, 5 Nov 2020 22:21:15 +0100
4 Subject: [PATCH] dt-bindings: arm: Add virtio transport for SCMI
5
6 Document the properties for arm,scmi-virtio compatible nodes. The
7 backing virtio SCMI device is described in patch [1].
8
9 [1] https://lists.oasis-open.org/archives/virtio-comment/202005/msg00096.html
10
11 Co-developed-by: Peter Hilber <peter.hilber@opensynergy.com>
12 Signed-off-by: Peter Hilber <peter.hilber@opensynergy.com>
13 Signed-off-by: Igor Skalkin <igor.skalkin@opensynergy.com>
14 Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
15 ---
16  .../devicetree/bindings/arm/arm,scmi.txt      | 35 +++++++++++++++++--
17  1 file changed, 33 insertions(+), 2 deletions(-)
18
19 diff --git a/Documentation/devicetree/bindings/arm/arm,scmi.txt b/Documentation/devicetree/bindings/arm/arm,scmi.txt
20 index 55deb68230eb..6ded49d82773 100644
21 --- a/Documentation/devicetree/bindings/arm/arm,scmi.txt
22 +++ b/Documentation/devicetree/bindings/arm/arm,scmi.txt
23 @@ -13,6 +13,9 @@ the device tree.
24  Required properties:
25  
26  The scmi node with the following properties shall be under the /firmware/ node.
27 +Some properties are specific to a transport type.
28 +
29 +shmem-based transports (mailbox, smc/hvc):
30  
31  - compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports
32  - mboxes: List of phandle and mailbox channel specifiers. It should contain
33 @@ -21,6 +24,15 @@ The scmi node with the following properties shall be under the /firmware/ node.
34           supported.
35  - shmem : List of phandle pointing to the shared memory(SHM) area as per
36           generic mailbox client binding.
37 +
38 +Virtio transport:
39 +
40 +- compatible : shall be "arm,scmi-virtio".
41 +
42 +The virtio transport only supports a single device.
43 +
44 +Additional required properties:
45 +
46  - #address-cells : should be '1' if the device has sub-nodes, maps to
47           protocol identifier for a given sub-node.
48  - #size-cells : should be '0' as 'reg' property doesn't have any size
49 @@ -42,7 +54,8 @@ Each protocol supported shall have a sub-node with corresponding compatible
50  as described in the following sections. If the platform supports dedicated
51  communication channel for a particular protocol, the 3 properties namely:
52  mboxes, mbox-names and shmem shall be present in the sub-node corresponding
53 -to that protocol.
54 +to that protocol. The virtio transport does not support dedicated communication
55 +channels.
56  
57  Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
58  ------------------------------------------------------------
59 @@ -106,7 +119,8 @@ Required sub-node properties:
60  [4] Documentation/devicetree/bindings/sram/sram.yaml
61  [5] Documentation/devicetree/bindings/reset/reset.txt
62  
63 -Example:
64 +Example (mailbox transport):
65 +----------------------------
66  
67  sram@50000000 {
68         compatible = "mmio-sram";
69 @@ -195,3 +209,20 @@ thermal-zones {
70                 ...
71         };
72  };
73 +
74 +Example (virtio transport):
75 +---------------------------
76 +
77 +virtio_mmio@4b001000 {
78 +       compatible = "virtio,mmio";
79 +       ...
80 +};
81 +
82 +firmware {
83 +       ...
84 +       scmi {
85 +               compatible = "arm,scmi-virtio";
86 +               ...
87 +
88 +The rest is similar to the mailbox transport example, when omitting the
89 +mailbox/shmem-specific properties.