* [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support [not found] <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com> @ 2017-08-23 16:10 ` Dong Aisheng 2017-08-31 17:39 ` Rob Herring 0 siblings, 1 reply; 3+ messages in thread From: Dong Aisheng @ 2017-08-23 16:10 UTC (permalink / raw) To: linux-pm Cc: linux-kernel, linux-arm-kernel, sboyd, vireshk, nm, rjw, shawnguo, Anson.Huang, ping.bai, Dong Aisheng, Rob Herring, Frank Rowand, devicetree It's used for platforms where different OPPs may use different clocks. With this extended binding, user could specify the correct clock for each OPP node. Cc: Viresh Kumar <vireshk@kernel.org> Cc: Nishanth Menon <nm@ti.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: devicetree@vger.kernel.org Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> --- Documentation/devicetree/bindings/opp/opp.txt | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index e36d261..40a4340 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -152,6 +152,11 @@ Optional properties: hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the above example, Z1 & Z2 refer to the version hierarchy Z. +- clocks: Clock phandle and specifier used for this opp. + +- clock-names: clock names for this opp. The valid clock names are platform + specific. + - status: Marks the node enabled/disabled. Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. @@ -528,3 +533,50 @@ Example 6: opp-microvolt-<name>, opp-microamp-<name>: }; }; }; + +Example 7: Single core ARM cortex A7, switch separate clocks for each OPP: + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a7"; + reg = <0>; + next-level-cache = <&L2>; + clocks = <&clk_controller 0>; + clock-names = "cpu"; + cpu-supply = <&cpu_supply0>; + 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 = <975000 970000 985000>; + opp-microamp = <70000>; + clock-latency-ns = <300000>; + clocks = <&clk_controller 0>; + opp-suspend; + }; + opp-1100000000 { + opp-hz = /bits/ 64 <1100000000>; + opp-microvolt = <1000000 980000 1010000>; + opp-microamp = <80000>; + clocks = <&clk_controller 1>; + clock-latency-ns = <310000>; + }; + opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <1025000>; + clocks = <&clk_controller 2>; + clock-latency-ns = <290000>; + turbo-mode; + }; + }; +}; -- 2.7.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support 2017-08-23 16:10 ` [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support Dong Aisheng @ 2017-08-31 17:39 ` Rob Herring 2017-09-01 13:01 ` Dong Aisheng 0 siblings, 1 reply; 3+ messages in thread From: Rob Herring @ 2017-08-31 17:39 UTC (permalink / raw) To: Dong Aisheng Cc: linux-pm, linux-kernel, linux-arm-kernel, sboyd, vireshk, nm, rjw, shawnguo, Anson.Huang, ping.bai, Frank Rowand, devicetree On Thu, Aug 24, 2017 at 12:10:05AM +0800, Dong Aisheng wrote: > It's used for platforms where different OPPs may use different clocks. > With this extended binding, user could specify the correct clock for each > OPP node. > > Cc: Viresh Kumar <vireshk@kernel.org> > Cc: Nishanth Menon <nm@ti.com> > Cc: Stephen Boyd <sboyd@codeaurora.org> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > Cc: Rob Herring <robh+dt@kernel.org> > Cc: Frank Rowand <frowand.list@gmail.com> > Cc: devicetree@vger.kernel.org > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> > --- > Documentation/devicetree/bindings/opp/opp.txt | 52 +++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > > diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt > index e36d261..40a4340 100644 > --- a/Documentation/devicetree/bindings/opp/opp.txt > +++ b/Documentation/devicetree/bindings/opp/opp.txt > @@ -152,6 +152,11 @@ Optional properties: > hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the > above example, Z1 & Z2 refer to the version hierarchy Z. > > +- clocks: Clock phandle and specifier used for this opp. > + > +- clock-names: clock names for this opp. The valid clock names are platform > + specific. You don't need -names if there's only 1 clock. But then how long until we have a list of any random clocks some how associated with an OPP. I think this should really be solved within the clock framework. What you really need is "set my parent clock to the source that can provide X Hz". Could the assigned-clocks property work here (in the OPP nodes rather than the cpu nodes)? > + > - status: Marks the node enabled/disabled. > > Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. > @@ -528,3 +533,50 @@ Example 6: opp-microvolt-<name>, opp-microamp-<name>: > }; > }; > }; > + > +Example 7: Single core ARM cortex A7, switch separate clocks for each OPP: Can't you add this to an existing example? We don't need to enumerate every possible option. Rob ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support 2017-08-31 17:39 ` Rob Herring @ 2017-09-01 13:01 ` Dong Aisheng 0 siblings, 0 replies; 3+ messages in thread From: Dong Aisheng @ 2017-09-01 13:01 UTC (permalink / raw) To: Rob Herring Cc: Dong Aisheng, linux-pm, linux-kernel, linux-arm-kernel, sboyd, vireshk, nm, rjw, shawnguo, Anson.Huang, ping.bai, Frank Rowand, devicetree On Thu, Aug 31, 2017 at 12:39:20PM -0500, Rob Herring wrote: > On Thu, Aug 24, 2017 at 12:10:05AM +0800, Dong Aisheng wrote: > > It's used for platforms where different OPPs may use different clocks. > > With this extended binding, user could specify the correct clock for each > > OPP node. > > > > Cc: Viresh Kumar <vireshk@kernel.org> > > Cc: Nishanth Menon <nm@ti.com> > > Cc: Stephen Boyd <sboyd@codeaurora.org> > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > > Cc: Rob Herring <robh+dt@kernel.org> > > Cc: Frank Rowand <frowand.list@gmail.com> > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> > > --- > > Documentation/devicetree/bindings/opp/opp.txt | 52 +++++++++++++++++++++++++++ > > 1 file changed, 52 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt > > index e36d261..40a4340 100644 > > --- a/Documentation/devicetree/bindings/opp/opp.txt > > +++ b/Documentation/devicetree/bindings/opp/opp.txt > > @@ -152,6 +152,11 @@ Optional properties: > > hierarchy can be contained in multiple 32 bit values. i.e. <X Y Z1 Z2> in the > > above example, Z1 & Z2 refer to the version hierarchy Z. > > > > +- clocks: Clock phandle and specifier used for this opp. > > + > > +- clock-names: clock names for this opp. The valid clock names are platform > > + specific. > > You don't need -names if there's only 1 clock. Got it, will remove -name. > But then how long until > we have a list of any random clocks some how associated with an OPP. > Not sure whether it will really happen in the future. Even it happens, as we usually only need the device parent clock, then probably better to handle the left complicated things in clock driver or OPP device driver. > I think this should really be solved within the clock framework. What > you really need is "set my parent clock to the source that can provide X > Hz". Could the assigned-clocks property work here (in the OPP nodes > rather than the cpu nodes)? > I'm not quite sure i got your point. assigned-clocks seems a bit like function the same as clocks property here, both are used to specifying the device parent clock which provide X hz. Or are you suggesting using assigned-clocks/assigned-clocks-rates instread of clocks/opp-hz? Would you please clarify a bit more? > > + > > - status: Marks the node enabled/disabled. > > > > Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. > > @@ -528,3 +533,50 @@ Example 6: opp-microvolt-<name>, opp-microamp-<name>: > > }; > > }; > > }; > > + > > +Example 7: Single core ARM cortex A7, switch separate clocks for each OPP: > > Can't you add this to an existing example? We don't need to enumerate > every possible option. Okay, Will merge it. Thanks Regards Dong Aisheng > > Rob ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-01 13:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com>
2017-08-23 16:10 ` [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support Dong Aisheng
2017-08-31 17:39 ` Rob Herring
2017-09-01 13:01 ` Dong Aisheng
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).