1 System Control and Power Interface (SCPI) Message Protocol
2 ----------------------------------------------------------
4 Firmware implementing the SCPI described in ARM document number ARM DUI 0922B
5 ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be used
6 by Linux to initiate various system control and power operations.
10 - compatible : should be
11 * "arm,scpi" : For implementations complying to SCPI v1.0 or above
12 * "arm,scpi-pre-1.0" : For implementations complying to all
13 unversioned releases prior to SCPI v1.0
14 - mboxes: List of phandle and mailbox channel specifiers
15 All the channels reserved by remote SCP firmware for use by
16 SCPI message protocol should be specified in any order
17 - shmem : List of phandle pointing to the shared memory(SHM) area between the
18 processors using these mailboxes for IPC, one for each mailbox
19 SHM can be any memory reserved for the purpose of this communication
20 between the processors.
22 See Documentation/devicetree/bindings/mailbox/mailbox.txt
23 for more details about the generic mailbox controller and
24 client driver bindings.
26 Clock bindings for the clocks based on SCPI Message Protocol
27 ------------------------------------------------------------
29 This binding uses the common clock binding[1].
34 - compatible : should be "arm,scpi-clocks"
35 All the clocks provided by SCP firmware via SCPI message
36 protocol much be listed as sub-nodes under this node.
41 - compatible : shall include one of the following
42 "arm,scpi-dvfs-clocks" - all the clocks that are variable and index based.
43 These clocks don't provide an entire range of values between the
44 limits but only discrete points within the range. The firmware
45 provides the mapping for each such operating frequency and the
46 index associated with it. The firmware also manages the
47 voltage scaling appropriately with the clock scaling.
48 "arm,scpi-variable-clocks" - all the clocks that are variable and provide full
49 range within the specified range. The firmware provides the
50 range of values within a specified range.
52 Other required properties for all clocks(all from common clock binding):
53 - #clock-cells : Should be 1. Contains the Clock ID value used by SCPI commands.
54 - clock-output-names : shall be the corresponding names of the outputs.
55 - clock-indices: The identifying number for the clocks(i.e.clock_id) in the
56 node. It can be non linear and hence provide the mapping of identifiers
57 into the clock-output-names array.
59 SRAM and Shared Memory for SCPI
60 -------------------------------
62 A small area of SRAM is reserved for SCPI communication between application
65 The properties should follow the generic mmio-sram description found in [3]
67 Each sub-node represents the reserved area for SCPI.
69 Required sub-node properties:
70 - reg : The base offset and size of the reserved area with the SRAM
71 - compatible : should be "arm,scp-shmem" for Non-secure SRAM based
74 Sensor bindings for the sensors based on SCPI Message Protocol
75 --------------------------------------------------------------
76 SCPI provides an API to access the various sensors on the SoC.
79 - compatible : should be "arm,scpi-sensors".
80 - #thermal-sensor-cells: should be set to 1. This property follows the
81 thermal device tree bindings[2].
83 Valid cell values are raw identifiers (Sensor ID)
84 as used by the firmware. Refer to platform details
85 for your implementation for the IDs to use.
87 Power domain bindings for the power domains based on SCPI Message Protocol
88 ------------------------------------------------------------
90 This binding uses the generic power domain binding[4].
96 - #power-domain-cells : Should be 1. Contains the device or the power
97 domain ID value used by SCPI commands.
98 - num-domains: Total number of power domains provided by SCPI. This is
99 needed as the SCPI message protocol lacks a mechanism to
100 query this information at runtime.
106 - power-domains : A phandle and PM domain specifier as defined by bindings of
107 the power controller specified by phandle.
109 [0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
110 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
111 [2] Documentation/devicetree/bindings/thermal/thermal.txt
112 [3] Documentation/devicetree/bindings/sram/sram.txt
113 [4] Documentation/devicetree/bindings/power/power_domain.txt
117 sram: sram@50000000 {
118 compatible = "arm,juno-sram-ns", "mmio-sram";
119 reg = <0x0 0x50000000 0x0 0x10000>;
121 #address-cells = <1>;
123 ranges = <0 0x0 0x50000000 0x10000>;
125 cpu_scp_lpri: scp-shmem@0 {
126 compatible = "arm,juno-scp-shmem";
130 cpu_scp_hpri: scp-shmem@200 {
131 compatible = "arm,juno-scp-shmem";
136 mailbox: mailbox0@40000000 {
141 scpi_protocol: scpi@2e000000 {
142 compatible = "arm,scpi";
143 mboxes = <&mailbox 0 &mailbox 1>;
144 shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
147 compatible = "arm,scpi-clocks";
149 scpi_dvfs: scpi_clocks@0 {
150 compatible = "arm,scpi-dvfs-clocks";
152 clock-indices = <0>, <1>, <2>;
153 clock-output-names = "atlclk", "aplclk","gpuclk";
155 scpi_clk: scpi_clocks@3 {
156 compatible = "arm,scpi-variable-clocks";
158 clock-indices = <3>, <4>;
159 clock-output-names = "pxlclk0", "pxlclk1";
163 scpi_sensors0: sensors {
164 compatible = "arm,scpi-sensors";
165 #thermal-sensor-cells = <1>;
168 scpi_devpd: scpi-power-domains {
169 compatible = "arm,scpi-power-domains";
171 #power-domain-cells = <1>;
178 clocks = <&scpi_dvfs 0>;
183 reg = <0 0x7ff60000 0 0x1000>;
184 clocks = <&scpi_clk 4>;
185 power-domains = <&scpi_devpd 1>;
190 polling-delay-passive = <100>;
191 polling-delay = <1000>;
194 thermal-sensors = <&scpi_sensors0 3>;
199 In the above example, the #clock-cells is set to 1 as required.
200 scpi_dvfs has 3 output clocks namely: atlclk, aplclk, and gpuclk with 0,
201 1 and 2 as clock-indices. scpi_clk has 2 output clocks namely: pxlclk0
202 and pxlclk1 with 3 and 4 as clock-indices.
204 The first consumer in the example is cpu@0 and it has '0' as the clock
205 specifier which points to the first entry in the output clocks of
206 scpi_dvfs i.e. "atlclk".
208 Similarly the second example is hdlcd@7ff60000 and it has pxlclk1 as input
209 clock. '4' in the clock specifier here points to the second entry
210 in the output clocks of scpi_clocks i.e. "pxlclk1"
212 The thermal-sensors property in the soc_thermal node uses the
213 temperature sensor provided by SCP firmware to setup a thermal
214 zone. The ID "3" is the sensor identifier for the temperature sensor
215 as used by the firmware.
217 The num-domains property in scpi-power-domains domain specifies that
218 SCPI provides 2 power domains. The hdlcd node uses the power domain with