Document ovp values supported by wled found in PMI8950.
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
.../bindings/leds/backlight/qcom-wled.yaml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
index a8490781011d..306fb6642617 100644
--- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
@@ -98,8 +98,6 @@ properties:
description: |
Over-voltage protection limit. This property is for WLED4 only.
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [ 18100, 19600, 29600, 31100 ]
- default: 29600
qcom,num-strings:
description: |
@@ -239,6 +237,24 @@ allOf:
minimum: 0
maximum: 4095
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,pmi8950-wled
+
+ then:
+ properties:
+ qcom,ovp-millivolt:
+ enum: [ 17800, 19400, 29500, 31000 ]
+ default: 29500
+
+ else:
+ properties:
+ qcom,ovp-millivolt:
+ enum: [ 18100, 19600, 29600, 31100 ]
+ default: 29600
+
required:
- compatible
- reg
--
2.52.0
On 07/01/2026 14:31, Barnabás Czémán wrote: > Document ovp values supported by wled found in PMI8950. > > Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org> > --- > .../bindings/leds/backlight/qcom-wled.yaml | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml > index a8490781011d..306fb6642617 100644 > --- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml > +++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml > @@ -98,8 +98,6 @@ properties: > description: | > Over-voltage protection limit. This property is for WLED4 only. > $ref: /schemas/types.yaml#/definitions/uint32 > - enum: [ 18100, 19600, 29600, 31100 ] minimum and maximum should stay here. Or alternatively enum with all the values, but I think first options is enough. Best regards, Krzysztof
On 1/7/26 2:31 PM, Barnabás Czémán wrote:
> Document ovp values supported by wled found in PMI8950.
>
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
> .../bindings/leds/backlight/qcom-wled.yaml | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> index a8490781011d..306fb6642617 100644
> --- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> +++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
> @@ -98,8 +98,6 @@ properties:
> description: |
> Over-voltage protection limit. This property is for WLED4 only.
> $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [ 18100, 19600, 29600, 31100 ]
> - default: 29600
>
> qcom,num-strings:
> description: |
> @@ -239,6 +237,24 @@ allOf:
> minimum: 0
> maximum: 4095
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: qcom,pmi8950-wled
> +
> + then:
> + properties:
> + qcom,ovp-millivolt:
> + enum: [ 17800, 19400, 29500, 31000 ]
> + default: 29500
> +
> + else:
> + properties:
> + qcom,ovp-millivolt:
> + enum: [ 18100, 19600, 29600, 31100 ]
> + default: 29600
Out of the supported ones:
{ .compatible = "qcom,pmi8950-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8994-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8998-wled", .data = (void *)4 },
{ .compatible = "qcom,pm660l-wled", .data = (void *)4 },
I can confirm both allowed and default values for PMI8950/98/PM660L
I could not find any data for PMI8994 (or PMI8996, the essentially
PMI8994-revbump), but it's very probable that 8950 is an oddball,
so:
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
On 2026-01-07 15:03, Konrad Dybcio wrote:
> On 1/7/26 2:31 PM, Barnabás Czémán wrote:
>> Document ovp values supported by wled found in PMI8950.
>>
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>> .../bindings/leds/backlight/qcom-wled.yaml | 20
>> ++++++++++++++++++--
>> 1 file changed, 18 insertions(+), 2 deletions(-)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> index a8490781011d..306fb6642617 100644
>> --- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> +++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
>> @@ -98,8 +98,6 @@ properties:
>> description: |
>> Over-voltage protection limit. This property is for WLED4 only.
>> $ref: /schemas/types.yaml#/definitions/uint32
>> - enum: [ 18100, 19600, 29600, 31100 ]
>> - default: 29600
>>
>> qcom,num-strings:
>> description: |
>> @@ -239,6 +237,24 @@ allOf:
>> minimum: 0
>> maximum: 4095
>>
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: qcom,pmi8950-wled
>> +
>> + then:
>> + properties:
>> + qcom,ovp-millivolt:
>> + enum: [ 17800, 19400, 29500, 31000 ]
>> + default: 29500
>> +
>> + else:
>> + properties:
>> + qcom,ovp-millivolt:
>> + enum: [ 18100, 19600, 29600, 31100 ]
>> + default: 29600
>
> Out of the supported ones:
>
> { .compatible = "qcom,pmi8950-wled", .data = (void *)4 },
> { .compatible = "qcom,pmi8994-wled", .data = (void *)4 },
> { .compatible = "qcom,pmi8998-wled", .data = (void *)4 },
> { .compatible = "qcom,pm660l-wled", .data = (void *)4 },
>
> I can confirm both allowed and default values for PMI8950/98/PM660L
>
> I could not find any data for PMI8994 (or PMI8996, the essentially
> PMI8994-revbump), but it's very probable that 8950 is an oddball,
This commits add support for pmi8998 and documentation is telling which
PMIC supports which values:
https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/commit/7a1b6d0276828f270180db40935bb034a3470865
TLDR:
- qcom,ovp-mv : Over voltage protection threshold in mV. Default is
29500. Supported values are:
- 31000, 29500, 19400, 17800 for pmi8994/8952/8996. (As far as i
know 8952=8950)
- 31100, 29600, 19600, 18100 for pmicobalt/pm2falcon
(pmi8998/pm660l)
> so:
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
© 2016 - 2026 Red Hat, Inc.