2022-02-22 14:14:05

by Lukasz Luba

[permalink] [raw]
Subject: [[PATCH v2 1/2] dt-bindings: opp: Add 'opp-microwatt' entry in the OPP

Add new entry for the OPP which provides information about power
expressed in micro-Watts. It is useful for the Energy Model framework.

Signed-off-by: Lukasz Luba <[email protected]>
---
Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
index 15a76bcd6d42..3f07a279ed2a 100644
--- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
+++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
@@ -93,6 +93,13 @@ patternProperties:
minItems: 1
maxItems: 8 # Should be enough regulators

+ opp-microwatt:
+ description:
+ Power for the OPP
+
+ A value representing power for the OPP in micro-Watts.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
opp-level:
description:
A value representing the performance level of the device.
--
2.17.1


2022-02-23 11:53:50

by Lukasz Luba

[permalink] [raw]
Subject: Re: [[PATCH v2 1/2] dt-bindings: opp: Add 'opp-microwatt' entry in the OPP



On 2/23/22 05:50, Viresh Kumar wrote:
> On 22-02-22, 14:07, Lukasz Luba wrote:
>> Add new entry for the OPP which provides information about power
>> expressed in micro-Watts. It is useful for the Energy Model framework.
>>
>> Signed-off-by: Lukasz Luba <[email protected]>
>> ---
>> Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
>> index 15a76bcd6d42..3f07a279ed2a 100644
>> --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
>> +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
>> @@ -93,6 +93,13 @@ patternProperties:
>> minItems: 1
>> maxItems: 8 # Should be enough regulators
>>
>> + opp-microwatt:
>> + description:
>> + Power for the OPP
>> +
>> + A value representing power for the OPP in micro-Watts.
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>
> I was expecting a much larger change here. Look at how opp-microvolt and
> opp-microamp is defined in this file.
>
> Should this value be made per-supply/regulator, just like voltage/current ?
>

For the EM we need only one value. If there would be some other users
of this field in future we might add the multiple power values support.
Currently there is no need I would say, unless it's a hard requirement
to be aligned with opp-microvolt.

2022-02-23 14:17:04

by Viresh Kumar

[permalink] [raw]
Subject: Re: [[PATCH v2 1/2] dt-bindings: opp: Add 'opp-microwatt' entry in the OPP

On 23-02-22, 08:39, Lukasz Luba wrote:
> For the EM we need only one value. If there would be some other users
> of this field in future we might add the multiple power values support.
> Currently there is no need I would say, unless it's a hard requirement
> to be aligned with opp-microvolt.

This isn't really up to what the software wants to do (to some level yes it is).
The DT describes the hardware and should do so in an unambiguous way and it
shouldn't be required to update the bindings again and again. It should be done
just once, and in the right way possible.

If the power is actually per-regulator, then it should be present in that form.
The EM can just sum the up later on.

--
viresh

2022-02-23 18:13:12

by Viresh Kumar

[permalink] [raw]
Subject: Re: [[PATCH v2 1/2] dt-bindings: opp: Add 'opp-microwatt' entry in the OPP

On 22-02-22, 14:07, Lukasz Luba wrote:
> Add new entry for the OPP which provides information about power
> expressed in micro-Watts. It is useful for the Energy Model framework.
>
> Signed-off-by: Lukasz Luba <[email protected]>
> ---
> Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> index 15a76bcd6d42..3f07a279ed2a 100644
> --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> @@ -93,6 +93,13 @@ patternProperties:
> minItems: 1
> maxItems: 8 # Should be enough regulators
>
> + opp-microwatt:
> + description:
> + Power for the OPP
> +
> + A value representing power for the OPP in micro-Watts.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +

I was expecting a much larger change here. Look at how opp-microvolt and
opp-microamp is defined in this file.

Should this value be made per-supply/regulator, just like voltage/current ?

> opp-level:
> description:
> A value representing the performance level of the device.

--
viresh