1*c66ec88fSEmmanuel VadotQualcomm PM8058 LED driver
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe Qualcomm PM8058 is a multi-functional device which contains
4*c66ec88fSEmmanuel Vadotan LED driver block for up to six LEDs: three normal LEDs, two
5*c66ec88fSEmmanuel Vadot"flash" LEDs and one "keypad backlight" LED. The names are
6*c66ec88fSEmmanuel Vadotquoted because sometimes these LED drivers are used for wildly
7*c66ec88fSEmmanuel Vadotdifferent things than flash or keypad backlight: their names
8*c66ec88fSEmmanuel Vadotare more of a suggestion than a hard-wired usecase.
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel VadotHardware-wise the different LEDs support slightly different
11*c66ec88fSEmmanuel Vadotoutput currents. The "flash" LEDs do not need to charge nor
12*c66ec88fSEmmanuel Vadotdo they support external triggers. They are just powerful LED
13*c66ec88fSEmmanuel Vadotdrivers.
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel VadotThe LEDs appear as children to the PM8058 device, with the
16*c66ec88fSEmmanuel Vadotproper compatible string. For the PM8058 bindings see:
17*c66ec88fSEmmanuel Vadotmfd/qcom-pm8xxx.txt.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel VadotEach LED is represented as a sub-node of the syscon device. Each
20*c66ec88fSEmmanuel Vadotnode's name represents the name of the corresponding LED.
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel VadotLED sub-node properties:
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotRequired properties:
25*c66ec88fSEmmanuel Vadot- compatible: one of
26*c66ec88fSEmmanuel Vadot  "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
27*c66ec88fSEmmanuel Vadot  "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
28*c66ec88fSEmmanuel Vadot  "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel VadotOptional properties:
31*c66ec88fSEmmanuel Vadot- label: see Documentation/devicetree/bindings/leds/common.txt
32*c66ec88fSEmmanuel Vadot- default-state: see Documentation/devicetree/bindings/leds/common.txt
33*c66ec88fSEmmanuel Vadot- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotExample:
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadotqcom,ssbi@500000 {
38*c66ec88fSEmmanuel Vadot	pmicintc: pmic@0 {
39*c66ec88fSEmmanuel Vadot		compatible = "qcom,pm8058";
40*c66ec88fSEmmanuel Vadot		led@48 {
41*c66ec88fSEmmanuel Vadot			compatible = "qcom,pm8058-keypad-led";
42*c66ec88fSEmmanuel Vadot			reg = <0x48>;
43*c66ec88fSEmmanuel Vadot			label = "pm8050:white:keypad";
44*c66ec88fSEmmanuel Vadot			default-state = "off";
45*c66ec88fSEmmanuel Vadot		};
46*c66ec88fSEmmanuel Vadot		led@131 {
47*c66ec88fSEmmanuel Vadot			compatible = "qcom,pm8058-led";
48*c66ec88fSEmmanuel Vadot			reg = <0x131>;
49*c66ec88fSEmmanuel Vadot			label = "pm8058:red";
50*c66ec88fSEmmanuel Vadot			default-state = "off";
51*c66ec88fSEmmanuel Vadot		};
52*c66ec88fSEmmanuel Vadot		led@132 {
53*c66ec88fSEmmanuel Vadot			compatible = "qcom,pm8058-led";
54*c66ec88fSEmmanuel Vadot			reg = <0x132>;
55*c66ec88fSEmmanuel Vadot			label = "pm8058:yellow";
56*c66ec88fSEmmanuel Vadot			default-state = "off";
57*c66ec88fSEmmanuel Vadot			linux,default-trigger = "mmc0";
58*c66ec88fSEmmanuel Vadot		};
59*c66ec88fSEmmanuel Vadot		led@133 {
60*c66ec88fSEmmanuel Vadot			compatible = "qcom,pm8058-led";
61*c66ec88fSEmmanuel Vadot			reg = <0x133>;
62*c66ec88fSEmmanuel Vadot			label = "pm8058:green";
63*c66ec88fSEmmanuel Vadot			default-state = "on";
64*c66ec88fSEmmanuel Vadot			linux,default-trigger = "heartbeat";
65*c66ec88fSEmmanuel Vadot		};
66*c66ec88fSEmmanuel Vadot	};
67*c66ec88fSEmmanuel Vadot};
68