blob: fbe4e7f8e6ba01e72892a19d3bc5d9e1a089dbdf [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>;
39 #include "qg-batterydata-ascent-3450mah.dtsi"
40 #include "qg-batterydata-mlp356477-2800mah.dtsi"
41 };
42};
43
Jishnu Prakash93cef682018-04-26 16:10:41 +053044&pmi632_vadc {
45 pinctrl-names = "default";
46 pinctrl-0 = <&quiet_therm_default &smb_therm_default>;
47};
48
49&pmi632_gpios {
50 quiet_therm {
51 quiet_therm_default: quiet_therm_default {
52 pins = "gpio3";
53 bias-high-impedance;
54 };
55 };
56
57 smb_therm {
58 smb_therm_default: smb_therm_default {
59 pins = "gpio4";
60 bias-high-impedance;
61 };
62 };
63};
64
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053065&pmi632_qg {
66 qcom,battery-data = <&mtp_batterydata>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053067};
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053068
Ashay Jaiswal589939b2018-04-20 11:44:05 +053069&pmi632_charger {
70 qcom,battery-data = <&mtp_batterydata>;
71};
72
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053073&pm8953_gpios {
74 bklt_en {
75 bklt_en_default: bklt_en_default {
76 pins = "gpio4";
77 function = "normal";
78 power-source = <0>;
79 output-high;
80 };
81 };
82};
83
84&pm8953_pwm {
85 status = "ok";
86};
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +053087
88&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053089 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053090 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +053091 vbat_map0 {
92 trip = <&pmi632_vbat_lvl0>;
93 /* throttle from fmax to 1689600KHz */
94 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
95 (THERMAL_MAX_LIMIT - 4)>;
96 };
97 vbat_map1 {
98 trip = <&pmi632_vbat_lvl0>;
99 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
100 (THERMAL_MAX_LIMIT - 4)>;
101 };
102 vbat_map2 {
103 trip = <&pmi632_vbat_lvl0>;
104 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
105 (THERMAL_MAX_LIMIT - 4)>;
106 };
107 vbat_map3 {
108 trip = <&pmi632_vbat_lvl0>;
109 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
110 (THERMAL_MAX_LIMIT - 4)>;
111 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530112 vbat_map4 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530113 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530114 cooling-device =
115 <&CPU4 THERMAL_MAX_LIMIT
116 THERMAL_MAX_LIMIT>;
117 };
118 vbat_map5 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530119 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530120 cooling-device =
121 <&CPU5 THERMAL_MAX_LIMIT
122 THERMAL_MAX_LIMIT>;
123 };
124 vbat_map6 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530125 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530126 cooling-device =
127 <&CPU6 THERMAL_MAX_LIMIT
128 THERMAL_MAX_LIMIT>;
129 };
130 vbat_map7 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530131 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530132 cooling-device =
133 <&CPU7 THERMAL_MAX_LIMIT
134 THERMAL_MAX_LIMIT>;
135 };
136 };
137 };
138
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530139 pmi-ibat-lvl0 {
140 cooling-maps {
141 ibat_map0 {
142 trip = <&pmi632_ibat_lvl0>;
143 /* throttle from fmax to 1689600KHz */
144 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
145 (THERMAL_MAX_LIMIT - 4)>;
146 };
147 ibat_map1 {
148 trip = <&pmi632_ibat_lvl0>;
149 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
150 (THERMAL_MAX_LIMIT - 4)>;
151 };
152 ibat_map2 {
153 trip = <&pmi632_ibat_lvl0>;
154 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
155 (THERMAL_MAX_LIMIT - 4)>;
156 };
157 ibat_map3 {
158 trip = <&pmi632_ibat_lvl0>;
159 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
160 (THERMAL_MAX_LIMIT - 4)>;
161 };
162 ibat_map4 {
163 trip = <&pmi632_ibat_lvl0>;
164 cooling-device =
165 <&CPU4 THERMAL_MAX_LIMIT
166 THERMAL_MAX_LIMIT>;
167 };
168 ibat_map5 {
169 trip = <&pmi632_ibat_lvl0>;
170 cooling-device =
171 <&CPU5 THERMAL_MAX_LIMIT
172 THERMAL_MAX_LIMIT>;
173 };
174 ibat_map6 {
175 trip = <&pmi632_ibat_lvl0>;
176 cooling-device =
177 <&CPU6 THERMAL_MAX_LIMIT
178 THERMAL_MAX_LIMIT>;
179 };
180 ibat_map7 {
181 trip = <&pmi632_ibat_lvl0>;
182 cooling-device =
183 <&CPU7 THERMAL_MAX_LIMIT
184 THERMAL_MAX_LIMIT>;
185 };
186 };
187 };
188
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530189 soc {
190 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530191 soc_map0 {
192 trip = <&pmi632_low_soc>;
193 /* throttle from fmax to 1689600KHz */
194 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
195 (THERMAL_MAX_LIMIT - 4)>;
196 };
197 soc_map1 {
198 trip = <&pmi632_low_soc>;
199 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
200 (THERMAL_MAX_LIMIT - 4)>;
201 };
202 soc_map2 {
203 trip = <&pmi632_low_soc>;
204 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
205 (THERMAL_MAX_LIMIT - 4)>;
206 };
207 soc_map3 {
208 trip = <&pmi632_low_soc>;
209 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
210 (THERMAL_MAX_LIMIT - 4)>;
211 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530212 soc_map4 {
213 trip = <&pmi632_low_soc>;
214 cooling-device =
215 <&CPU4 THERMAL_MAX_LIMIT
216 THERMAL_MAX_LIMIT>;
217 };
218 soc_map5 {
219 trip = <&pmi632_low_soc>;
220 cooling-device =
221 <&CPU5 THERMAL_MAX_LIMIT
222 THERMAL_MAX_LIMIT>;
223 };
224 soc_map6 {
225 trip = <&pmi632_low_soc>;
226 cooling-device =
227 <&CPU6 THERMAL_MAX_LIMIT
228 THERMAL_MAX_LIMIT>;
229 };
230 soc_map7 {
231 trip = <&pmi632_low_soc>;
232 cooling-device =
233 <&CPU7 THERMAL_MAX_LIMIT
234 THERMAL_MAX_LIMIT>;
235 };
236 };
237 };
238
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530239 quiet-therm-adc {
240 polling-delay-passive = <0>;
241 polling-delay = <0>;
242 thermal-sensors = <&pmi632_adc_tm 0x53>;
243 thermal-governor = "user_space";
244
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530245 trips {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530246 active-config0 {
247 temperature = <65000>;
248 hysteresis = <1000>;
249 type = "passive";
250 };
251 };
252 };
253
254 case-therm-step {
255 status = "disabled";
256 };
257
258 quiet-therm-step {
259 polling-delay-passive = <2000>;
260 polling-delay = <0>;
261 thermal-sensors = <&pmi632_adc_tm 0x53>;
262 thermal-governor = "step_wise";
263
264 trips {
265 quiet_batt_trip1: quiet_batt-trip1 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530266 temperature = <38000>;
267 hysteresis = <3000>;
268 type = "passive";
269 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530270 quiet_batt_trip2: quiet_batt-trip2 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530271 temperature = <40000>;
272 hysteresis = <2000>;
273 type = "passive";
274 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530275 quiet_batt_trip3: quiet_batt-trip3 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530276 temperature = <43000>;
277 hysteresis = <3000>;
278 type = "passive";
279 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530280 quiet_cpus_trip: quiet_cpus-trip {
281 temperature = <43000>;
282 hysteresis = <0>;
283 type = "passive";
284 };
285 quiet_modem_trip0: quiet_modem-trip0 {
286 temperature = <45000>;
287 hysteresis = <2000>;
288 type = "passive";
289 };
290 quiet_batt_trip4: quiet_batt-trip4 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530291 temperature = <48000>;
292 hysteresis = <5000>;
293 type = "passive";
294 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530295 quiet_modem_trip1: quiet_modem-trip1 {
296 temperature = <48000>;
297 hysteresis = <3000>;
298 type = "passive";
299 };
300 quiet_modem_trip2: quiet_modem-trip2 {
301 temperature = <54000>;
302 hysteresis = <4000>;
303 type = "passive";
304 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530305 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530306 cooling-maps {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530307 skin_cpu0 {
308 trip = <&quiet_cpus_trip>;
309 /* throttle from fmax to 1689600KHz */
310 cooling-device = <&CPU0 THERMAL_NO_LIMIT 3>;
311 };
312 skin_cpu1 {
313 trip = <&quiet_cpus_trip>;
314 cooling-device = <&CPU1 THERMAL_NO_LIMIT 3>;
315 };
316 skin_cpu2 {
317 trip = <&quiet_cpus_trip>;
318 cooling-device = <&CPU2 THERMAL_NO_LIMIT 3>;
319 };
320 skin_cpu3 {
321 trip = <&quiet_cpus_trip>;
322 cooling-device = <&CPU3 THERMAL_NO_LIMIT 3>;
323 };
324 skin_cpu4 {
325 trip = <&quiet_cpus_trip>;
326 cooling-device = <&CPU4 THERMAL_NO_LIMIT 3>;
327 };
328 skin_cpu5 {
329 trip = <&quiet_cpus_trip>;
330 cooling-device = <&CPU5 THERMAL_NO_LIMIT 3>;
331 };
332 skin_cpu6 {
333 trip = <&quiet_cpus_trip>;
334 cooling-device = <&CPU6 THERMAL_NO_LIMIT 3>;
335 };
336 skin_cpu7 {
337 trip = <&quiet_cpus_trip>;
338 cooling-device = <&CPU7 THERMAL_NO_LIMIT 3>;
339 };
340 modem_lvl1 {
341 trip = <&quiet_modem_trip1>;
342 cooling-device = <&modem_pa 2 2>;
343 };
344 modem_lvl2 {
345 trip = <&quiet_modem_trip2>;
346 cooling-device = <&modem_pa 3 3>;
347 };
348 modem_proc_lvl1 {
349 trip = <&quiet_modem_trip0>;
350 cooling-device = <&modem_proc 1 1>;
351 };
352 modem_proc_lvl2 {
353 trip = <&quiet_modem_trip2>;
354 cooling-device = <&modem_proc 3 3>;
355 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530356 battery_lvl1 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530357 trip = <&quiet_batt_trip1>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530358 cooling-device = <&pmi632_charger 2 2>;
359 };
360 battery_lvl2 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530361 trip = <&quiet_batt_trip2>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530362 cooling-device = <&pmi632_charger 3 3>;
363 };
364 battery_lvl3 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530365 trip = <&quiet_batt_trip3>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530366 cooling-device = <&pmi632_charger 4 4>;
367 };
368 battery_lvl4 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530369 trip = <&quiet_batt_trip4>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530370 cooling-device = <&pmi632_charger 5 5>;
371 };
372 };
373 };
374};
Rashi Bindra75fcbe22018-05-09 21:58:25 +0530375
jialongjhan7dfbf872020-04-21 20:24:23 +0800376/*
Rashi Bindra75fcbe22018-05-09 21:58:25 +0530377&tlmm {
378 pmx_mdss {
379 mdss_dsi_active: mdss_dsi_active {
380 mux {
381 pins = "gpio61";
382 };
383 config {
384 pins = "gpio61";
385 };
386 };
387 mdss_dsi_suspend: mdss_dsi_suspend {
388 mux {
389 pins = "gpio61";
390 };
391 config {
392 pins = "gpio61";
393 };
394 };
395 };
396};
jialongjhan7dfbf872020-04-21 20:24:23 +0800397*/