* [PATCH 1/2] PM / OPP: compatible is an optional property @ 2016-09-21 9:32 Viresh Kumar 2016-09-21 9:32 ` [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet Viresh Kumar 2016-09-22 19:24 ` [PATCH 1/2] PM / OPP: compatible is an optional property Stephen Boyd 0 siblings, 2 replies; 8+ messages in thread From: Viresh Kumar @ 2016-09-21 9:32 UTC (permalink / raw) To: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd Cc: linaro-kernel-cunTk1MwBs8s++Sfvej+rw, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vincent Guittot, Viresh Kumar, devicetree-u79uwXL29TY76Z2rM5mHXA It was never compulsory to have a compatible string in the OPP table. Fix the documentation to mark it optional. Also update its description a bit. Signed-off-by: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- Documentation/devicetree/bindings/opp/opp.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index ee91cbdd95ee..5eab6f0215d1 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -55,14 +55,14 @@ This describes the OPPs belonging to a device. This node can have following properties: Required properties: -- compatible: Allow OPPs to express their compatibility. It should be: - "operating-points-v2". - - OPP nodes: One or more OPP nodes describing voltage-current-frequency combinations. Their name isn't significant but their phandle can be used to reference an OPP. Optional properties: +- compatible: Allow OPPs to express their compatibility. It should be + "operating-points-v2" or a vendor specific string. + - opp-shared: Indicates that device nodes using this OPP Table Node's phandle switch their DVFS state together, i.e. they share clock/voltage/current lines. Missing property means devices have independent clock/voltage/current lines, -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet 2016-09-21 9:32 [PATCH 1/2] PM / OPP: compatible is an optional property Viresh Kumar @ 2016-09-21 9:32 ` Viresh Kumar [not found] ` <fc02fca412ffdb749bd811c8f1dc40fa2ae3fc3f.1474450324.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2016-09-22 19:24 ` [PATCH 1/2] PM / OPP: compatible is an optional property Stephen Boyd 1 sibling, 1 reply; 8+ messages in thread From: Viresh Kumar @ 2016-09-21 9:32 UTC (permalink / raw) To: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd Cc: linaro-kernel, linux-pm, linux-kernel, Vincent Guittot, Viresh Kumar, devicetree 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 <viresh.kumar@linaro.org> --- 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 <target min max> 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-<name>: 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-<name>: Named opp-microamp property. Similar to opp-microvolt-<name> 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 = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>; - operating-points-v2 = <&cpu0_opp_table>; - }; - }; - - cpu0_opp_table: opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp@1000000000 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <970000>, /* Supply 0 */ - <960000>, /* Supply 1 */ - <960000>; /* Supply 2 */ - opp-microamp = <70000>, /* Supply 0 */ - <70000>, /* Supply 1 */ - <70000>; /* Supply 2 */ - clock-latency-ns = <300000>; - }; - - /* OR */ - - opp@1000000000 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <970000 975000 985000>, /* Supply 0 */ - <960000 965000 975000>, /* Supply 1 */ - <960000 965000 975000>; /* Supply 2 */ - opp-microamp = <70000>, /* Supply 0 */ - <70000>, /* Supply 1 */ - <70000>; /* Supply 2 */ - clock-latency-ns = <300000>; - }; - - /* OR */ - - opp@1000000000 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <970000 975000 985000>, /* Supply 0 */ - <960000 965000 975000>, /* Supply 1 */ - <960000 965000 975000>; /* Supply 2 */ - opp-microamp = <70000>, /* Supply 0 */ - <0>, /* Supply 1 doesn't need this */ - <70000>; /* Supply 2 */ - clock-latency-ns = <300000>; - }; - }; -}; - -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-<name>, opp-microamp-<name>: +Example 5: opp-microvolt-<name>, opp-microamp-<name>: (example: device with two possible microvolt ranges: slow and fast) / { -- 2.7.1.410.g6faf27b ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <fc02fca412ffdb749bd811c8f1dc40fa2ae3fc3f.1474450324.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet [not found] ` <fc02fca412ffdb749bd811c8f1dc40fa2ae3fc3f.1474450324.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2016-09-23 19:59 ` Rob Herring 2016-09-26 5:07 ` Viresh Kumar 0 siblings, 1 reply; 8+ messages in thread From: Rob Herring @ 2016-09-23 19:59 UTC (permalink / raw) To: Viresh Kumar Cc: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd, linaro-kernel-cunTk1MwBs8s++Sfvej+rw, linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vincent Guittot, devicetree-u79uwXL29TY76Z2rM5mHXA 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet 2016-09-23 19:59 ` Rob Herring @ 2016-09-26 5:07 ` Viresh Kumar 0 siblings, 0 replies; 8+ messages in thread From: Viresh Kumar @ 2016-09-26 5:07 UTC (permalink / raw) To: Rob Herring Cc: Rafael Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd, linaro-kernel, linux-pm, linux-kernel, Vincent Guittot, devicetree 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 <1700000000>; /* ABC supply XYZ supply */ opp-microvolt = <1300000 1300000 1300000>, <1400000 1400000 1400000>; opp-microamp = <70000>; 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] PM / OPP: compatible is an optional property 2016-09-21 9:32 [PATCH 1/2] PM / OPP: compatible is an optional property Viresh Kumar 2016-09-21 9:32 ` [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet Viresh Kumar @ 2016-09-22 19:24 ` Stephen Boyd 2016-09-23 5:15 ` Viresh Kumar 1 sibling, 1 reply; 8+ messages in thread From: Stephen Boyd @ 2016-09-22 19:24 UTC (permalink / raw) To: Viresh Kumar, Rafael Wysocki, Viresh Kumar, Nishanth Menon Cc: linaro-kernel, linux-pm, linux-kernel, Vincent Guittot, devicetree On 09/21/2016 02:32 AM, Viresh Kumar wrote: > It was never compulsory to have a compatible string in the OPP table. > Fix the documentation to mark it optional. > > Also update its description a bit. > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > --- Why? I'd prefer the compatible string to be required so we know what sort of node it is. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] PM / OPP: compatible is an optional property 2016-09-22 19:24 ` [PATCH 1/2] PM / OPP: compatible is an optional property Stephen Boyd @ 2016-09-23 5:15 ` Viresh Kumar 2016-09-23 19:55 ` Rob Herring 0 siblings, 1 reply; 8+ messages in thread From: Viresh Kumar @ 2016-09-23 5:15 UTC (permalink / raw) To: Stephen Boyd Cc: Rafael Wysocki, Viresh Kumar, Nishanth Menon, linaro-kernel, linux-pm, linux-kernel, Vincent Guittot, devicetree On 22-09-16, 12:24, Stephen Boyd wrote: > On 09/21/2016 02:32 AM, Viresh Kumar wrote: > > It was never compulsory to have a compatible string in the OPP table. > > Fix the documentation to mark it optional. > > > > Also update its description a bit. > > > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > > --- > > Why? I'd prefer the compatible string to be required so we know what > sort of node it is. Okay, the code doesn't have any checks for it then and that needs to be fixed. Just for my clarity, for platforms with special OPP bindings and so a different compatible string like: "operating-points-v2-XYZ", should the compatible string contain both "operating-points-v2" and the above one? It would be easier to check for "operating-points-v2" in that case from core code. -- viresh ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] PM / OPP: compatible is an optional property 2016-09-23 5:15 ` Viresh Kumar @ 2016-09-23 19:55 ` Rob Herring 2016-09-26 4:55 ` Viresh Kumar 0 siblings, 1 reply; 8+ messages in thread From: Rob Herring @ 2016-09-23 19:55 UTC (permalink / raw) To: Viresh Kumar Cc: Stephen Boyd, Nishanth Menon, devicetree-u79uwXL29TY76Z2rM5mHXA, linaro-kernel-cunTk1MwBs8s++Sfvej+rw, linux-pm-u79uwXL29TY76Z2rM5mHXA, Viresh Kumar, Rafael Wysocki, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Fri, Sep 23, 2016 at 10:45:26AM +0530, Viresh Kumar wrote: > On 22-09-16, 12:24, Stephen Boyd wrote: > > On 09/21/2016 02:32 AM, Viresh Kumar wrote: > > > It was never compulsory to have a compatible string in the OPP table. > > > Fix the documentation to mark it optional. > > > NAK. > > > Also update its description a bit. > > > > > > Signed-off-by: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > > --- > > > > Why? I'd prefer the compatible string to be required so we know what > > sort of node it is. Agreed. > Okay, the code doesn't have any checks for it then and that needs to be fixed. Why? The kernel is not a DT validator. > Just for my clarity, for platforms with special OPP bindings and so a different > compatible string like: "operating-points-v2-XYZ", should the compatible string > contain both "operating-points-v2" and the above one? It would be easier to > check for "operating-points-v2" in that case from core code. That would imply operating-points-v2-XYZ has extra properties or is different in some way. If an OS only understanding operating-points-v2 will work, then yes it should have both. If not, then no. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] PM / OPP: compatible is an optional property 2016-09-23 19:55 ` Rob Herring @ 2016-09-26 4:55 ` Viresh Kumar 0 siblings, 0 replies; 8+ messages in thread From: Viresh Kumar @ 2016-09-26 4:55 UTC (permalink / raw) To: Rob Herring Cc: Stephen Boyd, Nishanth Menon, devicetree, linaro-kernel, linux-pm, Viresh Kumar, Rafael Wysocki, linux-kernel On 23-09-16, 14:55, Rob Herring wrote: > On Fri, Sep 23, 2016 at 10:45:26AM +0530, Viresh Kumar wrote: > > On 22-09-16, 12:24, Stephen Boyd wrote: > > > On 09/21/2016 02:32 AM, Viresh Kumar wrote: > > > > It was never compulsory to have a compatible string in the OPP table. > > > > Fix the documentation to mark it optional. > > > > > > NAK. > > > > > Also update its description a bit. > > > > > > > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> > > > > --- > > > > > > Why? I'd prefer the compatible string to be required so we know what > > > sort of node it is. > > Agreed. > > > Okay, the code doesn't have any checks for it then and that needs to be fixed. > > Why? The kernel is not a DT validator. Hmm.. I thought it should be checking if it can parse those bindings or not. What if someone adds compatible property as "foo" for OPP node? Should the OPP code even try to parse it? > > Just for my clarity, for platforms with special OPP bindings and so a different > > compatible string like: "operating-points-v2-XYZ", should the compatible string > > contain both "operating-points-v2" and the above one? It would be easier to > > check for "operating-points-v2" in that case from core code. > > That would imply operating-points-v2-XYZ has extra properties or is > different in some way. If an OS only understanding operating-points-v2 > will work, then yes it should have both. If not, then no. Well, in this case that can't be done fully, so we should have only the -xyz one. Got it, thanks. -- viresh ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-09-26 5:07 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-21 9:32 [PATCH 1/2] PM / OPP: compatible is an optional property Viresh Kumar 2016-09-21 9:32 ` [PATCH 2/2] PM / OPP: Multiple regulators aren't supported yet Viresh Kumar [not found] ` <fc02fca412ffdb749bd811c8f1dc40fa2ae3fc3f.1474450324.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2016-09-23 19:59 ` Rob Herring 2016-09-26 5:07 ` Viresh Kumar 2016-09-22 19:24 ` [PATCH 1/2] PM / OPP: compatible is an optional property Stephen Boyd 2016-09-23 5:15 ` Viresh Kumar 2016-09-23 19:55 ` Rob Herring 2016-09-26 4:55 ` Viresh Kumar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).