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 31 "#pwm-cells": 32 const: 2 33 34 "#address-cells": 35 const: 1 36 37 "#size-cells": 38 const: 0 39 40 qcom,power-source: 41 $ref: /schemas/types.yaml#/definitions/uint32 42 description: 43 power-source used to drive the output, as defined in the datasheet. 44 Should be specified if the TRILED block is present 45 enum: [0, 1, 3] 46 47 qcom,dtest: 48 $ref: /schemas/types.yaml#/definitions/uint32-matrix 49 description: > 50 A list of integer pairs, where each pair represent the dtest line the 51 particular channel should be connected to and the flags denoting how the 52 value should be outputed, as defined in the datasheet. The number of 53 pairs should be the same as the number of channels. 54 items: 55 items: 56 - description: dtest line to attach 57 - description: flags for the attachment 58 59 multi-led: 60 type: object 61 $ref: leds-class-multicolor.yaml# 62 properties: 63 "#address-cells": 64 const: 1 65 66 "#size-cells": 67 const: 0 68 69 patternProperties: 70 "^led@[0-9a-f]$": 71 type: object 72 $ref: common.yaml# 73 74patternProperties: 75 "^led@[0-9a-f]$": 76 type: object 77 $ref: common.yaml# 78 79 properties: 80 reg: true 81 82 required: 83 - reg 84 85required: 86 - compatible 87 88additionalProperties: false 89 90examples: 91 - | 92 #include <dt-bindings/leds/common.h> 93 94 led-controller { 95 compatible = "qcom,pmi8994-lpg"; 96 97 #address-cells = <1>; 98 #size-cells = <0>; 99 100 qcom,power-source = <1>; 101 102 qcom,dtest = <0 0>, 103 <0 0>, 104 <0 0>, 105 <4 1>; 106 107 led@1 { 108 reg = <1>; 109 color = <LED_COLOR_ID_GREEN>; 110 function = LED_FUNCTION_INDICATOR; 111 function-enumerator = <1>; 112 }; 113 114 led@2 { 115 reg = <2>; 116 color = <LED_COLOR_ID_GREEN>; 117 function = LED_FUNCTION_INDICATOR; 118 function-enumerator = <0>; 119 default-state = "on"; 120 }; 121 122 led@3 { 123 reg = <3>; 124 color = <LED_COLOR_ID_GREEN>; 125 function = LED_FUNCTION_INDICATOR; 126 function-enumerator = <2>; 127 }; 128 129 led@4 { 130 reg = <4>; 131 color = <LED_COLOR_ID_GREEN>; 132 function = LED_FUNCTION_INDICATOR; 133 function-enumerator = <3>; 134 }; 135 }; 136 - | 137 #include <dt-bindings/leds/common.h> 138 139 led-controller { 140 compatible = "qcom,pmi8994-lpg"; 141 142 #address-cells = <1>; 143 #size-cells = <0>; 144 145 qcom,power-source = <1>; 146 147 multi-led { 148 color = <LED_COLOR_ID_RGB>; 149 function = LED_FUNCTION_STATUS; 150 151 #address-cells = <1>; 152 #size-cells = <0>; 153 154 led@1 { 155 reg = <1>; 156 color = <LED_COLOR_ID_RED>; 157 }; 158 159 led@2 { 160 reg = <2>; 161 color = <LED_COLOR_ID_GREEN>; 162 }; 163 164 led@3 { 165 reg = <3>; 166 color = <LED_COLOR_ID_BLUE>; 167 }; 168 }; 169 }; 170 - | 171 pwm-controller { 172 compatible = "qcom,pm8916-pwm"; 173 #pwm-cells = <2>; 174 }; 175... 176