1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Binding for Qualcomm Technologies, Inc. WLED driver 8 9maintainers: 10 - Bjorn Andersson <bjorn.andersson@linaro.org> 11 - Kiran Gunda <kgunda@codeaurora.org> 12 13description: | 14 WLED (White Light Emitting Diode) driver is used for controlling display 15 backlight that is part of PMIC on Qualcomm Technologies, Inc. reference 16 platforms. The PMIC is connected to the host processor via SPMI bus. 17 18properties: 19 compatible: 20 enum: 21 - qcom,pm8941-wled 22 - qcom,pmi8998-wled 23 - qcom,pm660l-wled 24 - qcom,pm8150l-wled 25 26 reg: 27 maxItems: 1 28 29 default-brightness: 30 description: | 31 brightness value on boot. 32 33 label: true 34 35 max-brightness: 36 description: | 37 Maximum brightness level. 38 39 qcom,cs-out: 40 description: | 41 enable current sink output. 42 This property is supported only for WLED3. 43 type: boolean 44 45 qcom,cabc: 46 description: | 47 enable content adaptive backlight control. 48 type: boolean 49 50 qcom,ext-gen: 51 description: | 52 use externally generated modulator signal to dim. 53 This property is supported only for WLED3. 54 type: boolean 55 56 qcom,current-limit: 57 description: | 58 mA; per-string current limit. 59 This property is supported only for WLED3. 60 $ref: /schemas/types.yaml#/definitions/uint32 61 default: 20 62 minimum: 0 63 maximum: 25 64 65 qcom,current-limit-microamp: 66 description: | 67 uA; per-string current limit. 68 default: 25 69 minimum: 0 70 maximum: 30000 71 multipleOf: 25 72 73 qcom,current-boost-limit: 74 description: | 75 mA; boost current limit. 76 $ref: /schemas/types.yaml#/definitions/uint32 77 78 qcom,switching-freq: 79 description: | 80 kHz; switching frequency. 81 $ref: /schemas/types.yaml#/definitions/uint32 82 enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920, 83 2400, 3200, 4800, 9600 ] 84 85 qcom,ovp: 86 description: | 87 V; Over-voltage protection limit. 88 This property is supported only for WLED3. 89 $ref: /schemas/types.yaml#/definitions/uint32 90 enum: [ 27, 29, 32, 35 ] 91 default: 29 92 93 qcom,ovp-millivolt: 94 description: | 95 Over-voltage protection limit. This property is for WLED4 only. 96 $ref: /schemas/types.yaml#/definitions/uint32 97 enum: [ 18100, 19600, 29600, 31100 ] 98 default: 29600 99 100 qcom,num-strings: 101 description: | 102 number of led strings attached. 103 $ref: /schemas/types.yaml#/definitions/uint32 104 105 qcom,enabled-strings: 106 description: | 107 Array of the WLED strings numbered from 0 to 3. Each 108 string of leds are operated individually. Specify the 109 list of strings used by the device. Any combination of 110 led strings can be used. 111 $ref: /schemas/types.yaml#/definitions/uint32-array 112 minItems: 1 113 maxItems: 4 114 115 qcom,external-pfet: 116 description: | 117 Specify if external PFET control for short circuit 118 protection is used. This property is supported only 119 for WLED4. 120 type: boolean 121 122 qcom,auto-string-detection: 123 description: | 124 Enables auto-detection of the WLED string configuration. 125 This feature is not supported for WLED3. 126 type: boolean 127 128 interrupts: 129 minItems: 1 130 items: 131 - description: over voltage protection interrupt. 132 - description: short circuit interrupt. 133 134 interrupt-names: 135 minItems: 1 136 items: 137 - const: ovp 138 - const: short 139 140 qcom,modulator-sel: 141 description: | 142 Selects the modulator used for brightness modulation. 143 Allowed values are, 144 0 - Modulator A 145 1 - Modulator B 146 This property is applicable only to WLED5 peripheral. 147 $ref: /schemas/types.yaml#/definitions/uint32 148 enum: [ 0, 1 ] 149 default: 0 150 151 qcom,cabc-sel: 152 description: | 153 Selects the CABC pin signal used for brightness modulation. 154 Allowed values are, 155 0 - CABC disabled 156 1 - CABC 1 157 2 - CABC 2 158 3 - External signal (e.g. LPG) is used for dimming 159 This property is applicable only to WLED5 peripheral. 160 $ref: /schemas/types.yaml#/definitions/uint32 161 enum: [ 0, 1, 2, 3 ] 162 163allOf: 164 - if: 165 properties: 166 compatible: 167 contains: 168 const: qcom,pm8941-wled 169 170 then: 171 properties: 172 qcom,current-boost-limit: 173 enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ] 174 default: 805 175 176 qcom,switching-freq: 177 default: 1600 178 179 qcom,num-strings: 180 enum: [ 1, 2, 3 ] 181 182 interrupts: 183 maxItems: 1 184 185 interrupt-names: 186 maxItems: 1 187 188 else: 189 properties: 190 qcom,current-boost-limit: 191 enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ] 192 default: 970 193 194 qcom,switching-freq: 195 default: 800 196 197 qcom,num-strings: 198 enum: [ 1, 2, 3, 4 ] 199 200 interrupts: 201 minItems: 2 202 203 interrupt-names: 204 minItems: 2 205 - if: 206 properties: 207 compatible: 208 contains: 209 enum: 210 - qcom,pm8150l-wled 211 212 then: 213 properties: 214 default-brightness: 215 minimum: 0 216 maximum: 32767 217 218 max-brightness: 219 minimum: 0 220 maximum: 32767 221 222 else: 223 properties: 224 default-brightness: 225 minimum: 0 226 maximum: 4095 227 228 max-brightness: 229 minimum: 0 230 maximum: 4095 231 232required: 233 - compatible 234 - reg 235 - label 236 237additionalProperties: false 238 239examples: 240 - | 241 backlight@d800 { 242 compatible = "qcom,pm8941-wled"; 243 reg = <0xd800 0x100>; 244 label = "backlight"; 245 246 qcom,cs-out; 247 qcom,current-limit = <20>; 248 qcom,current-boost-limit = <805>; 249 qcom,switching-freq = <1600>; 250 qcom,ovp = <29>; 251 qcom,num-strings = <2>; 252 qcom,enabled-strings = <0 1>; 253 }; 254