David Keitel | 8066895 | 2012-07-27 14:25:49 -0700 | [diff] [blame] | 1 | Qualcomm QPNP Charger |
| 2 | |
| 3 | The charger supports the switch mode battery charger and boost (SMBB) |
| 4 | peripherals on Qualcomm PMIC chips. |
| 5 | |
| 6 | There are seven different peripherals adding the following functionality. |
| 7 | Each of these peripherals are implemented as subnodes in the example at the |
| 8 | end of this file. |
| 9 | |
| 10 | - qcom,chg-chgr: Supports charging control and status |
| 11 | reporting. |
| 12 | - qcom,chg-bat-if: Battery status reporting such as presence, |
| 13 | temperature reporting and voltage collapse |
| 14 | protection. |
| 15 | - qcom,chg-buck: Charger buck configuration and status |
| 16 | reporting with regards to several regulation |
| 17 | loops such as vdd, ibat etc. |
| 18 | - qcom,usb-chgpth: USB charge path detection and input current |
| 19 | limiting configuration. |
| 20 | - qcom,dc-chgpth: DC charge path detection and input current |
| 21 | limiting configuration. |
| 22 | - qcom,chg-misc: Miscellaneous features such as buck frequency |
| 23 | settings, comparator override features etc. |
| 24 | |
| 25 | Parent node required properties: |
| 26 | - qcom,chg-vddmax-mv: Target voltage of battery in mV |
| 27 | - qcom,chg-vddsafe-mv: Maximum Vdd voltage in mV |
| 28 | - qcom,chg-vinmin-mv: Minimum input voltage in mV |
| 29 | - qcom,chg-ibatmax-ma: Maximum battery charge current in mA |
| 30 | - qcom,chg-ibatterm-ma: Current at which charging is terminated in mA. |
| 31 | |
| 32 | Sub node required structure: |
| 33 | - A qcom,chg node must be a child of an SPMI node that has specified |
| 34 | the spmi-dev-container property. Each subnode reflects |
| 35 | a hardware peripheral which adds a unique set of features |
| 36 | to the collective charging device. For example USB detection |
| 37 | and the battery interface are each seperate peripherals and |
| 38 | each should be their own subnode. |
| 39 | |
| 40 | Sub node required properties: |
| 41 | - compatible: Must be "qcom,charger". |
| 42 | - reg: Specifies the SPMI address and size for this peripheral. |
| 43 | - interrupts: Specifies the interrupt associated with the peripheral. |
| 44 | - interrupt-names: Specifies the interrupt names for the peripheral. Every |
| 45 | available interrupt needs to have an associated name |
| 46 | with it to indentify its purpose. |
| 47 | |
| 48 | The following lists each subnode and their corresponding |
| 49 | required interrupt names: |
| 50 | |
| 51 | qcom,usb-chgpth: |
| 52 | - usbin-valid |
| 53 | qcom,chg-chgr: |
| 54 | - chg-done |
| 55 | - chg-failed |
| 56 | |
| 57 | The following interrupts are available: |
| 58 | |
| 59 | qcom,chg-chgr: |
| 60 | - chg-done: Triggers on charge completion. |
| 61 | - chg-failed: Notifies of charge failures. |
| 62 | - fast-chg-on: Notifies of fast charging state. |
| 63 | - trkl-chg-on: Indicates trickle charging. |
| 64 | - state-change: Notifies of a state change in |
| 65 | the charger state machine. |
| 66 | - chgwdog: Charger watchdog interrupt. |
| 67 | - vbat-det-hi: Triggers on vbat-det-hi voltage |
| 68 | setting,can be used as |
| 69 | battery alarm. |
| 70 | - vbat-det-hi: Triggers on vbat-det-low voltage |
| 71 | setting, can be used as |
| 72 | battery alarm. |
| 73 | |
| 74 | qcom,chg-buck: |
| 75 | - vdd-loop: VDD loop change interrupt. |
| 76 | - ibat-loop: Ibat loop change interrupt. |
| 77 | - ichg-loop: Charge current loop change. |
| 78 | - vchg-loop: Charge voltage loop change. |
| 79 | - overtemp: Overtemperature interrupt. |
| 80 | - vref-ov: Reference overvoltage interrupt. |
| 81 | - vbat-ov: Battery overvoltage interrupt. |
| 82 | |
| 83 | qcom,chg-bat-if: |
| 84 | - psi: PMIC serial interface interrupt. |
| 85 | - vcp-on: Voltage collapse protection |
| 86 | status interrupt. |
| 87 | - bat-fet-on: BATFET status interrupt. |
| 88 | - bat-temp-ok: Battery temperature status |
| 89 | interrupt. |
| 90 | - batt-pres: Battery presence status |
| 91 | interrupt. |
| 92 | |
| 93 | qcom,usb-chgpth: |
| 94 | - usbin-valid: Indicates valid USB connection. |
| 95 | - coarse-det-usb: Coarse detect interrupt triggers |
| 96 | at low voltage on USB_IN. |
| 97 | - chg-gone: Triggers on VCHG line. |
| 98 | |
| 99 | qcom,dc-chgpth: |
| 100 | - dcin-valid: Indicates a valid DC charger |
| 101 | connection. |
| 102 | - coarse-det-dc: Coarse detect interrupt triggers |
| 103 | at low voltage on DC_IN. |
| 104 | |
| 105 | qcom,boost: |
| 106 | - limit-error: Limiting error on SMBB boost. |
| 107 | - boost-pwr-ok: Status of boost power. |
| 108 | |
| 109 | Example: |
| 110 | pm8941-chg { |
| 111 | spmi-dev-container; |
| 112 | compatible = "qcom,charger"; |
| 113 | #address-cells = <1>; |
| 114 | #size-cells = <1>; |
| 115 | |
| 116 | qcom,chg-vddmax-mv = <4200>; |
| 117 | qcom,chg-vddsafe-mv = <4200>; |
| 118 | qcom,chg-vinmin-mv = <4200>; |
| 119 | qcom,chg-ibatmax-mv = <1500>; |
| 120 | qcom,chg-ibatterm-mv = <200>; |
| 121 | |
| 122 | qcom,chg-chgr@1000 { |
| 123 | reg = <0x1000 0x100>; |
| 124 | interrupts = <0x0 0x10 0x0>, |
| 125 | <0x0 0x10 0x1>, |
| 126 | <0x0 0x10 0x2>, |
| 127 | <0x0 0x10 0x3>, |
| 128 | <0x0 0x10 0x4>, |
| 129 | <0x0 0x10 0x5>, |
| 130 | <0x0 0x10 0x6>, |
| 131 | <0x0 0x10 0x7>; |
| 132 | |
| 133 | interrupt-names = "chg-done", |
| 134 | "chg-failed", |
| 135 | "fast-chg-on", |
| 136 | "trkl-chg-on", |
| 137 | "state-change", |
| 138 | "chgwdog", |
| 139 | "vbat-det-hi", |
| 140 | "vbat-det-lo"; |
| 141 | }; |
| 142 | |
| 143 | qcom,chg-buck@1100 { |
| 144 | reg = <0x1100 0x100>; |
| 145 | interrupts = <0x0 0x11 0x0>, |
| 146 | <0x0 0x11 0x1>, |
| 147 | <0x0 0x11 0x2>, |
| 148 | <0x0 0x11 0x3>, |
| 149 | <0x0 0x11 0x4>, |
| 150 | <0x0 0x11 0x5>, |
| 151 | <0x0 0x11 0x6>; |
| 152 | |
| 153 | interrupt-names = "vdd-loop", |
| 154 | "ibat-loop", |
| 155 | "ichg-loop", |
| 156 | "vchg-loop", |
| 157 | "overtemp", |
| 158 | "vref-ov", |
| 159 | "vbat-ov"; |
| 160 | }; |
| 161 | |
| 162 | qcom,chg-bat-if@1200 { |
| 163 | reg = <0x1200 0x100>; |
| 164 | interrupts = <0x0 0x12 0x0>, |
| 165 | <0x0 0x12 0x1>, |
| 166 | <0x0 0x12 0x2>, |
| 167 | <0x0 0x12 0x3>, |
| 168 | <0x0 0x12 0x4>; |
| 169 | |
| 170 | interrupt-names = "psi", |
| 171 | "vcp-on", |
| 172 | "bat-fet-on", |
| 173 | "bat-temp-ok", |
| 174 | "batt-pres"; |
| 175 | }; |
| 176 | |
| 177 | qcom,chg-usb-chgpth@1300 { |
| 178 | reg = <0x1300 0x100>; |
| 179 | interrupts = <0 0x13 0x0>, |
| 180 | <0 0x13 0x1>, |
| 181 | <0x0 0x13 0x2>; |
| 182 | |
| 183 | interrupt-names = "usbin-valid", |
| 184 | "coarse-det-usb", |
| 185 | "chg-gone"; |
| 186 | }; |
| 187 | |
| 188 | qcom,chg-dc-chgpth@1400 { |
| 189 | reg = <0x1400 0x100>; |
| 190 | interrupts = <0x0 0x14 0x0>, |
| 191 | <0x0 0x14 0x1>; |
| 192 | |
| 193 | interrupt-names = "dcin-valid", |
| 194 | "coarse-det-dc"; |
| 195 | }; |
| 196 | |
| 197 | qcom,chg-boost@1500 { |
| 198 | reg = <0x1500 0x100>; |
| 199 | interrupts = <0x0 0x15 0x0>, |
| 200 | <0x0 0x15 0x1>; |
| 201 | |
| 202 | interrupt-names = "limit-error", |
| 203 | "boost-pwr-ok"; |
| 204 | }; |
| 205 | |
| 206 | qcom,chg-misc@1600 { |
| 207 | reg = <0x1600 0x100>; |
| 208 | }; |
| 209 | }; |