blob: a4b6054e3c6843a02ef4ebb0739b154e9626ea17 [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
48&pm8953_gpios {
49 bklt_en {
50 bklt_en_default: bklt_en_default {
51 pins = "gpio4";
52 function = "normal";
53 power-source = <0>;
54 output-high;
55 };
56 };
57};
58
59&pm8953_pwm {
60 status = "ok";
61};
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +053062
63&thermal_zones {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053064 pmi-vbat-lvl0 {
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053065 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +053066 vbat_map0 {
67 trip = <&pmi632_vbat_lvl0>;
68 /* throttle from fmax to 1689600KHz */
69 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
70 (THERMAL_MAX_LIMIT - 4)>;
71 };
72 vbat_map1 {
73 trip = <&pmi632_vbat_lvl0>;
74 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
75 (THERMAL_MAX_LIMIT - 4)>;
76 };
77 vbat_map2 {
78 trip = <&pmi632_vbat_lvl0>;
79 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
80 (THERMAL_MAX_LIMIT - 4)>;
81 };
82 vbat_map3 {
83 trip = <&pmi632_vbat_lvl0>;
84 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
85 (THERMAL_MAX_LIMIT - 4)>;
86 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053087 vbat_map4 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053088 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053089 cooling-device =
90 <&CPU4 THERMAL_MAX_LIMIT
91 THERMAL_MAX_LIMIT>;
92 };
93 vbat_map5 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +053094 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +053095 cooling-device =
96 <&CPU5 THERMAL_MAX_LIMIT
97 THERMAL_MAX_LIMIT>;
98 };
99 vbat_map6 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530100 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530101 cooling-device =
102 <&CPU6 THERMAL_MAX_LIMIT
103 THERMAL_MAX_LIMIT>;
104 };
105 vbat_map7 {
Manaf Meethalavalappu Pallikunhi20763dda2018-03-09 19:34:43 +0530106 trip = <&pmi632_vbat_lvl0>;
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530107 cooling-device =
108 <&CPU7 THERMAL_MAX_LIMIT
109 THERMAL_MAX_LIMIT>;
110 };
111 };
112 };
113
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530114 pmi-ibat-lvl0 {
115 cooling-maps {
116 ibat_map0 {
117 trip = <&pmi632_ibat_lvl0>;
118 /* throttle from fmax to 1689600KHz */
119 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
120 (THERMAL_MAX_LIMIT - 4)>;
121 };
122 ibat_map1 {
123 trip = <&pmi632_ibat_lvl0>;
124 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
125 (THERMAL_MAX_LIMIT - 4)>;
126 };
127 ibat_map2 {
128 trip = <&pmi632_ibat_lvl0>;
129 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
130 (THERMAL_MAX_LIMIT - 4)>;
131 };
132 ibat_map3 {
133 trip = <&pmi632_ibat_lvl0>;
134 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
135 (THERMAL_MAX_LIMIT - 4)>;
136 };
137 ibat_map4 {
138 trip = <&pmi632_ibat_lvl0>;
139 cooling-device =
140 <&CPU4 THERMAL_MAX_LIMIT
141 THERMAL_MAX_LIMIT>;
142 };
143 ibat_map5 {
144 trip = <&pmi632_ibat_lvl0>;
145 cooling-device =
146 <&CPU5 THERMAL_MAX_LIMIT
147 THERMAL_MAX_LIMIT>;
148 };
149 ibat_map6 {
150 trip = <&pmi632_ibat_lvl0>;
151 cooling-device =
152 <&CPU6 THERMAL_MAX_LIMIT
153 THERMAL_MAX_LIMIT>;
154 };
155 ibat_map7 {
156 trip = <&pmi632_ibat_lvl0>;
157 cooling-device =
158 <&CPU7 THERMAL_MAX_LIMIT
159 THERMAL_MAX_LIMIT>;
160 };
161 };
162 };
163
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530164 soc {
165 cooling-maps {
Manaf Meethalavalappu Pallikunhi2c240a62018-04-05 23:54:47 +0530166 soc_map0 {
167 trip = <&pmi632_low_soc>;
168 /* throttle from fmax to 1689600KHz */
169 cooling-device = <&CPU0 (THERMAL_MAX_LIMIT - 4)
170 (THERMAL_MAX_LIMIT - 4)>;
171 };
172 soc_map1 {
173 trip = <&pmi632_low_soc>;
174 cooling-device = <&CPU1 (THERMAL_MAX_LIMIT - 4)
175 (THERMAL_MAX_LIMIT - 4)>;
176 };
177 soc_map2 {
178 trip = <&pmi632_low_soc>;
179 cooling-device = <&CPU2 (THERMAL_MAX_LIMIT - 4)
180 (THERMAL_MAX_LIMIT - 4)>;
181 };
182 soc_map3 {
183 trip = <&pmi632_low_soc>;
184 cooling-device = <&CPU3 (THERMAL_MAX_LIMIT - 4)
185 (THERMAL_MAX_LIMIT - 4)>;
186 };
Manaf Meethalavalappu Pallikunhi4f358972018-03-05 12:04:10 +0530187 soc_map4 {
188 trip = <&pmi632_low_soc>;
189 cooling-device =
190 <&CPU4 THERMAL_MAX_LIMIT
191 THERMAL_MAX_LIMIT>;
192 };
193 soc_map5 {
194 trip = <&pmi632_low_soc>;
195 cooling-device =
196 <&CPU5 THERMAL_MAX_LIMIT
197 THERMAL_MAX_LIMIT>;
198 };
199 soc_map6 {
200 trip = <&pmi632_low_soc>;
201 cooling-device =
202 <&CPU6 THERMAL_MAX_LIMIT
203 THERMAL_MAX_LIMIT>;
204 };
205 soc_map7 {
206 trip = <&pmi632_low_soc>;
207 cooling-device =
208 <&CPU7 THERMAL_MAX_LIMIT
209 THERMAL_MAX_LIMIT>;
210 };
211 };
212 };
213
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530214 quiet-therm-adc {
215 polling-delay-passive = <0>;
216 polling-delay = <0>;
217 thermal-sensors = <&pmi632_adc_tm 0x53>;
218 thermal-governor = "user_space";
219
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530220 trips {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530221 active-config0 {
222 temperature = <65000>;
223 hysteresis = <1000>;
224 type = "passive";
225 };
226 };
227 };
228
229 case-therm-step {
230 status = "disabled";
231 };
232
233 quiet-therm-step {
234 polling-delay-passive = <2000>;
235 polling-delay = <0>;
236 thermal-sensors = <&pmi632_adc_tm 0x53>;
237 thermal-governor = "step_wise";
238
239 trips {
240 quiet_batt_trip1: quiet_batt-trip1 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530241 temperature = <38000>;
242 hysteresis = <3000>;
243 type = "passive";
244 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530245 quiet_batt_trip2: quiet_batt-trip2 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530246 temperature = <40000>;
247 hysteresis = <2000>;
248 type = "passive";
249 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530250 quiet_batt_trip3: quiet_batt-trip3 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530251 temperature = <43000>;
252 hysteresis = <3000>;
253 type = "passive";
254 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530255 quiet_cpus_trip: quiet_cpus-trip {
256 temperature = <43000>;
257 hysteresis = <0>;
258 type = "passive";
259 };
260 quiet_modem_trip0: quiet_modem-trip0 {
261 temperature = <45000>;
262 hysteresis = <2000>;
263 type = "passive";
264 };
265 quiet_batt_trip4: quiet_batt-trip4 {
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530266 temperature = <48000>;
267 hysteresis = <5000>;
268 type = "passive";
269 };
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530270 quiet_modem_trip1: quiet_modem-trip1 {
271 temperature = <48000>;
272 hysteresis = <3000>;
273 type = "passive";
274 };
275 quiet_modem_trip2: quiet_modem-trip2 {
276 temperature = <54000>;
277 hysteresis = <4000>;
278 type = "passive";
279 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530280 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530281 cooling-maps {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530282 skin_cpu0 {
283 trip = <&quiet_cpus_trip>;
284 /* throttle from fmax to 1689600KHz */
285 cooling-device = <&CPU0 THERMAL_NO_LIMIT 3>;
286 };
287 skin_cpu1 {
288 trip = <&quiet_cpus_trip>;
289 cooling-device = <&CPU1 THERMAL_NO_LIMIT 3>;
290 };
291 skin_cpu2 {
292 trip = <&quiet_cpus_trip>;
293 cooling-device = <&CPU2 THERMAL_NO_LIMIT 3>;
294 };
295 skin_cpu3 {
296 trip = <&quiet_cpus_trip>;
297 cooling-device = <&CPU3 THERMAL_NO_LIMIT 3>;
298 };
299 skin_cpu4 {
300 trip = <&quiet_cpus_trip>;
301 cooling-device = <&CPU4 THERMAL_NO_LIMIT 3>;
302 };
303 skin_cpu5 {
304 trip = <&quiet_cpus_trip>;
305 cooling-device = <&CPU5 THERMAL_NO_LIMIT 3>;
306 };
307 skin_cpu6 {
308 trip = <&quiet_cpus_trip>;
309 cooling-device = <&CPU6 THERMAL_NO_LIMIT 3>;
310 };
311 skin_cpu7 {
312 trip = <&quiet_cpus_trip>;
313 cooling-device = <&CPU7 THERMAL_NO_LIMIT 3>;
314 };
315 modem_lvl1 {
316 trip = <&quiet_modem_trip1>;
317 cooling-device = <&modem_pa 2 2>;
318 };
319 modem_lvl2 {
320 trip = <&quiet_modem_trip2>;
321 cooling-device = <&modem_pa 3 3>;
322 };
323 modem_proc_lvl1 {
324 trip = <&quiet_modem_trip0>;
325 cooling-device = <&modem_proc 1 1>;
326 };
327 modem_proc_lvl2 {
328 trip = <&quiet_modem_trip2>;
329 cooling-device = <&modem_proc 3 3>;
330 };
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530331 battery_lvl1 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530332 trip = <&quiet_batt_trip1>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530333 cooling-device = <&pmi632_charger 2 2>;
334 };
335 battery_lvl2 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530336 trip = <&quiet_batt_trip2>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530337 cooling-device = <&pmi632_charger 3 3>;
338 };
339 battery_lvl3 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530340 trip = <&quiet_batt_trip3>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530341 cooling-device = <&pmi632_charger 4 4>;
342 };
343 battery_lvl4 {
Manaf Meethalavalappu Pallikunhie5b6ec02018-04-05 17:30:26 +0530344 trip = <&quiet_batt_trip4>;
Manaf Meethalavalappu Pallikunhifc7be8b2018-03-02 01:00:17 +0530345 cooling-device = <&pmi632_charger 5 5>;
346 };
347 };
348 };
349};