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