Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1622368 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2017-04-12 19:00 +0200 |
| Last post | 2017-04-24 21:10 +0200 |
| Articles | 15 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-12 19:00 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-13 07:40 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-13 15:50 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-17 07:30 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-18 18:10 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 12:20 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 13:50 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-19 16:00 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-20 07:30 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Ulf Hansson <ulf.hansson@linaro.org> - 2017-04-20 10:30 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-20 11:40 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-20 12:00 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Sudeep Holla <sudeep.holla@arm.com> - 2017-04-20 11:50 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-20 12:00 +0200
Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains Kevin Hilman <khilman@baylibre.com> - 2017-04-24 21:10 +0200
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-12 19:00 +0200 |
| Subject | Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains |
| Message-ID | <tvtME-6Uu-51@gated-at.bofh.it> |
On 20/03/17 09:32, Viresh Kumar wrote:
> Power-domains need to express their active states in DT and what's
> better than OPP table for that.
>
> This patch allows power-domains to reuse OPP tables to express their
> active states. The "opp-hz" property isn't a required property anymore
> as power-domains may not always use them.
>
> Add a new property "domain-performance-state", which will contain
> positive integer values to represent performance levels of the
> power-domains as described in this patch.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> Documentation/devicetree/bindings/opp/opp.txt | 73 ++++++++++++++++++++++++++-
> 1 file changed, 71 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
> index 63725498bd20..d0b95c9e1011 100644
> --- a/Documentation/devicetree/bindings/opp/opp.txt
> +++ b/Documentation/devicetree/bindings/opp/opp.txt
> @@ -76,10 +76,9 @@ This describes the OPPs belonging to a device. This node can have following
> This defines voltage-current-frequency combinations along with other related
> properties.
>
> -Required properties:
> +Optional properties:
> - opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer.
>
> -Optional properties:
> - opp-microvolt: voltage in micro Volts.
>
> A single regulator's voltage is specified with an array of size one or three.
> @@ -154,6 +153,19 @@ properties.
>
> - status: Marks the node enabled/disabled.
>
> +- domain-performance-state: A positive integer value representing the minimum
> + power-domain performance level required by the device for the OPP node. The
So the above definition is when this field in in the device node rather
than the OPP table entry, right ? For simplicity why not have the
properties named slightly different or just use phandle to an entry in
the device node for this purpose.
> + The integer value '0' represents the lowest performance level and the higher
> + values represent higher performance levels.
needs to be changed as OPP table entry.
> When present in the OPP table of a
> + power-domain, it represents the performance level of the domain. When present
again "performance level of the domain corresponding to that OPP entry"
on something similar
> + in the OPP table of a normal device, it represents the performance level of
what do you mean by normal device ? needs description as that's
something new introduced here.
> + the parent power-domain. The OPP table can contain the
> + "domain-performance-state" property, only if the device node contains the
> + "power-domains" or "#power-domain-cells" property.
Why such a restriction ?
> The OPP nodes aren't
> + allowed to contain the "domain-performance-state" property partially, i.e.
> + Either all OPP nodes in the OPP table have the "domain-performance-state"
> + property or none of them have it.
> +
> Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
>
> / {
> @@ -528,3 +540,60 @@ Example 5: opp-supported-hw
> };
> };
> };
> +
> +Example 7: domain-Performance-state:
> +(example: For 1GHz require domain state 1 and for 1.1 & 1.2 GHz require state 2)
> +
> +/ {
> + domain_opp_table: opp_table0 {
> + compatible = "operating-points-v2";
> +
> + opp@1 {
> + domain-performance-state = <1>;
> + opp-microvolt = <975000 970000 985000>;
> + };
> + opp@2 {
> + domain-performance-state = <2>;
> + opp-microvolt = <1075000 1000000 1085000>;
> + };
> + };
> +
> + foo_domain: power-controller@12340000 {
> + compatible = "foo,power-controller";
> + reg = <0x12340000 0x1000>;
> + #power-domain-cells = <0>;
> + operating-points-v2 = <&domain_opp_table>;
How does it scale with power domain providers with multiple power domain ?
> + }
> +
> + cpu0_opp_table: opp_table1 {
> + compatible = "operating-points-v2";
> + opp-shared;
> +
> + opp@1000000000 {
> + opp-hz = /bits/ 64 <1000000000>;
> + domain-performance-state = <1>;
> + };
> + opp@1100000000 {
> + opp-hz = /bits/ 64 <1100000000>;
> + domain-performance-state = <2>;
> + };
> + opp@1200000000 {
> + opp-hz = /bits/ 64 <1200000000>;
> + domain-performance-state = <2>;
> + };
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cpu@0 {
> + compatible = "arm,cortex-a9";
> + reg = <0>;
> + clocks = <&clk_controller 0>;
> + clock-names = "cpu";
> + operating-points-v2 = <&cpu0_opp_table>;
Do we ignore operating-points-v2 above as this device/cpu node contains
power domain which has operating-points-v2 property ? In other words
how do they correlate ?
> + power-domains = <&foo_domain>;
> + };
> + };
> +};
>
--
Regards,
Sudeep
[toc] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-13 07:40 +0200 |
| Message-ID | <tvFE5-6Oa-7@gated-at.bofh.it> |
| In reply to | #1622368 |
On 12-04-17, 17:49, Sudeep Holla wrote:
> On 20/03/17 09:32, Viresh Kumar wrote:
> > diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
> > index 63725498bd20..d0b95c9e1011 100644
> > --- a/Documentation/devicetree/bindings/opp/opp.txt
> > +++ b/Documentation/devicetree/bindings/opp/opp.txt
> > @@ -76,10 +76,9 @@ This describes the OPPs belonging to a device. This node can have following
> > This defines voltage-current-frequency combinations along with other related
> > properties.
> >
> > -Required properties:
> > +Optional properties:
> > - opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer.
> >
> > -Optional properties:
> > - opp-microvolt: voltage in micro Volts.
> >
> > A single regulator's voltage is specified with an array of size one or three.
> > @@ -154,6 +153,19 @@ properties.
> >
> > - status: Marks the node enabled/disabled.
> >
> > +- domain-performance-state: A positive integer value representing the minimum
> > + power-domain performance level required by the device for the OPP node. The
>
> So the above definition is when this field in in the device node rather
> than the OPP table entry, right ?
No. We are updating the opp.txt file here and so it is not about the
device node. The OPP node entries will contain this field for two
cases:
- The OPP table belongs to a power domain
- The OPP table belongs to a device whose power domain supports
performance-states.
> For simplicity why not have the
> properties named slightly different or just use phandle to an entry in
> the device node for this purpose.
We really need a value here. For example, in case where the OPP table
defines the states of the power-domain itself, we don't have any
phandles to point to.
> > + The integer value '0' represents the lowest performance level and the higher
> > + values represent higher performance levels.
>
> needs to be changed as OPP table entry.
Not sure I understood what change you are looking for :(
> > When present in the OPP table of a
> > + power-domain, it represents the performance level of the domain. When present
>
> again "performance level of the domain corresponding to that OPP entry"
> on something similar
Ok.
> > + in the OPP table of a normal device, it represents the performance level of
>
> what do you mean by normal device ? needs description as that's
> something new introduced here.
It should be non-power-domain node.
> > + the parent power-domain. The OPP table can contain the
> > + "domain-performance-state" property, only if the device node contains the
> > + "power-domains" or "#power-domain-cells" property.
>
> Why such a restriction ?
Why would we use it for non-power-domain cases? That's not what we
are looking for..
> > The OPP nodes aren't
> > + allowed to contain the "domain-performance-state" property partially, i.e.
> > + Either all OPP nodes in the OPP table have the "domain-performance-state"
> > + property or none of them have it.
> > +
> > Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
> >
> > / {
> > @@ -528,3 +540,60 @@ Example 5: opp-supported-hw
> > };
> > };
> > };
> > +
> > +Example 7: domain-Performance-state:
> > +(example: For 1GHz require domain state 1 and for 1.1 & 1.2 GHz require state 2)
> > +
> > +/ {
> > + domain_opp_table: opp_table0 {
> > + compatible = "operating-points-v2";
> > +
> > + opp@1 {
> > + domain-performance-state = <1>;
> > + opp-microvolt = <975000 970000 985000>;
> > + };
> > + opp@2 {
> > + domain-performance-state = <2>;
> > + opp-microvolt = <1075000 1000000 1085000>;
> > + };
> > + };
> > +
> > + foo_domain: power-controller@12340000 {
> > + compatible = "foo,power-controller";
> > + reg = <0x12340000 0x1000>;
> > + #power-domain-cells = <0>;
> > + operating-points-v2 = <&domain_opp_table>;
>
> How does it scale with power domain providers with multiple power domain ?
Devices can't have multiple power domains today. Will see this when
that support is added.
Note that only the power domains can have multiple parent power
domains today.
> > + }
> > +
> > + cpu0_opp_table: opp_table1 {
> > + compatible = "operating-points-v2";
> > + opp-shared;
> > +
> > + opp@1000000000 {
> > + opp-hz = /bits/ 64 <1000000000>;
> > + domain-performance-state = <1>;
> > + };
> > + opp@1100000000 {
> > + opp-hz = /bits/ 64 <1100000000>;
> > + domain-performance-state = <2>;
> > + };
> > + opp@1200000000 {
> > + opp-hz = /bits/ 64 <1200000000>;
> > + domain-performance-state = <2>;
> > + };
> > + };
> > +
> > + cpus {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + cpu@0 {
> > + compatible = "arm,cortex-a9";
> > + reg = <0>;
> > + clocks = <&clk_controller 0>;
> > + clock-names = "cpu";
> > + operating-points-v2 = <&cpu0_opp_table>;
>
> Do we ignore operating-points-v2 above as this device/cpu node contains
> power domain which has operating-points-v2 property ? In other words
> how do they correlate ?
Devices and their power domains can both have their performance
states. Just that to get the device in a particular state, we may need
to get its power domain to a particular state first.
--
viresh
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-13 15:50 +0200 |
| Message-ID | <tvNii-3GT-17@gated-at.bofh.it> |
| In reply to | #1622723 |
On 13/04/17 06:37, Viresh Kumar wrote:
> On 12-04-17, 17:49, Sudeep Holla wrote:
>> On 20/03/17 09:32, Viresh Kumar wrote:
>>> diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
>>> index 63725498bd20..d0b95c9e1011 100644
>>> --- a/Documentation/devicetree/bindings/opp/opp.txt
>>> +++ b/Documentation/devicetree/bindings/opp/opp.txt
>>> @@ -76,10 +76,9 @@ This describes the OPPs belonging to a device. This node can have following
>>> This defines voltage-current-frequency combinations along with other related
>>> properties.
>>>
>>> -Required properties:
>>> +Optional properties:
>>> - opp-hz: Frequency in Hz, expressed as a 64-bit big-endian integer.
>>>
>>> -Optional properties:
>>> - opp-microvolt: voltage in micro Volts.
>>>
>>> A single regulator's voltage is specified with an array of size one or three.
>>> @@ -154,6 +153,19 @@ properties.
>>>
>>> - status: Marks the node enabled/disabled.
>>>
>>> +- domain-performance-state: A positive integer value representing the minimum
>>> + power-domain performance level required by the device for the OPP node. The
>>
>> So the above definition is when this field in in the device node rather
>> than the OPP table entry, right ?
>
> No. We are updating the opp.txt file here and so it is not about the
> device node. The OPP node entries will contain this field for two
> cases:
> - The OPP table belongs to a power domain
> - The OPP table belongs to a device whose power domain supports
> performance-states.
>
Understood.
>> For simplicity why not have the
>> properties named slightly different or just use phandle to an entry in
>> the device node for this purpose.
>
> We really need a value here. For example, in case where the OPP table
> defines the states of the power-domain itself, we don't have any
> phandles to point to.
>
OK
>>> + The integer value '0' represents the lowest performance level and the higher
>>> + values represent higher performance levels.
>>
>> needs to be changed as OPP table entry.
>
> Not sure I understood what change you are looking for :(
>
Looks like I commented the same thing below, just redundant comment
here. Sorry about that.
>>> When present in the OPP table of a
>>> + power-domain, it represents the performance level of the domain. When present
>>
>> again "performance level of the domain corresponding to that OPP entry"
>> on something similar
>
> Ok.
>
>>> + in the OPP table of a normal device, it represents the performance level of
>>
>> what do you mean by normal device ? needs description as that's
>> something new introduced here.
>
> It should be non-power-domain node.
>
OK
>>> + the parent power-domain. The OPP table can contain the
>>> + "domain-performance-state" property, only if the device node contains the
>>> + "power-domains" or "#power-domain-cells" property.
>>
>> Why such a restriction ?
>
> Why would we use it for non-power-domain cases? That's not what we
> are looking for..
>
OK I was imagining that this would abstract clocks and regulators and
hence thinking of other possibilities.
>>> The OPP nodes aren't
>>> + allowed to contain the "domain-performance-state" property partially, i.e.
>>> + Either all OPP nodes in the OPP table have the "domain-performance-state"
>>> + property or none of them have it.
>>> +
>>> Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
>>>
>>> / {
>>> @@ -528,3 +540,60 @@ Example 5: opp-supported-hw
>>> };
>>> };
>>> };
>>> +
>>> +Example 7: domain-Performance-state:
>>> +(example: For 1GHz require domain state 1 and for 1.1 & 1.2 GHz require state 2)
>>> +
>>> +/ {
>>> + domain_opp_table: opp_table0 {
>>> + compatible = "operating-points-v2";
>>> +
>>> + opp@1 {
>>> + domain-performance-state = <1>;
>>> + opp-microvolt = <975000 970000 985000>;
>>> + };
>>> + opp@2 {
>>> + domain-performance-state = <2>;
>>> + opp-microvolt = <1075000 1000000 1085000>;
>>> + };
>>> + };
>>> +
>>> + foo_domain: power-controller@12340000 {
>>> + compatible = "foo,power-controller";
>>> + reg = <0x12340000 0x1000>;
>>> + #power-domain-cells = <0>;
>>> + operating-points-v2 = <&domain_opp_table>;
>>
>> How does it scale with power domain providers with multiple power domain ?
>
> Devices can't have multiple power domains today. Will see this when
> that support is added.
>
Agreed and I see some working already happening on that, so yes we can
add that later.
What I was referring is about power domain provider with multiple power
domains(simply #power-domain-cells=<1> case as explained in the
power-domain specification.
> Note that only the power domains can have multiple parent power
> domains today.
>
>>> + }
>>> +
>>> + cpu0_opp_table: opp_table1 {
>>> + compatible = "operating-points-v2";
>>> + opp-shared;
>>> +
>>> + opp@1000000000 {
>>> + opp-hz = /bits/ 64 <1000000000>;
>>> + domain-performance-state = <1>;
>>> + };
>>> + opp@1100000000 {
>>> + opp-hz = /bits/ 64 <1100000000>;
>>> + domain-performance-state = <2>;
>>> + };
>>> + opp@1200000000 {
>>> + opp-hz = /bits/ 64 <1200000000>;
>>> + domain-performance-state = <2>;
>>> + };
>>> + };
>>> +
>>> + cpus {
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> +
>>> + cpu@0 {
>>> + compatible = "arm,cortex-a9";
>>> + reg = <0>;
>>> + clocks = <&clk_controller 0>;
>>> + clock-names = "cpu";
>>> + operating-points-v2 = <&cpu0_opp_table>;
>>
>> Do we ignore operating-points-v2 above as this device/cpu node contains
>> power domain which has operating-points-v2 property ? In other words
>> how do they correlate ?
>
> Devices and their power domains can both have their performance
> states. Just that to get the device in a particular state, we may need
> to get its power domain to a particular state first.
>
Yes. To simplify what not we just have power-domain for a device and
change state of that domain to change the performance of that device.
Then put this in the hierarchy. Some thing similar to what we already
have with new domain-idle states. In that way, we can move any
performance control to the domain and abstract the clocks and regulators
from the devices as the first step and from the OSPM view if there's
firmware support.
If we are looking this power-domains with performance as just some
*advanced regulators*, I don't like the complexity added.
I am also looking at how does this align with other specifications like
ACPI and SCMI that are trying to solve similar issues.
--
Regards,
Sudeep
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-17 07:30 +0200 |
| Message-ID | <tx7oC-5as-3@gated-at.bofh.it> |
| In reply to | #1623035 |
On 13-04-17, 14:42, Sudeep Holla wrote: > What I was referring is about power domain provider with multiple power > domains(simply #power-domain-cells=<1> case as explained in the > power-domain specification. I am not sure if we should be looking to target such a situation for now, as that would be like this: Device controlled by Domain A. Domain A itself is controlled by Domain B and Domain C. Though we will end up converting the domain-performance-state property to an array if that is required in near future. > Yes. To simplify what not we just have power-domain for a device and > change state of that domain to change the performance of that device. Consider this case to understand what I have in Mind. The power domain have its states as A, B, C, D. There can be multiple devices regulated by that domain and one of the devices have its power states as: A1, A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3 and all these states have different frequency/voltages. IOW, the devices can have regulators as well and may want to fine tune within the domain performance-state. > Then put this in the hierarchy. Some thing similar to what we already > have with new domain-idle states. In that way, we can move any > performance control to the domain and abstract the clocks and regulators > from the devices as the first step and from the OSPM view if there's > firmware support. > > If we are looking this power-domains with performance as just some > *advanced regulators*, I don't like the complexity added. In the particular case I am trying to solve (Qcom), we have some sort of regulators which are only programmed by a M3 core. The M3 core needs integer numbers representing state we want the domain to be in and it will put the regulators (or whatever) in a particular state. -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-18 18:10 +0200 |
| Message-ID | <txDRw-8e8-23@gated-at.bofh.it> |
| In reply to | #1624533 |
On 17/04/17 06:27, Viresh Kumar wrote: > On 13-04-17, 14:42, Sudeep Holla wrote: >> What I was referring is about power domain provider with multiple power >> domains(simply #power-domain-cells=<1> case as explained in the >> power-domain specification. > > I am not sure if we should be looking to target such a situation for now, as > that would be like this: > > Device controlled by Domain A. Domain A itself is controlled by Domain B and > Domain C. > No, may be I was not so clear. I am just referring a power controller that provides say 3 different power domains and are indexed 0 - 2. The consumer just passes the index along with the phandle for the power domain info. > Though we will end up converting the domain-performance-state property to an > array if that is required in near future. > OK, better to document that so that we know how to extend it. We have #power-domain-cells=<1> on Juno with SCPI. >> Yes. To simplify what not we just have power-domain for a device and >> change state of that domain to change the performance of that device. > > Consider this case to understand what I have in Mind. > > The power domain have its states as A, B, C, D. There can be multiple devices > regulated by that domain and one of the devices have its power states as: A1, > A2, A3, B1, B2, B3, C1, C2, C3, D1, D2, D3 and all these states have different > frequency/voltages. > > IOW, the devices can have regulators as well and may want to fine tune within > the domain performance-state. > Understood. I would incline towards reusing regulators we that's what is changed behind the scene. Calling this operating performance point is misleading and doesn't align well with existing specs/features. >> Then put this in the hierarchy. Some thing similar to what we already >> have with new domain-idle states. In that way, we can move any >> performance control to the domain and abstract the clocks and regulators >> from the devices as the first step and from the OSPM view if there's >> firmware support. >> >> If we are looking this power-domains with performance as just some >> *advanced regulators*, I don't like the complexity added. > > In the particular case I am trying to solve (Qcom), we have some sort of > regulators which are only programmed by a M3 core. The M3 core needs integer > numbers representing state we want the domain to be in and it will put the > regulators (or whatever) in a particular state. > Understood. We have exactly same thing with SCPI but it controls both frequency and voltage referred as operating points. In general, this OPP terminology is used in SCPI/ACPI/SCMI specifications as both frequency and voltage control. I am bit worried that this binding might introduce confusions on the definitions. But it can be reworded/renamed easily if required. -- Regards, Sudeep
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-19 12:20 +0200 |
| Message-ID | <txUSm-2dE-25@gated-at.bofh.it> |
| In reply to | #1625429 |
On 18-04-17, 17:01, Sudeep Holla wrote: > No, may be I was not so clear. I am just referring a power controller > that provides say 3 different power domains and are indexed 0 - 2. > The consumer just passes the index along with the phandle for the power > domain info. Ahh, I got you now. Will take care of it in next version. -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-19 13:50 +0200 |
| Message-ID | <txWhr-2Xi-3@gated-at.bofh.it> |
| In reply to | #1625429 |
On 18-04-17, 17:01, Sudeep Holla wrote: > Understood. I would incline towards reusing regulators we that's what is It can be just a regulator, but it can be anything else as well. That entity may have its own clock/volt/current tunables, etc. > changed behind the scene. Calling this operating performance point > is misleading and doesn't align well with existing specs/features. Yeah, but there are no voltage levels available here and that doesn't fit as a regulator then. > Understood. We have exactly same thing with SCPI but it controls both > frequency and voltage referred as operating points. In general, this OPP > terminology is used in SCPI/ACPI/SCMI specifications as both frequency > and voltage control. I am bit worried that this binding might introduce > confusions on the definitions. But it can be reworded/renamed easily if > required. Yeah, so far we have been looking at OPPs as freq-voltage pairs ONLY and that is changing. I am not sure if it going in the wrong direction really. Without frequency also it is an operating point for the domain. Isn't it? -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-19 16:00 +0200 |
| Message-ID | <txYjf-46P-1@gated-at.bofh.it> |
| In reply to | #1626038 |
On 19/04/17 12:47, Viresh Kumar wrote: > On 18-04-17, 17:01, Sudeep Holla wrote: >> Understood. I would incline towards reusing regulators we that's what is > > It can be just a regulator, but it can be anything else as well. That > entity may have its own clock/volt/current tunables, etc. > Agreed. >> changed behind the scene. Calling this operating performance point >> is misleading and doesn't align well with existing specs/features. > > Yeah, but there are no voltage levels available here and that doesn't > fit as a regulator then. > We can't dismiss just based on that. We do have systems where performance index is mapped to clocks though it may not be 1:1 mapping. I am not disagreeing here, just trying to understand it better. >> Understood. We have exactly same thing with SCPI but it controls both >> frequency and voltage referred as operating points. In general, this OPP >> terminology is used in SCPI/ACPI/SCMI specifications as both frequency >> and voltage control. I am bit worried that this binding might introduce >> confusions on the definitions. But it can be reworded/renamed easily if >> required. > > Yeah, so far we have been looking at OPPs as freq-voltage pairs ONLY > and that is changing. I am not sure if it going in the wrong > direction really. Without frequency also it is an operating point for > the domain. Isn't it? > Yes, I completely agree. I am not saying the direction is wrong. I am saying it's confusing and binding needs to be more clear. On the contrary(playing devil's advocate here), we can treat all existing regulators alone as OPP then if you strip the voltages and treat it as abstract number. So if the firmware handles more than just regulators, I agree. At the same time, I would have preferred firmware to even abstract the frequency like ACPI CPPC. It would be good to get more information on what exactly that firmware handles. I am just more cautious here since we are designing generic bindings and changing generic code, we need to understand what that firmware supports and how it may evolve(so that we can maintain DT compatibility) I did a brief check and wanted to check if this is SMD/RPM regulators ? -- Regards, Sudeep
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-20 07:30 +0200 |
| Message-ID | <tycPg-4PM-1@gated-at.bofh.it> |
| In reply to | #1626129 |
On 19-04-17, 14:58, Sudeep Holla wrote: > On 19/04/17 12:47, Viresh Kumar wrote: > > On 18-04-17, 17:01, Sudeep Holla wrote: > >> Understood. I would incline towards reusing regulators we that's what is > > > > It can be just a regulator, but it can be anything else as well. That > > entity may have its own clock/volt/current tunables, etc. > > > >> changed behind the scene. Calling this operating performance point > >> is misleading and doesn't align well with existing specs/features. > > > > Yeah, but there are no voltage levels available here and that doesn't > > fit as a regulator then. > > > > We can't dismiss just based on that. We do have systems where > performance index is mapped to clocks though it may not be 1:1 mapping. > I am not disagreeing here, just trying to understand it better. @Stephen: Can you answer here please ? > >> Understood. We have exactly same thing with SCPI but it controls both > >> frequency and voltage referred as operating points. In general, this OPP > >> terminology is used in SCPI/ACPI/SCMI specifications as both frequency > >> and voltage control. I am bit worried that this binding might introduce > >> confusions on the definitions. But it can be reworded/renamed easily if > >> required. > > > > Yeah, so far we have been looking at OPPs as freq-voltage pairs ONLY > > and that is changing. I am not sure if it going in the wrong > > direction really. Without frequency also it is an operating point for > > the domain. Isn't it? > > > > Yes, I completely agree. I am not saying the direction is wrong. I am > saying it's confusing and binding needs to be more clear. What exactly isn't clear? (Yeah, there had been lots of emails and I want to know what improvements are you looking for). > On the contrary(playing devil's advocate here), we can treat all > existing regulators alone as OPP then if you strip the voltages and > treat it as abstract number. But then we are going to have lots of platform specific code which will program the actual hardware, etc. Which is all handled by the regulator framework. Also note that the regulator core selects the common voltage selected by all the children, while we want to select the highest performance point here. Even if we have to configure both clock and voltage for the power domain using standard clk/regulator frameworks, OPP will work just fine as it will do that then. So, its not that we are bypassing the regulator framework here. It will be used if we have the voltages available for the power-domain's performance states. > So if the firmware handles more than just > regulators, I agree. I don't know the internals of that really. > At the same time, I would have preferred firmware > to even abstract the frequency like ACPI CPPC. Frequency isn't required to be configured for the cases I know, but it can be in future implementations. > It would be good to get > more information on what exactly that firmware handles. @Stephen ? > I am just more cautious here since we are designing generic bindings and > changing generic code, we need to understand what that firmware supports > and how it may evolve(so that we can maintain DT compatibility) Sure, I am fine with more discussions on it :) > I did a brief check and wanted to check if this is SMD/RPM regulators ? Yes, Qcom calls the external core as Resource and Power manager (RPM). -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2017-04-20 10:30 +0200 |
| Subject | Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains |
| Message-ID | <tyfDt-6zX-25@gated-at.bofh.it> |
| In reply to | #1626990 |
Viresh, Sudeep, Sorry for jumping in late. [...] >> On the contrary(playing devil's advocate here), we can treat all >> existing regulators alone as OPP then if you strip the voltages and >> treat it as abstract number. > > But then we are going to have lots of platform specific code which > will program the actual hardware, etc. Which is all handled by the > regulator framework. Also note that the regulator core selects the > common voltage selected by all the children, while we want to select > the highest performance point here. If I understand correctly, Sudeep is not convinced that this is about PM domain regulator(s), right? To me there is no doubt, these regulators is exactly the definition of PM domain regulators. That said, long time ago we have decided PM domain regulator shall be modeled as exactly that. From DT point of view, this means the handle to the PM domain regulator belongs in the node of the PM domain controller - and not in each device's node of those belonging to the PM domain. Isn't that what this discussion really boils down to? Or maybe I am not getting it. > > Even if we have to configure both clock and voltage for the power > domain using standard clk/regulator frameworks, OPP will work just > fine as it will do that then. So, its not that we are bypassing the > regulator framework here. It will be used if we have the voltages > available for the power-domain's performance states. > >> So if the firmware handles more than just >> regulators, I agree. > > I don't know the internals of that really. > >> At the same time, I would have preferred firmware >> to even abstract the frequency like ACPI CPPC. > > Frequency isn't required to be configured for the cases I know, but it > can be in future implementations. To me using OPP tables makes sense as it gives us the flexibility that is needed. If I understand correct, that was also Kevin's point. [...] Kind regards Uffe
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-20 11:40 +0200 |
| Message-ID | <tygJb-7df-3@gated-at.bofh.it> |
| In reply to | #1627199 |
On 20-04-17, 10:23, Ulf Hansson wrote: > Viresh, Sudeep, > > Sorry for jumping in late. > > [...] > > >> On the contrary(playing devil's advocate here), we can treat all > >> existing regulators alone as OPP then if you strip the voltages and > >> treat it as abstract number. > > > > But then we are going to have lots of platform specific code which > > will program the actual hardware, etc. Which is all handled by the > > regulator framework. Also note that the regulator core selects the > > common voltage selected by all the children, while we want to select > > the highest performance point here. > > If I understand correctly, Sudeep is not convinced that this is about > PM domain regulator(s), right? > > To me there is no doubt, these regulators is exactly the definition of > PM domain regulators. > > That said, long time ago we have decided PM domain regulator shall be > modeled as exactly that. From DT point of view, this means the handle > to the PM domain regulator belongs in the node of the PM domain > controller - and not in each device's node of those belonging to the > PM domain. > > Isn't that what this discussion really boils down to? Or maybe I am > not getting it. Maybe not. I think Sudeep understands that this is about PM domain regulators only but he is asking why aren't we solving this problem using regulators framework but performance-levels instead. > > > > Even if we have to configure both clock and voltage for the power > > domain using standard clk/regulator frameworks, OPP will work just > > fine as it will do that then. So, its not that we are bypassing the > > regulator framework here. It will be used if we have the voltages > > available for the power-domain's performance states. > > > >> So if the firmware handles more than just > >> regulators, I agree. > > > > I don't know the internals of that really. > > > >> At the same time, I would have preferred firmware > >> to even abstract the frequency like ACPI CPPC. > > > > Frequency isn't required to be configured for the cases I know, but it > > can be in future implementations. > > To me using OPP tables makes sense as it gives us the flexibility that > is needed. If I understand correct, that was also Kevin's point. Right. -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-20 12:00 +0200 |
| Message-ID | <tyh2y-7kt-35@gated-at.bofh.it> |
| In reply to | #1627199 |
On 20/04/17 09:23, Ulf Hansson wrote: > Viresh, Sudeep, > > Sorry for jumping in late. > > [...] > >>> On the contrary(playing devil's advocate here), we can treat all >>> existing regulators alone as OPP then if you strip the voltages and >>> treat it as abstract number. >> >> But then we are going to have lots of platform specific code which >> will program the actual hardware, etc. Which is all handled by the >> regulator framework. Also note that the regulator core selects the >> common voltage selected by all the children, while we want to select >> the highest performance point here. > > If I understand correctly, Sudeep is not convinced that this is about > PM domain regulator(s), right? > No, I am saying that it has to be modeled as regulators or some kind of advanced regulators. I am against modeling it as some new feature and using similar terminology that are quite close to OPP/CPPC in which case it's quite hard not to misunderstand the concepts and eventually use these bindings incorrectly. > To me there is no doubt, these regulators is exactly the definition of > PM domain regulators. > +1 > That said, long time ago we have decided PM domain regulator shall be > modeled as exactly that. From DT point of view, this means the handle > to the PM domain regulator belongs in the node of the PM domain > controller - and not in each device's node of those belonging to the > PM domain. > > Isn't that what this discussion really boils down to? Or maybe I am > not getting it. > I completely agree with you on all the above points. I am against the performance state terminology. Since the regulators and OPP are already defined in the bindings, all we need to explicitly state(if not already) is that there are hierarchical. -- Regards, Sudeep
[toc] | [prev] | [next] | [standalone]
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2017-04-20 11:50 +0200 |
| Message-ID | <tygSR-7gN-1@gated-at.bofh.it> |
| In reply to | #1626990 |
On 20/04/17 06:25, Viresh Kumar wrote: > On 19-04-17, 14:58, Sudeep Holla wrote: >> On 19/04/17 12:47, Viresh Kumar wrote: >>> On 18-04-17, 17:01, Sudeep Holla wrote: [...] >> >> Yes, I completely agree. I am not saying the direction is wrong. I >> am saying it's confusing and binding needs to be more clear. > > What exactly isn't clear? (Yeah, there had been lots of emails and I > want to know what improvements are you looking for). > Just that the term performance is closely related to frequency, it needs to be explicit on what *exactly* it means. As it stands now, it can be used for OPP as I explain which controls both but as you clarify that's not what it's designed for. >> On the contrary(playing devil's advocate here), we can treat all >> existing regulators alone as OPP then if you strip the voltages >> and treat it as abstract number. > > But then we are going to have lots of platform specific code which > will program the actual hardware, etc. Which is all handled by the > regulator framework. Also note that the regulator core selects the > common voltage selected by all the children, while we want to select > the highest performance point here. > I am not sure if choosing highest performance point makes it difficult to fit it in regulator framework. It could be some configuration. Also IIUC the actual programming is done in the firmware in this case and I fail to see how that adds lot of platform code. > Even if we have to configure both clock and voltage for the power > domain using standard clk/regulator frameworks, OPP will work just > fine as it will do that then. So, its not that we are bypassing the > regulator framework here. It will be used if we have the voltages > available for the power-domain's performance states. > Yes I understand that. -- Regards, Sudeep
[toc] | [prev] | [next] | [standalone]
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2017-04-20 12:00 +0200 |
| Message-ID | <tyh2x-7kt-7@gated-at.bofh.it> |
| In reply to | #1627242 |
On 20-04-17, 10:43, Sudeep Holla wrote: > Just that the term performance is closely related to frequency, it needs > to be explicit on what *exactly* it means. As it stands now, > it can be used for OPP as I explain which controls both but as you > clarify that's not what it's designed for. We are talking about active states of a power domain here and *performance* is the best word I got. And yes we can still have frequency as a configurable here, just that current platforms don't have it. > I am not sure if choosing highest performance point makes it difficult > to fit it in regulator framework. It could be some configuration. I was just pointing out a difference :) > Also IIUC the actual programming is done in the firmware in this case > and I fail to see how that adds lot of platform code. Oh I meant that for converting general regulator only cases to OPP. No firmware was involved there. -- viresh
[toc] | [prev] | [next] | [standalone]
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2017-04-24 21:10 +0200 |
| Subject | Re: [PATCH V4 1/9] PM / OPP: Allow OPP table to be used for power-domains |
| Message-ID | <tzRwZ-2uU-13@gated-at.bofh.it> |
| In reply to | #1627252 |
Viresh Kumar <viresh.kumar@linaro.org> writes:
> On 20-04-17, 10:43, Sudeep Holla wrote:
>> Just that the term performance is closely related to frequency, it needs
>> to be explicit on what *exactly* it means. As it stands now,
>> it can be used for OPP as I explain which controls both but as you
>> clarify that's not what it's designed for.
>
> We are talking about active states of a power domain here and
> *performance* is the best word I got.
>
> And yes we can still have
> frequency as a configurable here, just that current platforms don't
> have it.
It's not that your platforms don't have frequency, it's just that it's
hidden by firmware on an M3 in your particular case.
DT is meant to model hardware, and surely what the M3 is managing is
frequency and/or voltage (IOW, an OPP).
The way I see it, the problem you're trying to solve is complicated just
because you don't know the exat freq and/or voltage because they are
hiddent behind the firware, and all you have control over is an index.
What if you drop the introduction of the new domain-performance-state
and just stick with OPPs (and phandles to them), and for cases where you
don't know the exact freq/volage pairs, just use indexes and comment
what they refer to:
operating-points = <
/*
* NOTE: actual frequency and voltages are managed by
* firmware and are hidden from HLOS, so we simply use index
* here to select the OPP
*/
1 1
2 2
3 3
>;
Since selecting the OPP is up to the power-domain driver implementation,
this should be fine, IMO.
This would mean just updating the doc to reflect the "relaxing" of these
fields to reflect indexes in cases where the exact freq/voltages are not
known.
IMO, this would be much simpler, as it avoids adding a new property and
continues to use teriminology that people are already familiar with
around OPPs.
Kevin
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web