Ivan Vozvakhov | 78a18f6 | 2022-03-12 13:03:14 +0300 | [diff] [blame] | 1 | LEDs connected to PWM (Linux compatible) |
| 2 | |
| 3 | Required properties: |
| 4 | - compatible : should be "pwm-leds". |
| 5 | |
| 6 | Each LED is represented as a sub-node of the pwm-leds device. Each |
| 7 | node's name represents the name of the corresponding LED. |
| 8 | |
| 9 | LED sub-node properties: |
| 10 | - pwms : (required) LED pwm channel, see "pwms property" in |
| 11 | doc/device-tree-bindings/pwm/pwm.txt |
| 12 | - label : (optional) LED label, see "label property" in |
| 13 | doc/device-tree-bindings/led/common.txt |
| 14 | - max-brightness : (optional, unsigned, default 255) Maximum brightness possible |
| 15 | for the LED |
| 16 | - active-low : (optional, boolean, default false) For PWMs where the LED is |
| 17 | wired to supply rather than ground |
| 18 | - u-boot,default-brightness : (optional, unsigned, default 0) Initial state |
| 19 | of pwm-leds |
| 20 | |
| 21 | Example: |
| 22 | |
| 23 | leds { |
| 24 | compatible = "pwm-leds"; |
| 25 | status = "okay"; |
| 26 | |
| 27 | blue { |
| 28 | label = "led-blue"; |
| 29 | pwms = <&pwm1 0 100000 0>; |
| 30 | max-brightness = <255>; |
| 31 | u-boot,default-brightness = <127>; |
| 32 | }; |
| 33 | |
| 34 | green { |
| 35 | label = "led-green"; |
| 36 | pwms = <&pwm2 0 100000 0>; |
| 37 | max-brightness = <255>; |
| 38 | u-boot,default-brightness = <127>; |
| 39 | }; |
| 40 | |
| 41 | red { |
| 42 | label = "led-red"; |
| 43 | pwms = <&pwm3 0 100000 0>; |
| 44 | max-brightness = <255>; |
| 45 | u-boot,default-brightness = <127>; |
| 46 | }; |
| 47 | } |