Skip to content

Commit 139e724

Browse files
committed
arm64: boot: dts: qcom: msm8939-asus-z00t: add charger
This device uses Summit SMB358 as its charging IC. This commit adds the device tree configuration for it and adds additional properties for the battery. Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
1 parent e2365be commit 139e724

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <dt-bindings/gpio/gpio.h>
99
#include <dt-bindings/input/input.h>
1010
#include <dt-bindings/interrupt-controller/irq.h>
11+
#include <dt-bindings/power/summit,smb347-charger.h>
1112

1213
/ {
1314
model = "Asus ZenFone 2 Laser/Selfie (1080p)";
@@ -25,8 +26,12 @@
2526
device-chemistry = "lithium-ion-polymer";
2627
voltage-min-design-microvolt = <3400000>;
2728
voltage-max-design-microvolt = <4400000>;
29+
constant-charge-voltage-max-microvolt = <4400000>;
30+
constant-charge-current-max-microamp = <2000000>;
31+
charge-term-current-microamp = <80000>;
2832
energy-full-design-microwatt-hours = <11500000>;
2933
charge-full-design-microamp-hours = <3000000>;
34+
operating-range-celsius = <10 65>;
3035

3136
ocv-capacity-celsius = <(-20) 0 25 40 60>;
3237
ocv-capacity-table-0 = <4378000 100>, <4220000 95>, <4125000 90>,
@@ -165,6 +170,36 @@
165170
};
166171
};
167172

173+
&blsp_i2c4 {
174+
status = "okay";
175+
176+
charger: charger@6a {
177+
compatible = "summit,smb358";
178+
reg = <0x6a>;
179+
180+
interrupts-extended = <&tlmm 20 IRQ_TYPE_EDGE_FALLING>;
181+
182+
pinctrl-0 = <&charger_int_default>;
183+
pinctrl-names = "default";
184+
185+
summit,charge-current-compensation-microamp = <600000>;
186+
summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>;
187+
summit,soft-compensation-mode = <SMB3XX_SOFT_TEMP_COMPENSATE_VOLTAGE>;
188+
summit,enable-usb-charging;
189+
summit,usb-current-limit-microamp = <1000000>;
190+
191+
monitored-battery = <&battery>;
192+
193+
usb_vbus: usb-vbus {
194+
regulator-name = "usb_vbus";
195+
regulator-min-microvolt = <5000000>;
196+
regulator-max-microvolt = <5000000>;
197+
regulator-min-microamp = <500000>;
198+
regulator-max-microamp = <500000>;
199+
};
200+
};
201+
};
202+
168203
&blsp_i2c5 {
169204
status = "okay";
170205

@@ -246,6 +281,7 @@
246281

247282
&pm8916_bms {
248283
monitored-battery = <&battery>;
284+
power-supplies = <&charger>;
249285

250286
status = "okay";
251287
};
@@ -290,6 +326,7 @@
290326

291327
&usb {
292328
extcon = <&usb_id>, <&usb_id>;
329+
vbus-supply = <&usb_vbus>;
293330

294331
status = "okay";
295332
};
@@ -327,6 +364,13 @@
327364
};
328365
};
329366

367+
charger_int_default: charger-int-default-state {
368+
pins = "gpio20";
369+
function = "gpio";
370+
drive-strength = <6>;
371+
bias-pull-up;
372+
};
373+
330374
lcd_bl_en_default: lcd-bl-en-default-state {
331375
pins = "gpio21";
332376
function = "gpio";
@@ -396,4 +440,11 @@
396440
drive-strength = <2>;
397441
bias-disable;
398442
};
443+
444+
usb_id_switch_default: usb-id-switch-default-state {
445+
pins = "gpio121";
446+
function = "gpio";
447+
drive-strength = <6>;
448+
output-high;
449+
};
399450
};

0 commit comments

Comments
 (0)