1 Generic OPP (Operating Performance Points) Bindings
2 ----------------------------------------------------
4 Devices work at voltage-current-frequency combinations and some implementations
5 have the liberty of choosing these. These combinations are called Operating
6 Performance Points aka OPPs. This document defines bindings for these OPPs
7 applicable across wide range of devices. For illustration purpose, this document
10 This document contain multiple versions of OPP binding and only one of them
11 should be used per device.
13 Binding 1: operating-points
14 ============================
16 This binding only supports voltage-frequency pairs.
19 - operating-points: An array of 2-tuples items, and each item consists
20 of frequency and voltage like <freq-kHz vol-uV>.
21 freq: clock frequency in kHz
22 vol: voltage in microvolt
27 compatible = "arm,cortex-a9";
29 next-level-cache = <&L2>;
39 Binding 2: operating-points-v2
40 ============================
42 * Property: operating-points-v2
44 Devices supporting OPPs must set their "operating-points-v2" property with
45 phandle to a OPP table in their DT node. The OPP core will use this phandle to
46 find the operating points for the device.
48 Devices may want to choose OPP tables at runtime and so can provide a list of
49 phandles here. But only *one* of them should be chosen at runtime. This must be
50 accompanied by a corresponding "operating-points-names" property, to uniquely
51 identify the OPP tables.
53 If required, this can be extended for SoC vendor specfic bindings. Such bindings
54 should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
55 and should have a compatible description like: "operating-points-v2-<vendor>".
58 - operating-points-names: Names of OPP tables (required if multiple OPP
59 tables are present), to uniquely identify them. The same list must be present
60 for all the CPUs which are sharing clock/voltage rails and hence the OPP
65 This describes the OPPs belonging to a device. This node can have following
69 - compatible: Allow OPPs to express their compatibility. It should be:
70 "operating-points-v2".
72 - OPP nodes: One or more OPP nodes describing voltage-current-frequency
73 combinations. Their name isn't significant but their phandle can be used to
77 - opp-shared: Indicates that device nodes using this OPP Table Node's phandle
78 switch their DVFS state together, i.e. they share clock/voltage/current lines.
79 Missing property means devices have independent clock/voltage/current lines,
80 but they share OPP tables.
82 - status: Marks the OPP table enabled/disabled.
87 This defines voltage-current-frequency combinations along with other related
91 - opp-hz: Frequency in Hz
94 - opp-microvolt: voltage in micro Volts.
96 A single regulator's voltage is specified with an array of size one or three.
97 Single entry is for target voltage and three entries are for <target min max>
100 Entries for multiple regulators must be present in the same order as
101 regulators are specified in device's DT node.
103 - opp-microamp: The maximum current drawn by the device in microamperes
104 considering system specific parameters (such as transients, process, aging,
105 maximum operating temperature range etc.) as necessary. This may be used to
106 set the most efficient regulator operating mode.
108 Should only be set if opp-microvolt is set for the OPP.
110 Entries for multiple regulators must be present in the same order as
111 regulators are specified in device's DT node. If this property isn't required
112 for few regulators, then this should be marked as zero for them. If it isn't
113 required for any regulator, then this property need not be present.
115 - clock-latency-ns: Specifies the maximum possible transition latency (in
116 nanoseconds) for switching to this OPP from any other OPP.
118 - turbo-mode: Marks the OPP to be used only for turbo modes. Turbo mode is
119 available on some platforms, where the device can run over its operating
120 frequency for a short duration of time limited by the device's power, current
123 - opp-suspend: Marks the OPP to be used during device suspend. Only one OPP in
124 the table should have this.
126 - status: Marks the node enabled/disabled.
128 Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
132 #address-cells = <1>;
136 compatible = "arm,cortex-a9";
138 next-level-cache = <&L2>;
139 clocks = <&clk_controller 0>;
141 cpu-supply = <&cpu_supply0>;
142 operating-points-v2 = <&cpu0_opp_table>;
146 compatible = "arm,cortex-a9";
148 next-level-cache = <&L2>;
149 clocks = <&clk_controller 0>;
151 cpu-supply = <&cpu_supply0>;
152 operating-points-v2 = <&cpu0_opp_table>;
156 cpu0_opp_table: opp_table0 {
157 compatible = "operating-points-v2";
161 opp-hz = <1000000000>;
162 opp-microvolt = <970000 975000 985000>;
163 opp-microamp = <70000>;
164 clock-latency-ns = <300000>;
168 opp-hz = <1100000000>;
169 opp-microvolt = <980000 1000000 1010000>;
170 opp-microamp = <80000>;
171 clock-latency-ns = <310000>;
174 opp-hz = <1200000000>;
175 opp-microvolt = <1025000>;
176 clock-latency-ns = <290000>;
182 Example 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states
187 #address-cells = <1>;
191 compatible = "qcom,krait";
193 next-level-cache = <&L2>;
194 clocks = <&clk_controller 0>;
196 cpu-supply = <&cpu_supply0>;
197 operating-points-v2 = <&cpu_opp_table>;
201 compatible = "qcom,krait";
203 next-level-cache = <&L2>;
204 clocks = <&clk_controller 1>;
206 cpu-supply = <&cpu_supply1>;
207 operating-points-v2 = <&cpu_opp_table>;
211 compatible = "qcom,krait";
213 next-level-cache = <&L2>;
214 clocks = <&clk_controller 2>;
216 cpu-supply = <&cpu_supply2>;
217 operating-points-v2 = <&cpu_opp_table>;
221 compatible = "qcom,krait";
223 next-level-cache = <&L2>;
224 clocks = <&clk_controller 3>;
226 cpu-supply = <&cpu_supply3>;
227 operating-points-v2 = <&cpu_opp_table>;
231 cpu_opp_table: opp_table {
232 compatible = "operating-points-v2";
235 * Missing opp-shared property means CPUs switch DVFS states
240 opp-hz = <1000000000>;
241 opp-microvolt = <970000 975000 985000>;
242 opp-microamp = <70000>;
243 clock-latency-ns = <300000>;
247 opp-hz = <1100000000>;
248 opp-microvolt = <980000 1000000 1010000>;
249 opp-microamp = <80000>;
250 clock-latency-ns = <310000>;
253 opp-hz = <1200000000>;
254 opp-microvolt = <1025000>;
255 opp-microamp = <90000;
256 lock-latency-ns = <290000>;
262 Example 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch
267 #address-cells = <1>;
271 compatible = "arm,cortex-a7";
273 next-level-cache = <&L2>;
274 clocks = <&clk_controller 0>;
276 cpu-supply = <&cpu_supply0>;
277 operating-points-v2 = <&cluster0_opp>;
281 compatible = "arm,cortex-a7";
283 next-level-cache = <&L2>;
284 clocks = <&clk_controller 0>;
286 cpu-supply = <&cpu_supply0>;
287 operating-points-v2 = <&cluster0_opp>;
291 compatible = "arm,cortex-a15";
293 next-level-cache = <&L2>;
294 clocks = <&clk_controller 1>;
296 cpu-supply = <&cpu_supply1>;
297 operating-points-v2 = <&cluster1_opp>;
301 compatible = "arm,cortex-a15";
303 next-level-cache = <&L2>;
304 clocks = <&clk_controller 1>;
306 cpu-supply = <&cpu_supply1>;
307 operating-points-v2 = <&cluster1_opp>;
311 cluster0_opp: opp_table0 {
312 compatible = "operating-points-v2";
316 opp-hz = <1000000000>;
317 opp-microvolt = <970000 975000 985000>;
318 opp-microamp = <70000>;
319 clock-latency-ns = <300000>;
323 opp-hz = <1100000000>;
324 opp-microvolt = <980000 1000000 1010000>;
325 opp-microamp = <80000>;
326 clock-latency-ns = <310000>;
329 opp-hz = <1200000000>;
330 opp-microvolt = <1025000>;
331 opp-microamp = <90000>;
332 clock-latency-ns = <290000>;
337 cluster1_opp: opp_table1 {
338 compatible = "operating-points-v2";
342 opp-hz = <1300000000>;
343 opp-microvolt = <1045000 1050000 1055000>;
344 opp-microamp = <95000>;
345 clock-latency-ns = <400000>;
349 opp-hz = <1400000000>;
350 opp-microvolt = <1075000>;
351 opp-microamp = <100000>;
352 clock-latency-ns = <400000>;
355 opp-hz = <1500000000>;
356 opp-microvolt = <1010000 1100000 1110000>;
357 opp-microamp = <95000>;
358 clock-latency-ns = <400000>;
364 Example 4: Handling multiple regulators
369 compatible = "arm,cortex-a7";
372 cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>;
373 operating-points-v2 = <&cpu0_opp_table>;
377 cpu0_opp_table: opp_table0 {
378 compatible = "operating-points-v2";
382 opp-hz = <1000000000>;
383 opp-microvolt = <970000>, /* Supply 0 */
384 <960000>, /* Supply 1 */
385 <960000>; /* Supply 2 */
386 opp-microamp = <70000>, /* Supply 0 */
387 <70000>, /* Supply 1 */
388 <70000>; /* Supply 2 */
389 clock-latency-ns = <300000>;
395 opp-hz = <1000000000>;
396 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
397 <960000 965000 975000>, /* Supply 1 */
398 <960000 965000 975000>; /* Supply 2 */
399 opp-microamp = <70000>, /* Supply 0 */
400 <70000>, /* Supply 1 */
401 <70000>; /* Supply 2 */
402 clock-latency-ns = <300000>;
408 opp-hz = <1000000000>;
409 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
410 <960000 965000 975000>, /* Supply 1 */
411 <960000 965000 975000>; /* Supply 2 */
412 opp-microamp = <70000>, /* Supply 0 */
413 <0>, /* Supply 1 doesn't need this */
414 <70000>; /* Supply 2 */
415 clock-latency-ns = <300000>;
420 Example 5: Multiple OPP tables
425 compatible = "arm,cortex-a7";
428 cpu-supply = <&cpu_supply>
429 operating-points-v2 = <&cpu0_opp_table_slow>, <&cpu0_opp_table_fast>;
430 operating-points-names = "slow", "fast";
434 cpu0_opp_table_slow: opp_table_slow {
435 compatible = "operating-points-v2";
440 opp-hz = <600000000>;
445 opp-hz = <800000000>;
450 cpu0_opp_table_fast: opp_table_fast {
451 compatible = "operating-points-v2";
456 opp-hz = <1000000000>;
461 opp-hz = <1100000000>;