dt-bindings: arm: scmi: OP-TEE as transport channel for SCMI messages
[platform/kernel/u-boot.git] / doc / device-tree-bindings / arm / arm,scmi.txt
1 System Control and Management Interface (SCMI) Message Protocol
2 ----------------------------------------------------------
3
4 The SCMI is intended to allow agents such as OSPM to manage various functions
5 that are provided by the hardware platform it is running on, including power
6 and performance functions.
7
8 This binding is intended to define the interface the firmware implementing
9 the SCMI as described in ARM document number ARM DEN 0056A ("ARM System Control
10 and Management Interface Platform Design Document")[0] provide for OSPM in
11 the device tree.
12
13 Required properties:
14
15 The scmi node with the following properties shall be under the /firmware/ node.
16
17 - compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports,
18           or "linaro,scmi-optee" for OP-TEE transport.
19 - mboxes: List of phandle and mailbox channel specifiers. It should contain
20           exactly one or two mailboxes, one for transmitting messages("tx")
21           and another optional for receiving the notifications("rx") if
22           supported.
23 - shmem : List of phandle pointing to the shared memory(SHM) area as per
24           generic mailbox client binding.
25 - #address-cells : should be '1' if the device has sub-nodes, maps to
26           protocol identifier for a given sub-node.
27 - #size-cells : should be '0' as 'reg' property doesn't have any size
28           associated with it.
29 - arm,smc-id : SMC id required when using smc or hvc transports
30 - linaro,optee-channel-id : Channel specifier required when using OP-TEE
31           transport.
32
33 Optional properties:
34
35 - mbox-names: shall be "tx" or "rx" depending on mboxes entries.
36
37 See Documentation/devicetree/bindings/mailbox/mailbox.txt for more details
38 about the generic mailbox controller and client driver bindings.
39 Mailbox doorbell is used as a mechanism to alert the presence of a
40 messages and/or notification.
41
42 Each protocol supported shall have a sub-node with corresponding compatible
43 as described in the following sections. If the platform supports dedicated
44 communication channel for a particular protocol, properties shall be present
45 in the sub-node corresponding to that protocol. These properties are:
46 - mboxes, mbox-names and shmem for mailbox transport
47 - arm,smc-id and shmem for smc/hvc transport
48 - linaro,optee-channel-id and possibly shmem for OP-TEE transport
49
50 Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
51 ------------------------------------------------------------
52
53 This binding uses the common clock binding[1].
54
55 Required properties:
56 - #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands.
57
58 Power domain bindings for the power domains based on SCMI Message Protocol
59 ------------------------------------------------------------
60
61 This binding for the SCMI power domain providers uses the generic power
62 domain binding[2].
63
64 Required properties:
65  - #power-domain-cells : Should be 1. Contains the device or the power
66                          domain ID value used by SCMI commands.
67
68 Regulator bindings for the SCMI Regulator based on SCMI Message Protocol
69 ------------------------------------------------------------
70 An SCMI Regulator is permanently bound to a well defined SCMI Voltage Domain,
71 and should be always positioned as a root regulator.
72 It does not support any current operation.
73
74 SCMI Regulators are grouped under a 'regulators' node which in turn is a child
75 of the SCMI Voltage protocol node inside the desired SCMI instance node.
76
77 This binding uses the common regulator binding[6].
78
79 Required properties:
80  - reg : shall identify an existent SCMI Voltage Domain.
81
82 Sensor bindings for the sensors based on SCMI Message Protocol
83 --------------------------------------------------------------
84 SCMI provides an API to access the various sensors on the SoC.
85
86 Required properties:
87 - #thermal-sensor-cells: should be set to 1. This property follows the
88                          thermal device tree bindings[3].
89
90                          Valid cell values are raw identifiers (Sensor ID)
91                          as used by the firmware. Refer to  platform details
92                          for your implementation for the IDs to use.
93
94 Reset signal bindings for the reset domains based on SCMI Message Protocol
95 ------------------------------------------------------------
96
97 This binding for the SCMI reset domain providers uses the generic reset
98 signal binding[5].
99
100 Required properties:
101  - #reset-cells : Should be 1. Contains the reset domain ID value used
102                   by SCMI commands.
103
104 SRAM and Shared Memory for SCMI
105 -------------------------------
106
107 A small area of SRAM is reserved for SCMI communication between application
108 processors and SCP.
109
110 The properties should follow the generic mmio-sram description found in [4]
111
112 Each sub-node represents the reserved area for SCMI.
113
114 Required sub-node properties:
115 - reg : The base offset and size of the reserved area with the SRAM
116 - compatible : should be "arm,scmi-shmem" for Non-secure SRAM based
117                shared memory
118
119 [0] http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/index.html
120 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
121 [2] Documentation/devicetree/bindings/power/power-domain.yaml
122 [3] Documentation/devicetree/bindings/thermal/thermal.txt
123 [4] Documentation/devicetree/bindings/sram/sram.yaml
124 [5] Documentation/devicetree/bindings/reset/reset.txt
125 [6] Documentation/devicetree/bindings/regulator/regulator.yaml
126
127 Example:
128
129 sram@50000000 {
130         compatible = "mmio-sram";
131         reg = <0x0 0x50000000 0x0 0x10000>;
132
133         #address-cells = <1>;
134         #size-cells = <1>;
135         ranges = <0 0x0 0x50000000 0x10000>;
136
137         cpu_scp_lpri: scp-shmem@0 {
138                 compatible = "arm,scmi-shmem";
139                 reg = <0x0 0x200>;
140         };
141
142         cpu_scp_hpri: scp-shmem@200 {
143                 compatible = "arm,scmi-shmem";
144                 reg = <0x200 0x200>;
145         };
146 };
147
148 mailbox@40000000 {
149         ....
150         #mbox-cells = <1>;
151         reg = <0x0 0x40000000 0x0 0x10000>;
152 };
153
154 firmware {
155
156         ...
157
158         scmi {
159                 compatible = "arm,scmi";
160                 mboxes = <&mailbox 0 &mailbox 1>;
161                 mbox-names = "tx", "rx";
162                 shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
163                 #address-cells = <1>;
164                 #size-cells = <0>;
165
166                 scmi_devpd: protocol@11 {
167                         reg = <0x11>;
168                         #power-domain-cells = <1>;
169                 };
170
171                 scmi_dvfs: protocol@13 {
172                         reg = <0x13>;
173                         #clock-cells = <1>;
174                 };
175
176                 scmi_clk: protocol@14 {
177                         reg = <0x14>;
178                         #clock-cells = <1>;
179                 };
180
181                 scmi_sensors0: protocol@15 {
182                         reg = <0x15>;
183                         #thermal-sensor-cells = <1>;
184                 };
185
186                 scmi_reset: protocol@16 {
187                         reg = <0x16>;
188                         #reset-cells = <1>;
189                 };
190
191                 scmi_voltage: protocol@17 {
192                         reg = <0x17>;
193
194                         regulators {
195                                 regulator_devX: regulator@0 {
196                                         reg = <0x0>;
197                                         regulator-max-microvolt = <3300000>;
198                                 };
199
200                                 regulator_devY: regulator@9 {
201                                         reg = <0x9>;
202                                         regulator-min-microvolt = <500000>;
203                                         regulator-max-microvolt = <4200000>;
204                                 };
205
206                                 ...
207                         };
208                 };
209         };
210 };
211
212 cpu@0 {
213         ...
214         reg = <0 0>;
215         clocks = <&scmi_dvfs 0>;
216 };
217
218 hdlcd@7ff60000 {
219         ...
220         reg = <0 0x7ff60000 0 0x1000>;
221         clocks = <&scmi_clk 4>;
222         power-domains = <&scmi_devpd 1>;
223         resets = <&scmi_reset 10>;
224 };
225
226 thermal-zones {
227         soc_thermal {
228                 polling-delay-passive = <100>;
229                 polling-delay = <1000>;
230                                         /* sensor ID */
231                 thermal-sensors = <&scmi_sensors0 3>;
232                 ...
233         };
234 };