0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/leds-lp50xx.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: LED driver for LP50XX RGB LED from Texas Instruments.
0008
0009 maintainers:
0010 - Andrew Davis <afd@ti.com>
0011
0012 description: |
0013 The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into
0014 a LED group or control them individually.
0015
0016 The difference in these RGB LED drivers is the number of supported RGB
0017 modules.
0018
0019 For more product information please see the link below:
0020 https://www.ti.com/lit/ds/symlink/lp5012.pdf
0021 https://www.ti.com/lit/ds/symlink/lp5024.pdf
0022 https://www.ti.com/lit/ds/symlink/lp5036.pdf
0023
0024 properties:
0025 compatible:
0026 enum:
0027 - ti,lp5009
0028 - ti,lp5012
0029 - ti,lp5018
0030 - ti,lp5024
0031 - ti,lp5030
0032 - ti,lp5036
0033
0034 reg:
0035 maxItems: 1
0036 description:
0037 I2C slave address
0038 lp5009/12 - 0x14, 0x15, 0x16, 0x17
0039 lp5018/24 - 0x28, 0x29, 0x2a, 0x2b
0040 lp5030/36 - 0x30, 0x31, 0x32, 0x33
0041
0042 enable-gpios:
0043 maxItems: 1
0044 description: GPIO pin to enable/disable the device.
0045
0046 vled-supply:
0047 description: LED supply.
0048
0049 '#address-cells':
0050 const: 1
0051
0052 '#size-cells':
0053 const: 0
0054
0055 patternProperties:
0056 '^multi-led@[0-9a-f]$':
0057 type: object
0058 $ref: leds-class-multicolor.yaml#
0059 unevaluatedProperties: false
0060
0061 properties:
0062 reg:
0063 minItems: 1
0064 maxItems: 12
0065 description:
0066 This property denotes the LED module number(s) that is used on the
0067 for the child node. The LED modules can either be used stand alone
0068 or grouped into a module bank.
0069
0070 '#address-cells':
0071 const: 1
0072
0073 '#size-cells':
0074 const: 0
0075
0076 patternProperties:
0077 "^led@[0-9a-f]+$":
0078 type: object
0079 $ref: common.yaml#
0080
0081 required:
0082 - compatible
0083 - reg
0084
0085 additionalProperties: false
0086
0087 examples:
0088 - |
0089 #include <dt-bindings/gpio/gpio.h>
0090 #include <dt-bindings/leds/common.h>
0091
0092 i2c {
0093 #address-cells = <1>;
0094 #size-cells = <0>;
0095
0096 led-controller@14 {
0097 compatible = "ti,lp5009";
0098 reg = <0x14>;
0099 #address-cells = <1>;
0100 #size-cells = <0>;
0101 enable-gpios = <&gpio1 16>;
0102
0103 multi-led@1 {
0104 #address-cells = <1>;
0105 #size-cells = <0>;
0106 reg = <0x1>;
0107 color = <LED_COLOR_ID_RGB>;
0108 function = LED_FUNCTION_CHARGING;
0109
0110 led@0 {
0111 reg = <0x0>;
0112 color = <LED_COLOR_ID_RED>;
0113 };
0114
0115 led@1 {
0116 reg = <0x1>;
0117 color = <LED_COLOR_ID_GREEN>;
0118 };
0119
0120 led@2 {
0121 reg = <0x2>;
0122 color = <LED_COLOR_ID_BLUE>;
0123 };
0124 };
0125
0126 multi-led@3 {
0127 #address-cells = <1>;
0128 #size-cells = <0>;
0129 reg = <0x3>, <0x4>, <0x5>;
0130 color = <LED_COLOR_ID_RGB>;
0131 function = LED_FUNCTION_STANDBY;
0132
0133 led@3 {
0134 reg = <0x3>;
0135 color = <LED_COLOR_ID_RED>;
0136 };
0137
0138 led@4 {
0139 reg = <0x4>;
0140 color = <LED_COLOR_ID_GREEN>;
0141 };
0142
0143 led@5 {
0144 reg = <0x5>;
0145 color = <LED_COLOR_ID_BLUE>;
0146 };
0147 };
0148 };
0149 };
0150
0151 ...