Umang Agrawal | fbbfb7f | 2017-12-29 19:27:01 +0530 | [diff] [blame] | 1 | /* |
| 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 Agrawal | f0178c9 | 2017-12-28 15:04:51 +0530 | [diff] [blame] | 24 | |
| 25 | &pmi632_pon { |
| 26 | qcom,ps-hold-hard-reset-disable; |
| 27 | qcom,ps-hold-shutdown-disable; |
| 28 | }; |
Sriharsha Allenki | b379782 | 2018-02-12 18:09:01 +0530 | [diff] [blame] | 29 | |
| 30 | &usb3 { |
Pratham Pratap | e450ff7 | 2018-02-20 14:00:39 +0530 | [diff] [blame] | 31 | extcon = <&pmi632_charger>, <&pmi632_charger>, <0>, |
| 32 | <&pmi632_charger>, <&pmi632_charger>; |
Sriharsha Allenki | b379782 | 2018-02-12 18:09:01 +0530 | [diff] [blame] | 33 | vbus_dwc3-supply = <&smb5_vbus>; |
| 34 | }; |
Anirudh Ghayal | b4b5228 | 2018-02-16 19:56:15 +0530 | [diff] [blame] | 35 | |
| 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 Prakash | 93cef68 | 2018-04-26 16:10:41 +0530 | [diff] [blame] | 44 | &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 Ghayal | b4b5228 | 2018-02-16 19:56:15 +0530 | [diff] [blame] | 65 | &pmi632_qg { |
| 66 | qcom,battery-data = <&mtp_batterydata>; |
Anirudh Ghayal | b4b5228 | 2018-02-16 19:56:15 +0530 | [diff] [blame] | 67 | }; |
Vishnuvardhan Prodduturi | 886d44e | 2018-01-25 18:29:43 +0530 | [diff] [blame] | 68 | |
Ashay Jaiswal | 589939b | 2018-04-20 11:44:05 +0530 | [diff] [blame] | 69 | &pmi632_charger { |
| 70 | qcom,battery-data = <&mtp_batterydata>; |
| 71 | }; |
| 72 | |
Vishnuvardhan Prodduturi | 886d44e | 2018-01-25 18:29:43 +0530 | [diff] [blame] | 73 | &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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 87 | |
| 88 | &thermal_zones { |
Manaf Meethalavalappu Pallikunhi | 20763dda | 2018-03-09 19:34:43 +0530 | [diff] [blame] | 89 | pmi-vbat-lvl0 { |
Manaf Meethalavalappu Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 90 | cooling-maps { |
Manaf Meethalavalappu Pallikunhi | 2c240a6 | 2018-04-05 23:54:47 +0530 | [diff] [blame] | 91 | 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 Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 112 | vbat_map4 { |
Manaf Meethalavalappu Pallikunhi | 20763dda | 2018-03-09 19:34:43 +0530 | [diff] [blame] | 113 | trip = <&pmi632_vbat_lvl0>; |
Manaf Meethalavalappu Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 114 | cooling-device = |
| 115 | <&CPU4 THERMAL_MAX_LIMIT |
| 116 | THERMAL_MAX_LIMIT>; |
| 117 | }; |
| 118 | vbat_map5 { |
Manaf Meethalavalappu Pallikunhi | 20763dda | 2018-03-09 19:34:43 +0530 | [diff] [blame] | 119 | trip = <&pmi632_vbat_lvl0>; |
Manaf Meethalavalappu Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 120 | cooling-device = |
| 121 | <&CPU5 THERMAL_MAX_LIMIT |
| 122 | THERMAL_MAX_LIMIT>; |
| 123 | }; |
| 124 | vbat_map6 { |
Manaf Meethalavalappu Pallikunhi | 20763dda | 2018-03-09 19:34:43 +0530 | [diff] [blame] | 125 | trip = <&pmi632_vbat_lvl0>; |
Manaf Meethalavalappu Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 126 | cooling-device = |
| 127 | <&CPU6 THERMAL_MAX_LIMIT |
| 128 | THERMAL_MAX_LIMIT>; |
| 129 | }; |
| 130 | vbat_map7 { |
Manaf Meethalavalappu Pallikunhi | 20763dda | 2018-03-09 19:34:43 +0530 | [diff] [blame] | 131 | trip = <&pmi632_vbat_lvl0>; |
Manaf Meethalavalappu Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 132 | cooling-device = |
| 133 | <&CPU7 THERMAL_MAX_LIMIT |
| 134 | THERMAL_MAX_LIMIT>; |
| 135 | }; |
| 136 | }; |
| 137 | }; |
| 138 | |
Manaf Meethalavalappu Pallikunhi | 2c240a6 | 2018-04-05 23:54:47 +0530 | [diff] [blame] | 139 | 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 Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 189 | soc { |
| 190 | cooling-maps { |
Manaf Meethalavalappu Pallikunhi | 2c240a6 | 2018-04-05 23:54:47 +0530 | [diff] [blame] | 191 | 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 Pallikunhi | 4f35897 | 2018-03-05 12:04:10 +0530 | [diff] [blame] | 212 | 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 Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 239 | 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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 245 | trips { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 246 | 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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 266 | temperature = <38000>; |
| 267 | hysteresis = <3000>; |
| 268 | type = "passive"; |
| 269 | }; |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 270 | quiet_batt_trip2: quiet_batt-trip2 { |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 271 | temperature = <40000>; |
| 272 | hysteresis = <2000>; |
| 273 | type = "passive"; |
| 274 | }; |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 275 | quiet_batt_trip3: quiet_batt-trip3 { |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 276 | temperature = <43000>; |
| 277 | hysteresis = <3000>; |
| 278 | type = "passive"; |
| 279 | }; |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 280 | 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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 291 | temperature = <48000>; |
| 292 | hysteresis = <5000>; |
| 293 | type = "passive"; |
| 294 | }; |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 295 | 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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 305 | }; |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 306 | cooling-maps { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 307 | 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 Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 356 | battery_lvl1 { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 357 | trip = <&quiet_batt_trip1>; |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 358 | cooling-device = <&pmi632_charger 2 2>; |
| 359 | }; |
| 360 | battery_lvl2 { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 361 | trip = <&quiet_batt_trip2>; |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 362 | cooling-device = <&pmi632_charger 3 3>; |
| 363 | }; |
| 364 | battery_lvl3 { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 365 | trip = <&quiet_batt_trip3>; |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 366 | cooling-device = <&pmi632_charger 4 4>; |
| 367 | }; |
| 368 | battery_lvl4 { |
Manaf Meethalavalappu Pallikunhi | e5b6ec0 | 2018-04-05 17:30:26 +0530 | [diff] [blame] | 369 | trip = <&quiet_batt_trip4>; |
Manaf Meethalavalappu Pallikunhi | fc7be8b | 2018-03-02 01:00:17 +0530 | [diff] [blame] | 370 | cooling-device = <&pmi632_charger 5 5>; |
| 371 | }; |
| 372 | }; |
| 373 | }; |
| 374 | }; |
Rashi Bindra | 75fcbe2 | 2018-05-09 21:58:25 +0530 | [diff] [blame] | 375 | |
tracychui | 3515162 | 2020-04-29 16:24:36 +0800 | [diff] [blame^] | 376 | &i2c_3 { |
| 377 | status = "ok"; |
| 378 | himax_ts@48 { |
| 379 | compatible = "himax,hxcommon"; |
| 380 | reg = <0x48>; |
| 381 | interrupt-parent = <&tlmm>; |
| 382 | interrupts = <65 0x2008>; |
| 383 | vcc_i2c-supply = <&pm8953_l6>; |
| 384 | vdd-ana-supply = <&pm8953_l10>; |
| 385 | himax,display-coords = <0 1080 0 2160>; |
| 386 | himax,panel-coords = <0 1080 0 2160>; |
| 387 | himax,irq-gpio = <&tlmm 65 0x2008>; |
| 388 | himax,rst-gpio = <&tlmm 64 0x00>; |
| 389 | report_type = <1>; |
| 390 | }; |
| 391 | }; |