Skip to content

Commit 000b1ea

Browse files
André Apitzschlag-linaro
authored andcommitted
dt-bindings: leds: Add Kinetic KTD2026/2027 LED
Document Kinetic KTD2026/2027 LED driver devicetree bindings. Signed-off-by: André Apitzsch <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent a067943 commit 000b1ea

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/kinetic,ktd202x.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Kinetic KTD2026/7 RGB/White LED Driver
8+
9+
maintainers:
10+
- André Apitzsch <[email protected]>
11+
12+
description: |
13+
The KTD2026/7 is a RGB/White LED driver with I2C interface.
14+
15+
The data sheet can be found at:
16+
https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- kinetic,ktd2026
22+
- kinetic,ktd2027
23+
24+
reg:
25+
maxItems: 1
26+
27+
vin-supply:
28+
description: Regulator providing power to the "VIN" pin.
29+
30+
vio-supply:
31+
description: Regulator providing power for pull-up of the I/O lines.
32+
Note that this regulator does not directly connect to KTD2026, but is
33+
needed for the correct operation of the status ("ST") and I2C lines.
34+
35+
"#address-cells":
36+
const: 1
37+
38+
"#size-cells":
39+
const: 0
40+
41+
multi-led:
42+
type: object
43+
$ref: leds-class-multicolor.yaml#
44+
unevaluatedProperties: false
45+
46+
properties:
47+
"#address-cells":
48+
const: 1
49+
50+
"#size-cells":
51+
const: 0
52+
53+
patternProperties:
54+
"^led@[0-3]$":
55+
type: object
56+
$ref: common.yaml#
57+
unevaluatedProperties: false
58+
59+
properties:
60+
reg:
61+
description: Index of the LED.
62+
minimum: 0
63+
maximum: 3
64+
65+
required:
66+
- reg
67+
- color
68+
69+
required:
70+
- "#address-cells"
71+
- "#size-cells"
72+
73+
patternProperties:
74+
"^led@[0-3]$":
75+
type: object
76+
$ref: common.yaml#
77+
unevaluatedProperties: false
78+
79+
properties:
80+
reg:
81+
description: Index of the LED.
82+
minimum: 0
83+
maximum: 3
84+
85+
required:
86+
- reg
87+
88+
required:
89+
- compatible
90+
- reg
91+
- "#address-cells"
92+
- "#size-cells"
93+
94+
additionalProperties: false
95+
96+
examples:
97+
- |
98+
#include <dt-bindings/leds/common.h>
99+
100+
i2c {
101+
#address-cells = <1>;
102+
#size-cells = <0>;
103+
104+
led-controller@30 {
105+
compatible = "kinetic,ktd2026";
106+
reg = <0x30>;
107+
#address-cells = <1>;
108+
#size-cells = <0>;
109+
110+
vin-supply = <&pm8916_l17>;
111+
vio-supply = <&pm8916_l6>;
112+
113+
led@0 {
114+
reg = <0>;
115+
function = LED_FUNCTION_STATUS;
116+
color = <LED_COLOR_ID_RED>;
117+
};
118+
119+
led@1 {
120+
reg = <1>;
121+
function = LED_FUNCTION_STATUS;
122+
color = <LED_COLOR_ID_GREEN>;
123+
};
124+
125+
led@2 {
126+
reg = <2>;
127+
function = LED_FUNCTION_STATUS;
128+
color = <LED_COLOR_ID_BLUE>;
129+
};
130+
};
131+
};
132+
- |
133+
#include <dt-bindings/leds/common.h>
134+
135+
i2c {
136+
#address-cells = <1>;
137+
#size-cells = <0>;
138+
139+
led-controller@30 {
140+
compatible = "kinetic,ktd2026";
141+
reg = <0x30>;
142+
#address-cells = <1>;
143+
#size-cells = <0>;
144+
145+
vin-supply = <&pm8916_l17>;
146+
vio-supply = <&pm8916_l6>;
147+
148+
multi-led {
149+
color = <LED_COLOR_ID_RGB>;
150+
function = LED_FUNCTION_STATUS;
151+
152+
#address-cells = <1>;
153+
#size-cells = <0>;
154+
155+
led@0 {
156+
reg = <0>;
157+
color = <LED_COLOR_ID_RED>;
158+
};
159+
160+
led@1 {
161+
reg = <1>;
162+
color = <LED_COLOR_ID_GREEN>;
163+
};
164+
165+
led@2 {
166+
reg = <2>;
167+
color = <LED_COLOR_ID_BLUE>;
168+
};
169+
};
170+
};
171+
};

0 commit comments

Comments
 (0)