LEDS for v6.20

- New Support & Features
   * Add support for the TI LP5812 4x3 matrix RGB LED driver, including autonomous animation engine
     control and extensive scan multiplexing modes.
   * Add a new driver for the ams Osram AS3668 4-channel I2C LED controller.
   * Extend the is31fl32xx driver to support the is31fl3293 variant, which features 3 channels and
     12-bit PWM resolution.
 
 - Improvements & Fixes
   * Prevent the ExpressWire KTD2801 chip from entering an undefined state by disabling interrupts
     during time-sensitive communication.
   * Ensure the Qualcomm LPG driver detects hardware write failures by checking the return value of
     regmap_bulk_write() during LUT programming.
   * Fix kernel-doc warnings in the lm3692x driver by documenting missing struct members and
     standardizing the comment style.
   * Update the ExpressWire library to use fsleep() and unexport internal-only functions.
   * Improve the is31fl32xx driver by reordering code to eliminate unnecessary forward declarations.
 
 - Cleanups & Refactoring
   * Simplify the LP55XX common LED driver by utilizing the for_each_available_child_of_node_scoped()
     macro for more concise node iteration.
 
 - Device Tree Bindings Updates
   * Add new YAML bindings for the TI LP5860 and LP5812 LED controllers, and the ams Osram AS3668.
   * Convert the TI LM3697 white LED driver binding to DT schema format.
   * Allow multicolor LED nodes to be named with numeric suffixes (e.g., multi-led-0) to handle
     multiple instances without unit addresses.
   * Document support for the PMH0101 variant in the Qualcomm LPG PWM and SPMI Flash LED bindings.
   * Add the issi,is31fl3293 compatible string to the is31fl32xx binding.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmmN1yEACgkQUa+KL4f8
 d2Fk8w/+NbgkKGY/B8j7f78Tlriy9QvZLXFVwj7SvlKBgMWlH2WwaEEfj7qTQntr
 ZheZsY9eU1rAT78zCOuPLIRujLSCurVSaX77YWKvgl3/j3KVC9jHkEA0ShftNGeL
 RXR0/dnzrPhfyrRLpIXvBY4QPHG4/CBpxhdvYsaxQ0+0Jl6jN262xdPS4MZjNJB/
 MPM01Bo3bXMUE3i8feiGUNqMe0yitHRqw8yfNEUo4nBnOkmT0WbGnatW/ifiWos8
 3q+XQDgj36eU9uCnTiXLbT/YMGPC4ZvZxy96MaCLWnGabaVE4XWwtHCzKoHdXpCG
 6g8FcAapg2XK+iNqmThbFjIhzk048bIQkDNuM/FGTUNsi7gUDODfAWbT133pB/gx
 v8moBUNo9csFCctM4BI4Is/xkmzrEzQQK3OQ7KZw1XymoC66vi0cc6mCzetwevAM
 08TTQmtlDdQGFHFrBNWvx0AXwe8uHDv154lE7taEx5d2by+eBi1Eh5nCum4346N0
 0jssEjwT78eFuwAV0pZW5rHvH5kchKnoWfTS+zpuPSUKTW5jTkUBoVcywu/YTm0e
 X1EkxJxZ/fQJvcL79QSqKnex1jXFC/a+D/81+piJZrQajkGFeutBQ28Wh0ka/n0j
 AjyxNAob5nGt65az7bpG26LIcXpXfdTwlmcKA3q5rOU4u0dmvsI=
 =IyMQ
 -----END PGP SIGNATURE-----

Merge tag 'leds-next-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds

Pull LED updates from Lee Jones:
 "New Support & Features:

   - Add support for the TI LP5812 4x3 matrix RGB LED driver, including
     autonomous animation engine control and extensive scan multiplexing
     modes

   - Add a new driver for the ams Osram AS3668 4-channel I2C LED
     controller

   - Extend the is31fl32xx driver to support the is31fl3293 variant,
     which features 3 channels and 12-bit PWM resolution

  Improvements & Fixes:

   - Prevent the ExpressWire KTD2801 chip from entering an undefined
     state by disabling interrupts during time-sensitive communication

   - Ensure the Qualcomm LPG driver detects hardware write failures by
     checking the return value of regmap_bulk_write() during LUT
     programming

   - Fix kernel-doc warnings in the lm3692x driver by documenting
     missing struct members and standardizing the comment style

   - Update the ExpressWire library to use fsleep() and unexport
     internal-only functions

   - Improve the is31fl32xx driver by reordering code to eliminate
     unnecessary forward declarations

  Cleanups & Refactoring:

   - Simplify the LP55XX common LED driver by utilizing the
     for_each_available_child_of_node_scoped() macro for more concise
     node iteration

  Device Tree Bindings Updates:

   - Add new YAML bindings for the TI LP5860 and LP5812 LED controllers,
     and the ams Osram AS3668

   - Convert the TI LM3697 white LED driver binding to DT schema format

   - Allow multicolor LED nodes to be named with numeric suffixes (e.g.,
     multi-led-0) to handle multiple instances without unit addresses

   - Document support for the PMH0101 variant in the Qualcomm LPG PWM
     and SPMI Flash LED bindings

   - Add the issi,is31fl3293 compatible string to the is31fl32xx
     binding"

* tag 'leds-next-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds:
  dt-bindings: leds: Convert ti,lm3697 to DT schema
  leds: as3668: Driver for the ams Osram 4-channel i2c LED driver
  dt-bindings: leds: Add new as3668 support
  docs: leds: Document TI LP5812 LED driver
  leds: Add basic support for TI/National Semiconductor LP5812 LED Driver
  leds: qcom-lpg: Check the return value of regmap_bulk_write()
  dt-bindings: leds: qcom,spmi-flash-led: Add PMH0101 compatible
  dt-bindings: leds: leds-qcom-lpg: Add support for PMH0101 PWM
  dt-bindings: leds: Allow differently named multicolor LEDs
  leds: lp55xx: Simplify with scoped for each OF child loop
  dt-bindings: leds: add TI/National Semiconductor LP5812 LED Driver
  leds: is31f132xx: Add support for is31fl3293
  leds: is31f132xx: Re-order code to remove forward declarations
  dt-bindings: leds: Add issi,is31fl3293 to leds-is31fl32xx
  leds: expresswire: Fix chip state breakage
  dt-bindings: leds: Add LP5860 LED controller
  leds: lm3692x: Fix kernel-doc for struct lm3692x_led
This commit is contained in:
Linus Torvalds 2026-02-16 11:15:19 -08:00
commit 2228d9cf7a
25 changed files with 1892 additions and 166 deletions

View file

@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ams,as3668.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Osram 4-channel i2c LED driver
maintainers:
- Lukas Timmermann <linux@timmermann.space>
description:
This IC can drive up to four separate LEDs.
Having four channels suggests it could be used with a single RGBW LED.
properties:
compatible:
const: ams,as3668
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maxItems: 1
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@42 {
compatible = "ams,as3668";
reg = <0x42>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <0x1>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
};
};
};

View file

@ -21,7 +21,7 @@ description: |
properties:
$nodename:
pattern: "^multi-led(@[0-9a-f])?$"
pattern: "^multi-led(@[0-9a-f]|-[0-9]+)?$"
color:
description: |

View file

@ -10,6 +10,7 @@ Required properties:
issi,is31fl3235
issi,is31fl3218
issi,is31fl3216
issi,is31fl3293
si-en,sn3218
si-en,sn3216
- reg: I2C slave address

View file

@ -1,73 +0,0 @@
* Texas Instruments - LM3697 Highly Efficient White LED Driver
The LM3697 11-bit LED driver provides high-
performance backlight dimming for 1, 2, or 3 series
LED strings while delivering up to 90% efficiency.
This device is suitable for display and keypad lighting
Required properties:
- compatible:
"ti,lm3697"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0
Optional properties:
- enable-gpios : GPIO pin to enable/disable the device
- vled-supply : LED supply
Required child properties:
- reg : 0 - LED is Controlled by bank A
1 - LED is Controlled by bank B
- led-sources : Indicates which HVLED string is associated to which
control bank. This is a zero based property so
HVLED1 = 0, HVLED2 = 1, HVLED3 = 2.
Additional information is contained
in Documentation/devicetree/bindings/leds/common.txt
Optional child properties:
- ti,brightness-resolution - see Documentation/devicetree/bindings/mfd/ti-lmu.txt
- ramp-up-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
- ramp-down-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
- label : see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger :
see Documentation/devicetree/bindings/leds/common.txt
Example:
HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is
controlled by control bank B.
led-controller@36 {
compatible = "ti,lm3697";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x36>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
vled-supply = <&vbatt>;
led@0 {
reg = <0>;
led-sources = <0 2>;
ti,brightness-resolution = <2047>;
ramp-up-us = <5000>;
ramp-down-us = <1000>;
label = "white:first_backlight_cluster";
linux,default-trigger = "backlight";
};
led@1 {
reg = <1>;
led-sources = <1>;
ti,brightness-resolution = <255>;
ramp-up-us = <500>;
ramp-down-us = <1000>;
label = "white:second_backlight_cluster";
linux,default-trigger = "backlight";
};
}
For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lm3697.pdf

View file

@ -0,0 +1,111 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-lp5860.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LED driver for LP5860 RGB LED from Texas Instruments.
maintainers:
- Steffen Trumtrar <kernel@pengutronix.de>
description: |
The LP5860 is multi-channel, I2C and SPI RGB LED Driver that can group RGB LEDs
into a LED group or control them individually.
For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lp5860.pdf
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- ti,lp5860
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
'^multi-led@[0-9a-f]+$':
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 198
description:
This property denotes the LED module number that is used
for the child node.
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maxItems: 1
required:
- reg
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
led-controller@0 {
compatible = "ti,lp5860";
reg = <0x0>;
#address-cells = <1>;
#size-cells = <0>;
multi-led@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0>;
color = <LED_COLOR_ID_RGB>;
led@0 {
reg = <0x0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <0x1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <0x2>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
};

View file

@ -43,6 +43,7 @@ properties:
- items:
- enum:
- qcom,pm8550-pwm
- qcom,pmh0101-pwm
- const: qcom,pm8350c-pwm
- items:
- enum:

View file

@ -29,6 +29,7 @@ properties:
- qcom,pm8150l-flash-led
- qcom,pm8350c-flash-led
- qcom,pm8550-flash-led
- qcom,pmh0101-flash-led
- qcom,pmi8998-flash-led
- const: qcom,spmi-flash-led

View file

@ -0,0 +1,125 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,lm3697.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI LM3697 Highly Efficient White LED Driver
maintainers:
- Dan Murphy <dmurphy@ti.com>
description: >
The LM3697 11-bit LED driver provides high-performance backlight dimming for
1, 2, or 3 series LED strings while delivering up to 90% efficiency.
This device is suitable for display and keypad lighting.
properties:
compatible:
const: ti,lm3697
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
enable-gpios:
description: GPIO pin to enable or disable the device.
maxItems: 1
vled-supply:
description: LED supply for the device.
patternProperties:
'^led@[01]$':
description: LED control bank nodes.
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Control bank selection (0 = bank A, 1 = bank B).
maximum: 1
led-sources:
description: >
HVLED strings associated with this control bank:
0 - HVLED1
1 - HVLED2
2 - HVLED3
minItems: 1
maxItems: 3
items:
maximum: 2
ti,brightness-resolution:
description: Brightness resolution for the LED string.
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 2047
ramp-up-us:
description: Ramp-up time in microseconds.
minimum: 117
maximum: 2048
ramp-down-us:
description: Ramp-down time in microseconds.
minimum: 117
maximum: 2048
required:
- reg
- led-sources
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@36 {
compatible = "ti,lm3697";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x36>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
vled-supply = <&vbatt>;
led@0 {
reg = <0>;
led-sources = <0 2>;
ti,brightness-resolution = <2047>;
ramp-up-us = <500>;
ramp-down-us = <1000>;
label = "white:first_backlight_cluster";
linux,default-trigger = "backlight";
};
led@1 {
reg = <1>;
led-sources = <1>;
ti,brightness-resolution = <255>;
ramp-up-us = <500>;
ramp-down-us = <1000>;
label = "white:second_backlight_cluster";
linux,default-trigger = "backlight";
};
};
};

View file

@ -0,0 +1,246 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,lp5812.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI LP5812 4x3 Matrix RGB LED Driver with Autonomous Control
maintainers:
- Nam Tran <trannamatk@gmail.com>
description: |
The LP5812 is a 4x3 matrix RGB LED driver with I2C interface
and autonomous animation engine control.
For more product information please see the link below:
https://www.ti.com/product/LP5812#tech-docs
properties:
compatible:
const: ti,lp5812
reg:
maxItems: 1
ti,scan-mode:
description: |
Selects the LED scan mode of the LP5812. The device supports
three modes:
- Direct-drive mode (by default if 'ti,scan-mode' is omitted)
drives up to 4 LEDs directly by internal current sinks (LED0-LED3).
- TCM-drive mode ("tcm:<n>:<order...>") drives up to 12 LEDs
(4 RGB) using 1-4 scan multiplexing. The <n> specifies the number
of scans (1-4), and <order...> defines the scan order of the outputs.
- Mix-drive mode ("mix:<n>:<direct>:<order...>") combines
direct-drive and TCM-drive outputs. The <n> specifies the number
of scans, <direct> selects the direct-drive outputs, and <order...>
defines the scan order.
$ref: /schemas/types.yaml#/definitions/string
pattern: '^(tcm|mix):[1-4](:[0-3]){1,4}$'
vcc-supply:
description: Regulator providing power to the 'VCC' pin.
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 3
required:
- reg
"^multi-led@[4-7]$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 4
maximum: 7
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[4-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 4
maximum: 15
required:
- reg
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@1b {
#address-cells = <1>;
#size-cells = <0>;
compatible = "ti,lp5812";
reg = <0x1b>;
ti,scan-mode = "tcm:4:0:1:2:3";
vcc-supply = <&vdd_3v3_reg>;
led@0 {
reg = <0x0>;
label = "LED0";
led-max-microamp = <25500>;
};
led@1 {
reg = <0x1>;
label = "LED1";
led-max-microamp = <25500>;
};
led@2 {
reg = <0x2>;
label = "LED2";
led-max-microamp = <25500>;
};
led@3 {
reg = <0x3>;
label = "LED3";
led-max-microamp = <25500>;
};
multi-led@4 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x4>;
color = <LED_COLOR_ID_RGB>;
label = "LED_A";
led@4 {
reg = <0x4>;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <25500>;
};
led@5 {
reg = <0x5>;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <25500>;
};
led@6 {
reg = <0x6>;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <25500>;
};
};
multi-led@5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x5>;
color = <LED_COLOR_ID_RGB>;
label = "LED_B";
led@7 {
reg = <0x7>;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <25500>;
};
led@8 {
reg = <0x8>;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <25500>;
};
led@9 {
reg = <0x9>;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <25500>;
};
};
multi-led@6 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x6>;
color = <LED_COLOR_ID_RGB>;
label = "LED_C";
led@a {
reg = <0xa>;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <25500>;
};
led@b {
reg = <0xb>;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <25500>;
};
led@c {
reg = <0xc>;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <25500>;
};
};
multi-led@7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x7>;
color = <LED_COLOR_ID_RGB>;
label = "LED_D";
led@d {
reg = <0xd>;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <25500>;
};
led@e {
reg = <0xe>;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <25500>;
};
led@f {
reg = <0xf>;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <25500>;
};
};
};
};
...

View file

@ -25,6 +25,7 @@ LEDs
leds-lp5523
leds-lp5562
leds-lp55xx
leds-lp5812
leds-mlxcpld
leds-mt6370-rgb
leds-sc27xx

View file

@ -0,0 +1,50 @@
.. SPDX-License-Identifier: GPL-2.0
========================
Kernel driver for lp5812
========================
* TI/National Semiconductor LP5812 LED Driver
* Datasheet: https://www.ti.com/product/LP5812#tech-docs
Authors: Jared Zhou <jared-zhou@ti.com>
Description
===========
The LP5812 is a 4x3 matrix LED driver with support for both manual and
autonomous animation control. This driver provides sysfs interfaces to
control and configure the LP5812 device and its LED channels.
Sysfs Interface
===============
This driver uses the standard multicolor LED class interfaces defined
in Documentation/ABI/testing/sysfs-class-led-multicolor.rst.
Each LP5812 LED output appears under ``/sys/class/leds/`` with its
assigned label (for example ``LED_A``).
The following attributes are exposed:
- multi_intensity: Per-channel RGB intensity control
- brightness: Standard brightness control (0-255)
Autonomous Control Modes
========================
The driver also supports autonomous control through pattern configuration
(e.g., direct, tcmscan, or mixscan modes) defined in the device tree.
When configured, the LP5812 can generate transitions and color effects
without CPU intervention.
Refer to the device tree binding document for valid mode strings and
configuration examples.
Example Usage
=============
To control LED_A::
# Set RGB intensity (R=50, G=50, B=50)
echo 50 50 50 > /sys/class/leds/LED_A/multi_intensity
# Set overall brightness to maximum
echo 255 > /sys/class/leds/LED_A/brightness