Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <dt-bindings/spmi/spmi.h> |
| 14 | #include <dt-bindings/interrupt-controller/irq.h> |
| 15 | |
| 16 | &spmi_bus { |
Tirupathi Reddy | 4b98308 | 2017-09-04 10:11:15 +0530 | [diff] [blame] | 17 | pm660_0: qcom,pm660@0 { |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 18 | compatible ="qcom,spmi-pmic"; |
| 19 | reg = <0x0 SPMI_USID>; |
| 20 | #address-cells = <2>; |
| 21 | #size-cells = <0>; |
| 22 | |
| 23 | pm660_revid: qcom,revid@100 { |
| 24 | compatible = "qcom,qpnp-revid"; |
| 25 | reg = <0x100 0x100>; |
| 26 | qcom,fab-id-valid; |
| 27 | }; |
| 28 | |
| 29 | pm660_misc: qcom,misc@900 { |
| 30 | compatible = "qcom,qpnp-misc"; |
| 31 | reg = <0x900 0x100>; |
| 32 | }; |
| 33 | |
| 34 | qcom,power-on@800 { |
| 35 | compatible = "qcom,qpnp-power-on"; |
| 36 | reg = <0x800 0x100>; |
| 37 | interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>, |
| 38 | <0x0 0x8 0x1 IRQ_TYPE_NONE>, |
| 39 | <0x0 0x8 0x4 IRQ_TYPE_NONE>, |
| 40 | <0x0 0x8 0x5 IRQ_TYPE_NONE>; |
| 41 | interrupt-names = "kpdpwr", "resin", |
| 42 | "resin-bark", "kpdpwr-resin-bark"; |
| 43 | qcom,pon-dbc-delay = <15625>; |
| 44 | qcom,kpdpwr-sw-debounce; |
| 45 | qcom,system-reset; |
| 46 | qcom,store-hard-reset-reason; |
| 47 | |
| 48 | qcom,pon_1 { |
| 49 | qcom,pon-type = <0>; |
| 50 | qcom,pull-up = <1>; |
| 51 | linux,code = <116>; |
| 52 | }; |
| 53 | |
| 54 | qcom,pon_2 { |
| 55 | qcom,pon-type = <1>; |
| 56 | qcom,pull-up = <1>; |
| 57 | linux,code = <114>; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | qcom,temp-alarm@2400 { |
| 62 | compatible = "qcom,qpnp-temp-alarm"; |
| 63 | reg = <0x2400 0x100>; |
| 64 | interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| 65 | label = "pm660_tz"; |
| 66 | qcom,channel-num = <6>; |
| 67 | qcom,temp_alarm-vadc = <&pm660_vadc>; |
| 68 | }; |
| 69 | |
Tirupathi Reddy | a1f7344 | 2017-08-11 12:31:00 +0530 | [diff] [blame] | 70 | pm660_gpios: pinctrl@c000 { |
| 71 | compatible = "qcom,spmi-gpio"; |
| 72 | reg = <0xc000 0xd00>; |
| 73 | interrupts = <0x0 0xc1 0 IRQ_TYPE_NONE>, |
| 74 | <0x0 0xc2 0 IRQ_TYPE_NONE>, |
| 75 | <0x0 0xc3 0 IRQ_TYPE_NONE>, |
| 76 | <0x0 0xc8 0 IRQ_TYPE_NONE>, |
| 77 | <0x0 0xca 0 IRQ_TYPE_NONE>, |
| 78 | <0x0 0xcb 0 IRQ_TYPE_NONE>, |
| 79 | <0x0 0xcc 0 IRQ_TYPE_NONE>; |
| 80 | interrupt-names = "pm660_gpio2", "pm660_gpio3", |
| 81 | "pm660_gpio4", "pm660_gpio9", |
| 82 | "pm660_gpio11", "pm660_gpio12", |
| 83 | "pm660_gpio13"; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 84 | gpio-controller; |
| 85 | #gpio-cells = <2>; |
Tirupathi Reddy | a1f7344 | 2017-08-11 12:31:00 +0530 | [diff] [blame] | 86 | qcom,gpios-disallowed = <1 5 6 7 8 10>; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | pm660_coincell: qcom,coincell@2800 { |
| 90 | compatible = "qcom,qpnp-coincell"; |
| 91 | reg = <0x2800 0x100>; |
| 92 | }; |
| 93 | |
| 94 | pm660_rtc: qcom,pm660_rtc { |
| 95 | compatible = "qcom,qpnp-rtc"; |
| 96 | #address-cells = <1>; |
| 97 | #size-cells = <1>; |
| 98 | qcom,qpnp-rtc-write = <0>; |
| 99 | qcom,qpnp-rtc-alarm-pwrup = <0>; |
| 100 | |
| 101 | qcom,pm660_rtc_rw@6000 { |
| 102 | reg = <0x6000 0x100>; |
| 103 | }; |
| 104 | qcom,pm660_rtc_alarm@6100 { |
| 105 | reg = <0x6100 0x100>; |
| 106 | interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; |
| 107 | }; |
| 108 | }; |
| 109 | |
| 110 | pm660_vadc: vadc@3100 { |
| 111 | compatible = "qcom,qpnp-vadc-hc"; |
| 112 | reg = <0x3100 0x100>; |
| 113 | #address-cells = <1>; |
| 114 | #size-cells = <0>; |
| 115 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 116 | interrupt-names = "eoc-int-en-set"; |
| 117 | qcom,adc-bit-resolution = <15>; |
| 118 | qcom,adc-vdd-reference = <1875>; |
| 119 | |
| 120 | chan@6 { |
| 121 | label = "die_temp"; |
| 122 | reg = <6>; |
| 123 | qcom,decimation = <2>; |
| 124 | qcom,pre-div-channel-scaling = <0>; |
| 125 | qcom,calibration-type = "absolute"; |
| 126 | qcom,scale-function = <3>; |
| 127 | qcom,hw-settle-time = <0>; |
| 128 | qcom,fast-avg-setup = <0>; |
| 129 | qcom,cal-val = <0>; |
| 130 | }; |
| 131 | |
| 132 | chan@0 { |
| 133 | label = "ref_gnd"; |
| 134 | reg = <0>; |
| 135 | qcom,decimation = <2>; |
| 136 | qcom,pre-div-channel-scaling = <0>; |
| 137 | qcom,calibration-type = "absolute"; |
| 138 | qcom,scale-function = <0>; |
| 139 | qcom,hw-settle-time = <0>; |
| 140 | qcom,fast-avg-setup = <0>; |
| 141 | qcom,cal-val = <0>; |
| 142 | }; |
| 143 | |
| 144 | chan@1 { |
| 145 | label = "ref_1250v"; |
| 146 | reg = <1>; |
| 147 | qcom,decimation = <2>; |
| 148 | qcom,pre-div-channel-scaling = <0>; |
| 149 | qcom,calibration-type = "absolute"; |
| 150 | qcom,scale-function = <0>; |
| 151 | qcom,hw-settle-time = <0>; |
| 152 | qcom,fast-avg-setup = <0>; |
| 153 | qcom,cal-val = <0>; |
| 154 | }; |
| 155 | |
| 156 | chan@83 { |
| 157 | label = "vph_pwr"; |
| 158 | reg = <0x83>; |
| 159 | qcom,decimation = <2>; |
| 160 | qcom,pre-div-channel-scaling = <1>; |
| 161 | qcom,calibration-type = "absolute"; |
| 162 | qcom,scale-function = <0>; |
| 163 | qcom,hw-settle-time = <0>; |
| 164 | qcom,fast-avg-setup = <0>; |
| 165 | }; |
| 166 | |
| 167 | chan@85 { |
| 168 | label = "vcoin"; |
| 169 | reg = <0x85>; |
| 170 | qcom,decimation = <2>; |
| 171 | qcom,pre-div-channel-scaling = <1>; |
| 172 | qcom,calibration-type = "absolute"; |
| 173 | qcom,scale-function = <0>; |
| 174 | qcom,hw-settle-time = <0>; |
| 175 | qcom,fast-avg-setup = <0>; |
| 176 | }; |
| 177 | |
| 178 | chan@4c { |
| 179 | label = "xo_therm"; |
| 180 | reg = <0x4c>; |
| 181 | qcom,decimation = <2>; |
| 182 | qcom,pre-div-channel-scaling = <0>; |
| 183 | qcom,calibration-type = "ratiometric"; |
| 184 | qcom,scale-function = <4>; |
| 185 | qcom,hw-settle-time = <2>; |
| 186 | qcom,fast-avg-setup = <0>; |
| 187 | }; |
| 188 | |
| 189 | chan@4d { |
| 190 | label = "msm_therm"; |
| 191 | reg = <0x4d>; |
| 192 | qcom,decimation = <2>; |
| 193 | qcom,pre-div-channel-scaling = <0>; |
| 194 | qcom,calibration-type = "ratiometric"; |
| 195 | qcom,scale-function = <2>; |
| 196 | qcom,hw-settle-time = <2>; |
| 197 | qcom,fast-avg-setup = <0>; |
| 198 | }; |
| 199 | |
| 200 | chan@51 { |
| 201 | label = "quiet_therm"; |
| 202 | reg = <0x51>; |
| 203 | qcom,decimation = <2>; |
| 204 | qcom,pre-div-channel-scaling = <0>; |
| 205 | qcom,calibration-type = "ratiometric"; |
| 206 | qcom,scale-function = <2>; |
| 207 | qcom,hw-settle-time = <2>; |
| 208 | qcom,fast-avg-setup = <0>; |
| 209 | }; |
| 210 | |
| 211 | chan@4e { |
| 212 | label = "emmc_therm"; |
| 213 | reg = <0x4e>; |
| 214 | qcom,decimation = <2>; |
| 215 | qcom,pre-div-channel-scaling = <0>; |
| 216 | qcom,calibration-type = "ratiometric"; |
| 217 | qcom,scale-function = <2>; |
| 218 | qcom,hw-settle-time = <2>; |
| 219 | qcom,fast-avg-setup = <0>; |
| 220 | qcom,vadc-thermal-node; |
| 221 | }; |
| 222 | |
| 223 | chan@4f { |
| 224 | label = "pa_therm0"; |
| 225 | reg = <0x4f>; |
| 226 | qcom,decimation = <2>; |
| 227 | qcom,pre-div-channel-scaling = <0>; |
| 228 | qcom,calibration-type = "ratiometric"; |
| 229 | qcom,scale-function = <2>; |
| 230 | qcom,hw-settle-time = <2>; |
| 231 | qcom,fast-avg-setup = <0>; |
| 232 | qcom,vadc-thermal-node; |
| 233 | }; |
| 234 | |
| 235 | chan@1d { |
| 236 | label = "drax_temp"; |
| 237 | reg = <0x1d>; |
| 238 | qcom,decimation = <2>; |
| 239 | qcom,pre-div-channel-scaling = <0>; |
| 240 | qcom,calibration-type = "absolute"; |
| 241 | qcom,scale-function = <3>; |
| 242 | qcom,hw-settle-time = <0>; |
| 243 | qcom,fast-avg-setup = <0>; |
| 244 | qcom,cal-val = <0>; |
| 245 | }; |
| 246 | }; |
| 247 | |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 248 | pm660_pdphy: qcom,usb-pdphy@1700 { |
| 249 | compatible = "qcom,qpnp-pdphy"; |
| 250 | reg = <0x1700 0x100>; |
| 251 | vdd-pdphy-supply = <&pm660l_l7>; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 252 | interrupts = <0x0 0x17 0x0 IRQ_TYPE_EDGE_RISING>, |
| 253 | <0x0 0x17 0x1 IRQ_TYPE_EDGE_RISING>, |
| 254 | <0x0 0x17 0x2 IRQ_TYPE_EDGE_RISING>, |
| 255 | <0x0 0x17 0x3 IRQ_TYPE_EDGE_RISING>, |
| 256 | <0x0 0x17 0x4 IRQ_TYPE_EDGE_RISING>, |
| 257 | <0x0 0x17 0x5 IRQ_TYPE_EDGE_RISING>, |
| 258 | <0x0 0x17 0x6 IRQ_TYPE_EDGE_RISING>; |
| 259 | |
| 260 | interrupt-names = "sig-tx", |
| 261 | "sig-rx", |
| 262 | "msg-tx", |
| 263 | "msg-rx", |
| 264 | "msg-tx-failed", |
| 265 | "msg-tx-discarded", |
| 266 | "msg-rx-discarded"; |
| 267 | |
| 268 | qcom,default-sink-caps = <5000 3000>, /* 5V @ 3A */ |
| 269 | <9000 3000>; /* 9V @ 3A */ |
| 270 | }; |
| 271 | |
| 272 | pm660_adc_tm: vadc@3400 { |
| 273 | compatible = "qcom,qpnp-adc-tm-hc"; |
| 274 | reg = <0x3400 0x100>; |
| 275 | #address-cells = <1>; |
| 276 | #size-cells = <0>; |
| 277 | interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; |
| 278 | interrupt-names = "eoc-int-en-set"; |
| 279 | qcom,adc-bit-resolution = <15>; |
| 280 | qcom,adc-vdd-reference = <1875>; |
| 281 | qcom,adc_tm-vadc = <&pm660_vadc>; |
| 282 | qcom,decimation = <0>; |
| 283 | qcom,fast-avg-setup = <0>; |
Lakshmi Sunkara | 5afac23 | 2017-06-27 18:06:25 +0530 | [diff] [blame] | 284 | #thermal-sensor-cells = <1>; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 285 | |
| 286 | chan@83 { |
| 287 | label = "vph_pwr"; |
| 288 | reg = <0x83>; |
| 289 | qcom,pre-div-channel-scaling = <1>; |
| 290 | qcom,calibration-type = "absolute"; |
| 291 | qcom,scale-function = <0>; |
| 292 | qcom,hw-settle-time = <0>; |
| 293 | qcom,btm-channel-number = <0x60>; |
| 294 | }; |
| 295 | |
| 296 | chan@4d { |
| 297 | label = "msm_therm"; |
| 298 | reg = <0x4d>; |
| 299 | qcom,pre-div-channel-scaling = <0>; |
| 300 | qcom,calibration-type = "ratiometric"; |
| 301 | qcom,scale-function = <2>; |
| 302 | qcom,hw-settle-time = <2>; |
| 303 | qcom,btm-channel-number = <0x68>; |
| 304 | qcom,thermal-node; |
| 305 | }; |
| 306 | |
| 307 | chan@51 { |
| 308 | label = "quiet_therm"; |
| 309 | reg = <0x51>; |
| 310 | qcom,pre-div-channel-scaling = <0>; |
| 311 | qcom,calibration-type = "ratiometric"; |
| 312 | qcom,scale-function = <2>; |
| 313 | qcom,hw-settle-time = <2>; |
| 314 | qcom,btm-channel-number = <0x70>; |
| 315 | qcom,thermal-node; |
| 316 | }; |
| 317 | |
| 318 | chan@4c { |
| 319 | label = "xo_therm"; |
| 320 | reg = <0x4c>; |
| 321 | qcom,pre-div-channel-scaling = <0>; |
| 322 | qcom,calibration-type = "ratiometric"; |
| 323 | qcom,scale-function = <4>; |
| 324 | qcom,hw-settle-time = <2>; |
| 325 | qcom,btm-channel-number = <0x78>; |
| 326 | qcom,thermal-node; |
| 327 | }; |
Lakshmi Sunkara | 5afac23 | 2017-06-27 18:06:25 +0530 | [diff] [blame] | 328 | |
| 329 | chan@4e { |
| 330 | label = "emmc_therm"; |
| 331 | reg = <0x4e>; |
| 332 | qcom,pre-div-channel-scaling = <0>; |
| 333 | qcom,calibration-type = "ratiometric"; |
| 334 | qcom,scale-function = <2>; |
| 335 | qcom,hw-settle-time = <2>; |
| 336 | qcom,btm-channel-number = <0x80>; |
| 337 | qcom,vadc-thermal-node; |
| 338 | }; |
| 339 | |
| 340 | chan@4f { |
| 341 | label = "pa_therm0"; |
| 342 | reg = <0x4f>; |
| 343 | qcom,pre-div-channel-scaling = <0>; |
| 344 | qcom,calibration-type = "ratiometric"; |
| 345 | qcom,scale-function = <2>; |
| 346 | qcom,hw-settle-time = <2>; |
| 347 | qcom,btm-channel-number = <0x88>; |
| 348 | qcom,vadc-thermal-node; |
| 349 | }; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 350 | }; |
| 351 | |
| 352 | pm660_rradc: rradc@4500 { |
| 353 | compatible = "qcom,rradc"; |
| 354 | reg = <0x4500 0x100>; |
| 355 | #address-cells = <1>; |
| 356 | #size-cells = <0>; |
| 357 | #io-channel-cells = <1>; |
| 358 | qcom,pmic-revid = <&pm660_revid>; |
| 359 | }; |
| 360 | |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 361 | bcl@4200 { |
| 362 | compatible = "qcom,msm-bcl-lmh"; |
| 363 | reg = <0x4200 0xff>, |
| 364 | <0x4300 0xff>; |
| 365 | reg-names = "fg_user_adc", |
| 366 | "fg_lmh"; |
| 367 | interrupts = <0x0 0x42 0x0 IRQ_TYPE_NONE>, |
| 368 | <0x0 0x42 0x2 IRQ_TYPE_NONE>; |
| 369 | interrupt-names = "bcl-high-ibat-int", |
| 370 | "bcl-low-vbat-int"; |
| 371 | qcom,vbat-polling-delay-ms = <100>; |
| 372 | qcom,ibat-polling-delay-ms = <100>; |
| 373 | }; |
| 374 | }; |
| 375 | |
Tirupathi Reddy | 4b98308 | 2017-09-04 10:11:15 +0530 | [diff] [blame] | 376 | pm660_1: qcom,pm660@1 { |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 377 | compatible ="qcom,spmi-pmic"; |
| 378 | reg = <0x1 SPMI_USID>; |
| 379 | #address-cells = <2>; |
| 380 | #size-cells = <0>; |
| 381 | }; |
| 382 | }; |
Lakshmi Sunkara | 5afac23 | 2017-06-27 18:06:25 +0530 | [diff] [blame] | 383 | |
| 384 | &thermal_zones { |
| 385 | xo-therm-adc { |
| 386 | polling-delay-passive = <0>; |
| 387 | polling-delay = <0>; |
| 388 | thermal-sensors = <&pm660_adc_tm 0x4c>; |
| 389 | thermal-governor = "user_space"; |
| 390 | |
| 391 | trips { |
| 392 | active-config0 { |
| 393 | temperature = <65000>; |
| 394 | hysteresis = <1000>; |
| 395 | type = "passive"; |
| 396 | }; |
| 397 | }; |
| 398 | }; |
| 399 | |
| 400 | msm-therm-adc { |
| 401 | polling-delay-passive = <0>; |
| 402 | polling-delay = <0>; |
| 403 | thermal-sensors = <&pm660_adc_tm 0x4d>; |
| 404 | thermal-governor = "user_space"; |
| 405 | |
| 406 | trips { |
| 407 | active-config0 { |
| 408 | temperature = <65000>; |
| 409 | hysteresis = <1000>; |
| 410 | type = "passive"; |
| 411 | }; |
| 412 | }; |
| 413 | }; |
| 414 | |
| 415 | emmc-therm-adc { |
| 416 | polling-delay-passive = <0>; |
| 417 | polling-delay = <0>; |
| 418 | thermal-sensors = <&pm660_adc_tm 0x4e>; |
| 419 | thermal-governor = "user_space"; |
| 420 | |
| 421 | trips { |
| 422 | active-config0 { |
| 423 | temperature = <65000>; |
| 424 | hysteresis = <1000>; |
| 425 | type = "passive"; |
| 426 | }; |
| 427 | }; |
| 428 | }; |
| 429 | |
| 430 | pa-therm0-adc { |
| 431 | polling-delay-passive = <0>; |
| 432 | polling-delay = <0>; |
| 433 | thermal-sensors = <&pm660_adc_tm 0x4f>; |
| 434 | thermal-governor = "user_space"; |
| 435 | |
| 436 | trips { |
| 437 | active-config0 { |
| 438 | temperature = <65000>; |
| 439 | hysteresis = <1000>; |
| 440 | type = "passive"; |
| 441 | }; |
| 442 | }; |
| 443 | }; |
| 444 | |
| 445 | quiet-therm-adc { |
| 446 | polling-delay-passive = <0>; |
| 447 | polling-delay = <0>; |
| 448 | thermal-sensors = <&pm660_adc_tm 0x51>; |
| 449 | thermal-governor = "user_space"; |
| 450 | |
| 451 | trips { |
| 452 | active-config0 { |
| 453 | temperature = <65000>; |
| 454 | hysteresis = <1000>; |
| 455 | type = "passive"; |
| 456 | }; |
| 457 | }; |
| 458 | }; |
| 459 | }; |