Skip to content

Commit d8a44fe

Browse files
punitagrawalsudeep-holla
authored andcommitted
Documentation: add DT bindings for ARM SCPI sensors
The System Control Processor (SCP) provides access to SoC sensors via the System Control and Power Interface (SCPI) Message Protocol. Add bindings to allow probing of these sensors. Also support referencing of the sensors for setting up thermal zones via the thermal DT bindings. Signed-off-by: Punit Agrawal <[email protected]> Acked-by: Rob Herring <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Sudeep Holla <[email protected]>
1 parent 8def310 commit d8a44fe

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

Documentation/devicetree/bindings/arm/arm,scpi.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,25 @@ Required sub-node properties:
7272
- compatible : should be "arm,juno-scp-shmem" for Non-secure SRAM based
7373
shared memory on Juno platforms
7474

75+
Sensor bindings for the sensors based on SCPI Message Protocol
76+
--------------------------------------------------------------
77+
SCPI provides an API to access the various sensors on the SoC.
78+
79+
Required properties:
80+
- compatible : should be "arm,scpi-sensors".
81+
- #thermal-sensor-cells: should be set to 1. This property follows the
82+
thermal device tree bindings[2].
83+
84+
Valid cell values are raw identifiers (Sensor
85+
ID) as used by the firmware. Refer to
86+
platform documentation for your
87+
implementation for the IDs to use. For Juno
88+
R0 and Juno R1 refer to [3].
89+
7590
[0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
7691
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
92+
[2] Documentation/devicetree/bindings/thermal/thermal.txt
93+
[3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/apas03s22.html
7794

7895
Example:
7996

@@ -122,6 +139,11 @@ scpi_protocol: scpi@2e000000 {
122139
clock-output-names = "pxlclk0", "pxlclk1";
123140
};
124141
};
142+
143+
scpi_sensors0: sensors {
144+
compatible = "arm,scpi-sensors";
145+
#thermal-sensor-cells = <1>;
146+
};
125147
};
126148

127149
cpu@0 {
@@ -136,6 +158,17 @@ hdlcd@7ff60000 {
136158
clocks = <&scpi_clk 4>;
137159
};
138160

161+
thermal-zones {
162+
soc_thermal {
163+
polling-delay-passive = <100>;
164+
polling-delay = <1000>;
165+
166+
/* sensor ID */
167+
thermal-sensors = <&scpi_sensors0 3>;
168+
...
169+
};
170+
};
171+
139172
In the above example, the #clock-cells is set to 1 as required.
140173
scpi_dvfs has 3 output clocks namely: atlclk, aplclk, and gpuclk with 0,
141174
1 and 2 as clock-indices. scpi_clk has 2 output clocks namely: pxlclk0
@@ -148,3 +181,8 @@ scpi_dvfs i.e. "atlclk".
148181
Similarly the second example is hdlcd@7ff60000 and it has pxlclk1 as input
149182
clock. '4' in the clock specifier here points to the second entry
150183
in the output clocks of scpi_clocks i.e. "pxlclk1"
184+
185+
The thermal-sensors property in the soc_thermal node uses the
186+
temperature sensor provided by SCP firmware to setup a thermal
187+
zone. The ID "3" is the sensor identifier for the temperature sensor
188+
as used by the firmware.

0 commit comments

Comments
 (0)