summaryrefslogtreecommitdiff
path: root/doc/device-tree-bindings/leds/leds-pwm.txt
blob: 186e8a848f78c6fbda24c14bb3f24ce97847bd97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
LEDs connected to PWM (Linux compatible)

Required properties:
- compatible : should be "pwm-leds".

Each LED is represented as a sub-node of the pwm-leds device.  Each
node's name represents the name of the corresponding LED.

LED sub-node properties:
- pwms :  (required) LED pwm channel, see "pwms property" in
  doc/device-tree-bindings/pwm/pwm.txt
- label :  (optional) LED label, see "label property" in
  doc/device-tree-bindings/led/common.txt
- max-brightness :  (optional, unsigned, default 255) Maximum brightness possible
  for the LED
- active-low :  (optional, boolean, default false) For PWMs where the LED is
  wired to supply rather than ground
- u-boot,default-brightness :  (optional, unsigned, default 0) Initial state
  of pwm-leds

Example:

leds {
    compatible = "pwm-leds";
    status = "okay";

    blue {
        label = "led-blue";
        pwms = <&pwm1 0 100000 0>;
        max-brightness = <255>;
        u-boot,default-brightness = <127>;
    };

    green {
        label = "led-green";
        pwms = <&pwm2 0 100000 0>;
        max-brightness = <255>;
        u-boot,default-brightness = <127>;
    };

    red {
        label = "led-red";
        pwms = <&pwm3 0 100000 0>;
        max-brightness = <255>;
        u-boot,default-brightness = <127>;
    };
}