GNU Linux-libre 6.8.9-gnu
[releases.git] / Documentation / devicetree / bindings / leds / nxp,pca995x.yaml
1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/leds/nxp,pca995x.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: NXP PCA995x LED controllers
8
9 maintainers:
10   - Isai Gaspar <isaiezequiel.gaspar@nxp.com>
11   - Marek Vasut <marex@denx.de>
12
13 description:
14   The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C
15   that can drive 16 separate lines. Each of them can be individually switched
16   on and off, and brightness can be controlled via individual PWM.
17
18   Datasheets are available at
19   https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf
20   https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf
21
22 properties:
23   compatible:
24     enum:
25       - nxp,pca9952
26       - nxp,pca9955b
27
28   reg:
29     maxItems: 1
30
31   "#address-cells":
32     const: 1
33
34   "#size-cells":
35     const: 0
36
37 patternProperties:
38   "^led@[0-9a-f]+$":
39     type: object
40     $ref: common.yaml#
41     unevaluatedProperties: false
42
43     properties:
44       reg:
45         minimum: 0
46         maximum: 15
47
48     required:
49       - reg
50
51 additionalProperties: false
52
53 examples:
54   - |
55     #include <dt-bindings/leds/common.h>
56
57     i2c {
58         #address-cells = <1>;
59         #size-cells = <0>;
60
61         led-controller@1 {
62             compatible = "nxp,pca9955b";
63             reg = <0x01>;
64             #address-cells = <1>;
65             #size-cells = <0>;
66
67             led@0 {
68                 reg = <0x0>;
69                 color = <LED_COLOR_ID_RED>;
70                 function = LED_FUNCTION_POWER;
71             };
72
73             led@2 {
74                 reg = <0x2>;
75                 color = <LED_COLOR_ID_WHITE>;
76                 function = LED_FUNCTION_STATUS;
77             };
78         };
79     };
80
81 ...