diff mbox series

[2/3] dt-bindings: backlight: lm3630a: add entries to control boost frequency

Message ID 20230602-lm3630a_boost_frequency-v1-2-076472036d1a@mweigand.net (mailing list archive)
State New, archived
Headers show
Series backlight: lm3630a: add functionality to change boost converter frequency | expand

Commit Message

Maximilian Weigand June 14, 2023, 7:08 p.m. UTC
From: Maximilian Weigand <mweigand@mweigand.net>

Add 'ti,boost_use_1mhz' to switch between 500 kHz and 1 MHz boost
converter switching frequency, and add 'ti,boost_frequency_shift' to
activate a frequency shift to 560 kHz or 1.12 MHz, respectively.

Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
---
 .../bindings/leds/backlight/lm3630a-backlight.yaml           | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Krzysztof Kozlowski June 17, 2023, 10:12 a.m. UTC | #1
On 14/06/2023 21:08, Maximilian Weigand wrote:
> From: Maximilian Weigand <mweigand@mweigand.net>
> 
> Add 'ti,boost_use_1mhz' to switch between 500 kHz and 1 MHz boost
> converter switching frequency, and add 'ti,boost_frequency_shift' to
> activate a frequency shift to 560 kHz or 1.12 MHz, respectively.
> 
> Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
> ---
>  .../bindings/leds/backlight/lm3630a-backlight.yaml           | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> index 3c9b4054ed9a..ef7ea0ad2d25 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> @@ -33,6 +33,18 @@ properties:
>      description: GPIO to use to enable/disable the backlight (HWEN pin).
>      maxItems: 1
>  
> +  ti,boost_use_1mhz:

No underscores in property names.

> +    description: |

Do not need '|' unless you need to preserve formatting.

> +      If present, change the boost converter switching frequency from the
> +      default 500 kHz to 1 MHz. Refer to data sheet for hardware requirements.
> +    type: boolean
> +
> +  ti,boost_frequency_shift:
> +    description: |
> +      If present, change boost converter switching frequency from 500 kHz to
> +      560 kHz or from 1 Mhz to 1.12 Mhz, respectively.

So just make it a property choosing the frequency, not bools, with
proper unit suffix.


Best regards,
Krzysztof
Heiko Stübner June 17, 2023, 4:34 p.m. UTC | #2
Am Samstag, 17. Juni 2023, 12:12:17 CEST schrieb Krzysztof Kozlowski:
> On 14/06/2023 21:08, Maximilian Weigand wrote:
> > From: Maximilian Weigand <mweigand@mweigand.net>
> > 
> > Add 'ti,boost_use_1mhz' to switch between 500 kHz and 1 MHz boost
> > converter switching frequency, and add 'ti,boost_frequency_shift' to
> > activate a frequency shift to 560 kHz or 1.12 MHz, respectively.
> > 
> > Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
> > ---
> >  .../bindings/leds/backlight/lm3630a-backlight.yaml           | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> > index 3c9b4054ed9a..ef7ea0ad2d25 100644
> > --- a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> > +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
> > @@ -33,6 +33,18 @@ properties:
> >      description: GPIO to use to enable/disable the backlight (HWEN pin).
> >      maxItems: 1
> >  
> > +  ti,boost_use_1mhz:
> 
> No underscores in property names.
> 
> > +    description: |
> 
> Do not need '|' unless you need to preserve formatting.
> 
> > +      If present, change the boost converter switching frequency from the
> > +      default 500 kHz to 1 MHz. Refer to data sheet for hardware requirements.
> > +    type: boolean
> > +
> > +  ti,boost_frequency_shift:
> > +    description: |
> > +      If present, change boost converter switching frequency from 500 kHz to
> > +      560 kHz or from 1 Mhz to 1.12 Mhz, respectively.
> 
> So just make it a property choosing the frequency, not bools, with
> proper unit suffix.

i.e.
ti,boost-frequency-hz = <x>;
with x being 500000, 560000, 1000000, 1120000

with the driver failing when the frequency is not achievable
with the two knobs of 1mhz and shift.
Krzysztof Kozlowski June 17, 2023, 5:42 p.m. UTC | #3
On 17/06/2023 18:34, Heiko Stübner wrote:
> Am Samstag, 17. Juni 2023, 12:12:17 CEST schrieb Krzysztof Kozlowski:
>> On 14/06/2023 21:08, Maximilian Weigand wrote:
>>> From: Maximilian Weigand <mweigand@mweigand.net>
>>>
>>> Add 'ti,boost_use_1mhz' to switch between 500 kHz and 1 MHz boost
>>> converter switching frequency, and add 'ti,boost_frequency_shift' to
>>> activate a frequency shift to 560 kHz or 1.12 MHz, respectively.
>>>
>>> Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
>>> ---
>>>  .../bindings/leds/backlight/lm3630a-backlight.yaml           | 12 ++++++++++++
>>>  1 file changed, 12 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>> index 3c9b4054ed9a..ef7ea0ad2d25 100644
>>> --- a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>> +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>> @@ -33,6 +33,18 @@ properties:
>>>      description: GPIO to use to enable/disable the backlight (HWEN pin).
>>>      maxItems: 1
>>>  
>>> +  ti,boost_use_1mhz:
>>
>> No underscores in property names.
>>
>>> +    description: |
>>
>> Do not need '|' unless you need to preserve formatting.
>>
>>> +      If present, change the boost converter switching frequency from the
>>> +      default 500 kHz to 1 MHz. Refer to data sheet for hardware requirements.
>>> +    type: boolean
>>> +
>>> +  ti,boost_frequency_shift:
>>> +    description: |
>>> +      If present, change boost converter switching frequency from 500 kHz to
>>> +      560 kHz or from 1 Mhz to 1.12 Mhz, respectively.
>>
>> So just make it a property choosing the frequency, not bools, with
>> proper unit suffix.
> 
> i.e.
> ti,boost-frequency-hz = <x>;
> with x being 500000, 560000, 1000000, 1120000
> 
> with the driver failing when the frequency is not achievable
> with the two knobs of 1mhz and shift.

Yeah, with a default value (500000, I guess).

Best regards,
Krzysztof
Maximilian Weigand June 17, 2023, 6:15 p.m. UTC | #4
Hi,

On 17.06.23 19:42, Krzysztof Kozlowski wrote:
> On 17/06/2023 18:34, Heiko Stübner wrote:
>> Am Samstag, 17. Juni 2023, 12:12:17 CEST schrieb Krzysztof Kozlowski:
>>> On 14/06/2023 21:08, Maximilian Weigand wrote:
>>>> From: Maximilian Weigand <mweigand@mweigand.net>
>>>>
>>>> Add 'ti,boost_use_1mhz' to switch between 500 kHz and 1 MHz boost
>>>> converter switching frequency, and add 'ti,boost_frequency_shift' to
>>>> activate a frequency shift to 560 kHz or 1.12 MHz, respectively.
>>>>
>>>> Signed-off-by: Maximilian Weigand <mweigand@mweigand.net>
>>>> ---
>>>>  .../bindings/leds/backlight/lm3630a-backlight.yaml           | 12 ++++++++++++
>>>>  1 file changed, 12 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>>> index 3c9b4054ed9a..ef7ea0ad2d25 100644
>>>> --- a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>>> +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
>>>> @@ -33,6 +33,18 @@ properties:
>>>>      description: GPIO to use to enable/disable the backlight (HWEN pin).
>>>>      maxItems: 1
>>>>  
>>>> +  ti,boost_use_1mhz:
>>>
>>> No underscores in property names.
>>>
>>>> +    description: |
>>>
>>> Do not need '|' unless you need to preserve formatting.
>>>
>>>> +      If present, change the boost converter switching frequency from the
>>>> +      default 500 kHz to 1 MHz. Refer to data sheet for hardware requirements.
>>>> +    type: boolean
>>>> +
>>>> +  ti,boost_frequency_shift:
>>>> +    description: |
>>>> +      If present, change boost converter switching frequency from 500 kHz to
>>>> +      560 kHz or from 1 Mhz to 1.12 Mhz, respectively.
>>>
>>> So just make it a property choosing the frequency, not bools, with
>>> proper unit suffix.
>>
>> i.e.
>> ti,boost-frequency-hz = <x>;
>> with x being 500000, 560000, 1000000, 1120000
>>
>> with the driver failing when the frequency is not achievable
>> with the two knobs of 1mhz and shift.
> 
> Yeah, with a default value (500000, I guess).

Thanks for the feedback, this is quite obviously the better solution! I
will rework the submission accordingly.

Best regards

Maximilian
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
index 3c9b4054ed9a..ef7ea0ad2d25 100644
--- a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml
@@ -33,6 +33,18 @@  properties:
     description: GPIO to use to enable/disable the backlight (HWEN pin).
     maxItems: 1
 
+  ti,boost_use_1mhz:
+    description: |
+      If present, change the boost converter switching frequency from the
+      default 500 kHz to 1 MHz. Refer to data sheet for hardware requirements.
+    type: boolean
+
+  ti,boost_frequency_shift:
+    description: |
+      If present, change boost converter switching frequency from 500 kHz to
+      560 kHz or from 1 Mhz to 1.12 Mhz, respectively.
+    type: boolean
+
 required:
   - compatible
   - reg