xref: /linux/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml (revision 00a37271c8a68070dc64f81a5d64644beb4cef2f)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/leds-lp50xx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: LED driver for LP50XX RGB LED from Texas Instruments.
8
9maintainers:
10  - Andrew Davis <afd@ti.com>
11
12description: |
13  The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into
14  a LED group or control them individually.
15
16  The difference in these RGB LED drivers is the number of supported RGB
17  modules.
18
19  For more product information please see the link below:
20  https://www.ti.com/lit/ds/symlink/lp5012.pdf
21  https://www.ti.com/lit/ds/symlink/lp5024.pdf
22  https://www.ti.com/lit/ds/symlink/lp5036.pdf
23
24properties:
25  compatible:
26    enum:
27      - ti,lp5009
28      - ti,lp5012
29      - ti,lp5018
30      - ti,lp5024
31      - ti,lp5030
32      - ti,lp5036
33
34  reg:
35    maxItems: 1
36    description:
37      I2C slave address
38      lp5009/12 - 0x14, 0x15, 0x16, 0x17
39      lp5018/24 - 0x28, 0x29, 0x2a, 0x2b
40      lp5030/36 - 0x30, 0x31, 0x32, 0x33
41
42  enable-gpios:
43    maxItems: 1
44    description: GPIO pin to enable/disable the device.
45
46  vled-supply:
47    description: LED supply.
48
49  '#address-cells':
50    const: 1
51
52  '#size-cells':
53    const: 0
54
55patternProperties:
56  '^multi-led@[0-9a-f]$':
57    type: object
58    $ref: leds-class-multicolor.yaml#
59    unevaluatedProperties: false
60
61    properties:
62      reg:
63        minItems: 1
64        maxItems: 12
65        description:
66          This property denotes the LED module number(s) that is used on the
67          for the child node.  The LED modules can either be used stand alone
68          or grouped into a module bank.
69
70      '#address-cells':
71        const: 1
72
73      '#size-cells':
74        const: 0
75
76    patternProperties:
77      "^led@[0-9a-f]+$":
78        type: object
79        $ref: common.yaml#
80        unevaluatedProperties: false
81
82        properties:
83          reg:
84            items:
85              - minimum: 0
86                maximum: 2
87
88            description:
89              This property denotes the index within the LED bank.
90
91        required:
92          - reg
93
94required:
95  - compatible
96  - reg
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/gpio/gpio.h>
103    #include <dt-bindings/leds/common.h>
104
105    i2c {
106        #address-cells = <1>;
107        #size-cells = <0>;
108
109        led-controller@14 {
110            compatible = "ti,lp5009";
111            reg = <0x14>;
112            #address-cells = <1>;
113            #size-cells = <0>;
114            enable-gpios = <&gpio1 16>;
115
116            multi-led@1 {
117                #address-cells = <1>;
118                #size-cells = <0>;
119                reg = <0x1>;
120                color = <LED_COLOR_ID_RGB>;
121                function = LED_FUNCTION_CHARGING;
122
123                led@0 {
124                     reg = <0x0>;
125                     color = <LED_COLOR_ID_RED>;
126                };
127
128                led@1 {
129                     reg = <0x1>;
130                     color = <LED_COLOR_ID_GREEN>;
131                };
132
133                led@2 {
134                     reg = <0x2>;
135                     color = <LED_COLOR_ID_BLUE>;
136                };
137            };
138
139            multi-led@3 {
140                #address-cells = <1>;
141                #size-cells = <0>;
142                reg = <0x3>, <0x4>, <0x5>;
143                color = <LED_COLOR_ID_RGB>;
144                function = LED_FUNCTION_STANDBY;
145
146                led@0 {
147                    reg = <0x0>;
148                    color = <LED_COLOR_ID_RED>;
149                };
150
151                led@1 {
152                    reg = <0x1>;
153                    color = <LED_COLOR_ID_GREEN>;
154                };
155
156                led@2 {
157                    reg = <0x2>;
158                    color = <LED_COLOR_ID_BLUE>;
159                };
160            };
161        };
162    };
163
164...
165