Skip to content

Commit 78591d0

Browse files
committed
UPSTREAM: arm64: dts: qcom: msm8939-asus-z00t: add battery
This device tracks remaining battery capacity percentage using voltage mode BMS. This commit enables the pm8916_bms node and adds a battery node to track its capacity. Battery properties were taken from the information printed on the battery itself and downstream device tree for a battery named "nvt+atl_3000mah" [1] [1] https://github.com/Asus-MSM8916/android_kernel_asus_msm8916/blob/10.x/arch/arm/boot/dts/qcom/ASUS_ZE550KL_1936167_3000mAh_3p4COV_VBMS_Final.dtsi Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Erikas Bitovtas <[email protected]>
1 parent c518fe6 commit 78591d0

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

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

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,61 @@
2020
serial0 = &blsp_uart2;
2121
};
2222

23+
battery: battery {
24+
compatible = "simple-battery";
25+
device-chemistry = "lithium-ion-polymer";
26+
voltage-min-design-microvolt = <3400000>;
27+
voltage-max-design-microvolt = <4400000>;
28+
energy-full-design-microwatt-hours = <11500000>;
29+
charge-full-design-microamp-hours = <3000000>;
30+
31+
ocv-capacity-celsius = <(-20) 0 25 40 60>;
32+
ocv-capacity-table-0 = <4378000 100>, <4220000 95>, <4125000 90>,
33+
<4071000 85>, <3977000 80>, <3916000 75>, <3866000 70>,
34+
<3838000 65>, <3822000 60>, <3809000 55>, <3797000 50>,
35+
<3784000 45>, <3771000 40>, <3757000 35>, <3743000 30>,
36+
<3726000 25>, <3707000 20>, <3688000 16>, <3670000 13>,
37+
<3655000 11>, <3648000 10>, <3636000 9>, <3624000 8>,
38+
<3612000 7>, <3592000 6>, <3569000 5>, <3540000 4>,
39+
<3494000 3>, <3418000 2>, <3289000 1>, <3000000 0>;
40+
41+
ocv-capacity-table-1 = <4378000 100>, <4292000 95>, <4226000 90>,
42+
<4166000 85>, <4109000 80>, <4064000 75>, <3992000 70>,
43+
<3942000 65>, <3898000 60>, <3859000 55>, <3826000 50>,
44+
<3802000 45>, <3788000 40>, <3779000 35>, <3768000 30>,
45+
<3752000 25>, <3732000 20>, <3712000 16>, <3696000 13>,
46+
<3688000 11>, <3684000 10>, <3680000 9>, <3675000 8>,
47+
<3669000 7>, <3658000 6>, <3636000 5>, <3599000 4>,
48+
<3544000 3>, <3466000 2>, <3341000 1>, <3000000 0>;
49+
50+
ocv-capacity-table-2 = <4372000 100>, <4306000 95>, <4247000 90>,
51+
<4190000 85>, <4134000 80>, <4081000 75>, <4030000 70>,
52+
<3984000 65>, <3930000 60>, <3884000 55>, <3850000 50>,
53+
<3826000 45>, <3804000 40>, <3786000 35>, <3770000 30>,
54+
<3753000 25>, <3734000 20>, <3712000 16>, <3693000 13>,
55+
<3686000 11>, <3684000 10>, <3682000 9>, <3680000 8>,
56+
<3676000 7>, <3668000 6>, <3643000 5>, <3600000 4>,
57+
<3542000 3>, <3462000 2>, <3340000 1>, <3000000 0>;
58+
59+
ocv-capacity-table-3 = <4365000 100>, <4304000 95>, <4246000 90>,
60+
<4189000 85>, <4133000 80>, <4080000 75>, <4030000 70>,
61+
<3985000 65>, <3933000 60>, <3886000 55>, <3852000 50>,
62+
<3827000 45>, <3806000 40>, <3789000 35>, <3769000 30>,
63+
<3746000 25>, <3726000 20>, <3706000 16>, <3688000 13>,
64+
<3681000 11>, <3678000 10>, <3676000 9>, <3676000 8>,
65+
<3672000 7>, <3660000 6>, <3634000 5>, <3588000 4>,
66+
<3528000 3>, <3448000 2>, <3322000 1>, <3000000 0>;
67+
68+
ocv-capacity-table-4 = <4358000 100>, <4298000 95>, <4240000 90>,
69+
<4183000 85>, <4128000 80>, <4076000 75>, <4027000 70>,
70+
<3983000 65>, <3935000 60>, <3887000 55>, <3852000 50>,
71+
<3827000 45>, <3806000 40>, <3789000 35>, <3764000 30>,
72+
<3738000 25>, <3715000 20>, <3695000 16>, <3677000 13>,
73+
<3672000 11>, <3669000 10>, <3667000 9>, <3666000 8>,
74+
<3662000 7>, <3652000 6>, <3622000 5>, <3577000 4>,
75+
<3518000 3>, <3440000 2>, <3321000 1>, <3000000 0>;
76+
};
77+
2378
chosen {
2479
stdout-path = "serial0";
2580
};
@@ -180,6 +235,12 @@
180235
reg = <0x0 0x86800000 0x0 0x5500000>;
181236
};
182237

238+
&pm8916_bms {
239+
monitored-battery = <&battery>;
240+
241+
status = "okay";
242+
};
243+
183244
&pm8916_codec {
184245
qcom,micbias-lvl = <2800>;
185246
qcom,mbhc-vthreshold-low = <75 150 237 450 500>;

0 commit comments

Comments
 (0)