264 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Qualcomm Technologies, Inc. WLED driver8 9maintainers:10 - Bjorn Andersson <andersson@kernel.org>11 - Kiran Gunda <quic_kgunda@quicinc.com>12 13description: |14 WLED (White Light Emitting Diode) driver is used for controlling display15 backlight that is part of PMIC on Qualcomm Technologies, Inc. reference16 platforms. The PMIC is connected to the host processor via SPMI bus.17 18properties:19 compatible:20 enum:21 - qcom,pm8941-wled22 - qcom,pmi8950-wled23 - qcom,pmi8994-wled24 - qcom,pmi8998-wled25 - qcom,pm660l-wled26 - qcom,pm6150l-wled27 - qcom,pm8150l-wled28 29 reg:30 minItems: 131 maxItems: 232 33 default-brightness:34 description: |35 brightness value on boot.36 37 label: true38 39 max-brightness:40 description: |41 Maximum brightness level.42 43 qcom,cs-out:44 description: |45 enable current sink output.46 This property is supported only for WLED3.47 type: boolean48 49 qcom,cabc:50 description: |51 enable content adaptive backlight control.52 type: boolean53 54 qcom,ext-gen:55 description: |56 use externally generated modulator signal to dim.57 This property is supported only for WLED3.58 type: boolean59 60 qcom,current-limit:61 description: |62 mA; per-string current limit.63 This property is supported only for WLED3.64 $ref: /schemas/types.yaml#/definitions/uint3265 default: 2066 minimum: 067 maximum: 2568 69 qcom,current-limit-microamp:70 description: |71 uA; per-string current limit.72 default: 2573 minimum: 074 maximum: 3000075 multipleOf: 2576 77 qcom,current-boost-limit:78 description: |79 mA; boost current limit.80 $ref: /schemas/types.yaml#/definitions/uint3281 82 qcom,switching-freq:83 description: |84 kHz; switching frequency.85 $ref: /schemas/types.yaml#/definitions/uint3286 enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920,87 2400, 3200, 4800, 9600 ]88 89 qcom,ovp:90 description: |91 V; Over-voltage protection limit.92 This property is supported only for WLED3.93 $ref: /schemas/types.yaml#/definitions/uint3294 enum: [ 27, 29, 32, 35 ]95 default: 2996 97 qcom,ovp-millivolt:98 description: |99 Over-voltage protection limit. This property is for WLED4 only.100 $ref: /schemas/types.yaml#/definitions/uint32101 enum: [ 18100, 19600, 29600, 31100 ]102 default: 29600103 104 qcom,num-strings:105 description: |106 number of led strings attached.107 $ref: /schemas/types.yaml#/definitions/uint32108 109 qcom,enabled-strings:110 description: |111 Array of the WLED strings numbered from 0 to 3. Each112 string of leds are operated individually. Specify the113 list of strings used by the device. Any combination of114 led strings can be used.115 $ref: /schemas/types.yaml#/definitions/uint32-array116 minItems: 1117 maxItems: 4118 119 qcom,external-pfet:120 description: |121 Specify if external PFET control for short circuit122 protection is used. This property is supported only123 for WLED4.124 type: boolean125 126 qcom,auto-string-detection:127 description: |128 Enables auto-detection of the WLED string configuration.129 This feature is not supported for WLED3.130 type: boolean131 132 interrupts:133 minItems: 1134 items:135 - description: over voltage protection interrupt.136 - description: short circuit interrupt.137 138 interrupt-names:139 minItems: 1140 items:141 - const: ovp142 - const: short143 144 qcom,modulator-sel:145 description: |146 Selects the modulator used for brightness modulation.147 Allowed values are,148 0 - Modulator A149 1 - Modulator B150 This property is applicable only to WLED5 peripheral.151 $ref: /schemas/types.yaml#/definitions/uint32152 enum: [ 0, 1 ]153 default: 0154 155 qcom,cabc-sel:156 description: |157 Selects the CABC pin signal used for brightness modulation.158 Allowed values are,159 0 - CABC disabled160 1 - CABC 1161 2 - CABC 2162 3 - External signal (e.g. LPG) is used for dimming163 This property is applicable only to WLED5 peripheral.164 $ref: /schemas/types.yaml#/definitions/uint32165 enum: [ 0, 1, 2, 3 ]166 167allOf:168 - if:169 properties:170 compatible:171 contains:172 const: qcom,pm8941-wled173 174 then:175 properties:176 reg:177 maxItems: 1178 179 qcom,current-boost-limit:180 enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ]181 default: 805182 183 qcom,switching-freq:184 default: 1600185 186 qcom,num-strings:187 enum: [ 1, 2, 3 ]188 189 interrupts:190 maxItems: 1191 192 interrupt-names:193 maxItems: 1194 195 else:196 properties:197 reg:198 minItems: 2199 200 qcom,current-boost-limit:201 enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ]202 default: 970203 204 qcom,switching-freq:205 default: 800206 207 qcom,num-strings:208 enum: [ 1, 2, 3, 4 ]209 210 interrupts:211 minItems: 2212 213 interrupt-names:214 minItems: 2215 - if:216 properties:217 compatible:218 contains:219 enum:220 - qcom,pm8150l-wled221 222 then:223 properties:224 default-brightness:225 minimum: 0226 maximum: 32767227 228 max-brightness:229 minimum: 0230 maximum: 32767231 232 else:233 properties:234 default-brightness:235 minimum: 0236 maximum: 4095237 238 max-brightness:239 minimum: 0240 maximum: 4095241 242required:243 - compatible244 - reg245 - label246 247additionalProperties: false248 249examples:250 - |251 backlight@d800 {252 compatible = "qcom,pm8941-wled";253 reg = <0xd800 0x100>;254 label = "backlight";255 256 qcom,cs-out;257 qcom,current-limit = <20>;258 qcom,current-boost-limit = <805>;259 qcom,switching-freq = <1600>;260 qcom,ovp = <29>;261 qcom,num-strings = <2>;262 qcom,enabled-strings = <0 1>;263 };264