1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm Light Pulse Generator 8 9maintainers: 10 - Bjorn Andersson <bjorn.andersson@linaro.org> 11 12description: > 13 The Qualcomm Light Pulse Generator consists of three different hardware blocks; 14 a ramp generator with lookup table, the light pulse generator and a three 15 channel current sink. These blocks are found in a wide range of Qualcomm PMICs. 16 17properties: 18 compatible: 19 enum: 20 - qcom,pm660l-lpg 21 - qcom,pm8150b-lpg 22 - qcom,pm8150l-lpg 23 - qcom,pm8350c-pwm 24 - qcom,pm8916-pwm 25 - qcom,pm8941-lpg 26 - qcom,pm8994-lpg 27 - qcom,pmc8180c-lpg 28 - qcom,pmi8994-lpg 29 - qcom,pmi8998-lpg 30 - qcom,pmk8550-pwm 31 32 "#pwm-cells": 33 const: 2 34 35 "#address-cells": 36 const: 1 37 38 "#size-cells": 39 const: 0 40 41 qcom,power-source: 42 $ref: /schemas/types.yaml#/definitions/uint32 43 description: 44 power-source used to drive the output, as defined in the datasheet. 45 Should be specified if the TRILED block is present 46 enum: [0, 1, 3] 47 48 qcom,dtest: 49 $ref: /schemas/types.yaml#/definitions/uint32-matrix 50 description: > 51 A list of integer pairs, where each pair represent the dtest line the 52 particular channel should be connected to and the flags denoting how the 53 value should be outputed, as defined in the datasheet. The number of 54 pairs should be the same as the number of channels. 55 items: 56 items: 57 - description: dtest line to attach 58 - description: flags for the attachment 59 60 multi-led: 61 type: object 62 $ref: leds-class-multicolor.yaml# 63 unevaluatedProperties: false 64 65 properties: 66 "#address-cells": 67 const: 1 68 69 "#size-cells": 70 const: 0 71 72 patternProperties: 73 "^led@[0-9a-f]$": 74 type: object 75 $ref: common.yaml# 76 unevaluatedProperties: false 77 78 properties: 79 reg: 80 maxItems: 1 81 82 required: 83 - reg 84 85patternProperties: 86 "^led@[0-9a-f]$": 87 type: object 88 $ref: common.yaml# 89 unevaluatedProperties: false 90 91 properties: 92 reg: 93 maxItems: 1 94 95 required: 96 - reg 97 98required: 99 - compatible 100 101additionalProperties: false 102 103examples: 104 - | 105 #include <dt-bindings/leds/common.h> 106 107 led-controller { 108 compatible = "qcom,pmi8994-lpg"; 109 110 #address-cells = <1>; 111 #size-cells = <0>; 112 113 qcom,power-source = <1>; 114 115 qcom,dtest = <0 0>, 116 <0 0>, 117 <0 0>, 118 <4 1>; 119 120 led@1 { 121 reg = <1>; 122 color = <LED_COLOR_ID_GREEN>; 123 function = LED_FUNCTION_INDICATOR; 124 function-enumerator = <1>; 125 }; 126 127 led@2 { 128 reg = <2>; 129 color = <LED_COLOR_ID_GREEN>; 130 function = LED_FUNCTION_INDICATOR; 131 function-enumerator = <0>; 132 default-state = "on"; 133 }; 134 135 led@3 { 136 reg = <3>; 137 color = <LED_COLOR_ID_GREEN>; 138 function = LED_FUNCTION_INDICATOR; 139 function-enumerator = <2>; 140 }; 141 142 led@4 { 143 reg = <4>; 144 color = <LED_COLOR_ID_GREEN>; 145 function = LED_FUNCTION_INDICATOR; 146 function-enumerator = <3>; 147 }; 148 }; 149 - | 150 #include <dt-bindings/leds/common.h> 151 152 led-controller { 153 compatible = "qcom,pmi8994-lpg"; 154 155 #address-cells = <1>; 156 #size-cells = <0>; 157 158 qcom,power-source = <1>; 159 160 multi-led { 161 color = <LED_COLOR_ID_RGB>; 162 function = LED_FUNCTION_STATUS; 163 164 #address-cells = <1>; 165 #size-cells = <0>; 166 167 led@1 { 168 reg = <1>; 169 color = <LED_COLOR_ID_RED>; 170 }; 171 172 led@2 { 173 reg = <2>; 174 color = <LED_COLOR_ID_GREEN>; 175 }; 176 177 led@3 { 178 reg = <3>; 179 color = <LED_COLOR_ID_BLUE>; 180 }; 181 }; 182 }; 183 - | 184 pwm-controller { 185 compatible = "qcom,pm8916-pwm"; 186 #pwm-cells = <2>; 187 }; 188... 189