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/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,pm660l@2 { |
| 19 | compatible = "qcom,spmi-pmic"; |
| 20 | reg = <0x2 SPMI_USID>; |
| 21 | #address-cells = <2>; |
| 22 | #size-cells = <0>; |
| 23 | |
| 24 | pm660l_revid: qcom,revid@100 { |
| 25 | compatible = "qcom,qpnp-revid"; |
| 26 | reg = <0x100 0x100>; |
| 27 | }; |
| 28 | |
| 29 | pm660l_pbs: qcom,pbs@7300 { |
| 30 | compatible = "qcom,qpnp-pbs"; |
| 31 | reg = <0x7300 0x100>; |
| 32 | }; |
| 33 | |
| 34 | qcom,power-on@800 { |
| 35 | compatible = "qcom,qpnp-power-on"; |
| 36 | reg = <0x800 0x100>; |
| 37 | qcom,secondary-pon-reset; |
| 38 | qcom,hard-reset-poweroff-type = |
| 39 | <PON_POWER_OFF_SHUTDOWN>; |
| 40 | }; |
| 41 | |
| 42 | qcom,temp-alarm@2400 { |
| 43 | compatible = "qcom,qpnp-temp-alarm"; |
| 44 | reg = <0x2400 0x100>; |
| 45 | interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| 46 | label = "pm660l_tz"; |
| 47 | }; |
| 48 | |
Tirupathi Reddy | a1f7344 | 2017-08-11 12:31:00 +0530 | [diff] [blame] | 49 | pm660l_gpios: pinctrl@c000 { |
| 50 | compatible = "qcom,spmi-gpio"; |
| 51 | reg = <0xc000 0xc00>; |
| 52 | interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>, |
| 53 | <0x2 0xc2 0 IRQ_TYPE_NONE>, |
| 54 | <0x2 0xc3 0 IRQ_TYPE_NONE>, |
| 55 | <0x2 0xc4 0 IRQ_TYPE_NONE>, |
| 56 | <0x2 0xc5 0 IRQ_TYPE_NONE>, |
| 57 | <0x2 0xc6 0 IRQ_TYPE_NONE>, |
| 58 | <0x2 0xc7 0 IRQ_TYPE_NONE>, |
| 59 | <0x2 0xc8 0 IRQ_TYPE_NONE>, |
| 60 | <0x2 0xca 0 IRQ_TYPE_NONE>, |
| 61 | <0x2 0xcb 0 IRQ_TYPE_NONE>; |
| 62 | interrupt-names = "pm660l_gpio1", "pm660l_gpio3", |
| 63 | "pm660l_gpio4", "pm660l_gpio5", |
| 64 | "pm660l_gpio6", "pm660l_gpio7", |
| 65 | "pm660l_gpio8", "pm660l_gpio9", |
| 66 | "pm660l_gpio11", "pm660l_gpio12"; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 67 | gpio-controller; |
| 68 | #gpio-cells = <2>; |
Tirupathi Reddy | a1f7344 | 2017-08-11 12:31:00 +0530 | [diff] [blame] | 69 | qcom,gpios-disallowed = <2 10>; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 70 | }; |
| 71 | }; |
| 72 | |
| 73 | pm660l_3: qcom,pm660l@3 { |
| 74 | compatible ="qcom,spmi-pmic"; |
| 75 | reg = <0x3 SPMI_USID>; |
| 76 | #address-cells = <2>; |
| 77 | #size-cells = <0>; |
| 78 | |
| 79 | pm660l_pwm_1: pwm@b100 { |
| 80 | compatible = "qcom,qpnp-pwm"; |
| 81 | reg = <0xb100 0x100>, |
| 82 | <0xb042 0x7e>; |
| 83 | reg-names = "qpnp-lpg-channel-base", |
| 84 | "qpnp-lpg-lut-base"; |
| 85 | qcom,channel-id = <1>; |
| 86 | qcom,lpg-lut-size = <0x7e>; |
| 87 | qcom,supported-sizes = <6>, <9>; |
| 88 | qcom,ramp-index = <0>; |
| 89 | #pwm-cells = <2>; |
| 90 | }; |
| 91 | |
| 92 | pm660l_pwm_2: pwm@b200 { |
| 93 | compatible = "qcom,qpnp-pwm"; |
| 94 | reg = <0xb200 0x100>, |
| 95 | <0xb042 0x7e>; |
| 96 | reg-names = "qpnp-lpg-channel-base", |
| 97 | "qpnp-lpg-lut-base"; |
| 98 | qcom,channel-id = <2>; |
| 99 | qcom,lpg-lut-size = <0x7e>; |
| 100 | qcom,supported-sizes = <6>, <9>; |
| 101 | qcom,ramp-index = <1>; |
| 102 | #pwm-cells = <2>; |
| 103 | }; |
| 104 | |
| 105 | pm660l_pwm_3: pwm@b300 { |
| 106 | compatible = "qcom,qpnp-pwm"; |
| 107 | reg = <0xb300 0x100>, |
| 108 | <0xb042 0x7e>; |
| 109 | reg-names = "qpnp-lpg-channel-base", |
| 110 | "qpnp-lpg-lut-base"; |
| 111 | qcom,channel-id = <3>; |
| 112 | qcom,lpg-lut-size = <0x7e>; |
| 113 | qcom,supported-sizes = <6>, <9>; |
| 114 | qcom,ramp-index = <2>; |
| 115 | #pwm-cells = <2>; |
| 116 | qcom,period = <6000000>; |
| 117 | |
| 118 | qcom,lpg { |
| 119 | label = "lpg"; |
| 120 | cell-index = <0>; |
| 121 | qcom,duty-percents = |
| 122 | <0x01 0x0a 0x14 0x1e 0x28 0x32 0x3c |
| 123 | 0x46 0x50 0x5a 0x64 |
| 124 | 0x64 0x5a 0x50 0x46 0x3c 0x32 0x28 0x1e |
| 125 | 0x14 0x0a 0x01>; |
| 126 | }; |
| 127 | }; |
| 128 | |
| 129 | pm660l_pwm_4: pwm@b400 { |
| 130 | compatible = "qcom,qpnp-pwm"; |
| 131 | reg = <0xb400 0x100>, |
| 132 | <0xb042 0x7e>; |
| 133 | reg-names = "qpnp-lpg-channel-base", |
| 134 | "qpnp-lpg-lut-base"; |
| 135 | qcom,channel-id = <4>; |
| 136 | qcom,lpg-lut-size = <0x7e>; |
| 137 | qcom,supported-sizes = <6>, <9>; |
| 138 | qcom,ramp-index = <3>; |
| 139 | #pwm-cells = <2>; |
| 140 | status = "disabled"; |
| 141 | }; |
| 142 | |
| 143 | qcom,leds@d000 { |
| 144 | compatible = "qcom,leds-qpnp"; |
| 145 | reg = <0xd000 0x100>; |
| 146 | label = "rgb"; |
| 147 | |
| 148 | red_led: qcom,rgb_0 { |
| 149 | label = "rgb"; |
| 150 | qcom,id = <3>; |
| 151 | qcom,mode = "pwm"; |
| 152 | pwms = <&pm660l_pwm_3 0 0>; |
| 153 | qcom,pwm-us = <1000>; |
| 154 | qcom,max-current = <12>; |
| 155 | qcom,default-state = "off"; |
| 156 | linux,name = "red"; |
| 157 | qcom,start-idx = <0>; |
| 158 | qcom,idx-len = <22>; |
| 159 | qcom,duty-pcts = |
| 160 | [01 0a 14 1e 28 32 3c 46 50 5a 64 |
| 161 | 64 5a 50 46 3c 32 28 1e 14 0a 01]; |
| 162 | qcom,use-blink; |
| 163 | }; |
| 164 | |
| 165 | green_led: qcom,rgb_1 { |
| 166 | label = "rgb"; |
| 167 | qcom,id = <4>; |
| 168 | qcom,mode = "pwm"; |
| 169 | pwms = <&pm660l_pwm_2 0 0>; |
| 170 | qcom,pwm-us = <1000>; |
| 171 | qcom,max-current = <12>; |
| 172 | qcom,default-state = "off"; |
| 173 | linux,name = "green"; |
| 174 | }; |
| 175 | |
| 176 | blue_led: qcom,rgb_2 { |
| 177 | label = "rgb"; |
| 178 | qcom,id = <5>; |
| 179 | qcom,mode = "pwm"; |
| 180 | pwms = <&pm660l_pwm_1 0 0>; |
| 181 | qcom,pwm-us = <1000>; |
| 182 | qcom,max-current = <12>; |
| 183 | qcom,default-state = "off"; |
| 184 | linux,name = "blue"; |
| 185 | }; |
| 186 | }; |
| 187 | |
| 188 | pm660l_wled: qcom,leds@d800 { |
| 189 | compatible = "qcom,qpnp-wled"; |
| 190 | reg = <0xd800 0x100>, |
| 191 | <0xd900 0x100>; |
| 192 | reg-names = "qpnp-wled-ctrl-base", |
| 193 | "qpnp-wled-sink-base"; |
Kiran Gunda | 692b916 | 2017-07-28 10:24:30 +0530 | [diff] [blame] | 194 | interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>; |
| 195 | interrupt-names = "ovp-irq"; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 196 | linux,name = "wled"; |
| 197 | linux,default-trigger = "bkl-trigger"; |
| 198 | qcom,fdbk-output = "auto"; |
| 199 | qcom,vref-uv = <127500>; |
| 200 | qcom,switch-freq-khz = <800>; |
| 201 | qcom,ovp-mv = <29600>; |
| 202 | qcom,ilim-ma = <970>; |
| 203 | qcom,boost-duty-ns = <26>; |
| 204 | qcom,mod-freq-khz = <9600>; |
| 205 | qcom,dim-mode = "hybrid"; |
| 206 | qcom,hyb-thres = <625>; |
| 207 | qcom,sync-dly-us = <800>; |
| 208 | qcom,fs-curr-ua = <25000>; |
| 209 | qcom,cons-sync-write-delay-us = <1000>; |
| 210 | qcom,led-strings-list = [00 01 02]; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 211 | qcom,loop-auto-gm-en; |
| 212 | qcom,pmic-revid = <&pm660l_revid>; |
Anirudh Ghayal | f2e640c | 2017-08-13 06:35:08 +0530 | [diff] [blame] | 213 | qcom,auto-calibration-enable; |
Tirupathi Reddy | 8f14a6a | 2017-06-09 11:13:21 +0530 | [diff] [blame] | 214 | status = "ok"; |
| 215 | }; |
| 216 | |
| 217 | flash_led: qcom,leds@d300 { |
| 218 | compatible = "qcom,qpnp-flash-led-v2"; |
| 219 | reg = <0xd300 0x100>; |
| 220 | label = "flash"; |
| 221 | interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>, |
| 222 | <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>, |
| 223 | <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>; |
| 224 | interrupt-names = "led-fault-irq", |
| 225 | "all-ramp-down-done-irq", |
| 226 | "all-ramp-up-done-irq"; |
| 227 | qcom,hdrm-auto-mode; |
| 228 | qcom,short-circuit-det; |
| 229 | qcom,open-circuit-det; |
| 230 | qcom,vph-droop-det; |
| 231 | qcom,thermal-derate-en; |
| 232 | qcom,thermal-derate-current = <200 500 1000>; |
| 233 | qcom,isc-delay = <192>; |
| 234 | qcom,pmic-revid = <&pm660l_revid>; |
| 235 | |
| 236 | pm660l_flash0: qcom,flash_0 { |
| 237 | label = "flash"; |
| 238 | qcom,led-name = "led:flash_0"; |
| 239 | qcom,max-current = <1500>; |
| 240 | qcom,default-led-trigger = "flash0_trigger"; |
| 241 | qcom,id = <0>; |
| 242 | qcom,current-ma = <1000>; |
| 243 | qcom,duration-ms = <1280>; |
| 244 | qcom,ires-ua = <12500>; |
| 245 | qcom,hdrm-voltage-mv = <325>; |
| 246 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 247 | }; |
| 248 | |
| 249 | pm660l_flash1: qcom,flash_1 { |
| 250 | label = "flash"; |
| 251 | qcom,led-name = "led:flash_1"; |
| 252 | qcom,max-current = <1500>; |
| 253 | qcom,default-led-trigger = "flash1_trigger"; |
| 254 | qcom,id = <1>; |
| 255 | qcom,current-ma = <1000>; |
| 256 | qcom,duration-ms = <1280>; |
| 257 | qcom,ires-ua = <12500>; |
| 258 | qcom,hdrm-voltage-mv = <325>; |
| 259 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 260 | }; |
| 261 | |
| 262 | pm660l_flash2: qcom,flash_2 { |
| 263 | label = "flash"; |
| 264 | qcom,led-name = "led:flash_2"; |
| 265 | qcom,max-current = <750>; |
| 266 | qcom,default-led-trigger = "flash2_trigger"; |
| 267 | qcom,id = <2>; |
| 268 | qcom,current-ma = <500>; |
| 269 | qcom,duration-ms = <1280>; |
| 270 | qcom,ires-ua = <12500>; |
| 271 | qcom,hdrm-voltage-mv = <325>; |
| 272 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 273 | }; |
| 274 | |
| 275 | pm660l_torch0: qcom,torch_0 { |
| 276 | label = "torch"; |
| 277 | qcom,led-name = "led:torch_0"; |
| 278 | qcom,max-current = <500>; |
| 279 | qcom,default-led-trigger = "torch0_trigger"; |
| 280 | qcom,id = <0>; |
| 281 | qcom,current-ma = <300>; |
| 282 | qcom,ires-ua = <12500>; |
| 283 | qcom,hdrm-voltage-mv = <325>; |
| 284 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 285 | }; |
| 286 | |
| 287 | pm660l_torch1: qcom,torch_1 { |
| 288 | label = "torch"; |
| 289 | qcom,led-name = "led:torch_1"; |
| 290 | qcom,max-current = <500>; |
| 291 | qcom,default-led-trigger = "torch1_trigger"; |
| 292 | qcom,id = <1>; |
| 293 | qcom,current-ma = <300>; |
| 294 | qcom,ires-ua = <12500>; |
| 295 | qcom,hdrm-voltage-mv = <325>; |
| 296 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 297 | }; |
| 298 | |
| 299 | pm660l_torch2: qcom,torch_2 { |
| 300 | label = "torch"; |
| 301 | qcom,led-name = "led:torch_2"; |
| 302 | qcom,max-current = <500>; |
| 303 | qcom,default-led-trigger = "torch2_trigger"; |
| 304 | qcom,id = <2>; |
| 305 | qcom,current-ma = <300>; |
| 306 | qcom,ires-ua = <12500>; |
| 307 | qcom,hdrm-voltage-mv = <325>; |
| 308 | qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| 309 | }; |
| 310 | |
| 311 | pm660l_switch0: qcom,led_switch_0 { |
| 312 | label = "switch"; |
| 313 | qcom,led-name = "led:switch_0"; |
| 314 | qcom,led-mask = <3>; |
| 315 | qcom,default-led-trigger = "switch0_trigger"; |
| 316 | }; |
| 317 | |
| 318 | pm660l_switch1: qcom,led_switch_1 { |
| 319 | label = "switch"; |
| 320 | qcom,led-name = "led:switch_1"; |
| 321 | qcom,led-mask = <4>; |
| 322 | qcom,default-led-trigger = "switch1_trigger"; |
| 323 | }; |
| 324 | }; |
| 325 | |
| 326 | pm660l_lcdb: qpnp-lcdb@ec00 { |
| 327 | compatible = "qcom,qpnp-lcdb-regulator"; |
| 328 | #address-cells = <1>; |
| 329 | #size-cells = <1>; |
| 330 | reg = <0xec00 0x100>; |
| 331 | interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>; |
| 332 | interrupt-names = "sc-irq"; |
| 333 | |
| 334 | qcom,pmic-revid = <&pm660l_revid>; |
| 335 | |
| 336 | lcdb_ldo_vreg: ldo { |
| 337 | label = "ldo"; |
| 338 | regulator-name = "lcdb_ldo"; |
| 339 | regulator-min-microvolt = <4000000>; |
| 340 | regulator-max-microvolt = <6000000>; |
| 341 | }; |
| 342 | |
| 343 | lcdb_ncp_vreg: ncp { |
| 344 | label = "ncp"; |
| 345 | regulator-name = "lcdb_ncp"; |
| 346 | regulator-min-microvolt = <4000000>; |
| 347 | regulator-max-microvolt = <6000000>; |
| 348 | }; |
| 349 | }; |
| 350 | |
| 351 | pm660a_oledb: qpnp-oledb@e000 { |
| 352 | compatible = "qcom,qpnp-oledb-regulator"; |
| 353 | #address-cells = <1>; |
| 354 | #size-cells = <1>; |
| 355 | qcom,pmic-revid = <&pm660l_revid>; |
| 356 | reg = <0xe000 0x100>; |
| 357 | qcom,pbs-client = <&pm660l_pbs>; |
| 358 | |
| 359 | label = "oledb"; |
| 360 | regulator-name = "regulator-oledb"; |
| 361 | regulator-min-microvolt = <5000000>; |
| 362 | regulator-max-microvolt = <8100000>; |
| 363 | |
| 364 | qcom,swire-control; |
| 365 | qcom,ext-pin-control; |
| 366 | status = "disabled"; |
| 367 | }; |
| 368 | |
| 369 | pm660a_labibb: qpnp-labibb-regulator { |
| 370 | compatible = "qcom,qpnp-labibb-regulator"; |
| 371 | #address-cells = <1>; |
| 372 | #size-cells = <1>; |
| 373 | qcom,pmic-revid = <&pm660l_revid>; |
| 374 | qcom,swire-control; |
| 375 | status = "disabled"; |
| 376 | |
| 377 | ibb_regulator: qcom,ibb@dc00 { |
| 378 | reg = <0xdc00 0x100>; |
| 379 | reg-names = "ibb_reg"; |
| 380 | regulator-name = "ibb_reg"; |
| 381 | |
| 382 | regulator-min-microvolt = <4000000>; |
| 383 | regulator-max-microvolt = <6300000>; |
| 384 | |
| 385 | qcom,qpnp-ibb-min-voltage = <1400000>; |
| 386 | qcom,qpnp-ibb-step-size = <100000>; |
| 387 | qcom,qpnp-ibb-slew-rate = <2000000>; |
| 388 | qcom,qpnp-ibb-init-voltage = <4000000>; |
| 389 | qcom,qpnp-ibb-init-amoled-voltage = <4000000>; |
| 390 | }; |
| 391 | |
| 392 | lab_regulator: qcom,lab@de00 { |
| 393 | reg = <0xde00 0x100>; |
| 394 | reg-names = "lab"; |
| 395 | regulator-name = "lab_reg"; |
| 396 | |
| 397 | regulator-min-microvolt = <4600000>; |
| 398 | regulator-max-microvolt = <6100000>; |
| 399 | |
| 400 | qcom,qpnp-lab-min-voltage = <4600000>; |
| 401 | qcom,qpnp-lab-step-size = <100000>; |
| 402 | qcom,qpnp-lab-slew-rate = <5000>; |
| 403 | qcom,qpnp-lab-init-voltage = <4600000>; |
| 404 | qcom,qpnp-lab-init-amoled-voltage = <4600000>; |
| 405 | |
| 406 | qcom,notify-lab-vreg-ok-sts; |
| 407 | }; |
| 408 | }; |
| 409 | }; |
| 410 | }; |