blob: 42e97f765bee494d6cc91a5cd491ef1922f8c731 [file] [log] [blame]
David Collins8885f792017-01-26 14:36:34 -08001Qualcomm Technologies QPNP WLED
2
3QPNP (Qualcomm Technologies Plug N Play) WLED (White Light
4Emitting Diode) driver is used for controlling display
5backlight that is part of PMIC on Qualcomm Technologies
6reference platforms. The PMIC is connected to the host
7processor via SPMI bus.
8
9Required properties:
10- compatible : should be "qcom,qpnp-wled"
11- reg : base address and size for wled modules
12- reg-names : names associated with base addresses. It
13 should be "qpnp-wled-ctrl-base", "qpnp-wled-sink-base",
14 "qpnp-wled-ibb-base", "qpnp-wled-lab-base".
15- qcom,pmic-revid : phandle of PMIC revid module. This is used to
16 identify the PMIC subtype.
17
18Optional properties for WLED:
19 - interrupts : Specifies the interrupts associated with WLED. The available
20 interrupts are over voltage protection(ovp) and short circuit(sc).
21 The values for ovp and sc are <0x3 0xd8 0x1> and <0x3 0xd8 0x2>.
22 - interrupt-names : Specify the interrupt names associated with interrupts. Must be
23 one of "ovp-irq" or "sc-irq"
24- linux,name : name of the wled. default is "wled".
25- linux,default-trigger : trigger for the backlight. default is NONE.
26- qcom,fdbk-output : string feedback current output for wled module. The accepted values
27 are "wled1", "wled2", "wled3", "wled4" and "auto". default is "auto".
28- qcom,vref-uv : maximum reference voltage in uV.
29 For pmi8994/8952/8996, supported values are from 300000 to 675000
30 with a step size of 25000, the default value is 350000.
31 For pmi8998/pm660l, supported values are from 60000 to 397500
32 with a step size of 22500, the default value is 127500.
33- qcom,switch-freq-khz : switch frequency in khz. default is 800.
34- qcom,ovp-mv : Over voltage protection threshold in mV. Default is
35 29500. Supported values are:
36 - 31000, 29500, 19400, 17800 for pmi8994/8952/8996.
37 - 31100, 29600, 19600, 18100 for pmi8998/pm660l.
38 Should only be used if qcom,disp-type-amoled is not
39 specified.
40- qcom,ilim-ma : Current limit threshold in mA.
41 For pmi8994/8952/8996, default value for LCD is 980mA
42 and AMOLED is 385mA.
43 Supported values are:
44 - 105, 385, 660, 980, 1150, 1420, 1700, 1980.
45 For pmi8998/pm660l, default value for LCD is
46 970mA and AMOLED is 620mA.
47 Supported values are:
48 - 105, 280, 450, 620, 970, 1150, 1300, 1500.
49- qcom,boost-duty-ns : maximum boost duty cycle in ns. default is 104.
50- qcom,mod-freq-khz : modulation frequency in khz. default is 9600.
51- qcom,dim-mode : dimming mode. supporting dimming modes are "analog",
52 "digital", and "hybrid". default is "hybrid".
53- qcom,hyb-thres : threshold value when used in hybrid mode. It represents the
54 percentage of brightntess at which dimming mode is switched
55 from "digital" to "analog". the default value is 6.25%. as the
56 floating point cannot be represented directly, the value is
57 multiplied by 100. so the default is 625.
58- qcom,sync-dly-us : delay for current sync in us. default is 400.
59- qcom,fs-curr-ua : maximum full scale current in ua. default is 25000.
60- qcom,en-9b-dim-res : boolean, specify if 9-bit dim resultion is needed. otherwise 12-bit is used.
61- qcom,en-phase-stag : boolean, specify if phase staggering is needed.
62- qcom,en-cabc : boolean, specify if cabc (content adaptive backlight control) is needed.
63- qcom,disp-type-amoled : specify if the display is amoled
64- qcom,led-strings-list : Wled module has four strings of leds numbered from 0 to 3. each string of leds
65 are operated individually. specify the list of strings used by the device.
66 any combination of led strings can be used. default value is [00 01 02 03]
67- qcom,en-ext-pfet-sc-pro : Specify if external pfet short circuit protection is needed
68- qcom,cons-sync-write-delay-us : Specify in 'us' the duration of delay between two consecutive writes to
69 SYNC register.
70- qcom,sc-deb-cycles : debounce time for short circuit detection
71- qcom,loop-ea-gm : control the gm for gm stage in control loop. default is 3.
72- qcom,loop-auto-gm-en : A boolean property to specify if auto gm is enabled.
73- qcom,loop-auto-gm-thresh : Specify auto gm threshold if "loop-auto-gm-en" is defined.
74 Supported values are: 0 - 3.
75- qcom,lcd-auto-pfm-thresh : Specify the auto-pfm threshold, if the headroom voltage level
76 falls below this threshold and auto PFM is enabled, boost
77 controller will enter into PFM mode automatically.
Subbaraman Narayanamurthy55698842017-02-17 15:48:47 -080078- qcom,lcd-psm-ctrl : A boolean property to specify if PSM needs to be
79 controlled dynamically when WLED module is enabled
80 or disabled.
Anirudh Ghayal101e4ef2017-05-26 16:51:53 +053081- qcom,auto-calibration-enable : A boolean property which enables auto-calibration
82 of the WLED sink configuration.
David Collins8885f792017-01-26 14:36:34 -080083
84Optional properties if 'qcom,disp-type-amoled' is mentioned in DT:
85- qcom,loop-comp-res-kohm : control to select the compensation resistor in kohm. default is 320.
86- qcom,vref-psm-mv : reference psm voltage in mv. default for amoled is 450.
87- qcom,avdd-mode-spmi: Boolean property to enable AMOLED_VOUT programming via SPMI. If not specified,
88 AMOLED_VOUT is programmed via S-wire. This can be specified only for newer
89 PMICs like pmi8998/pm660l.
90- qcom,avdd-target-voltage-mv: The voltage required for AMOLED_VOUT. Accepted values are in the range
91 of 5650 to 7900 in steps of 150. Default value is 7600. Unit is in mV.
92 For old revisions, accepted values are: 7900, 7600, 7300, 6400, 6100,
93 5800.
94
95Example:
96 qcom,leds@d800 {
97 compatible = "qcom,qpnp-wled";
98 reg = <0xd800 0x100>,
99 <0xd900 0x100>,
100 <0xdc00 0x100>,
101 <0xde00 0x100>;
102 reg-names = "qpnp-wled-ctrl-base",
103 "qpnp-wled-sink-base",
104 "qpnp-wled-ibb-base",
105 "qpnp-wled-lab-base";
106 interrupts = <0x3 0xd8 0x2>;
107 interrupt-names = "sc-irq";
108 status = "okay";
109 linux,name = "wled";
110 linux,default-trigger = "bkl-trigger";
111 qcom,fdbk-output = "auto";
112 qcom,vref-uv = <350000>;
113 qcom,switch-freq-khz = <800>;
114 qcom,ovp-mv = <29500>;
115 qcom,ilim-ma = <980>;
116 qcom,boost-duty-ns = <26>;
117 qcom,mod-freq-khz = <9600>;
118 qcom,dim-mode = "hybrid";
119 qcom,dim-method = "linear";
120 qcom,hyb-thres = <625>;
121 qcom,sync-dly-us = <800>;
122 qcom,fs-curr-ua = <16000>;
123 qcom,en-phase-stag;
124 qcom,led-strings-list = [00 01 02 03];
125 qcom,en-ext-pfet-sc-pro;
126 };