leds-pwm.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. LED connected to PWM
  2. Required properties:
  3. - compatible : should be "pwm-leds".
  4. Each LED is represented as a sub-node of the pwm-leds device. Each
  5. node's name represents the name of the corresponding LED.
  6. LED sub-node properties:
  7. - pwms : PWM property to point to the PWM device (phandle)/port (id) and to
  8. specify the period time to be used: <&phandle id period_ns>;
  9. - pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device
  10. For the pwms and pwm-names property please refer to:
  11. Documentation/devicetree/bindings/pwm/pwm.txt
  12. - max-brightness : Maximum brightness possible for the LED
  13. - active-low : (optional) For PWMs where the LED is wired to supply
  14. rather than ground.
  15. - label : (optional)
  16. see Documentation/devicetree/bindings/leds/common.txt
  17. - linux,default-trigger : (optional)
  18. see Documentation/devicetree/bindings/leds/common.txt
  19. Example:
  20. twl_pwm: pwm {
  21. /* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
  22. compatible = "ti,twl6030-pwm";
  23. #pwm-cells = <2>;
  24. };
  25. twl_pwmled: pwmled {
  26. /* provides one PWM (id 0 for Charing indicator LED) */
  27. compatible = "ti,twl6030-pwmled";
  28. #pwm-cells = <2>;
  29. };
  30. pwmleds {
  31. compatible = "pwm-leds";
  32. kpad {
  33. label = "omap4::keypad";
  34. pwms = <&twl_pwm 0 7812500>;
  35. max-brightness = <127>;
  36. };
  37. charging {
  38. label = "omap4:green:chrg";
  39. pwms = <&twl_pwmled 0 7812500>;
  40. max-brightness = <255>;
  41. };
  42. };