Umang Agrawal | 16b1160 | 2017-12-21 15:32:55 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2017-2018, 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/interrupt-controller/irq.h> |
| 14 | #include <dt-bindings/spmi/spmi.h> |
| 15 | #include <dt-bindings/msm/power-on.h> |
| 16 | |
| 17 | &spmi_bus { |
| 18 | qcom,pmi632@2 { |
| 19 | compatible = "qcom,spmi-pmic"; |
| 20 | reg = <0x2 SPMI_USID>; |
| 21 | #address-cells = <2>; |
| 22 | #size-cells = <0>; |
| 23 | |
| 24 | pmi632_revid: qcom,revid@100 { |
| 25 | compatible = "qcom,qpnp-revid"; |
| 26 | reg = <0x100 0x100>; |
| 27 | }; |
| 28 | |
| 29 | pmi632_pon: qcom,power-on@800 { |
| 30 | compatible = "qcom,qpnp-power-on"; |
| 31 | reg = <0x800 0x100>; |
| 32 | qcom,secondary-pon-reset; |
| 33 | }; |
| 34 | |
Jishnu Prakash | 292e28c | 2018-01-18 11:28:34 +0530 | [diff] [blame] | 35 | pmi632_vadc: vadc@3100 { |
| 36 | compatible = "qcom,qpnp-vadc-hc"; |
| 37 | reg = <0x3100 0x100>; |
| 38 | #address-cells = <1>; |
| 39 | #size-cells = <0>; |
| 40 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 41 | interrupt-names = "eoc-int-en-set"; |
| 42 | qcom,adc-vdd-reference = <1875>; |
| 43 | qcom,adc-full-scale-code = <0x70e4>; |
| 44 | |
| 45 | chan@0 { |
| 46 | label = "ref_gnd"; |
| 47 | reg = <0>; |
| 48 | qcom,decimation = <2>; |
| 49 | qcom,pre-div-channel-scaling = <0>; |
| 50 | qcom,calibration-type = "absolute"; |
| 51 | qcom,scale-function = <0>; |
| 52 | qcom,hw-settle-time = <0>; |
| 53 | qcom,fast-avg-setup = <0>; |
| 54 | qcom,cal-val = <0>; |
| 55 | }; |
| 56 | |
| 57 | chan@1 { |
| 58 | label = "ref_1250v"; |
| 59 | reg = <1>; |
| 60 | qcom,decimation = <2>; |
| 61 | qcom,pre-div-channel-scaling = <0>; |
| 62 | qcom,calibration-type = "absolute"; |
| 63 | qcom,scale-function = <0>; |
| 64 | qcom,hw-settle-time = <0>; |
| 65 | qcom,fast-avg-setup = <0>; |
| 66 | qcom,cal-val = <0>; |
| 67 | }; |
| 68 | |
| 69 | chan@83 { |
| 70 | label = "vph_pwr"; |
| 71 | reg = <0x83>; |
| 72 | qcom,decimation = <2>; |
| 73 | qcom,pre-div-channel-scaling = <1>; |
| 74 | qcom,calibration-type = "absolute"; |
| 75 | qcom,scale-function = <0>; |
| 76 | qcom,hw-settle-time = <0>; |
| 77 | qcom,fast-avg-setup = <0>; |
| 78 | qcom,cal-val = <0>; |
| 79 | }; |
| 80 | |
| 81 | chan@84 { |
| 82 | label = "vbat_sns"; |
| 83 | reg = <0x84>; |
| 84 | qcom,decimation = <2>; |
| 85 | qcom,pre-div-channel-scaling = <1>; |
| 86 | qcom,calibration-type = "absolute"; |
| 87 | qcom,scale-function = <0>; |
| 88 | qcom,hw-settle-time = <0>; |
| 89 | qcom,fast-avg-setup = <0>; |
| 90 | qcom,cal-val = <0>; |
| 91 | }; |
| 92 | |
| 93 | chan@6 { |
| 94 | label = "die_temp"; |
| 95 | reg = <6>; |
| 96 | qcom,decimation = <2>; |
| 97 | qcom,pre-div-channel-scaling = <0>; |
| 98 | qcom,calibration-type = "absolute"; |
| 99 | qcom,scale-function = <19>; |
| 100 | qcom,hw-settle-time = <0>; |
| 101 | qcom,fast-avg-setup = <0>; |
| 102 | qcom,cal-val = <0>; |
| 103 | }; |
| 104 | |
| 105 | chan@7 { |
| 106 | label = "usb_in_i"; |
| 107 | reg = <7>; |
| 108 | qcom,decimation = <2>; |
| 109 | qcom,pre-div-channel-scaling = <0>; |
| 110 | qcom,calibration-type = "absolute"; |
| 111 | qcom,scale-function = <21>; |
| 112 | qcom,hw-settle-time = <0>; |
| 113 | qcom,fast-avg-setup = <0>; |
| 114 | qcom,cal-val = <0>; |
| 115 | }; |
| 116 | |
| 117 | chan@8 { |
| 118 | label = "usb_in_v"; |
| 119 | reg = <8>; |
| 120 | qcom,decimation = <2>; |
| 121 | qcom,pre-div-channel-scaling = <8>; |
| 122 | qcom,calibration-type = "absolute"; |
| 123 | qcom,scale-function = <0>; |
| 124 | qcom,hw-settle-time = <0>; |
| 125 | qcom,fast-avg-setup = <0>; |
| 126 | qcom,cal-val = <0>; |
| 127 | }; |
| 128 | |
| 129 | chan@9 { |
| 130 | label = "chg_temp"; |
| 131 | reg = <9>; |
| 132 | qcom,decimation = <2>; |
| 133 | qcom,pre-div-channel-scaling = <0>; |
| 134 | qcom,calibration-type = "absolute"; |
| 135 | qcom,scale-function = <18>; |
| 136 | qcom,hw-settle-time = <0>; |
| 137 | qcom,fast-avg-setup = <0>; |
| 138 | qcom,cal-val = <0>; |
| 139 | }; |
| 140 | |
| 141 | chan@4a { |
| 142 | label = "bat_therm"; |
| 143 | reg = <0x4a>; |
| 144 | qcom,decimation = <2>; |
| 145 | qcom,pre-div-channel-scaling = <0>; |
| 146 | qcom,calibration-type = "ratiometric"; |
| 147 | qcom,scale-function = <17>; |
| 148 | qcom,hw-settle-time = <0>; |
| 149 | qcom,fast-avg-setup = <0>; |
| 150 | qcom,cal-val = <0>; |
| 151 | }; |
| 152 | |
| 153 | chan@4b { |
| 154 | label = "bat_id"; |
| 155 | reg = <0x4b>; |
| 156 | qcom,decimation = <2>; |
| 157 | qcom,pre-div-channel-scaling = <0>; |
| 158 | qcom,calibration-type = "ratiometric"; |
| 159 | qcom,scale-function = <0>; |
| 160 | qcom,hw-settle-time = <0>; |
| 161 | qcom,fast-avg-setup = <0>; |
| 162 | qcom,cal-val = <0>; |
| 163 | }; |
| 164 | |
| 165 | chan@4c { |
| 166 | label = "xo_therm"; |
| 167 | reg = <0x4c>; |
| 168 | qcom,decimation = <2>; |
| 169 | qcom,pre-div-channel-scaling = <0>; |
| 170 | qcom,calibration-type = "ratiometric"; |
| 171 | qcom,scale-function = <4>; |
| 172 | qcom,hw-settle-time = <8>; |
| 173 | qcom,fast-avg-setup = <0>; |
| 174 | }; |
| 175 | |
| 176 | |
| 177 | chan@1e { |
| 178 | label = "mid_chg"; |
| 179 | reg = <0x1e>; |
| 180 | qcom,decimation = <2>; |
| 181 | qcom,pre-div-channel-scaling = <3>; |
| 182 | qcom,calibration-type = "absolute"; |
| 183 | qcom,scale-function = <0>; |
| 184 | qcom,hw-settle-time = <0>; |
| 185 | qcom,fast-avg-setup = <0>; |
| 186 | qcom,cal-val = <0>; |
| 187 | }; |
| 188 | |
| 189 | }; |
| 190 | |
Umang Agrawal | 16b1160 | 2017-12-21 15:32:55 +0530 | [diff] [blame] | 191 | pmi632_tz: qcom,temp-alarm@2400 { |
| 192 | compatible = "qcom,qpnp-temp-alarm"; |
| 193 | reg = <0x2400 0x100>; |
| 194 | interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| 195 | label = "pmi632_tz"; |
| 196 | #thermal-sensor-cells = <0>; |
| 197 | }; |
| 198 | |
| 199 | pmi632_gpios: pinctrl@c000 { |
| 200 | compatible = "qcom,spmi-gpio"; |
| 201 | reg = <0xc000 0x800>; |
| 202 | interrupts = <0x2 0xc1 0 IRQ_TYPE_NONE>, |
| 203 | <0x2 0xc2 0 IRQ_TYPE_NONE>, |
| 204 | <0x2 0xc3 0 IRQ_TYPE_NONE>, |
| 205 | <0x2 0xc4 0 IRQ_TYPE_NONE>, |
| 206 | <0x2 0xc5 0 IRQ_TYPE_NONE>, |
| 207 | <0x2 0xc6 0 IRQ_TYPE_NONE>, |
Umang Agrawal | fbbfb7f | 2017-12-29 19:27:01 +0530 | [diff] [blame] | 208 | <0x2 0xc7 0 IRQ_TYPE_NONE>; |
Umang Agrawal | 16b1160 | 2017-12-21 15:32:55 +0530 | [diff] [blame] | 209 | interrupt-names = "pmi632_gpio2", "pmi632_gpio3", |
| 210 | "pmi632_gpio4", "pmi632_gpio5", |
| 211 | "pmi632_gpio6", "pmi632_gpio7", |
| 212 | "pmi632_gpio8"; |
| 213 | gpio-controller; |
| 214 | #gpio-cells = <2>; |
| 215 | qcom,gpios-disallowed = <1>; |
| 216 | }; |
| 217 | }; |
| 218 | |
| 219 | pmi632_3: qcom,pmi632@3 { |
| 220 | compatible ="qcom,spmi-pmic"; |
| 221 | reg = <0x3 SPMI_USID>; |
| 222 | #address-cells = <2>; |
| 223 | #size-cells = <0>; |
| 224 | |
Tirupathi Reddy | 08968e8 | 2018-01-09 16:58:28 +0530 | [diff] [blame] | 225 | pmi632_vib: qcom,vibrator@5700 { |
| 226 | compatible = "qcom,qpnp-vibrator-ldo"; |
| 227 | reg = <0x5700 0x100>; |
Tirupathi Reddy | 398336a | 2018-02-02 09:01:15 +0530 | [diff] [blame^] | 228 | qcom,vib-ldo-volt-uv = <3000000>; |
Tirupathi Reddy | 08968e8 | 2018-01-09 16:58:28 +0530 | [diff] [blame] | 229 | qcom,vib-overdrive-volt-uv = <3544000>; |
| 230 | }; |
| 231 | |
Umang Agrawal | 16b1160 | 2017-12-21 15:32:55 +0530 | [diff] [blame] | 232 | pmi632_pwm_1: pwm@b300 { |
| 233 | compatible = "qcom,qpnp-pwm"; |
| 234 | reg = <0xb300 0x100>; |
| 235 | reg-names = "qpnp-lpg-channel-base"; |
| 236 | qcom,channel-id = <1>; |
| 237 | qcom,supported-sizes = <6>, <9>; |
| 238 | #pwm-cells = <2>; |
| 239 | status = "disabled"; |
| 240 | }; |
| 241 | |
| 242 | pmi632_pwm_2: pwm@b400 { |
| 243 | compatible = "qcom,qpnp-pwm"; |
| 244 | reg = <0xb400 0x100>; |
| 245 | reg-names = "qpnp-lpg-channel-base"; |
| 246 | qcom,channel-id = <2>; |
| 247 | qcom,supported-sizes = <6>, <9>; |
| 248 | #pwm-cells = <2>; |
| 249 | status = "disabled"; |
| 250 | }; |
| 251 | |
| 252 | pmi632_pwm_3: pwm@b500 { |
| 253 | compatible = "qcom,qpnp-pwm"; |
| 254 | reg = <0xb500 0x100>; |
| 255 | reg-names = "qpnp-lpg-channel-base"; |
| 256 | qcom,channel-id = <3>; |
| 257 | qcom,supported-sizes = <6>, <9>; |
| 258 | #pwm-cells = <2>; |
| 259 | status = "disabled"; |
| 260 | }; |
| 261 | |
| 262 | pmi632_pwm_4: pwm@b600 { |
| 263 | compatible = "qcom,qpnp-pwm"; |
| 264 | reg = <0xb600 0x100>; |
| 265 | reg-names = "qpnp-lpg-channel-base"; |
| 266 | qcom,channel-id = <4>; |
| 267 | qcom,supported-sizes = <6>, <9>; |
| 268 | #pwm-cells = <2>; |
| 269 | status = "disabled"; |
| 270 | }; |
| 271 | |
| 272 | pmi632_pwm_5: pwm@b700 { |
| 273 | compatible = "qcom,qpnp-pwm"; |
| 274 | reg = <0xb700 0x100>; |
| 275 | reg-names = "qpnp-lpg-channel-base"; |
| 276 | qcom,channel-id = <5>; |
| 277 | qcom,supported-sizes = <6>, <9>; |
| 278 | #pwm-cells = <2>; |
| 279 | status = "disabled"; |
| 280 | }; |
Kiran Gunda | 833a5c7 | 2018-01-09 18:34:42 +0530 | [diff] [blame] | 281 | |
| 282 | pmi632_lcdb: qpnp-lcdb@ec00 { |
| 283 | compatible = "qcom,qpnp-lcdb-regulator"; |
| 284 | #address-cells = <1>; |
| 285 | #size-cells = <1>; |
| 286 | reg = <0xec00 0x100>; |
| 287 | interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>; |
| 288 | interrupt-names = "sc-irq"; |
| 289 | |
| 290 | qcom,pmic-revid = <&pmi632_revid>; |
| 291 | |
| 292 | lcdb_ldo_vreg: ldo { |
| 293 | label = "ldo"; |
| 294 | regulator-name = "lcdb_ldo"; |
| 295 | regulator-min-microvolt = <4000000>; |
| 296 | regulator-max-microvolt = <6000000>; |
| 297 | }; |
| 298 | |
| 299 | lcdb_ncp_vreg: ncp { |
| 300 | label = "ncp"; |
| 301 | regulator-name = "lcdb_ncp"; |
| 302 | regulator-min-microvolt = <4000000>; |
| 303 | regulator-max-microvolt = <6000000>; |
| 304 | }; |
| 305 | }; |
Umang Agrawal | 16b1160 | 2017-12-21 15:32:55 +0530 | [diff] [blame] | 306 | }; |
| 307 | }; |