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