18c2ecf20Sopenharmony_ciLED connected to PWM
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible : should be "pwm-leds".
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciEach LED is represented as a sub-node of the pwm-leds device.  Each
78c2ecf20Sopenharmony_cinode's name represents the name of the corresponding LED.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciLED sub-node properties:
108c2ecf20Sopenharmony_ci- pwms : PWM property to point to the PWM device (phandle)/port (id) and to
118c2ecf20Sopenharmony_ci  specify the period time to be used: <&phandle id period_ns>;
128c2ecf20Sopenharmony_ci- pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device
138c2ecf20Sopenharmony_ci  For the pwms and pwm-names property please refer to:
148c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/pwm/pwm.txt
158c2ecf20Sopenharmony_ci- max-brightness : Maximum brightness possible for the LED
168c2ecf20Sopenharmony_ci- active-low : (optional) For PWMs where the LED is wired to supply
178c2ecf20Sopenharmony_ci  rather than ground.
188c2ecf20Sopenharmony_ci- label :  (optional)
198c2ecf20Sopenharmony_ci  see Documentation/devicetree/bindings/leds/common.txt
208c2ecf20Sopenharmony_ci- linux,default-trigger :  (optional)
218c2ecf20Sopenharmony_ci  see Documentation/devicetree/bindings/leds/common.txt
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciExample:
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_citwl_pwm: pwm {
268c2ecf20Sopenharmony_ci	/* provides two PWMs (id 0, 1 for PWM1 and PWM2) */
278c2ecf20Sopenharmony_ci	compatible = "ti,twl6030-pwm";
288c2ecf20Sopenharmony_ci	#pwm-cells = <2>;
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_citwl_pwmled: pwmled {
328c2ecf20Sopenharmony_ci	/* provides one PWM (id 0 for Charing indicator LED) */
338c2ecf20Sopenharmony_ci	compatible = "ti,twl6030-pwmled";
348c2ecf20Sopenharmony_ci	#pwm-cells = <2>;
358c2ecf20Sopenharmony_ci};
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cipwmleds {
388c2ecf20Sopenharmony_ci	compatible = "pwm-leds";
398c2ecf20Sopenharmony_ci	kpad {
408c2ecf20Sopenharmony_ci		label = "omap4::keypad";
418c2ecf20Sopenharmony_ci		pwms = <&twl_pwm 0 7812500>;
428c2ecf20Sopenharmony_ci		max-brightness = <127>;
438c2ecf20Sopenharmony_ci	};
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	charging {
468c2ecf20Sopenharmony_ci		label = "omap4:green:chrg";
478c2ecf20Sopenharmony_ci		pwms = <&twl_pwmled 0 7812500>;
488c2ecf20Sopenharmony_ci		max-brightness = <255>;
498c2ecf20Sopenharmony_ci	};
508c2ecf20Sopenharmony_ci};
51