16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/leds/leds-lp50xx.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: LED driver for LP50XX RGB LED from Texas Instruments.
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Andrew Davis <afd@ti.com>
116be33864SEmmanuel Vadot
126be33864SEmmanuel Vadotdescription: |
136be33864SEmmanuel Vadot  The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into
146be33864SEmmanuel Vadot  a LED group or control them individually.
156be33864SEmmanuel Vadot
166be33864SEmmanuel Vadot  The difference in these RGB LED drivers is the number of supported RGB
176be33864SEmmanuel Vadot  modules.
186be33864SEmmanuel Vadot
196be33864SEmmanuel Vadot  For more product information please see the link below:
206be33864SEmmanuel Vadot  https://www.ti.com/lit/ds/symlink/lp5012.pdf
216be33864SEmmanuel Vadot  https://www.ti.com/lit/ds/symlink/lp5024.pdf
226be33864SEmmanuel Vadot  https://www.ti.com/lit/ds/symlink/lp5036.pdf
236be33864SEmmanuel Vadot
246be33864SEmmanuel Vadotproperties:
256be33864SEmmanuel Vadot  compatible:
266be33864SEmmanuel Vadot    enum:
276be33864SEmmanuel Vadot      - ti,lp5009
286be33864SEmmanuel Vadot      - ti,lp5012
296be33864SEmmanuel Vadot      - ti,lp5018
306be33864SEmmanuel Vadot      - ti,lp5024
316be33864SEmmanuel Vadot      - ti,lp5030
326be33864SEmmanuel Vadot      - ti,lp5036
336be33864SEmmanuel Vadot
346be33864SEmmanuel Vadot  reg:
356be33864SEmmanuel Vadot    maxItems: 1
366be33864SEmmanuel Vadot    description:
376be33864SEmmanuel Vadot      I2C slave address
386be33864SEmmanuel Vadot      lp5009/12 - 0x14, 0x15, 0x16, 0x17
396be33864SEmmanuel Vadot      lp5018/24 - 0x28, 0x29, 0x2a, 0x2b
406be33864SEmmanuel Vadot      lp5030/36 - 0x30, 0x31, 0x32, 0x33
416be33864SEmmanuel Vadot
426be33864SEmmanuel Vadot  enable-gpios:
436be33864SEmmanuel Vadot    maxItems: 1
446be33864SEmmanuel Vadot    description: GPIO pin to enable/disable the device.
456be33864SEmmanuel Vadot
466be33864SEmmanuel Vadot  vled-supply:
476be33864SEmmanuel Vadot    description: LED supply.
486be33864SEmmanuel Vadot
496be33864SEmmanuel Vadot  '#address-cells':
506be33864SEmmanuel Vadot    const: 1
516be33864SEmmanuel Vadot
526be33864SEmmanuel Vadot  '#size-cells':
536be33864SEmmanuel Vadot    const: 0
546be33864SEmmanuel Vadot
556be33864SEmmanuel VadotpatternProperties:
566be33864SEmmanuel Vadot  '^multi-led@[0-9a-f]$':
576be33864SEmmanuel Vadot    type: object
58c9ccf3a3SEmmanuel Vadot    $ref: leds-class-multicolor.yaml#
59b97ee269SEmmanuel Vadot    unevaluatedProperties: false
60b97ee269SEmmanuel Vadot
616be33864SEmmanuel Vadot    properties:
626be33864SEmmanuel Vadot      reg:
636be33864SEmmanuel Vadot        minItems: 1
646be33864SEmmanuel Vadot        maxItems: 12
656be33864SEmmanuel Vadot        description:
666be33864SEmmanuel Vadot          This property denotes the LED module number(s) that is used on the
676be33864SEmmanuel Vadot          for the child node.  The LED modules can either be used stand alone
686be33864SEmmanuel Vadot          or grouped into a module bank.
696be33864SEmmanuel Vadot
70b97ee269SEmmanuel Vadot      '#address-cells':
71b97ee269SEmmanuel Vadot        const: 1
72b97ee269SEmmanuel Vadot
73b97ee269SEmmanuel Vadot      '#size-cells':
74b97ee269SEmmanuel Vadot        const: 0
75b97ee269SEmmanuel Vadot
766be33864SEmmanuel Vadot    patternProperties:
77b97ee269SEmmanuel Vadot      "^led@[0-9a-f]+$":
786be33864SEmmanuel Vadot        type: object
796be33864SEmmanuel Vadot        $ref: common.yaml#
80*8bab661aSEmmanuel Vadot        unevaluatedProperties: false
81*8bab661aSEmmanuel Vadot
82*8bab661aSEmmanuel Vadot        properties:
83*8bab661aSEmmanuel Vadot          reg:
84*8bab661aSEmmanuel Vadot            maxItems: 1
85*8bab661aSEmmanuel Vadot
86*8bab661aSEmmanuel Vadot        required:
87*8bab661aSEmmanuel Vadot          - reg
886be33864SEmmanuel Vadot
896be33864SEmmanuel Vadotrequired:
906be33864SEmmanuel Vadot  - compatible
916be33864SEmmanuel Vadot  - reg
926be33864SEmmanuel Vadot
936be33864SEmmanuel VadotadditionalProperties: false
946be33864SEmmanuel Vadot
956be33864SEmmanuel Vadotexamples:
966be33864SEmmanuel Vadot  - |
976be33864SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
986be33864SEmmanuel Vadot    #include <dt-bindings/leds/common.h>
996be33864SEmmanuel Vadot
1006be33864SEmmanuel Vadot    i2c {
1016be33864SEmmanuel Vadot        #address-cells = <1>;
1026be33864SEmmanuel Vadot        #size-cells = <0>;
1036be33864SEmmanuel Vadot
1046be33864SEmmanuel Vadot        led-controller@14 {
1056be33864SEmmanuel Vadot            compatible = "ti,lp5009";
1066be33864SEmmanuel Vadot            reg = <0x14>;
1076be33864SEmmanuel Vadot            #address-cells = <1>;
1086be33864SEmmanuel Vadot            #size-cells = <0>;
1096be33864SEmmanuel Vadot            enable-gpios = <&gpio1 16>;
1106be33864SEmmanuel Vadot
1116be33864SEmmanuel Vadot            multi-led@1 {
1126be33864SEmmanuel Vadot                #address-cells = <1>;
1136be33864SEmmanuel Vadot                #size-cells = <0>;
1146be33864SEmmanuel Vadot                reg = <0x1>;
1156be33864SEmmanuel Vadot                color = <LED_COLOR_ID_RGB>;
1166be33864SEmmanuel Vadot                function = LED_FUNCTION_CHARGING;
1176be33864SEmmanuel Vadot
118b97ee269SEmmanuel Vadot                led@0 {
119b97ee269SEmmanuel Vadot                     reg = <0x0>;
1206be33864SEmmanuel Vadot                     color = <LED_COLOR_ID_RED>;
1216be33864SEmmanuel Vadot                };
1226be33864SEmmanuel Vadot
123b97ee269SEmmanuel Vadot                led@1 {
124b97ee269SEmmanuel Vadot                     reg = <0x1>;
1256be33864SEmmanuel Vadot                     color = <LED_COLOR_ID_GREEN>;
1266be33864SEmmanuel Vadot                };
1276be33864SEmmanuel Vadot
128b97ee269SEmmanuel Vadot                led@2 {
129b97ee269SEmmanuel Vadot                     reg = <0x2>;
1306be33864SEmmanuel Vadot                     color = <LED_COLOR_ID_BLUE>;
1316be33864SEmmanuel Vadot                };
1326be33864SEmmanuel Vadot            };
1336be33864SEmmanuel Vadot
134b97ee269SEmmanuel Vadot            multi-led@3 {
1356be33864SEmmanuel Vadot                #address-cells = <1>;
136b97ee269SEmmanuel Vadot                #size-cells = <0>;
137b97ee269SEmmanuel Vadot                reg = <0x3>, <0x4>, <0x5>;
1386be33864SEmmanuel Vadot                color = <LED_COLOR_ID_RGB>;
1396be33864SEmmanuel Vadot                function = LED_FUNCTION_STANDBY;
1406be33864SEmmanuel Vadot
141b97ee269SEmmanuel Vadot                led@3 {
142b97ee269SEmmanuel Vadot                    reg = <0x3>;
1436be33864SEmmanuel Vadot                    color = <LED_COLOR_ID_RED>;
1446be33864SEmmanuel Vadot                };
1456be33864SEmmanuel Vadot
146b97ee269SEmmanuel Vadot                led@4 {
147b97ee269SEmmanuel Vadot                    reg = <0x4>;
1486be33864SEmmanuel Vadot                    color = <LED_COLOR_ID_GREEN>;
1496be33864SEmmanuel Vadot                };
1506be33864SEmmanuel Vadot
151b97ee269SEmmanuel Vadot                led@5 {
152b97ee269SEmmanuel Vadot                    reg = <0x5>;
1536be33864SEmmanuel Vadot                    color = <LED_COLOR_ID_BLUE>;
1546be33864SEmmanuel Vadot                };
1556be33864SEmmanuel Vadot            };
1566be33864SEmmanuel Vadot        };
1576be33864SEmmanuel Vadot    };
1586be33864SEmmanuel Vadot
1596be33864SEmmanuel Vadot...
160