Re: [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM
From: H. Nikolaus Schaller
Date: Tue Nov 24 2026 - 09:50:19 EST
Hi Krzysztof,
> Am 24.11.2026 um 15:40 schrieb Krzysztof Kozlowski <krzk@xxxxxxxxxx>:
>
> On Tue, Nov 24, 2026 at 08:25:48AM +0100, H. Nikolaus Schaller wrote:
>> Document the optional ti,twl4030-pwm-frame-64 property for the
>> TWL4030 PWM controller. It selects the 64-clock-cycle frame instead
>> of the default 128-cycle frame, doubling the output frequency and
>> reducing duty-cycle resolution.
>>
>> The selection is explicit because the driver does not know the PWM
>> input clock rate and cannot derive the hardware frame length from a
>> consumer-requested period. The shorter frame can reduce PWM LOW
>> intervals during startup mode detection of LED drivers such as the
>> TI TPS61160/61.
>>
>> Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
>> ---
>>
>> Notes:
>> Changes against V1:
>> - Revised commit message to focus on the binding and the reason
>> for explicit 64-cycle frame selection.
>> - Commit-message review assisted by ChatGPT.
>>
>> Documentation/devicetree/bindings/mfd/ti,twl.yaml | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> index 9cc3e4721612e..f458f0d80f2cd 100644
>> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> @@ -396,6 +396,15 @@ properties:
>> '#pwm-cells':
>> const: 2
>>
>> + ti,twl4030-pwm-frame-64:
>
> Drop twl4030. Properties are not model specific, but should be re-usable
> among all of devices from that vendor (when applicable).
Ok.
>
>> + type: boolean
>> + description:
>> + TWL4030 only; not supported by TWL6030 PWM.
>
> Don't repeat constraints in free form text. Implement proper dt-schema
> for this.
Ok.
>
>> + Select the short 64-clock-cycle PWM frame instead of the
>> + default 128-cycle frame, doubling the PWM frequency. Required
>> + for dimming inputs requiring short PWM low intervals during
>> + startup mode detection (e.g. TI TPS61160/61).
>
> I don't get how TPS is related here, but if you mention other specific
> device then I wonder - why isn't this deducible from the compatible? Or
> you mean that PWM consumers might need it, depending on the consumer?
The TPS61160 is an LED boost driver used for the panel backlight of
the OpenPandora.
Besides being capable of PWM for the backlight intensity the TPS also
can undestand some 1-wire data protocol. It switches to that mode if
the common PWM/1-wire input follows a specific timing sequence.
Since we can't reprogram the PWM output connected in the OpenPandora
to speak this protocol, we have to make sure that the TPS chip never
enters this mode accidentially.
This feature is part of it.
And since the TPS is not described in the device tree and can not have
its own driver (because there is PWM and not the protocol) there is no
compatible to base this on.
Yes, I agree in combination with the comments from Mark that we should
split the series and better describe this background.
>
> But isn't this then dynamic choice - depending on PWM frequency the
> consumer wants?
>
> Best regards,
> Krzysztof
I'll collect feedbacks over some days and come up with multiple
series as suggested by Mark.
BR and thanks,
Nikolaus