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 | 8a191dc | 2017-08-18 18:37:01 -0700 | [diff] [blame] | 39 | - #thermal-sensor-cells: Should be 0. See thermal.txt for a description. |
| 40 | |
Subbaraman Narayanamurthy | 243fc3f | 2016-11-28 16:05:09 -0800 | [diff] [blame] | 41 | - 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 47 | - 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 Narayanamurthy | c7b3332 | 2016-11-01 16:29:46 -0700 | [diff] [blame] | 66 | 2800mV. |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 67 | |
| 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 Narayanamurthy | 4cf5c1c | 2016-11-17 13:58:06 -0800 | [diff] [blame] | 74 | - 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 82 | - 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 Narayanamurthy | 4bf3ce2 | 2016-09-19 11:17:59 -0700 | [diff] [blame] | 97 | 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 100 | |
Subbaraman Narayanamurthy | a4e1888 | 2017-04-04 20:28:03 -0700 | [diff] [blame] | 101 | - 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 Narayanamurthy | 5566f50 | 2017-12-19 19:39:03 -0800 | [diff] [blame] | 109 | - 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 116 | - qcom,fg-delta-soc-thr |
| 117 | Usage: optional |
| 118 | Value type: <u32> |
Subbaraman Narayanamurthy | fbf2537 | 2017-01-03 15:39:08 -0800 | [diff] [blame] | 119 | 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 123 | |
| 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 138 | 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 Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 155 | - qcom,fg-esr-timer-charging |
| 156 | Usage: optional |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 157 | Value type: <prop-encoded-array> |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 158 | Definition: Number of cycles between ESR pulses while the battery is |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 159 | charging. Array of 2 elements 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-awake |
| 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 |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 167 | 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 Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 171 | |
| 172 | - qcom,fg-esr-timer-asleep |
| 173 | Usage: optional |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 174 | Value type: <prop-encoded-array> |
Nicholas Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 175 | Definition: Number of cycles between ESR pulses while the system is |
| 176 | asleep and the battery is discharging. This option requires |
Subbaraman Narayanamurthy | 784bd5b | 2017-05-17 17:43:22 -0700 | [diff] [blame] | 177 | 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 Troast | dcf8fe6 | 2016-08-04 14:30:02 -0700 | [diff] [blame] | 181 | |
Subbaraman Narayanamurthy | e14037f | 2017-03-16 19:14:58 -0700 | [diff] [blame] | 182 | - 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 Troast | e29dec9 | 2016-08-24 09:35:11 -0700 | [diff] [blame] | 196 | - qcom,cycle-counter-en |
| 197 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 198 | Value type: <empty> |
Nicholas Troast | e29dec9 | 2016-08-24 09:35:11 -0700 | [diff] [blame] | 199 | Definition: Enables the cycle counter feature. |
| 200 | |
Subbaraman Narayanamurthy | 6da170e | 2016-09-21 12:36:03 -0700 | [diff] [blame] | 201 | - qcom,fg-force-load-profile |
| 202 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 203 | Value type: <empty> |
Subbaraman Narayanamurthy | 6da170e | 2016-09-21 12:36:03 -0700 | [diff] [blame] | 204 | 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 Narayanamurthy | 07be919 | 2016-09-14 14:48:49 -0700 | [diff] [blame] | 208 | - 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 Narayanamurthy | a01aac9 | 2017-10-11 14:05:11 -0700 | [diff] [blame] | 220 | used will be 150 (15 C). Unit is in decidegC. |
Subbaraman Narayanamurthy | 07be919 | 2016-09-14 14:48:49 -0700 | [diff] [blame] | 221 | |
| 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 Narayanamurthy | a01aac9 | 2017-10-11 14:05:11 -0700 | [diff] [blame] | 227 | used will be 500 (50 C). Unit is in decidegC. |
Subbaraman Narayanamurthy | 07be919 | 2016-09-14 14:48:49 -0700 | [diff] [blame] | 228 | |
| 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 | |
cyizhao | fb3eec5 | 2017-01-24 17:08:55 +0800 | [diff] [blame] | 257 | - 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 Narayanamurthy | 65ff45e | 2016-09-23 19:11:17 -0700 | [diff] [blame] | 263 | - 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 Narayanamurthy | 11bddec | 2016-09-26 11:27:24 -0700 | [diff] [blame] | 271 | - 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 Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 277 | - qcom,hold-soc-while-full |
Subbaraman Narayanamurthy | f9611e3 | 2016-09-26 11:12:47 -0700 | [diff] [blame] | 278 | Usage: optional |
Subbaraman Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 279 | Value type: <empty> |
Subbaraman Narayanamurthy | f9611e3 | 2016-09-26 11:12:47 -0700 | [diff] [blame] | 280 | Definition: A boolean property that when defined holds SOC at 100% when |
| 281 | the battery is full. |
| 282 | |
Subbaraman Narayanamurthy | 50fb7fd | 2017-07-25 20:01:25 -0700 | [diff] [blame] | 283 | - 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 Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 291 | - qcom,ki-coeff-soc-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 292 | 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 Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 299 | - qcom,ki-coeff-med-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 300 | 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 Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 310 | - qcom,ki-coeff-hi-dischg |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 311 | 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 Narayanamurthy | e17be58 | 2017-08-08 19:28:37 -0700 | [diff] [blame] | 321 | - 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 Narayanamurthy | 1310320 | 2018-03-19 12:16:36 -0700 | [diff] [blame] | 328 | - 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 Narayanamurthy | c297f6de | 2016-11-28 18:05:20 -0800 | [diff] [blame] | 342 | - 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 Narayanamurthy | dcfc866 | 2017-02-24 16:04:46 -0800 | [diff] [blame] | 349 | - 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 Narayanamurthy | b99ea4c | 2016-12-22 15:10:09 -0800 | [diff] [blame] | 357 | - 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 Narayanamurthy | 5feefbb | 2017-12-07 19:12:27 -0800 | [diff] [blame] | 385 | 30000 (3 %) will be used. Lowest possible value is 1954 |
Subbaraman Narayanamurthy | b99ea4c | 2016-12-22 15:10:09 -0800 | [diff] [blame] | 386 | (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 Narayanamurthy | 5feefbb | 2017-12-07 19:12:27 -0800 | [diff] [blame] | 393 | 30000 (3 %) will be used. Lowest possible value is |
Subbaraman Narayanamurthy | b99ea4c | 2016-12-22 15:10:09 -0800 | [diff] [blame] | 394 | 1954 (0.19 %). |
| 395 | |
Subbaraman Narayanamurthy | 11c772d | 2017-12-01 10:54:40 -0800 | [diff] [blame] | 396 | - 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 Narayanamurthy | deeaec72 | 2016-12-22 18:55:25 -0800 | [diff] [blame] | 422 | - 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 Narayanamurthy | 94e6305 | 2017-02-09 18:06:14 -0800 | [diff] [blame] | 431 | - 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 Wu | d10ccf1 | 2017-08-10 15:43:41 +0800 | [diff] [blame] | 452 | - 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 Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 457 | ========================================================== |
| 458 | Second 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 | ======== |
| 477 | Example |
| 478 | ======== |
| 479 | |
Harry Yang | 2452b27 | 2017-03-06 13:56:14 -0800 | [diff] [blame] | 480 | pmi8998_fg: qpnp,fg { |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 481 | compatible = "qcom,fg-gen3"; |
| 482 | #address-cells = <1>; |
| 483 | #size-cells = <1>; |
Harry Yang | 2452b27 | 2017-03-06 13:56:14 -0800 | [diff] [blame] | 484 | qcom,pmic-revid = <&pmi8998_revid>; |
| 485 | io-channels = <&pmi8998_rradc 3>; |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 486 | io-channel-names = "rradc_batt_id"; |
Subbaraman Narayanamurthy | 243fc3f | 2016-11-28 16:05:09 -0800 | [diff] [blame] | 487 | qcom,rradc-base = <0x4500>; |
Subbaraman Narayanamurthy | c1a94ed | 2016-10-05 19:58:58 -0700 | [diff] [blame] | 488 | 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 Narayanamurthy | 94e6305 | 2017-02-09 18:06:14 -0800 | [diff] [blame] | 491 | qcom,slope-limit-temp-threshold = <100>; |
| 492 | qcom,slope-limit-coeffs = <10 11 12 13>; |
cyizhao | fb3eec5 | 2017-01-24 17:08:55 +0800 | [diff] [blame] | 493 | qcom,battery-thermal-coefficients = [9d 50 ff]; |
Subbaraman Narayanamurthy | 8a191dc | 2017-08-18 18:37:01 -0700 | [diff] [blame] | 494 | #thermal-sensor-cells = <0>; |
Subbaraman Narayanamurthy | 6accb26 | 2016-03-14 16:41:16 -0700 | [diff] [blame] | 495 | 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 Narayanamurthy | 8a191dc | 2017-08-18 18:37:01 -0700 | [diff] [blame] | 523 | |
| 524 | ====================================== |
| 525 | Example for thermal zone configuration |
| 526 | ====================================== |
| 527 | |
| 528 | thermal_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 | }; |