blob: 3d054f3579603d7e8613b402d4d473b91c0b83d3 [file] [log] [blame]
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -07001Qualcomm Techonologies, Inc. QPNP PMIC Fuel Gauge Gen3 Device
2
3QPNP PMIC FG Gen3 device provides interface to the clients to read properties
4related to the battery. Its main function is to retrieve the State of Charge
5(SOC), in percentage scale representing the amount of charge left in the
6battery.
7
8=======================
9Required Node Structure
10=======================
11
12FG Gen3 device must be described in two levels of device nodes. The first
13level describes the FG Gen3 device. The second level describes one or more
14peripherals managed by FG Gen3 driver. All the peripheral specific parameters
15such as base address, interrupts etc., should be under second level node.
16
17====================================
18First Level Node - FG Gen3 device
19====================================
20
21- compatible
22 Usage: required
23 Value type: <string>
24 Definition: Should be "qcom,fg-gen3".
25
26- qcom,pmic-revid
27 Usage: required
28 Value type: <phandle>
29 Definition: Should specify the phandle of PMIC revid module. This is
30 used to identify the PMIC subtype.
31
32- io-channels
33- io-channel-names
34 Usage: required
35 Value type: <phandle>
36 Definition: For details about IIO bindings see:
37 Documentation/devicetree/bindings/iio/iio-bindings.txt
38
Subbaraman Narayanamurthy8a191dc2017-08-18 18:37:01 -070039- #thermal-sensor-cells: Should be 0. See thermal.txt for a description.
40
Subbaraman Narayanamurthy243fc3f2016-11-28 16:05:09 -080041- qcom,rradc-base
42 Usage: required
43 Value type: <u32>
44 Definition: Should specify the base address of RR_ADC peripheral. This
45 is used for reading certain peripheral registers under it.
46
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -070047- qcom,fg-cutoff-voltage
48 Usage: optional
49 Value type: <u32>
50 Definition: The voltage (in mV) where the fuel gauge will steer the SOC
51 to be zero. For example, if the cutoff voltage is set to
52 3400mv, the fuel gauge will try to count SoC so that the
53 battery SOC will be 0 when it is 3400mV. If this property
54 is not specified, then the default value used will be
55 3200mV.
56
57- qcom,fg-empty-voltage
58 Usage: optional
59 Value type: <u32>
60 Definition: The voltage threshold (in mV) based on which the empty soc
61 interrupt will be triggered. When the empty soc interrupt
62 fires, battery soc will be set to 0 and the userspace will
63 be notified via the power supply framework. The userspace
64 will read 0% soc and immediately shutdown. If this property
65 is not specified, then the default value used will be
Subbaraman Narayanamurthyc7b33322016-11-01 16:29:46 -070066 2800mV.
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -070067
68- qcom,fg-vbatt-low-thr
69 Usage: optional
70 Value type: <u32>
71 Definition: The voltage threshold (in mV) which upon set will be used
72 for configuring the low battery voltage threshold.
73
Subbaraman Narayanamurthy4cf5c1c2016-11-17 13:58:06 -080074- qcom,fg-recharge-voltage
75 Usage: optional
76 Value type: <u32>
77 Definition: The voltage threshold (in mV) based on which the charging
78 will be resumed once the charging is complete. If this
79 property is not specified, then the default value will be
80 4250mV.
81
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -070082- qcom,fg-chg-term-current
83 Usage: optional
84 Value type: <u32>
85 Definition: Battery current (in mA) at which the fuel gauge will issue
86 an end of charge if the charger is configured to use the
87 fuel gauge ADC for end of charge detection. If this
88 property is not specified, then the default value used
89 will be 100mA.
90
91- qcom,fg-sys-term-current
92 Usage: optional
93 Value type: <u32>
94 Definition: Battery current (in mA) at which the fuel gauge will try to
95 scale towards 100%. When the charge current goes above this
96 the SOC should be at 100%. If this property is not
Subbaraman Narayanamurthy4bf3ce22016-09-19 11:17:59 -070097 specified, then the default value used will be -125mA.
98 This value has to be specified in negative values for
99 the charging current.
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700100
Subbaraman Narayanamurthya4e18882017-04-04 20:28:03 -0700101- qcom,fg-chg-term-base-current
102 Usage: optional
103 Value type: <u32>
104 Definition: Battery current (in mA) upper boundary at which the fuel
105 gauge will issue an end of charge during discharging. If
106 this property is not specified, then the default value used
107 will be 75mA.
108
Subbaraman Narayanamurthy5566f502017-12-19 19:39:03 -0800109- qcom,fg-cutoff-current
110 Usage: optional
111 Value type: <u32>
112 Definition: Minimum Battery current (in mA) used for cutoff SOC
113 estimate. If this property is not specified, then a default
114 value of 500 mA will be applied.
115
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700116- qcom,fg-delta-soc-thr
117 Usage: optional
118 Value type: <u32>
Subbaraman Narayanamurthyfbf25372017-01-03 15:39:08 -0800119 Definition: Percentage of SOC increase upon which the delta monotonic &
120 battery SOC interrupts will be triggered. If this property
121 is not specified, then the default value will be 1.
122 Possible values are in the range of 0 to 12.
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700123
124- qcom,fg-recharge-soc-thr
125 Usage: optional
126 Value type: <u32>
127 Definition: Percentage of monotonic SOC upon which the charging will
128 will be resumed once the charging is complete. If this
129 property is not specified, then the default value will be
130 95.
131
132- qcom,fg-rsense-sel
133 Usage: optional
134 Value type: <u32>
135 Definition: Specifies the source of sense resistor.
136 Allowed values are:
137 0 - Rsense is from Battery FET
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700138 2 - Rsense is Battery FET and SMB
139 Option 2 can be used only when a parallel charger is
140 present. If this property is not specified, then the
141 default value will be 2.
142
143- qcom,fg-jeita-thresholds
144 Usage: optional
145 Value type: <prop-encoded-array>
146 Definition: A list of integers which holds the jeita thresholds (degC)
147 in the following order. Allowed size is 4.
148 Element 0 - JEITA cold threshold
149 Element 1 - JEITA cool threshold
150 Element 2 - JEITA warm threshold
151 Element 3 - JEITA hot threshold
152 If these parameters are not specified, then the default
153 values used will be 0, 5, 45, 50.
154
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700155- qcom,fg-esr-timer-charging
156 Usage: optional
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700157 Value type: <prop-encoded-array>
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700158 Definition: Number of cycles between ESR pulses while the battery is
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700159 charging. Array of 2 elements if specified.
160 Element 0 - Retry value for timer
161 Element 1 - Maximum value for timer
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700162
163- qcom,fg-esr-timer-awake
164 Usage: optional
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700165 Value type: <prop-encoded-array>
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700166 Definition: Number of cycles between ESR pulses while the system is
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700167 awake and the battery is discharging. Array of 2 elements
168 if specified.
169 Element 0 - Retry value for timer
170 Element 1 - Maximum value for timer
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700171
172- qcom,fg-esr-timer-asleep
173 Usage: optional
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700174 Value type: <prop-encoded-array>
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700175 Definition: Number of cycles between ESR pulses while the system is
176 asleep and the battery is discharging. This option requires
Subbaraman Narayanamurthy784bd5b2017-05-17 17:43:22 -0700177 qcom,fg-esr-timer-awake to be defined. Array of 2 elements
178 if specified.
179 Element 0 - Retry value for timer
180 Element 1 - Maximum value for timer
Nicholas Troastdcf8fe62016-08-04 14:30:02 -0700181
Subbaraman Narayanamurthye14037f2017-03-16 19:14:58 -0700182- qcom,fg-esr-pulse-thresh-ma
183 Usage: optional
184 Value type: <u32>
185 Definition: ESR pulse qualification threshold in mA. If this is not
186 specified, a default value of 110 mA will be configured.
187 Allowed values are from 1 to 997.
188
189- qcom,fg-esr-meas-curr-ma
190 Usage: optional
191 Value type: <u32>
192 Definition: ESR measurement current in mA. If this is not specified,
193 a default value of 120 mA will be configured. Allowed
194 values are 60, 120, 180 and 240.
195
Nicholas Troaste29dec92016-08-24 09:35:11 -0700196- qcom,cycle-counter-en
197 Usage: optional
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800198 Value type: <empty>
Nicholas Troaste29dec92016-08-24 09:35:11 -0700199 Definition: Enables the cycle counter feature.
200
Subbaraman Narayanamurthy6da170e2016-09-21 12:36:03 -0700201- qcom,fg-force-load-profile
202 Usage: optional
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800203 Value type: <empty>
Subbaraman Narayanamurthy6da170e2016-09-21 12:36:03 -0700204 Definition: If set, battery profile will be force loaded if the profile
205 loaded earlier by bootloader doesn't match with the profile
206 available in the device tree.
207
Subbaraman Narayanamurthy07be9192016-09-14 14:48:49 -0700208- qcom,cl-start-capacity
209 Usage: optional
210 Value type: <u32>
211 Definition: Battery SOC threshold to start the capacity learning.
212 If this is not specified, then the default value used
213 will be 15.
214
215- qcom,cl-min-temp
216 Usage: optional
217 Value type: <u32>
218 Definition: Lower limit of battery temperature to start the capacity
219 learning. If this is not specified, then the default value
Subbaraman Narayanamurthya01aac92017-10-11 14:05:11 -0700220 used will be 150 (15 C). Unit is in decidegC.
Subbaraman Narayanamurthy07be9192016-09-14 14:48:49 -0700221
222- qcom,cl-max-temp
223 Usage: optional
224 Value type: <u32>
225 Definition: Upper limit of battery temperature to start the capacity
226 learning. If this is not specified, then the default value
Subbaraman Narayanamurthya01aac92017-10-11 14:05:11 -0700227 used will be 500 (50 C). Unit is in decidegC.
Subbaraman Narayanamurthy07be9192016-09-14 14:48:49 -0700228
229- qcom,cl-max-increment
230 Usage: optional
231 Value type: <u32>
232 Definition: Maximum capacity increment allowed per capacity learning
233 cycle. If this is not specified, then the default value
234 used will be 5 (0.5%). Unit is in decipercentage.
235
236- qcom,cl-max-decrement
237 Usage: optional
238 Value type: <u32>
239 Definition: Maximum capacity decrement allowed per capacity learning
240 cycle. If this is not specified, then the default value
241 used will be 100 (10%). Unit is in decipercentage.
242
243- qcom,cl-min-limit
244 Usage: optional
245 Value type: <u32>
246 Definition: Minimum limit that the capacity cannot go below in a
247 capacity learning cycle. If this is not specified, then
248 the default value is 0. Unit is in decipercentage.
249
250- qcom,cl-max-limit
251 Usage: optional
252 Value type: <u32>
253 Definition: Maximum limit that the capacity cannot go above in a
254 capacity learning cycle. If this is not specified, then
255 the default value is 0. Unit is in decipercentage.
256
cyizhaofb3eec52017-01-24 17:08:55 +0800257- qcom,battery-thermal-coefficients
258 Usage: optional
259 Value type: <u8>
260 Definition: Byte array of battery thermal coefficients.
261 This should be exactly 3 bytes in length.
262
Subbaraman Narayanamurthy65ff45e2016-09-23 19:11:17 -0700263- qcom,fg-jeita-hyst-temp
264 Usage: optional
265 Value type: <u32>
266 Definition: Hysteresis applied to Jeita temperature comparison.
267 Possible values are:
268 0 - No hysteresis
269 1,2,3 - Value in Celsius.
270
Subbaraman Narayanamurthy11bddec2016-09-26 11:27:24 -0700271- qcom,fg-batt-temp-delta
272 Usage: optional
273 Value type: <u32>
274 Definition: Battery temperature delta interrupt threshold. Possible
275 values are: 2, 4, 6 and 10. Unit is in Kelvin.
276
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800277- qcom,hold-soc-while-full
Subbaraman Narayanamurthyf9611e32016-09-26 11:12:47 -0700278 Usage: optional
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800279 Value type: <empty>
Subbaraman Narayanamurthyf9611e32016-09-26 11:12:47 -0700280 Definition: A boolean property that when defined holds SOC at 100% when
281 the battery is full.
282
Subbaraman Narayanamurthy50fb7fd2017-07-25 20:01:25 -0700283- qcom,linearize-soc
284 Usage: optional
285 Value type: <empty>
286 Definition: A boolean property that when defined linearizes SOC when
287 the SOC drops after charge termination monotonically to
288 improve the user experience. This is applicable only if
289 "qcom,hold-soc-while-full" is specified.
290
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800291- qcom,ki-coeff-soc-dischg
Subbaraman Narayanamurthyc1a94ed2016-10-05 19:58:58 -0700292 Usage: optional
293 Value type: <prop-encoded-array>
294 Definition: Array of monotonic SOC threshold values to change the ki
295 coefficient for medium discharge current during discharge.
296 This should be defined in the ascending order and in the
297 range of 0-100. Array limit is set to 3.
298
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800299- qcom,ki-coeff-med-dischg
Subbaraman Narayanamurthyc1a94ed2016-10-05 19:58:58 -0700300 Usage: optional
301 Value type: <prop-encoded-array>
302 Definition: Array of ki coefficient values for medium discharge current
303 during discharge. These values will be applied when the
304 monotonic SOC goes below the SOC threshold specified under
305 qcom,ki-coeff-soc-dischg. Array limit is set to 3. This
306 property should be specified if qcom,ki-coeff-soc-dischg
307 is specified to make it fully functional. Value has no
308 unit. Allowed range is 0 to 62200 in micro units.
309
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800310- qcom,ki-coeff-hi-dischg
Subbaraman Narayanamurthyc1a94ed2016-10-05 19:58:58 -0700311 Usage: optional
312 Value type: <prop-encoded-array>
313 Definition: Array of ki coefficient values for high discharge current
314 during discharge. These values will be applied when the
315 monotonic SOC goes below the SOC threshold specified under
316 qcom,ki-coeff-soc-dischg. Array limit is set to 3. This
317 property should be specified if qcom,ki-coeff-soc-dischg
318 is specified to make it fully functional. Value has no
319 unit. Allowed range is 0 to 62200 in micro units.
320
Subbaraman Narayanamurthye17be582017-08-08 19:28:37 -0700321- qcom,ki-coeff-full-dischg
322 Usage: optional
323 Value type: <u32>
324 Definition: Ki coefficient full SOC value that will be applied during
325 discharging. If not specified, a value of 0 will be set.
326 Allowed range is from 245 to 62256.
327
Subbaraman Narayanamurthy13103202018-03-19 12:16:36 -0700328- qcom,ki-coeff-low-dischg
329 Usage: optional
330 Value type: <u32>
331 Definition: Ki coefficient value for low discharge current during
332 discharging. Value has no unit. Allowed range is 0-62200
333 in micro units.
334
335- qcom,ki-coeff-hi-chg
336 Usage: optional
337 Value type: <u32>
338 Definition: Ki coefficient value for high charge current during
339 charging. Value has no unit. Allowed range is 0-62200
340 in micro units.
341
Subbaraman Narayanamurthyc297f6de2016-11-28 18:05:20 -0800342- qcom,fg-rconn-mohms
343 Usage: optional
344 Value type: <u32>
345 Definition: Battery connector resistance (Rconn) in milliohms. If Rconn
346 is specified, then ESR to Rslow scaling factors will be
347 updated to account it for an accurate ESR.
348
Subbaraman Narayanamurthydcfc8662017-02-24 16:04:46 -0800349- qcom,fg-esr-clamp-mohms
350 Usage: optional
351 Value type: <u32>
352 Definition: Equivalent series resistance (ESR) in milliohms. If this
353 is specified, then ESR will be clamped to this value when
354 ESR is found to be dropping below this. Default value is
355 20.
356
Subbaraman Narayanamurthyb99ea4c2016-12-22 15:10:09 -0800357- qcom,fg-esr-filter-switch-temp
358 Usage: optional
359 Value type: <u32>
360 Definition: Battery temperature threshold below which low temperature
361 ESR filter coefficients will be switched to normal
362 temperature ESR filter coefficients. If this is not
363 specified, then the default value used will be 100. Unit is
364 in decidegC.
365
366- qcom,fg-esr-tight-filter-micro-pct
367 Usage: optional
368 Value type: <u32>
369 Definition: Value in micro percentage for ESR tight filter. If this is
370 not specified, then a default value of 3907 (0.39 %) will
371 be used. Lowest possible value is 1954 (0.19 %).
372
373- qcom,fg-esr-broad-filter-micro-pct
374 Usage: optional
375 Value type: <u32>
376 Definition: Value in micro percentage for ESR broad filter. If this is
377 not specified, then a default value of 99610 (9.96 %) will
378 be used. Lowest possible value is 1954 (0.19 %).
379
380- qcom,fg-esr-tight-lt-filter-micro-pct
381 Usage: optional
382 Value type: <u32>
383 Definition: Value in micro percentage for low temperature ESR tight
384 filter. If this is not specified, then a default value of
Subbaraman Narayanamurthy5feefbb2017-12-07 19:12:27 -0800385 30000 (3 %) will be used. Lowest possible value is 1954
Subbaraman Narayanamurthyb99ea4c2016-12-22 15:10:09 -0800386 (0.19 %).
387
388- qcom,fg-esr-broad-lt-filter-micro-pct
389 Usage: optional
390 Value type: <u32>
391 Definition: Value in micro percentage for low temperature ESR broad
392 filter. If this is not specified, then a default value of
Subbaraman Narayanamurthy5feefbb2017-12-07 19:12:27 -0800393 30000 (3 %) will be used. Lowest possible value is
Subbaraman Narayanamurthyb99ea4c2016-12-22 15:10:09 -0800394 1954 (0.19 %).
395
Subbaraman Narayanamurthy11c772d2017-12-01 10:54:40 -0800396- qcom,fg-esr-rt-filter-switch-temp
397 Usage: optional
398 Value type: <u32>
399 Definition: Battery temperature threshold below which ESR relax
400 filter coefficients will be applied after a certain
401 number of delta battery temperature interrupts firing in
402 an interval of time. This will be applied only when Qnovo
403 is enabled. If this is not specified, then the default
404 value used will be -100. Unit is in decidegC.
405
406- qcom,fg-esr-tight-rt-filter-micro-pct
407 Usage: optional
408 Value type: <u32>
409 Definition: Value in micro percentage for relax temperature ESR tight
410 filter. If this is not specified, then a default value of
411 5860 will be used. Lowest possible value is 1954 (0.19 %).
412 This will be applied only if Qnovo is enabled.
413
414- qcom,fg-esr-broad-rt-filter-micro-pct
415 Usage: optional
416 Value type: <u32>
417 Definition: Value in micro percentage for relax temperature ESR broad
418 filter. If this is not specified, then a default value of
419 156250 will be used. Lowest possible value is 1954 (0.19 %).
420 This will be applied only if Qnovo is enabled.
421
Subbaraman Narayanamurthydeeaec722016-12-22 18:55:25 -0800422- qcom,fg-auto-recharge-soc
423 Usage: optional
424 Value type: <empty>
425 Definition: A boolean property when defined will configure automatic
426 recharge SOC threshold. If not specified, automatic
427 recharge voltage threshold will be configured. This has
428 to be configured in conjunction with the charger side
429 configuration for proper functionality.
430
Subbaraman Narayanamurthy94e63052017-02-09 18:06:14 -0800431- qcom,slope-limit-temp-threshold
432 Usage: optional
433 Value type: <u32>
434 Definition: Battery temperature threshold to decide when slope limit
435 coefficients should be applied along with charging status.
436 Unit is in decidegC.
437
438- qcom,slope-limit-coeffs
439 Usage: optional
440 Value type: <prop-encoded-array>
441 Definition: A list of integers which holds the slope limit coefficients
442 in the following order. Allowed size is 4. Possible values
443 are from 0 to 31. Unit is in decipercentage.
444 Element 0 - Low temperature discharging
445 Element 1 - Low temperature charging
446 Element 2 - High temperature discharging
447 Element 3 - High temperature charging
448 These coefficients have to be specified along with the
449 property "qcom,slope-limit-temp-threshold" to make dynamic
450 slope limit adjustment functional.
451
Fenglin Wud10ccf12017-08-10 15:43:41 +0800452- qcom,fg-bmd-en-delay-ms
453 Usage: optional
454 Value type: <u32>
455 Definition: The delay in ms for FG to enable BMD after reading RID.
456
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700457==========================================================
458Second Level Nodes - Peripherals managed by FG Gen3 driver
459==========================================================
460- reg
461 Usage: required
462 Value type: <prop-encoded-array>
463 Definition: Addresses and sizes for the specified peripheral
464
465- interrupts
466 Usage: optional
467 Value type: <prop-encoded-array>
468 Definition: Interrupt mapping as per the interrupt encoding
469
470- interrupt-names
471 Usage: optional
472 Value type: <stringlist>
473 Definition: Interrupt names. This list must match up 1-to-1 with the
474 interrupts specified in the 'interrupts' property.
475
476========
477Example
478========
479
Harry Yang2452b272017-03-06 13:56:14 -0800480pmi8998_fg: qpnp,fg {
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700481 compatible = "qcom,fg-gen3";
482 #address-cells = <1>;
483 #size-cells = <1>;
Harry Yang2452b272017-03-06 13:56:14 -0800484 qcom,pmic-revid = <&pmi8998_revid>;
485 io-channels = <&pmi8998_rradc 3>;
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700486 io-channel-names = "rradc_batt_id";
Subbaraman Narayanamurthy243fc3f2016-11-28 16:05:09 -0800487 qcom,rradc-base = <0x4500>;
Subbaraman Narayanamurthyc1a94ed2016-10-05 19:58:58 -0700488 qcom,ki-coeff-soc-dischg = <30 60 90>;
489 qcom,ki-coeff-med-dischg = <800 1000 1400>;
490 qcom,ki-coeff-hi-dischg = <1200 1500 2100>;
Subbaraman Narayanamurthy94e63052017-02-09 18:06:14 -0800491 qcom,slope-limit-temp-threshold = <100>;
492 qcom,slope-limit-coeffs = <10 11 12 13>;
cyizhaofb3eec52017-01-24 17:08:55 +0800493 qcom,battery-thermal-coefficients = [9d 50 ff];
Subbaraman Narayanamurthy8a191dc2017-08-18 18:37:01 -0700494 #thermal-sensor-cells = <0>;
Subbaraman Narayanamurthy6accb262016-03-14 16:41:16 -0700495 status = "okay";
496
497 qcom,fg-batt-soc@4000 {
498 status = "okay";
499 reg = <0x4000 0x100>;
500 interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>,
501 <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>,
502 <0x2 0x40 0x2 IRQ_TYPE_EDGE_BOTH>,
503 <0x2 0x40 0x3 IRQ_TYPE_EDGE_BOTH>;
504 interrupt-names = "soc-update",
505 "soc-ready",
506 "bsoc-delta",
507 "msoc-delta";
508
509 };
510
511 qcom,fg-batt-info@4100 {
512 status = "okay";
513 reg = <0x4100 0x100>;
514 interrupts = <0x2 0x41 0x3 IRQ_TYPE_EDGE_BOTH>;
515 interrupt-names = "batt-missing";
516 };
517
518 qcom,fg-memif@4400 {
519 status = "okay";
520 reg = <0x4400 0x100>;
521 };
522};
Subbaraman Narayanamurthy8a191dc2017-08-18 18:37:01 -0700523
524======================================
525Example for thermal zone configuration
526======================================
527
528thermal_zones {
529 pmi8998_fg {
530 polling-delay-passive = <200>;
531 polling-delay = <200>;
532 thermal-governor = <userspace>;
533 thermal-sensors = <&pmi8998_fg>;
534
535 pmi8998_fg_trip1: pmi8998-fg-trip0 {
536 temperature = <45000>;
537 hysteresis = <0>;
538 type = "passive";
539 };
540 pmi8998_fg_trip2: pmi8998-fg-trip2 {
541 temperature = <50000>;
542 hysteresis = <0>;
543 type = "hot";
544 };
545 pmi8998_fg_trip3: pmi8998-fg-trip3 {
546 temperature = <60000>;
547 hysteresis = <0>;
548 type = "alert";
549 };
550 };
551};