Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 1 | Qualcomm Techonologies, Inc. QPNP PMIC Fuel Gauge Gen3 Device |
| 2 | |
| 3 | QPNP PMIC FG Gen3 device provides interface to the clients to read properties |
| 4 | related 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 |
| 6 | battery. |
| 7 | |
| 8 | ======================= |
| 9 | Required Node Structure |
| 10 | ======================= |
| 11 | |
| 12 | FG Gen3 device must be described in two levels of device nodes. The first |
| 13 | level describes the FG Gen3 device. The second level describes one or more |
| 14 | peripherals managed by FG Gen3 driver. All the peripheral specific parameters |
| 15 | such as base address, interrupts etc., should be under second level node. |
| 16 | |
| 17 | ==================================== |
| 18 | First 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 Narayanamurthy | 243fc3f | 2016-11-28 16:05:09 -0800 | [diff] [blame] | 39 | - qcom,rradc-base |
| 40 | Usage: required |
| 41 | Value type: <u32> |
| 42 | Definition: Should specify the base address of RR_ADC peripheral. This |
| 43 | is used for reading certain peripheral registers under it. |
| 44 | |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 45 | - qcom,fg-cutoff-voltage |
| 46 | Usage: optional |
| 47 | Value type: <u32> |
| 48 | Definition: The voltage (in mV) where the fuel gauge will steer the SOC |
| 49 | to be zero. For example, if the cutoff voltage is set to |
| 50 | 3400mv, the fuel gauge will try to count SoC so that the |
| 51 | battery SOC will be 0 when it is 3400mV. If this property |
| 52 | is not specified, then the default value used will be |
| 53 | 3200mV. |
| 54 | |
| 55 | - qcom,fg-empty-voltage |
| 56 | Usage: optional |
| 57 | Value type: <u32> |
| 58 | Definition: The voltage threshold (in mV) based on which the empty soc |
| 59 | interrupt will be triggered. When the empty soc interrupt |
| 60 | fires, battery soc will be set to 0 and the userspace will |
| 61 | be notified via the power supply framework. The userspace |
| 62 | will read 0% soc and immediately shutdown. If this property |
| 63 | is not specified, then the default value used will be |
Subbaraman Narayanamurthy | c7b3332 | 2016-11-01 16:29:46 -0700 | [diff] [blame] | 64 | 2800mV. |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 65 | |
| 66 | - qcom,fg-vbatt-low-thr |
| 67 | Usage: optional |
| 68 | Value type: <u32> |
| 69 | Definition: The voltage threshold (in mV) which upon set will be used |
| 70 | for configuring the low battery voltage threshold. |
| 71 | |
Subbaraman Narayanamurthy | 4cf5c1c | 2016-11-17 13:58:06 -0800 | [diff] [blame] | 72 | - qcom,fg-recharge-voltage |
| 73 | Usage: optional |
| 74 | Value type: <u32> |
| 75 | Definition: The voltage threshold (in mV) based on which the charging |
| 76 | will be resumed once the charging is complete. If this |
| 77 | property is not specified, then the default value will be |
| 78 | 4250mV. |
| 79 | |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 80 | - qcom,fg-chg-term-current |
| 81 | Usage: optional |
| 82 | Value type: <u32> |
| 83 | Definition: Battery current (in mA) at which the fuel gauge will issue |
| 84 | an end of charge if the charger is configured to use the |
| 85 | fuel gauge ADC for end of charge detection. If this |
| 86 | property is not specified, then the default value used |
| 87 | will be 100mA. |
| 88 | |
| 89 | - qcom,fg-sys-term-current |
| 90 | Usage: optional |
| 91 | Value type: <u32> |
| 92 | Definition: Battery current (in mA) at which the fuel gauge will try to |
| 93 | scale towards 100%. When the charge current goes above this |
| 94 | the SOC should be at 100%. If this property is not |
Subbaraman Narayanamurthy | 4bf3ce2 | 2016-09-19 11:17:59 -0700 | [diff] [blame] | 95 | specified, then the default value used will be -125mA. |
| 96 | This value has to be specified in negative values for |
| 97 | the charging current. |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 98 | |
Subbaraman Narayanamurthy | a4e1888 | 2017-04-04 20:28:03 -0700 | [diff] [blame] | 99 | - qcom,fg-chg-term-base-current |
| 100 | Usage: optional |
| 101 | Value type: <u32> |
| 102 | Definition: Battery current (in mA) upper boundary at which the fuel |
| 103 | gauge will issue an end of charge during discharging. If |
| 104 | this property is not specified, then the default value used |
| 105 | will be 75mA. |
| 106 | |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 107 | - qcom,fg-delta-soc-thr |
| 108 | Usage: optional |
| 109 | Value type: <u32> |
Subbaraman Narayanamurthy | fbf2537 | 2017-01-03 15:39:08 -0800 | [diff] [blame] | 110 | Definition: Percentage of SOC increase upon which the delta monotonic & |
| 111 | battery SOC interrupts will be triggered. If this property |
| 112 | is not specified, then the default value will be 1. |
| 113 | Possible values are in the range of 0 to 12. |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 114 | |
| 115 | - qcom,fg-recharge-soc-thr |
| 116 | Usage: optional |
| 117 | Value type: <u32> |
| 118 | Definition: Percentage of monotonic SOC upon which the charging will |
| 119 | will be resumed once the charging is complete. If this |
| 120 | property is not specified, then the default value will be |
| 121 | 95. |
| 122 | |
| 123 | - qcom,fg-rsense-sel |
| 124 | Usage: optional |
| 125 | Value type: <u32> |
| 126 | Definition: Specifies the source of sense resistor. |
| 127 | Allowed values are: |
| 128 | 0 - Rsense is from Battery FET |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 129 | 2 - Rsense is Battery FET and SMB |
| 130 | Option 2 can be used only when a parallel charger is |
| 131 | present. If this property is not specified, then the |
| 132 | default value will be 2. |
| 133 | |
| 134 | - qcom,fg-jeita-thresholds |
| 135 | Usage: optional |
| 136 | Value type: <prop-encoded-array> |
| 137 | Definition: A list of integers which holds the jeita thresholds (degC) |
| 138 | in the following order. Allowed size is 4. |
| 139 | Element 0 - JEITA cold threshold |
| 140 | Element 1 - JEITA cool threshold |
| 141 | Element 2 - JEITA warm threshold |
| 142 | Element 3 - JEITA hot threshold |
| 143 | If these parameters are not specified, then the default |
| 144 | values used will be 0, 5, 45, 50. |
| 145 | |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 146 | - qcom,fg-esr-timer-charging |
| 147 | Usage: optional |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 148 | Value type: <prop-encoded-array> |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 149 | Definition: Number of cycles between ESR pulses while the battery is |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 150 | charging. Array of 2 elements if specified. |
| 151 | Element 0 - Retry value for timer |
| 152 | Element 1 - Maximum value for timer |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 153 | |
| 154 | - qcom,fg-esr-timer-awake |
| 155 | Usage: optional |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 156 | Value type: <prop-encoded-array> |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 157 | Definition: Number of cycles between ESR pulses while the system is |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 158 | awake and the battery is discharging. Array of 2 elements |
| 159 | if specified. |
| 160 | Element 0 - Retry value for timer |
| 161 | Element 1 - Maximum value for timer |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 162 | |
| 163 | - qcom,fg-esr-timer-asleep |
| 164 | Usage: optional |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 165 | Value type: <prop-encoded-array> |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 166 | Definition: Number of cycles between ESR pulses while the system is |
| 167 | asleep and the battery is discharging. This option requires |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 168 | qcom,fg-esr-timer-awake to be defined. Array of 2 elements |
| 169 | if specified. |
| 170 | Element 0 - Retry value for timer |
| 171 | Element 1 - Maximum value for timer |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 172 | |
Subbaraman Narayanamurthy | e14037f | 2017-03-16 19:14:58 -0700 | [diff] [blame] | 173 | - qcom,fg-esr-pulse-thresh-ma |
| 174 | Usage: optional |
| 175 | Value type: <u32> |
| 176 | Definition: ESR pulse qualification threshold in mA. If this is not |
| 177 | specified, a default value of 110 mA will be configured. |
| 178 | Allowed values are from 1 to 997. |
| 179 | |
| 180 | - qcom,fg-esr-meas-curr-ma |
| 181 | Usage: optional |
| 182 | Value type: <u32> |
| 183 | Definition: ESR measurement current in mA. If this is not specified, |
| 184 | a default value of 120 mA will be configured. Allowed |
| 185 | values are 60, 120, 180 and 240. |
| 186 | |
Nicholas Troast | e29dec9 | 2016-08-24 09:35:11 -0700 | [diff] [blame] | 187 | - qcom,cycle-counter-en |
| 188 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 189 | Value type: <empty> |
Nicholas Troast | e29dec9 | 2016-08-24 09:35:11 -0700 | [diff] [blame] | 190 | Definition: Enables the cycle counter feature. |
| 191 | |
Subbaraman Narayanamurthy | 6da170e | 2016-09-21 12:36:03 -0700 | [diff] [blame] | 192 | - qcom,fg-force-load-profile |
| 193 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 194 | Value type: <empty> |
Subbaraman Narayanamurthy | 6da170e | 2016-09-21 12:36:03 -0700 | [diff] [blame] | 195 | Definition: If set, battery profile will be force loaded if the profile |
| 196 | loaded earlier by bootloader doesn't match with the profile |
| 197 | available in the device tree. |
| 198 | |
Subbaraman Narayanamurthy | 07be919 | 2016-09-14 14:48:49 -0700 | [diff] [blame] | 199 | - qcom,cl-start-capacity |
| 200 | Usage: optional |
| 201 | Value type: <u32> |
| 202 | Definition: Battery SOC threshold to start the capacity learning. |
| 203 | If this is not specified, then the default value used |
| 204 | will be 15. |
| 205 | |
| 206 | - qcom,cl-min-temp |
| 207 | Usage: optional |
| 208 | Value type: <u32> |
| 209 | Definition: Lower limit of battery temperature to start the capacity |
| 210 | learning. If this is not specified, then the default value |
| 211 | used will be 150. Unit is in decidegC. |
| 212 | |
| 213 | - qcom,cl-max-temp |
| 214 | Usage: optional |
| 215 | Value type: <u32> |
| 216 | Definition: Upper limit of battery temperature to start the capacity |
| 217 | learning. If this is not specified, then the default value |
| 218 | used will be 450 (45C). Unit is in decidegC. |
| 219 | |
| 220 | - qcom,cl-max-increment |
| 221 | Usage: optional |
| 222 | Value type: <u32> |
| 223 | Definition: Maximum capacity increment allowed per capacity learning |
| 224 | cycle. If this is not specified, then the default value |
| 225 | used will be 5 (0.5%). Unit is in decipercentage. |
| 226 | |
| 227 | - qcom,cl-max-decrement |
| 228 | Usage: optional |
| 229 | Value type: <u32> |
| 230 | Definition: Maximum capacity decrement allowed per capacity learning |
| 231 | cycle. If this is not specified, then the default value |
| 232 | used will be 100 (10%). Unit is in decipercentage. |
| 233 | |
| 234 | - qcom,cl-min-limit |
| 235 | Usage: optional |
| 236 | Value type: <u32> |
| 237 | Definition: Minimum limit that the capacity cannot go below in a |
| 238 | capacity learning cycle. If this is not specified, then |
| 239 | the default value is 0. Unit is in decipercentage. |
| 240 | |
| 241 | - qcom,cl-max-limit |
| 242 | Usage: optional |
| 243 | Value type: <u32> |
| 244 | Definition: Maximum limit that the capacity cannot go above in a |
| 245 | capacity learning cycle. If this is not specified, then |
| 246 | the default value is 0. Unit is in decipercentage. |
| 247 | |
cyizhao | fb3eec5 | 2017-01-24 17:08:55 +0800 | [diff] [blame] | 248 | - qcom,battery-thermal-coefficients |
| 249 | Usage: optional |
| 250 | Value type: <u8> |
| 251 | Definition: Byte array of battery thermal coefficients. |
| 252 | This should be exactly 3 bytes in length. |
| 253 | |
Subbaraman Narayanamurthy | 65ff45e | 2016-09-23 19:11:17 -0700 | [diff] [blame] | 254 | - qcom,fg-jeita-hyst-temp |
| 255 | Usage: optional |
| 256 | Value type: <u32> |
| 257 | Definition: Hysteresis applied to Jeita temperature comparison. |
| 258 | Possible values are: |
| 259 | 0 - No hysteresis |
| 260 | 1,2,3 - Value in Celsius. |
| 261 | |
Subbaraman Narayanamurthy | 11bddec | 2016-09-26 11:27:24 -0700 | [diff] [blame] | 262 | - qcom,fg-batt-temp-delta |
| 263 | Usage: optional |
| 264 | Value type: <u32> |
| 265 | Definition: Battery temperature delta interrupt threshold. Possible |
| 266 | values are: 2, 4, 6 and 10. Unit is in Kelvin. |
| 267 | |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 268 | - qcom,hold-soc-while-full |
Subbaraman Narayanamurthy | f9611e3 | 2016-09-26 11:12:47 -0700 | [diff] [blame] | 269 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 270 | Value type: <empty> |
Subbaraman Narayanamurthy | f9611e3 | 2016-09-26 11:12:47 -0700 | [diff] [blame] | 271 | Definition: A boolean property that when defined holds SOC at 100% when |
| 272 | the battery is full. |
| 273 | |
Subbaraman Narayanamurthy | 50fb7fd | 2017-07-25 20:01:25 -0700 | [diff] [blame] | 274 | - qcom,linearize-soc |
| 275 | Usage: optional |
| 276 | Value type: <empty> |
| 277 | Definition: A boolean property that when defined linearizes SOC when |
| 278 | the SOC drops after charge termination monotonically to |
| 279 | improve the user experience. This is applicable only if |
| 280 | "qcom,hold-soc-while-full" is specified. |
| 281 | |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 282 | - qcom,ki-coeff-soc-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 283 | Usage: optional |
| 284 | Value type: <prop-encoded-array> |
| 285 | Definition: Array of monotonic SOC threshold values to change the ki |
| 286 | coefficient for medium discharge current during discharge. |
| 287 | This should be defined in the ascending order and in the |
| 288 | range of 0-100. Array limit is set to 3. |
| 289 | |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 290 | - qcom,ki-coeff-med-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 291 | Usage: optional |
| 292 | Value type: <prop-encoded-array> |
| 293 | Definition: Array of ki coefficient values for medium discharge current |
| 294 | during discharge. These values will be applied when the |
| 295 | monotonic SOC goes below the SOC threshold specified under |
| 296 | qcom,ki-coeff-soc-dischg. Array limit is set to 3. This |
| 297 | property should be specified if qcom,ki-coeff-soc-dischg |
| 298 | is specified to make it fully functional. Value has no |
| 299 | unit. Allowed range is 0 to 62200 in micro units. |
| 300 | |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 301 | - qcom,ki-coeff-hi-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 302 | Usage: optional |
| 303 | Value type: <prop-encoded-array> |
| 304 | Definition: Array of ki coefficient values for high discharge current |
| 305 | during discharge. These values will be applied when the |
| 306 | monotonic SOC goes below the SOC threshold specified under |
| 307 | qcom,ki-coeff-soc-dischg. Array limit is set to 3. This |
| 308 | property should be specified if qcom,ki-coeff-soc-dischg |
| 309 | is specified to make it fully functional. Value has no |
| 310 | unit. Allowed range is 0 to 62200 in micro units. |
| 311 | |
Subbaraman Narayanamurthy | e17be58 | 2017-08-08 19:28:37 -0700 | [diff] [blame^] | 312 | - qcom,ki-coeff-full-dischg |
| 313 | Usage: optional |
| 314 | Value type: <u32> |
| 315 | Definition: Ki coefficient full SOC value that will be applied during |
| 316 | discharging. If not specified, a value of 0 will be set. |
| 317 | Allowed range is from 245 to 62256. |
| 318 | |
Subbaraman Narayanamurthy | c297f6de | 2016-11-28 18:05:20 -0800 | [diff] [blame] | 319 | - qcom,fg-rconn-mohms |
| 320 | Usage: optional |
| 321 | Value type: <u32> |
| 322 | Definition: Battery connector resistance (Rconn) in milliohms. If Rconn |
| 323 | is specified, then ESR to Rslow scaling factors will be |
| 324 | updated to account it for an accurate ESR. |
| 325 | |
Subbaraman Narayanamurthy | dcfc866 | 2017-02-24 16:04:46 -0800 | [diff] [blame] | 326 | - qcom,fg-esr-clamp-mohms |
| 327 | Usage: optional |
| 328 | Value type: <u32> |
| 329 | Definition: Equivalent series resistance (ESR) in milliohms. If this |
| 330 | is specified, then ESR will be clamped to this value when |
| 331 | ESR is found to be dropping below this. Default value is |
| 332 | 20. |
| 333 | |
Subbaraman Narayanamurthy | b99ea4c | 2016-12-22 15:10:09 -0800 | [diff] [blame] | 334 | - qcom,fg-esr-filter-switch-temp |
| 335 | Usage: optional |
| 336 | Value type: <u32> |
| 337 | Definition: Battery temperature threshold below which low temperature |
| 338 | ESR filter coefficients will be switched to normal |
| 339 | temperature ESR filter coefficients. If this is not |
| 340 | specified, then the default value used will be 100. Unit is |
| 341 | in decidegC. |
| 342 | |
| 343 | - qcom,fg-esr-tight-filter-micro-pct |
| 344 | Usage: optional |
| 345 | Value type: <u32> |
| 346 | Definition: Value in micro percentage for ESR tight filter. If this is |
| 347 | not specified, then a default value of 3907 (0.39 %) will |
| 348 | be used. Lowest possible value is 1954 (0.19 %). |
| 349 | |
| 350 | - qcom,fg-esr-broad-filter-micro-pct |
| 351 | Usage: optional |
| 352 | Value type: <u32> |
| 353 | Definition: Value in micro percentage for ESR broad filter. If this is |
| 354 | not specified, then a default value of 99610 (9.96 %) will |
| 355 | be used. Lowest possible value is 1954 (0.19 %). |
| 356 | |
| 357 | - qcom,fg-esr-tight-lt-filter-micro-pct |
| 358 | Usage: optional |
| 359 | Value type: <u32> |
| 360 | Definition: Value in micro percentage for low temperature ESR tight |
| 361 | filter. If this is not specified, then a default value of |
| 362 | 48829 (4.88 %) will be used. Lowest possible value is 1954 |
| 363 | (0.19 %). |
| 364 | |
| 365 | - qcom,fg-esr-broad-lt-filter-micro-pct |
| 366 | Usage: optional |
| 367 | Value type: <u32> |
| 368 | Definition: Value in micro percentage for low temperature ESR broad |
| 369 | filter. If this is not specified, then a default value of |
| 370 | 148438 (14.84 %) will be used. Lowest possible value is |
| 371 | 1954 (0.19 %). |
| 372 | |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 373 | - qcom,fg-auto-recharge-soc |
| 374 | Usage: optional |
| 375 | Value type: <empty> |
| 376 | Definition: A boolean property when defined will configure automatic |
| 377 | recharge SOC threshold. If not specified, automatic |
| 378 | recharge voltage threshold will be configured. This has |
| 379 | to be configured in conjunction with the charger side |
| 380 | configuration for proper functionality. |
| 381 | |
Subbaraman Narayanamurthy | 94e6305 | 2017-02-09 18:06:14 -0800 | [diff] [blame] | 382 | - qcom,slope-limit-temp-threshold |
| 383 | Usage: optional |
| 384 | Value type: <u32> |
| 385 | Definition: Battery temperature threshold to decide when slope limit |
| 386 | coefficients should be applied along with charging status. |
| 387 | Unit is in decidegC. |
| 388 | |
| 389 | - qcom,slope-limit-coeffs |
| 390 | Usage: optional |
| 391 | Value type: <prop-encoded-array> |
| 392 | Definition: A list of integers which holds the slope limit coefficients |
| 393 | in the following order. Allowed size is 4. Possible values |
| 394 | are from 0 to 31. Unit is in decipercentage. |
| 395 | Element 0 - Low temperature discharging |
| 396 | Element 1 - Low temperature charging |
| 397 | Element 2 - High temperature discharging |
| 398 | Element 3 - High temperature charging |
| 399 | These coefficients have to be specified along with the |
| 400 | property "qcom,slope-limit-temp-threshold" to make dynamic |
| 401 | slope limit adjustment functional. |
| 402 | |
Fenglin Wu | d10ccf1 | 2017-08-10 15:43:41 +0800 | [diff] [blame] | 403 | - qcom,fg-bmd-en-delay-ms |
| 404 | Usage: optional |
| 405 | Value type: <u32> |
| 406 | Definition: The delay in ms for FG to enable BMD after reading RID. |
| 407 | |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 408 | ========================================================== |
| 409 | Second Level Nodes - Peripherals managed by FG Gen3 driver |
| 410 | ========================================================== |
| 411 | - reg |
| 412 | Usage: required |
| 413 | Value type: <prop-encoded-array> |
| 414 | Definition: Addresses and sizes for the specified peripheral |
| 415 | |
| 416 | - interrupts |
| 417 | Usage: optional |
| 418 | Value type: <prop-encoded-array> |
| 419 | Definition: Interrupt mapping as per the interrupt encoding |
| 420 | |
| 421 | - interrupt-names |
| 422 | Usage: optional |
| 423 | Value type: <stringlist> |
| 424 | Definition: Interrupt names. This list must match up 1-to-1 with the |
| 425 | interrupts specified in the 'interrupts' property. |
| 426 | |
| 427 | ======== |
| 428 | Example |
| 429 | ======== |
| 430 | |
Harry Yang | 2452b27 | 2017-03-06 13:56:14 -0800 | [diff] [blame] | 431 | pmi8998_fg: qpnp,fg { |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 432 | compatible = "qcom,fg-gen3"; |
| 433 | #address-cells = <1>; |
| 434 | #size-cells = <1>; |
Harry Yang | 2452b27 | 2017-03-06 13:56:14 -0800 | [diff] [blame] | 435 | qcom,pmic-revid = <&pmi8998_revid>; |
| 436 | io-channels = <&pmi8998_rradc 3>; |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 437 | io-channel-names = "rradc_batt_id"; |
Subbaraman Narayanamurthy | 243fc3f | 2016-11-28 16:05:09 -0800 | [diff] [blame] | 438 | qcom,rradc-base = <0x4500>; |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 439 | qcom,ki-coeff-soc-dischg = <30 60 90>; |
| 440 | qcom,ki-coeff-med-dischg = <800 1000 1400>; |
| 441 | qcom,ki-coeff-hi-dischg = <1200 1500 2100>; |
Subbaraman Narayanamurthy | 94e6305 | 2017-02-09 18:06:14 -0800 | [diff] [blame] | 442 | qcom,slope-limit-temp-threshold = <100>; |
| 443 | qcom,slope-limit-coeffs = <10 11 12 13>; |
cyizhao | fb3eec5 | 2017-01-24 17:08:55 +0800 | [diff] [blame] | 444 | qcom,battery-thermal-coefficients = [9d 50 ff]; |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 445 | status = "okay"; |
| 446 | |
| 447 | qcom,fg-batt-soc@4000 { |
| 448 | status = "okay"; |
| 449 | reg = <0x4000 0x100>; |
| 450 | interrupts = <0x2 0x40 0x0 IRQ_TYPE_EDGE_BOTH>, |
| 451 | <0x2 0x40 0x1 IRQ_TYPE_EDGE_BOTH>, |
| 452 | <0x2 0x40 0x2 IRQ_TYPE_EDGE_BOTH>, |
| 453 | <0x2 0x40 0x3 IRQ_TYPE_EDGE_BOTH>; |
| 454 | interrupt-names = "soc-update", |
| 455 | "soc-ready", |
| 456 | "bsoc-delta", |
| 457 | "msoc-delta"; |
| 458 | |
| 459 | }; |
| 460 | |
| 461 | qcom,fg-batt-info@4100 { |
| 462 | status = "okay"; |
| 463 | reg = <0x4100 0x100>; |
| 464 | interrupts = <0x2 0x41 0x3 IRQ_TYPE_EDGE_BOTH>; |
| 465 | interrupt-names = "batt-missing"; |
| 466 | }; |
| 467 | |
| 468 | qcom,fg-memif@4400 { |
| 469 | status = "okay"; |
| 470 | reg = <0x4400 0x100>; |
| 471 | }; |
| 472 | }; |