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