blob: 8795affdaf26cae69ba70620fdb4de38f1150a55 [file] [log] [blame]
Nicholas Troast96886052016-02-25 15:42:17 -08001Qualcomm Technologies, Inc. SMB2 Charger Specific Bindings
2
3SMB2 Charger is an efficient programmable battery charger capable of charging a
4high-capacity lithium-ion battery over micro-USB or USB Type-C ultrafast with
5Quick Charge 2.0, Quick Charge 3.0, and USB Power Delivery support. Wireless
6charging features full A4WP Rezence 1.2, WPC 1.2, and PMA support.
7
8=======================
9Required Node Structure
10=======================
11
12SMB2 Charger must be described in two levels of devices nodes.
13
14===============================
15First Level Node - SMB2 Charger
16===============================
17
18Charger specific properties:
19- compatible
20 Usage: required
21 Value type: <string>
22 Definition: "qcom,qpnp-smb2".
23
Harry Yangf7251982016-09-16 11:14:49 -070024- qcom,pmic-revid
25 Usage: required
26 Value type: phandle
27 Definition: Should specify the phandle of PMI's revid module. This is used to
28 identify the PMI subtype.
29
Nicholas Troast2ebe6c52016-09-20 13:25:59 -070030- qcom,batteryless-platform
Nicholas Troast96886052016-02-25 15:42:17 -080031 Usage: optional
32 Value type: <empty>
Nicholas Troast2ebe6c52016-09-20 13:25:59 -070033 Definition: Boolean flag which indicates that the platform does not have a
34 battery, and therefore charging should be disabled. In
35 addition battery properties will be faked such that the device
36 assumes normal operation.
Nicholas Troast96886052016-02-25 15:42:17 -080037
38- qcom,fcc-max-ua
39 Usage: optional
40 Value type: <u32>
41 Definition: Specifies the maximum fast charge current in micro-amps.
Abhijeet Dharmapurikarf9805d42016-05-17 18:38:42 -070042 If the value is not present, 1Amp is used as default.
43
44- qcom,fv-max-uv
45 Usage: optional
46 Value type: <u32>
47 Definition: Specifies the maximum float voltage in micro-volts.
48 If the value is not present, 4.35V is used as default.
Nicholas Troast96886052016-02-25 15:42:17 -080049
50- qcom,usb-icl-ua
51 Usage: optional
52 Value type: <u32>
53 Definition: Specifies the USB input current limit in micro-amps.
Abhijeet Dharmapurikarf9805d42016-05-17 18:38:42 -070054 If the value is not present, 1.5Amps is used as default.
Nicholas Troast96886052016-02-25 15:42:17 -080055
Harry Yang360bd532016-09-26 11:03:22 -070056- qcom,usb-ocl-ua
57 Usage: optional
58 Value type: <u32>
59 Definition: Specifies the OTG output current limit in micro-amps.
60 If the value is not present, 1.5Amps is used as default
61
Nicholas Troast96886052016-02-25 15:42:17 -080062- qcom,dc-icl-ua
63 Usage: optional
64 Value type: <u32>
65 Definition: Specifies the DC input current limit in micro-amps.
66
Harry Yangd89ff1f2016-12-05 14:59:11 -080067- qcom,boost-threshold-ua
68 Usage: optional
69 Value type: <u32>
70 Definition: Specifies the boost current threshold in micro-amps.
71 If the value is not present, 100mA is used as default.
72
Abhijeet Dharmapurikar5cf5faf2016-06-21 14:20:24 -070073- qcom,wipower-max-uw
74 Usage: optional
75 Value type: <u32>
76 Definition: Specifies the DC input power limit in micro-watts.
77 If the value is not present, 8W is used as default.
78
Abhijeet Dharmapurikar99fb8942016-07-08 11:39:23 -070079- qcom,thermal-mitigation
80 Usage: optional
81 Value type: Array of <u32>
82 Definition: Array of fast charge current limit values for
83 different system thermal mitigation levels.
84 This should be a flat array that denotes the
85 maximum charge current in mA for each thermal
86 level.
87
Harry Yangba874ce2016-08-19 14:17:01 -070088- io-channels
89 Usage: optional
90 Value type: List of <phandle u32>
91 Definition: List of phandle and IIO specifier pairs, one pair
92 for each IIO input to the device. Note: if the
93 IIO provider specifies '0' for #io-channel-cells,
94 then only the phandle portion of the pair will appear.
95
96- io-channel-names
97 Usage: optional
98 Value type: List of <string>
99 Definition: List of IIO input name strings sorted in the same
100 order as the io-channels property. Consumer drivers
101 will use io-channel-names to match IIO input names
102 with IIO specifiers.
103
Nicholas Troast597acfe2016-07-20 16:03:15 -0700104- qcom,float-option
105 Usage: optional
106 Value type: <u32>
107 Definition: Configures how the charger behaves when a float charger is
108 detected by APSD
109 1 - Treat as a DCP
110 2 - Treat as a SDP
111 3 - Disable charging
112 4 - Suspend USB input
113
Abhijeet Dharmapurikarf0b0a042016-10-10 16:43:43 -0700114- qcom,hvdcp-disable
115 Usage: optional
116 Value type: <empty>
117 Definition: Specifies if hvdcp charging is to be enabled or not.
118 If this property is not specified hvdcp will be enabled.
119 If this property is specified, hvdcp 2.0 detection will still
120 happen but the adapter won't be asked to switch to a higher
121 voltage point.
122
Subbaraman Narayanamurthy5c4f6de2016-11-02 15:25:32 -0700123- qcom,chg-inhibit-threshold-mv
124 Usage: optional
125 Value type: <u32>
126 Definition: Charge inhibit threshold in milli-volts. Charging will be
127 inhibited when the battery voltage is within this threshold
128 from Vfloat at charger insertion. If this is not specified
129 then charge inhibit will be disabled by default.
130 Allowed values are: 50, 100, 200, 300.
131
Subbaraman Narayanamurthy851f4172016-11-15 19:39:08 -0800132- qcom,auto-recharge-soc
133 Usage: optional
134 Value type: <empty>
135 Definition: Specifies if automatic recharge needs to be based off battery
136 SOC. If this property is not specified, then auto recharge will
137 be based off battery voltage. For both SOC and battery voltage,
138 charger receives the signal from FG to resume charging.
139
Ashay Jaiswalda8669b2017-02-10 23:24:23 +0530140- qcom,suspend-input-on-debug-batt
141 Usage: optional
142 Value type: <empty>
143 Definition: Boolean flag which when present enables input suspend for
144 debug battery.
145
Anirudh Ghayalca8ce4d2017-04-10 08:27:11 +0530146- qcom,min-freq-khz
147 Usage: optional
148 Value type: <u32>
149 Definition: Specifies the minimum charger buck/boost switching frequency
150 in KHz. It overrides the min frequency defined for the charger.
151
152- qcom,max-freq-khz
153 Usage: optional
154 Value type: <u32>
155 Definition: Specifies the maximum charger buck/boost switching frequency in
156 KHz. It overrides the max frequency defined for the charger.
157
Ashay Jaiswal1bf41332017-05-03 15:10:25 +0530158- qcom,otg-deglitch-time-ms
159 Usage: optional
160 Value type: <u32>
161 Definition: Specifies the deglitch interval for OTG detection.
162 If the value is not present, 50 msec is used as default.
163
Anirudh Ghayal9d0196d2017-07-23 23:02:48 +0530164- qcom,step-charging-enable
165 Usage: optional
166 Value type: bool
167 Definition: Boolean flag which when present enables step-charging.
168
169- qcom,wd-bark-time-secs
170 Usage: optional
171 Value type: <u32>
172 Definition: WD bark-timeout in seconds. The possible values are
173 16, 32, 64, 128. If not defined it defaults to 64.
174
Ashay Jaiswal9aba44a2017-07-20 17:41:36 +0530175- qcom,sw-jeita-enable
176 Usage: optional
177 Value type: bool
178 Definition: Boolean flag which when present enables sw compensation for jeita
Anirudh Ghayal9d0196d2017-07-23 23:02:48 +0530179
Fenglin Wudd8f4cb2017-10-17 11:09:46 +0800180- qcom,battery-data
181 Usage: optional
182 Value type: <u32>
183 Definition: Specifies the phandle of the node which contains the battery
184 profiles supported on the device. This is only specified
185 when step charging and sw-jeita configurations are desired
186 to be get from these properties defined in battery profile:
187 qcom,step-chg-ranges, qcom,jeita-fcc-ranges, qcom,jeita-fv-ranges.
188
Nicholas Troast96886052016-02-25 15:42:17 -0800189=============================================
190Second Level Nodes - SMB2 Charger Peripherals
191=============================================
192
193Peripheral specific properties:
194- reg
195 Usage: required
196 Value type: <prop-encoded-array>
197 Definition: Address and size of the peripheral's register block.
198
199- interrupts
200 Usage: required
201 Value type: <prop-encoded-array>
202 Definition: Peripheral interrupt specifier.
203
204- interrupt-names
205 Usage: required
206 Value type: <stringlist>
207 Definition: Interrupt names. This list must match up 1-to-1 with the
208 interrupts specified in the 'interrupts' property.
209
210=======
211Example
212=======
213
Harry Yang2452b272017-03-06 13:56:14 -0800214pmi8998_charger: qcom,qpnp-smb2 {
Nicholas Troast96886052016-02-25 15:42:17 -0800215 compatible = "qcom,qpnp-smb2";
216 #address-cells = <1>;
217 #size-cells = <1>;
218
Harry Yangba874ce2016-08-19 14:17:01 -0700219 io-channels = <&pmic_rradc 0>;
220 io-channel-names = "rradc_batt_id";
221
Nicholas Troast96886052016-02-25 15:42:17 -0800222 dpdm-supply = <&qusb_phy0>;
223
Nicholas Troast96886052016-02-25 15:42:17 -0800224 qcom,chgr@1000 {
225 reg = <0x1000 0x100>;
226 interrupts = <0x2 0x10 0x0 IRQ_TYPE_NONE>,
227 <0x2 0x10 0x1 IRQ_TYPE_NONE>,
228 <0x2 0x10 0x2 IRQ_TYPE_NONE>,
229 <0x2 0x10 0x3 IRQ_TYPE_NONE>,
230 <0x2 0x10 0x4 IRQ_TYPE_NONE>;
231
232 interrupt-names = "chg-error",
233 "chg-state-change",
234 "step-chg-state-change",
235 "step-chg-soc-update-fail",
236 "step-chg-soc-update-request";
237 };
238
239 qcom,otg@1100 {
240 reg = <0x1100 0x100>;
241 interrupts = <0x2 0x11 0x0 IRQ_TYPE_NONE>,
242 <0x2 0x11 0x1 IRQ_TYPE_NONE>,
243 <0x2 0x11 0x2 IRQ_TYPE_NONE>,
244 <0x2 0x11 0x3 IRQ_TYPE_NONE>;
245
246 interrupt-names = "otg-fail",
247 "otg-overcurrent",
248 "otg-oc-dis-sw-sts",
249 "testmode-change-detect";
250 };
251
252 qcom,bat-if@1200 {
253 reg = <0x1200 0x100>;
254 interrupts = <0x2 0x12 0x0 IRQ_TYPE_NONE>,
255 <0x2 0x12 0x1 IRQ_TYPE_NONE>,
256 <0x2 0x12 0x2 IRQ_TYPE_NONE>,
257 <0x2 0x12 0x3 IRQ_TYPE_NONE>,
258 <0x2 0x12 0x4 IRQ_TYPE_NONE>,
259 <0x2 0x12 0x5 IRQ_TYPE_NONE>;
260
261 interrupt-names = "bat-temp",
262 "bat-ocp",
263 "bat-ov",
264 "bat-low",
265 "bat-therm-or-id-missing",
266 "bat-terminal-missing";
267 };
268
269 qcom,usb-chgpth@1300 {
270 reg = <0x1300 0x100>;
271 interrupts = <0x2 0x13 0x0 IRQ_TYPE_NONE>,
272 <0x2 0x13 0x1 IRQ_TYPE_NONE>,
273 <0x2 0x13 0x2 IRQ_TYPE_NONE>,
274 <0x2 0x13 0x3 IRQ_TYPE_NONE>,
275 <0x2 0x13 0x4 IRQ_TYPE_NONE>,
276 <0x2 0x13 0x5 IRQ_TYPE_NONE>,
277 <0x2 0x13 0x6 IRQ_TYPE_NONE>,
278 <0x2 0x13 0x7 IRQ_TYPE_NONE>;
279
280 interrupt-names = "usbin-collapse",
281 "usbin-lt-3p6v",
282 "usbin-uv",
283 "usbin-ov",
284 "usbin-plugin",
285 "usbin-src-change",
286 "usbin-icl-change",
287 "type-c-change";
288 };
289
290 qcom,dc-chgpth@1400 {
291 reg = <0x1400 0x100>;
292 interrupts = <0x2 0x14 0x0 IRQ_TYPE_NONE>,
293 <0x2 0x14 0x1 IRQ_TYPE_NONE>,
294 <0x2 0x14 0x2 IRQ_TYPE_NONE>,
295 <0x2 0x14 0x3 IRQ_TYPE_NONE>,
296 <0x2 0x14 0x4 IRQ_TYPE_NONE>,
297 <0x2 0x14 0x5 IRQ_TYPE_NONE>,
298 <0x2 0x14 0x6 IRQ_TYPE_NONE>;
299
300 interrupt-names = "dcin-collapse",
301 "dcin-lt-3p6v",
302 "dcin-uv",
303 "dcin-ov",
304 "dcin-plugin",
305 "div2-en-dg",
306 "dcin-icl-change";
307 };
308
309 qcom,chgr-misc@1600 {
310 reg = <0x1600 0x100>;
311 interrupts = <0x2 0x16 0x0 IRQ_TYPE_NONE>,
312 <0x2 0x16 0x1 IRQ_TYPE_NONE>,
313 <0x2 0x16 0x2 IRQ_TYPE_NONE>,
314 <0x2 0x16 0x3 IRQ_TYPE_NONE>,
315 <0x2 0x16 0x4 IRQ_TYPE_NONE>,
316 <0x2 0x16 0x5 IRQ_TYPE_NONE>,
317 <0x2 0x16 0x6 IRQ_TYPE_NONE>,
318 <0x2 0x16 0x7 IRQ_TYPE_NONE>;
319
320 interrupt-names = "wdog-snarl",
321 "wdog-bark",
322 "aicl-fail",
323 "aicl-done",
324 "high-duty-cycle",
325 "input-current-limiting",
326 "temperature-change",
327 "switcher-power-ok";
328 };
329};