aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-06-22 08:21:38 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-06-22 08:21:38 -0400
commita9a80e7e3177000344c3993411aada4d1e019f7c (patch)
tree2b7d0b80662ca6be8f8557ced444974aec0e3a53
parentb901b518077ba87bc84c84de02fce186cf9e5856 (diff)
PM / OPP: Allow multiple OPP tables to be passed via DT
On some platforms (Like Qualcomm's SoCs), it is not decided until runtime on what OPPs to use. The OPP tables can be fixed at compile time, but which table to use is found out only after reading some efuses (sort of an prom) and knowing characteristics of the SoC. To support such platform we need to pass multiple OPP tables per device and hardware should be able to choose one and only one table out of those. Update operating-points-v2 bindings to support that. Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/devicetree/bindings/power/opp.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power/opp.txt b/Documentation/devicetree/bindings/power/opp.txt
index 259bf00edf7d..3d5d32ca0f97 100644
--- a/Documentation/devicetree/bindings/power/opp.txt
+++ b/Documentation/devicetree/bindings/power/opp.txt
@@ -45,10 +45,21 @@ Devices supporting OPPs must set their "operating-points-v2" property with
45phandle to a OPP table in their DT node. The OPP core will use this phandle to 45phandle to a OPP table in their DT node. The OPP core will use this phandle to
46find the operating points for the device. 46find the operating points for the device.
47 47
48Devices may want to choose OPP tables at runtime and so can provide a list of
49phandles here. But only *one* of them should be chosen at runtime. This must be
50accompanied by a corresponding "operating-points-names" property, to uniquely
51identify the OPP tables.
52
48If required, this can be extended for SoC vendor specfic bindings. Such bindings 53If required, this can be extended for SoC vendor specfic bindings. Such bindings
49should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt 54should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
50and should have a compatible description like: "operating-points-v2-<vendor>". 55and should have a compatible description like: "operating-points-v2-<vendor>".
51 56
57Optional 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
52* OPP Table Node 63* OPP Table Node
53 64
54This describes the OPPs belonging to a device. This node can have following 65This describes the OPPs belonging to a device. This node can have following
@@ -68,6 +79,8 @@ Optional properties:
68 Missing property means devices have independent clock/voltage/current lines, 79 Missing property means devices have independent clock/voltage/current lines,
69 but they share OPP tables. 80 but they share OPP tables.
70 81
82- status: Marks the OPP table enabled/disabled.
83
71 84
72* OPP Node 85* OPP Node
73 86
@@ -396,3 +409,50 @@ Example 4: Handling multiple regulators
396 }; 409 };
397 }; 410 };
398}; 411};
412
413Example 5: Multiple OPP tables
414
415/ {
416 cpus {
417 cpu@0 {
418 compatible = "arm,cortex-a7";
419 ...
420
421 cpu-supply = <&cpu_supply>
422 operating-points-v2 = <&cpu0_opp_table_slow>, <&cpu0_opp_table_fast>;
423 operating-points-names = "slow", "fast";
424 };
425 };
426
427 cpu0_opp_table_slow: opp_table_slow {
428 compatible = "operating-points-v2";
429 status = "okay";
430 opp-shared;
431
432 opp00 {
433 opp-hz = <600000000>;
434 ...
435 };
436
437 opp01 {
438 opp-hz = <800000000>;
439 ...
440 };
441 };
442
443 cpu0_opp_table_fast: opp_table_fast {
444 compatible = "operating-points-v2";
445 status = "okay";
446 opp-shared;
447
448 opp10 {
449 opp-hz = <1000000000>;
450 ...
451 };
452
453 opp11 {
454 opp-hz = <1100000000>;
455 ...
456 };
457 };
458};