diff mbox series

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

Message ID 9c1bbe4b38a4ee5650d888478f1ce2cec2733669.1715846612.git.alina_yu@richtek.com
State Changes Requested
Headers show
Series Add specified fixed LDO VOUT propery | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 29 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Alina Yu May 16, 2024, 9:20 a.m. UTC
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 <alina_yu@richtek.com>
---
 .../devicetree/bindings/regulator/richtek,rtq2208.yaml        | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski May 16, 2024, 12:34 p.m. UTC | #1
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 <alina_yu@richtek.com>
> ---

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
Alina Yu May 22, 2024, 9:03 a.m. UTC | #2
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 <alina_yu@richtek.com>
> > ---
> 
> 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
Krzysztof Kozlowski May 22, 2024, 9:27 a.m. UTC | #3
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 <alina_yu@richtek.com>
>>> ---
>>
>> 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
Alina Yu May 22, 2024, 9:45 a.m. UTC | #4
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 <alina_yu@richtek.com>
> >>> ---
> >>
> >> 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
Mark Brown May 22, 2024, 11:35 a.m. UTC | #5
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.
Krzysztof Kozlowski May 22, 2024, 1:29 p.m. UTC | #6
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 <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
diff mbox series

Patch

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 {