2024-05-16 09:21:15

by Alina Yu

[permalink] [raw]
Subject: [PATCH 0/2] Add specified fixed LDO VOUT propery

Hi,

There are two types of LDO VOUT: fixed voltage mode and adjustable voltage mode.

As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
the constraints for this scenario are not suitable to represent both modes.
Therefore, A property is added to specify the fixed LDO VOUT.

Alina Yu (2):
regulator: rtq2208: Add fixed LDO VOUT property and check that matches
the constraints
regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

.../devicetree/bindings/regulator/richtek,rtq2208.yaml | 11 ++++++++++-
drivers/regulator/rtq2208-regulator.c | 11 +++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)

--
2.7.4



2024-05-16 09:21:39

by Alina Yu

[permalink] [raw]
Subject: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
the constraints for this scenario are not suitable to represent both modes.
Therefore, A property is added to specify the fixed LDO VOUT.

Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version.

Signed-off-by: Alina Yu <[email protected]>
---
.../devicetree/bindings/regulator/richtek,rtq2208.yaml | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
index 609c066..87accc6 100644
--- a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
+++ b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
@@ -75,6 +75,12 @@ properties:
description:
regulator description for ldo[1-2].

+ properties:
+ richtek,fixed-microvolt:
+ description: |
+ This property can be used to set a fixed operating voltage that lies outside
+ the range of the regulator's adjustable mode.
+
required:
- compatible
- reg
@@ -177,6 +183,8 @@ examples:
};
};
ldo1 {
+ /* Fixed LDO VOUT */
+ richtek,fixed-microvolt = <1200000>;
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-always-on;
@@ -185,7 +193,8 @@ examples:
};
};
ldo2 {
- regulator-min-microvolt = <3300000>;
+ /* Adjustable LDO VOUT */
+ regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-state-mem {
--
2.7.4


2024-05-16 12:39:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On 16/05/2024 11:20, Alina Yu wrote:
> As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
> the constraints for this scenario are not suitable to represent both modes.
> Therefore, A property is added to specify the fixed LDO VOUT.
>
> Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version.
>
> Signed-off-by: Alina Yu <[email protected]>
> ---

This is a v1 but I am pretty sure I saw it somewhere and there was
already some sort of discussion. Confused... :(

Best regards,
Krzysztof


2024-05-22 09:03:42

by Alina Yu

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On Thu, May 16, 2024 at 02:34:02PM +0200, Krzysztof Kozlowski wrote:
> On 16/05/2024 11:20, Alina Yu wrote:
> > As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
> > the constraints for this scenario are not suitable to represent both modes.
> > Therefore, A property is added to specify the fixed LDO VOUT.
> >
> > Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version.
> >
> > Signed-off-by: Alina Yu <[email protected]>
> > ---
>
> This is a v1 but I am pretty sure I saw it somewhere and there was
> already some sort of discussion. Confused... :(
>
> Best regards,
> Krzysztof
>

The discussion regarding this matter took place during v2 and v3.
Due to the fixed LDO VOUT being outside the range of the adjustable one,
a special-use property has been added to avoid overusing the constraints.


Thanks,
Alina

2024-05-22 09:27:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On 22/05/2024 11:03, Alina Yu wrote:
> On Thu, May 16, 2024 at 02:34:02PM +0200, Krzysztof Kozlowski wrote:
>> On 16/05/2024 11:20, Alina Yu wrote:
>>> As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
>>> the constraints for this scenario are not suitable to represent both modes.
>>> Therefore, A property is added to specify the fixed LDO VOUT.
>>>
>>> Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version.
>>>
>>> Signed-off-by: Alina Yu <[email protected]>
>>> ---
>>
>> This is a v1 but I am pretty sure I saw it somewhere and there was
>> already some sort of discussion. Confused... :(
>>
>> Best regards,
>> Krzysztof
>>
>
> The discussion regarding this matter took place during v2 and v3.

So in the future?

> Due to the fixed LDO VOUT being outside the range of the adjustable one,
> a special-use property has been added to avoid overusing the constraints.

Hm, why exactly this is not a bool property? What are the benefits?

Best regards,
Krzysztof


2024-05-22 09:45:59

by Alina Yu

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On Wed, May 22, 2024 at 11:27:06AM +0200, Krzysztof Kozlowski wrote:
> On 22/05/2024 11:03, Alina Yu wrote:
> > On Thu, May 16, 2024 at 02:34:02PM +0200, Krzysztof Kozlowski wrote:
> >> On 16/05/2024 11:20, Alina Yu wrote:
> >>> As the fixed voltage for the LDO is outside the range of the adjustable voltage mode,
> >>> the constraints for this scenario are not suitable to represent both modes.
> >>> Therefore, A property is added to specify the fixed LDO VOUT.
> >>>
> >>> Examples of fixed LDO VOUT and adjustable LDO VOUT is also added to this version.
> >>>
> >>> Signed-off-by: Alina Yu <[email protected]>
> >>> ---
> >>
> >> This is a v1 but I am pretty sure I saw it somewhere and there was
> >> already some sort of discussion. Confused... :(
> >>
> >> Best regards,
> >> Krzysztof
> >>
> >
> > The discussion regarding this matter took place during v2 and v3.
>
> So in the future?

Based on the previous discussion, it is scheduled to be included in the linux-next tree.
Will we start a further discussions on this topic?

>
> > Due to the fixed LDO VOUT being outside the range of the adjustable one,
> > a special-use property has been added to avoid overusing the constraints.
>
> Hm, why exactly this is not a bool property? What are the benefits?
>
> Best regards,
> Krzysztof
>

As only the user will know the exact fixed voltage,
the property is defined as a u32 to allow user customization and decision-making.


Thanks,
Alina

2024-05-22 11:36:03

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On Wed, May 22, 2024 at 11:27:06AM +0200, Krzysztof Kozlowski wrote:
> On 22/05/2024 11:03, Alina Yu wrote:

> > Due to the fixed LDO VOUT being outside the range of the adjustable one,
> > a special-use property has been added to avoid overusing the constraints.

> Hm, why exactly this is not a bool property? What are the benefits?

It avoids confusion between invalid constraints specified on the
variable voltage regulator and allows us to validate any constraints
that happen to be specified (though it'd be pointless to specify
constraints). The fact that the regulator could also be variable
voltage is asking for confusion if we use boolean.


Attachments:
(No filename) (665.00 B)
signature.asc (499.00 B)
Download all attachments

2024-05-22 13:29:57

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/2] regulator: dt-bindings: rtq2208: Add specified fixed LDO VOUT property

On 22/05/2024 13:35, Mark Brown wrote:
> On Wed, May 22, 2024 at 11:27:06AM +0200, Krzysztof Kozlowski wrote:
>> On 22/05/2024 11:03, Alina Yu wrote:
>
>>> Due to the fixed LDO VOUT being outside the range of the adjustable one,
>>> a special-use property has been added to avoid overusing the constraints.
>
>> Hm, why exactly this is not a bool property? What are the benefits?
>
> It avoids confusion between invalid constraints specified on the
> variable voltage regulator and allows us to validate any constraints
> that happen to be specified (though it'd be pointless to specify
> constraints). The fact that the regulator could also be variable
> voltage is asking for confusion if we use boolean.


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof