blob: 8e17f80be6578f2b554132171331f02de3b38883 [file] [log] [blame]
Harry Yang4b7db0f2017-11-27 10:50:44 -08001Qualcomm Technologies, Inc. SMB5 Charger Specific Bindings
2
3SMB5 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
12SMB5 Charger must be described in two levels of devices nodes.
13
14===============================
15First Level Node - SMB5 Charger
16===============================
17
18Charger specific properties:
19- compatible
20 Usage: required
21 Value type: <string>
22 Definition: "qcom,qpnp-smb5".
23
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
30- qcom,batteryless-platform
31 Usage: optional
32 Value type: <empty>
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.
37
38- qcom,fcc-max-ua
39 Usage: optional
40 Value type: <u32>
41 Definition: Specifies the maximum fast charge current in micro-amps.
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.
49
50- qcom,usb-icl-ua
51 Usage: optional
52 Value type: <u32>
53 Definition: Specifies the USB input current limit in micro-amps.
54 If the value is not present, 1.5Amps is used as default.
55
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
62- qcom,dc-icl-ua
63 Usage: optional
64 Value type: <u32>
65 Definition: Specifies the DC input current limit in micro-amps.
66
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
73- qcom,thermal-mitigation
74 Usage: optional
75 Value type: Array of <u32>
76 Definition: Array of fast charge current limit values for
77 different system thermal mitigation levels.
78 This should be a flat array that denotes the
79 maximum charge current in mA for each thermal
80 level.
81
82- qcom,float-option
83 Usage: optional
84 Value type: <u32>
85 Definition: Configures how the charger behaves when a float charger is
86 detected by APSD.
87 1 - Treat as a DCP.
88 2 - Treat as a SDP.
89 3 - Disable charging.
90 4 - Suspend USB input.
91
92- qcom,hvdcp-disable
93 Usage: optional
94 Value type: <empty>
95 Definition: Specifies if hvdcp charging is to be enabled or not.
96 If this property is not specified hvdcp will be enabled.
97 If this property is specified, hvdcp 2.0 detection will still
98 happen but the adapter won't be asked to switch to a higher
99 voltage point.
100
101- qcom,chg-inhibit-threshold-mv
102 Usage: optional
103 Value type: <u32>
104 Definition: Charge inhibit threshold in milli-volts. Charging will be
105 inhibited when the battery voltage is within this threshold
106 from Vfloat at charger insertion. If this is not specified
107 then charge inhibit will be disabled by default.
108 Allowed values are: 50, 100, 200, 300.
109
110- qcom,auto-recharge-soc
111 Usage: optional
112 Value type: <empty>
113 Definition: Specifies if automatic recharge needs to be based off battery
114 SOC. If this property is not specified, then auto recharge will
115 be based off battery voltage.
116
117- qcom,micro-usb
118 Usage: optional
119 Value type: <empty>
120 Definition: Boolean flag which indicates that the platform only support
121 micro usb port.
122
123- qcom,suspend-input-on-debug-batt
124 Usage: optional
125 Value type: <empty>
126 Definition: Boolean flag which when present enables input suspend for
127 debug battery.
128
129- qcom,min-freq-khz
130 Usage: optional
131 Value type: <u32>
132 Definition: Specifies the minimum charger buck/boost switching frequency
133 in KHz. It overrides the min frequency defined for the charger.
134
135- qcom,max-freq-khz
136 Usage: optional
137 Value type: <u32>
138 Definition: Specifies the maximum charger buck/boost switching frequency in
139 KHz. It overrides the max frequency defined for the charger.
140
141- qcom,otg-deglitch-time-ms
142 Usage: optional
143 Value type: <u32>
144 Definition: Specifies the deglitch interval for OTG detection.
145 If the value is not present, 50 msec is used as default.
146
147- qcom,step-charging-enable
148 Usage: optional
149 Value type: bool
150 Definition: Boolean flag which when present enables step-charging.
151
152- qcom,wd-bark-time-secs
153 Usage: optional
154 Value type: <u32>
155 Definition: WD bark-timeout in seconds. The possible values are
156 16, 32, 64, 128. If not defined it defaults to 64.
157
158- qcom,sw-jeita-enable
159 Usage: optional
160 Value type: bool
161 Definition: Boolean flag which when present enables sw compensation for
162 jeita.
163
164- qcom,battery-data
165 Usage: optional
166 Value type: <phandle>
167 Definition: Specifies the phandle of the node which contains the battery
168 profiles supported on the device. This is only specified
169 when step charging and sw-jeita configurations are desired
170 to be get from these properties defined in battery profile:
171 qcom,step-chg-ranges, qcom,jeita-fcc-ranges, qcom,jeita-fv-ranges.
172
173=============================================
174Second Level Nodes - SMB5 Charger Peripherals
175=============================================
176
177Peripheral specific properties:
178- reg
179 Usage: required
180 Value type: <prop-encoded-array>
181 Definition: Address and size of the peripheral's register block.
182
183- interrupts
184 Usage: required
185 Value type: <prop-encoded-array>
186 Definition: Peripheral interrupt specifier.
187
188- interrupt-names
189 Usage: required
190 Value type: <stringlist>
191 Definition: Interrupt names. This list must match up 1-to-1 with the
192 interrupts specified in the 'interrupts' property.
193
194=======
195Example
196=======
197
198pmi8998_charger: qcom,qpnp-smb5 {
199 compatible = "qcom,qpnp-smb5";
200 #address-cells = <1>;
201 #size-cells = <1>;
202
203 dpdm-supply = <&qusb_phy0>;
204
205 qcom,chgr@1000 {
206 reg = <0x1000 0x100>;
207 interrupts = <0x2 0x10 0x0 IRQ_TYPE_NONE>,
208 <0x2 0x10 0x1 IRQ_TYPE_NONE>,
209 <0x2 0x10 0x2 IRQ_TYPE_NONE>,
210 <0x2 0x10 0x3 IRQ_TYPE_NONE>,
211 <0x2 0x10 0x4 IRQ_TYPE_NONE>;
212
213 interrupt-names = "chg-error",
214 "chg-state-change",
215 "step-chg-state-change",
216 "step-chg-soc-update-fail",
217 "step-chg-soc-update-request";
218 };
219
220 qcom,otg@1100 {
221 reg = <0x1100 0x100>;
222 interrupts = <0x2 0x11 0x0 IRQ_TYPE_NONE>,
223 <0x2 0x11 0x1 IRQ_TYPE_NONE>,
224 <0x2 0x11 0x2 IRQ_TYPE_NONE>,
225 <0x2 0x11 0x3 IRQ_TYPE_NONE>;
226
227 interrupt-names = "otg-fail",
228 "otg-overcurrent",
229 "otg-oc-dis-sw-sts",
230 "testmode-change-detect";
231 };
232
233 qcom,bat-if@1200 {
234 reg = <0x1200 0x100>;
235 interrupts = <0x2 0x12 0x0 IRQ_TYPE_NONE>,
236 <0x2 0x12 0x1 IRQ_TYPE_NONE>,
237 <0x2 0x12 0x2 IRQ_TYPE_NONE>,
238 <0x2 0x12 0x3 IRQ_TYPE_NONE>,
239 <0x2 0x12 0x4 IRQ_TYPE_NONE>,
240 <0x2 0x12 0x5 IRQ_TYPE_NONE>;
241
242 interrupt-names = "bat-temp",
243 "bat-ocp",
244 "bat-ov",
245 "bat-low",
246 "bat-therm-or-id-missing",
247 "bat-terminal-missing";
248 };
249
250 qcom,usb-chgpth@1300 {
251 reg = <0x1300 0x100>;
252 interrupts = <0x2 0x13 0x0 IRQ_TYPE_NONE>,
253 <0x2 0x13 0x1 IRQ_TYPE_NONE>,
254 <0x2 0x13 0x2 IRQ_TYPE_NONE>,
255 <0x2 0x13 0x3 IRQ_TYPE_NONE>,
256 <0x2 0x13 0x4 IRQ_TYPE_NONE>,
257 <0x2 0x13 0x5 IRQ_TYPE_NONE>,
258 <0x2 0x13 0x6 IRQ_TYPE_NONE>,
259 <0x2 0x13 0x7 IRQ_TYPE_NONE>;
260
261 interrupt-names = "usbin-collapse",
262 "usbin-lt-3p6v",
263 "usbin-uv",
264 "usbin-ov",
265 "usbin-plugin",
266 "usbin-src-change",
267 "usbin-icl-change",
268 "type-c-change";
269 };
270
271 qcom,dc-chgpth@1400 {
272 reg = <0x1400 0x100>;
273 interrupts = <0x2 0x14 0x0 IRQ_TYPE_NONE>,
274 <0x2 0x14 0x1 IRQ_TYPE_NONE>,
275 <0x2 0x14 0x2 IRQ_TYPE_NONE>,
276 <0x2 0x14 0x3 IRQ_TYPE_NONE>,
277 <0x2 0x14 0x4 IRQ_TYPE_NONE>,
278 <0x2 0x14 0x5 IRQ_TYPE_NONE>,
279 <0x2 0x14 0x6 IRQ_TYPE_NONE>;
280
281 interrupt-names = "dcin-collapse",
282 "dcin-lt-3p6v",
283 "dcin-uv",
284 "dcin-ov",
285 "dcin-plugin",
286 "div2-en-dg",
287 "dcin-icl-change";
288 };
289
290 qcom,chgr-misc@1600 {
291 reg = <0x1600 0x100>;
292 interrupts = <0x2 0x16 0x0 IRQ_TYPE_NONE>,
293 <0x2 0x16 0x1 IRQ_TYPE_NONE>,
294 <0x2 0x16 0x2 IRQ_TYPE_NONE>,
295 <0x2 0x16 0x3 IRQ_TYPE_NONE>,
296 <0x2 0x16 0x4 IRQ_TYPE_NONE>,
297 <0x2 0x16 0x5 IRQ_TYPE_NONE>,
298 <0x2 0x16 0x6 IRQ_TYPE_NONE>,
299 <0x2 0x16 0x7 IRQ_TYPE_NONE>;
300
301 interrupt-names = "wdog-snarl",
302 "wdog-bark",
303 "aicl-fail",
304 "aicl-done",
305 "high-duty-cycle",
306 "input-current-limiting",
307 "temperature-change",
308 "switcher-power-ok";
309 };
310};