Banajit Goswami | 7885c69 | 2017-03-16 16:00:34 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. |
Channagoud Kadabi | 6d4bb83 | 2016-06-30 23:40:05 -0700 | [diff] [blame] | 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 | */ |
Kyle Yan | 6a20fae | 2017-02-14 13:34:41 -0800 | [diff] [blame] | 12 | |
David Collins | c668625 | 2017-03-31 14:23:09 -0700 | [diff] [blame] | 13 | #include <dt-bindings/gpio/gpio.h> |
Jigarkumar Zala | 86123115 | 2017-02-28 14:05:11 -0800 | [diff] [blame] | 14 | #include "sdm845-camera-sensor-cdp.dtsi" |
Sungjun Park | c9f9c06 | 2017-03-21 16:45:18 -0700 | [diff] [blame] | 15 | |
| 16 | / { |
| 17 | bluetooth: bt_wcn3990 { |
| 18 | compatible = "qca,wcn3990"; |
| 19 | qca,bt-vdd-io-supply = <&pm8998_s3>; |
| 20 | qca,bt-vdd-xtal-supply = <&pm8998_s5>; |
| 21 | qca,bt-vdd-core-supply = <&pm8998_l7>; |
| 22 | qca,bt-vdd-pa-supply = <&pm8998_l17>; |
| 23 | qca,bt-vdd-ldo-supply = <&pm8998_l25>; |
| 24 | |
| 25 | qca,bt-vdd-io-voltage-level = <1352000 1352000>; |
| 26 | qca,bt-vdd-xtal-voltage-level = <2040000 2040000>; |
| 27 | qca,bt-vdd-core-voltage-level = <1800000 1800000>; |
| 28 | qca,bt-vdd-pa-voltage-level = <1304000 1304000>; |
| 29 | qca,bt-vdd-ldo-voltage-level = <3312000 3312000>; |
| 30 | |
| 31 | qca,bt-vdd-io-current-level = <1>; /* LPM/PFM */ |
| 32 | qca,bt-vdd-xtal-current-level = <1>; /* LPM/PFM */ |
| 33 | qca,bt-vdd-core-current-level = <1>; /* LPM/PFM */ |
| 34 | qca,bt-vdd-pa-current-level = <1>; /* LPM/PFM */ |
| 35 | qca,bt-vdd-ldo-current-level = <1>; /* LPM/PFM */ |
| 36 | }; |
| 37 | }; |
| 38 | |
Banajit Goswami | c0b7581 | 2017-03-16 16:14:17 -0700 | [diff] [blame] | 39 | &soc { |
| 40 | sound-tavil { |
| 41 | qcom,us-euro-gpios = <&tavil_us_euro_sw>; |
| 42 | }; |
David Collins | c668625 | 2017-03-31 14:23:09 -0700 | [diff] [blame] | 43 | |
| 44 | gpio_keys { |
| 45 | compatible = "gpio-keys"; |
| 46 | label = "gpio-keys"; |
| 47 | |
| 48 | pinctrl-names = "default"; |
| 49 | pinctrl-0 = <&key_home_default |
| 50 | &key_vol_up_default |
| 51 | &key_cam_snapshot_default |
| 52 | &key_cam_focus_default>; |
| 53 | |
| 54 | home { |
| 55 | label = "home"; |
| 56 | gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>; |
| 57 | linux,input-type = <1>; |
| 58 | linux,code = <102>; |
| 59 | gpio-key,wakeup; |
| 60 | debounce-interval = <15>; |
| 61 | linux,can-disable; |
| 62 | }; |
| 63 | |
| 64 | vol_up { |
| 65 | label = "volume_up"; |
| 66 | gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>; |
| 67 | linux,input-type = <1>; |
| 68 | linux,code = <115>; |
| 69 | gpio-key,wakeup; |
| 70 | debounce-interval = <15>; |
| 71 | linux,can-disable; |
| 72 | }; |
| 73 | |
| 74 | cam_snapshot { |
| 75 | label = "cam_snapshot"; |
| 76 | gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>; |
| 77 | linux,input-type = <1>; |
| 78 | linux,code = <766>; |
| 79 | gpio-key,wakeup; |
| 80 | debounce-interval = <15>; |
| 81 | linux,can-disable; |
| 82 | }; |
| 83 | |
| 84 | cam_focus { |
| 85 | label = "cam_focus"; |
| 86 | gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>; |
| 87 | linux,input-type = <1>; |
| 88 | linux,code = <528>; |
| 89 | gpio-key,wakeup; |
| 90 | debounce-interval = <15>; |
| 91 | linux,can-disable; |
| 92 | }; |
| 93 | }; |
Banajit Goswami | c0b7581 | 2017-03-16 16:14:17 -0700 | [diff] [blame] | 94 | }; |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 95 | |
| 96 | &ufsphy_mem { |
| 97 | compatible = "qcom,ufs-phy-qmp-v3"; |
| 98 | |
| 99 | vdda-phy-supply = <&pm8998_l1>; /* 0.88v */ |
| 100 | vdda-pll-supply = <&pm8998_l26>; /* 1.2v */ |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 101 | vdda-phy-max-microamp = <62900>; |
| 102 | vdda-pll-max-microamp = <18300>; |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 103 | |
| 104 | status = "ok"; |
| 105 | }; |
| 106 | |
| 107 | &ufshc_mem { |
| 108 | vdd-hba-supply = <&ufs_phy_gdsc>; |
| 109 | vdd-hba-fixed-regulator; |
| 110 | vcc-supply = <&pm8998_l20>; |
| 111 | vccq2-supply = <&pm8998_s4>; |
| 112 | vcc-max-microamp = <600000>; |
| 113 | vccq2-max-microamp = <600000>; |
| 114 | |
Subhash Jadavani | 0548017 | 2017-04-01 15:51:52 -0700 | [diff] [blame] | 115 | qcom,vddp-ref-clk-supply = <&pm8998_l2>; |
| 116 | qcom,vddp-ref-clk-max-microamp = <100>; |
| 117 | |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 118 | status = "ok"; |
| 119 | }; |
| 120 | |
| 121 | &ufsphy_card { |
| 122 | compatible = "qcom,ufs-phy-qmp-v3"; |
| 123 | |
| 124 | vdda-phy-supply = <&pm8998_l1>; /* 0.88v */ |
| 125 | vdda-pll-supply = <&pm8998_l26>; /* 1.2v */ |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 126 | vdda-phy-max-microamp = <62900>; |
| 127 | vdda-pll-max-microamp = <18300>; |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 128 | |
| 129 | status = "ok"; |
| 130 | }; |
| 131 | |
| 132 | &ufshc_card { |
| 133 | vdd-hba-supply = <&ufs_card_gdsc>; |
| 134 | vdd-hba-fixed-regulator; |
| 135 | vcc-supply = <&pm8998_l21>; |
| 136 | vccq2-supply = <&pm8998_s4>; |
| 137 | vcc-max-microamp = <300000>; |
| 138 | vccq2-max-microamp = <300000>; |
| 139 | |
Subhash Jadavani | 0548017 | 2017-04-01 15:51:52 -0700 | [diff] [blame] | 140 | qcom,vddp-ref-clk-supply = <&pm8998_l2>; |
| 141 | qcom,vddp-ref-clk-max-microamp = <100>; |
| 142 | |
Subhash Jadavani | 20a4896 | 2017-03-27 15:37:57 -0700 | [diff] [blame] | 143 | status = "ok"; |
| 144 | }; |
Subbaraman Narayanamurthy | cd21c81 | 2017-03-30 18:36:49 -0700 | [diff] [blame] | 145 | |
Xiaonian Wang | e5dedbb | 2017-04-08 06:48:59 +0800 | [diff] [blame] | 146 | &sdhc_2 { |
| 147 | vdd-supply = <&pm8998_l21>; |
| 148 | qcom,vdd-voltage-level = <2950000 2960000>; |
| 149 | qcom,vdd-current-level = <200 800000>; |
| 150 | |
| 151 | vdd-io-supply = <&pm8998_l13>; |
| 152 | qcom,vdd-io-voltage-level = <1808000 2960000>; |
| 153 | qcom,vdd-io-current-level = <200 22000>; |
| 154 | |
| 155 | pinctrl-names = "active", "sleep"; |
| 156 | pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; |
| 157 | pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; |
| 158 | |
| 159 | qcom,clk-rates = <400000 20000000 25000000 |
| 160 | 50000000 100000000 200000000>; |
| 161 | qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104"; |
| 162 | |
| 163 | status = "ok"; |
| 164 | }; |
| 165 | |
Subbaraman Narayanamurthy | 58377f0 | 2017-03-21 20:38:43 -0700 | [diff] [blame] | 166 | &pmi8998_switch1 { |
Subbaraman Narayanamurthy | cd21c81 | 2017-03-30 18:36:49 -0700 | [diff] [blame] | 167 | pinctrl-names = "led_enable", "led_disable"; |
| 168 | pinctrl-0 = <&flash_led3_front_en>; |
| 169 | pinctrl-1 = <&flash_led3_front_dis>; |
| 170 | }; |
Harry Yang | 6711166 | 2017-04-05 15:14:52 -0700 | [diff] [blame] | 171 | |
| 172 | &pmi8998_charger { |
| 173 | qcom,batteryless-platform; |
| 174 | }; |
Girish Mahadevan | 11bc2ff | 2017-04-08 08:26:35 -0600 | [diff] [blame] | 175 | |
| 176 | / { |
Jack Pham | c2160c84 | 2017-04-05 09:48:59 -0700 | [diff] [blame] | 177 | extcon_usb1: extcon_usb1 { |
| 178 | compatible = "linux,extcon-usb-gpio"; |
| 179 | id-gpio = <&pmi8998_gpios 9 GPIO_ACTIVE_HIGH>; |
| 180 | vbus-gpio = <&pmi8998_gpios 8 GPIO_ACTIVE_HIGH>; |
| 181 | |
| 182 | pinctrl-names = "default"; |
| 183 | pinctrl-0 = <&usb2_vbus_det_default |
| 184 | &usb2_id_det_default>; |
| 185 | }; |
| 186 | |
| 187 | usb1_vbus_vreg: usb1_vbus_vreg { |
| 188 | compatible = "regulator-fixed"; |
| 189 | regulator-name = "usb_vbus_vreg"; |
| 190 | gpio = <&pmi8998_gpios 2 GPIO_ACTIVE_HIGH>; |
| 191 | enable-active-high; |
| 192 | |
| 193 | /* Typical EN-to-VBUS turn on time for NX5P1100 */ |
| 194 | regulator-enable-ramp-delay = <630>; |
| 195 | |
| 196 | pinctrl-names = "default"; |
| 197 | pinctrl-0 = <&usb2_vbus_boost_default>; |
| 198 | }; |
| 199 | |
Girish Mahadevan | 11bc2ff | 2017-04-08 08:26:35 -0600 | [diff] [blame] | 200 | aliases { |
| 201 | serial0 = &qupv3_se9_2uart; |
| 202 | spi0 = &qupv3_se8_spi; |
| 203 | i2c0 = &qupv3_se10_i2c; |
| 204 | i2c1 = &qupv3_se3_i2c; |
| 205 | }; |
| 206 | }; |
| 207 | |
| 208 | &qupv3_se9_2uart { |
| 209 | status = "ok"; |
| 210 | }; |
| 211 | |
Shashank Babu Chinta Venkata | 59e305f | 2017-04-05 12:14:18 -0700 | [diff] [blame^] | 212 | &labibb { |
| 213 | status = "ok"; |
| 214 | qcom,qpnp-labibb-mode = "lcd"; |
| 215 | }; |
| 216 | |
| 217 | &dsi_dual_nt35597_truly_video { |
| 218 | qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; |
| 219 | qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; |
| 220 | qcom,mdss-dsi-bl-min-level = <1>; |
| 221 | qcom,mdss-dsi-bl-max-level = <4095>; |
| 222 | qcom,mdss-dsi-panel-mode-gpio-state = "dual_port"; |
| 223 | qcom,panel-mode-gpio = <&tlmm 52 0>; |
| 224 | qcom,platform-reset-gpio = <&tlmm 6 0>; |
| 225 | }; |
| 226 | |
| 227 | &dsi_dual_nt35597_truly_video_display { |
| 228 | qcom,dsi-display-active; |
| 229 | }; |
| 230 | |
| 231 | &pmi8998_wled { |
| 232 | status = "okay"; |
| 233 | qcom,led-strings-list = [01 02]; |
| 234 | }; |
| 235 | |
Girish Mahadevan | 11bc2ff | 2017-04-08 08:26:35 -0600 | [diff] [blame] | 236 | &qupv3_se8_spi { |
| 237 | status = "ok"; |
| 238 | }; |
| 239 | |
| 240 | &qupv3_se3_i2c { |
| 241 | status = "ok"; |
| 242 | }; |
| 243 | |
| 244 | &qupv3_se10_i2c { |
| 245 | status = "ok"; |
| 246 | }; |
Jack Pham | c2160c84 | 2017-04-05 09:48:59 -0700 | [diff] [blame] | 247 | |
| 248 | &usb1 { |
| 249 | status = "okay"; |
| 250 | extcon = <&extcon_usb1>; |
| 251 | vbus_dwc3-supply = <&usb1_vbus_vreg>; |
| 252 | }; |
| 253 | |
| 254 | &qusb_phy1 { |
| 255 | status = "okay"; |
| 256 | }; |
| 257 | |
| 258 | &usb_qmp_phy { |
| 259 | status = "okay"; |
| 260 | }; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 261 | |
| 262 | &pm8998_vadc { |
| 263 | chan@83 { |
| 264 | label = "vph_pwr"; |
| 265 | reg = <0x83>; |
| 266 | qcom,decimation = <2>; |
| 267 | qcom,pre-div-channel-scaling = <1>; |
| 268 | qcom,calibration-type = "absolute"; |
| 269 | qcom,scale-function = <0>; |
| 270 | qcom,hw-settle-time = <0>; |
| 271 | qcom,fast-avg-setup = <0>; |
| 272 | }; |
| 273 | |
| 274 | chan@85 { |
| 275 | label = "vcoin"; |
| 276 | reg = <0x85>; |
| 277 | qcom,decimation = <2>; |
| 278 | qcom,pre-div-channel-scaling = <1>; |
| 279 | qcom,calibration-type = "absolute"; |
| 280 | qcom,scale-function = <0>; |
| 281 | qcom,hw-settle-time = <0>; |
| 282 | qcom,fast-avg-setup = <0>; |
| 283 | }; |
| 284 | |
| 285 | chan@4c { |
| 286 | label = "xo_therm"; |
| 287 | reg = <0x4c>; |
| 288 | qcom,decimation = <2>; |
| 289 | qcom,pre-div-channel-scaling = <0>; |
| 290 | qcom,calibration-type = "ratiometric"; |
| 291 | qcom,scale-function = <4>; |
| 292 | qcom,hw-settle-time = <2>; |
| 293 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 294 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 295 | }; |
| 296 | |
| 297 | chan@4d { |
| 298 | label = "msm_therm"; |
| 299 | reg = <0x4d>; |
| 300 | qcom,decimation = <2>; |
| 301 | qcom,pre-div-channel-scaling = <0>; |
| 302 | qcom,calibration-type = "ratiometric"; |
| 303 | qcom,scale-function = <2>; |
| 304 | qcom,hw-settle-time = <2>; |
| 305 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 306 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 307 | }; |
| 308 | |
| 309 | chan@4f { |
| 310 | label = "pa_therm1"; |
| 311 | reg = <0x4f>; |
| 312 | qcom,decimation = <2>; |
| 313 | qcom,pre-div-channel-scaling = <0>; |
| 314 | qcom,calibration-type = "ratiometric"; |
| 315 | qcom,scale-function = <2>; |
| 316 | qcom,hw-settle-time = <2>; |
| 317 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 318 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 319 | }; |
| 320 | |
| 321 | chan@51 { |
| 322 | label = "quiet_therm"; |
| 323 | reg = <0x51>; |
| 324 | qcom,decimation = <2>; |
| 325 | qcom,pre-div-channel-scaling = <0>; |
| 326 | qcom,calibration-type = "ratiometric"; |
| 327 | qcom,scale-function = <2>; |
| 328 | qcom,hw-settle-time = <2>; |
| 329 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 330 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 331 | }; |
| 332 | }; |
| 333 | |
| 334 | &pm8998_adc_tm { |
| 335 | chan@83 { |
| 336 | label = "vph_pwr"; |
| 337 | reg = <0x83>; |
| 338 | qcom,pre-div-channel-scaling = <1>; |
| 339 | qcom,calibration-type = "absolute"; |
| 340 | qcom,scale-function = <0>; |
| 341 | qcom,hw-settle-time = <0>; |
| 342 | qcom,btm-channel-number = <0x60>; |
| 343 | }; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 344 | }; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 345 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 346 | &thermal_zones { |
| 347 | xo-therm-adc { |
| 348 | polling-delay-passive = <0>; |
| 349 | polling-delay = <0>; |
| 350 | thermal-sensors = <&pm8998_vadc 0x4c>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 351 | }; |
| 352 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 353 | msm-therm-adc { |
| 354 | polling-delay-passive = <0>; |
| 355 | polling-delay = <0>; |
| 356 | thermal-sensors = <&pm8998_vadc 0x4d>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 357 | }; |
| 358 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 359 | pa-therm1-adc { |
| 360 | polling-delay-passive = <0>; |
| 361 | polling-delay = <0>; |
| 362 | thermal-sensors = <&pm8998_vadc 0x4f>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 363 | }; |
| 364 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 365 | quiet-therm-adc { |
| 366 | polling-delay-passive = <0>; |
| 367 | polling-delay = <0>; |
| 368 | thermal-sensors = <&pm8998_vadc 0x51>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 369 | }; |
| 370 | }; |