summaryrefslogtreecommitdiff
path: root/r11_battery_root.dtsi
blob: ac85ce8bd711b252e557124c9a6ff13523ea1284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/*
* Google R11 battery root DTSI file
*
* Copyright 2020 Google LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*/

google_battery: battery {
	status = "okay";
	compatible = "google,battery";
	battery,charger_name = "s2mpw02-charger";
	battery,fuelgauge_name = "s2mpw02-fuelgauge";
	battery,wlc_name = "hl6111-charger";
	battery,bat_tz_name = "BATT_NTC";

	battery,vendor = "Desay";
	battery,chg_volt_limits = <4200 4350>;
	battery,chg_cc_limits = <
						75		35
						150		75
						300		200
						300		150
						150		150
	>;
	battery,chg_cv_headroom = <15>;
	battery,chg_temp_limits = <0 100 200 420 460 480>;
	battery,topoff_current = <30>;
	battery,default_current = <150>;
	battery,wlc_vout_headroom = <300>;
	battery,wlc_vout_min = <3952>;
	battery,wlc_vout_max = <4560>;

	battery,full_check_type = <7>; // used by s2mpw02_charger
	battery,full_check_type_2nd = <7>; // used by s2mpw02_charger
	battery,full_check_count = <3>;
	battery,chg_recharge_vdrop = <90>; // 90mV usually correspond to about 5%
	battery,chg_recharge_soc = <95>; // Also check that we are below 95% soc
	battery,full_check_condition_soc = <90>;

	battery,temp_hysteresis = <10>; // 1 degree
	battery,voltage_hysteresis = <100>; // 100 mV
	battery,max_rawsoc = <10000>; /* In units of 0.01% */
	battery,charge_full_design = <300000>; /* 300000 uAh */
};

wlc_cool_dev: wlc_cool_dev {
};

tsmab104_ntc: thermal-sensor {
	compatible = "google,ntc-thermal";
	#thermal-sensor-cells = <1>;
	enable-gpio = <&gpg2 0 0>;
	ref-voltage = <1800000>;

	temperature-lookup-table = <
		(-40000)	1759597
		(-39000)	1756791
		(-38000)	1753807
		(-37000)	1750636
		(-36000)	1747271
		(-35000)	1743701
		(-34000)	1739916
		(-33000)	1735904
		(-32000)	1731658
		(-31000)	1727161
		(-30000)	1722404
		(-29000)	1717374
		(-28000)	1712058
		(-27000)	1706450
		(-26000)	1700525
		(-25000)	1694286
		(-24000)	1687711
		(-23000)	1680795
		(-22000)	1673533
		(-21000)	1665892
		(-20000)	1657887
		(-19000)	1649498
		(-18000)	1640722
		(-17000)	1631543
		(-16000)	1621955
		(-15000)	1611952
		(-14000)	1601528
		(-13000)	1590676
		(-12000)	1579393
		(-11000)	1567667
		(-10000)	1555505
		(-9000)	1542890
		(-8000)	1529831
		(-7000)	1516321
		(-6000)	1502361
		(-5000)	1487944
		(-4000)	1473084
		(-3000)	1457775
		(-2000)	1442019
		(-1000)	1425826
		0	1409197
		1000	1392142
		2000	1374679
		3000	1356803
		4000	1338533
		5000	1319885
		6000	1300873
		7000	1281522
		8000	1261835
		9000	1241843
		10000	1221557
		11000	1200998
		12000	1180208
		13000	1159203
		14000	1138016
		15000	1116655
		16000	1095168
		17000	1073549
		18000	1051870
		19000	1030111
		20000	1008339
		21000	986588
		22000	964849
		23000	943143
		24000	921566
		25000	900090
		26000	878714
		27000	857513
		28000	836490
		29000	815667
		30000	795065
		31000	774704
		32000	754595
		33000	734760
		34000	715218
		35000	695970
		36000	677035
		37000	658426
		38000	640146
		39000	622213
		40000	604622
		41000	587389
		42000	570517
		43000	553998
		44000	537852
		45000	522072
		46000	506655
		47000	491604
		48000	476918
		49000	462605
		50000	448649
		51000	435050
		52000	421809
		53000	408932
		54000	396393
		55000	384193
		56000	372335
		57000	360817
		58000	349627
		59000	338759
		60000	328197
		61000	317957
		62000	308019
		63000	298373
		64000	289020
		65000	279948
		66000	271169
		67000	262642
		68000	254392
		69000	246401
		70000	238666
		71000	231167
		72000	223901
		73000	216873
		74000	210077
		75000	203505
		76000	197136
		77000	190975
		78000	185013
		79000	179254
		80000	173675
		81000	168279
		82000	163072
		83000	158033
		84000	153161
		85000	148450
		86000	143896
		87000	139494
		88000	135239
		89000	131125
		90000	127150
		91000	123307
		92000	119593
		93000	116002
		94000	112532
		95000	109178
		96000	105935
		97000	102799
		98000	99770
		99000	96840
		100000	94007
		101000	91268
		102000	88620
		103000	86060
		104000	83584
		105000	81190
		106000	78872
		107000	76631
		108000	74464
		109000	72365
		110000	70337
		111000	68372
		112000	66470
		113000	64630
		114000	62850
		115000	61125
		116000	59454
		117000	57836
		118000	56270
		119000	54752
		120000	53282
		121000	51855
		122000	50476
		123000	49136
		124000	47839
		125000	46580 >;
};

thermal_zones: thermal-zones {
	soc_ntc: SOC_NTC {
		polling-delay = <15000>; /* milliseconds */
		polling-delay-passive = <0>; /* milliseconds */
		thermal-sensors = <&tsmab104_ntc 0>;
	};
	batt_ntc: BATT_NTC {
		polling-delay = <10000>; /* milliseconds */
		polling-delay-passive = <0>; /* milliseconds */
		thermal-sensors = <&tsmab104_ntc 1>;
	};
	lte_pa_ntc: LTE_PA_NTC {
	};
	audio_ntc: AUDIO_NTC {
	};
	ppg_ntc: PPG_NTC {
	};
};