WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / leds / leds-lp50xx.yaml
blobc192b5feadc76c80147ac2c99c1f34563d2256bd
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#
7 title: LED driver for LP50XX RGB LED from Texas Instruments.
9 maintainers:
10   - Dan Murphy <dmurphy@ti.com>
12 description: |
13   The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into
14   a LED group or control them individually.
16   The difference in these RGB LED drivers is the number of supported RGB
17   modules.
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
24 properties:
25   compatible:
26     enum:
27       - ti,lp5009
28       - ti,lp5012
29       - ti,lp5018
30       - ti,lp5024
31       - ti,lp5030
32       - ti,lp5036
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
42   enable-gpios:
43     maxItems: 1
44     description: GPIO pin to enable/disable the device.
46   vled-supply:
47     description: LED supply.
49   '#address-cells':
50     const: 1
52   '#size-cells':
53     const: 0
55 patternProperties:
56   '^multi-led@[0-9a-f]$':
57     type: object
58     allOf:
59       - $ref: leds-class-multicolor.yaml#
60     properties:
61       reg:
62         minItems: 1
63         maxItems: 12
64         description:
65           This property denotes the LED module number(s) that is used on the
66           for the child node.  The LED modules can either be used stand alone
67           or grouped into a module bank.
69     patternProperties:
70       "(^led-[0-9a-f]$|led)":
71         type: object
72         $ref: common.yaml#
74 required:
75   - compatible
76   - reg
78 additionalProperties: false
80 examples:
81   - |
82    #include <dt-bindings/gpio/gpio.h>
83    #include <dt-bindings/leds/common.h>
85    i2c {
86        #address-cells = <1>;
87        #size-cells = <0>;
89        led-controller@14 {
90            compatible = "ti,lp5009";
91            reg = <0x14>;
92            #address-cells = <1>;
93            #size-cells = <0>;
94            enable-gpios = <&gpio1 16>;
96            multi-led@1 {
97                #address-cells = <1>;
98                #size-cells = <0>;
99                reg = <0x1>;
100                color = <LED_COLOR_ID_RGB>;
101                function = LED_FUNCTION_CHARGING;
103                led-0 {
104                    color = <LED_COLOR_ID_RED>;
105                };
107                led-1 {
108                    color = <LED_COLOR_ID_GREEN>;
109                };
111                led-2 {
112                    color = <LED_COLOR_ID_BLUE>;
113                };
114           };
116           multi-led@2 {
117             #address-cells = <1>;
118             #size-cells = <2>;
119             reg = <0x2 0x3 0x5>;
120             color = <LED_COLOR_ID_RGB>;
121             function = LED_FUNCTION_STANDBY;
123             led-6 {
124               color = <LED_COLOR_ID_RED>;
125             };
127             led-7 {
128               color = <LED_COLOR_ID_GREEN>;
129             };
131             led-8 {
132               color = <LED_COLOR_ID_BLUE>;
133             };
134          };
135        };
136     };