@@ -45,21 +45,10 @@ Devices supporting OPPs must set their "operating-points-v2" property with
45
45
phandle to a OPP table in their DT node. The OPP core will use this phandle to
46
46
find the operating points for the device.
47
47
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.
52
-
53
48
If required, this can be extended for SoC vendor specfic bindings. Such bindings
54
49
should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
55
50
and should have a compatible description like: "operating-points-v2-<vendor>".
56
51
57
- Optional properties:
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
61
- tables.
62
-
63
52
* OPP Table Node
64
53
65
54
This describes the OPPs belonging to a device. This node can have following
@@ -100,6 +89,14 @@ Optional properties:
100
89
Entries for multiple regulators must be present in the same order as
101
90
regulators are specified in device's DT node.
102
91
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
98
+ present.
99
+
103
100
- opp-microamp: The maximum current drawn by the device in microamperes
104
101
considering system specific parameters (such as transients, process, aging,
105
102
maximum operating temperature range etc.) as necessary. This may be used to
@@ -112,6 +109,9 @@ Optional properties:
112
109
for few regulators, then this should be marked as zero for them. If it isn't
113
110
required for any regulator, then this property need not be present.
114
111
112
+ - opp-microamp-<name>: Named opp-microamp property. Similar to
113
+ opp-microvolt-<name> property, but for microamp instead.
114
+
115
115
- clock-latency-ns: Specifies the maximum possible transition latency (in
116
116
nanoseconds) for switching to this OPP from any other OPP.
117
117
@@ -123,6 +123,26 @@ Optional properties:
123
123
- opp-suspend: Marks the OPP to be used during device suspend. Only one OPP in
124
124
the table should have this.
125
125
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.
129
+
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.
135
+
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.
141
+
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.
145
+
126
146
- status: Marks the node enabled/disabled.
127
147
128
148
Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
@@ -157,20 +177,20 @@ Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
157
177
compatible = "operating-points-v2";
158
178
opp-shared;
159
179
160
- opp00 {
180
+ opp@1000000000 {
161
181
opp-hz = /bits/ 64 <1000000000>;
162
182
opp-microvolt = <970000 975000 985000>;
163
183
opp-microamp = <70000>;
164
184
clock-latency-ns = <300000>;
165
185
opp-suspend;
166
186
};
167
- opp01 {
187
+ opp@1100000000 {
168
188
opp-hz = /bits/ 64 <1100000000>;
169
189
opp-microvolt = <980000 1000000 1010000>;
170
190
opp-microamp = <80000>;
171
191
clock-latency-ns = <310000>;
172
192
};
173
- opp02 {
193
+ opp@1200000000 {
174
194
opp-hz = /bits/ 64 <1200000000>;
175
195
opp-microvolt = <1025000>;
176
196
clock-latency-ns = <290000>;
@@ -236,20 +256,20 @@ independently.
236
256
* independently.
237
257
*/
238
258
239
- opp00 {
259
+ opp@1000000000 {
240
260
opp-hz = /bits/ 64 <1000000000>;
241
261
opp-microvolt = <970000 975000 985000>;
242
262
opp-microamp = <70000>;
243
263
clock-latency-ns = <300000>;
244
264
opp-suspend;
245
265
};
246
- opp01 {
266
+ opp@1100000000 {
247
267
opp-hz = /bits/ 64 <1100000000>;
248
268
opp-microvolt = <980000 1000000 1010000>;
249
269
opp-microamp = <80000>;
250
270
clock-latency-ns = <310000>;
251
271
};
252
- opp02 {
272
+ opp@1200000000 {
253
273
opp-hz = /bits/ 64 <1200000000>;
254
274
opp-microvolt = <1025000>;
255
275
opp-microamp = <90000;
@@ -312,20 +332,20 @@ DVFS state together.
312
332
compatible = "operating-points-v2";
313
333
opp-shared;
314
334
315
- opp00 {
335
+ opp@1000000000 {
316
336
opp-hz = /bits/ 64 <1000000000>;
317
337
opp-microvolt = <970000 975000 985000>;
318
338
opp-microamp = <70000>;
319
339
clock-latency-ns = <300000>;
320
340
opp-suspend;
321
341
};
322
- opp01 {
342
+ opp@1100000000 {
323
343
opp-hz = /bits/ 64 <1100000000>;
324
344
opp-microvolt = <980000 1000000 1010000>;
325
345
opp-microamp = <80000>;
326
346
clock-latency-ns = <310000>;
327
347
};
328
- opp02 {
348
+ opp@1200000000 {
329
349
opp-hz = /bits/ 64 <1200000000>;
330
350
opp-microvolt = <1025000>;
331
351
opp-microamp = <90000>;
@@ -338,20 +358,20 @@ DVFS state together.
338
358
compatible = "operating-points-v2";
339
359
opp-shared;
340
360
341
- opp10 {
361
+ opp@1300000000 {
342
362
opp-hz = /bits/ 64 <1300000000>;
343
363
opp-microvolt = <1045000 1050000 1055000>;
344
364
opp-microamp = <95000>;
345
365
clock-latency-ns = <400000>;
346
366
opp-suspend;
347
367
};
348
- opp11 {
368
+ opp@1400000000 {
349
369
opp-hz = /bits/ 64 <1400000000>;
350
370
opp-microvolt = <1075000>;
351
371
opp-microamp = <100000>;
352
372
clock-latency-ns = <400000>;
353
373
};
354
- opp12 {
374
+ opp@1500000000 {
355
375
opp-hz = /bits/ 64 <1500000000>;
356
376
opp-microvolt = <1010000 1100000 1110000>;
357
377
opp-microamp = <95000>;
@@ -378,7 +398,7 @@ Example 4: Handling multiple regulators
378
398
compatible = "operating-points-v2";
379
399
opp-shared;
380
400
381
- opp00 {
401
+ opp@1000000000 {
382
402
opp-hz = /bits/ 64 <1000000000>;
383
403
opp-microvolt = <970000>, /* Supply 0 */
384
404
<960000>, /* Supply 1 */
@@ -391,7 +411,7 @@ Example 4: Handling multiple regulators
391
411
392
412
/* OR */
393
413
394
- opp00 {
414
+ opp@1000000000 {
395
415
opp-hz = /bits/ 64 <1000000000>;
396
416
opp-microvolt = <970000 975000 985000>, /* Supply 0 */
397
417
<960000 965000 975000>, /* Supply 1 */
@@ -404,7 +424,7 @@ Example 4: Handling multiple regulators
404
424
405
425
/* OR */
406
426
407
- opp00 {
427
+ opp@1000000000 {
408
428
opp-hz = /bits/ 64 <1000000000>;
409
429
opp-microvolt = <970000 975000 985000>, /* Supply 0 */
410
430
<960000 965000 975000>, /* Supply 1 */
@@ -417,7 +437,8 @@ Example 4: Handling multiple regulators
417
437
};
418
438
};
419
439
420
- Example 5: Multiple OPP tables
440
+ Example 5: opp-supported-hw
441
+ (example: three level hierarchy of versions: cuts, substrate and process)
421
442
422
443
/ {
423
444
cpus {
@@ -426,40 +447,73 @@ Example 5: Multiple OPP tables
426
447
...
427
448
428
449
cpu-supply = <&cpu_supply>
429
- operating-points-v2 = <&cpu0_opp_table_slow>, <&cpu0_opp_table_fast>;
430
- operating-points-names = "slow", "fast";
450
+ operating-points-v2 = <&cpu0_opp_table_slow>;
431
451
};
432
452
};
433
453
434
- cpu0_opp_table_slow: opp_table_slow {
454
+ opp_table {
435
455
compatible = "operating-points-v2";
436
456
status = "okay";
437
457
opp-shared;
438
458
439
- opp00 {
459
+ opp@600000000 {
460
+ /*
461
+ * Supports all substrate and process versions for 0xF
462
+ * cuts, i.e. only first four cuts.
463
+ */
464
+ opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>
440
465
opp-hz = /bits/ 64 <600000000>;
466
+ opp-microvolt = <900000 915000 925000>;
441
467
...
442
468
};
443
469
444
- opp01 {
470
+ opp@800000000 {
471
+ /*
472
+ * Supports:
473
+ * - cuts: only one, 6th cut (represented by 6th bit).
474
+ * - substrate: supports 16 different substrate versions
475
+ * - process: supports 9 different process versions
476
+ */
477
+ opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>
445
478
opp-hz = /bits/ 64 <800000000>;
479
+ opp-microvolt = <900000 915000 925000>;
446
480
...
447
481
};
448
482
};
483
+ };
484
+
485
+ Example 6: opp-microvolt-<name>, opp-microamp-<name>:
486
+ (example: device with two possible microvolt ranges: slow and fast)
449
487
450
- cpu0_opp_table_fast: opp_table_fast {
488
+ / {
489
+ cpus {
490
+ cpu@0 {
491
+ compatible = "arm,cortex-a7";
492
+ ...
493
+
494
+ operating-points-v2 = <&cpu0_opp_table>;
495
+ };
496
+ };
497
+
498
+ cpu0_opp_table: opp_table0 {
451
499
compatible = "operating-points-v2";
452
- status = "okay";
453
500
opp-shared;
454
501
455
- opp10 {
502
+ opp@1000000000 {
456
503
opp-hz = /bits/ 64 <1000000000>;
457
- ...
504
+ opp-microvolt-slow = <900000 915000 925000>;
505
+ opp-microvolt-fast = <970000 975000 985000>;
506
+ opp-microamp-slow = <70000>;
507
+ opp-microamp-fast = <71000>;
458
508
};
459
509
460
- opp11 {
461
- opp-hz = /bits/ 64 <1100000000>;
462
- ...
510
+ opp@1200000000 {
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 */
463
517
};
464
518
};
465
519
};
0 commit comments