xref: /freebsd/sys/contrib/device-tree/Bindings/leds/onnn,ncp5623.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/leds/onnn,ncp5623.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: ON Semiconductor NCP5623 multi-LED Driver
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Abdel Alkuor <alkuor@gmail.com>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription:
13*01950c46SEmmanuel Vadot  NCP5623 Triple Output I2C Controlled LED Driver.
14*01950c46SEmmanuel Vadot  https://www.onsemi.com/pdf/datasheet/ncp5623-d.pdf
15*01950c46SEmmanuel Vadot
16*01950c46SEmmanuel Vadotproperties:
17*01950c46SEmmanuel Vadot  compatible:
18*01950c46SEmmanuel Vadot    enum:
19*01950c46SEmmanuel Vadot      - onnn,ncp5623
20*01950c46SEmmanuel Vadot
21*01950c46SEmmanuel Vadot  reg:
22*01950c46SEmmanuel Vadot    const: 0x38
23*01950c46SEmmanuel Vadot
24*01950c46SEmmanuel Vadot  multi-led:
25*01950c46SEmmanuel Vadot    type: object
26*01950c46SEmmanuel Vadot    $ref: leds-class-multicolor.yaml#
27*01950c46SEmmanuel Vadot    unevaluatedProperties: false
28*01950c46SEmmanuel Vadot
29*01950c46SEmmanuel Vadot    properties:
30*01950c46SEmmanuel Vadot      "#address-cells":
31*01950c46SEmmanuel Vadot        const: 1
32*01950c46SEmmanuel Vadot
33*01950c46SEmmanuel Vadot      "#size-cells":
34*01950c46SEmmanuel Vadot        const: 0
35*01950c46SEmmanuel Vadot
36*01950c46SEmmanuel Vadot    patternProperties:
37*01950c46SEmmanuel Vadot      "^led@[0-2]$":
38*01950c46SEmmanuel Vadot        type: object
39*01950c46SEmmanuel Vadot        $ref: common.yaml#
40*01950c46SEmmanuel Vadot        unevaluatedProperties: false
41*01950c46SEmmanuel Vadot
42*01950c46SEmmanuel Vadot        properties:
43*01950c46SEmmanuel Vadot          reg:
44*01950c46SEmmanuel Vadot            minimum: 0
45*01950c46SEmmanuel Vadot            maximum: 2
46*01950c46SEmmanuel Vadot
47*01950c46SEmmanuel Vadot        required:
48*01950c46SEmmanuel Vadot          - reg
49*01950c46SEmmanuel Vadot          - color
50*01950c46SEmmanuel Vadot
51*01950c46SEmmanuel Vadot    required:
52*01950c46SEmmanuel Vadot      - "#address-cells"
53*01950c46SEmmanuel Vadot      - "#size-cells"
54*01950c46SEmmanuel Vadot
55*01950c46SEmmanuel Vadotrequired:
56*01950c46SEmmanuel Vadot  - compatible
57*01950c46SEmmanuel Vadot  - reg
58*01950c46SEmmanuel Vadot  - multi-led
59*01950c46SEmmanuel Vadot
60*01950c46SEmmanuel VadotadditionalProperties: false
61*01950c46SEmmanuel Vadot
62*01950c46SEmmanuel Vadotexamples:
63*01950c46SEmmanuel Vadot  - |
64*01950c46SEmmanuel Vadot    #include <dt-bindings/leds/common.h>
65*01950c46SEmmanuel Vadot
66*01950c46SEmmanuel Vadot    i2c {
67*01950c46SEmmanuel Vadot        #address-cells = <1>;
68*01950c46SEmmanuel Vadot        #size-cells = <0>;
69*01950c46SEmmanuel Vadot
70*01950c46SEmmanuel Vadot        led-controller@38 {
71*01950c46SEmmanuel Vadot            compatible = "onnn,ncp5623";
72*01950c46SEmmanuel Vadot            reg = <0x38>;
73*01950c46SEmmanuel Vadot
74*01950c46SEmmanuel Vadot            multi-led {
75*01950c46SEmmanuel Vadot                color = <LED_COLOR_ID_RGB>;
76*01950c46SEmmanuel Vadot
77*01950c46SEmmanuel Vadot                #address-cells = <1>;
78*01950c46SEmmanuel Vadot                #size-cells = <0>;
79*01950c46SEmmanuel Vadot
80*01950c46SEmmanuel Vadot                led@0 {
81*01950c46SEmmanuel Vadot                    reg = <0>;
82*01950c46SEmmanuel Vadot                    color = <LED_COLOR_ID_RED>;
83*01950c46SEmmanuel Vadot                };
84*01950c46SEmmanuel Vadot
85*01950c46SEmmanuel Vadot                led@1 {
86*01950c46SEmmanuel Vadot                    reg = <1>;
87*01950c46SEmmanuel Vadot                    color = <LED_COLOR_ID_GREEN>;
88*01950c46SEmmanuel Vadot                };
89*01950c46SEmmanuel Vadot
90*01950c46SEmmanuel Vadot                led@2 {
91*01950c46SEmmanuel Vadot                    reg = <2>;
92*01950c46SEmmanuel Vadot                    color = <LED_COLOR_ID_BLUE>;
93*01950c46SEmmanuel Vadot                };
94*01950c46SEmmanuel Vadot            };
95*01950c46SEmmanuel Vadot        };
96*01950c46SEmmanuel Vadot    };
97