Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 1 | Qualcomm Technologies, Inc. SMB2 Charger Specific Bindings |
| 2 | |
| 3 | SMB2 Charger is an efficient programmable battery charger capable of charging a |
| 4 | high-capacity lithium-ion battery over micro-USB or USB Type-C ultrafast with |
| 5 | Quick Charge 2.0, Quick Charge 3.0, and USB Power Delivery support. Wireless |
| 6 | charging features full A4WP Rezence 1.2, WPC 1.2, and PMA support. |
| 7 | |
| 8 | ======================= |
| 9 | Required Node Structure |
| 10 | ======================= |
| 11 | |
| 12 | SMB2 Charger must be described in two levels of devices nodes. |
| 13 | |
| 14 | =============================== |
| 15 | First Level Node - SMB2 Charger |
| 16 | =============================== |
| 17 | |
| 18 | Charger specific properties: |
| 19 | - compatible |
| 20 | Usage: required |
| 21 | Value type: <string> |
| 22 | Definition: "qcom,qpnp-smb2". |
| 23 | |
Harry Yang | f725198 | 2016-09-16 11:14:49 -0700 | [diff] [blame] | 24 | - 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 Troast | 2ebe6c5 | 2016-09-20 13:25:59 -0700 | [diff] [blame] | 30 | - qcom,batteryless-platform |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 31 | Usage: optional |
| 32 | Value type: <empty> |
Nicholas Troast | 2ebe6c5 | 2016-09-20 13:25:59 -0700 | [diff] [blame] | 33 | 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 Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 37 | |
| 38 | - qcom,fcc-max-ua |
| 39 | Usage: optional |
| 40 | Value type: <u32> |
| 41 | Definition: Specifies the maximum fast charge current in micro-amps. |
Abhijeet Dharmapurikar | f9805d4 | 2016-05-17 18:38:42 -0700 | [diff] [blame] | 42 | 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 Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 49 | |
| 50 | - qcom,usb-icl-ua |
| 51 | Usage: optional |
| 52 | Value type: <u32> |
| 53 | Definition: Specifies the USB input current limit in micro-amps. |
Abhijeet Dharmapurikar | f9805d4 | 2016-05-17 18:38:42 -0700 | [diff] [blame] | 54 | If the value is not present, 1.5Amps is used as default. |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 55 | |
Harry Yang | 360bd53 | 2016-09-26 11:03:22 -0700 | [diff] [blame] | 56 | - 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 Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 62 | - qcom,dc-icl-ua |
| 63 | Usage: optional |
| 64 | Value type: <u32> |
| 65 | Definition: Specifies the DC input current limit in micro-amps. |
| 66 | |
Harry Yang | d89ff1f | 2016-12-05 14:59:11 -0800 | [diff] [blame] | 67 | - 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 Dharmapurikar | 5cf5faf | 2016-06-21 14:20:24 -0700 | [diff] [blame] | 73 | - 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 Dharmapurikar | 99fb894 | 2016-07-08 11:39:23 -0700 | [diff] [blame] | 79 | - 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 Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 88 | - 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 Troast | 597acfe | 2016-07-20 16:03:15 -0700 | [diff] [blame] | 104 | - 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 Dharmapurikar | f0b0a04 | 2016-10-10 16:43:43 -0700 | [diff] [blame] | 114 | - 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 Narayanamurthy | 5c4f6de | 2016-11-02 15:25:32 -0700 | [diff] [blame] | 123 | - 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 Narayanamurthy | 851f417 | 2016-11-15 19:39:08 -0800 | [diff] [blame] | 132 | - 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 Jaiswal | 4aa2c0c | 2016-12-07 19:39:38 +0530 | [diff] [blame] | 140 | - qcom,micro-usb |
| 141 | Usage: optional |
| 142 | Value type: <empty> |
| 143 | Definition: Boolean flag which indicates that the platform only support |
| 144 | micro usb port. |
| 145 | |
Ashay Jaiswal | da8669b | 2017-02-10 23:24:23 +0530 | [diff] [blame] | 146 | - qcom,suspend-input-on-debug-batt |
| 147 | Usage: optional |
| 148 | Value type: <empty> |
| 149 | Definition: Boolean flag which when present enables input suspend for |
| 150 | debug battery. |
| 151 | |
Anirudh Ghayal | ca8ce4d | 2017-04-10 08:27:11 +0530 | [diff] [blame] | 152 | - qcom,min-freq-khz |
| 153 | Usage: optional |
| 154 | Value type: <u32> |
| 155 | Definition: Specifies the minimum charger buck/boost switching frequency |
| 156 | in KHz. It overrides the min frequency defined for the charger. |
| 157 | |
| 158 | - qcom,max-freq-khz |
| 159 | Usage: optional |
| 160 | Value type: <u32> |
| 161 | Definition: Specifies the maximum charger buck/boost switching frequency in |
| 162 | KHz. It overrides the max frequency defined for the charger. |
| 163 | |
Ashay Jaiswal | 1bf4133 | 2017-05-03 15:10:25 +0530 | [diff] [blame] | 164 | - qcom,otg-deglitch-time-ms |
| 165 | Usage: optional |
| 166 | Value type: <u32> |
| 167 | Definition: Specifies the deglitch interval for OTG detection. |
| 168 | If the value is not present, 50 msec is used as default. |
| 169 | |
Anirudh Ghayal | 9d0196d | 2017-07-23 23:02:48 +0530 | [diff] [blame] | 170 | - qcom,step-charging-enable |
| 171 | Usage: optional |
| 172 | Value type: bool |
| 173 | Definition: Boolean flag which when present enables step-charging. |
| 174 | |
| 175 | - qcom,wd-bark-time-secs |
| 176 | Usage: optional |
| 177 | Value type: <u32> |
| 178 | Definition: WD bark-timeout in seconds. The possible values are |
| 179 | 16, 32, 64, 128. If not defined it defaults to 64. |
| 180 | |
Ashay Jaiswal | 9aba44a | 2017-07-20 17:41:36 +0530 | [diff] [blame] | 181 | - qcom,sw-jeita-enable |
| 182 | Usage: optional |
| 183 | Value type: bool |
| 184 | Definition: Boolean flag which when present enables sw compensation for jeita |
Anirudh Ghayal | 9d0196d | 2017-07-23 23:02:48 +0530 | [diff] [blame] | 185 | |
Fenglin Wu | dd8f4cb | 2017-10-17 11:09:46 +0800 | [diff] [blame^] | 186 | - qcom,battery-data |
| 187 | Usage: optional |
| 188 | Value type: <u32> |
| 189 | Definition: Specifies the phandle of the node which contains the battery |
| 190 | profiles supported on the device. This is only specified |
| 191 | when step charging and sw-jeita configurations are desired |
| 192 | to be get from these properties defined in battery profile: |
| 193 | qcom,step-chg-ranges, qcom,jeita-fcc-ranges, qcom,jeita-fv-ranges. |
| 194 | |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 195 | ============================================= |
| 196 | Second Level Nodes - SMB2 Charger Peripherals |
| 197 | ============================================= |
| 198 | |
| 199 | Peripheral specific properties: |
| 200 | - reg |
| 201 | Usage: required |
| 202 | Value type: <prop-encoded-array> |
| 203 | Definition: Address and size of the peripheral's register block. |
| 204 | |
| 205 | - interrupts |
| 206 | Usage: required |
| 207 | Value type: <prop-encoded-array> |
| 208 | Definition: Peripheral interrupt specifier. |
| 209 | |
| 210 | - interrupt-names |
| 211 | Usage: required |
| 212 | Value type: <stringlist> |
| 213 | Definition: Interrupt names. This list must match up 1-to-1 with the |
| 214 | interrupts specified in the 'interrupts' property. |
| 215 | |
| 216 | ======= |
| 217 | Example |
| 218 | ======= |
| 219 | |
Harry Yang | 2452b27 | 2017-03-06 13:56:14 -0800 | [diff] [blame] | 220 | pmi8998_charger: qcom,qpnp-smb2 { |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 221 | compatible = "qcom,qpnp-smb2"; |
| 222 | #address-cells = <1>; |
| 223 | #size-cells = <1>; |
| 224 | |
Harry Yang | ba874ce | 2016-08-19 14:17:01 -0700 | [diff] [blame] | 225 | io-channels = <&pmic_rradc 0>; |
| 226 | io-channel-names = "rradc_batt_id"; |
| 227 | |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 228 | dpdm-supply = <&qusb_phy0>; |
| 229 | |
Nicholas Troast | 9688605 | 2016-02-25 15:42:17 -0800 | [diff] [blame] | 230 | qcom,chgr@1000 { |
| 231 | reg = <0x1000 0x100>; |
| 232 | interrupts = <0x2 0x10 0x0 IRQ_TYPE_NONE>, |
| 233 | <0x2 0x10 0x1 IRQ_TYPE_NONE>, |
| 234 | <0x2 0x10 0x2 IRQ_TYPE_NONE>, |
| 235 | <0x2 0x10 0x3 IRQ_TYPE_NONE>, |
| 236 | <0x2 0x10 0x4 IRQ_TYPE_NONE>; |
| 237 | |
| 238 | interrupt-names = "chg-error", |
| 239 | "chg-state-change", |
| 240 | "step-chg-state-change", |
| 241 | "step-chg-soc-update-fail", |
| 242 | "step-chg-soc-update-request"; |
| 243 | }; |
| 244 | |
| 245 | qcom,otg@1100 { |
| 246 | reg = <0x1100 0x100>; |
| 247 | interrupts = <0x2 0x11 0x0 IRQ_TYPE_NONE>, |
| 248 | <0x2 0x11 0x1 IRQ_TYPE_NONE>, |
| 249 | <0x2 0x11 0x2 IRQ_TYPE_NONE>, |
| 250 | <0x2 0x11 0x3 IRQ_TYPE_NONE>; |
| 251 | |
| 252 | interrupt-names = "otg-fail", |
| 253 | "otg-overcurrent", |
| 254 | "otg-oc-dis-sw-sts", |
| 255 | "testmode-change-detect"; |
| 256 | }; |
| 257 | |
| 258 | qcom,bat-if@1200 { |
| 259 | reg = <0x1200 0x100>; |
| 260 | interrupts = <0x2 0x12 0x0 IRQ_TYPE_NONE>, |
| 261 | <0x2 0x12 0x1 IRQ_TYPE_NONE>, |
| 262 | <0x2 0x12 0x2 IRQ_TYPE_NONE>, |
| 263 | <0x2 0x12 0x3 IRQ_TYPE_NONE>, |
| 264 | <0x2 0x12 0x4 IRQ_TYPE_NONE>, |
| 265 | <0x2 0x12 0x5 IRQ_TYPE_NONE>; |
| 266 | |
| 267 | interrupt-names = "bat-temp", |
| 268 | "bat-ocp", |
| 269 | "bat-ov", |
| 270 | "bat-low", |
| 271 | "bat-therm-or-id-missing", |
| 272 | "bat-terminal-missing"; |
| 273 | }; |
| 274 | |
| 275 | qcom,usb-chgpth@1300 { |
| 276 | reg = <0x1300 0x100>; |
| 277 | interrupts = <0x2 0x13 0x0 IRQ_TYPE_NONE>, |
| 278 | <0x2 0x13 0x1 IRQ_TYPE_NONE>, |
| 279 | <0x2 0x13 0x2 IRQ_TYPE_NONE>, |
| 280 | <0x2 0x13 0x3 IRQ_TYPE_NONE>, |
| 281 | <0x2 0x13 0x4 IRQ_TYPE_NONE>, |
| 282 | <0x2 0x13 0x5 IRQ_TYPE_NONE>, |
| 283 | <0x2 0x13 0x6 IRQ_TYPE_NONE>, |
| 284 | <0x2 0x13 0x7 IRQ_TYPE_NONE>; |
| 285 | |
| 286 | interrupt-names = "usbin-collapse", |
| 287 | "usbin-lt-3p6v", |
| 288 | "usbin-uv", |
| 289 | "usbin-ov", |
| 290 | "usbin-plugin", |
| 291 | "usbin-src-change", |
| 292 | "usbin-icl-change", |
| 293 | "type-c-change"; |
| 294 | }; |
| 295 | |
| 296 | qcom,dc-chgpth@1400 { |
| 297 | reg = <0x1400 0x100>; |
| 298 | interrupts = <0x2 0x14 0x0 IRQ_TYPE_NONE>, |
| 299 | <0x2 0x14 0x1 IRQ_TYPE_NONE>, |
| 300 | <0x2 0x14 0x2 IRQ_TYPE_NONE>, |
| 301 | <0x2 0x14 0x3 IRQ_TYPE_NONE>, |
| 302 | <0x2 0x14 0x4 IRQ_TYPE_NONE>, |
| 303 | <0x2 0x14 0x5 IRQ_TYPE_NONE>, |
| 304 | <0x2 0x14 0x6 IRQ_TYPE_NONE>; |
| 305 | |
| 306 | interrupt-names = "dcin-collapse", |
| 307 | "dcin-lt-3p6v", |
| 308 | "dcin-uv", |
| 309 | "dcin-ov", |
| 310 | "dcin-plugin", |
| 311 | "div2-en-dg", |
| 312 | "dcin-icl-change"; |
| 313 | }; |
| 314 | |
| 315 | qcom,chgr-misc@1600 { |
| 316 | reg = <0x1600 0x100>; |
| 317 | interrupts = <0x2 0x16 0x0 IRQ_TYPE_NONE>, |
| 318 | <0x2 0x16 0x1 IRQ_TYPE_NONE>, |
| 319 | <0x2 0x16 0x2 IRQ_TYPE_NONE>, |
| 320 | <0x2 0x16 0x3 IRQ_TYPE_NONE>, |
| 321 | <0x2 0x16 0x4 IRQ_TYPE_NONE>, |
| 322 | <0x2 0x16 0x5 IRQ_TYPE_NONE>, |
| 323 | <0x2 0x16 0x6 IRQ_TYPE_NONE>, |
| 324 | <0x2 0x16 0x7 IRQ_TYPE_NONE>; |
| 325 | |
| 326 | interrupt-names = "wdog-snarl", |
| 327 | "wdog-bark", |
| 328 | "aicl-fail", |
| 329 | "aicl-done", |
| 330 | "high-duty-cycle", |
| 331 | "input-current-limiting", |
| 332 | "temperature-change", |
| 333 | "switcher-power-ok"; |
| 334 | }; |
| 335 | }; |