xref: /freebsd/sys/contrib/device-tree/Bindings/leds/regulator-led.yaml (revision d5b0e70f7e04d971691517ce1304d86a1e367e2e)
1*d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*d5b0e70fSEmmanuel Vadot%YAML 1.2
3*d5b0e70fSEmmanuel Vadot---
4*d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/leds/regulator-led.yaml#
5*d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*d5b0e70fSEmmanuel Vadot
7*d5b0e70fSEmmanuel Vadottitle: Device Tree Bindings for Regulator LEDs
8*d5b0e70fSEmmanuel Vadot
9*d5b0e70fSEmmanuel Vadotmaintainers:
10*d5b0e70fSEmmanuel Vadot  - Linus Walleij <linus.walleij@linaro.org>
11*d5b0e70fSEmmanuel Vadot
12*d5b0e70fSEmmanuel Vadotdescription: |
13*d5b0e70fSEmmanuel Vadot  Regulator LEDs are powered by a single regulator such that they can
14*d5b0e70fSEmmanuel Vadot  be turned on or off by enabling or disabling the regulator. The available
15*d5b0e70fSEmmanuel Vadot  brightness settings will be inferred from the available voltages on the
16*d5b0e70fSEmmanuel Vadot  regulator, and any constraints on the voltage or current will need to be
17*d5b0e70fSEmmanuel Vadot  specified on the regulator.
18*d5b0e70fSEmmanuel Vadot
19*d5b0e70fSEmmanuel VadotallOf:
20*d5b0e70fSEmmanuel Vadot  - $ref: common.yaml#
21*d5b0e70fSEmmanuel Vadot
22*d5b0e70fSEmmanuel Vadotproperties:
23*d5b0e70fSEmmanuel Vadot  $nodename:
24*d5b0e70fSEmmanuel Vadot    pattern: '^led.*$'
25*d5b0e70fSEmmanuel Vadot
26*d5b0e70fSEmmanuel Vadot  compatible:
27*d5b0e70fSEmmanuel Vadot    const: regulator-led
28*d5b0e70fSEmmanuel Vadot
29*d5b0e70fSEmmanuel Vadot  vled-supply:
30*d5b0e70fSEmmanuel Vadot    description:
31*d5b0e70fSEmmanuel Vadot      The regulator controlling the current to the LED.
32*d5b0e70fSEmmanuel Vadot
33*d5b0e70fSEmmanuel Vadot  function: true
34*d5b0e70fSEmmanuel Vadot  color: true
35*d5b0e70fSEmmanuel Vadot  linux,default-trigger: true
36*d5b0e70fSEmmanuel Vadot  default-state: true
37*d5b0e70fSEmmanuel Vadot
38*d5b0e70fSEmmanuel Vadotrequired:
39*d5b0e70fSEmmanuel Vadot  - compatible
40*d5b0e70fSEmmanuel Vadot  - vled-supply
41*d5b0e70fSEmmanuel Vadot
42*d5b0e70fSEmmanuel VadotadditionalProperties: false
43*d5b0e70fSEmmanuel Vadot
44*d5b0e70fSEmmanuel Vadotexamples:
45*d5b0e70fSEmmanuel Vadot  - |
46*d5b0e70fSEmmanuel Vadot    #include <dt-bindings/leds/common.h>
47*d5b0e70fSEmmanuel Vadot
48*d5b0e70fSEmmanuel Vadot    led-heartbeat {
49*d5b0e70fSEmmanuel Vadot        compatible = "regulator-led";
50*d5b0e70fSEmmanuel Vadot        vled-supply = <&regulator>;
51*d5b0e70fSEmmanuel Vadot        function = LED_FUNCTION_STATUS;
52*d5b0e70fSEmmanuel Vadot        color = <LED_COLOR_ID_BLUE>;
53*d5b0e70fSEmmanuel Vadot        linux,default-trigger = "heartbeat";
54*d5b0e70fSEmmanuel Vadot    };
55*d5b0e70fSEmmanuel Vadot...
56