Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
On 23-09-16, 14:59, Rob Herring wrote: > On Wed, Sep 21, 2016 at 03:02:50PM +0530, Viresh Kumar wrote: > > Multiple regulators per device aren't supported yet by the kernel code > > and the bindings provided in documentation aren't sufficient to handle > > that case (as there is no way for kernel code to link multiple > > voltage/current values to a power supply). > > What do you mean? Because the supplies are in the cpu node? Not just that. For example if two supplies are present in CPU node like: ABC-supply and XYZ-supply. And the values present in OPP node are like: opp00 { opp-hz = /bits/ 64 <17>; /* ABC supplyXYZ supply */ opp-microvolt = <130 130 130>, <140 140 140>; opp-microamp = <7>; clock-latency-ns = <30>; opp-suspend; }; Then the code can get regulators with those names (ABC and XYZ), but it can't figure out which triplet in the "opp-microvolt" property belongs to which supply. I am working on some solution to that, but wanted to keep the entire series self sufficient and so removing the leftovers first in this patch. -- viresh
Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
On 23-09-16, 14:59, Rob Herring wrote: > On Wed, Sep 21, 2016 at 03:02:50PM +0530, Viresh Kumar wrote: > > Multiple regulators per device aren't supported yet by the kernel code > > and the bindings provided in documentation aren't sufficient to handle > > that case (as there is no way for kernel code to link multiple > > voltage/current values to a power supply). > > What do you mean? Because the supplies are in the cpu node? Not just that. For example if two supplies are present in CPU node like: ABC-supply and XYZ-supply. And the values present in OPP node are like: opp00 { opp-hz = /bits/ 64 <17>; /* ABC supplyXYZ supply */ opp-microvolt = <130 130 130>, <140 140 140>; opp-microamp = <7>; clock-latency-ns = <30>; opp-suspend; }; Then the code can get regulators with those names (ABC and XYZ), but it can't figure out which triplet in the "opp-microvolt" property belongs to which supply. I am working on some solution to that, but wanted to keep the entire series self sufficient and so removing the leftovers first in this patch. -- viresh
Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
On Wed, Sep 21, 2016 at 03:02:50PM +0530, Viresh Kumar wrote: > Multiple regulators per device aren't supported yet by the kernel code > and the bindings provided in documentation aren't sufficient to handle > that case (as there is no way for kernel code to link multiple > voltage/current values to a power supply). What do you mean? Because the supplies are in the cpu node? Rob
Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
On Wed, Sep 21, 2016 at 03:02:50PM +0530, Viresh Kumar wrote: > Multiple regulators per device aren't supported yet by the kernel code > and the bindings provided in documentation aren't sufficient to handle > that case (as there is no way for kernel code to link multiple > voltage/current values to a power supply). What do you mean? Because the supplies are in the cpu node? Rob
[PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
Multiple regulators per device aren't supported yet by the kernel code and the bindings provided in documentation aren't sufficient to handle that case (as there is no way for kernel code to link multiple voltage/current values to a power supply). Remove them. These can be added later if required with appropriate changes. Signed-off-by: Viresh Kumar--- Documentation/devicetree/bindings/opp/opp.txt | 68 ++- 1 file changed, 4 insertions(+), 64 deletions(-) diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 5eab6f0215d1..5d0595f0a10c 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -86,8 +86,7 @@ properties. Single entry is for target voltage and three entries are for voltages. - Entries for multiple regulators must be present in the same order as - regulators are specified in device's DT node. + Entries for multiple regulators aren't supported. - opp-microvolt-: Named opp-microvolt property. This is exactly similar to the above opp-microvolt property, but allows multiple voltage ranges to be @@ -104,10 +103,7 @@ properties. Should only be set if opp-microvolt is set for the OPP. - Entries for multiple regulators must be present in the same order as - regulators are specified in device's DT node. If this property isn't required - for few regulators, then this should be marked as zero for them. If it isn't - required for any regulator, then this property need not be present. + Entries for multiple regulators aren't supported. - opp-microamp-: Named opp-microamp property. Similar to opp-microvolt- property, but for microamp instead. @@ -381,63 +377,7 @@ DVFS state together. }; }; -Example 4: Handling multiple regulators - -/ { - cpus { - cpu@0 { - compatible = "arm,cortex-a7"; - ... - - cpu-supply = <_supply0>, <_supply1>, <_supply2>; - operating-points-v2 = <_opp_table>; - }; - }; - - cpu0_opp_table: opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97>, /* Supply 0 */ - <96>, /* Supply 1 */ - <96>; /* Supply 2 */ - opp-microamp = <7>, /* Supply 0 */ - <7>, /* Supply 1 */ - <7>; /* Supply 2 */ - clock-latency-ns = <30>; - }; - - /* OR */ - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97 975000 985000>, /* Supply 0 */ - <96 965000 975000>, /* Supply 1 */ - <96 965000 975000>; /* Supply 2 */ - opp-microamp = <7>,/* Supply 0 */ - <7>,/* Supply 1 */ - <7>;/* Supply 2 */ - clock-latency-ns = <30>; - }; - - /* OR */ - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97 975000 985000>, /* Supply 0 */ - <96 965000 975000>, /* Supply 1 */ - <96 965000 975000>; /* Supply 2 */ - opp-microamp = <7>,/* Supply 0 */ - <0>,/* Supply 1 doesn't need this */ - <7>;/* Supply 2 */ - clock-latency-ns = <30>; - }; - }; -}; - -Example 5: opp-supported-hw +Example 4: opp-supported-hw (example: three level hierarchy of versions: cuts, substrate and process) / { @@ -482,7 +422,7 @@ Example 5: opp-supported-hw }; }; -Example 6: opp-microvolt-, opp-microamp-: +Example 5: opp-microvolt-, opp-microamp-: (example: device with two possible microvolt ranges: slow and fast) / { -- 2.7.1.410.g6faf27b
[PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet
Multiple regulators per device aren't supported yet by the kernel code and the bindings provided in documentation aren't sufficient to handle that case (as there is no way for kernel code to link multiple voltage/current values to a power supply). Remove them. These can be added later if required with appropriate changes. Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/opp/opp.txt | 68 ++- 1 file changed, 4 insertions(+), 64 deletions(-) diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 5eab6f0215d1..5d0595f0a10c 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -86,8 +86,7 @@ properties. Single entry is for target voltage and three entries are for voltages. - Entries for multiple regulators must be present in the same order as - regulators are specified in device's DT node. + Entries for multiple regulators aren't supported. - opp-microvolt-: Named opp-microvolt property. This is exactly similar to the above opp-microvolt property, but allows multiple voltage ranges to be @@ -104,10 +103,7 @@ properties. Should only be set if opp-microvolt is set for the OPP. - Entries for multiple regulators must be present in the same order as - regulators are specified in device's DT node. If this property isn't required - for few regulators, then this should be marked as zero for them. If it isn't - required for any regulator, then this property need not be present. + Entries for multiple regulators aren't supported. - opp-microamp-: Named opp-microamp property. Similar to opp-microvolt- property, but for microamp instead. @@ -381,63 +377,7 @@ DVFS state together. }; }; -Example 4: Handling multiple regulators - -/ { - cpus { - cpu@0 { - compatible = "arm,cortex-a7"; - ... - - cpu-supply = <_supply0>, <_supply1>, <_supply2>; - operating-points-v2 = <_opp_table>; - }; - }; - - cpu0_opp_table: opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97>, /* Supply 0 */ - <96>, /* Supply 1 */ - <96>; /* Supply 2 */ - opp-microamp = <7>, /* Supply 0 */ - <7>, /* Supply 1 */ - <7>; /* Supply 2 */ - clock-latency-ns = <30>; - }; - - /* OR */ - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97 975000 985000>, /* Supply 0 */ - <96 965000 975000>, /* Supply 1 */ - <96 965000 975000>; /* Supply 2 */ - opp-microamp = <7>,/* Supply 0 */ - <7>,/* Supply 1 */ - <7>;/* Supply 2 */ - clock-latency-ns = <30>; - }; - - /* OR */ - - opp@10 { - opp-hz = /bits/ 64 <10>; - opp-microvolt = <97 975000 985000>, /* Supply 0 */ - <96 965000 975000>, /* Supply 1 */ - <96 965000 975000>; /* Supply 2 */ - opp-microamp = <7>,/* Supply 0 */ - <0>,/* Supply 1 doesn't need this */ - <7>;/* Supply 2 */ - clock-latency-ns = <30>; - }; - }; -}; - -Example 5: opp-supported-hw +Example 4: opp-supported-hw (example: three level hierarchy of versions: cuts, substrate and process) / { @@ -482,7 +422,7 @@ Example 5: opp-supported-hw }; }; -Example 6: opp-microvolt-, opp-microamp-: +Example 5: opp-microvolt-, opp-microamp-: (example: device with two possible microvolt ranges: slow and fast) / { -- 2.7.1.410.g6faf27b