Debian Codegraph @

Documentation/devicetree/bindings/leds/ti,lp5812.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/leds/ti,lp5812.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: TI LP5812 4x3 Matrix RGB LED Driver with Autonomous Control
8
9 maintainers:
10 - Nam Tran <[email protected]>
11
12 description: |
13 The LP5812 is a 4x3 matrix RGB LED driver with I2C interface
14 and autonomous animation engine control.
15 For more product information please see the link below:
16 https://www.ti.com/product/LP5812#tech-docs
17
18 properties:
19 compatible:
20 const: ti,lp5812
21
22 reg:
23 maxItems: 1
24
25 ti,scan-mode:
26 description: |
27 Selects the LED scan mode of the LP5812. The device supports
28 three modes:
29 - Direct-drive mode (by default if 'ti,scan-mode' is omitted)
30 drives up to 4 LEDs directly by internal current sinks (LED0-LED3).
31 - TCM-drive mode ("tcm:<n>:<order...>") drives up to 12 LEDs
32 (4 RGB) using 1-4 scan multiplexing. The <n> specifies the number
33 of scans (1-4), and <order...> defines the scan order of the outputs.
34 - Mix-drive mode ("mix:<n>:<direct>:<order...>") combines
35 direct-drive and TCM-drive outputs. The <n> specifies the number
36 of scans, <direct> selects the direct-drive outputs, and <order...>
37 defines the scan order.
38 $ref: /schemas/types.yaml#/definitions/string
39 pattern: '^(tcm|mix):[1-4](:[0-3]){1,4}$'
40
41 vcc-supply:
42 description: Regulator providing power to the 'VCC' pin.
43
44 "#address-cells":
45 const: 1
46
47 "#size-cells":
48 const: 0
49
50 patternProperties:
51 "^led@[0-3]$":
52 type: object
53 $ref: common.yaml#
54 unevaluatedProperties: false
55
56 properties:
57 reg:
58 minimum: 0
59 maximum: 3
60
61 required:
62 - reg
63
64 "^multi-led@[4-7]$":
65 type: object
66 $ref: leds-class-multicolor.yaml#
67 unevaluatedProperties: false
68
69 properties:
70 reg:
71 minimum: 4
72 maximum: 7
73
74 "#address-cells":
75 const: 1
76
77 "#size-cells":
78 const: 0
79
80 patternProperties:
81 "^led@[4-9a-f]$":
82 type: object
83 $ref: common.yaml#
84 unevaluatedProperties: false
85
86 properties:
87 reg:
88 minimum: 4
89 maximum: 15
90
91 required:
92 - reg
93
94 required:
95 - compatible
96 - reg
97
98 additionalProperties: false
99
100 examples:
101 - |
102 #include <dt-bindings/leds/common.h>
103
104 i2c {
105 #address-cells = <1>;
106 #size-cells = <0>;
107
108 led-controller@1b {
109 #address-cells = <1>;
110 #size-cells = <0>;
111 compatible = "ti,lp5812";
112 reg = <0x1b>;
113 ti,scan-mode = "tcm:4:0:1:2:3";
114 vcc-supply = <&vdd_3v3_reg>;
115
116 led@0 {
117 reg = <0x0>;
118 label = "LED0";
119 led-max-microamp = <25500>;
120 };
121
122 led@1 {
123 reg = <0x1>;
124 label = "LED1";
125 led-max-microamp = <25500>;
126 };
127
128 led@2 {
129 reg = <0x2>;
130 label = "LED2";
131 led-max-microamp = <25500>;
132 };
133
134 led@3 {
135 reg = <0x3>;
136 label = "LED3";
137 led-max-microamp = <25500>;
138 };
139
140 multi-led@4 {
141 #address-cells = <1>;
142 #size-cells = <0>;
143 reg = <0x4>;
144 color = <LED_COLOR_ID_RGB>;
145 label = "LED_A";
146
147 led@4 {
148 reg = <0x4>;
149 color = <LED_COLOR_ID_GREEN>;
150 led-max-microamp = <25500>;
151 };
152
153 led@5 {
154 reg = <0x5>;
155 color = <LED_COLOR_ID_RED>;
156 led-max-microamp = <25500>;
157 };
158
159 led@6 {
160 reg = <0x6>;
161 color = <LED_COLOR_ID_BLUE>;
162 led-max-microamp = <25500>;
163 };
164 };
165
166 multi-led@5 {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 reg = <0x5>;
170 color = <LED_COLOR_ID_RGB>;
171 label = "LED_B";
172
173 led@7 {
174 reg = <0x7>;
175 color = <LED_COLOR_ID_GREEN>;
176 led-max-microamp = <25500>;
177 };
178
179 led@8 {
180 reg = <0x8>;
181 color = <LED_COLOR_ID_RED>;
182 led-max-microamp = <25500>;
183 };
184
185 led@9 {
186 reg = <0x9>;
187 color = <LED_COLOR_ID_BLUE>;
188 led-max-microamp = <25500>;
189 };
190 };
191
192 multi-led@6 {
193 #address-cells = <1>;
194 #size-cells = <0>;
195 reg = <0x6>;
196 color = <LED_COLOR_ID_RGB>;
197 label = "LED_C";
198
199 led@a {
200 reg = <0xa>;
201 color = <LED_COLOR_ID_GREEN>;
202 led-max-microamp = <25500>;
203 };
204
205 led@b {
206 reg = <0xb>;
207 color = <LED_COLOR_ID_RED>;
208 led-max-microamp = <25500>;
209 };
210
211 led@c {
212 reg = <0xc>;
213 color = <LED_COLOR_ID_BLUE>;
214 led-max-microamp = <25500>;
215 };
216 };
217
218 multi-led@7 {
219 #address-cells = <1>;
220 #size-cells = <0>;
221 reg = <0x7>;
222 color = <LED_COLOR_ID_RGB>;
223 label = "LED_D";
224
225 led@d {
226 reg = <0xd>;
227 color = <LED_COLOR_ID_GREEN>;
228 led-max-microamp = <25500>;
229 };
230
231 led@e {
232 reg = <0xe>;
233 color = <LED_COLOR_ID_RED>;
234 led-max-microamp = <25500>;
235 };
236
237 led@f {
238 reg = <0xf>;
239 color = <LED_COLOR_ID_BLUE>;
240 led-max-microamp = <25500>;
241 };
242 };
243 };
244 };
245
246 ...