blob: f4a22e05017daabd2d7c153bb020f9c9e02f1737 [file] [log] [blame]
Nicholas Troast96886052016-02-25 15:42:17 -08001Qualcomm Technologies, Inc. SMB2 Charger Specific Bindings
2
3SMB2 Charger is an efficient programmable battery charger capable of charging a
4high-capacity lithium-ion battery over micro-USB or USB Type-C ultrafast with
5Quick Charge 2.0, Quick Charge 3.0, and USB Power Delivery support. Wireless
6charging features full A4WP Rezence 1.2, WPC 1.2, and PMA support.
7
8=======================
9Required Node Structure
10=======================
11
12SMB2 Charger must be described in two levels of devices nodes.
13
14===============================
15First Level Node - SMB2 Charger
16===============================
17
18Charger specific properties:
19- compatible
20 Usage: required
21 Value type: <string>
22 Definition: "qcom,qpnp-smb2".
23
Harry Yangf7251982016-09-16 11:14:49 -070024- 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 Troast2ebe6c52016-09-20 13:25:59 -070030- qcom,batteryless-platform
Nicholas Troast96886052016-02-25 15:42:17 -080031 Usage: optional
32 Value type: <empty>
Nicholas Troast2ebe6c52016-09-20 13:25:59 -070033 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 Troast96886052016-02-25 15:42:17 -080037
Nicholas Troast8995a702016-12-05 10:22:22 -080038- qcom,external-vconn
39 Usage: optional
40 Value type: <empty>
41 Definition: Boolean flag which indicates VCONN is sourced externally.
42
Nicholas Troast96886052016-02-25 15:42:17 -080043- qcom,fcc-max-ua
44 Usage: optional
45 Value type: <u32>
46 Definition: Specifies the maximum fast charge current in micro-amps.
Abhijeet Dharmapurikarf9805d42016-05-17 18:38:42 -070047 If the value is not present, 1Amp is used as default.
48
49- qcom,fv-max-uv
50 Usage: optional
51 Value type: <u32>
52 Definition: Specifies the maximum float voltage in micro-volts.
53 If the value is not present, 4.35V is used as default.
Nicholas Troast96886052016-02-25 15:42:17 -080054
55- qcom,usb-icl-ua
56 Usage: optional
57 Value type: <u32>
58 Definition: Specifies the USB input current limit in micro-amps.
Abhijeet Dharmapurikarf9805d42016-05-17 18:38:42 -070059 If the value is not present, 1.5Amps is used as default.
Nicholas Troast96886052016-02-25 15:42:17 -080060
Harry Yang360bd532016-09-26 11:03:22 -070061- qcom,usb-ocl-ua
62 Usage: optional
63 Value type: <u32>
64 Definition: Specifies the OTG output current limit in micro-amps.
65 If the value is not present, 1.5Amps is used as default
66
Nicholas Troast96886052016-02-25 15:42:17 -080067- qcom,dc-icl-ua
68 Usage: optional
69 Value type: <u32>
70 Definition: Specifies the DC input current limit in micro-amps.
71
Harry Yangd89ff1f2016-12-05 14:59:11 -080072- qcom,boost-threshold-ua
73 Usage: optional
74 Value type: <u32>
75 Definition: Specifies the boost current threshold in micro-amps.
76 If the value is not present, 100mA is used as default.
77
Abhijeet Dharmapurikar5cf5faf2016-06-21 14:20:24 -070078- qcom,wipower-max-uw
79 Usage: optional
80 Value type: <u32>
81 Definition: Specifies the DC input power limit in micro-watts.
82 If the value is not present, 8W is used as default.
83
Abhijeet Dharmapurikar99fb8942016-07-08 11:39:23 -070084- qcom,thermal-mitigation
85 Usage: optional
86 Value type: Array of <u32>
87 Definition: Array of fast charge current limit values for
88 different system thermal mitigation levels.
89 This should be a flat array that denotes the
90 maximum charge current in mA for each thermal
91 level.
92
Harry Yangfe913842016-08-10 12:27:28 -070093- qcom,step-soc-thresholds
94 Usage: optional
95 Value type: Array of <u32>
96 Definition: Array of SOC threshold values, size of 4. This should be a
97 flat array that denotes the percentage ranging from 0 to 100.
98 If the array is not present, step charging is disabled.
99
100- qcom,step-current-deltas
101 Usage: optional
102 Value type: Array of <s32>
103 Definition: Array of delta values for charging current, size of 5, with
104 FCC as base. This should be a flat array that denotes the
105 offset of charging current in uA, from -3100000 to 3200000.
106 If the array is not present, step charging is disabled.
107
Harry Yangba874ce2016-08-19 14:17:01 -0700108- io-channels
109 Usage: optional
110 Value type: List of <phandle u32>
111 Definition: List of phandle and IIO specifier pairs, one pair
112 for each IIO input to the device. Note: if the
113 IIO provider specifies '0' for #io-channel-cells,
114 then only the phandle portion of the pair will appear.
115
116- io-channel-names
117 Usage: optional
118 Value type: List of <string>
119 Definition: List of IIO input name strings sorted in the same
120 order as the io-channels property. Consumer drivers
121 will use io-channel-names to match IIO input names
122 with IIO specifiers.
123
Nicholas Troast597acfe2016-07-20 16:03:15 -0700124- qcom,float-option
125 Usage: optional
126 Value type: <u32>
127 Definition: Configures how the charger behaves when a float charger is
128 detected by APSD
129 1 - Treat as a DCP
130 2 - Treat as a SDP
131 3 - Disable charging
132 4 - Suspend USB input
133
Abhijeet Dharmapurikarf0b0a042016-10-10 16:43:43 -0700134- qcom,hvdcp-disable
135 Usage: optional
136 Value type: <empty>
137 Definition: Specifies if hvdcp charging is to be enabled or not.
138 If this property is not specified hvdcp will be enabled.
139 If this property is specified, hvdcp 2.0 detection will still
140 happen but the adapter won't be asked to switch to a higher
141 voltage point.
142
Subbaraman Narayanamurthy5c4f6de2016-11-02 15:25:32 -0700143- qcom,chg-inhibit-threshold-mv
144 Usage: optional
145 Value type: <u32>
146 Definition: Charge inhibit threshold in milli-volts. Charging will be
147 inhibited when the battery voltage is within this threshold
148 from Vfloat at charger insertion. If this is not specified
149 then charge inhibit will be disabled by default.
150 Allowed values are: 50, 100, 200, 300.
151
Subbaraman Narayanamurthy851f4172016-11-15 19:39:08 -0800152- qcom,auto-recharge-soc
153 Usage: optional
154 Value type: <empty>
155 Definition: Specifies if automatic recharge needs to be based off battery
156 SOC. If this property is not specified, then auto recharge will
157 be based off battery voltage. For both SOC and battery voltage,
158 charger receives the signal from FG to resume charging.
159
Ashay Jaiswal4aa2c0c2016-12-07 19:39:38 +0530160- qcom,micro-usb
161 Usage: optional
162 Value type: <empty>
163 Definition: Boolean flag which indicates that the platform only support
164 micro usb port.
165
Ashay Jaiswalda8669b2017-02-10 23:24:23 +0530166- qcom,suspend-input-on-debug-batt
167 Usage: optional
168 Value type: <empty>
169 Definition: Boolean flag which when present enables input suspend for
170 debug battery.
171
Nicholas Troast96886052016-02-25 15:42:17 -0800172=============================================
173Second Level Nodes - SMB2 Charger Peripherals
174=============================================
175
176Peripheral specific properties:
177- reg
178 Usage: required
179 Value type: <prop-encoded-array>
180 Definition: Address and size of the peripheral's register block.
181
182- interrupts
183 Usage: required
184 Value type: <prop-encoded-array>
185 Definition: Peripheral interrupt specifier.
186
187- interrupt-names
188 Usage: required
189 Value type: <stringlist>
190 Definition: Interrupt names. This list must match up 1-to-1 with the
191 interrupts specified in the 'interrupts' property.
192
193=======
194Example
195=======
196
Harry Yang2452b272017-03-06 13:56:14 -0800197pmi8998_charger: qcom,qpnp-smb2 {
Nicholas Troast96886052016-02-25 15:42:17 -0800198 compatible = "qcom,qpnp-smb2";
199 #address-cells = <1>;
200 #size-cells = <1>;
201
Harry Yangba874ce2016-08-19 14:17:01 -0700202 io-channels = <&pmic_rradc 0>;
203 io-channel-names = "rradc_batt_id";
204
Nicholas Troast96886052016-02-25 15:42:17 -0800205 dpdm-supply = <&qusb_phy0>;
206
Harry Yangfe913842016-08-10 12:27:28 -0700207 qcom,step-soc-thresholds = <60 70 80 90>;
208 qcom,step-current-deltas = <500000 250000 150000 0 (-150000)>;
209
Nicholas Troast96886052016-02-25 15:42:17 -0800210 qcom,chgr@1000 {
211 reg = <0x1000 0x100>;
212 interrupts = <0x2 0x10 0x0 IRQ_TYPE_NONE>,
213 <0x2 0x10 0x1 IRQ_TYPE_NONE>,
214 <0x2 0x10 0x2 IRQ_TYPE_NONE>,
215 <0x2 0x10 0x3 IRQ_TYPE_NONE>,
216 <0x2 0x10 0x4 IRQ_TYPE_NONE>;
217
218 interrupt-names = "chg-error",
219 "chg-state-change",
220 "step-chg-state-change",
221 "step-chg-soc-update-fail",
222 "step-chg-soc-update-request";
223 };
224
225 qcom,otg@1100 {
226 reg = <0x1100 0x100>;
227 interrupts = <0x2 0x11 0x0 IRQ_TYPE_NONE>,
228 <0x2 0x11 0x1 IRQ_TYPE_NONE>,
229 <0x2 0x11 0x2 IRQ_TYPE_NONE>,
230 <0x2 0x11 0x3 IRQ_TYPE_NONE>;
231
232 interrupt-names = "otg-fail",
233 "otg-overcurrent",
234 "otg-oc-dis-sw-sts",
235 "testmode-change-detect";
236 };
237
238 qcom,bat-if@1200 {
239 reg = <0x1200 0x100>;
240 interrupts = <0x2 0x12 0x0 IRQ_TYPE_NONE>,
241 <0x2 0x12 0x1 IRQ_TYPE_NONE>,
242 <0x2 0x12 0x2 IRQ_TYPE_NONE>,
243 <0x2 0x12 0x3 IRQ_TYPE_NONE>,
244 <0x2 0x12 0x4 IRQ_TYPE_NONE>,
245 <0x2 0x12 0x5 IRQ_TYPE_NONE>;
246
247 interrupt-names = "bat-temp",
248 "bat-ocp",
249 "bat-ov",
250 "bat-low",
251 "bat-therm-or-id-missing",
252 "bat-terminal-missing";
253 };
254
255 qcom,usb-chgpth@1300 {
256 reg = <0x1300 0x100>;
257 interrupts = <0x2 0x13 0x0 IRQ_TYPE_NONE>,
258 <0x2 0x13 0x1 IRQ_TYPE_NONE>,
259 <0x2 0x13 0x2 IRQ_TYPE_NONE>,
260 <0x2 0x13 0x3 IRQ_TYPE_NONE>,
261 <0x2 0x13 0x4 IRQ_TYPE_NONE>,
262 <0x2 0x13 0x5 IRQ_TYPE_NONE>,
263 <0x2 0x13 0x6 IRQ_TYPE_NONE>,
264 <0x2 0x13 0x7 IRQ_TYPE_NONE>;
265
266 interrupt-names = "usbin-collapse",
267 "usbin-lt-3p6v",
268 "usbin-uv",
269 "usbin-ov",
270 "usbin-plugin",
271 "usbin-src-change",
272 "usbin-icl-change",
273 "type-c-change";
274 };
275
276 qcom,dc-chgpth@1400 {
277 reg = <0x1400 0x100>;
278 interrupts = <0x2 0x14 0x0 IRQ_TYPE_NONE>,
279 <0x2 0x14 0x1 IRQ_TYPE_NONE>,
280 <0x2 0x14 0x2 IRQ_TYPE_NONE>,
281 <0x2 0x14 0x3 IRQ_TYPE_NONE>,
282 <0x2 0x14 0x4 IRQ_TYPE_NONE>,
283 <0x2 0x14 0x5 IRQ_TYPE_NONE>,
284 <0x2 0x14 0x6 IRQ_TYPE_NONE>;
285
286 interrupt-names = "dcin-collapse",
287 "dcin-lt-3p6v",
288 "dcin-uv",
289 "dcin-ov",
290 "dcin-plugin",
291 "div2-en-dg",
292 "dcin-icl-change";
293 };
294
295 qcom,chgr-misc@1600 {
296 reg = <0x1600 0x100>;
297 interrupts = <0x2 0x16 0x0 IRQ_TYPE_NONE>,
298 <0x2 0x16 0x1 IRQ_TYPE_NONE>,
299 <0x2 0x16 0x2 IRQ_TYPE_NONE>,
300 <0x2 0x16 0x3 IRQ_TYPE_NONE>,
301 <0x2 0x16 0x4 IRQ_TYPE_NONE>,
302 <0x2 0x16 0x5 IRQ_TYPE_NONE>,
303 <0x2 0x16 0x6 IRQ_TYPE_NONE>,
304 <0x2 0x16 0x7 IRQ_TYPE_NONE>;
305
306 interrupt-names = "wdog-snarl",
307 "wdog-bark",
308 "aicl-fail",
309 "aicl-done",
310 "high-duty-cycle",
311 "input-current-limiting",
312 "temperature-change",
313 "switcher-power-ok";
314 };
315};