Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,138 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/allwinner,sun50i-a100-ledc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A100 LED Controller
maintainers:
- Samuel Holland <samuel@sholland.org>
description:
The LED controller found in Allwinner sunxi SoCs uses a one-wire serial
interface to drive up to 1024 RGB LEDs.
properties:
compatible:
oneOf:
- const: allwinner,sun50i-a100-ledc
- items:
- enum:
- allwinner,sun20i-d1-ledc
- allwinner,sun50i-r329-ledc
- allwinner,sun55i-a523-ledc
- const: allwinner,sun50i-a100-ledc
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
interrupts:
maxItems: 1
clocks:
items:
- description: Bus clock
- description: Module clock
clock-names:
items:
- const: bus
- const: mod
resets:
maxItems: 1
dmas:
maxItems: 1
description: TX DMA channel
dma-names:
const: tx
allwinner,pixel-format:
description: Pixel format (subpixel transmission order), default is "grb"
enum:
- bgr
- brg
- gbr
- grb
- rbg
- rgb
allwinner,t0h-ns:
default: 336
description: Length of high pulse when transmitting a "0" bit
allwinner,t0l-ns:
default: 840
description: Length of low pulse when transmitting a "0" bit
allwinner,t1h-ns:
default: 882
description: Length of high pulse when transmitting a "1" bit
allwinner,t1l-ns:
default: 294
description: Length of low pulse when transmitting a "1" bit
allwinner,treset-ns:
default: 300000
description: Minimum delay between transmission frames
patternProperties:
"^multi-led@[0-9a-f]+$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 1023
description: Index of the LED in the series (must be contiguous)
required:
- reg
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- resets
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
ledc: led-controller@2008000 {
compatible = "allwinner,sun20i-d1-ledc",
"allwinner,sun50i-a100-ledc";
reg = <0x2008000 0x400>;
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu 12>, <&ccu 34>;
clock-names = "bus", "mod";
resets = <&ccu 12>;
dmas = <&dma 42>;
dma-names = "tx";
#address-cells = <1>;
#size-cells = <0>;
multi-led@0 {
reg = <0x0>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_INDICATOR;
};
};
...
@@ -0,0 +1,130 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ams,as3645a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AS3645A LED Controller
maintainers:
- Sakari Ailus <sakari.ailus@iki.fi>
description:
The AS3645A flash LED controller can drive two LEDs, one
high current flash LED and one indicator LED. The high
current flash LED can be used in torch mode as well.
properties:
compatible:
const: ams,as3645a
"#address-cells":
const: 1
"#size-cells":
const: 0
reg:
maxItems: 1
led@0:
description: led0 describes the 'flash' feature
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
const: 0
flash-timeout-us:
minimum: 100000
maximum: 850000
multipleOf: 50000
flash-max-microamp:
minimum: 200000
maximum: 500000
multipleOf: 20000
led-max-microamp:
minimum: 20000
maximum: 160000
multipleOf: 20000
description:
Maximum current when in torch (assist) mode.
ams,input-max-microamp:
minimum: 1250000
maximum: 2000000
multipleOf: 50000
required:
- reg
- flash-timeout-us
- flash-max-microamp
- led-max-microamp
- ams,input-max-microamp
led@1:
description: led1 describes the 'indicator' feature
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
const: 1
led-max-microamp:
enum:
- 2500
- 5000
- 7500
- 10000
description:
Maximum indicator current.
required:
- reg
- led-max-microamp
required:
- compatible
- reg
- "#size-cells"
- "#address-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c{
#address-cells = <1>;
#size-cells = <0>;
led-controller@30 {
compatible = "ams,as3645a";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x30>;
led@0 {
reg = <0>;
flash-timeout-us = <150000>;
flash-max-microamp = <320000>;
led-max-microamp = <60000>;
ams,input-max-microamp = <1750000>;
function = LED_FUNCTION_FLASH;
};
led@1 {
reg = <1>;
led-max-microamp = <10000>;
function = LED_FUNCTION_INDICATOR;
};
};
};
...
@@ -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>;
};
};
};
@@ -0,0 +1,173 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/awinic,aw200xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AWINIC AW200XX LED
maintainers:
- Martin Kurbanov <mmkurbanov@sberdevices.ru>
description: |
It is a matrix LED driver programmed via an I2C interface. Devices have
a set of individually controlled leds and support 3 pattern controllers
for auto breathing or group dimming control. Supported devices:
- AW20036 (3x12) 36 LEDs
- AW20054 (6x9) 54 LEDs
- AW20072 (6x12) 72 LEDs
- AW20108 (9x12) 108 LEDs
For more product information please see the link below:
aw20036 - https://www.awinic.com/en/productDetail/AW20036QNR#tech-docs
aw20054 - https://www.awinic.com/en/productDetail/AW20054QNR#tech-docs
aw20072 - https://www.awinic.com/en/productDetail/AW20072QNR#tech-docs
aw20108 - https://www.awinic.com/en/productDetail/AW20108QNR#tech-docs
properties:
compatible:
enum:
- awinic,aw20036
- awinic,aw20054
- awinic,aw20072
- awinic,aw20108
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
enable-gpios:
maxItems: 1
patternProperties:
"^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description:
LED number
maxItems: 1
led-max-microamp:
default: 9780
description: |
Note that a driver will take the minimum of all LED limits
since the chip has a single global setting.
The maximum output current of each LED is calculated by the
following formula:
IMAXled = 160000 * (592 / 600.5) * (1 / max-current-switch-number)
And the minimum output current formula:
IMINled = 3300 * (592 / 600.5) * (1 / max-current-switch-number)
where max-current-switch-number is determined by led configuration
and depends on how leds are physically connected to the led driver.
allOf:
- if:
properties:
compatible:
contains:
const: awinic,aw20036
then:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
items:
minimum: 0
maximum: 36
- if:
properties:
compatible:
contains:
const: awinic,aw20054
then:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
items:
minimum: 0
maximum: 54
- if:
properties:
compatible:
contains:
const: awinic,aw20072
then:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
items:
minimum: 0
maximum: 72
- if:
properties:
compatible:
contains:
const: awinic,aw20108
then:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
items:
minimum: 0
maximum: 108
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@3a {
compatible = "awinic,aw20036";
reg = <0x3a>;
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
led@0 {
reg = <0x0>;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <9780>;
};
led@1 {
reg = <0x1>;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <9780>;
};
led@2 {
reg = <0x2>;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <9780>;
};
};
};
...
@@ -0,0 +1,15 @@
88pm860x-backlight bindings
Optional properties:
- marvell,88pm860x-iset: Current supplies on backlight device.
- marvell,88pm860x-pwm: PWM frequency on backlight device.
Example:
backlights {
backlight-0 {
marvell,88pm860x-iset = <4>;
marvell,88pm860x-pwm = <3>;
};
backlight-2 {
};
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/apple,dwi-bl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple DWI 2-Wire Interface Backlight Controller
maintainers:
- Nick Chan <towinchenmi@gmail.com>
description:
Apple SoCs contain a 2-wire interface called DWI. On some Apple iPhones,
iPads and iPod touches with a LCD display, 1-2 backlight controllers
are connected via DWI. Interfacing with DWI controls all backlight
controllers at the same time. As such, the backlight controllers are
treated as a single controller regardless of the underlying
configuration.
allOf:
- $ref: common.yaml#
properties:
compatible:
items:
- enum:
- apple,s5l8960x-dwi-bl
- apple,t7000-dwi-bl
- apple,s8000-dwi-bl
- apple,t8010-dwi-bl
- apple,t8015-dwi-bl
- const: apple,dwi-bl
reg:
maxItems: 1
power-domains:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
soc {
#address-cells = <2>;
#size-cells = <2>;
dwi_bl: backlight@20e200010 {
compatible = "apple,s5l8960x-dwi-bl", "apple,dwi-bl";
reg = <0x2 0x0e200010 0x0 0x8>;
power-domains = <&ps_dwi>;
};
};
@@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/arc,arc2c0608.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ArcticSand arc2c0608 LED driver
description: |
The ArcticSand arc2c0608 LED driver provides ultra
efficient notebook backlighting. Optional properties not
specified will default to values in IC EPROM.
Datasheet:
https://www.murata.com/-/media/webrenewal/products/power/power-semiconductor/overview/lineup/led-boost/arc2/arc2c0608.ashx.
maintainers:
- Brian Dodge <bdodge@arcticsand.com>
allOf:
- $ref: /schemas/leds/common.yaml
properties:
compatible:
const: arc,arc2c0608
reg:
maxItems: 1
default-brightness:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 4095
led-sources:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: List of enabled channels
items:
enum: [0, 1, 2, 3, 4, 5]
minItems: 1
uniqueItems: true
arc,led-config-0:
$ref: /schemas/types.yaml#/definitions/uint32
description: Fading speed (period between intensity
steps)
arc,led-config-1:
$ref: /schemas/types.yaml#/definitions/uint32
description: If set, sets ILED_CONFIG register. Used for
fine tuning the maximum LED current.
arc,dim-freq:
$ref: /schemas/types.yaml#/definitions/uint32
description: PWM mode frequency setting (bits [3:0] used)
arc,comp-config:
$ref: /schemas/types.yaml#/definitions/uint32
description: Setting for register CONFIG_COMP which
controls internal resitances, feed forward freqs,
and initial VOUT at startup. Consult the datasheet.
arc,filter-config:
$ref: /schemas/types.yaml#/definitions/uint32
description: RC and PWM Filter settings.
Bit Assignment
7654 3 2 1 0
xxxx RCF1 RCF0 PWM1 PWM0
RCF statuses PWM Filter Statues
00 = OFF (default) 00 = OFF (default)
01 = LOW 01 = 2 STEPS
10 - MEDIUM 10 = 4 STEPS
11 = HIGH 11 = 8 STEPS
arc,trim-config:
$ref: /schemas/types.yaml#/definitions/uint32
description: Sets percentage increase of Maximum LED
Current.
0x00 = 0% increase.
0x20 = 20.2%.
0x3F = 41.5%
label: true
linux,default-trigger: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@30 {
compatible = "arc,arc2c0608";
reg = <0x30>;
default-brightness = <500>;
label = "lcd-backlight";
linux,default-trigger = "backlight";
led-sources = <0 1 2 5>;
};
};
...
@@ -0,0 +1,101 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/awinic,aw99706.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Awinic AW99706 6-channel WLED Backlight Driver
maintainers:
- Junjie Cao <caojunjie650@gmail.com>
allOf:
- $ref: common.yaml#
properties:
compatible:
const: awinic,aw99706
reg:
maxItems: 1
enable-gpios:
description: GPIO to use to enable/disable the backlight (HWEN pin).
maxItems: 1
awinic,dim-mode:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Select dimming mode of the device.
0 = Bypass mode.
1 = DC mode.
2 = MIX mode(PWM at low brightness and DC at high brightness).
3 = MIX-26k mode(MIX mode with different PWM frequency).
enum: [ 0, 1, 2, 3 ]
default: 1
awinic,sw-freq-hz:
description: Boost switching frequency in Hz.
enum: [ 300000, 400000, 500000, 600000, 660000, 750000, 850000, 1000000,
1200000, 1330000, 1500000, 1700000 ]
default: 750000
awinic,sw-ilmt-microamp:
description: Switching current limitation in uA.
enum: [ 1500000, 2000000, 2500000, 3000000 ]
default: 3000000
awinic,iled-max-microamp:
description: Maximum LED current setting in uA.
minimum: 5000
maximum: 50000
multipleOf: 500
default: 20000
awinic,uvlo-thres-microvolt:
description: UVLO(Under Voltage Lock Out) in uV.
enum: [ 2200000, 5000000 ]
default: 2200000
awinic,ramp-ctl:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Select ramp control and filter of the device.
0 = Fade in/fade out.
1 = Light filter.
2 = Medium filter.
3 = Heavy filter.
enum: [ 0, 1, 2, 3 ]
default: 2
required:
- compatible
- reg
- enable-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@76 {
compatible = "awinic,aw99706";
reg = <0x76>;
enable-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
default-brightness = <2047>;
max-brightness = <4095>;
awinic,dim-mode = <1>;
awinic,sw-freq-hz = <750000>;
awinic,sw-ilmt-microamp = <3000000>;
awinic,uvlo-thres-microvolt = <2200000>;
awinic,iled-max-microamp = <20000>;
awinic,ramp-ctl = <2>;
};
};
...
@@ -0,0 +1,53 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common backlight properties
maintainers:
- Lee Jones <lee@kernel.org>
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
description:
Backlight devices provide backlight for different types of graphical
displays. They are typically but not necessarily implemented using a white
LED powered by a boost converter.
properties:
default-brightness:
description:
The default brightness that should be applied to the LED by the operating
system on start-up. The brightness should not exceed the brightness the
LED can provide.
$ref: /schemas/types.yaml#/definitions/uint32
max-brightness:
description:
Normally the maximum brightness is determined by the hardware and this
property is not required. This property is used to put a software limit
on the brightness apart from what the driver says, as it could happen
that a LED can be made so bright that it gets damaged or causes damage
due to restrictions in a specific system, such as mounting conditions.
$ref: /schemas/types.yaml#/definitions/uint32
brightness-levels:
description:
Array of distinct brightness levels. The levels must be in the range
accepted by the underlying LED device. Typically these are in the range
from 0 to 255, but any range starting at 0 will do, as long as they are
accepted by the LED.
The 0 value means a 0% of brightness (darkest/off), while the last value
in the array represents a full 100% brightness (brightest).
If this array is not provided, the driver default mapping is used.
$ref: /schemas/types.yaml#/definitions/uint32-array
default-brightness-level:
description:
The default brightness level (index into the array defined by the
"brightness-levels" property).
$ref: /schemas/types.yaml#/definitions/uint32
additionalProperties: true
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/gpio-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: gpio-backlight
maintainers:
- Lee Jones <lee@kernel.org>
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
properties:
compatible:
const: gpio-backlight
gpios:
description: The gpio that is used for enabling/disabling the backlight.
maxItems: 1
default-on:
description: enable the backlight at boot.
type: boolean
required:
- compatible
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
backlight {
compatible = "gpio-backlight";
gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
default-on;
};
...
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktd253.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Kinetic Technologies KTD253 and KTD259 one-wire backlight
maintainers:
- Linus Walleij <linusw@kernel.org>
description: |
The Kinetic Technologies KTD253 and KTD259 are white LED backlights
controlled by a single GPIO line. If you just turn on the backlight
it goes to maximum backlight then you can set the level of backlight
using pulses on the enable wire. This is sometimes referred to as
"expresswire".
allOf:
- $ref: common.yaml#
properties:
compatible:
items:
- enum:
- kinetic,ktd253
- kinetic,ktd259
enable-gpios:
description: GPIO to use to enable/disable and dim the backlight.
maxItems: 1
default-brightness: true
max-brightness: true
required:
- compatible
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
backlight {
compatible = "kinetic,ktd253";
enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
default-brightness = <13>;
};
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktd2801.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Kinetic Technologies KTD2801 one-wire backlight
maintainers:
- Duje Mihanović <duje.mihanovic@skole.hr>
description: |
The Kinetic Technologies KTD2801 is a LED backlight driver controlled
by a single GPIO line. The driver can be controlled with a PWM signal
or by pulsing the GPIO line to set the backlight level. This is called
"ExpressWire".
allOf:
- $ref: common.yaml#
properties:
compatible:
const: kinetic,ktd2801
ctrl-gpios:
maxItems: 1
default-brightness: true
max-brightness: true
required:
- compatible
- ctrl-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
backlight {
compatible = "kinetic,ktd2801";
ctrl-gpios = <&gpio 97 GPIO_ACTIVE_HIGH>;
max-brightness = <210>;
default-brightness = <100>;
};
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/kinetic,ktz8866.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Kinetic Technologies KTZ8866 backlight
maintainers:
- Jianhua Lu <lujianhua000@gmail.com>
description: |
The Kinetic Technologies KTZ8866 is a high efficiency 6-channels-current-sinks
led backlight with dual lcd bias power.
https://www.kinet-ic.com/ktz8866/
allOf:
- $ref: common.yaml#
properties:
compatible:
const: kinetic,ktz8866
reg:
maxItems: 1
vddpos-supply:
description: positive boost supply regulator.
vddneg-supply:
description: negative boost supply regulator.
enable-gpios:
description: GPIO to use to enable/disable the backlight (HWEN pin).
maxItems: 1
current-num-sinks:
description: number of the LED current sinks' channels.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 3, 4, 5, 6]
kinetic,current-ramp-delay-ms:
description: |
LED current ramping delay time in milliseconds, note that the
case 1 will be mapped to 1μs.
enum: [1, 2, 4, 8, 16, 32, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640]
kinetic,led-enable-ramp-delay-ms:
description: |
LED on/off ramping delay time in milliseconds, note that the case 0 will be
mapped to 512μs because ktz8866 can't ramp faster than it.
enum: [0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]
kinetic,enable-lcd-bias:
description: Set if we want to output bias power supply for LCD.
type: boolean
required:
- compatible
- reg
- vddpos-supply
- vddneg-supply
- enable-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@11 {
compatible = "kinetic,ktz8866";
reg = <0x11>;
vddpos-supply = <&bl_vddpos_5p5>;
vddneg-supply = <&bl_vddneg_5p5>;
enable-gpios = <&tlmm 139 GPIO_ACTIVE_HIGH>;
current-num-sinks = <5>;
kinetic,current-ramp-delay-ms = <128>;
kinetic,led-enable-ramp-delay-ms = <1>;
kinetic,enable-lcd-bias;
};
};
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/led-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: led-backlight
maintainers:
- Lee Jones <lee@kernel.org>
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
description:
This binding is used to describe a basic backlight device made of LEDs. It
can also be used to describe a backlight device controlled by the output of
a LED driver.
allOf:
- $ref: common.yaml#
properties:
compatible:
const: led-backlight
leds: true
required:
- compatible
- leds
unevaluatedProperties: false
examples:
- |
backlight {
compatible = "led-backlight";
leds = <&led1>, <&led2>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
...
@@ -0,0 +1,142 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI LM3630A High-Efficiency Dual-String White LED
maintainers:
- Lee Jones <lee@kernel.org>
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
description: |
The LM3630A is a current-mode boost converter which supplies the power and
controls the current in up to two strings of 10 LEDs per string.
https://www.ti.com/product/LM3630A
properties:
compatible:
const: ti,lm3630a
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
enable-gpios:
description: GPIO to use to enable/disable the backlight (HWEN pin).
maxItems: 1
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
patternProperties:
"^led@[01]$":
type: object
description: |
Properties for a string of connected LEDs.
properties:
reg:
description: |
The control bank that is used to program the two current sinks. The
LM3630A has two control banks (A and B) and are represented as 0 or 1
in this property. The two current sinks can be controlled
independently with both banks, or bank A can be configured to control
both sinks with the led-sources property.
minimum: 0
maximum: 1
label:
maxItems: 1
led-sources:
allOf:
- minItems: 1
maxItems: 2
items:
minimum: 0
maximum: 1
default-brightness:
description: Default brightness level on boot.
minimum: 0
maximum: 255
max-brightness:
description: Maximum brightness that is allowed during runtime.
minimum: 0
maximum: 255
ti,linear-mapping-mode:
description: |
Enable linear mapping mode. If disabled, then it will use exponential
mapping mode in which the ramp up/down appears to have a more uniform
transition to the human eye.
type: boolean
required:
- reg
additionalProperties: false
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@38 {
compatible = "ti,lm3630a";
reg = <0x38>;
enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
led-sources = <0 1>;
label = "lcd-backlight";
default-brightness = <200>;
max-brightness = <255>;
};
};
};
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@38 {
compatible = "ti,lm3630a";
reg = <0x38>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
default-brightness = <150>;
ti,linear-mapping-mode;
};
led@1 {
reg = <1>;
default-brightness = <225>;
ti,linear-mapping-mode;
};
};
};
@@ -0,0 +1,149 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/lp855x-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments LP855X backlight controllers
maintainers:
- Artur Weber <aweber.kernel@gmail.com>
properties:
compatible:
enum:
- ti,lp8550
- ti,lp8551
- ti,lp8552
- ti,lp8553
- ti,lp8555
- ti,lp8556
- ti,lp8557
reg:
maxItems: 1
dev-ctrl:
$ref: /schemas/types.yaml#/definitions/uint8
description:
Value of device control register. This is a device-specific value.
bl-name:
$ref: /schemas/types.yaml#/definitions/string
description: Backlight device name.
init-brt:
$ref: /schemas/types.yaml#/definitions/uint8
description: Initial value of backlight brightness.
power-supply:
description: Regulator which controls the 3V rail.
enable-supply:
description: Regulator which controls the EN/VDDIO input.
pwms:
maxItems: 1
description: |
PWM channel to use for controlling the backlight; setting this
enables the PWM-based backlight control mode.
pwm-names: true
pwm-period:
$ref: /schemas/types.yaml#/definitions/uint32
description:
PWM period value. Deprecated; set the period value in the pwms
property instead.
deprecated: true
patternProperties:
"^rom-[0-9a-f]{2}h$":
type: object
description: Nodes containing the values of configuration registers.
additionalProperties: false
properties:
rom-addr:
$ref: /schemas/types.yaml#/definitions/uint8
description: Register address of ROM area to be updated.
rom-val:
$ref: /schemas/types.yaml#/definitions/uint8
description: Value to write to the ROM register.
required:
- compatible
- reg
- dev-ctrl
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@2c {
compatible = "ti,lp8555";
reg = <0x2c>;
dev-ctrl = /bits/ 8 <0x00>;
pwms = <&pwm 0 10000>;
pwm-names = "lp8555";
/* 4V OV, 4 output LED0 string enabled */
rom-14h {
rom-addr = /bits/ 8 <0x14>;
rom-val = /bits/ 8 <0xcf>;
};
/* Heavy smoothing, 24ms ramp time step */
rom-15h {
rom-addr = /bits/ 8 <0x15>;
rom-val = /bits/ 8 <0xc7>;
};
/* 4 output LED1 string enabled */
rom-19h {
rom-addr = /bits/ 8 <0x19>;
rom-val = /bits/ 8 <0x0f>;
};
};
};
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@2c {
compatible = "ti,lp8556";
reg = <0x2c>;
bl-name = "lcd-bl";
dev-ctrl = /bits/ 8 <0x85>;
init-brt = /bits/ 8 <0x10>;
};
};
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@2c {
compatible = "ti,lp8557";
reg = <0x2c>;
enable-supply = <&backlight_vddio>;
power-supply = <&backlight_vdd>;
dev-ctrl = /bits/ 8 <0x41>;
init-brt = /bits/ 8 <0x0a>;
/* 4V OV, 4 output LED string enabled */
rom-14h {
rom-addr = /bits/ 8 <0x14>;
rom-val = /bits/ 8 <0xcf>;
};
};
};
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/maxim,max25014.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim max25014 backlight controller
maintainers:
- Maud Spierings <maudspierings@gocontroll.com>
properties:
compatible:
enum:
- maxim,max25014
reg:
maxItems: 1
default-brightness:
minimum: 0
maximum: 100
default: 50
enable-gpios:
maxItems: 1
interrupts:
maxItems: 1
power-supply:
description: Regulator which controls the boost converter input rail.
pwms:
maxItems: 1
maxim,iset:
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 15
default: 11
description:
Value of the ISET field in the ISET register. This controls the current
scale of the outputs, a higher number means more current.
maxim,strings:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
A 4-bit bitfield that describes which led strings to turn on.
minItems: 4
maxItems: 4
items:
maximum: 1
default:
[1 1 1 1]
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@6f {
compatible = "maxim,max25014";
reg = <0x6f>;
default-brightness = <50>;
enable-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
interrupt-parent = <&gpio1>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
power-supply = <&reg_backlight>;
pwms = <&pwm1>;
maxim,iset = <7>;
maxim,strings = <1 1 1 0>;
};
};
@@ -0,0 +1,121 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MT6370 Backlight
maintainers:
- ChiaEn Wu <chiaen_wu@richtek.com>
description: |
This module is part of the MT6370 MFD device.
The MT6370 Backlight WLED driver supports up to a 29V output voltage for
4 channels of 8 series WLEDs. Each channel supports up to 30mA of current
capability with 2048 current steps (11 bits, only for MT6370/MT6371) or
16384 current steps (14 bits, only for MT6372) in exponential or linear
mapping curves.
allOf:
- $ref: common.yaml#
properties:
compatible:
enum:
- mediatek,mt6370-backlight
- mediatek,mt6372-backlight
default-brightness:
minimum: 0
max-brightness:
minimum: 0
enable-gpios:
description: External backlight 'enable' pin
maxItems: 1
mediatek,bled-pwm-enable:
description: |
Enable external PWM input for backlight dimming
type: boolean
mediatek,bled-pwm-hys-enable:
description: |
Enable the backlight input-hysteresis for PWM mode
type: boolean
mediatek,bled-pwm-hys-input-th-steps:
$ref: /schemas/types.yaml#/definitions/uint8
enum: [1, 4, 16, 64]
description: |
The selection of the upper and lower bounds threshold of backlight
PWM resolution. If we choose selection 64, the variation of PWM
resolution needs more than 64 steps.
mediatek,bled-ovp-shutdown:
description: |
Enable the backlight shutdown when OVP level triggered
type: boolean
mediatek,bled-ovp-microvolt:
enum: [17000000, 21000000, 25000000, 29000000]
description: |
Backlight OVP level selection.
mediatek,bled-ocp-shutdown:
description: |
Enable the backlight shutdown when OCP level triggered.
type: boolean
mediatek,bled-ocp-microamp:
enum: [900000, 1200000, 1500000, 1800000]
description: |
Backlight OC level selection.
mediatek,bled-exponential-mode-enable:
description: |
Enable the exponential mode of backlight brightness. If this property
is not enabled, the default is to use linear mode.
type: boolean
mediatek,bled-channel-use:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
Backlight LED channel to be used.
Each bit mapping to:
- 0: CH4
- 1: CH3
- 2: CH2
- 3: CH1
minimum: 1
maximum: 15
if:
properties:
compatible:
contains:
const: mediatek,mt6372-backlight
then:
properties:
default-brightness:
maximum: 16384
max-brightness:
maximum: 16384
else:
properties:
default-brightness:
maximum: 2048
max-brightness:
maximum: 2048
required:
- compatible
- mediatek,bled-channel-use
additionalProperties: false
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/mps,mp3309c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MPS MP3309C backlight
maintainers:
- Flavio Suligoi <f.suligoi@asem.it>
description: |
The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a
programmable switching frequency to optimize efficiency.
It supports two different dimming modes:
- analog mode, via I2C commands, as default mode (32 dimming levels)
- PWM controlled mode (optional)
The datasheet is available at:
https://www.monolithicpower.com/en/mp3309c.html
allOf:
- $ref: common.yaml#
properties:
compatible:
const: mps,mp3309c
reg:
maxItems: 1
pwms:
description: if present, the backlight is controlled in PWM mode.
maxItems: 1
enable-gpios:
description: GPIO used to enable the backlight in "analog-i2c" dimming mode.
maxItems: 1
mps,overvoltage-protection-microvolt:
description: Overvoltage protection (13.5V, 24V or 35.5V).
enum: [ 13500000, 24000000, 35500000 ]
default: 35500000
mps,no-sync-mode:
description: disable synchronous rectification mode
type: boolean
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
/* Backlight with PWM control */
backlight_pwm: backlight@17 {
compatible = "mps,mp3309c";
reg = <0x17>;
pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness = <6>;
mps,overvoltage-protection-microvolt = <24000000>;
};
};
@@ -0,0 +1,91 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/pwm-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: pwm-backlight
maintainers:
- Lee Jones <lee@kernel.org>
- Daniel Thompson <daniel.thompson@linaro.org>
- Jingoo Han <jingoohan1@gmail.com>
allOf:
- $ref: common.yaml#
properties:
compatible:
const: pwm-backlight
pwms:
maxItems: 1
pwm-names: true
power-supply:
description: regulator for supply voltage
enable-gpios:
description:
Contains a single GPIO specifier for the GPIO which enables and disables
the backlight.
maxItems: 1
post-pwm-on-delay-ms:
description:
Delay in ms between setting an initial (non-zero) PWM and enabling the
backlight using GPIO.
pwm-off-delay-ms:
description:
Delay in ms between disabling the backlight using GPIO and setting PWM
value to 0.
num-interpolated-steps:
description:
Number of interpolated steps between each value of brightness-levels
table. This way a high resolution pwm duty cycle can be used without
having to list out every possible value in the brightness-level array.
$ref: /schemas/types.yaml#/definitions/uint32
dependencies:
default-brightness-level: [brightness-levels]
num-interpolated-steps: [brightness-levels]
required:
- compatible
- pwms
unevaluatedProperties: false
examples:
- |
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 5000000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
power-supply = <&vdd_bl_reg>;
enable-gpios = <&gpio 58 0>;
post-pwm-on-delay-ms = <10>;
pwm-off-delay-ms = <10>;
};
- |
// Example using num-interpolation-steps:
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 5000000>;
brightness-levels = <0 2048 4096 8192 16384 65535>;
num-interpolated-steps = <2048>;
default-brightness-level = <4096>;
power-supply = <&vdd_bl_reg>;
enable-gpios = <&gpio 58 0>;
};
...
@@ -0,0 +1,283 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies, Inc. WLED driver
maintainers:
- Bjorn Andersson <andersson@kernel.org>
- Kiran Gunda <quic_kgunda@quicinc.com>
description: |
WLED (White Light Emitting Diode) driver is used for controlling display
backlight that is part of PMIC on Qualcomm Technologies, Inc. reference
platforms. The PMIC is connected to the host processor via SPMI bus.
properties:
compatible:
enum:
- qcom,pm8941-wled
- qcom,pmi8950-wled
- qcom,pmi8994-wled
- qcom,pmi8998-wled
- qcom,pm660l-wled
- qcom,pm6150l-wled
- qcom,pm8150l-wled
reg:
minItems: 1
maxItems: 2
default-brightness:
description: |
brightness value on boot.
label: true
max-brightness:
description: |
Maximum brightness level.
qcom,cs-out:
description: |
enable current sink output.
This property is supported only for WLED3.
type: boolean
qcom,cabc:
description: |
enable content adaptive backlight control.
type: boolean
qcom,ext-gen:
description: |
use externally generated modulator signal to dim.
This property is supported only for WLED3.
type: boolean
qcom,current-limit:
description: |
mA; per-string current limit.
This property is supported only for WLED3.
$ref: /schemas/types.yaml#/definitions/uint32
default: 20
minimum: 0
maximum: 25
qcom,current-limit-microamp:
description: |
uA; per-string current limit.
default: 25
minimum: 0
maximum: 30000
multipleOf: 25
qcom,current-boost-limit:
description: |
mA; boost current limit.
$ref: /schemas/types.yaml#/definitions/uint32
qcom,switching-freq:
description: |
kHz; switching frequency.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920,
2400, 3200, 4800, 9600 ]
qcom,ovp:
description: |
V; Over-voltage protection limit.
This property is supported only for WLED3.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 27, 29, 32, 35 ]
default: 29
qcom,ovp-millivolt:
description: |
Over-voltage protection limit. This property is for WLED4 only.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 17800
maximum: 31100
qcom,num-strings:
description: |
number of led strings attached.
$ref: /schemas/types.yaml#/definitions/uint32
qcom,enabled-strings:
description: |
Array of the WLED strings numbered from 0 to 3. Each
string of leds are operated individually. Specify the
list of strings used by the device. Any combination of
led strings can be used.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 4
qcom,external-pfet:
description: |
Specify if external PFET control for short circuit
protection is used. This property is supported only
for WLED4.
type: boolean
qcom,auto-string-detection:
description: |
Enables auto-detection of the WLED string configuration.
This feature is not supported for WLED3.
type: boolean
interrupts:
minItems: 1
items:
- description: over voltage protection interrupt.
- description: short circuit interrupt.
interrupt-names:
minItems: 1
items:
- const: ovp
- const: short
qcom,modulator-sel:
description: |
Selects the modulator used for brightness modulation.
Allowed values are,
0 - Modulator A
1 - Modulator B
This property is applicable only to WLED5 peripheral.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
default: 0
qcom,cabc-sel:
description: |
Selects the CABC pin signal used for brightness modulation.
Allowed values are,
0 - CABC disabled
1 - CABC 1
2 - CABC 2
3 - External signal (e.g. LPG) is used for dimming
This property is applicable only to WLED5 peripheral.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1, 2, 3 ]
allOf:
- if:
properties:
compatible:
contains:
const: qcom,pm8941-wled
then:
properties:
reg:
maxItems: 1
qcom,current-boost-limit:
enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ]
default: 805
qcom,switching-freq:
default: 1600
qcom,num-strings:
enum: [ 1, 2, 3 ]
interrupts:
maxItems: 1
interrupt-names:
maxItems: 1
else:
properties:
reg:
minItems: 2
qcom,current-boost-limit:
enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ]
default: 970
qcom,switching-freq:
default: 800
qcom,num-strings:
enum: [ 1, 2, 3, 4 ]
interrupts:
minItems: 2
interrupt-names:
minItems: 2
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8150l-wled
then:
properties:
default-brightness:
minimum: 0
maximum: 32767
max-brightness:
minimum: 0
maximum: 32767
else:
properties:
default-brightness:
minimum: 0
maximum: 4095
max-brightness:
minimum: 0
maximum: 4095
- if:
properties:
compatible:
contains:
enum:
- qcom,pmi8950-wled
- qcom,pmi8994-wled
then:
properties:
qcom,ovp-millivolt:
enum: [ 17800, 19400, 29500, 31000 ]
default: 29500
else:
properties:
qcom,ovp-millivolt:
enum: [ 18100, 19600, 29600, 31100 ]
default: 29600
required:
- compatible
- reg
- label
additionalProperties: false
examples:
- |
backlight@d800 {
compatible = "qcom,pm8941-wled";
reg = <0xd800 0x100>;
label = "backlight";
qcom,cs-out;
qcom,current-limit = <20>;
qcom,current-boost-limit = <805>;
qcom,switching-freq = <1600>;
qcom,ovp = <29>;
qcom,num-strings = <2>;
qcom,enabled-strings = <0 1>;
};
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/richtek,rt4831-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Richtek RT4831 Backlight
maintainers:
- ChiYuan Huang <cy_huang@richtek.com>
description: |
RT4831 is a mutifunctional device that can provide power to the LCD display
and LCD backlight.
For the LCD backlight, it can provide four channel WLED driving capability.
Each channel driving current is up to 30mA
Datasheet is available at
https://www.richtek.com/assets/product_file/RT4831A/DS4831A-05.pdf
allOf:
- $ref: common.yaml#
properties:
compatible:
const: richtek,rt4831-backlight
default-brightness:
minimum: 0
maximum: 2048
max-brightness:
minimum: 0
maximum: 2048
richtek,pwm-enable:
description: |
Specify the backlight dimming following by PWM duty or by SW control.
type: boolean
richtek,bled-ovp-sel:
description: |
Backlight OVP level selection, currently support 17V/21V/25V/29V.
$ref: /schemas/types.yaml#/definitions/uint8
default: 1
minimum: 0
maximum: 3
richtek,bled-ocp-microamp:
description: |
Backlight over current protection level.
enum: [900000, 1200000, 1500000, 1800000]
richtek,channel-use:
description: |
Backlight LED channel to be used.
BIT 0/1/2/3 is used to indicate led channel 1/2/3/4 enable or disable.
$ref: /schemas/types.yaml#/definitions/uint8
minimum: 1
maximum: 15
required:
- compatible
- richtek,channel-use
additionalProperties: false
@@ -0,0 +1,29 @@
SKY81452-backlight bindings
Required properties:
- compatible : Must be "skyworks,sky81452-backlight"
Optional properties:
- name : Name of backlight device. Default is 'lcd-backlight'.
- gpios : GPIO to use to EN pin.
See Documentation/devicetree/bindings/gpio/gpio.txt
- led-sources : List of enabled channels from 0 to 5.
See Documentation/devicetree/bindings/leds/common.txt
- skyworks,ignore-pwm : Ignore both PWM input
- skyworks,dpwm-mode : Enable DPWM dimming mode, otherwise Analog dimming.
- skyworks,phase-shift : Enable phase shift mode
- skyworks,short-detection-threshold-volt
: It should be one of 4, 5, 6 and 7V.
- skyworks,current-limit-mA
: It should be 2300mA or 2750mA.
Example:
backlight {
compatible = "skyworks,sky81452-backlight";
name = "pwm-backlight";
led-sources = <0 1 2 5>;
skyworks,ignore-pwm;
skyworks,phase-shift;
skyworks,current-limit-mA = <2300>;
};
@@ -0,0 +1,136 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/ti,lm3509.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI LM3509 High Efficiency Boost for White LED's and/or OLED Displays
maintainers:
- Patrick Gansterer <paroga@paroga.com>
description:
The LM3509 current mode boost converter offers two separate outputs.
https://www.ti.com/product/LM3509
properties:
compatible:
const: ti,lm3509
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
reset-gpios:
maxItems: 1
ti,brightness-rate-of-change-us:
description: Brightness Rate of Change in microseconds.
enum: [51, 13000, 26000, 52000]
ti,oled-mode:
description: Enable OLED mode.
type: boolean
patternProperties:
"^led@[01]$":
type: object
description: Properties for a string of connected LEDs.
$ref: common.yaml#
properties:
reg:
description:
The control register that is used to program the two current sinks.
The LM3509 has two registers (BMAIN and BSUB) and are represented
as 0 or 1 in this property. The two current sinks can be controlled
independently with both registers, or register BMAIN can be
configured to control both sinks with the led-sources property.
minimum: 0
maximum: 1
label: true
led-sources:
minItems: 1
maxItems: 2
items:
minimum: 0
maximum: 1
default-brightness:
minimum: 0
maximum: 31
default: 18
max-brightness:
minimum: 0
maximum: 31
default: 31
required:
- reg
additionalProperties: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@36 {
compatible = "ti,lm3509";
reg = <0x36>;
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
ti,oled-mode;
ti,brightness-rate-of-change-us = <52000>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
led-sources = <0 1>;
label = "lcd-backlight";
default-brightness = <12>;
max-brightness = <31>;
};
};
};
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
backlight@36 {
compatible = "ti,lm3509";
reg = <0x36>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
default-brightness = <12>;
};
led@1 {
reg = <1>;
default-brightness = <15>;
};
};
};
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/ti,lp8864.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments - LP8864/LP8866 4/6-Channel LED Driver family
maintainers:
- Andrew Davis <afd@ti.com>
- Alexander Sverdlin <alexander.sverdlin@siemens.com>
description: |
LP8866-Q1, LP8866S-Q1, LP8864-Q1, LP8864S-Q1 are display LED-backlight drivers
with 4/6 channels. LED brightness can be controlled globally through the I2C
interface or PWM input.
For more product information please see the links below:
https://www.ti.com/product/LP8864-Q1
https://www.ti.com/product/LP8864S-Q1
https://www.ti.com/product/LP8866-Q1
https://www.ti.com/product/LP8866S-Q1
properties:
compatible:
const: ti,lp8864
reg:
maxItems: 1
description: I2C slave address
enable-gpios:
maxItems: 1
description: GPIO pin to enable (active high) / disable the device
vled-supply:
description: LED supply
led:
type: object
$ref: common.yaml#
properties:
function: true
color: true
label: true
linux,default-trigger: true
additionalProperties: false
required:
- compatible
- reg
- led
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@3a {
compatible = "ti,lp8864";
reg = <0x3a>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
vled-supply = <&vbatt>;
led {
function = LED_FUNCTION_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
linux,default-trigger = "backlight";
};
};
};
...
@@ -0,0 +1,27 @@
TPS65217 family of regulators
The TPS65217 chip contains a boost converter and current sinks which can be
used to drive LEDs for use as backlights.
Required properties:
- compatible: "ti,tps65217"
- reg: I2C slave address
- backlight: node for specifying WLED1 and WLED2 lines in TPS65217
- isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
- fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
- default-brightness: valid values: 0-100
Each regulator is defined using the standard binding for regulators.
Example:
tps: tps@24 {
reg = <0x24>;
compatible = "ti,tps65217";
backlight {
isel = <1>; /* 1 - ISET1, 2 ISET2 */
fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
default-brightness = <50>;
};
};
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/zii,rave-sp-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Zodiac Inflight Innovations RAVE Supervisory Processor Backlight
maintainers:
- Frank Li <Frank.Li@nxp.com>
description:
RAVE SP backlight device is a "MFD cell" device corresponding to
backlight functionality of RAVE Supervisory Processor. It is expected
that its Device Tree node is specified as a child of the node
corresponding to the parent RAVE SP device (as documented in
Documentation/devicetree/bindings/mfd/zii,rave-sp.yaml)
properties:
compatible:
const: zii,rave-sp-backlight
required:
- compatible
allOf:
- $ref: common.yaml
unevaluatedProperties: false
examples:
- |
backlight {
compatible = "zii,rave-sp-backlight";
};
@@ -0,0 +1 @@
This file has moved to ./common.yaml.
@@ -0,0 +1,323 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common leds properties
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Pavel Machek <pavel@ucw.cz>
description:
LED and flash LED devices provide the same basic functionality as current
regulators, but extended with LED and flash LED specific features like
blinking patterns, flash timeout, flash faults and external flash strobe mode.
Many LED devices expose more than one current output that can be connected
to one or more discrete LED component. Since the arrangement of connections
can influence the way of the LED device initialization, the LED components
have to be tightly coupled with the LED device binding. They are represented
by child nodes of the parent LED device binding.
properties:
led-sources:
description:
List of device current outputs the LED is connected to. The outputs are
identified by the numbers that must be defined in the LED device binding
documentation.
$ref: /schemas/types.yaml#/definitions/uint32-array
function:
description:
LED function. Use one of the LED_FUNCTION_* prefixed definitions
from the header include/dt-bindings/leds/common.h. If there is no
matching LED_FUNCTION available, add a new one.
$ref: /schemas/types.yaml#/definitions/string
color:
description:
Color of the LED. Use one of the LED_COLOR_ID_* prefixed definitions from
the header include/dt-bindings/leds/common.h. If there is no matching
LED_COLOR_ID available, add a new one.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 14
function-enumerator:
description:
Integer to be used when more than one instance of the same function is
needed, differing only with an ordinal number.
$ref: /schemas/types.yaml#/definitions/uint32
label:
description:
The label for this LED. If omitted, the label is taken from the node name
(excluding the unit address). It has to uniquely identify a device, i.e.
no other LED class device can be assigned the same label. This property is
deprecated - use 'function' and 'color' properties instead.
function-enumerator has no effect when this property is present.
default-state:
description:
The initial state of the LED. If the LED is already on or off and the
default-state property is set to the same value, then no glitch should be
produced where the LED momentarily turns off (or on). The "keep" setting
will keep the LED at whatever its current state is, without producing a
glitch.
$ref: /schemas/types.yaml#/definitions/string
enum:
- on
- off
- keep
default: off
linux,default-trigger:
description:
This parameter, if present, is a string defining the trigger assigned to
the LED.
$ref: /schemas/types.yaml#/definitions/string
oneOf:
- enum:
# LED will act as a back-light, controlled by the framebuffer system
- backlight
# LED will turn on (see also "default-state" property)
- default-on
# LED "double" flashes at a load average based rate
- heartbeat
# LED indicates disk activity
- disk-activity
# LED indicates disk read activity
- disk-read
# LED indicates disk write activity
- disk-write
# LED flashes at a fixed, configurable rate
- timer
# LED alters the brightness for the specified duration with one software
# timer (requires "led-pattern" property)
- pattern
# LED indicates mic mute state
- audio-micmute
# LED indicates audio mute state
- audio-mute
# LED indicates bluetooth power state
- bluetooth-power
# LED indicates camera flash state
- flash
# LED indicated keyboard capslock
- kbd-capslock
# LED indicates MTD memory activity
- mtd
# LED indicates NAND memory activity (deprecated),
# in new implementations use "mtd"
- nand-disk
# LED indicates network activity
- netdev
# No trigger assigned to the LED. This is the default mode
# if trigger is absent
- none
# LED indicates remote control feedback
- rc-feedback
# LED indicates camera torch state
- torch
# LED indicates USB gadget activity
- usb-gadget
# LED indicates USB host activity
- usb-host
# LED indicates USB port state
- usbport
# LED is triggered by CPU activity
- pattern: "^cpu[0-9]*$"
# LED is triggered by Bluetooth activity
- pattern: "^hci[0-9]+-power$"
# LED is triggered by SD/MMC activity
- pattern: "^mmc[0-9]+$"
# LED is triggered by WLAN activity
- pattern: "^phy[0-9]+tx$"
led-pattern:
description: |
Array of integers with default pattern for certain triggers.
Each trigger may parse this property differently:
- one-shot : two numbers specifying delay on and delay off (in ms),
- timer : two numbers specifying delay on and delay off (in ms),
- pattern : the pattern is given by a series of tuples, of
brightness and duration (in ms). The exact format is
described in:
Documentation/devicetree/bindings/leds/leds-trigger-pattern.txt
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
minItems: 2
maxItems: 2
led-max-microamp:
description:
Maximum LED supply current in microamperes. This property can be made
mandatory for the board configurations introducing a risk of hardware
damage in case an excessive current is set.
For flash LED controllers with configurable current this property is
mandatory for the LEDs in the non-flash modes (e.g. torch or indicator).
max-brightness:
description:
Normally, the maximum brightness is determined by the hardware, and this
property is not required. This property is used to set a software limit.
It could happen that an LED is made so bright that it gets damaged or
causes damage due to restrictions in a specific system, such as mounting
conditions.
Note that this flag is mainly used for PWM-LEDs, where it is not possible
to map brightness to current. Drivers for other controllers should use
led-max-microamp.
$ref: /schemas/types.yaml#/definitions/uint32
default-brightness:
description:
Brightness to be set if LED's default state is on. Used only during
initialization. If the option is not set then max brightness is used.
$ref: /schemas/types.yaml#/definitions/uint32
panic-indicator:
description:
This property specifies that the LED should be used, if at all possible,
as a panic indicator.
type: boolean
retain-state-shutdown:
description:
This property specifies that the LED should not be turned off or changed
when the system shuts down.
type: boolean
trigger-sources:
description: |
List of devices which should be used as a source triggering this LED
activity. Some LEDs can be related to a specific device and should somehow
indicate its state. E.g. USB 2.0 LED may react to device(s) in a USB 2.0
port(s).
Another common example is switch or router with multiple Ethernet ports
each of them having its own LED assigned (assuming they are not
hardwired). In such cases this property should contain phandle(s) of
related source device(s).
Another example is a GPIO line that will be monitored and mirror the
state of the line (with or without inversion flags) to the LED.
In many cases LED can be related to more than one device (e.g. one USB LED
vs. multiple USB ports). Each source should be represented by a node in
the device tree and be referenced by a phandle and a set of phandle
arguments. A length of arguments should be specified by the
#trigger-source-cells property in the source node.
$ref: /schemas/types.yaml#/definitions/phandle-array
active-high:
type: boolean
description:
Makes LED active high. To turn the LED ON, line needs to be
set to high voltage instead of low.
active-low:
type: boolean
description:
Makes LED active low. To turn the LED ON, line needs to be
set to low voltage instead of high.
inactive-high-impedance:
type: boolean
description:
Set LED to high-impedance mode to turn the LED OFF. LED might also
describe this mode as tristate.
# Required properties for flash LED child nodes:
flash-max-microamp:
description:
Maximum flash LED supply current in microamperes. Required for flash LED
nodes with configurable current.
flash-max-timeout-us:
description:
Maximum timeout in microseconds after which the flash LED is turned off.
Required for flash LED nodes with configurable timeout.
allOf:
- if:
required:
- active-low
then:
properties:
active-high: false
additionalProperties: true
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "gpio-leds";
led-0 {
function = LED_FUNCTION_STATUS;
linux,default-trigger = "heartbeat";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
};
led-1 {
function = LED_FUNCTION_USB;
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
};
};
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "maxim,max77693-led";
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <0>, <1>;
led-max-microamp = <50000>;
flash-max-microamp = <320000>;
flash-max-timeout-us = <500000>;
};
};
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@30 {
compatible = "panasonic,an30259a";
reg = <0x30>;
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_INDICATOR;
function-enumerator = <1>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <2>;
};
led@3 {
reg = <3>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <3>;
};
};
};
...
@@ -0,0 +1,99 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/cznic,turris-omnia-leds.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: CZ.NIC's Turris Omnia LEDs driver
maintainers:
- Marek Behún <kabel@kernel.org>
description:
This module adds support for the RGB LEDs found on the front panel of the
Turris Omnia router. There are 12 RGB LEDs that are controlled by a
microcontroller that communicates via the I2C bus. Each LED is described
as a subnode of this I2C device.
properties:
compatible:
const: cznic,turris-omnia-leds
reg:
description: I2C slave address of the microcontroller.
maxItems: 1
interrupts:
description:
Specifier for the global LED brightness changed by front button press
interrupt.
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^multi-led@[0-9a-b]$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
description:
This node represents one of the RGB LED devices on Turris Omnia.
No subnodes need to be added for subchannels since this controller only
supports RGB LEDs.
properties:
reg:
minimum: 0
maximum: 11
description:
This property identifies one of the LEDs on the front panel of the
Turris Omnia router.
required:
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@2b {
compatible = "cznic,turris-omnia-leds";
reg = <0x2b>;
interrupts-extended = <&mcu 11 IRQ_TYPE_NONE>;
#address-cells = <1>;
#size-cells = <0>;
multi-led@0 {
/*
* No subnodes are needed, this controller only supports RGB
* LEDs.
*/
reg = <0>;
color = <LED_COLOR_ID_MULTI>;
function = LED_FUNCTION_POWER;
linux,default-trigger = "heartbeat";
};
multi-led@a {
reg = <0xa>;
color = <LED_COLOR_ID_MULTI>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <1>;
};
};
};
...
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp.
maintainers:
- Luka Kovacic <luka.kovacic@sartura.hr>
description: |
This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details
see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml.
The LED module is a sub-node of the MCU node in the Device Tree.
properties:
compatible:
const: iei,wt61p803-puzzle-leds
'#address-cells':
const: 1
'#size-cells':
const: 0
led@0:
$ref: common.yaml
unevaluatedProperties: false
properties:
reg:
const: 0
required:
- compatible
- '#address-cells'
- '#size-cells'
additionalProperties: false
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/irled/gpio-ir-tx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IR LED connected through GPIO pin
maintainers:
- Sean Young <sean@mess.org>
description:
IR LED connected through GPIO pin which is used as remote controller
transmitter.
properties:
compatible:
const: gpio-ir-tx
gpios:
maxItems: 1
required:
- compatible
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
irled {
compatible = "gpio-ir-tx";
gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/irled/ir-spi-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IR LED connected through SPI bus
maintainers:
- Sean Young <sean@mess.org>
description:
IR LED switch is connected to the MOSI line of the SPI device and the data
is delivered through that.
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
const: ir-spi-led
reg:
maxItems: 1
duty-cycle:
$ref: /schemas/types.yaml#/definitions/uint8
enum: [30, 50, 60, 70, 75, 80, 90]
description:
Percentage of one period in which the signal is active.
led-active-low:
type: boolean
description:
Output is negated with a NOT gate.
power-supply: true
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
irled@0 {
compatible = "ir-spi-led";
reg = <0x0>;
duty-cycle = /bits/ 8 <60>;
led-active-low;
power-supply = <&irda_regulator>;
spi-max-frequency = <5000000>;
};
};
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/irled/pwm-ir-tx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IR LED connected through PWM pin
maintainers:
- Sean Young <sean@mess.org>
description:
IR LED connected through PWM pin which is used as remote controller
transmitter.
properties:
compatible:
oneOf:
- const: pwm-ir-tx
- const: nokia,n900-ir
deprecated: true
pwms:
maxItems: 1
required:
- compatible
- pwms
additionalProperties: false
examples:
- |
irled {
compatible = "pwm-ir-tx";
pwms = <&pwm0 0 10000000>;
};
@@ -0,0 +1,193 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/issi,is31fl319x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ISSI LED Controllers for IS31FL319{0,1,3,6,9}
maintainers:
- Vincent Knecht <vincent.knecht@mailoo.org>
description: |
The IS31FL319X are LED controllers with I2C interface.
Previously known as Si-En SN319{0,1,3,6,9}.
For more product information please see the links below:
https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf
https://lumissil.com/assets/pdf/core/IS31FL3191_DS.pdf
https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf
https://lumissil.com/assets/pdf/core/IS31FL3196_DS.pdf
https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf
properties:
compatible:
enum:
- issi,is31fl3190
- issi,is31fl3191
- issi,is31fl3193
- issi,is31fl3196
- issi,is31fl3199
- si-en,sn3190
- si-en,sn3191
- si-en,sn3193
- si-en,sn3196
- si-en,sn3199
reg:
maxItems: 1
shutdown-gpios:
maxItems: 1
description: GPIO attached to the SDB pin.
audio-gain-db:
default: 0
description: Audio gain selection for external analog modulation input.
enum: [0, 3, 6, 9, 12, 15, 18, 21]
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[1-9]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 1
maximum: 9
led-max-microamp:
description:
Note that a driver will take the lowest of all LED limits
since the chip has a single global setting. The lowest value
will be chosen due to the PWM specificity, where lower
brightness is achieved by reducing the duty-cycle of pulses
and not the current, which will always have its peak value
equal to led-max-microamp.
allOf:
- if:
properties:
compatible:
contains:
enum:
- issi,is31fl3190
- issi,is31fl3191
- issi,is31fl3193
- si-en,sn3190
- si-en,sn3191
- si-en,sn3193
then:
properties:
reg:
enum: [0x68, 0x69, 0x6a, 0x6b]
audio-gain-db: false
patternProperties:
"^led@[1-9]$":
properties:
led-max-microamp:
default: 42000
enum: [5000, 10000, 17500, 30000, 42000]
else:
properties:
reg:
enum: [0x64, 0x65, 0x66, 0x67]
patternProperties:
"^led@[1-9]$":
properties:
led-max-microamp:
default: 20000
enum: [5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000]
- if:
properties:
compatible:
contains:
enum:
- issi,is31fl3190
- issi,is31fl3191
- si-en,sn3190
- si-en,sn3191
then:
patternProperties:
"^led@[1-9]$":
properties:
reg:
maximum: 1
- if:
properties:
compatible:
contains:
enum:
- issi,is31fl3193
- si-en,sn3193
then:
patternProperties:
"^led@[1-9]$":
properties:
reg:
maximum: 3
- if:
properties:
compatible:
contains:
enum:
- issi,is31fl3196
- si-en,sn3196
then:
patternProperties:
"^led@[1-9]$":
properties:
reg:
maximum: 6
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@65 {
compatible = "issi,is31fl3196";
reg = <0x65>;
#address-cells = <1>;
#size-cells = <0>;
shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
led@1 {
reg = <1>;
label = "red:aux";
led-max-microamp = <10000>;
};
led@5 {
reg = <5>;
label = "green:power";
linux,default-trigger = "default-on";
};
};
};
...
@@ -0,0 +1,171 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/kinetic,ktd202x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Kinetic KTD2026/7 RGB/White LED Driver
maintainers:
- André Apitzsch <git@apitzsch.eu>
description: |
The KTD2026/7 is a RGB/White LED driver with I2C interface.
The data sheet can be found at:
https://www.kinet-ic.com/uploads/KTD2026-7-04h.pdf
properties:
compatible:
enum:
- kinetic,ktd2026
- kinetic,ktd2027
reg:
maxItems: 1
vin-supply:
description: Regulator providing power to the "VIN" pin.
vio-supply:
description: Regulator providing power for pull-up of the I/O lines.
Note that this regulator does not directly connect to KTD2026, but is
needed for the correct operation of the status ("ST") and I2C lines.
"#address-cells":
const: 1
"#size-cells":
const: 0
multi-led:
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 0
maximum: 3
required:
- reg
- color
required:
- "#address-cells"
- "#size-cells"
patternProperties:
"^led@[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 0
maximum: 3
required:
- reg
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@30 {
compatible = "kinetic,ktd2026";
reg = <0x30>;
#address-cells = <1>;
#size-cells = <0>;
vin-supply = <&pm8916_l17>;
vio-supply = <&pm8916_l6>;
led@0 {
reg = <0>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
};
};
};
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@30 {
compatible = "kinetic,ktd2026";
reg = <0x30>;
#address-cells = <1>;
#size-cells = <0>;
vin-supply = <&pm8916_l17>;
vio-supply = <&pm8916_l6>;
multi-led {
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STATUS;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
};
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/kinetic,ktd2692.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: KTD2692 Flash LED Driver from Kinetic Technologies
maintainers:
- Markuss Broks <markuss.broks@gmail.com>
description: |
KTD2692 is the ideal power solution for high-power flash LEDs.
It uses ExpressWire single-wire programming for maximum flexibility.
The ExpressWire interface through CTRL pin can control LED on/off and
enable/disable the IC, Movie(max 1/3 of Flash current) / Flash mode current,
Flash timeout, LVP(low voltage protection).
Also, When the AUX pin is pulled high while CTRL pin is high,
LED current will be ramped up to the flash-mode current level.
properties:
compatible:
const: kinetic,ktd2692
ctrl-gpios:
maxItems: 1
description: Specifier of the GPIO connected to CTRL pin.
aux-gpios:
maxItems: 1
description: Specifier of the GPIO connected to CTRL pin.
vin-supply:
description: LED supply (2.7V to 5.5V).
led:
type: object
$ref: common.yaml#
description: Properties for the LED.
properties:
function: true
color: true
flash-max-timeout-us:
description: Flash LED maximum timeout.
led-max-microamp:
maximum: 300000
description: Minimum Threshold for Timer protection
is defined internally (Maximum 300mA).
flash-max-microamp:
maximum: 300000
description: Flash LED maximum current
Formula - I(uA) = 15000000 / Rset.
additionalProperties: false
required:
- compatible
- ctrl-gpios
- led
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
ktd2692 {
compatible = "kinetic,ktd2692";
ctrl-gpios = <&gpc0 1 0>;
aux-gpios = <&gpc0 2 0>;
vin-supply = <&vbat>;
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <250000>;
flash-max-microamp = <150000>;
led-max-microamp = <25000>;
};
};
...
@@ -0,0 +1,104 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AWINIC AW2013 3-channel LED Driver
maintainers:
- Nikita Travkin <nikitos.tr@gmail.com>
description: |
The AW2013 is a 3-channel LED driver with I2C interface. It can control
LED brightness with PWM output.
properties:
compatible:
const: awinic,aw2013
reg:
maxItems: 1
interrupts:
maxItems: 1
description: Open-drain, low active interrupt pin "INTN".
Used to report completion of operations (power up, LED breath effects).
vcc-supply:
description: Regulator providing power to the "VCC" pin.
vio-supply:
description: Regulator providing power for pull-up of the I/O lines.
"VIO1" in the typical application circuit example of the datasheet.
Note that this regulator does not directly connect to AW2013, but is
needed for the correct operation of the interrupt and I2C lines.
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 0
maximum: 2
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@45 {
compatible = "awinic,aw2013";
reg = <0x45>;
interrupts = <42 IRQ_TYPE_LEVEL_LOW>;
#address-cells = <1>;
#size-cells = <0>;
vcc-supply = <&pm8916_l17>;
led@0 {
reg = <0>;
led-max-microamp = <5000>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
led-max-microamp = <5000>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
led-max-microamp = <5000>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_BLUE>;
};
};
};
...
@@ -0,0 +1,102 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-bcm63138.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom's BCM63138 LEDs controller
maintainers:
- Rafał Miłecki <rafal@milecki.pl>
description: |
This LEDs controller was first used on BCM63138 and later reused on BCM4908,
BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs.
It supports up to 32 LEDs that can be connected parallelly or serially. It
also includes limited support for hardware blinking.
Binding serially connected LEDs isn't documented yet.
properties:
compatible:
oneOf:
- items:
- enum:
- brcm,bcm4908-leds
- brcm,bcm6848-leds
- brcm,bcm6858-leds
- brcm,bcm63148-leds
- brcm,bcm63381-leds
- brcm,bcm68360-leds
- const: brcm,bcm63138-leds
- const: brcm,bcm63138-leds
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
brcm,serial-shift-bits:
minimum: 1
maximum: 32
description:
This describes the number of 8-bit serial shifters connected to the LED
controller block. The hardware is typically using 8-bit shift registers
with 8 LEDs per shift register, so 4 shifters results in 32 LEDs or 2
shifters give 16 LEDs etc, but the hardware supports any odd number of
registers. If left unspecified, the hardware boot-time default is used.
patternProperties:
"^led@[a-f0-9]+$":
type: object
$ref: common.yaml#
properties:
reg:
maxItems: 1
description: LED pin number
required:
- reg
unevaluatedProperties: false
required:
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
leds@ff800800 {
compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
reg = <0xff800800 0xdc>;
brcm,serial-shift-bits = <16>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
default-state = "on";
};
led@3 {
reg = <0x3>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
active-low;
};
};
@@ -0,0 +1,400 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-bcm6328.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEDs connected to Broadcom BCM6328 controller
maintainers:
- Álvaro Fernández Rojas <noltari@gmail.com>
description: |
This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
However, on some devices there are Serial LEDs (LEDs connected to a 74x164
controller), which can either be controlled by software (exporting the 74x164
as spi-gpio. See
Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or by hardware
using this driver.
Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
controlled, so the only chance to keep them working is by using this driver.
BCM6328 LED controller has a HWDIS register, which controls whether a LED
should be controlled by a hardware signal instead of the MODE register value,
with 0 meaning hardware control enabled and 1 hardware control disabled. This
is usually 1:1 for hardware to LED signals, but through the activity/link
registers you have some limited control over rerouting the LEDs (as
explained later in brcm,link-signal-sources). Even if a LED is hardware
controlled you are still able to make it blink or light it up if it isn't,
but you can't turn it off if the hardware decides to light it up. For this
reason, hardware controlled LEDs aren't registered as LED class devices.
Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
properties:
compatible:
const: brcm,bcm6328-leds
reg:
maxItems: 1
brcm,serial-leds:
type: boolean
description: Enables Serial LEDs.
brcm,serial-mux:
type: boolean
description: Enables Serial LEDs multiplexing.
brcm,serial-clk-low:
type: boolean
description: Makes clock signal active low.
brcm,serial-dat-low:
type: boolean
description: Makes data signal active low.
brcm,serial-shift-inv:
type: boolean
description: Inverts Serial LEDs shift direction.
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"@[a-f0-9]+$":
type: object
$ref: common.yaml#
properties:
reg:
items:
- maximum: 23
description: LED pin number (only LEDs 0 to 23 are valid).
brcm,hardware-controlled:
type: boolean
description: Makes this LED hardware controlled.
brcm,link-signal-sources:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 4
description: >
An array of hardware link signal sources. Up to four link hardware
signals can get muxed into these LEDs. Only valid for LEDs 0 to 7,
where LED signals 0 to 3 may be muxed to LEDs 0 to 3, and signals 4 to
7 may be muxed to LEDs 4 to 7. A signal can be muxed to more than one
LED, and one LED can have more than one source signal.
brcm,activity-signal-sources:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 4
description: >
An array of hardware activity signal sources. Up to four activity
hardware signals can get muxed into these LEDs. Only valid for LEDs 0
to 7, where LED signals 0 to 3 may be muxed to LEDs 0 to 3, and
signals 4 to 7 may be muxed to LEDs 4 to 7. A signal can be muxed to
more than one LED, and one LED can have more than one source signal.
required:
- reg
unevaluatedProperties: false
required:
- reg
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
/* BCM6328 with 4 EPHY LEDs */
led-controller@10000800 {
compatible = "brcm,bcm6328-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x10000800 0x24>;
alarm_red@2 {
reg = <2>;
active-low;
label = "red:alarm";
};
inet_green@3 {
reg = <3>;
active-low;
label = "green:inet";
};
power_green@4 {
reg = <4>;
active-low;
label = "green:power";
default-state = "on";
};
ephy0_spd@17 {
reg = <17>;
brcm,hardware-controlled;
};
ephy1_spd@18 {
reg = <18>;
brcm,hardware-controlled;
};
ephy2_spd@19 {
reg = <19>;
brcm,hardware-controlled;
};
ephy3_spd@20 {
reg = <20>;
brcm,hardware-controlled;
};
};
- |
/* BCM63268 with Serial/GPHY0 LEDs */
led-controller@10001900 {
compatible = "brcm,bcm6328-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x10001900 0x24>;
brcm,serial-leds;
brcm,serial-dat-low;
brcm,serial-shift-inv;
gphy0_spd0@0 {
reg = <0>;
brcm,hardware-controlled;
brcm,link-signal-sources = <0>;
};
gphy0_spd1@1 {
reg = <1>;
brcm,hardware-controlled;
brcm,link-signal-sources = <1>;
};
inet_red@2 {
reg = <2>;
active-low;
label = "red:inet";
};
dsl_green@3 {
reg = <3>;
active-low;
label = "green:dsl";
};
usb_green@4 {
reg = <4>;
active-low;
label = "green:usb";
};
wps_green@7 {
reg = <7>;
active-low;
label = "green:wps";
};
inet_green@8 {
reg = <8>;
active-low;
label = "green:inet";
};
ephy0_act@9 {
reg = <9>;
brcm,hardware-controlled;
};
ephy1_act@10 {
reg = <10>;
brcm,hardware-controlled;
};
ephy2_act@11 {
reg = <11>;
brcm,hardware-controlled;
};
gphy0_act@12 {
reg = <12>;
brcm,hardware-controlled;
};
ephy0_spd@13 {
reg = <13>;
brcm,hardware-controlled;
};
ephy1_spd@14 {
reg = <14>;
brcm,hardware-controlled;
};
ephy2_spd@15 {
reg = <15>;
brcm,hardware-controlled;
};
power_green@20 {
reg = <20>;
active-low;
label = "green:power";
default-state = "on";
};
};
- |
/* BCM6362 with 1 LED for each EPHY */
led-controller@10001900 {
compatible = "brcm,bcm6328-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x10001900 0x24>;
usb@0 {
reg = <0>;
brcm,hardware-controlled;
brcm,link-signal-sources = <0>;
brcm,activity-signal-sources = <0>;
/* USB link/activity routed to USB LED */
};
inet@1 {
reg = <1>;
brcm,hardware-controlled;
brcm,activity-signal-sources = <1>;
/* INET activity routed to INET LED */
};
ephy0@4 {
reg = <4>;
brcm,hardware-controlled;
brcm,link-signal-sources = <4>;
/* EPHY0 link routed to EPHY0 LED */
};
ephy1@5 {
reg = <5>;
brcm,hardware-controlled;
brcm,link-signal-sources = <5>;
/* EPHY1 link routed to EPHY1 LED */
};
ephy2@6 {
reg = <6>;
brcm,hardware-controlled;
brcm,link-signal-sources = <6>;
/* EPHY2 link routed to EPHY2 LED */
};
ephy3@7 {
reg = <7>;
brcm,hardware-controlled;
brcm,link-signal-sources = <7>;
/* EPHY3 link routed to EPHY3 LED */
};
power_green@20 {
reg = <20>;
active-low;
label = "green:power";
default-state = "on";
};
};
- |
/* BCM6362 with 1 LED for all EPHYs */
led-controller@10001900 {
compatible = "brcm,bcm6328-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x10001900 0x24>;
usb@0 {
reg = <0>;
brcm,hardware-controlled;
brcm,link-signal-sources = <0 1>;
brcm,activity-signal-sources = <0 1>;
/* USB/INET link/activity routed to USB LED */
};
ephy@4 {
reg = <4>;
brcm,hardware-controlled;
brcm,link-signal-sources = <4 5 6 7>;
/* EPHY0/1/2/3 link routed to EPHY0 LED */
};
power_green@20 {
reg = <20>;
active-low;
label = "green:power";
default-state = "on";
};
};
- |
/* BCM6362 with EPHY LEDs swapped */
led-controller@10001900 {
compatible = "brcm,bcm6328-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x10001900 0x24>;
usb@0 {
reg = <0>;
brcm,hardware-controlled;
brcm,link-signal-sources = <0>;
brcm,activity-signal-sources = <0 1>;
/* USB link/act and INET act routed to USB LED */
};
ephy0@4 {
reg = <4>;
brcm,hardware-controlled;
brcm,link-signal-sources = <7>;
/* EPHY3 link routed to EPHY0 LED */
};
ephy1@5 {
reg = <5>;
brcm,hardware-controlled;
brcm,link-signal-sources = <6>;
/* EPHY2 link routed to EPHY1 LED */
};
ephy2@6 {
reg = <6>;
brcm,hardware-controlled;
brcm,link-signal-sources = <5>;
/* EPHY1 link routed to EPHY2 LED */
};
ephy3@7 {
reg = <7>;
brcm,hardware-controlled;
brcm,link-signal-sources = <4>;
/* EPHY0 link routed to EPHY3 LED */
};
power_green@20 {
reg = <20>;
active-low;
label = "green:power";
default-state = "on";
};
};
@@ -0,0 +1,143 @@
LEDs connected to Broadcom BCM6358 controller
This controller is present on BCM6358 and BCM6368.
In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
which can either be controlled by software (exporting the 74x164 as spi-gpio.
See Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or
by hardware using this driver.
Required properties:
- compatible : should be "brcm,bcm6358-leds".
- #address-cells : must be 1.
- #size-cells : must be 0.
- reg : BCM6358 LED controller address and size.
Optional properties:
- brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
Default : 1
- brcm,clk-dat-low : Boolean, makes clock and data signals active low.
Default : false
Each LED is represented as a sub-node of the brcm,bcm6358-leds device.
LED sub-node required properties:
- reg : LED pin number (only LEDs 0 to 31 are valid).
LED sub-node optional properties:
- label : see Documentation/devicetree/bindings/leds/common.txt
- default-state : see
Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger : see
Documentation/devicetree/bindings/leds/common.txt
Examples:
Scenario 1 : BCM6358
leds0: led-controller@fffe00d0 {
compatible = "brcm,bcm6358-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0xfffe00d0 0x8>;
alarm_white {
reg = <0>;
active-low;
label = "white:alarm";
};
tv_white {
reg = <2>;
active-low;
label = "white:tv";
};
tel_white {
reg = <3>;
active-low;
label = "white:tel";
};
adsl_white {
reg = <4>;
active-low;
label = "white:adsl";
};
};
Scenario 2 : BCM6368
leds0: led-controller@100000d0 {
compatible = "brcm,bcm6358-leds";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x100000d0 0x8>;
brcm,pol-low;
brcm,clk-div = <4>;
power_red {
reg = <0>;
active-low;
label = "red:power";
};
power_green {
reg = <1>;
active-low;
label = "green:power";
default-state = "on";
};
power_blue {
reg = <2>;
label = "blue:power";
};
broadband_red {
reg = <3>;
active-low;
label = "red:broadband";
};
broadband_green {
reg = <4>;
label = "green:broadband";
};
broadband_blue {
reg = <5>;
active-low;
label = "blue:broadband";
};
wireless_red {
reg = <6>;
active-low;
label = "red:wireless";
};
wireless_green {
reg = <7>;
active-low;
label = "green:wireless";
};
wireless_blue {
reg = <8>;
label = "blue:wireless";
};
phone_red {
reg = <9>;
active-low;
label = "red:phone";
};
phone_green {
reg = <10>;
active-low;
label = "green:phone";
};
phone_blue {
reg = <11>;
label = "blue:phone";
};
upgrading_red {
reg = <12>;
active-low;
label = "red:upgrading";
};
upgrading_green {
reg = <13>;
active-low;
label = "green:upgrading";
};
upgrading_blue {
reg = <14>;
label = "blue:upgrading";
};
};
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-class-multicolor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common properties for the multicolor LED class.
maintainers:
- Andrew Davis <afd@ti.com>
description: |
Bindings for multi color LEDs show how to describe current outputs of
either integrated multi-color LED elements (like RGB, RGBW, RGBWA-UV
etc.) or standalone LEDs, to achieve logically grouped multi-color LED
modules. This is achieved by adding multi-led nodes layer to the
monochrome LED bindings.
The nodes and properties defined in this document are unique to the multicolor
LED class. Common LED nodes and properties are inherited from the common.yaml
within this documentation directory.
properties:
$nodename:
pattern: "^multi-led(@[0-9a-f]|-[0-9]+)?$"
color:
description: |
For multicolor LED support this property should be defined as either
LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
include/dt-bindings/leds/common.h.
enum: [ 8, 9 ]
required:
- color
allOf:
- $ref: common.yaml#
additionalProperties: true
...
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-consumer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common leds consumer
maintainers:
- Aleksandrs Vinarskis <alex@vinarskis.com>
description:
Some LED defined in DT are required by other DT consumers, for example
v4l2 subnode may require privacy or flash LED. Unlike trigger-source
approach which is typically used as 'soft' binding, referencing LED
devices by phandle makes things simpler when 'hard' binding is desired.
Document LED properties that its consumers may define.
select: true
properties:
leds:
oneOf:
- type: object
- $ref: /schemas/types.yaml#/definitions/phandle-array
description:
A list of LED device(s) required by a particular consumer.
items:
maxItems: 1
led-names:
description:
A list of device name(s). Used to map LED devices to their respective
functions, when consumer requires more than one LED.
additionalProperties: true
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
leds {
compatible = "gpio-leds";
privacy_led: privacy-led {
color = <LED_COLOR_ID_RED>;
default-state = "off";
function = LED_FUNCTION_INDICATOR;
gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>;
};
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
v4l2_node: camera@36 {
reg = <0x36>;
leds = <&privacy_led>;
led-names = "privacy";
};
};
...
@@ -0,0 +1,29 @@
Motorola CPCAP PMIC LEDs
------------------------
This module is part of the CPCAP. For more details about the whole
chip see Documentation/devicetree/bindings/mfd/motorola-cpcap.txt.
Requires node properties:
- compatible: should be one of
* "motorola,cpcap-led-mdl" (Main Display Lighting)
* "motorola,cpcap-led-kl" (Keyboard Lighting)
* "motorola,cpcap-led-adl" (Aux Display Lighting)
* "motorola,cpcap-led-red" (Red Triode)
* "motorola,cpcap-led-green" (Green Triode)
* "motorola,cpcap-led-blue" (Blue Triode)
* "motorola,cpcap-led-cf" (Camera Flash)
* "motorola,cpcap-led-bt" (Bluetooth)
* "motorola,cpcap-led-cp" (Camera Privacy LED)
- label: see Documentation/devicetree/bindings/leds/common.txt
- vdd-supply: A phandle to the regulator powering the LED
Example:
&cpcap {
cpcap_led_red: red-led {
compatible = "motorola,cpcap-led-red";
label = "cpcap:red";
vdd-supply = <&sw5>;
};
};
@@ -0,0 +1,66 @@
Crane Merchandising System - cr0014114 LED driver
-------------------------------------------------
This LED Board is widely used in vending machines produced
by Crane Merchandising Systems.
Required properties:
- compatible: "crane,cr0014114"
Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply. In particular, "reg" and "spi-max-frequency" properties must be given.
LED sub-node properties:
- function :
see Documentation/devicetree/bindings/leds/common.txt
- color :
see Documentation/devicetree/bindings/leds/common.txt
- label :
see Documentation/devicetree/bindings/leds/common.txt (deprecated)
- linux,default-trigger : (optional)
see Documentation/devicetree/bindings/leds/common.txt
Example
-------
#include <dt-bindings/leds/common.h>
led-controller@0 {
compatible = "crane,cr0014114";
reg = <0>;
spi-max-frequency = <50000>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
function = "coin";
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
function = "coin";
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
function = "coin";
color = <LED_COLOR_ID_BLUE>;
};
led@3 {
reg = <3>;
function = "bill";
color = <LED_COLOR_ID_RED>;
};
led@4 {
reg = <4>;
function = "bill";
color = <LED_COLOR_ID_GREEN>;
};
led@5 {
reg = <5>;
function = "bill";
color = <LED_COLOR_ID_BLUE>;
};
...
};
@@ -0,0 +1,69 @@
Crane Merchandising System - EL15203000 LED driver
--------------------------------------------------
This LED Board (aka RED LEDs board) is widely used in
coffee vending machines produced by Crane Merchandising Systems.
The board manages 3 LEDs and supports predefined blinking patterns
for specific leds.
Vending area LED encoded with symbol 'V' (hex code 0x56).
Doesn't have any hardware blinking pattern.
Screen light tube LED which surrounds vending machine screen and
encoded with symbol 'S' (hex code 0x53). Supports blinking breathing pattern.
Water Pipe LED encoded with symbol 'P' (hex code 0x50) and
actually consists of 5 LEDs that exposed by protocol like one LED.
Supports next patterns:
- cascade pattern
- inversed cascade pattern
- bounce pattern
- inversed bounce pattern
Required properties:
- compatible : "crane,el15203000"
- #address-cells : must be 1
- #size-cells : must be 0
Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply. In particular, "reg" and "spi-max-frequency" properties must be given.
Optional LED sub-node properties:
- function:
see Documentation/devicetree/bindings/leds/common.txt
- color:
see Documentation/devicetree/bindings/leds/common.txt
Example
-------
#include <dt-bindings/leds/common.h>
led-controller@0 {
compatible = "crane,el15203000";
reg = <0>;
spi-max-frequency = <50000>;
#address-cells = <1>;
#size-cells = <0>;
/* water pipe */
led@50 {
reg = <0x50>;
function = "pipe";
color = <LED_COLOR_ID_RED>;
};
/* screen frame */
led@53 {
reg = <0x53>;
function = "screen";
color = <LED_COLOR_ID_RED>;
};
/* vending area */
led@56 {
reg = <0x56>;
function = "vend";
color = <LED_COLOR_ID_RED>;
};
};
@@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEDs connected to GPIO lines
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Pavel Machek <pavel@ucw.cz>
description:
Each LED is represented as a sub-node of the gpio-leds device. Each
node's name represents the name of the corresponding LED.
properties:
compatible:
const: gpio-leds
patternProperties:
# The first form is preferred, but fall back to just 'led' anywhere in the
# node name to at least catch some child nodes.
"(^led-[0-9a-f]$|led)":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
gpios:
maxItems: 1
retain-state-suspended:
description:
The suspend state can be retained.Such as charge-led gpio.
type: boolean
retain-state-shutdown:
description:
Retain the state of the LED on shutdown. Useful in BMC systems, for
example when the BMC is rebooted while the host remains up.
type: boolean
required:
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
leds {
compatible = "gpio-leds";
led-0 {
gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "disk-activity";
function = LED_FUNCTION_DISK;
};
led-1 {
gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
/* Keep LED on if BIOS detected hardware fault */
default-state = "keep";
function = LED_FUNCTION_FAULT;
};
};
run-control {
compatible = "gpio-leds";
led-0 {
gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_RED>;
default-state = "off";
};
led-1 {
gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
default-state = "on";
};
};
...
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Multi-color LED built with monochromatic LEDs
maintainers:
- Jean-Jacques Hiblot <jjhiblot@traphandler.com>
description: |
This driver combines several monochromatic LEDs into one multi-color
LED using the multicolor LED class.
properties:
compatible:
const: leds-group-multicolor
leds: true
required:
- leds
allOf:
- $ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
monochromatic-leds {
compatible = "gpio-leds";
led0: led-0 {
gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_RED>;
};
led1: led-1 {
gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led2: led-2 {
gpios = <&mcu_pio 2 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_BLUE>;
};
};
multi-led {
compatible = "leds-group-multicolor";
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_INDICATOR;
leds = <&led0>, <&led1>, <&led2>;
};
...
@@ -0,0 +1,53 @@
Binding for ISSI IS31FL32xx and Si-En SN32xx LED Drivers
The IS31FL32xx/SN32xx family of LED drivers are I2C devices with multiple
constant-current channels, each with independent 256-level PWM control.
Each LED is represented as a sub-node of the device.
Required properties:
- compatible: one of
issi,is31fl3236
issi,is31fl3235
issi,is31fl3218
issi,is31fl3216
issi,is31fl3293
si-en,sn3218
si-en,sn3216
- reg: I2C slave address
- address-cells : must be 1
- size-cells : must be 0
LED sub-node properties:
- reg : LED channel number (1..N)
- label : (optional)
see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger : (optional)
see Documentation/devicetree/bindings/leds/common.txt
Example:
is31fl3236: led-controller@3c {
compatible = "issi,is31fl3236";
reg = <0x3c>;
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
label = "EB:blue:usr0";
};
led@2 {
reg = <2>;
label = "EB:blue:usr1";
};
...
led@36 {
reg = <36>;
label = "EB:blue:usr35";
};
};
For more product information please see the links below:
http://www.issi.com/US/product-analog-fxled-driver.shtml
http://www.si-en.com/product.asp?parentid=890
@@ -0,0 +1,135 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-lgm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver
maintainers:
- Zhu, Yi Xin <Yixin.zhu@intel.com>
- Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com>
properties:
compatible:
const: intel,lgm-ssoled
reg:
maxItems: 1
clocks:
maxItems: 2
clock-names:
items:
- const: sso
- const: fpid
gpio-controller: true
'#gpio-cells':
const: 2
ngpios:
minimum: 0
maximum: 32
description:
Number of GPIOs this controller provides.
intel,sso-update-rate-hz:
description:
Blink frequency for SOUTs in Hz.
led-controller:
type: object
description:
This sub-node must contain a sub-node for each leds.
additionalProperties: false
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^led@[0-2]$":
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 0
maximum: 2
led-gpios:
maxItems: 1
intel,sso-hw-trigger:
type: boolean
description: This property indicates Hardware driven/control LED.
intel,sso-hw-blink:
type: boolean
description: This property indicates Enable LED blink by Hardware.
intel,sso-blink-rate-hz:
description: LED HW blink frequency.
retain-state-suspended:
type: boolean
description: The suspend state of LED can be retained.
retain-state-shutdown:
type: boolean
description: Retain the state of the LED on shutdown.
required:
- compatible
- reg
- clocks
- clock-names
- "#gpio-cells"
- gpio-controller
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/intel,lgm-clk.h>
#include <dt-bindings/leds/common.h>
ssogpio: ssogpio@e0d40000 {
compatible = "intel,lgm-ssoled";
reg = <0xE0D40000 0x2E4>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ledc>;
clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>;
clock-names = "sso", "fpid";
intel,sso-update-rate-hz = <250000>;
led-controller {
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
function = "gphy";
color = <LED_COLOR_ID_GREEN>;
led-gpios = <&ssogpio 0 0>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
led-gpios = <&ssogpio 23 0>;
};
};
};
@@ -0,0 +1,105 @@
* Texas Instruments - lm3532 White LED driver with ambient light sensing
capability.
The LM3532 provides the 3 high-voltage, low-side current sinks. The device is
programmable over an I2C-compatible interface and has independent
current control for all three channels. The adaptive current regulation
method allows for different LED currents in each current sink thus allowing
for a wide variety of backlight and keypad applications.
The main features of the LM3532 include dual ambient light sensor inputs
each with 32 internal voltage setting resistors, 8-bit logarithmic and linear
brightness control, dual external PWM brightness control inputs, and up to
1000:1 dimming ratio with programmable fade in and fade out settings.
Required properties:
- compatible : "ti,lm3532"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0
Optional properties:
- enable-gpios : gpio pin to enable (active high)/disable the device.
- ramp-up-us - The Run time ramp rates/step are from one current
set-point to another after the device has reached its
initial target set point from turn-on
- ramp-down-us - The Run time ramp rates/step are from one current
set-point to another after the device has reached its
initial target set point from turn-on
Range for ramp settings: 8us - 65536us
Optional properties if ALS mode is used:
- ti,als-vmin - Minimum ALS voltage defined in Volts
- ti,als-vmax - Maximum ALS voltage defined in Volts
Per the data sheet the max ALS voltage is 2V and the min is 0V
- ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms
- ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms
Range for impedance select: 37000 Ohms - 1190 Ohms
Values above 37kohms will be set to the "High Impedance" setting
- ti,als-avrg-time-us - Determines the length of time the device needs to
average the two ALS inputs. This is only used if
the input mode is LM3532_ALS_INPUT_AVRG.
Range: 17920us - 2293760us
- ti,als-input-mode - Determines how the device uses the attached ALS
devices.
0x00 - ALS1 and ALS2 input average
0x01 - ALS1 Input
0x02 - ALS2 Input
0x03 - Max of ALS1 and ALS2
Required child properties:
- reg : Indicates control bank the LED string is controlled by
- led-sources : see Documentation/devicetree/bindings/leds/common.txt
- ti,led-mode : Defines if the LED strings are manually controlled or
if the LED strings are controlled by the ALS.
0x00 - LED strings are I2C controlled via full scale
brightness control register
0x01 - LED strings are ALS controlled
Optional LED child properties:
- label : see Documentation/devicetree/bindings/leds/common.txt
- linux,default-trigger :
see Documentation/devicetree/bindings/leds/common.txt
- led-max-microamp : Defines the full scale current value for each control
bank. The range is from 5000uA-29800uA in increments
of 800uA.
Example:
led-controller@38 {
compatible = "ti,lm3532";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x38>;
enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
ramp-up-us = <1024>;
ramp-down-us = <65536>;
ti,als-vmin = <0>;
ti,als-vmax = <2000>;
ti,als1-imp-sel = <4110>;
ti,als2-imp-sel = <2180>;
ti,als-avrg-time-us = <17920>;
ti,als-input-mode = <0x00>;
led@0 {
reg = <0>;
led-sources = <2>;
ti,led-mode = <1>;
led-max-microamp = <21800>;
label = ":backlight";
linux,default-trigger = "backlight";
};
led@1 {
reg = <1>;
led-sources = <1>;
ti,led-mode = <0>;
label = ":kbd_backlight";
};
};
For more product information please see the links below:
https://www.ti.com/product/LM3532
@@ -0,0 +1,51 @@
* Texas Instruments - lm3601x Single-LED Flash Driver
The LM3601X are ultra-small LED flash drivers that
provide a high level of adjustability.
Required properties:
- compatible : Can be one of the following
"ti,lm36010"
"ti,lm36011"
- reg : I2C slave address
- #address-cells : 1
- #size-cells : 0
Required child properties:
- reg : 0 - Indicates a IR mode
1 - Indicates a Torch (white LED) mode
Required properties for flash LED child nodes:
See Documentation/devicetree/bindings/leds/common.txt
- flash-max-microamp : Range from 11mA - 1.5A
- flash-max-timeout-us : Range from 40ms - 1600ms
- led-max-microamp : Range from 2.4mA - 376mA
Optional child properties:
- function : see Documentation/devicetree/bindings/leds/common.txt
- color : see Documentation/devicetree/bindings/leds/common.txt
- label : see Documentation/devicetree/bindings/leds/common.txt (deprecated)
Example:
#include <dt-bindings/leds/common.h>
led-controller@64 {
compatible = "ti,lm36010";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x64>;
led@0 {
reg = <1>;
function = LED_FUNCTION_TORCH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <376000>;
flash-max-microamp = <1500000>;
flash-max-timeout-us = <1600000>;
};
}
For more product information please see the links below:
https://www.ti.com/product/LM36010
https://www.ti.com/product/LM36011
@@ -0,0 +1,85 @@
* Texas Instruments LM36274 4-Channel LCD Backlight Driver w/Integrated Bias
The LM36274 is an integrated four-channel WLED driver and LCD bias supply.
The backlight boost provides the power to bias four parallel LED strings with
up to 29V total output voltage. The 11-bit LED current is programmable via
the I2C bus and/or controlled via a logic level PWM input from 60 uA to 30 mA.
Parent device properties are documented in
Documentation/devicetree/bindings/mfd/ti-lmu.txt
Regulator properties are documented in
Documentation/devicetree/bindings/regulator/lm363x-regulator.txt
Required backlight properties:
- compatible:
"ti,lm36274-backlight"
- reg : 0
- #address-cells : 1
- #size-cells : 0
- led-sources : Indicates which LED strings will be enabled.
Values from 0-3, sources is 0 based so strings will be
source value + 1.
Optional backlight properties:
- 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.
lm36274@11 {
compatible = "ti,lm36274";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x11>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
regulators {
#address-cells = <1>;
#size-cells = <0>;
compatible = "ti,lm363x-regulator";
enable-gpios = <&pioC 0 GPIO_ACTIVE_HIGH>,
<&pioC 1 GPIO_ACTIVE_HIGH>;
vboost {
regulator-name = "lcd_boost";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <7150000>;
regulator-always-on;
};
vpos {
regulator-name = "lcd_vpos";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6500000>;
};
vneg {
regulator-name = "lcd_vneg";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <6500000>;
};
};
backlight {
#address-cells = <1>;
#size-cells = <0>;
compatible = "ti,lm36274-backlight";
led@0 {
reg = <0>;
led-sources = <0 2>;
label = "white:backlight_cluster";
linux,default-trigger = "backlight";
};
};
};
For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lm36274.pdf
@@ -0,0 +1,164 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-lp50xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LED driver for LP50XX RGB LED from Texas Instruments.
maintainers:
- Andrew Davis <afd@ti.com>
description: |
The LP50XX is multi-channel, I2C RGB LED Drivers that can group RGB LEDs into
a LED group or control them individually.
The difference in these RGB LED drivers is the number of supported RGB
modules.
For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lp5012.pdf
https://www.ti.com/lit/ds/symlink/lp5024.pdf
https://www.ti.com/lit/ds/symlink/lp5036.pdf
properties:
compatible:
enum:
- ti,lp5009
- ti,lp5012
- ti,lp5018
- ti,lp5024
- ti,lp5030
- ti,lp5036
reg:
maxItems: 1
description:
I2C slave address
lp5009/12 - 0x14, 0x15, 0x16, 0x17
lp5018/24 - 0x28, 0x29, 0x2a, 0x2b
lp5030/36 - 0x30, 0x31, 0x32, 0x33
enable-gpios:
maxItems: 1
description: GPIO pin to enable/disable the device.
vled-supply:
description: LED supply.
'#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:
minItems: 1
maxItems: 12
description:
This property denotes the LED module number(s) that is used on the
for the child node. The LED modules can either be used stand alone
or grouped into a module bank.
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
items:
- minimum: 0
maximum: 2
description:
This property denotes the index within the LED bank.
required:
- reg
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@14 {
compatible = "ti,lp5009";
reg = <0x14>;
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&gpio1 16>;
multi-led@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_CHARGING;
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>;
};
};
multi-led@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x3>, <0x4>, <0x5>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
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>;
};
};
};
};
...
@@ -0,0 +1,292 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-lp55xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI/National Semiconductor LP55xx and LP8501 LED Drivers
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Pavel Machek <pavel@ucw.cz>
description: |
Bindings for the TI/National Semiconductor LP55xx and LP8501 multi channel
LED Drivers.
For more product information please see the link below:
https://www.ti.com/lit/gpn/lp5521
https://www.ti.com/lit/gpn/lp5523
https://www.ti.com/lit/gpn/lp55231
https://www.ti.com/lit/gpn/lp5562
https://www.ti.com/lit/gpn/lp8501
properties:
compatible:
enum:
- national,lp5521
- national,lp5523
- ti,lp55231
- ti,lp5562
- ti,lp5569
- ti,lp8501
reg:
maxItems: 1
description: I2C slave address
clock-mode:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
Input clock mode
enum:
- 0 # automode
- 1 # internal
- 2 # external
enable-gpios:
maxItems: 1
description: |
GPIO attached to the chip's enable pin
label: true
pwr-sel:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
LP8501 specific property. Power selection for output channels.
enum:
- 0 # D1~9 are connected to VDD
- 1 # D1~6 with VDD, D7~9 with VOUT
- 2 # D1~6 with VOUT, D7~9 with VDD
- 3 # D1~9 are connected to VOUT
'#address-cells':
const: 1
'#size-cells':
const: 0
ti,charge-pump-mode:
description:
Set the operating mode of the internal charge pump as defined in
<dt-bindings/leds/leds-lp55xx.h>.
$ref: /schemas/types.yaml#/definitions/uint32
default: 3 # auto
maximum: 3
patternProperties:
'^multi-led@[0-8]$':
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
maximum: 8
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^led@[0-8]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
led-cur:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
Current setting at each LED channel (mA x10, 0 if LED is not connected)
minimum: 0
maximum: 255
max-cur:
$ref: /schemas/types.yaml#/definitions/uint8
description: Maximum current at each LED channel.
reg:
maximum: 8
required:
- reg
"^led@[0-8]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
led-cur:
$ref: /schemas/types.yaml#/definitions/uint8
description: |
Current setting at each LED channel (mA x10, 0 if LED is not connected)
minimum: 0
maximum: 255
max-cur:
$ref: /schemas/types.yaml#/definitions/uint8
description: Maximum current at each LED channel.
reg:
description: |
Output channel for the LED. This is zero based channel identifier and
the data sheet is a one based channel identifier.
reg value to output to LED output number
enum:
- 0 # LED output D1
- 1 # LED output D2
- 2 # LED output D3
- 3 # LED output D4
- 4 # LED output D5
- 5 # LED output D6
- 6 # LED output D7
- 7 # LED output D8
- 8 # LED output D9
chan-name:
$ref: /schemas/types.yaml#/definitions/string
description: name of channel
if:
not:
properties:
compatible:
contains:
const: ti,lp8501
then:
properties:
pwr-sel: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
#include <dt-bindings/leds/leds-lp55xx.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@32 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "ti,lp8501";
reg = <0x32>;
clock-mode = /bits/ 8 <2>;
pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
ti,charge-pump-mode = <LP55XX_CP_BYPASS>;
led@0 {
reg = <0>;
chan-name = "d1";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@1 {
reg = <1>;
chan-name = "d2";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@2 {
reg = <2>;
chan-name = "d3";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@3 {
reg = <3>;
chan-name = "d4";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@4 {
reg = <4>;
chan-name = "d5";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@5 {
reg = <5>;
chan-name = "d6";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@6 {
reg = <6>;
chan-name = "d7";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@7 {
reg = <7>;
chan-name = "d8";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
led@8 {
reg = <8>;
chan-name = "d9";
led-cur = /bits/ 8 <0x14>;
max-cur = /bits/ 8 <0x20>;
};
};
led-controller@33 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "national,lp5523";
reg = <0x33>;
clock-mode = /bits/ 8 <0>;
multi-led@2 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0x2>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
linux,default-trigger = "heartbeat";
led@0 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x0>;
color = <LED_COLOR_ID_GREEN>;
};
led@1 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x1>;
color = <LED_COLOR_ID_BLUE>;
};
led@6 {
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
reg = <0x6>;
color = <LED_COLOR_ID_RED>;
};
};
};
};
...
@@ -0,0 +1,118 @@
# 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
enable-gpios:
maxItems: 1
description: |
GPIO attached to the chip's enable pin (VIO_EN).
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/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
led-controller@0 {
compatible = "ti,lp5860";
reg = <0x0>;
enable-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
#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>;
};
};
};
};
@@ -0,0 +1,37 @@
Bindings for Linear Technologies LT3593 LED controller
Required properties:
- compatible: Should be "lltc,lt3593".
- lltc,ctrl-gpios: A handle to the GPIO that is connected to the 'CTRL'
pin of the chip.
The hardware supports only one LED. The properties of this LED are
configured in a sub-node in the device node.
Optional sub-node properties:
- function: See Documentation/devicetree/bindings/leds/common.txt
- color: See Documentation/devicetree/bindings/leds/common.txt
- label: A label for the LED. If none is given, the LED will be
named "lt3595::" (deprecated)
- linux,default-trigger: The default trigger for the LED.
See Documentation/devicetree/bindings/leds/common.txt
- default-state: The initial state of the LED.
See Documentation/devicetree/bindings/leds/common.txt
If multiple chips of this type are found in a design, each one needs to
be handled by its own device node.
Example:
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "lltc,lt3593";
lltc,ctrl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
led {
function = LED_FUNCTION_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
default-state = "on";
};
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-max77650.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LED driver for MAX77650 PMIC from Maxim Integrated.
maintainers:
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
description: |
This module is part of the MAX77650 MFD device. For more details
see Documentation/devicetree/bindings/mfd/max77650.yaml.
The LED controller is represented as a sub-node of the PMIC node on
the device tree.
This device has three current sinks.
properties:
compatible:
const: maxim,max77650-led
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description:
Index of the LED.
minimum: 0
maximum: 2
required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
...
@@ -0,0 +1,191 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-mt6360.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LED driver for MT6360 PMIC from MediaTek Integrated.
maintainers:
- Gene Chen <gene_chen@richtek.com>
description: |
This module is part of the MT6360 MFD device.
see Documentation/devicetree/bindings/mfd/mediatek,mt6360.yaml
Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
and 4-channel RGB LED support Register/Flash/Breath Mode
properties:
compatible:
const: mediatek,mt6360-led
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^multi-led@[0-5]$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
enum:
- 0 # LED output ISINK1
- 1 # LED output ISINK2
- 2 # LED output ISINK3
- 3 # LED output ISINKML
- 4 # LED output FLASH1
- 5 # LED output FLASH2
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1, 2]
required:
- reg
- color
required:
- reg
- "#address-cells"
- "#size-cells"
"^led@[0-5]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
description:
Properties for a single LED.
properties:
reg:
enum: [0, 1, 2, 3, 4, 5]
required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "mediatek,mt6360-led";
#address-cells = <1>;
#size-cells = <0>;
multi-led@0 {
reg = <0>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_RGB>;
led-max-microamp = <24000>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
};
};
led@3 {
reg = <3>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <150000>;
};
led@4 {
reg = <4>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
function-enumerator = <1>;
led-max-microamp = <200000>;
flash-max-microamp = <500000>;
flash-max-timeout-us = <1024000>;
};
led@5 {
reg = <5>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
function-enumerator = <2>;
led-max-microamp = <200000>;
flash-max-microamp = <500000>;
flash-max-timeout-us = <1024000>;
};
};
- |
led-controller {
compatible = "mediatek,mt6360-led";
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_RED>;
led-max-microamp = <24000>;
};
led@1 {
reg = <1>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
led-max-microamp = <24000>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_BLUE>;
led-max-microamp = <24000>;
};
led@3 {
reg = <3>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <150000>;
};
led@4 {
reg = <4>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
function-enumerator = <1>;
led-max-microamp = <200000>;
flash-max-microamp = <500000>;
flash-max-timeout-us = <1024000>;
};
led@5 {
reg = <5>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
function-enumerator = <2>;
led-max-microamp = <200000>;
flash-max-microamp = <500000>;
flash-max-timeout-us = <1024000>;
};
};
...
@@ -0,0 +1,92 @@
Binding for the CPLD LEDs (GPIO extension bus) found on some LaCie/Seagate
boards (Example: 2Big/5Big Network v2, 2Big NAS).
Required properties:
- compatible: "lacie,netxbig-leds".
- gpio-ext: Phandle for the gpio-ext bus.
Optional properties:
- timers: Timer array. Each timer entry is represented by three integers:
Mode (gpio-ext bus), delay_on and delay_off.
Each LED is represented as a sub-node of the netxbig-leds device.
Required sub-node properties:
- mode-addr: Mode register address on gpio-ext bus.
- mode-val: Mode to value mapping. Each entry is represented by two integers:
A mode and the corresponding value on the gpio-ext bus.
- bright-addr: Brightness register address on gpio-ext bus.
- max-brightness: Maximum brightness value.
Optional sub-node properties:
- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.
Example:
netxbig-leds {
compatible = "lacie,netxbig-leds";
gpio-ext = &gpio_ext;
timers = <NETXBIG_LED_TIMER1 500 500
NETXBIG_LED_TIMER2 500 1000>;
blue-power {
label = "netxbig:blue:power";
mode-addr = <0>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 1
NETXBIG_LED_TIMER1 3
NETXBIG_LED_TIMER2 7>;
bright-addr = <1>;
max-brightness = <7>;
};
red-power {
label = "netxbig:red:power";
mode-addr = <0>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 2
NETXBIG_LED_TIMER1 4>;
bright-addr = <1>;
max-brightness = <7>;
};
blue-sata0 {
label = "netxbig:blue:sata0";
mode-addr = <3>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 7
NETXBIG_LED_SATA 1
NETXBIG_LED_TIMER1 3>;
bright-addr = <2>;
max-brightness = <7>;
};
red-sata0 {
label = "netxbig:red:sata0";
mode-addr = <3>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 2
NETXBIG_LED_TIMER1 4>;
bright-addr = <2>;
max-brightness = <7>;
};
blue-sata1 {
label = "netxbig:blue:sata1";
mode-addr = <4>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 7
NETXBIG_LED_SATA 1
NETXBIG_LED_TIMER1 3>;
bright-addr = <2>;
max-brightness = <7>;
};
red-sata1 {
label = "netxbig:red:sata1";
mode-addr = <4>;
mode-val = <NETXBIG_LED_OFF 0
NETXBIG_LED_ON 2
NETXBIG_LED_TIMER1 4>;
bright-addr = <2>;
max-brightness = <7>;
};
};
@@ -0,0 +1,35 @@
Binding for dual-GPIO LED found on Network Space v2 (and parents).
Required properties:
- compatible: "lacie,ns2-leds".
Each LED is represented as a sub-node of the ns2-leds device.
Required sub-node properties:
- cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
- slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
- modes-map: A mapping between LED modes (off, on or SATA activity blinking) and
the corresponding cmd-gpio/slow-gpio values. All the GPIO values combinations
should be given in order to avoid having an unknown mode at driver probe time.
Optional sub-node properties:
- label: Name for this LED. If omitted, the label is taken from the node name.
- linux,default-trigger: Trigger assigned to the LED.
Example:
#include <dt-bindings/leds/leds-ns2.h>
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
modes-map = <NS_V2_LED_OFF 0 1
NS_V2_LED_ON 1 0
NS_V2_LED_ON 0 0
NS_V2_LED_SATA 1 1>;
};
};
@@ -0,0 +1,26 @@
Device Tree binding for LEDs on IBM Power Systems
-------------------------------------------------
Required properties:
- compatible : Should be "ibm,opal-v3-led".
- led-mode : Should be "lightpath" or "guidinglight".
Each location code of FRU/Enclosure must be expressed in the
form of a sub-node.
Required properties for the sub nodes:
- led-types : Supported LED types (attention/identify/fault) provided
in the form of string array.
Example:
leds {
compatible = "ibm,opal-v3-led";
led-mode = "lightpath";
U78C9.001.RST0027-P1-C1 {
led-types = "identify", "fault";
};
...
...
};
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Multi-color LEDs connected to PWM
maintainers:
- Sven Schwermer <sven.schwermer@disruptive-technologies.com>
description: |
This driver combines several monochrome PWM LEDs into one multi-color
LED using the multicolor LED class.
properties:
compatible:
const: pwm-leds-multicolor
multi-led:
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
max-brightness:
description:
Maximum brightness possible for the LED
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^led-[0-9a-z]+$":
type: object
$ref: common.yaml#
additionalProperties: false
properties:
pwms:
maxItems: 1
pwm-names: true
active-low: true
color: true
required:
- pwms
- color
required:
- compatible
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "pwm-leds-multicolor";
multi-led {
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_INDICATOR;
max-brightness = <65535>;
led-red {
pwms = <&pwm1 0 1000000>;
color = <LED_COLOR_ID_RED>;
};
led-green {
pwms = <&pwm2 0 1000000>;
color = <LED_COLOR_ID_GREEN>;
};
led-blue {
pwms = <&pwm3 0 1000000>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
...
@@ -0,0 +1,78 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEDs connected to PWM
maintainers:
- Pavel Machek <pavel@ucw.cz>
description:
Each LED is represented as a sub-node of the pwm-leds device. Each
node's name represents the name of the corresponding LED.
properties:
compatible:
const: pwm-leds
patternProperties:
"^led(-[0-9a-f]+)?$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
pwms:
maxItems: 1
pwm-names: true
max-brightness:
description:
Maximum brightness possible for the LED
$ref: /schemas/types.yaml#/definitions/uint32
default-brightness:
description:
Brightness to be set if LED's default state is on. Used only during
initialization. If the option is not set then max brightness is used.
$ref: /schemas/types.yaml#/definitions/uint32
enable-gpios:
description:
GPIO for LED hardware enable control. Set active when brightness is
non-zero and inactive when brightness is zero.
The GPIO default state follows the "default-state" property.
maxItems: 1
required:
- pwms
- max-brightness
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "pwm-leds";
led-1 {
label = "omap4::keypad";
pwms = <&twl_pwm 0 7812500>;
max-brightness = <127>;
};
led-2 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_CHARGING;
pwms = <&twl_pwmled 0 7812500>;
max-brightness = <255>;
};
};
...
@@ -0,0 +1,308 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Light Pulse Generator
maintainers:
- Bjorn Andersson <bjorn.andersson@linaro.org>
description: >
The Qualcomm Light Pulse Generator consists of three different hardware blocks;
a ramp generator with lookup table (LUT), the light pulse generator and a three
channel current sink. These blocks are found in a wide range of Qualcomm PMICs.
The light pulse generator (LPG) can also be used independently to output PWM
signal for standard PWM applications. In this scenario, the LPG output should
be routed to a specific PMIC GPIO by setting the GPIO pin mux to the special
functions indicated in the datasheet, the TRILED driver for the channel will
not be enabled in this configuration.
properties:
compatible:
oneOf:
- enum:
- qcom,pm660l-lpg
- qcom,pm8150b-lpg
- qcom,pm8150l-lpg
- qcom,pm8350c-pwm
- qcom,pm8916-pwm
- qcom,pm8941-lpg
- qcom,pm8994-lpg
- qcom,pmc8180c-lpg
- qcom,pmi632-lpg
- qcom,pmi8950-pwm
- qcom,pmi8994-lpg
- qcom,pmi8998-lpg
- qcom,pmk8550-pwm
- items:
- enum:
- qcom,pm6150l-lpg
- const: qcom,pm8150l-lpg
- items:
- enum:
- qcom,pm8550-pwm
- qcom,pmh0101-pwm
- const: qcom,pm8350c-pwm
- items:
- enum:
- qcom,pm8937-pwm
- const: qcom,pm8916-pwm
"#pwm-cells":
const: 2
"#address-cells":
const: 1
"#size-cells":
const: 0
qcom,power-source:
$ref: /schemas/types.yaml#/definitions/uint32
description:
power-source used to drive the output, as defined in the datasheet.
Should be specified if the TRILED block is present
enum: [0, 1, 3]
qcom,dtest:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
description: >
A list of integer pairs, where each pair represent the dtest line the
particular channel should be connected to and the flags denoting how the
value should be outputted, as defined in the datasheet. The number of
pairs should be the same as the number of channels.
items:
items:
- description: dtest line to attach
- description: flags for the attachment
nvmem:
description: >
This property is required for PMICs that supports PPG, which is when a
PMIC stores LPG per-channel data and pattern LUT in SDAM modules instead
of in a LUT peripheral. For PMICs, such as PM8350C, per-channel data
and pattern LUT is separated into 2 SDAM modules. In that case, phandles
to both SDAM modules need to be specified.
minItems: 1
maxItems: 2
nvmem-names:
minItems: 1
items:
- const: lpg_chan_sdam
- const: lut_sdam
qcom,pbs:
$ref: /schemas/types.yaml#/definitions/phandle
description: >
Phandle of the Qualcomm Programmable Boot Sequencer node (PBS).
PBS node is used to trigger LPG pattern sequences for PMICs that support
single SDAM PPG.
multi-led:
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
"#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
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maxItems: 1
required:
- reg
required:
- compatible
additionalProperties: false
allOf:
- if:
properties:
compatible:
contains:
enum:
- qcom,pm660l-lpg
- qcom,pm8150b-lpg
- qcom,pm8150l-lpg
- qcom,pm8916-pwm
- qcom,pm8941-lpg
- qcom,pm8994-lpg
- qcom,pmc8180c-lpg
- qcom,pmi8950-pwm
- qcom,pmi8994-lpg
- qcom,pmi8998-lpg
- qcom,pmk8550-pwm
then:
properties:
nvmem: false
nvmem-names: false
- if:
properties:
compatible:
contains:
const: qcom,pmi632-lpg
then:
properties:
nvmem:
maxItems: 1
nvmem-names:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8350c-pwm
then:
properties:
nvmem:
minItems: 2
nvmem-names:
minItems: 2
examples:
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "qcom,pmi8994-lpg";
#address-cells = <1>;
#size-cells = <0>;
qcom,power-source = <1>;
qcom,dtest = <0 0>,
<0 0>,
<0 0>,
<4 1>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <1>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <0>;
default-state = "on";
};
led@3 {
reg = <3>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <2>;
};
led@4 {
reg = <4>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <3>;
};
};
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "qcom,pmi8994-lpg";
#address-cells = <1>;
#size-cells = <0>;
qcom,power-source = <1>;
multi-led {
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STATUS;
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_RED>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_GREEN>;
};
led@3 {
reg = <3>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
- |
pwm-controller {
compatible = "qcom,pm8916-pwm";
#pwm-cells = <2>;
};
- |
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "qcom,pmi632-lpg";
#address-cells = <1>;
#size-cells = <0>;
#pwm-cells = <2>;
nvmem-names = "lpg_chan_sdam";
nvmem = <&pmi632_sdam_7>;
qcom,pbs = <&pmi632_pbs_client3>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_RED>;
label = "red";
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_GREEN>;
label = "green";
};
led@3 {
reg = <3>;
color = <LED_COLOR_ID_BLUE>;
label = "blue";
};
};
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-rt4505.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Richtek RT4505 Single Channel LED Driver
maintainers:
- ChiYuan Huang <cy_huang@richtek.com>
description: |
The RT4505 is a flash LED driver that can support up to 375mA and 1.5A for
torch and flash mode, respectively.
The data sheet can be found at:
https://www.richtek.com/assets/product_file/RT4505/DS4505-02.pdf
properties:
compatible:
const: richtek,rt4505
reg:
description: I2C slave address of the controller.
maxItems: 1
led:
type: object
$ref: common.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@63 {
compatible = "richtek,rt4505";
reg = <0x63>;
rt4505_flash: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <375000>;
flash-max-microamp = <1500000>;
flash-max-timeout-us = <800000>;
};
};
};
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/leds-sgm3140.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SGMICRO SGM3140 500mA Buck/Boost Charge Pump LED Driver
maintainers:
- Luca Weiss <luca@z3ntu.xyz>
description: |
The SGM3140 is a current-regulated charge pump which can regulate two current
levels for Flash and Torch modes.
The data sheet can be found at:
http://www.sg-micro.com/uploads/soft/20190626/1561535688.pdf
properties:
compatible:
enum:
- ocs,ocp8110
- richtek,rt5033-led
- sgmicro,sgm3140
enable-gpios:
maxItems: 1
description: A connection to the 'EN' pin.
flash-gpios:
maxItems: 1
description: A connection to the 'FLASH' pin.
vin-supply:
description: Regulator providing power to the 'VIN' pin.
led:
type: object
$ref: common.yaml#
unevaluatedProperties: false
required:
- compatible
- flash-gpios
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "sgmicro,sgm3140";
flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
vin-supply = <&reg_dcdc1>;
sgm3140_flash: led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <250000>;
};
};
@@ -0,0 +1,44 @@
* Single Byte SPI LED Device Driver.
The driver can be used for controllers with a very simple SPI protocol:
- one LED is controlled by a single byte on MOSI
- the value of the byte gives the brightness between two values (lowest to
highest)
- no return value is necessary (no MISO signal)
The value for lowest and highest brightness is dependent on the device and
therefore on the compatible string.
Depending on the compatible string some special functions (like hardware
accelerated blinking) might can be supported too.
The driver currently only supports one LED. The properties of the LED are
configured in a sub-node in the device node.
Required properties:
- compatible: should be one of
* "ubnt,acb-spi-led" microcontroller (SONiX 8F26E611LA) based device
used for example in Ubiquiti airCube ISP
Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt
apply.
LED sub-node properties:
- label:
see Documentation/devicetree/bindings/leds/common.txt
- default-state:
see Documentation/devicetree/bindings/leds/common.txt
Only "on" and "off" are supported.
Example:
led-controller@0 {
compatible = "ubnt,acb-spi-led";
reg = <0>;
spi-max-frequency = <100000>;
led {
label = "white:status";
default-state = "on";
};
};
@@ -0,0 +1,49 @@
* Pattern format for LED pattern trigger
The pattern is given by a series of tuples, of brightness and duration (ms).
The LED is expected to traverse the series and each brightness value for the
specified duration. Duration of 0 means brightness should immediately change to
new value, and writing malformed pattern deactivates any active one.
1. For gradual dimming, the dimming interval now is set as 50 milliseconds. So
the tuple with duration less than dimming interval (50ms) is treated as a step
change of brightness, i.e. the subsequent brightness will be applied without
adding intervening dimming intervals.
The gradual dimming format of the software pattern values should be:
"brightness_1 duration_1 brightness_2 duration_2 brightness_3 duration_3 ...".
For example (using sysfs interface):
echo 0 1000 255 2000 > pattern
It will make the LED go gradually from zero-intensity to max (255) intensity in
1000 milliseconds, then back to zero intensity in 2000 milliseconds:
LED brightness
^
255-| / \ / \ /
| / \ / \ /
| / \ / \ /
| / \ / \ /
0-| / \/ \/
+---0----1----2----3----4----5----6------------> time (s)
2. To make the LED go instantly from one brightness value to another, we should
use zero-time lengths (the brightness must be same as the previous tuple's). So
the format should be: "brightness_1 duration_1 brightness_1 0 brightness_2
duration_2 brightness_2 0 ...".
For example (using sysfs interface):
echo 0 1000 0 0 255 2000 255 0 > pattern
It will make the LED stay off for one second, then stay at max brightness for
two seconds:
LED brightness
^
255-| +---------+ +---------+
| | | | |
| | | | |
| | | | |
0-| -----+ +----+ +----
+---0----1----2----3----4----5----6------------> time (s)
@@ -0,0 +1,105 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/maxim,max77693.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX77693 MicroUSB and Companion Power Management IC LEDs
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
Circuit (MUIC).
There are two LED outputs available - FLED1 and FLED2. Each of them can
control a separate LED or they can be connected together to double the
maximum current for a single connected LED. One LED is represented by one
child node.
See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
additional information and example.
properties:
compatible:
const: maxim,max77693-led
maxim,boost-mode:
description:
In boost mode the device can produce up to 1.2A of total current on both
outputs. The maximum current on each output is reduced to 625mA then. If
not enabled explicitly, boost setting defaults to LEDS_BOOST_FIXED in
case both current sources are used.
See LEDS_BOOST_* in include/dt-bindings/leds/common.h.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
maxim,boost-mvout:
description: |
Output voltage of the boost module in millivolts.
Valid values: 3300 - 5500, step by 25 (rounded down)
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 3300
maximum: 5500
default: 3300
maxim,mvsys-min:
description: |
Low input voltage level in millivolts. Flash is not fired if chip
estimates that system voltage could drop below this level due to flash
power consumption.
Valid values: 2400 - 3400, step by 33 (rounded down)
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 2400
maximum: 3400
default: 2400
patternProperties:
"^([a-z]+-)?led[01]?$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
led-sources:
allOf:
- minItems: 1
maxItems: 2
items:
minimum: 0
maximum: 1
led-max-microamp:
description: |
Valid values for a LED connected to one FLED output:
15625 - 250000, step by 15625 (rounded down)
Valid values for a LED connected to both FLED outputs:
15625 - 500000, step by 15625 (rounded down)
flash-max-microamp:
description: |
Valid values for a single LED connected to one FLED output
(boost mode must be turned off):
15625 - 1000000, step by 15625 (rounded down)
Valid values for a single LED connected to both FLED outputs:
15625 - 1250000, step by 15625 (rounded down)
Valid values for two LEDs case:
15625 - 625000, step by 15625 (rounded down)
flash-max-timeout-us:
description: |
Valid values: 62500 - 1000000, step by 62500 (rounded down)
minimum: 62500
maximum: 1000000
required:
- flash-max-microamp
- flash-max-timeout-us
- led-max-microamp
- led-sources
required:
- compatible
additionalProperties: false
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/mediatek,mt6370-flashlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Flash LED driver for MT6370 PMIC from MediaTek Integrated.
maintainers:
- Alice Chen <alice_chen@richtek.com>
description: |
This module is part of the MT6370 MFD device.
Add MT6370 flash LED driver include 2-channel flash LED support Torch/Strobe Mode.
properties:
compatible:
const: mediatek,mt6370-flashlight
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-1]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1]
required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/mediatek,mt6370-indicator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LED driver for MT6370 PMIC from MediaTek Integrated.
maintainers:
- Alice Chen <alice_chen@richtek.com>
description: |
This module is part of the MT6370 MFD device.
Add MT6370 LED driver include 4-channel RGB LED support Register/PWM/Breath Mode
properties:
compatible:
const: mediatek,mt6370-indicator
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^multi-led@[0-3]$":
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1, 2, 3]
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1, 2]
required:
- reg
- color
required:
- reg
- color
- "#address-cells"
- "#size-cells"
"^led@[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1, 2, 3]
required:
- reg
- color
required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/nxp,pca953x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA9532 LED Dimmer
maintainers:
- Riku Voipio <riku.voipio@iki.fi>
description: |
The PCA9532 family is SMBus I/O expander optimized for dimming LEDs.
The PWM support 256 steps.
For more product information please see the link below:
https://www.nxp.com/docs/en/data-sheet/PCA9532.pdf
properties:
compatible:
enum:
- nxp,pca9530
- nxp,pca9531
- nxp,pca9532
- nxp,pca9533
reg:
maxItems: 1
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 16
'#gpio-cells':
const: 2
patternProperties:
"^led-[0-9a-z]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
type:
description: |
Output configuration, see include/dt-bindings/leds/leds-pca9532.h
$ref: /schemas/types.yaml#/definitions/uint32
default: 0
minimum: 0
maximum: 4
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/leds-pca9532.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@62 {
compatible = "nxp,pca9533";
reg = <0x62>;
led-1 {
label = "pca:red:power";
type = <PCA9532_TYPE_LED>;
};
led-2 {
label = "pca:green:power";
type = <PCA9532_TYPE_LED>;
};
led-3 {
type = <PCA9532_TYPE_LED>;
default-state = "on";
};
led-4 {
type = <PCA9532_TYPE_LED>;
default-state = "keep";
};
};
};
...
@@ -0,0 +1,158 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/nxp,pca955x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA955X LED controllers
maintainers:
- Nate Case <ncase@xes-inc.com>
description: |
The PCA955x family of chips are I2C LED blinkers whose pins not used
to control LEDs can be used as general purpose I/Os. The GPIO pins can
be input or output, and output pins can also be pulse-width controlled.
For more product information please see the link below:
- https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf
properties:
compatible:
enum:
- nxp,pca9550
- nxp,pca9551
- nxp,pca9552
- ibm,pca9552
- nxp,pca9553
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
gpio-controller: true
gpio-line-names:
minItems: 1
maxItems: 16
"#gpio-cells":
const: 2
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
maxItems: 1
type:
description: |
Output configuration, see include/dt-bindings/leds/leds-pca955x.h
$ref: /schemas/types.yaml#/definitions/uint32
default: 0
minimum: 0
maximum: 2
required:
- reg
allOf:
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9550
then:
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 1
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9551
then:
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 7
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9552
- ibm,pca9552
then:
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 15
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9553
then:
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
maximum: 3
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/leds-pca955x.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@60 {
compatible = "nxp,pca9552";
reg = <0x60>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
label = "red:power";
linux,default-trigger = "default-on";
type = <PCA955X_TYPE_LED>;
};
led@1 {
reg = <1>;
label = "green:power";
type = <PCA955X_TYPE_LED>;
};
led@2 {
reg = <2>;
label = "pca9552:yellow";
type = <PCA955X_TYPE_LED>;
};
led@3 {
reg = <3>;
label = "pca9552:white";
type = <PCA955X_TYPE_LED>;
};
};
};
...
@@ -0,0 +1,140 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/nxp,pca963x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA963x LED controllers
maintainers:
- Laurent Pinchart <laurent.pinchart@ideasonboard.com>
description: |
The NXP PCA963x are I2C-controlled LED drivers optimized for
Red/Green/Blue/Amber (RGBA) color mixing applications. Each LED is
individually controllable and has its own PWM controller.
Datasheets are available at
- https://www.nxp.com/docs/en/data-sheet/PCA9632.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9633.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9634.pdf
- https://www.nxp.com/docs/en/data-sheet/PCA9635.pdf
properties:
compatible:
enum:
- nxp,pca9632
- nxp,pca9633
- nxp,pca9634
- nxp,pca9635
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
nxp,hw-blink:
type: boolean
description:
Use hardware blinking instead of software blinking
nxp,inverted-out:
type: boolean
description:
Invert the polarity of the generated PWM.
nxp,period-scale:
$ref: /schemas/types.yaml#/definitions/uint32
description:
In some configurations, the chip blinks faster than expected. This
parameter provides a scaling ratio (fixed point, decimal divided by 1000)
to compensate, e.g. 1300=1.3x and 750=0.75x.
nxp,totem-pole:
type: boolean
description:
Use totem pole (push-pull) instead of open-drain (pca9632 defaults to
open-drain, newer chips to totem pole).
patternProperties:
"^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
required:
- reg
allOf:
- if:
properties:
compatible:
contains:
enum:
- nxp,pca9632
- nxp,pca9633
then:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
maximum: 3
else:
patternProperties:
"^led@[0-9a-f]+$":
properties:
reg:
maximum: 7
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@62 {
compatible = "nxp,pca9632";
reg = <0x62>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_STATUS;
};
led@3 {
reg = <3>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
};
};
};
...
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/nxp,pca995x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP PCA995x LED controllers
maintainers:
- Isai Gaspar <isaiezequiel.gaspar@nxp.com>
- Marek Vasut <marex@denx.de>
description:
The NXP PCA995x family are programmable LED controllers connected via I2C
that can drive separate lines. Each of them can be individually switched
on and off, and brightness can be controlled via individual PWM.
Datasheets are available at
https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf
https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf
https://www.nxp.com/docs/en/data-sheet/PCA9956B.pdf
properties:
compatible:
enum:
- nxp,pca9952
- nxp,pca9955b
- nxp,pca9956b
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-9a-f]+$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 15
required:
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@1 {
compatible = "nxp,pca9955b";
reg = <0x01>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_POWER;
};
led@2 {
reg = <0x2>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
};
};
};
...
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/onnn,ncp5623.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ON Semiconductor NCP5623 multi-LED Driver
maintainers:
- Abdel Alkuor <alkuor@gmail.com>
description:
NCP5623 Triple Output I2C Controlled LED Driver.
https://www.onsemi.com/pdf/datasheet/ncp5623-d.pdf
properties:
compatible:
enum:
- onnn,ncp5623
reg:
enum:
- 0x38
- 0x39
multi-led:
type: object
$ref: leds-class-multicolor.yaml#
unevaluatedProperties: false
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 2
required:
- reg
- color
required:
- "#address-cells"
- "#size-cells"
required:
- compatible
- reg
- multi-led
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@38 {
compatible = "onnn,ncp5623";
reg = <0x38>;
multi-led {
color = <LED_COLOR_ID_RGB>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_RED>;
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
};
led@2 {
reg = <2>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
};
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/panasonic,an30259a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Panasonic AN30259A 3-channel LED controller
maintainers:
- Iskren Chernev <me@iskren.info>
description:
The AN30259A is a LED controller capable of driving three LEDs independently.
It supports constant current output and sloping current output modes. The chip
is connected over I2C.
properties:
compatible:
const: panasonic,an30259a
reg:
maxItems: 1
interrupts:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[1-3]$":
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [ 1, 2, 3 ]
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@30 {
compatible = "panasonic,an30259a";
reg = <0x30>;
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_RED>;
};
led@2 {
reg = <2>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
};
led@3 {
reg = <3>;
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_BLUE>;
};
};
};
...
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/qcom,pm8058-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm PM8058 PMIC LED
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
The Qualcomm PM8058 contains an LED block for up to six LEDs:: three normal
LEDs, two "flash" LEDs and one "keypad backlight" LED. The names are quoted
because sometimes these LED drivers are used for wildly different things than
flash or keypad backlight:: their names are more of a suggestion than a
hard-wired usecase.
Hardware-wise the different LEDs support slightly different output currents.
The "flash" LEDs do not need to charge nor do they support external triggers.
They are just powerful LED drivers.
allOf:
- $ref: common.yaml#
properties:
compatible:
enum:
- qcom,pm8058-led
- qcom,pm8058-keypad-led
- qcom,pm8058-flash-led
reg:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
led@131 {
compatible = "qcom,pm8058-led";
reg = <0x131>;
label = "pm8058:red";
color = <LED_COLOR_ID_RED>;
default-state = "off";
};
};
@@ -0,0 +1,124 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Flash LED device inside Qualcomm Technologies, Inc. PMICs
maintainers:
- Fenglin Wu <quic_fenglinw@quicinc.com>
description: |
Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs.
The flash LED module can have different number of LED channels supported
e.g. 3 or 4. There are some different registers between them but they can
both support maximum current up to 1.5 A per channel and they can also support
ganging 2 channels together to supply maximum current up to 2 A. The current
will be split symmetrically on each channel and they will be enabled and
disabled at the same time.
properties:
compatible:
items:
- enum:
- qcom,pm6150l-flash-led
- qcom,pm660l-flash-led
- qcom,pm7550-flash-led
- qcom,pm8150c-flash-led
- 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
reg:
maxItems: 1
patternProperties:
"^led-[0-3]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
description:
Represents the physical LED components which are connected to the
flash LED channels' output.
properties:
led-sources:
description:
The HW indices of the flash LED channels that connect to the
physical LED
allOf:
- minItems: 1
maxItems: 2
items:
enum: [1, 2, 3, 4]
led-max-microamp:
anyOf:
- minimum: 5000
maximum: 500000
multipleOf: 5000
- minimum: 10000
maximum: 1000000
multipleOf: 10000
flash-max-microamp:
anyOf:
- minimum: 12500
maximum: 1500000
multipleOf: 12500
- minimum: 25000
maximum: 2000000
multipleOf: 25000
flash-max-timeout-us:
minimum: 10000
maximum: 1280000
multipleOf: 10000
required:
- led-sources
- led-max-microamp
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
led-controller@ee00 {
compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led";
reg = <0xee00>;
led-0 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1>, <4>;
led-max-microamp = <300000>;
flash-max-microamp = <2000000>;
flash-max-timeout-us = <1280000>;
function-enumerator = <0>;
};
led-1 {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_YELLOW>;
led-sources = <2>, <3>;
led-max-microamp = <300000>;
flash-max-microamp = <2000000>;
flash-max-timeout-us = <1280000>;
function-enumerator = <1>;
};
};
};
@@ -0,0 +1,95 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/register-bit-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Register Bit LEDs
maintainers:
- Linus Walleij <linusw@kernel.org>
description: |+
Register bit leds are used with syscon multifunctional devices where single
bits in a certain register can turn on/off a single LED. The register bit LEDs
appear as children to the syscon device, with the proper compatible string.
For the syscon bindings see:
Documentation/devicetree/bindings/mfd/syscon.yaml
allOf:
- $ref: /schemas/leds/common.yaml#
properties:
$nodename:
description:
The unit-address is in the form of @<reg addr>,<bit offset>
pattern: '^led@[0-9a-f]+,[0-9a-f]{1,2}$'
compatible:
const: register-bit-led
reg:
description:
The register address and size
maxItems: 1
mask:
description:
bit mask for the bit controlling this LED in the register
$ref: /schemas/types.yaml#/definitions/uint32
enum:
[ 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800,
0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x80000,
0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000,
0x8000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 ]
offset:
description:
register offset to the register controlling this LED
$ref: /schemas/types.yaml#/definitions/uint32
deprecated: true
required:
- compatible
- mask
- reg
unevaluatedProperties: false
examples:
- |
syscon@10000000 {
compatible = "arm,realview-pb1176-syscon", "syscon", "simple-mfd";
reg = <0x10000000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x10000000 0x1000>;
led@8,0 {
compatible = "register-bit-led";
reg = <0x08 0x04>;
offset = <0x08>;
mask = <0x01>;
label = "versatile:0";
linux,default-trigger = "heartbeat";
default-state = "on";
};
led@8,1 {
compatible = "register-bit-led";
reg = <0x08 0x04>;
offset = <0x08>;
mask = <0x02>;
label = "versatile:1";
default-state = "off";
};
led@8,2 {
compatible = "register-bit-led";
reg = <0x08 0x04>;
offset = <0x08>;
mask = <0x04>;
label = "versatile:2";
default-state = "off";
};
};
...
@@ -0,0 +1,55 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/regulator-led.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Regulator LEDs
maintainers:
- Linus Walleij <linusw@kernel.org>
description: |
Regulator LEDs are powered by a single regulator such that they can
be turned on or off by enabling or disabling the regulator. The available
brightness settings will be inferred from the available voltages on the
regulator, and any constraints on the voltage or current will need to be
specified on the regulator.
allOf:
- $ref: common.yaml#
properties:
$nodename:
pattern: '^led.*$'
compatible:
const: regulator-led
vled-supply:
description:
The regulator controlling the current to the LED.
function: true
color: true
linux,default-trigger: true
default-state: true
required:
- compatible
- vled-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
led-heartbeat {
compatible = "regulator-led";
vled-supply = <&regulator>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
linux,default-trigger = "heartbeat";
};
...
@@ -0,0 +1,111 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Richtek RT8515 1.5A dual channel LED driver
maintainers:
- Linus Walleij <linusw@kernel.org>
description: |
The Richtek RT8515 is a dual channel (two mode) LED driver that
supports driving a white LED in flash or torch mode. The maximum
current for each mode is defined in hardware using two resistors
RFS and RTS.
properties:
compatible:
const: richtek,rt8515
enf-gpios:
maxItems: 1
description: A connection to the 'ENF' (enable flash) pin.
ent-gpios:
maxItems: 1
description: A connection to the 'ENT' (enable torch) pin.
richtek,rfs-ohms:
minimum: 7680
maximum: 367000
description: The resistance value of the RFS resistor. This
resistors limits the maximum flash current. This must be set
for the property flash-max-microamp to work, the RFS resistor
defines the range of the dimmer setting (brightness) of the
flash LED.
richtek,rts-ohms:
minimum: 7680
maximum: 367000
description: The resistance value of the RTS resistor. This
resistors limits the maximum torch current. This must be set
for the property torch-max-microamp to work, the RTS resistor
defines the range of the dimmer setting (brightness) of the
torch LED.
led:
type: object
$ref: common.yaml#
properties:
function: true
color: true
flash-max-timeout-us: true
flash-max-microamp:
maximum: 700000
description: The maximum current for flash mode
is hardwired to the component using the RFS resistor to
ground. The maximum hardware current setting is calculated
according to the formula Imax = 5500 / RFS. The lowest
allowed resistance value is 7.86 kOhm giving an absolute
maximum current of 700mA. By setting this attribute in
the device tree, you can further restrict the maximum
current below the hardware limit. This requires the RFS
to be defined as it defines the maximum range.
led-max-microamp:
maximum: 700000
description: The maximum current for torch mode
is hardwired to the component using the RTS resistor to
ground. The maximum hardware current setting is calculated
according to the formula Imax = 5500 / RTS. The lowest
allowed resistance value is 7.86 kOhm giving an absolute
maximum current of 700mA. By setting this attribute in
the device tree, you can further restrict the maximum
current below the hardware limit. This requires the RTS
to be defined as it defines the maximum range.
additionalProperties: false
required:
- compatible
- ent-gpios
- enf-gpios
- led
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
led-controller {
compatible = "richtek,rt8515";
enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
richtek,rfs-ohms = <16000>;
richtek,rts-ohms = <100000>;
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-timeout-us = <250000>;
flash-max-microamp = <150000>;
led-max-microamp = <25000>;
};
};
...
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ROHM BD2606MVV LED controller
maintainers:
- Andreas Kemnade <andreas@kemnade.info>
description:
The BD2606 MVV is a programmable LED controller connected via I2C that can
drive 6 separate lines. Each of them can be individually switched on and off,
but the brightness setting is shared between pairs of them.
Datasheet is available at
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/led_driver/bd2606mvv_1-e.pdf
properties:
compatible:
const: rohm,bd2606mvv
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
enable-gpios:
maxItems: 1
description: GPIO pin to enable/disable the device.
patternProperties:
"^led@[0-5]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 5
required:
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@66 {
compatible = "rohm,bd2606mvv";
reg = <0x66>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_POWER;
};
led@2 {
reg = <0x2>;
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
};
};
};
...
@@ -0,0 +1,43 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/rohm,bd71828-leds.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ROHM BD71828 Power Management Integrated Circuit LED driver
maintainers:
- Matti Vaittinen <mazziesaccount@gmail.com>
description: |
This module is part of the ROHM BD71828 and BD72720 MFD device. For more
details see Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
and Documentation/devicetree/bindings/mfd/rohm,bd72720-pmic.yaml
The LED controller is represented as a sub-node of the PMIC node on the device
tree. This should be located under "leds" - node in PMIC node.
The device has two LED outputs referred as GRNLED and AMBLED in data-sheet.
properties:
compatible:
const: rohm,bd71828-leds
patternProperties:
"^led-[1-2]$":
$ref: common.yaml#
unevaluatedProperties: false
properties:
rohm,led-compatible:
description: LED identification string
$ref: /schemas/types.yaml#/definitions/string
enum:
- bd71828-ambled
- bd71828-grnled
required:
- compatible
additionalProperties: false
...
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/samsung,s2mu005-flash.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Flash and Torch LED Controller for Samsung S2M series PMICs
maintainers:
- Kaustabh Chakraborty <kauschluss@disroot.org>
description: |
The Samsung S2M series PMIC flash LED has two led channels (typically
as back and front camera flashes), with support for both torch and
flash modes.
This is a part of device tree bindings for S2M and S5M family of Power
Management IC (PMIC).
See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for
additional information and example.
properties:
compatible:
enum:
- samsung,s2mu005-flash
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-1]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
enum: [0, 1]
required:
- reg
required:
- compatible
- "#address-cells"
- "#size-cells"
additionalProperties: false
@@ -0,0 +1,100 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/silergy,sy7802.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Silergy SY7802 1800mA Boost Charge Pump LED Driver
maintainers:
- André Apitzsch <git@apitzsch.eu>
description: |
The SY7802 is a current-regulated charge pump which can regulate two current
levels for Flash and Torch modes.
The SY7802 is a high-current synchronous boost converter with 2-channel
high side current sources. Each channel is able to deliver 900mA current.
properties:
compatible:
enum:
- silergy,sy7802
reg:
maxItems: 1
enable-gpios:
maxItems: 1
description: A connection to the 'EN' pin.
flash-gpios:
maxItems: 1
description: A connection to the 'FLEN' pin.
vin-supply:
description: Regulator providing power to the 'VIN' pin.
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-1]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description: Index of the LED.
minimum: 0
maximum: 1
led-sources:
minItems: 1
maxItems: 2
items:
minimum: 0
maximum: 1
required:
- reg
- led-sources
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
flash-led-controller@53 {
compatible = "silergy,sy7802";
reg = <0x53>;
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
led@0 {
reg = <0>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <0>, <1>;
};
};
};
@@ -0,0 +1,95 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/skyworks,aat1290.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
The device is controlled through two pins:: FL_EN and EN_SET. The pins when,
asserted high, enable flash strobe and movie mode (max 1/2 of flash current)
respectively. In order to add a capability of selecting the strobe signal
source (e.g. CPU or camera sensor) there is an additional switch required,
independent of the flash chip. The switch is controlled with pin control.
properties:
compatible:
const: skyworks,aat1290
enset-gpios:
maxItems: 1
description: EN_SET pin
flen-gpios:
maxItems: 1
description: FL_EN pin
led:
$ref: common.yaml#
unevaluatedProperties: false
properties:
led-max-microamp: true
flash-max-microamp:
description: |
Maximum flash LED supply current can be calculated using following
formula:: I = 1A * 162 kOhm / Rset.
flash-max-timeout-us:
description: |
Maximum flash timeout can be calculated using following formula::
T = 8.82 * 10^9 * Ct.
required:
- flash-max-microamp
- flash-max-timeout-us
- led-max-microamp
pinctrl-names:
items:
- const: default
- const: host
- const: isp
pinctrl-0: true
pinctrl-1: true
pinctrl-2: true
required:
- compatible
- enset-gpios
- flen-gpios
- led
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
// Ct = 220 nF, Rset = 160 kOhm
led-controller {
compatible = "skyworks,aat1290";
flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>;
enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default", "host", "isp";
pinctrl-0 = <&camera_flash_host>;
pinctrl-1 = <&camera_flash_host>;
pinctrl-2 = <&camera_flash_isp>;
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-max-microamp = <520833>;
flash-max-microamp = <1012500>;
flash-max-timeout-us = <1940000>;
};
};
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/sprd,sc2731-bltc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Spreadtrum SC2731 PMIC breathing light controller
maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang7@gmail.com>
- Chunyan Zhang <zhang.lyra@gmail.com>
description: |
The SC2731 breathing light controller supports up to 3 outputs:
red LED, green LED and blue LED. Each LED can work at normal PWM mode
or breath light mode.
properties:
compatible:
oneOf:
- items:
- enum:
- sprd,sc2730-bltc
- const: sprd,sc2731-bltc
- const: sprd,sc2731-bltc
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"^led@[0-2]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 2
required:
- reg
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
additionalProperties: false
...
@@ -0,0 +1,132 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/st,led1202.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ST LED1202 LED controllers
maintainers:
- Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk>
description: |
The LED1202 is a 12-channel low quiescent current LED controller
programmable via I2C; The output current can be adjusted separately
for each channel by 8-bit analog and 12-bit digital dimming control.
Datasheet available at
https://www.st.com/en/power-management/led1202.html
properties:
compatible:
const: st,led1202
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 11
required:
- reg
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@58 {
compatible = "st,led1202";
reg = <0x58>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
function-enumerator = <1>;
};
led@1 {
reg = <0x1>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
function-enumerator = <2>;
};
led@2 {
reg = <0x2>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
function-enumerator = <3>;
};
led@3 {
reg = <0x3>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
function-enumerator = <4>;
};
led@4 {
reg = <0x4>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
function-enumerator = <5>;
};
led@5 {
reg = <0x5>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
function-enumerator = <6>;
};
led@6 {
reg = <0x6>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
function-enumerator = <7>;
};
led@7 {
reg = <0x7>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
function-enumerator = <8>;
};
led@8 {
reg = <0x8>;
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
function-enumerator = <9>;
};
};
};
...
@@ -0,0 +1,163 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,lm3560.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI LM3560 Synchronous Boost Flash Driver
maintainers:
- Svyatoslav Ryhel <clamor95@gmail.com>
description:
The LM3560 is a 2-MHz fixed frequency synchronous boost converter with two
1000-mA constant current drivers for high-current white LEDs. The dual high-
side current sources allow for grounded cathode LED operation and can be
tied together for providing flash currents at up to 2 A through a single LED.
An adaptive regulation method ensures the current for each LED remains in
regulation and maximizes efficiency.
properties:
compatible:
enum:
- ti,lm3559
- ti,lm3560
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
enable-gpios:
description: GPIO connected to the HWEN pin.
maxItems: 1
vin-supply:
description: Supply connected to the IN line.
flash-max-timeout-us:
minimum: 32000
maximum: 1024000
default: 32000
ti,peak-current-microamp:
description:
The LM3560 features 4 selectable current limits 1.6A, 2.3A, 3A, and 3.6A
(in case of LM3559 - 1.4A, 2.1A, 2.7A, and 3.2A). When the current limit
is reached, the LM3559/LM3560 stops switching for the remainder of the
switching cycle.
patternProperties:
'^led@[01]$':
type: object
$ref: /schemas/leds/common.yaml#
description: LED control bank nodes.
unevaluatedProperties: false
properties:
reg:
description: Control bank selection (0 = bank A, 1 = bank B).
maximum: 1
required:
- reg
- flash-max-microamp
- led-max-microamp
allOf:
- $ref: /schemas/leds/common.yaml#
- if:
properties:
compatible:
contains:
const: ti,lm3559
then:
properties:
ti,peak-current-microamp:
enum: [1400000, 2100000, 2700000, 3200000]
default: 1400000
patternProperties:
'^led@[01]$':
properties:
flash-max-microamp:
minimum: 56250
maximum: 900000
led-max-microamp:
minimum: 28125
maximum: 225000
- if:
properties:
compatible:
contains:
const: ti,lm3560
then:
properties:
ti,peak-current-microamp:
enum: [1600000, 2300000, 3000000, 3600000]
default: 1600000
patternProperties:
'^led@[01]$':
properties:
flash-max-microamp:
minimum: 62500
maximum: 1000000
led-max-microamp:
minimum: 31250
maximum: 250000
required:
- compatible
- reg
- '#address-cells'
- '#size-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@53 {
compatible = "ti,lm3560";
reg = <0x53>;
enable-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
vin-supply = <&vdd_3v3_sys>;
flash-max-timeout-us = <1024000>;
ti,peak-current-microamp = <1600000>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
flash-max-microamp = <562500>;
led-max-microamp = <156250>;
};
led@1 {
reg = <1>;
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_YELLOW>;
flash-max-microamp = <562500>;
led-max-microamp = <156250>;
};
};
};
@@ -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";
};
};
};
@@ -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>;
};
};
};
};
...
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,lp8860.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments - lp8860 4-Channel LED Driver
maintainers:
- Andrew Davis <afd@ti.com>
description: |
The LP8860-Q1 is an high-efficiency LED driver with boost controller.
It has 4 high-precision current sinks that can be controlled by a PWM input
signal, a SPI/I2C master, or both.
For more product information please see the link below:
https://www.ti.com/product/lp8860-q1
properties:
compatible:
const: ti,lp8860
reg:
maxItems: 1
description: I2C slave address
"#address-cells":
const: 1
"#size-cells":
const: 0
enable-gpios:
maxItems: 1
description: GPIO pin to enable (active high) / disable the device
vled-supply:
description: LED supply
patternProperties:
"^led(@[0-3])?$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
description:
Index of the LED.
maxItems: 1
function: true
color: true
label: true
linux,default-trigger: true
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@2d {
compatible = "ti,lp8860";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x2d>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
vled-supply = <&vbatt>;
led@0 {
reg = <0>;
function = LED_FUNCTION_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
linux,default-trigger = "backlight";
};
};
};
...
@@ -0,0 +1,135 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,tca6507.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TCA6507 LED and GPIO controller
maintainers:
- NeilBrown <neilb@suse.de>
description:
The TCA6507 is a programmable LED controller connected via I2C that can drive
7 separate lines either by holding them low, or by pulsing them with modulated
width.
properties:
compatible:
const: ti,tca6507
reg:
description: I2C slave address of the controller.
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
gpio-controller: true
"#gpio-cells":
const: 2
gpio-line-names: true
patternProperties:
"^led@[0-6]$":
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
reg:
minimum: 0
maximum: 6
required:
- reg
"^gpio@[0-6]$":
type: object
properties:
compatible:
const: gpio
reg:
minimum: 0
maximum: 6
additionalProperties: false
required:
- reg
- compatible
if:
patternProperties:
"^gpio@[0-6]$":
type: object
properties:
compatible:
contains:
const: gpio
then:
required:
- gpio-controller
- "#gpio-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@45 {
compatible = "ti,tca6507";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x45>;
gpio-controller;
#gpio-cells = <2>;
gpio-line-names = "wifi_reset@6";
led@0 {
label = "gta04:red:aux";
reg = <0x0>;
};
led@1 {
label = "gta04:green:aux";
reg = <0x1>;
};
led@3 {
reg = <0x3>;
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_POWER;
linux,default-trigger = "default-on";
};
led@4 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
reg = <0x4>;
};
gpio@6 {
compatible = "gpio";
reg = <0x6>;
};
};
};
...
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEDs connected to tlc59116 or tlc59108
maintainers:
- Andrew Lunn <andrew@lunn.ch>
properties:
compatible:
enum:
- ti,tlc59108
- ti,tlc59116
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^led@[0-9a-f]$":
type: object
$ref: common.yaml#
properties:
reg:
items:
minimum: 0
maximum: 15
unevaluatedProperties: false
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
allOf:
- if:
properties:
compatible:
contains:
const: ti,tlc59108
then:
patternProperties:
"^led@[0-9a-f]$":
properties:
reg:
items:
maximum: 7
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@68 {
compatible = "ti,tlc59116";
reg = <0x68>;
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0x0>;
label = "wrt1900ac:amber:wan";
};
led@2 {
reg = <0x2>;
label = "wrt1900ac:white:2g";
};
led@9 {
reg = <0x9>;
label = "wrt1900ac:green:alive";
linux,default-trigger = "heartbeat";
};
};
};
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,tps61310.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TPS6131X flash LED driver
maintainers:
- Matthias Fend <matthias.fend@emfend.at>
description: |
The TPS61310/TPS61311 is a flash LED driver with I2C interface.
Its power stage is capable of supplying a maximum total current of roughly 1500mA.
The TPS6131x provides three constant-current sinks, capable of sinking
up to 2 x 400mA (LED1 and LED3) and 800mA (LED2) in flash mode.
In torch mode, each sink (LED1, LED2, LED3) supports currents up to 175mA.
Since the three current sinks share most of the control components such as
flash timer, control logic, safety timer and the operating mode, they cannot
be used completely independently of each other. Therefore, only one LED is
supported, but the current sinks can be combined accordingly.
The data sheet can be found at:
https://www.ti.com/lit/ds/symlink/tps61310.pdf
properties:
compatible:
oneOf:
- items:
- enum:
- ti,tps61311
- const: ti,tps61310
- items:
- const: ti,tps61310
reg:
maxItems: 1
reset-gpios:
maxItems: 1
description: GPIO connected to NRESET pin
ti,valley-current-limit:
type: boolean
description:
Reduce the valley peak current limit from 1750mA to 1250mA (TPS61310) or
from 2480mA to 1800mA (TPS61311).
led:
type: object
$ref: common.yaml#
unevaluatedProperties: false
properties:
led-sources:
minItems: 1
maxItems: 3
items:
enum: [1, 2, 3]
led-max-microamp:
oneOf:
- minimum: 50000
maximum: 350000
multipleOf: 50000
- minimum: 25000
maximum: 525000
multipleOf: 25000
flash-max-microamp:
oneOf:
- minimum: 50000
maximum: 800000
multipleOf: 50000
- minimum: 25000
maximum: 1500000
multipleOf: 25000
flash-max-timeout-us:
enum: [ 5300, 10700, 16000, 21300, 26600, 32000, 37300, 68200, 71500,
102200, 136300, 170400, 204500, 340800, 579300, 852000 ]
required:
- led-sources
- led-max-microamp
- flash-max-microamp
- flash-max-timeout-us
required:
- compatible
- reg
- led
additionalProperties: false
examples:
- |
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@33 {
compatible = "ti,tps61311", "ti,tps61310";
reg = <0x33>;
reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
led {
function = LED_FUNCTION_FLASH;
color = <LED_COLOR_ID_WHITE>;
led-sources = <1>, <2>, <3>;
led-max-microamp = <525000>;
flash-max-microamp = <1500000>;
flash-max-timeout-us = <852000>;
};
};
};
@@ -0,0 +1,110 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti.lm36922.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments - LM3692x Highly Efficient White LED Driver
maintainers:
- Dan Murphy <dmurphy@ti.com>
description: |
The LM3692x is an ultra-compact, highly efficient,
white-LED driver designed for LCD display backlighting.
The main difference between the LM36922 and LM36923 is the number of
LED strings it supports. The LM36922 supports two strings while the LM36923
supports three strings.
For more product information please see the link below:
https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
properties:
compatible:
enum:
- ti,lm36922
- ti,lm36923
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
enable-gpios:
description: gpio pin to enable/disable the device.
vled-supply:
description: LED supply
ti,ovp-microvolt:
description: Overvoltage protection.
default: 29000000
enum: [17000000, 21000000, 25000000, 29000000]
patternProperties:
'^led@[0-3]$':
type: object
$ref: common.yaml
properties:
reg:
enum: [0, 1, 2, 3]
description: |
0 - Will enable all LED sync paths
1 - Will enable the LED1 sync
2 - Will enable the LED2 sync
3 - Will enable the LED3 sync (LM36923 only)
unevaluatedProperties: false
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
allOf:
- if:
properties:
compatible:
contains:
const: ti,lm36922
then:
properties:
led@3: false
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
led-controller@36 {
compatible = "ti,lm36922";
reg = <0x36>;
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
vled-supply = <&vbatt>;
ti,ovp-microvolt = <29000000>;
led@0 {
reg = <0>;
function = LED_FUNCTION_BACKLIGHT;
color = <LED_COLOR_ID_WHITE>;
linux,default-trigger = "backlight";
led-max-microamp = <20000>;
};
};
};
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/trigger-source.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Trigger source providers
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Pavel Machek <pavel@ucw.cz>
description:
Each trigger source provider should be represented by a device tree node. It
may be e.g. a USB port or an Ethernet device.
properties:
'#trigger-source-cells':
description:
Number of cells in a source trigger. Typically 0 for nodes of simple
trigger sources (e.g. a specific USB port).
enum: [ 0, 1 ]
additionalProperties: true
...