Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux
[drm/drm-misc.git] / Documentation / devicetree / bindings / leds / nxp,pca955x.yaml
blobae7384cc760c1cd56a063d1287320e4cdc88f81e
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,pca955x.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NXP PCA955X LED controllers
9 maintainers:
10   - Nate Case <ncase@xes-inc.com>
12 description: |
13   The PCA955x family of chips are I2C LED blinkers whose pins not used
14   to control LEDs can be used as general purpose I/Os. The GPIO pins can
15   be input or output, and output pins can also be pulse-width controlled.
17   For more product information please see the link below:
18   - https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf
20 properties:
21   compatible:
22     enum:
23       - nxp,pca9550
24       - nxp,pca9551
25       - nxp,pca9552
26       - ibm,pca9552
27       - nxp,pca9553
29   reg:
30     maxItems: 1
32   "#address-cells":
33     const: 1
35   "#size-cells":
36     const: 0
38   gpio-controller: true
40   gpio-line-names:
41     minItems: 1
42     maxItems: 16
44   "#gpio-cells":
45     const: 2
47 patternProperties:
48   "^led@[0-9a-f]$":
49     type: object
50     $ref: common.yaml#
51     unevaluatedProperties: false
53     properties:
54       reg:
55         maxItems: 1
56       type:
57         description: |
58           Output configuration, see include/dt-bindings/leds/leds-pca955x.h
59         $ref: /schemas/types.yaml#/definitions/uint32
60         default: 0
61         minimum: 0
62         maximum: 2
64     required:
65       - reg
67 allOf:
68   - if:
69       properties:
70         compatible:
71           contains:
72             enum:
73               - nxp,pca9550
74     then:
75       patternProperties:
76         "^led@[0-9a-f]$":
77           properties:
78             reg:
79               maximum: 1
80   - if:
81       properties:
82         compatible:
83           contains:
84             enum:
85               - nxp,pca9551
86     then:
87       patternProperties:
88         "^led@[0-9a-f]$":
89           properties:
90             reg:
91               maximum: 7
92   - if:
93       properties:
94         compatible:
95           contains:
96             enum:
97               - nxp,pca9552
98               - ibm,pca9552
99     then:
100       patternProperties:
101         "^led@[0-9a-f]$":
102           properties:
103             reg:
104               maximum: 15
105   - if:
106       properties:
107         compatible:
108           contains:
109             enum:
110               - nxp,pca9553
111     then:
112       patternProperties:
113         "^led@[0-9a-f]$":
114           properties:
115             reg:
116               maximum: 3
118 additionalProperties: false
120 examples:
121   - |
122     #include <dt-bindings/leds/leds-pca955x.h>
124     i2c {
125         #address-cells = <1>;
126         #size-cells = <0>;
128         led-controller@60 {
129             compatible = "nxp,pca9552";
130             reg = <0x60>;
131             #address-cells = <1>;
132             #size-cells = <0>;
134             led@0 {
135                 reg = <0>;
136                 label = "red:power";
137                 linux,default-trigger = "default-on";
138                 type = <PCA955X_TYPE_LED>;
139             };
140             led@1 {
141                 reg = <1>;
142                 label = "green:power";
143                 type = <PCA955X_TYPE_LED>;
144             };
145             led@2 {
146                 reg = <2>;
147                 label = "pca9552:yellow";
148                 type = <PCA955X_TYPE_LED>;
149             };
150             led@3 {
151                 reg = <3>;
152                 label = "pca9552:white";
153                 type = <PCA955X_TYPE_LED>;
154             };
155         };
156     };