blob: 92572eabb58b972263422c8c5a11924159e2d05d [file] [log] [blame]
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +02001System Control and Management Interface (SCMI) Message Protocol
2----------------------------------------------------------
3
4The SCMI is intended to allow agents such as OSPM to manage various functions
5that are provided by the hardware platform it is running on, including power
6and performance functions.
7
8This binding is intended to define the interface the firmware implementing
9the SCMI as described in ARM document number ARM DEN 0056A ("ARM System Control
10and Management Interface Platform Design Document")[0] provide for OSPM in
11the device tree.
12
13Required properties:
14
15The scmi node with the following properties shall be under the /firmware/ node.
16
Etienne Carrierefe0a3a42021-11-09 17:08:23 +010017- compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports,
18 or "linaro,scmi-optee" for OP-TEE transport.
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +020019- 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
Etienne Carrierefe0a3a42021-11-09 17:08:23 +010030- linaro,optee-channel-id : Channel specifier required when using OP-TEE
31 transport.
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +020032
33Optional properties:
34
35- mbox-names: shall be "tx" or "rx" depending on mboxes entries.
36
37See Documentation/devicetree/bindings/mailbox/mailbox.txt for more details
38about the generic mailbox controller and client driver bindings.
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +020039Mailbox doorbell is used as a mechanism to alert the presence of a
40messages and/or notification.
41
42Each protocol supported shall have a sub-node with corresponding compatible
43as described in the following sections. If the platform supports dedicated
Etienne Carrierefe0a3a42021-11-09 17:08:23 +010044communication channel for a particular protocol, properties shall be present
45in 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
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +020049
50Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
51------------------------------------------------------------
52
53This binding uses the common clock binding[1].
54
55Required properties:
56- #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands.
57
58Power domain bindings for the power domains based on SCMI Message Protocol
59------------------------------------------------------------
60
61This binding for the SCMI power domain providers uses the generic power
62domain binding[2].
63
64Required properties:
65 - #power-domain-cells : Should be 1. Contains the device or the power
66 domain ID value used by SCMI commands.
67
Etienne Carriered68663a2021-03-08 22:38:06 +010068Regulator bindings for the SCMI Regulator based on SCMI Message Protocol
69------------------------------------------------------------
70An SCMI Regulator is permanently bound to a well defined SCMI Voltage Domain,
71and should be always positioned as a root regulator.
72It does not support any current operation.
73
74SCMI Regulators are grouped under a 'regulators' node which in turn is a child
75of the SCMI Voltage protocol node inside the desired SCMI instance node.
76
77This binding uses the common regulator binding[6].
78
79Required properties:
80 - reg : shall identify an existent SCMI Voltage Domain.
81
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +020082Sensor bindings for the sensors based on SCMI Message Protocol
83--------------------------------------------------------------
84SCMI provides an API to access the various sensors on the SoC.
85
86Required 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
94Reset signal bindings for the reset domains based on SCMI Message Protocol
95------------------------------------------------------------
96
97This binding for the SCMI reset domain providers uses the generic reset
98signal binding[5].
99
100Required properties:
101 - #reset-cells : Should be 1. Contains the reset domain ID value used
102 by SCMI commands.
103
104SRAM and Shared Memory for SCMI
105-------------------------------
106
107A small area of SRAM is reserved for SCMI communication between application
108processors and SCP.
109
110The properties should follow the generic mmio-sram description found in [4]
111
112Each sub-node represents the reserved area for SCMI.
113
114Required 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
Etienne Carriered68663a2021-03-08 22:38:06 +0100125[6] Documentation/devicetree/bindings/regulator/regulator.yaml
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +0200126
127Example:
128
129sram@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
148mailbox@40000000 {
149 ....
150 #mbox-cells = <1>;
151 reg = <0x0 0x40000000 0x0 0x10000>;
152};
153
154firmware {
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 };
Etienne Carriered68663a2021-03-08 22:38:06 +0100190
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 };
Etienne Carrierea1d0a3f2020-09-09 18:44:03 +0200209 };
210};
211
212cpu@0 {
213 ...
214 reg = <0 0>;
215 clocks = <&scmi_dvfs 0>;
216};
217
218hdlcd@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
226thermal-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};