leds-pwm.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. - label : (optional)
  14. see Documentation/devicetree/bindings/leds/common.txt
  15. - linux,default-trigger : (optional)
  16. see Documentation/devicetree/bindings/leds/common.txt
  17. Example:
  18. twl_pwm: pwm {
  19. /* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
  20. compatible = "ti,twl6030-pwm";
  21. #pwm-cells = <2>;
  22. };
  23. twl_pwmled: pwmled {
  24. /* provides one PWM (id 0 for Charing indicator LED) */
  25. compatible = "ti,twl6030-pwmled";
  26. #pwm-cells = <2>;
  27. };
  28. pwmleds {
  29. compatible = "pwm-leds";
  30. kpad {
  31. label = "omap4::keypad";
  32. pwms = <&twl_pwm 0 7812500>;
  33. max-brightness = <127>;
  34. };
  35. charging {
  36. label = "omap4:green:chrg";
  37. pwms = <&twl_pwmled 0 7812500>;
  38. max-brightness = <255>;
  39. };
  40. };