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