1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/nxp,pca963x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA963x LED controllers
maintainers:
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
description: |
The NXP PCA963x are I2C-controlled LED drivers optimized for
Red/Green/Blue/Amber (RGBA) color mixing applications. Each LED is
individually controllable and has its own PWM controller.
Datasheets are available at
- https://www.nxp.com/docs/en/data-sheet/PCA9632.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9633.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9634.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9635.pdf
properties:
compatible:
enum:
- nxp,pca9632
- nxp,pca9633
- nxp,pca9634
- nxp,pca9635
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
nxp,hw-blink:
type: boolean
description:
Use hardware blinking instead of software blinking
nxp,inverted-out:
type: boolean
description:
Invert the polarity of the generated PWM.
nxp,period-scale:
$ref: /schemas/types.yaml#/definitions/uint32
description:
In some configurations, the chip blinks faster than expected. This
parameter provides a scaling ratio (fixed point, decimal divided by 1000)
to compensate, e.g. 1300=1.3x and 750=0.75x.
nxp,totem-pole:
type: boolean
description:
Use totem pole (push-pull) instead of open-drain (pca9632 defaults to
open-drain, newer chips to totem pole).
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maximum: 15
required:
- reg
"^multi-led@[0-9a-f]$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
maximum: 15
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maximum: 15
required:
- reg
- color
required:
- reg
- "#address-cells"
- "#size-cells"
allOf:
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9632
- nxp,pca9633
then:
patternProperties:
"^.*led@[0-9a-f]$":
properties:
reg:
maximum: 3
"^multi-led@[0-9a-f]$":
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 3
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9634
then:
patternProperties:
"^.*led@[0-9a-f]$":
properties:
reg:
maximum: 7
"^multi-led@[0-9a-f]$":
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 7
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@62 {
compatible = "nxp,pca9632";
reg = <0x62>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
};
led@3 {
reg = <3>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
};
};
};
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@62 {
compatible = "nxp,pca9633";
reg = <0x62>;
#address-cells = <1>;
#size-cells = <0>;
/* Three channels controlling one RGB LED */
multi-led@0 {
reg = <0>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STATUS;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
};
};
/* Remaining channel used as a plain white LED */
led@3 {
reg = <3>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
};
};
};
...
|