code:
Analog devices AS3645A device tree bindings

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.

Ranges below noted as [a, b] are closed ranges between a and b, i.e. a
and b are included in the range.

Please also see common.txt in the same directory.

Required properties
===================

compatible	: Must be "ams,as3645a".
reg		: The I2C address of the device. Typically 0x30.
#address-cells	: 1
#size-cells	: 0

Required properties of the flash child node (0)
===============================================

reg: 0
flash-timeout-us: Flash timeout in microseconds. The value must be in
		  the range [100000, 850000] and divisible by 50000.
flash-max-microamp: Maximum flash current in microamperes. Has to be
		    in the range between [200000, 500000] and
		    divisible by 20000.
led-max-microamp: Maximum torch (assist) current in microamperes. The
		  value must be in the range between [20000, 160000] and
		  divisible by 20000.
ams,input-max-microamp: Maximum flash controller input current. The
			value must be in the range [1250000, 2000000]
			and divisible by 50000.

Optional properties of the flash child node
===========================================

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).

Required properties of the indicator child node (1)
===================================================

reg: 1
led-max-microamp: Maximum indicator current. The allowed values are
		  2500, 5000, 7500 and 10000.

Optional properties of the indicator child node
===============================================

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>

	as3645a@30 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x30>;
		compatible = "ams,as3645a";
		led@0 {
			reg = <0x0>;
			flash-timeout-us = <150000>;
			flash-max-microamp = <320000>;
			led-max-microamp = <60000>;
			ams,input-max-microamp = <1750000>;
			function = LED_FUNCTION_FLASH;
		};
		led@1 {
			reg = <0x1>;
			led-max-microamp = <10000>;
			function = LED_FUNCTION_INDICATOR;
		};
	};


code:
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 {
		};

repo_name: angery/linux


code:
Binding for ArcticSand arc2c0608 LED driver

Required properties:
- compatible:		should be "arc,arc2c0608"
- reg:			slave address

Optional properties:
- default-brightness:	brightness value on boot, value from: 0-4095
- label:		The name of the backlight device
			See Documentation/devicetree/bindings/leds/common.txt
- led-sources:		List of enabled channels from 0 to 5.
			See Documentation/devicetree/bindings/leds/common.txt

- arc,led-config-0:	setting for register ILED_CONFIG_0
- arc,led-config-1:	setting for register ILED_CONFIG_1
- arc,dim-freq:		PWM mode frequence setting (bits [3:0] used)
- arc,comp-config:	setting for register CONFIG_COMP
- arc,filter-config:	setting for register FILTER_CONFIG
- arc,trim-config:	setting for register IMAXTUNE

Note: Optional properties not specified will default to values in IC EPROM

Example:

arc2c0608@30 {
	compatible = "arc,arc2c0608";
	reg = <0x30>;
	default-brightness = <500>;
	label = "lcd-backlight";
	linux,default-trigger = "backlight";
	led-sources = <0 1 2 5>;
};


code:
# 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

additionalProperties: true


code:
# 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 bindings

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;
    };

...


code:
# 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 <linus.walleij@linaro.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>;
    };


code:
# 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 bindings

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.

properties:
  compatible:
    const: led-backlight

  leds:
    description: A list of LED nodes
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      maxItems: 1

  brightness-levels:
    description:
      Array of distinct brightness levels. The levels must be in the range
      accepted by the underlying LED devices. This is used to translate a
      backlight brightness level into a LED brightness level. If it is not
      provided, the identity 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

required:
  - compatible
  - leds

additionalProperties: false

examples:
  - |
    backlight {
        compatible = "led-backlight";

        leds = <&led1>, <&led2>;
        brightness-levels = <0 4 8 16 32 64 128 255>;
        default-brightness-level = <6>;
    };

...


code:
# 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;
                };
        };
    };


code:
lp855x bindings

Required properties:
  - compatible: "ti,lp8550", "ti,lp8551", "ti,lp8552", "ti,lp8553",
                "ti,lp8555", "ti,lp8556", "ti,lp8557"
  - reg: I2C slave address (u8)
  - dev-ctrl: Value of DEVICE CONTROL register (u8). It depends on the device.

Optional properties:
  - bl-name: Backlight device name (string)
  - init-brt: Initial value of backlight brightness (u8)
  - pwm-period: PWM period value. Set only PWM input mode used (u32)
  - rom-addr: Register address of ROM area to be updated (u8)
  - rom-val: Register value to be updated (u8)
  - power-supply: Regulator which controls the 3V rail
  - enable-supply: Regulator which controls the EN/VDDIO input

Example:

	/* LP8555 */
	backlight@2c {
		compatible = "ti,lp8555";
		reg = <0x2c>;

		dev-ctrl = /bits/ 8 <0x00>;
		pwm-period = <10000>;

		/* 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>;
		};
	};

	/* LP8556 */
	backlight@2c {
		compatible = "ti,lp8556";
		reg = <0x2c>;

		bl-name = "lcd-bl";
		dev-ctrl = /bits/ 8 <0x85>;
		init-brt = /bits/ 8 <0x10>;
	};

	/* LP8557 */
	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>;
		};
	};


code:
88pm860x-backlight bindings

Optional properties:
  - maxim,max8925-dual-string: whether support dual string

Example:

	backlights {
		maxim,max8925-dual-string = <0>;
	};


code:
# 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 triggerred.
    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


code:
# 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 bindings

maintainers:
  - Lee Jones <lee@kernel.org>
  - Daniel Thompson <daniel.thompson@linaro.org>
  - Jingoo Han <jingoohan1@gmail.com>

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.

  brightness-levels:
    description:
      Array of distinct brightness levels. Typically these are in the range
      from 0 to 255, but any range starting at 0 will do. The actual brightness
      level (PWM duty cycle) will be interpolated from these values. 0 means a
      0% duty cycle (darkest/off), while the last value in the array represents
      a 100% duty cycle (brightest).
    $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

  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
  - power-supply

additionalProperties: 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>;
    };

...


code:
# 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: Binding for Qualcomm Technologies, Inc. WLED driver

maintainers:
  - Bjorn Andersson <bjorn.andersson@linaro.org>
  - Kiran Gunda <kgunda@codeaurora.org>

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,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
    enum: [ 18100, 19600, 29600, 31100 ]
    default: 29600

  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

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>;
     };


code:
# 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


code:
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>;
	};


code:
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>;
		};
	};


code:
Zodiac Inflight Innovations RAVE Supervisory Processor Backlight Bindings

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.txt)

Required properties:

- compatible: Should be "zii,rave-sp-backlight"

Example:

	rave-sp {
		compatible = "zii,rave-sp-rdu1";
		current-speed = <38400>;

		backlight {
			compatible = "zii,rave-sp-backlight";
		};
	}


code: This file has moved to ./common.yaml.


code:
# 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: 9

  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 the to 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 (but for leds-gpio see "default-state" property in
            # Documentation/devicetree/bindings/leds/leds-gpio.yaml)
          - default-on
            # LED "double" flashes at a load average based rate
          - heartbeat
            # LED indicates disk activity
          - disk-activity
            # LED indicates IDE disk activity (deprecated), in new implementations
            # use "disk-activity"
          - ide-disk
            # 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 is triggered by SD/MMC activity
      - pattern: "^mmc[0-9]+$"
      - pattern: "^cpu[0-9]*$"

  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).

  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).
      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

  # 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.

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>;
            };
        };
    };

...


code:
# 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

  "#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/leds/common.h>

    i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@2b {
            compatible = "cznic,turris-omnia-leds";
            reg = <0x2b>;
            #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>;
            };
        };
    };

...


code:
# 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>;
    };


code:
# 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: [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>;
        };
    };


code:
# 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:
    const: pwm-ir-tx

  pwms:
    maxItems: 1

required:
  - compatible
  - pwms

additionalProperties: false

examples:
  - |
    irled {
        compatible = "pwm-ir-tx";
        pwms = <&pwm0 0 10000000>;
    };


code:
# 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 bindings 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:
    $ref: /schemas/types.yaml#/definitions/uint32
    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>

    i2c0 {
        #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";
            };
        };
    };
...


code:
# 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>;
      };
    };

...


code:
* Panasonic AN30259A 3-channel LED driver

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.

Required properties:
	- compatible: Must be "panasonic,an30259a".
	- reg: I2C slave address.
	- #address-cells: Must be 1.
	- #size-cells: Must be 0.

Each LED is represented as a sub-node of the panasonic,an30259a node.

Required sub-node properties:
	- reg: Pin that the LED is connected to. Must be 1, 2, or 3.

Optional 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 :
		see Documentation/devicetree/bindings/leds/common.txt

Example:

#include <dt-bindings/leds/common.h>

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>;
	};
};


code:
# 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

  vcc-supply:
    description: Regulator providing power to the "VCC" pin.

  "#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/leds/common.h>

    i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@45 {
            compatible = "awinic,aw2013";
            reg = <0x45>;
            #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>;
            };
        };
    };
...


code:
# 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

patternProperties:
  "^led@[a-f0-9]+$":
    type: object

    $ref: common.yaml#

    properties:
      reg:
        maxItems: 1
        description: LED pin number

      active-low:
        type: boolean
        description: Makes LED active low

    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>;

        #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;
        };
    };


code:
# 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).

      active-low:
        type: boolean
        description: Makes LED active low.

      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";
        };
    };


code:
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
  - active-low : Boolean, makes LED active low.
    Default : false
  - 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";
		};
	};


code:
# 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])?$"

  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/linux/leds/common.h.
    enum: [ 8, 9 ]

required:
  - color

allOf:
  - $ref: "common.yaml#"

additionalProperties: true

...


code:
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>;
	};
};


code:
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>;
	};
	...
};


code:
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>;
	};
};


code:
# 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";
        };
    };

...


code:
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
	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


code:
# 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>;
        };
      };
    };


code:
* 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


code:
* 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


code:
* 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


code:
* Texas Instruments - LM3692x Highly Efficient White LED Driver

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.

Required properties:
	- compatible:
		"ti,lm36922"
		"ti,lm36923"
	- reg :  I2C slave address
	- #address-cells : 1
	- #size-cells : 0

Optional properties:
	- enable-gpios : gpio pin to enable/disable the device.
	- vled-supply : LED supply
	- ti,ovp-microvolt: Overvoltage protection in
	    micro-volt, can be 17000000, 21000000, 25000000 or
	    29000000. If ti,ovp-microvolt is not specified it
	    defaults to 29000000.

Required child properties:
	- reg : 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)

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)
	- linux,default-trigger :
	   see Documentation/devicetree/bindings/leds/common.txt
	- led-max-microamp :
	   see Documentation/devicetree/bindings/leds/common.txt

Example:

#include <dt-bindings/leds/common.h>

led-controller@36 {
	compatible = "ti,lm3692x";
	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>;
	};
}

For more product information please see the link below:
https://www.ti.com/lit/ds/snvsa29/snvsa29.pdf


code:
* Texas Instruments - LM3697 Highly Efficient White LED Driver

The LM3697 11-bit LED driver provides high-
performance backlight dimming for 1, 2, or 3 series
LED strings while delivering up to 90% efficiency.

This device is suitable for display and keypad lighting

Required properties:
	- compatible:
		"ti,lm3697"
	- reg :  I2C slave address
	- #address-cells : 1
	- #size-cells : 0

Optional properties:
	- enable-gpios : GPIO pin to enable/disable the device
	- vled-supply : LED supply

Required child properties:
	- reg : 0 - LED is Controlled by bank A
		1 - LED is Controlled by bank B
	- led-sources : Indicates which HVLED string is associated to which
			control bank.  This is a zero based property so
			HVLED1 = 0, HVLED2 = 1, HVLED3 = 2.
			Additional information is contained
			in Documentation/devicetree/bindings/leds/common.txt

Optional child properties:
	- ti,brightness-resolution - see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- ramp-up-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- ramp-down-us: see Documentation/devicetree/bindings/mfd/ti-lmu.txt
	- label : see Documentation/devicetree/bindings/leds/common.txt
	- linux,default-trigger :
	   see Documentation/devicetree/bindings/leds/common.txt

Example:

HVLED string 1 and 3 are controlled by control bank A and HVLED 2 string is
controlled by control bank B.

led-controller@36 {
	compatible = "ti,lm3697";
	#address-cells = <1>;
	#size-cells = <0>;
	reg = <0x36>;

	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
	vled-supply = <&vbatt>;

	led@0 {
		reg = <0>;
		led-sources = <0 2>;
		ti,brightness-resolution = <2047>;
		ramp-up-us = <5000>;
		ramp-down-us = <1000>;
		label = "white:first_backlight_cluster";
		linux,default-trigger = "backlight";
	};

	led@1 {
		reg = <1>;
		led-sources = <1>;
		ti,brightness-resolution = <255>;
		ramp-up-us = <500>;
		ramp-down-us = <1000>;
		label = "white:second_backlight_cluster";
		linux,default-trigger = "backlight";
	};
}

For more product information please see the link below:
https://www.ti.com/lit/ds/symlink/lm3697.pdf


code:
# 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:
            maxItems: 1

        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@3 {
                    reg = <0x3>;
                    color = <LED_COLOR_ID_RED>;
                };

                led@4 {
                    reg = <0x4>;
                    color = <LED_COLOR_ID_GREEN>;
                };

                led@5 {
                    reg = <0x5>;
                    color = <LED_COLOR_ID_BLUE>;
                };
            };
        };
    };

...