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 If required, this can be extended for SoC vendor specfic bindings. Such bindings
49 should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
50 and should have a compatible description like: "operating-points-v2-<vendor>".
54 This describes the OPPs belonging to a device. This node can have following
58 - compatible: Allow OPPs to express their compatibility. It should be:
59 "operating-points-v2".
61 - OPP nodes: One or more OPP nodes describing voltage-current-frequency
62 combinations. Their name isn't significant but their phandle can be used to
66 - opp-shared: Indicates that device nodes using this OPP Table Node's phandle
67 switch their DVFS state together, i.e. they share clock/voltage/current lines.
68 Missing property means devices have independent clock/voltage/current lines,
69 but they share OPP tables.
71 - status: Marks the OPP table enabled/disabled.
76 This defines voltage-current-frequency combinations along with other related
80 - opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer.
83 - opp-microvolt: voltage in micro Volts.
85 A single regulator's voltage is specified with an array of size one or three.
86 Single entry is for target voltage and three entries are for <target min max>
89 Entries for multiple regulators must be present in the same order as
90 regulators are specified in device's DT node.
92 - opp-microvolt-<name>: Named opp-microvolt property. This is exactly similar to
93 the above opp-microvolt property, but allows multiple voltage ranges to be
94 provided for the same OPP. At runtime, the platform can pick a <name> and
95 matching opp-microvolt-<name> property will be enabled for all OPPs. If the
96 platform doesn't pick a specific <name> or the <name> doesn't match with any
97 opp-microvolt-<name> properties, then opp-microvolt property shall be used, if
100 - opp-microamp: The maximum current drawn by the device in microamperes
101 considering system specific parameters (such as transients, process, aging,
102 maximum operating temperature range etc.) as necessary. This may be used to
103 set the most efficient regulator operating mode.
105 Should only be set if opp-microvolt is set for the OPP.
107 Entries for multiple regulators must be present in the same order as
108 regulators are specified in device's DT node. If this property isn't required
109 for few regulators, then this should be marked as zero for them. If it isn't
110 required for any regulator, then this property need not be present.
112 - opp-microamp-<name>: Named opp-microamp property. Similar to
113 opp-microvolt-<name> property, but for microamp instead.
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 - opp-supported-hw: This enables us to select only a subset of OPPs from the
127 larger OPP table, based on what version of the hardware we are running on. We
128 still can't have multiple nodes with the same opp-hz value in OPP table.
130 It's an user defined array containing a hierarchy of hardware version numbers,
131 supported by the OPP. For example: a platform with hierarchy of three levels
132 of versions (A, B and C), this field should be like <X Y Z>, where X
133 corresponds to Version hierarchy A, Y corresponds to version hierarchy B and Z
134 corresponds to version hierarchy C.
136 Each level of hierarchy is represented by a 32 bit value, and so there can be
137 only 32 different supported version per hierarchy. i.e. 1 bit per version. A
138 value of 0xFFFFFFFF will enable the OPP for all versions for that hierarchy
139 level. And a value of 0x00000000 will disable the OPP completely, and so we
140 never want that to happen.
142 If 32 values aren't sufficient for a version hierarchy, than that version
143 hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the
144 above example, Z1 & Z2 refer to the version hierarchy Z.
146 - status: Marks the node enabled/disabled.
148 Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
152 #address-cells = <1>;
156 compatible = "arm,cortex-a9";
158 next-level-cache = <&L2>;
159 clocks = <&clk_controller 0>;
161 cpu-supply = <&cpu_supply0>;
162 operating-points-v2 = <&cpu0_opp_table>;
166 compatible = "arm,cortex-a9";
168 next-level-cache = <&L2>;
169 clocks = <&clk_controller 0>;
171 cpu-supply = <&cpu_supply0>;
172 operating-points-v2 = <&cpu0_opp_table>;
176 cpu0_opp_table: opp_table0 {
177 compatible = "operating-points-v2";
181 opp-hz = /bits/ 64 <1000000000>;
182 opp-microvolt = <970000 975000 985000>;
183 opp-microamp = <70000>;
184 clock-latency-ns = <300000>;
188 opp-hz = /bits/ 64 <1100000000>;
189 opp-microvolt = <980000 1000000 1010000>;
190 opp-microamp = <80000>;
191 clock-latency-ns = <310000>;
194 opp-hz = /bits/ 64 <1200000000>;
195 opp-microvolt = <1025000>;
196 clock-latency-ns = <290000>;
202 Example 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states
207 #address-cells = <1>;
211 compatible = "qcom,krait";
213 next-level-cache = <&L2>;
214 clocks = <&clk_controller 0>;
216 cpu-supply = <&cpu_supply0>;
217 operating-points-v2 = <&cpu_opp_table>;
221 compatible = "qcom,krait";
223 next-level-cache = <&L2>;
224 clocks = <&clk_controller 1>;
226 cpu-supply = <&cpu_supply1>;
227 operating-points-v2 = <&cpu_opp_table>;
231 compatible = "qcom,krait";
233 next-level-cache = <&L2>;
234 clocks = <&clk_controller 2>;
236 cpu-supply = <&cpu_supply2>;
237 operating-points-v2 = <&cpu_opp_table>;
241 compatible = "qcom,krait";
243 next-level-cache = <&L2>;
244 clocks = <&clk_controller 3>;
246 cpu-supply = <&cpu_supply3>;
247 operating-points-v2 = <&cpu_opp_table>;
251 cpu_opp_table: opp_table {
252 compatible = "operating-points-v2";
255 * Missing opp-shared property means CPUs switch DVFS states
260 opp-hz = /bits/ 64 <1000000000>;
261 opp-microvolt = <970000 975000 985000>;
262 opp-microamp = <70000>;
263 clock-latency-ns = <300000>;
267 opp-hz = /bits/ 64 <1100000000>;
268 opp-microvolt = <980000 1000000 1010000>;
269 opp-microamp = <80000>;
270 clock-latency-ns = <310000>;
273 opp-hz = /bits/ 64 <1200000000>;
274 opp-microvolt = <1025000>;
275 opp-microamp = <90000;
276 lock-latency-ns = <290000>;
282 Example 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch
287 #address-cells = <1>;
291 compatible = "arm,cortex-a7";
293 next-level-cache = <&L2>;
294 clocks = <&clk_controller 0>;
296 cpu-supply = <&cpu_supply0>;
297 operating-points-v2 = <&cluster0_opp>;
301 compatible = "arm,cortex-a7";
303 next-level-cache = <&L2>;
304 clocks = <&clk_controller 0>;
306 cpu-supply = <&cpu_supply0>;
307 operating-points-v2 = <&cluster0_opp>;
311 compatible = "arm,cortex-a15";
313 next-level-cache = <&L2>;
314 clocks = <&clk_controller 1>;
316 cpu-supply = <&cpu_supply1>;
317 operating-points-v2 = <&cluster1_opp>;
321 compatible = "arm,cortex-a15";
323 next-level-cache = <&L2>;
324 clocks = <&clk_controller 1>;
326 cpu-supply = <&cpu_supply1>;
327 operating-points-v2 = <&cluster1_opp>;
331 cluster0_opp: opp_table0 {
332 compatible = "operating-points-v2";
336 opp-hz = /bits/ 64 <1000000000>;
337 opp-microvolt = <970000 975000 985000>;
338 opp-microamp = <70000>;
339 clock-latency-ns = <300000>;
343 opp-hz = /bits/ 64 <1100000000>;
344 opp-microvolt = <980000 1000000 1010000>;
345 opp-microamp = <80000>;
346 clock-latency-ns = <310000>;
349 opp-hz = /bits/ 64 <1200000000>;
350 opp-microvolt = <1025000>;
351 opp-microamp = <90000>;
352 clock-latency-ns = <290000>;
357 cluster1_opp: opp_table1 {
358 compatible = "operating-points-v2";
362 opp-hz = /bits/ 64 <1300000000>;
363 opp-microvolt = <1045000 1050000 1055000>;
364 opp-microamp = <95000>;
365 clock-latency-ns = <400000>;
369 opp-hz = /bits/ 64 <1400000000>;
370 opp-microvolt = <1075000>;
371 opp-microamp = <100000>;
372 clock-latency-ns = <400000>;
375 opp-hz = /bits/ 64 <1500000000>;
376 opp-microvolt = <1010000 1100000 1110000>;
377 opp-microamp = <95000>;
378 clock-latency-ns = <400000>;
384 Example 4: Handling multiple regulators
389 compatible = "arm,cortex-a7";
392 cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>;
393 operating-points-v2 = <&cpu0_opp_table>;
397 cpu0_opp_table: opp_table0 {
398 compatible = "operating-points-v2";
402 opp-hz = /bits/ 64 <1000000000>;
403 opp-microvolt = <970000>, /* Supply 0 */
404 <960000>, /* Supply 1 */
405 <960000>; /* Supply 2 */
406 opp-microamp = <70000>, /* Supply 0 */
407 <70000>, /* Supply 1 */
408 <70000>; /* Supply 2 */
409 clock-latency-ns = <300000>;
415 opp-hz = /bits/ 64 <1000000000>;
416 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
417 <960000 965000 975000>, /* Supply 1 */
418 <960000 965000 975000>; /* Supply 2 */
419 opp-microamp = <70000>, /* Supply 0 */
420 <70000>, /* Supply 1 */
421 <70000>; /* Supply 2 */
422 clock-latency-ns = <300000>;
428 opp-hz = /bits/ 64 <1000000000>;
429 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
430 <960000 965000 975000>, /* Supply 1 */
431 <960000 965000 975000>; /* Supply 2 */
432 opp-microamp = <70000>, /* Supply 0 */
433 <0>, /* Supply 1 doesn't need this */
434 <70000>; /* Supply 2 */
435 clock-latency-ns = <300000>;
440 Example 5: opp-supported-hw
441 (example: three level hierarchy of versions: cuts, substrate and process)
446 compatible = "arm,cortex-a7";
449 cpu-supply = <&cpu_supply>
450 operating-points-v2 = <&cpu0_opp_table_slow>;
455 compatible = "operating-points-v2";
461 * Supports all substrate and process versions for 0xF
462 * cuts, i.e. only first four cuts.
464 opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
465 opp-hz = /bits/ 64 <600000000>;
466 opp-microvolt = <900000 915000 925000>;
473 * - cuts: only one, 6th cut (represented by 6th bit).
474 * - substrate: supports 16 different substrate versions
475 * - process: supports 9 different process versions
477 opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
478 opp-hz = /bits/ 64 <800000000>;
479 opp-microvolt = <900000 915000 925000>;
485 Example 6: opp-microvolt-<name>, opp-microamp-<name>:
486 (example: device with two possible microvolt ranges: slow and fast)
491 compatible = "arm,cortex-a7";
494 operating-points-v2 = <&cpu0_opp_table>;
498 cpu0_opp_table: opp_table0 {
499 compatible = "operating-points-v2";
503 opp-hz = /bits/ 64 <1000000000>;
504 opp-microvolt-slow = <900000 915000 925000>;
505 opp-microvolt-fast = <970000 975000 985000>;
506 opp-microamp-slow = <70000>;
507 opp-microamp-fast = <71000>;
511 opp-hz = /bits/ 64 <1200000000>;
512 opp-microvolt-slow = <900000 915000 925000>, /* Supply vcc0 */
513 <910000 925000 935000>; /* Supply vcc1 */
514 opp-microvolt-fast = <970000 975000 985000>, /* Supply vcc0 */
515 <960000 965000 975000>; /* Supply vcc1 */
516 opp-microamp = <70000>; /* Will be used for both slow/fast */