Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 1 | /* |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 2 | * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 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 | &spmi_bus { |
| 15 | |
| 16 | qcom,pm8937@0 { |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 17 | compatible ="qcom,spmi-pmic"; |
| 18 | reg = <0x0 SPMI_USID>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 19 | #address-cells = <1>; |
| 20 | #size-cells = <1>; |
| 21 | |
| 22 | pm8937_revid: qcom,revid@100 { |
| 23 | compatible = "qcom,qpnp-revid"; |
| 24 | reg = <0x100 0x100>; |
| 25 | }; |
| 26 | |
| 27 | qcom,power-on@800 { |
| 28 | compatible = "qcom,qpnp-power-on"; |
| 29 | reg = <0x800 0x100>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 30 | interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>, |
| 31 | <0x0 0x8 0x1 IRQ_TYPE_NONE>, |
| 32 | <0x0 0x8 0x4 IRQ_TYPE_NONE>, |
| 33 | <0x0 0x8 0x5 IRQ_TYPE_NONE>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 34 | interrupt-names = "kpdpwr", "resin", |
| 35 | "resin-bark", "kpdpwr-resin-bark"; |
| 36 | qcom,pon-dbc-delay = <15625>; |
| 37 | qcom,system-reset; |
Lijuan Gao | c38b898 | 2018-03-26 15:01:06 +0800 | [diff] [blame^] | 38 | qcom,store-hard-reset-reason; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 39 | |
| 40 | qcom,pon_1 { |
| 41 | qcom,pon-type = <0>; |
| 42 | qcom,pull-up = <1>; |
| 43 | linux,code = <116>; |
| 44 | }; |
| 45 | |
| 46 | qcom,pon_2 { |
| 47 | qcom,pon-type = <1>; |
| 48 | qcom,pull-up = <1>; |
| 49 | linux,code = <114>; |
| 50 | }; |
| 51 | }; |
| 52 | |
| 53 | pm8937_temp_alarm: qcom,temp-alarm@2400 { |
| 54 | compatible = "qcom,qpnp-temp-alarm"; |
| 55 | reg = <0x2400 0x100>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 56 | interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 57 | label = "pm8937_tz"; |
| 58 | qcom,channel-num = <8>; |
| 59 | qcom,threshold-set = <0>; |
| 60 | qcom,temp_alarm-vadc = <&pm8937_vadc>; |
Manaf Meethalavalappu Pallikunhi | 814ebb6 | 2018-03-14 17:20:26 +0530 | [diff] [blame] | 61 | #thermal-sensor-cells = <0>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | pm8937_coincell: qcom,coincell@2800 { |
| 65 | compatible = "qcom,qpnp-coincell"; |
| 66 | reg = <0x2800 0x100>; |
| 67 | }; |
| 68 | |
| 69 | pm8937_rtc: qcom,pm8937_rtc { |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 70 | compatible = "qcom,qpnp-rtc"; |
| 71 | #address-cells = <1>; |
| 72 | #size-cells = <1>; |
| 73 | qcom,qpnp-rtc-write = <0>; |
| 74 | qcom,qpnp-rtc-alarm-pwrup = <0>; |
| 75 | |
| 76 | qcom,pm8937_rtc_rw@6000 { |
| 77 | reg = <0x6000 0x100>; |
| 78 | }; |
| 79 | |
| 80 | qcom,pm8937_rtc_alarm@6100 { |
| 81 | reg = <0x6100 0x100>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 82 | interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 83 | }; |
| 84 | }; |
| 85 | |
| 86 | pm8937_mpps: mpps { |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 87 | compatible = "qcom,spmi-mpp"; |
| 88 | reg = <0xa000 0x400>; |
| 89 | interrupts = <0x0 0xa0 0 IRQ_TYPE_NONE>, |
| 90 | <0x0 0xa1 0 IRQ_TYPE_NONE>, |
| 91 | <0x0 0xa2 0 IRQ_TYPE_NONE>, |
| 92 | <0x0 0xa3 0 IRQ_TYPE_NONE>; |
| 93 | interrupt-names = "pm8937_mpp1", "pm8937_mpp2", |
| 94 | "pm8937_mpp3", "pm8937_mpp4"; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 95 | gpio-controller; |
| 96 | #gpio-cells = <2>; |
Jishnu Prakash | 87f3b10 | 2018-02-15 13:48:57 +0530 | [diff] [blame] | 97 | |
| 98 | case_therm { |
| 99 | cas_therm_default: cas_therm_default { |
| 100 | pins = "mpp4"; |
| 101 | function = "analog"; |
| 102 | input-enable; |
| 103 | qcom,amux-route = <3>; |
| 104 | }; |
| 105 | }; |
| 106 | |
| 107 | pa_therm1 { |
| 108 | pa_therm1_default: pa_therm1_default { |
| 109 | pins = "mpp2"; |
| 110 | function = "analog"; |
| 111 | input-enable; |
| 112 | qcom,amux-route = <1>; |
| 113 | }; |
| 114 | }; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 115 | }; |
| 116 | |
| 117 | pm8937_gpios: gpios { |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 118 | compatible = "qcom,spmi-gpio"; |
| 119 | reg = <0xc000 0x800>; |
| 120 | interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>, |
| 121 | <0x0 0xc1 0 IRQ_TYPE_NONE>, |
| 122 | <0x0 0xc4 0 IRQ_TYPE_NONE>, |
| 123 | <0x0 0xc6 0 IRQ_TYPE_NONE>, |
| 124 | <0x0 0xc7 0 IRQ_TYPE_NONE>; |
| 125 | interrupt-names = "pm8937_gpio1", "pm8937_gpio2", |
| 126 | "pm8937_gpio5", "pmi8937_gpio7", |
| 127 | "pm8937_gpio8"; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 128 | gpio-controller; |
| 129 | #gpio-cells = <2>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 130 | qcom,gpios-disallowed = <3 4 6>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 131 | }; |
| 132 | |
| 133 | pm8937_vadc: vadc@3100 { |
| 134 | compatible = "qcom,qpnp-vadc"; |
| 135 | reg = <0x3100 0x100>; |
| 136 | #address-cells = <1>; |
| 137 | #size-cells = <0>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 138 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 139 | interrupt-names = "eoc-int-en-set"; |
| 140 | qcom,adc-bit-resolution = <15>; |
| 141 | qcom,adc-vdd-reference = <1800>; |
| 142 | qcom,vadc-poll-eoc; |
Jishnu Prakash | 87f3b10 | 2018-02-15 13:48:57 +0530 | [diff] [blame] | 143 | #thermal-sensor-cells = <1>; |
| 144 | pinctrl-names = "default"; |
| 145 | pinctrl-0 = <&pa_therm1_default &cas_therm_default>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 146 | |
| 147 | chan@5 { |
| 148 | label = "vcoin"; |
| 149 | reg = <5>; |
| 150 | qcom,decimation = <0>; |
| 151 | qcom,pre-div-channel-scaling = <1>; |
| 152 | qcom,calibration-type = "absolute"; |
| 153 | qcom,scale-function = <0>; |
| 154 | qcom,hw-settle-time = <0>; |
| 155 | qcom,fast-avg-setup = <0>; |
| 156 | }; |
| 157 | |
| 158 | chan@7 { |
| 159 | label = "vph_pwr"; |
| 160 | reg = <7>; |
| 161 | qcom,decimation = <0>; |
| 162 | qcom,pre-div-channel-scaling = <1>; |
| 163 | qcom,calibration-type = "absolute"; |
| 164 | qcom,scale-function = <0>; |
| 165 | qcom,hw-settle-time = <0>; |
| 166 | qcom,fast-avg-setup = <0>; |
| 167 | }; |
| 168 | |
| 169 | chan@8 { |
| 170 | label = "die_temp"; |
| 171 | reg = <8>; |
| 172 | qcom,decimation = <0>; |
| 173 | qcom,pre-div-channel-scaling = <0>; |
| 174 | qcom,calibration-type = "absolute"; |
| 175 | qcom,scale-function = <3>; |
| 176 | qcom,hw-settle-time = <0>; |
| 177 | qcom,fast-avg-setup = <0>; |
| 178 | }; |
| 179 | |
| 180 | chan@9 { |
| 181 | label = "ref_625mv"; |
| 182 | reg = <9>; |
| 183 | qcom,decimation = <0>; |
| 184 | qcom,pre-div-channel-scaling = <0>; |
| 185 | qcom,calibration-type = "absolute"; |
| 186 | qcom,scale-function = <0>; |
| 187 | qcom,hw-settle-time = <0>; |
| 188 | qcom,fast-avg-setup = <0>; |
| 189 | }; |
| 190 | |
| 191 | chan@a { |
| 192 | label = "ref_1250v"; |
| 193 | reg = <0xa>; |
| 194 | qcom,decimation = <0>; |
| 195 | qcom,pre-div-channel-scaling = <0>; |
| 196 | qcom,calibration-type = "absolute"; |
| 197 | qcom,scale-function = <0>; |
| 198 | qcom,hw-settle-time = <0>; |
| 199 | qcom,fast-avg-setup = <0>; |
| 200 | }; |
| 201 | |
| 202 | chan@c { |
| 203 | label = "ref_buf_625mv"; |
| 204 | reg = <0xc>; |
| 205 | qcom,decimation = <0>; |
| 206 | qcom,pre-div-channel-scaling = <0>; |
| 207 | qcom,calibration-type = "absolute"; |
| 208 | qcom,scale-function = <0>; |
| 209 | qcom,hw-settle-time = <0>; |
| 210 | qcom,fast-avg-setup = <0>; |
| 211 | }; |
| 212 | |
| 213 | chan@36 { |
| 214 | label = "pa_therm0"; |
| 215 | reg = <0x36>; |
| 216 | qcom,decimation = <0>; |
| 217 | qcom,pre-div-channel-scaling = <0>; |
| 218 | qcom,calibration-type = "ratiometric"; |
| 219 | qcom,scale-function = <2>; |
| 220 | qcom,hw-settle-time = <2>; |
| 221 | qcom,fast-avg-setup = <0>; |
| 222 | }; |
| 223 | |
| 224 | chan@11 { |
| 225 | label = "pa_therm1"; |
| 226 | reg = <0x11>; |
| 227 | qcom,decimation = <0>; |
| 228 | qcom,pre-div-channel-scaling = <0>; |
| 229 | qcom,calibration-type = "ratiometric"; |
| 230 | qcom,scale-function = <2>; |
| 231 | qcom,hw-settle-time = <2>; |
| 232 | qcom,fast-avg-setup = <0>; |
| 233 | qcom,vadc-thermal-node; |
| 234 | }; |
| 235 | |
| 236 | chan@32 { |
| 237 | label = "xo_therm"; |
| 238 | reg = <0x32>; |
| 239 | qcom,decimation = <0>; |
| 240 | qcom,pre-div-channel-scaling = <0>; |
| 241 | qcom,calibration-type = "ratiometric"; |
| 242 | qcom,scale-function = <4>; |
| 243 | qcom,hw-settle-time = <2>; |
| 244 | qcom,fast-avg-setup = <0>; |
| 245 | qcom,vadc-thermal-node; |
| 246 | }; |
| 247 | |
| 248 | chan@3c { |
| 249 | label = "xo_therm_buf"; |
| 250 | reg = <0x3c>; |
| 251 | qcom,decimation = <0>; |
| 252 | qcom,pre-div-channel-scaling = <0>; |
| 253 | qcom,calibration-type = "ratiometric"; |
| 254 | qcom,scale-function = <4>; |
| 255 | qcom,hw-settle-time = <2>; |
| 256 | qcom,fast-avg-setup = <0>; |
| 257 | qcom,vadc-thermal-node; |
| 258 | }; |
| 259 | |
| 260 | chan@13 { |
| 261 | label = "case_therm"; |
| 262 | reg = <0x13>; |
| 263 | qcom,decimation = <0>; |
| 264 | qcom,pre-div-channel-scaling = <0>; |
| 265 | qcom,calibration-type = "ratiometric"; |
| 266 | qcom,scale-function = <2>; |
| 267 | qcom,hw-settle-time = <2>; |
| 268 | qcom,fast-avg-setup = <0>; |
| 269 | qcom,vadc-thermal-node; |
| 270 | }; |
| 271 | }; |
| 272 | |
| 273 | pm8937_adc_tm: vadc@3400 { |
| 274 | compatible = "qcom,qpnp-adc-tm"; |
| 275 | reg = <0x3400 0x100>; |
| 276 | #address-cells = <1>; |
| 277 | #size-cells = <0>; |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 278 | interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>, |
| 279 | <0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>, |
| 280 | <0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 281 | interrupt-names = "eoc-int-en-set", |
| 282 | "high-thr-en-set", |
| 283 | "low-thr-en-set"; |
| 284 | qcom,adc-bit-resolution = <15>; |
| 285 | qcom,adc-vdd-reference = <1800>; |
| 286 | qcom,adc_tm-vadc = <&pm8937_vadc>; |
| 287 | |
| 288 | chan@36 { |
| 289 | label = "pa_therm0"; |
| 290 | reg = <0x36>; |
| 291 | qcom,decimation = <0>; |
| 292 | qcom,pre-div-channel-scaling = <0>; |
| 293 | qcom,calibration-type = "ratiometric"; |
| 294 | qcom,scale-function = <2>; |
| 295 | qcom,hw-settle-time = <2>; |
| 296 | qcom,fast-avg-setup = <0>; |
| 297 | qcom,btm-channel-number = <0x48>; |
| 298 | qcom,thermal-node; |
| 299 | }; |
| 300 | |
| 301 | chan@7 { |
| 302 | label = "vph_pwr"; |
| 303 | reg = <0x7>; |
| 304 | qcom,decimation = <0>; |
| 305 | qcom,pre-div-channel-scaling = <1>; |
| 306 | qcom,calibration-type = "absolute"; |
| 307 | qcom,scale-function = <0>; |
| 308 | qcom,hw-settle-time = <0>; |
| 309 | qcom,fast-avg-setup = <0>; |
| 310 | qcom,btm-channel-number = <0x68>; |
| 311 | }; |
| 312 | }; |
| 313 | |
| 314 | }; |
| 315 | |
| 316 | pm8937_1: qcom,pm8937@1 { |
Tirupathi Reddy | c971c3d | 2017-12-18 11:48:11 +0530 | [diff] [blame] | 317 | compatible = "qcom,spmi-pmic"; |
| 318 | reg = <0x1 SPMI_USID>; |
Tirupathi Reddy | 4a9ce7e | 2017-12-15 16:54:38 +0530 | [diff] [blame] | 319 | #address-cells = <1>; |
| 320 | #size-cells = <1>; |
| 321 | |
| 322 | pm8937_pwm: pwm@bc00 { |
| 323 | status = "disabled"; |
| 324 | compatible = "qcom,qpnp-pwm"; |
| 325 | reg = <0xbc00 0x100>; |
| 326 | reg-names = "qpnp-lpg-channel-base"; |
| 327 | qcom,channel-id = <0>; |
| 328 | qcom,supported-sizes = <6>, <9>; |
| 329 | #pwm-cells = <2>; |
| 330 | }; |
| 331 | }; |
| 332 | }; |
Jishnu Prakash | 87f3b10 | 2018-02-15 13:48:57 +0530 | [diff] [blame] | 333 | |
| 334 | &thermal_zones { |
| 335 | pa-therm1-adc { |
| 336 | polling-delay-passive = <0>; |
| 337 | polling-delay = <0>; |
| 338 | thermal-sensors = <&pm8937_vadc 0x11>; |
| 339 | thermal-governor = "user_space"; |
| 340 | |
| 341 | trips { |
| 342 | active-config0 { |
| 343 | temperature = <65000>; |
| 344 | hysteresis = <1000>; |
| 345 | type = "passive"; |
| 346 | }; |
| 347 | }; |
| 348 | }; |
| 349 | |
| 350 | xo-therm-adc { |
| 351 | polling-delay-passive = <0>; |
| 352 | polling-delay = <0>; |
| 353 | thermal-sensors = <&pm8937_vadc 0x32>; |
| 354 | thermal-governor = "user_space"; |
| 355 | |
| 356 | trips { |
| 357 | active-config0 { |
| 358 | temperature = <65000>; |
| 359 | hysteresis = <1000>; |
| 360 | type = "passive"; |
| 361 | }; |
| 362 | }; |
| 363 | }; |
| 364 | |
| 365 | xo-therm-buf-adc { |
| 366 | polling-delay-passive = <0>; |
| 367 | polling-delay = <0>; |
| 368 | thermal-sensors = <&pm8937_vadc 0x3c>; |
| 369 | thermal-governor = "user_space"; |
| 370 | |
| 371 | trips { |
| 372 | active-config0 { |
| 373 | temperature = <65000>; |
| 374 | hysteresis = <1000>; |
| 375 | type = "passive"; |
| 376 | }; |
| 377 | }; |
| 378 | }; |
| 379 | |
| 380 | case-therm-adc { |
| 381 | polling-delay-passive = <0>; |
| 382 | polling-delay = <0>; |
| 383 | thermal-sensors = <&pm8937_vadc 0x13>; |
| 384 | thermal-governor = "user_space"; |
| 385 | |
| 386 | trips { |
| 387 | active-config0 { |
| 388 | temperature = <65000>; |
| 389 | hysteresis = <1000>; |
| 390 | type = "passive"; |
| 391 | }; |
| 392 | }; |
| 393 | }; |
| 394 | |
| 395 | pa-therm0-adc { |
| 396 | polling-delay-passive = <0>; |
| 397 | polling-delay = <0>; |
| 398 | thermal-sensors = <&pm8937_adc_tm 0x36>; |
| 399 | thermal-governor = "user_space"; |
| 400 | |
| 401 | trips { |
| 402 | active-config0 { |
| 403 | temperature = <65000>; |
| 404 | hysteresis = <1000>; |
| 405 | type = "passive"; |
| 406 | }; |
| 407 | }; |
| 408 | }; |
Manaf Meethalavalappu Pallikunhi | 814ebb6 | 2018-03-14 17:20:26 +0530 | [diff] [blame] | 409 | |
| 410 | pm8937_tz { |
| 411 | polling-delay-passive = <0>; |
| 412 | polling-delay = <0>; |
| 413 | thermal-governor = "step_wise"; |
| 414 | thermal-sensors = <&pm8937_temp_alarm>; |
| 415 | |
| 416 | trips { |
| 417 | pm8937_trip0: pm8937-trip0 { |
| 418 | temperature = <105000>; |
| 419 | hysteresis = <0>; |
| 420 | type = "passive"; |
| 421 | }; |
| 422 | pm8937_trip1: pm8937-trip1 { |
| 423 | temperature = <125000>; |
| 424 | hysteresis = <0>; |
| 425 | type = "passive"; |
| 426 | }; |
| 427 | pm8937_trip2: pm8937-trip2 { |
| 428 | temperature = <145000>; |
| 429 | hysteresis = <0>; |
| 430 | type = "passive"; |
| 431 | }; |
| 432 | }; |
| 433 | }; |
Jishnu Prakash | 87f3b10 | 2018-02-15 13:48:57 +0530 | [diff] [blame] | 434 | }; |