xref: /linux/Documentation/devicetree/bindings/leds/nxp,pca955x.yaml (revision 93251bdf7a771c4eeb0f95fa38ded92e95154ef7)
1*f92d2e93SRicky CX Wu# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*f92d2e93SRicky CX Wu%YAML 1.2
3*f92d2e93SRicky CX Wu---
4*f92d2e93SRicky CX Wu$id: http://devicetree.org/schemas/leds/nxp,pca955x.yaml#
5*f92d2e93SRicky CX Wu$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f92d2e93SRicky CX Wu
7*f92d2e93SRicky CX Wutitle: NXP PCA955X LED controllers
8*f92d2e93SRicky CX Wu
9*f92d2e93SRicky CX Wumaintainers:
10*f92d2e93SRicky CX Wu  - Nate Case <ncase@xes-inc.com>
11*f92d2e93SRicky CX Wu
12*f92d2e93SRicky CX Wudescription: |
13*f92d2e93SRicky CX Wu  The PCA955x family of chips are I2C LED blinkers whose pins not used
14*f92d2e93SRicky CX Wu  to control LEDs can be used as general purpose I/Os. The GPIO pins can
15*f92d2e93SRicky CX Wu  be input or output, and output pins can also be pulse-width controlled.
16*f92d2e93SRicky CX Wu
17*f92d2e93SRicky CX Wu  For more product information please see the link below:
18*f92d2e93SRicky CX Wu  - https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf
19*f92d2e93SRicky CX Wu
20*f92d2e93SRicky CX Wuproperties:
21*f92d2e93SRicky CX Wu  compatible:
22*f92d2e93SRicky CX Wu    enum:
23*f92d2e93SRicky CX Wu      - nxp,pca9550
24*f92d2e93SRicky CX Wu      - nxp,pca9551
25*f92d2e93SRicky CX Wu      - nxp,pca9552
26*f92d2e93SRicky CX Wu      - ibm,pca9552
27*f92d2e93SRicky CX Wu      - nxp,pca9553
28*f92d2e93SRicky CX Wu
29*f92d2e93SRicky CX Wu  reg:
30*f92d2e93SRicky CX Wu    maxItems: 1
31*f92d2e93SRicky CX Wu
32*f92d2e93SRicky CX Wu  "#address-cells":
33*f92d2e93SRicky CX Wu    const: 1
34*f92d2e93SRicky CX Wu
35*f92d2e93SRicky CX Wu  "#size-cells":
36*f92d2e93SRicky CX Wu    const: 0
37*f92d2e93SRicky CX Wu
38*f92d2e93SRicky CX Wu  gpio-controller: true
39*f92d2e93SRicky CX Wu
40*f92d2e93SRicky CX Wu  gpio-line-names:
41*f92d2e93SRicky CX Wu    minItems: 1
42*f92d2e93SRicky CX Wu    maxItems: 16
43*f92d2e93SRicky CX Wu
44*f92d2e93SRicky CX Wu  "#gpio-cells":
45*f92d2e93SRicky CX Wu    const: 2
46*f92d2e93SRicky CX Wu
47*f92d2e93SRicky CX WupatternProperties:
48*f92d2e93SRicky CX Wu  "^led@[0-9a-f]$":
49*f92d2e93SRicky CX Wu    type: object
50*f92d2e93SRicky CX Wu    $ref: common.yaml#
51*f92d2e93SRicky CX Wu    unevaluatedProperties: false
52*f92d2e93SRicky CX Wu
53*f92d2e93SRicky CX Wu    properties:
54*f92d2e93SRicky CX Wu      reg:
55*f92d2e93SRicky CX Wu        maxItems: 1
56*f92d2e93SRicky CX Wu      type:
57*f92d2e93SRicky CX Wu        description: |
58*f92d2e93SRicky CX Wu          Output configuration, see include/dt-bindings/leds/leds-pca955x.h
59*f92d2e93SRicky CX Wu        $ref: /schemas/types.yaml#/definitions/uint32
60*f92d2e93SRicky CX Wu        default: 0
61*f92d2e93SRicky CX Wu        minimum: 0
62*f92d2e93SRicky CX Wu        maximum: 2
63*f92d2e93SRicky CX Wu
64*f92d2e93SRicky CX Wu    required:
65*f92d2e93SRicky CX Wu      - reg
66*f92d2e93SRicky CX Wu
67*f92d2e93SRicky CX WuallOf:
68*f92d2e93SRicky CX Wu  - if:
69*f92d2e93SRicky CX Wu      properties:
70*f92d2e93SRicky CX Wu        compatible:
71*f92d2e93SRicky CX Wu          contains:
72*f92d2e93SRicky CX Wu            enum:
73*f92d2e93SRicky CX Wu              - nxp,pca9550
74*f92d2e93SRicky CX Wu    then:
75*f92d2e93SRicky CX Wu      patternProperties:
76*f92d2e93SRicky CX Wu        "^led@[0-9a-f]$":
77*f92d2e93SRicky CX Wu          properties:
78*f92d2e93SRicky CX Wu            reg:
79*f92d2e93SRicky CX Wu              maximum: 1
80*f92d2e93SRicky CX Wu  - if:
81*f92d2e93SRicky CX Wu      properties:
82*f92d2e93SRicky CX Wu        compatible:
83*f92d2e93SRicky CX Wu          contains:
84*f92d2e93SRicky CX Wu            enum:
85*f92d2e93SRicky CX Wu              - nxp,pca9551
86*f92d2e93SRicky CX Wu    then:
87*f92d2e93SRicky CX Wu      patternProperties:
88*f92d2e93SRicky CX Wu        "^led@[0-9a-f]$":
89*f92d2e93SRicky CX Wu          properties:
90*f92d2e93SRicky CX Wu            reg:
91*f92d2e93SRicky CX Wu              maximum: 7
92*f92d2e93SRicky CX Wu  - if:
93*f92d2e93SRicky CX Wu      properties:
94*f92d2e93SRicky CX Wu        compatible:
95*f92d2e93SRicky CX Wu          contains:
96*f92d2e93SRicky CX Wu            enum:
97*f92d2e93SRicky CX Wu              - nxp,pca9552
98*f92d2e93SRicky CX Wu              - ibm,pca9552
99*f92d2e93SRicky CX Wu    then:
100*f92d2e93SRicky CX Wu      patternProperties:
101*f92d2e93SRicky CX Wu        "^led@[0-9a-f]$":
102*f92d2e93SRicky CX Wu          properties:
103*f92d2e93SRicky CX Wu            reg:
104*f92d2e93SRicky CX Wu              maximum: 15
105*f92d2e93SRicky CX Wu  - if:
106*f92d2e93SRicky CX Wu      properties:
107*f92d2e93SRicky CX Wu        compatible:
108*f92d2e93SRicky CX Wu          contains:
109*f92d2e93SRicky CX Wu            enum:
110*f92d2e93SRicky CX Wu              - nxp,pca9553
111*f92d2e93SRicky CX Wu    then:
112*f92d2e93SRicky CX Wu      patternProperties:
113*f92d2e93SRicky CX Wu        "^led@[0-9a-f]$":
114*f92d2e93SRicky CX Wu          properties:
115*f92d2e93SRicky CX Wu            reg:
116*f92d2e93SRicky CX Wu              maximum: 3
117*f92d2e93SRicky CX Wu
118*f92d2e93SRicky CX WuadditionalProperties: false
119*f92d2e93SRicky CX Wu
120*f92d2e93SRicky CX Wuexamples:
121*f92d2e93SRicky CX Wu  - |
122*f92d2e93SRicky CX Wu    #include <dt-bindings/leds/leds-pca955x.h>
123*f92d2e93SRicky CX Wu
124*f92d2e93SRicky CX Wu    i2c {
125*f92d2e93SRicky CX Wu        #address-cells = <1>;
126*f92d2e93SRicky CX Wu        #size-cells = <0>;
127*f92d2e93SRicky CX Wu
128*f92d2e93SRicky CX Wu        led-controller@60 {
129*f92d2e93SRicky CX Wu            compatible = "nxp,pca9552";
130*f92d2e93SRicky CX Wu            reg = <0x60>;
131*f92d2e93SRicky CX Wu            #address-cells = <1>;
132*f92d2e93SRicky CX Wu            #size-cells = <0>;
133*f92d2e93SRicky CX Wu
134*f92d2e93SRicky CX Wu            led@0 {
135*f92d2e93SRicky CX Wu                reg = <0>;
136*f92d2e93SRicky CX Wu                label = "red:power";
137*f92d2e93SRicky CX Wu                linux,default-trigger = "default-on";
138*f92d2e93SRicky CX Wu                type = <PCA955X_TYPE_LED>;
139*f92d2e93SRicky CX Wu            };
140*f92d2e93SRicky CX Wu            led@1 {
141*f92d2e93SRicky CX Wu                reg = <1>;
142*f92d2e93SRicky CX Wu                label = "green:power";
143*f92d2e93SRicky CX Wu                type = <PCA955X_TYPE_LED>;
144*f92d2e93SRicky CX Wu            };
145*f92d2e93SRicky CX Wu            led@2 {
146*f92d2e93SRicky CX Wu                reg = <2>;
147*f92d2e93SRicky CX Wu                label = "pca9552:yellow";
148*f92d2e93SRicky CX Wu                type = <PCA955X_TYPE_LED>;
149*f92d2e93SRicky CX Wu            };
150*f92d2e93SRicky CX Wu            led@3 {
151*f92d2e93SRicky CX Wu                reg = <3>;
152*f92d2e93SRicky CX Wu                label = "pca9552:white";
153*f92d2e93SRicky CX Wu                type = <PCA955X_TYPE_LED>;
154*f92d2e93SRicky CX Wu            };
155*f92d2e93SRicky CX Wu        };
156*f92d2e93SRicky CX Wu    };
157*f92d2e93SRicky CX Wu
158*f92d2e93SRicky CX Wu...
159