Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Binding for Qualcomm Technologies, Inc. WLED driver
0008 
0009 maintainers:
0010   - Bjorn Andersson <bjorn.andersson@linaro.org>
0011   - Kiran Gunda <kgunda@codeaurora.org>
0012 
0013 description: |
0014   WLED (White Light Emitting Diode) driver is used for controlling display
0015   backlight that is part of PMIC on Qualcomm Technologies, Inc. reference
0016   platforms. The PMIC is connected to the host processor via SPMI bus.
0017 
0018 properties:
0019   compatible:
0020     enum:
0021       - qcom,pm8941-wled
0022       - qcom,pmi8994-wled
0023       - qcom,pmi8998-wled
0024       - qcom,pm660l-wled
0025       - qcom,pm6150l-wled
0026       - qcom,pm8150l-wled
0027 
0028   reg:
0029     maxItems: 1
0030 
0031   default-brightness:
0032     description: |
0033       brightness value on boot.
0034 
0035   label: true
0036 
0037   max-brightness:
0038     description: |
0039       Maximum brightness level.
0040 
0041   qcom,cs-out:
0042     description: |
0043       enable current sink output.
0044       This property is supported only for WLED3.
0045     type: boolean
0046 
0047   qcom,cabc:
0048     description: |
0049       enable content adaptive backlight control.
0050     type: boolean
0051 
0052   qcom,ext-gen:
0053     description: |
0054       use externally generated modulator signal to dim.
0055       This property is supported only for WLED3.
0056     type: boolean
0057 
0058   qcom,current-limit:
0059     description: |
0060       mA; per-string current limit.
0061       This property is supported only for WLED3.
0062     $ref: /schemas/types.yaml#/definitions/uint32
0063     default: 20
0064     minimum: 0
0065     maximum: 25
0066 
0067   qcom,current-limit-microamp:
0068     description: |
0069       uA; per-string current limit.
0070     default: 25
0071     minimum: 0
0072     maximum: 30000
0073     multipleOf: 25
0074 
0075   qcom,current-boost-limit:
0076     description: |
0077       mA; boost current limit.
0078     $ref: /schemas/types.yaml#/definitions/uint32
0079 
0080   qcom,switching-freq:
0081     description: |
0082       kHz; switching frequency.
0083     $ref: /schemas/types.yaml#/definitions/uint32
0084     enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920,
0085             2400, 3200, 4800, 9600 ]
0086 
0087   qcom,ovp:
0088     description: |
0089       V; Over-voltage protection limit.
0090       This property is supported only for WLED3.
0091     $ref: /schemas/types.yaml#/definitions/uint32
0092     enum: [ 27, 29, 32, 35 ]
0093     default: 29
0094 
0095   qcom,ovp-millivolt:
0096     description: |
0097       Over-voltage protection limit. This property is for WLED4 only.
0098     $ref: /schemas/types.yaml#/definitions/uint32
0099     enum: [ 18100, 19600, 29600, 31100 ]
0100     default: 29600
0101 
0102   qcom,num-strings:
0103     description: |
0104       number of led strings attached.
0105     $ref: /schemas/types.yaml#/definitions/uint32
0106 
0107   qcom,enabled-strings:
0108     description: |
0109       Array of the WLED strings numbered from 0 to 3. Each
0110       string of leds are operated individually. Specify the
0111       list of strings used by the device. Any combination of
0112       led strings can be used.
0113     $ref: /schemas/types.yaml#/definitions/uint32-array
0114     minItems: 1
0115     maxItems: 4
0116 
0117   qcom,external-pfet:
0118     description: |
0119       Specify if external PFET control for short circuit
0120       protection is used. This property is supported only
0121       for WLED4.
0122     type: boolean
0123 
0124   qcom,auto-string-detection:
0125     description: |
0126       Enables auto-detection of the WLED string configuration.
0127       This feature is not supported for WLED3.
0128     type: boolean
0129 
0130   interrupts:
0131     minItems: 1
0132     items:
0133       - description: over voltage protection interrupt.
0134       - description: short circuit interrupt.
0135 
0136   interrupt-names:
0137     minItems: 1
0138     items:
0139       - const: ovp
0140       - const: short
0141 
0142   qcom,modulator-sel:
0143     description: |
0144       Selects the modulator used for brightness modulation.
0145       Allowed values are,
0146            0 - Modulator A
0147            1 - Modulator B
0148       This property is applicable only to WLED5 peripheral.
0149     $ref: /schemas/types.yaml#/definitions/uint32
0150     enum: [ 0, 1 ]
0151     default: 0
0152 
0153   qcom,cabc-sel:
0154     description: |
0155       Selects the CABC pin signal used for brightness modulation.
0156       Allowed values are,
0157            0 - CABC disabled
0158            1 - CABC 1
0159            2 - CABC 2
0160            3 - External signal (e.g. LPG) is used for dimming
0161       This property is applicable only to WLED5 peripheral.
0162     $ref: /schemas/types.yaml#/definitions/uint32
0163     enum: [ 0, 1, 2, 3 ]
0164 
0165 allOf:
0166   - if:
0167       properties:
0168         compatible:
0169           contains:
0170             const: qcom,pm8941-wled
0171 
0172     then:
0173       properties:
0174         qcom,current-boost-limit:
0175           enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ]
0176           default: 805
0177 
0178         qcom,switching-freq:
0179           default: 1600
0180 
0181         qcom,num-strings:
0182           enum: [ 1, 2, 3 ]
0183 
0184         interrupts:
0185           maxItems: 1
0186 
0187         interrupt-names:
0188           maxItems: 1
0189 
0190     else:
0191       properties:
0192         qcom,current-boost-limit:
0193           enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ]
0194           default: 970
0195 
0196         qcom,switching-freq:
0197           default: 800
0198 
0199         qcom,num-strings:
0200           enum: [ 1, 2, 3, 4 ]
0201 
0202         interrupts:
0203           minItems: 2
0204 
0205         interrupt-names:
0206           minItems: 2
0207   - if:
0208       properties:
0209         compatible:
0210           contains:
0211             enum:
0212               - qcom,pm8150l-wled
0213 
0214     then:
0215       properties:
0216         default-brightness:
0217           minimum: 0
0218           maximum: 32767
0219 
0220         max-brightness:
0221           minimum: 0
0222           maximum: 32767
0223 
0224     else:
0225       properties:
0226         default-brightness:
0227           minimum: 0
0228           maximum: 4095
0229 
0230         max-brightness:
0231           minimum: 0
0232           maximum: 4095
0233 
0234 required:
0235   - compatible
0236   - reg
0237   - label
0238 
0239 additionalProperties: false
0240 
0241 examples:
0242   - |
0243     backlight@d800 {
0244         compatible = "qcom,pm8941-wled";
0245         reg = <0xd800 0x100>;
0246         label = "backlight";
0247 
0248         qcom,cs-out;
0249         qcom,current-limit = <20>;
0250         qcom,current-boost-limit = <805>;
0251         qcom,switching-freq = <1600>;
0252         qcom,ovp = <29>;
0253         qcom,num-strings = <2>;
0254         qcom,enabled-strings = <0 1>;
0255      };