blob: 2319b3eb7a3ba83cc96184622defa17dfbc9d65e [file] [log] [blame]
Umang Agrawalfbbfb7f2017-12-29 19:27:01 +05301/*
2 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include "pmi632.dtsi"
15
16&spmi_bus {
17 /delete-node/ qcom,pmi8950@2;
18 /delete-node/ qcom,pmi8950@3;
19};
20
21&pm8953_typec {
22 status = "disabled";
23};
Umang Agrawalf0178c92017-12-28 15:04:51 +053024
25&pmi632_pon {
26 qcom,ps-hold-hard-reset-disable;
27 qcom,ps-hold-shutdown-disable;
28};
Sriharsha Allenkib3797822018-02-12 18:09:01 +053029
30&usb3 {
Pratham Pratape450ff72018-02-20 14:00:39 +053031 extcon = <&pmi632_charger>, <&pmi632_charger>, <0>,
32 <&pmi632_charger>, <&pmi632_charger>;
Sriharsha Allenkib3797822018-02-12 18:09:01 +053033 vbus_dwc3-supply = <&smb5_vbus>;
34};
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053035
36/{
37 mtp_batterydata: qcom,battery-data {
38 qcom,batt-id-range-pct = <15>;
jessicatseng727f7542020-04-22 15:13:49 +080039//<20202/04/22-JessicaTseng, Add Fuji & Kayo battery profiles
40#if 1
41 #include "qg-batterydata-Fuji-3000mah-Jan22th2019-pmi632.dtsi"
42 #include "qg-batterydata-Kayo-3000mah-Nov4th2019-pmi632.dtsi"
43#else
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053044 #include "qg-batterydata-ascent-3450mah.dtsi"
45 #include "qg-batterydata-mlp356477-2800mah.dtsi"
jessicatseng727f7542020-04-22 15:13:49 +080046#endif
47//>2020/04/22-JessicaTseng
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053048 };
49};
50
Jishnu Prakash93cef682018-04-26 16:10:41 +053051&pmi632_vadc {
52 pinctrl-names = "default";
53 pinctrl-0 = <&quiet_therm_default &smb_therm_default>;
54};
55
56&pmi632_gpios {
57 quiet_therm {
58 quiet_therm_default: quiet_therm_default {
59 pins = "gpio3";
60 bias-high-impedance;
61 };
62 };
63
64 smb_therm {
65 smb_therm_default: smb_therm_default {
66 pins = "gpio4";
67 bias-high-impedance;
68 };
69 };
70};
71
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053072&pmi632_qg {
73 qcom,battery-data = <&mtp_batterydata>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053074};
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053075
Ashay Jaiswal589939b2018-04-20 11:44:05 +053076&pmi632_charger {
77 qcom,battery-data = <&mtp_batterydata>;
78};
79
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053080&pm8953_gpios {
81 bklt_en {
82 bklt_en_default: bklt_en_default {
83 pins = "gpio4";
84 function = "normal";
85 power-source = <0>;
86 output-high;
87 };
88 };
89};
90
91&pm8953_pwm {
92 status = "ok";
93};
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +053094
95&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053096 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053097 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +053098 vbat_map0 {
99 trip = <&pmi632_vbat_lvl0>;
100 /* throttle from fmax to 1689600KHz */
101 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
102 (THERMAL_MAX_LIMIT - 4)>;
103 };
104 vbat_map1 {
105 trip = <&pmi632_vbat_lvl0>;
106 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
107 (THERMAL_MAX_LIMIT - 4)>;
108 };
109 vbat_map2 {
110 trip = <&pmi632_vbat_lvl0>;
111 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
112 (THERMAL_MAX_LIMIT - 4)>;
113 };
114 vbat_map3 {
115 trip = <&pmi632_vbat_lvl0>;
116 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
117 (THERMAL_MAX_LIMIT - 4)>;
118 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530119 vbat_map4 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530120 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530121 cooling-device =
122 <&CPU4 THERMAL_MAX_LIMIT
123 THERMAL_MAX_LIMIT>;
124 };
125 vbat_map5 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530126 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530127 cooling-device =
128 <&CPU5 THERMAL_MAX_LIMIT
129 THERMAL_MAX_LIMIT>;
130 };
131 vbat_map6 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530132 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530133 cooling-device =
134 <&CPU6 THERMAL_MAX_LIMIT
135 THERMAL_MAX_LIMIT>;
136 };
137 vbat_map7 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530138 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530139 cooling-device =
140 <&CPU7 THERMAL_MAX_LIMIT
141 THERMAL_MAX_LIMIT>;
142 };
143 };
144 };
145
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530146 pmi-ibat-lvl0 {
147 cooling-maps {
148 ibat_map0 {
149 trip = <&pmi632_ibat_lvl0>;
150 /* throttle from fmax to 1689600KHz */
151 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
152 (THERMAL_MAX_LIMIT - 4)>;
153 };
154 ibat_map1 {
155 trip = <&pmi632_ibat_lvl0>;
156 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
157 (THERMAL_MAX_LIMIT - 4)>;
158 };
159 ibat_map2 {
160 trip = <&pmi632_ibat_lvl0>;
161 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
162 (THERMAL_MAX_LIMIT - 4)>;
163 };
164 ibat_map3 {
165 trip = <&pmi632_ibat_lvl0>;
166 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
167 (THERMAL_MAX_LIMIT - 4)>;
168 };
169 ibat_map4 {
170 trip = <&pmi632_ibat_lvl0>;
171 cooling-device =
172 <&CPU4 THERMAL_MAX_LIMIT
173 THERMAL_MAX_LIMIT>;
174 };
175 ibat_map5 {
176 trip = <&pmi632_ibat_lvl0>;
177 cooling-device =
178 <&CPU5 THERMAL_MAX_LIMIT
179 THERMAL_MAX_LIMIT>;
180 };
181 ibat_map6 {
182 trip = <&pmi632_ibat_lvl0>;
183 cooling-device =
184 <&CPU6 THERMAL_MAX_LIMIT
185 THERMAL_MAX_LIMIT>;
186 };
187 ibat_map7 {
188 trip = <&pmi632_ibat_lvl0>;
189 cooling-device =
190 <&CPU7 THERMAL_MAX_LIMIT
191 THERMAL_MAX_LIMIT>;
192 };
193 };
194 };
195
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530196 soc {
197 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530198 soc_map0 {
199 trip = <&pmi632_low_soc>;
200 /* throttle from fmax to 1689600KHz */
201 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
202 (THERMAL_MAX_LIMIT - 4)>;
203 };
204 soc_map1 {
205 trip = <&pmi632_low_soc>;
206 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
207 (THERMAL_MAX_LIMIT - 4)>;
208 };
209 soc_map2 {
210 trip = <&pmi632_low_soc>;
211 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
212 (THERMAL_MAX_LIMIT - 4)>;
213 };
214 soc_map3 {
215 trip = <&pmi632_low_soc>;
216 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
217 (THERMAL_MAX_LIMIT - 4)>;
218 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530219 soc_map4 {
220 trip = <&pmi632_low_soc>;
221 cooling-device =
222 <&CPU4 THERMAL_MAX_LIMIT
223 THERMAL_MAX_LIMIT>;
224 };
225 soc_map5 {
226 trip = <&pmi632_low_soc>;
227 cooling-device =
228 <&CPU5 THERMAL_MAX_LIMIT
229 THERMAL_MAX_LIMIT>;
230 };
231 soc_map6 {
232 trip = <&pmi632_low_soc>;
233 cooling-device =
234 <&CPU6 THERMAL_MAX_LIMIT
235 THERMAL_MAX_LIMIT>;
236 };
237 soc_map7 {
238 trip = <&pmi632_low_soc>;
239 cooling-device =
240 <&CPU7 THERMAL_MAX_LIMIT
241 THERMAL_MAX_LIMIT>;
242 };
243 };
244 };
245
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530246 quiet-therm-adc {
247 polling-delay-passive = <0>;
248 polling-delay = <0>;
249 thermal-sensors = <&pmi632_adc_tm 0x53>;
250 thermal-governor = "user_space";
251
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530252 trips {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530253 active-config0 {
254 temperature = <65000>;
255 hysteresis = <1000>;
256 type = "passive";
257 };
258 };
259 };
260
261 case-therm-step {
262 status = "disabled";
263 };
264
265 quiet-therm-step {
266 polling-delay-passive = <2000>;
267 polling-delay = <0>;
268 thermal-sensors = <&pmi632_adc_tm 0x53>;
269 thermal-governor = "step_wise";
270
271 trips {
272 quiet_batt_trip1: quiet_batt-trip1 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530273 temperature = <38000>;
274 hysteresis = <3000>;
275 type = "passive";
276 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530277 quiet_batt_trip2: quiet_batt-trip2 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530278 temperature = <40000>;
279 hysteresis = <2000>;
280 type = "passive";
281 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530282 quiet_batt_trip3: quiet_batt-trip3 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530283 temperature = <43000>;
284 hysteresis = <3000>;
285 type = "passive";
286 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530287 quiet_cpus_trip: quiet_cpus-trip {
288 temperature = <43000>;
289 hysteresis = <0>;
290 type = "passive";
291 };
292 quiet_modem_trip0: quiet_modem-trip0 {
293 temperature = <45000>;
294 hysteresis = <2000>;
295 type = "passive";
296 };
297 quiet_batt_trip4: quiet_batt-trip4 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530298 temperature = <48000>;
299 hysteresis = <5000>;
300 type = "passive";
301 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530302 quiet_modem_trip1: quiet_modem-trip1 {
303 temperature = <48000>;
304 hysteresis = <3000>;
305 type = "passive";
306 };
307 quiet_modem_trip2: quiet_modem-trip2 {
308 temperature = <54000>;
309 hysteresis = <4000>;
310 type = "passive";
311 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530312 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530313 cooling-maps {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530314 skin_cpu0 {
315 trip = <&quiet_cpus_trip>;
316 /* throttle from fmax to 1689600KHz */
317 cooling-device = <&CPU0 THERMAL_NO_LIMIT 3>;
318 };
319 skin_cpu1 {
320 trip = <&quiet_cpus_trip>;
321 cooling-device = <&CPU1 THERMAL_NO_LIMIT 3>;
322 };
323 skin_cpu2 {
324 trip = <&quiet_cpus_trip>;
325 cooling-device = <&CPU2 THERMAL_NO_LIMIT 3>;
326 };
327 skin_cpu3 {
328 trip = <&quiet_cpus_trip>;
329 cooling-device = <&CPU3 THERMAL_NO_LIMIT 3>;
330 };
331 skin_cpu4 {
332 trip = <&quiet_cpus_trip>;
333 cooling-device = <&CPU4 THERMAL_NO_LIMIT 3>;
334 };
335 skin_cpu5 {
336 trip = <&quiet_cpus_trip>;
337 cooling-device = <&CPU5 THERMAL_NO_LIMIT 3>;
338 };
339 skin_cpu6 {
340 trip = <&quiet_cpus_trip>;
341 cooling-device = <&CPU6 THERMAL_NO_LIMIT 3>;
342 };
343 skin_cpu7 {
344 trip = <&quiet_cpus_trip>;
345 cooling-device = <&CPU7 THERMAL_NO_LIMIT 3>;
346 };
347 modem_lvl1 {
348 trip = <&quiet_modem_trip1>;
349 cooling-device = <&modem_pa 2 2>;
350 };
351 modem_lvl2 {
352 trip = <&quiet_modem_trip2>;
353 cooling-device = <&modem_pa 3 3>;
354 };
355 modem_proc_lvl1 {
356 trip = <&quiet_modem_trip0>;
357 cooling-device = <&modem_proc 1 1>;
358 };
359 modem_proc_lvl2 {
360 trip = <&quiet_modem_trip2>;
361 cooling-device = <&modem_proc 3 3>;
362 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530363 battery_lvl1 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530364 trip = <&quiet_batt_trip1>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530365 cooling-device = <&pmi632_charger 2 2>;
366 };
367 battery_lvl2 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530368 trip = <&quiet_batt_trip2>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530369 cooling-device = <&pmi632_charger 3 3>;
370 };
371 battery_lvl3 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530372 trip = <&quiet_batt_trip3>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530373 cooling-device = <&pmi632_charger 4 4>;
374 };
375 battery_lvl4 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530376 trip = <&quiet_batt_trip4>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530377 cooling-device = <&pmi632_charger 5 5>;
378 };
379 };
380 };
381};
Rashi Bindra75fcbe22018-05-09 21:58:25 +0530382
jialongjhan7dfbf872020-04-21 20:24:23 +0800383/*
Rashi Bindra75fcbe22018-05-09 21:58:25 +0530384&tlmm {
385 pmx_mdss {
386 mdss_dsi_active: mdss_dsi_active {
387 mux {
388 pins = "gpio61";
389 };
390 config {
391 pins = "gpio61";
392 };
393 };
394 mdss_dsi_suspend: mdss_dsi_suspend {
395 mux {
396 pins = "gpio61";
397 };
398 config {
399 pins = "gpio61";
400 };
401 };
402 };
403};
jialongjhan7dfbf872020-04-21 20:24:23 +0800404*/