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