blob: 5c127bc57518e2ac69d22322be7b5393a1fe94c6 [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
44&pmi632_qg {
45 qcom,battery-data = <&mtp_batterydata>;
Anirudh Ghayalb4b52282018-02-16 19:56:15 +053046};
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053047
Ashay Jaiswal589939b2018-04-20 11:44:05 +053048&pmi632_charger {
49 qcom,battery-data = <&mtp_batterydata>;
50};
51
Vishnuvardhan Prodduturi886d44e2018-01-25 18:29:43 +053052&pm8953_gpios {
53 bklt_en {
54 bklt_en_default: bklt_en_default {
55 pins = "gpio4";
56 function = "normal";
57 power-source = <0>;
58 output-high;
59 };
60 };
61};
62
63&pm8953_pwm {
64 status = "ok";
65};
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +053066
67&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053068 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053069 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +053070 vbat_map0 {
71 trip = <&pmi632_vbat_lvl0>;
72 /* throttle from fmax to 1689600KHz */
73 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
74 (THERMAL_MAX_LIMIT - 4)>;
75 };
76 vbat_map1 {
77 trip = <&pmi632_vbat_lvl0>;
78 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
79 (THERMAL_MAX_LIMIT - 4)>;
80 };
81 vbat_map2 {
82 trip = <&pmi632_vbat_lvl0>;
83 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
84 (THERMAL_MAX_LIMIT - 4)>;
85 };
86 vbat_map3 {
87 trip = <&pmi632_vbat_lvl0>;
88 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
89 (THERMAL_MAX_LIMIT - 4)>;
90 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053091 vbat_map4 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053092 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053093 cooling-device =
94 <&CPU4 THERMAL_MAX_LIMIT
95 THERMAL_MAX_LIMIT>;
96 };
97 vbat_map5 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053098 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053099 cooling-device =
100 <&CPU5 THERMAL_MAX_LIMIT
101 THERMAL_MAX_LIMIT>;
102 };
103 vbat_map6 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530104 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530105 cooling-device =
106 <&CPU6 THERMAL_MAX_LIMIT
107 THERMAL_MAX_LIMIT>;
108 };
109 vbat_map7 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530110 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530111 cooling-device =
112 <&CPU7 THERMAL_MAX_LIMIT
113 THERMAL_MAX_LIMIT>;
114 };
115 };
116 };
117
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530118 pmi-ibat-lvl0 {
119 cooling-maps {
120 ibat_map0 {
121 trip = <&pmi632_ibat_lvl0>;
122 /* throttle from fmax to 1689600KHz */
123 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
124 (THERMAL_MAX_LIMIT - 4)>;
125 };
126 ibat_map1 {
127 trip = <&pmi632_ibat_lvl0>;
128 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
129 (THERMAL_MAX_LIMIT - 4)>;
130 };
131 ibat_map2 {
132 trip = <&pmi632_ibat_lvl0>;
133 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
134 (THERMAL_MAX_LIMIT - 4)>;
135 };
136 ibat_map3 {
137 trip = <&pmi632_ibat_lvl0>;
138 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
139 (THERMAL_MAX_LIMIT - 4)>;
140 };
141 ibat_map4 {
142 trip = <&pmi632_ibat_lvl0>;
143 cooling-device =
144 <&CPU4 THERMAL_MAX_LIMIT
145 THERMAL_MAX_LIMIT>;
146 };
147 ibat_map5 {
148 trip = <&pmi632_ibat_lvl0>;
149 cooling-device =
150 <&CPU5 THERMAL_MAX_LIMIT
151 THERMAL_MAX_LIMIT>;
152 };
153 ibat_map6 {
154 trip = <&pmi632_ibat_lvl0>;
155 cooling-device =
156 <&CPU6 THERMAL_MAX_LIMIT
157 THERMAL_MAX_LIMIT>;
158 };
159 ibat_map7 {
160 trip = <&pmi632_ibat_lvl0>;
161 cooling-device =
162 <&CPU7 THERMAL_MAX_LIMIT
163 THERMAL_MAX_LIMIT>;
164 };
165 };
166 };
167
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530168 soc {
169 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530170 soc_map0 {
171 trip = <&pmi632_low_soc>;
172 /* throttle from fmax to 1689600KHz */
173 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
174 (THERMAL_MAX_LIMIT - 4)>;
175 };
176 soc_map1 {
177 trip = <&pmi632_low_soc>;
178 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
179 (THERMAL_MAX_LIMIT - 4)>;
180 };
181 soc_map2 {
182 trip = <&pmi632_low_soc>;
183 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
184 (THERMAL_MAX_LIMIT - 4)>;
185 };
186 soc_map3 {
187 trip = <&pmi632_low_soc>;
188 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
189 (THERMAL_MAX_LIMIT - 4)>;
190 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530191 soc_map4 {
192 trip = <&pmi632_low_soc>;
193 cooling-device =
194 <&CPU4 THERMAL_MAX_LIMIT
195 THERMAL_MAX_LIMIT>;
196 };
197 soc_map5 {
198 trip = <&pmi632_low_soc>;
199 cooling-device =
200 <&CPU5 THERMAL_MAX_LIMIT
201 THERMAL_MAX_LIMIT>;
202 };
203 soc_map6 {
204 trip = <&pmi632_low_soc>;
205 cooling-device =
206 <&CPU6 THERMAL_MAX_LIMIT
207 THERMAL_MAX_LIMIT>;
208 };
209 soc_map7 {
210 trip = <&pmi632_low_soc>;
211 cooling-device =
212 <&CPU7 THERMAL_MAX_LIMIT
213 THERMAL_MAX_LIMIT>;
214 };
215 };
216 };
217
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530218 quiet-therm-adc {
219 polling-delay-passive = <0>;
220 polling-delay = <0>;
221 thermal-sensors = <&pmi632_adc_tm 0x53>;
222 thermal-governor = "user_space";
223
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530224 trips {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530225 active-config0 {
226 temperature = <65000>;
227 hysteresis = <1000>;
228 type = "passive";
229 };
230 };
231 };
232
233 case-therm-step {
234 status = "disabled";
235 };
236
237 quiet-therm-step {
238 polling-delay-passive = <2000>;
239 polling-delay = <0>;
240 thermal-sensors = <&pmi632_adc_tm 0x53>;
241 thermal-governor = "step_wise";
242
243 trips {
244 quiet_batt_trip1: quiet_batt-trip1 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530245 temperature = <38000>;
246 hysteresis = <3000>;
247 type = "passive";
248 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530249 quiet_batt_trip2: quiet_batt-trip2 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530250 temperature = <40000>;
251 hysteresis = <2000>;
252 type = "passive";
253 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530254 quiet_batt_trip3: quiet_batt-trip3 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530255 temperature = <43000>;
256 hysteresis = <3000>;
257 type = "passive";
258 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530259 quiet_cpus_trip: quiet_cpus-trip {
260 temperature = <43000>;
261 hysteresis = <0>;
262 type = "passive";
263 };
264 quiet_modem_trip0: quiet_modem-trip0 {
265 temperature = <45000>;
266 hysteresis = <2000>;
267 type = "passive";
268 };
269 quiet_batt_trip4: quiet_batt-trip4 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530270 temperature = <48000>;
271 hysteresis = <5000>;
272 type = "passive";
273 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530274 quiet_modem_trip1: quiet_modem-trip1 {
275 temperature = <48000>;
276 hysteresis = <3000>;
277 type = "passive";
278 };
279 quiet_modem_trip2: quiet_modem-trip2 {
280 temperature = <54000>;
281 hysteresis = <4000>;
282 type = "passive";
283 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530284 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530285 cooling-maps {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530286 skin_cpu0 {
287 trip = <&quiet_cpus_trip>;
288 /* throttle from fmax to 1689600KHz */
289 cooling-device = <&CPU0 THERMAL_NO_LIMIT 3>;
290 };
291 skin_cpu1 {
292 trip = <&quiet_cpus_trip>;
293 cooling-device = <&CPU1 THERMAL_NO_LIMIT 3>;
294 };
295 skin_cpu2 {
296 trip = <&quiet_cpus_trip>;
297 cooling-device = <&CPU2 THERMAL_NO_LIMIT 3>;
298 };
299 skin_cpu3 {
300 trip = <&quiet_cpus_trip>;
301 cooling-device = <&CPU3 THERMAL_NO_LIMIT 3>;
302 };
303 skin_cpu4 {
304 trip = <&quiet_cpus_trip>;
305 cooling-device = <&CPU4 THERMAL_NO_LIMIT 3>;
306 };
307 skin_cpu5 {
308 trip = <&quiet_cpus_trip>;
309 cooling-device = <&CPU5 THERMAL_NO_LIMIT 3>;
310 };
311 skin_cpu6 {
312 trip = <&quiet_cpus_trip>;
313 cooling-device = <&CPU6 THERMAL_NO_LIMIT 3>;
314 };
315 skin_cpu7 {
316 trip = <&quiet_cpus_trip>;
317 cooling-device = <&CPU7 THERMAL_NO_LIMIT 3>;
318 };
319 modem_lvl1 {
320 trip = <&quiet_modem_trip1>;
321 cooling-device = <&modem_pa 2 2>;
322 };
323 modem_lvl2 {
324 trip = <&quiet_modem_trip2>;
325 cooling-device = <&modem_pa 3 3>;
326 };
327 modem_proc_lvl1 {
328 trip = <&quiet_modem_trip0>;
329 cooling-device = <&modem_proc 1 1>;
330 };
331 modem_proc_lvl2 {
332 trip = <&quiet_modem_trip2>;
333 cooling-device = <&modem_proc 3 3>;
334 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530335 battery_lvl1 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530336 trip = <&quiet_batt_trip1>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530337 cooling-device = <&pmi632_charger 2 2>;
338 };
339 battery_lvl2 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530340 trip = <&quiet_batt_trip2>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530341 cooling-device = <&pmi632_charger 3 3>;
342 };
343 battery_lvl3 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530344 trip = <&quiet_batt_trip3>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530345 cooling-device = <&pmi632_charger 4 4>;
346 };
347 battery_lvl4 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530348 trip = <&quiet_batt_trip4>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530349 cooling-device = <&pmi632_charger 5 5>;
350 };
351 };
352 };
353};