xref: /freebsd/sys/contrib/device-tree/Bindings/leds/backlight/led-backlight.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/leds/backlight/led-backlight.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: led-backlight bindings
8
9maintainers:
10  - Lee Jones <lee.jones@linaro.org>
11  - Daniel Thompson <daniel.thompson@linaro.org>
12  - Jingoo Han <jingoohan1@gmail.com>
13
14description:
15  This binding is used to describe a basic backlight device made of LEDs. It
16  can also be used to describe a backlight device controlled by the output of
17  a LED driver.
18
19properties:
20  compatible:
21    const: led-backlight
22
23  leds:
24    description: A list of LED nodes
25    $ref: /schemas/types.yaml#/definitions/phandle-array
26
27  brightness-levels:
28    description:
29      Array of distinct brightness levels. The levels must be in the range
30      accepted by the underlying LED devices. This is used to translate a
31      backlight brightness level into a LED brightness level. If it is not
32      provided, the identity mapping is used.
33    $ref: /schemas/types.yaml#/definitions/uint32-array
34
35  default-brightness-level:
36    description:
37      The default brightness level (index into the array defined by the
38      "brightness-levels" property).
39    $ref: /schemas/types.yaml#/definitions/uint32
40
41required:
42  - compatible
43  - leds
44
45additionalProperties: false
46
47examples:
48  - |
49    backlight {
50        compatible = "led-backlight";
51
52        leds = <&led1>, <&led2>;
53        brightness-levels = <0 4 8 16 32 64 128 255>;
54        default-brightness-level = <6>;
55    };
56
57...
58