|
| 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 | + |
| 7 | +title: Binding for Qualcomm Technologies, Inc. WLED driver |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Bjorn Andersson <[email protected]> |
| 11 | + |
| 12 | + |
| 13 | +description: | |
| 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 | +
|
| 18 | +properties: |
| 19 | + compatible: |
| 20 | + enum: |
| 21 | + - qcom,pm8941-wled |
| 22 | + - qcom,pmi8998-wled |
| 23 | + - qcom,pm660l-wled |
| 24 | + |
| 25 | + reg: |
| 26 | + maxItems: 1 |
| 27 | + |
| 28 | + default-brightness: |
| 29 | + description: | |
| 30 | + brightness value on boot. |
| 31 | + minimum: 0 |
| 32 | + maximum: 4095 |
| 33 | + default: 2048 |
| 34 | + |
| 35 | + label: true |
| 36 | + |
| 37 | + qcom,cs-out: |
| 38 | + description: | |
| 39 | + enable current sink output. |
| 40 | + This property is supported only for WLED3. |
| 41 | + type: boolean |
| 42 | + |
| 43 | + qcom,cabc: |
| 44 | + description: | |
| 45 | + enable content adaptive backlight control. |
| 46 | + type: boolean |
| 47 | + |
| 48 | + qcom,ext-gen: |
| 49 | + description: | |
| 50 | + use externally generated modulator signal to dim. |
| 51 | + This property is supported only for WLED3. |
| 52 | + type: boolean |
| 53 | + |
| 54 | + qcom,current-limit: |
| 55 | + description: | |
| 56 | + mA; per-string current limit. |
| 57 | + This property is supported only for WLED3. |
| 58 | + allOf: |
| 59 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 60 | + default: 20 |
| 61 | + minimum: 0 |
| 62 | + maximum: 25 |
| 63 | + |
| 64 | + qcom,current-limit-microamp: |
| 65 | + description: | |
| 66 | + uA; per-string current limit. |
| 67 | + default: 25 |
| 68 | + minimum: 0 |
| 69 | + maximum: 30000 |
| 70 | + multipleOf: 25 |
| 71 | + |
| 72 | + qcom,current-boost-limit: |
| 73 | + description: | |
| 74 | + mA; boost current limit. |
| 75 | + allOf: |
| 76 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 77 | + |
| 78 | + qcom,switching-freq: |
| 79 | + description: | |
| 80 | + kHz; switching frequency. |
| 81 | + allOf: |
| 82 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 83 | + - enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920, 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 | + allOf: |
| 90 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 91 | + - enum: [ 27, 29, 32, 35 ] |
| 92 | + - default: 29 |
| 93 | + |
| 94 | + qcom,ovp-millivolt: |
| 95 | + description: | |
| 96 | + Over-voltage protection limit. This property is for WLED4 only. |
| 97 | + allOf: |
| 98 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 99 | + - enum: [ 18100, 19600, 29600, 31100 ] |
| 100 | + - default: 29600 |
| 101 | + |
| 102 | + qcom,num-strings: |
| 103 | + description: | |
| 104 | + number of led strings attached. |
| 105 | + allOf: |
| 106 | + - $ref: /schemas/types.yaml#/definitions/uint32 |
| 107 | + |
| 108 | + qcom,enabled-strings: |
| 109 | + description: | |
| 110 | + Array of the WLED strings numbered from 0 to 3. Each |
| 111 | + string of leds are operated individually. Specify the |
| 112 | + list of strings used by the device. Any combination of |
| 113 | + led strings can be used. |
| 114 | + allOf: |
| 115 | + - $ref: /schemas/types.yaml#/definitions/uint32-array |
| 116 | + minItems: 1 |
| 117 | + maxItems: 4 |
| 118 | + |
| 119 | + qcom,external-pfet: |
| 120 | + description: | |
| 121 | + Specify if external PFET control for short circuit |
| 122 | + protection is used. This property is supported only |
| 123 | + for WLED4. |
| 124 | + type: boolean |
| 125 | + |
| 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: boolean |
| 131 | + |
| 132 | + interrupts: |
| 133 | + minItems: 1 |
| 134 | + items: |
| 135 | + - description: over voltage protection interrupt. |
| 136 | + - description: short circuit interrupt. |
| 137 | + |
| 138 | + interrupt-names: |
| 139 | + minItems: 1 |
| 140 | + items: |
| 141 | + - const: ovp |
| 142 | + - const: short |
| 143 | + |
| 144 | +allOf: |
| 145 | + - if: |
| 146 | + properties: |
| 147 | + compatible: |
| 148 | + contains: |
| 149 | + const: qcom,pm8941-wled |
| 150 | + |
| 151 | + then: |
| 152 | + properties: |
| 153 | + qcom,current-boost-limit: |
| 154 | + enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ] |
| 155 | + default: 805 |
| 156 | + |
| 157 | + qcom,switching-freq: |
| 158 | + default: 1600 |
| 159 | + |
| 160 | + qcom,num-strings: |
| 161 | + enum: [ 1, 2, 3 ] |
| 162 | + |
| 163 | + interrupts: |
| 164 | + maxItems: 1 |
| 165 | + |
| 166 | + interrupt-names: |
| 167 | + maxItems: 1 |
| 168 | + |
| 169 | + else: |
| 170 | + properties: |
| 171 | + qcom,current-boost-limit: |
| 172 | + enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ] |
| 173 | + default: 970 |
| 174 | + |
| 175 | + qcom,switching-freq: |
| 176 | + default: 800 |
| 177 | + |
| 178 | + qcom,num-strings: |
| 179 | + enum: [ 1, 2, 3, 4 ] |
| 180 | + |
| 181 | + interrupts: |
| 182 | + minItems: 2 |
| 183 | + |
| 184 | + interrupt-names: |
| 185 | + minItems: 2 |
| 186 | + |
| 187 | +required: |
| 188 | + - compatible |
| 189 | + - reg |
| 190 | + - label |
| 191 | + |
| 192 | +additionalProperties: false |
| 193 | + |
| 194 | +examples: |
| 195 | + - | |
| 196 | + backlight@d800 { |
| 197 | + compatible = "qcom,pm8941-wled"; |
| 198 | + reg = <0xd800 0x100>; |
| 199 | + label = "backlight"; |
| 200 | +
|
| 201 | + qcom,cs-out; |
| 202 | + qcom,current-limit = <20>; |
| 203 | + qcom,current-boost-limit = <805>; |
| 204 | + qcom,switching-freq = <1600>; |
| 205 | + qcom,ovp = <29>; |
| 206 | + qcom,num-strings = <2>; |
| 207 | + qcom,enabled-strings = <0 1>; |
| 208 | + }; |
0 commit comments