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; |
Girish Mahadevan | 1d38bd3 | 2017-04-11 17:59:47 -0600 | [diff] [blame^] | 205 | hsuart0 = &qupv3_se6_4uart; |
Girish Mahadevan | 11bc2ff | 2017-04-08 08:26:35 -0600 | [diff] [blame] | 206 | }; |
| 207 | }; |
| 208 | |
| 209 | &qupv3_se9_2uart { |
| 210 | status = "ok"; |
| 211 | }; |
| 212 | |
| 213 | &qupv3_se8_spi { |
| 214 | status = "ok"; |
| 215 | }; |
| 216 | |
| 217 | &qupv3_se3_i2c { |
| 218 | status = "ok"; |
| 219 | }; |
| 220 | |
| 221 | &qupv3_se10_i2c { |
| 222 | status = "ok"; |
| 223 | }; |
Jack Pham | c2160c84 | 2017-04-05 09:48:59 -0700 | [diff] [blame] | 224 | |
Girish Mahadevan | 1d38bd3 | 2017-04-11 17:59:47 -0600 | [diff] [blame^] | 225 | &qupv3_se6_4uart { |
| 226 | status = "ok"; |
| 227 | }; |
| 228 | |
Jack Pham | c2160c84 | 2017-04-05 09:48:59 -0700 | [diff] [blame] | 229 | &usb1 { |
| 230 | status = "okay"; |
| 231 | extcon = <&extcon_usb1>; |
| 232 | vbus_dwc3-supply = <&usb1_vbus_vreg>; |
| 233 | }; |
| 234 | |
| 235 | &qusb_phy1 { |
| 236 | status = "okay"; |
| 237 | }; |
| 238 | |
| 239 | &usb_qmp_phy { |
| 240 | status = "okay"; |
| 241 | }; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 242 | |
| 243 | &pm8998_vadc { |
| 244 | chan@83 { |
| 245 | label = "vph_pwr"; |
| 246 | reg = <0x83>; |
| 247 | qcom,decimation = <2>; |
| 248 | qcom,pre-div-channel-scaling = <1>; |
| 249 | qcom,calibration-type = "absolute"; |
| 250 | qcom,scale-function = <0>; |
| 251 | qcom,hw-settle-time = <0>; |
| 252 | qcom,fast-avg-setup = <0>; |
| 253 | }; |
| 254 | |
| 255 | chan@85 { |
| 256 | label = "vcoin"; |
| 257 | reg = <0x85>; |
| 258 | qcom,decimation = <2>; |
| 259 | qcom,pre-div-channel-scaling = <1>; |
| 260 | qcom,calibration-type = "absolute"; |
| 261 | qcom,scale-function = <0>; |
| 262 | qcom,hw-settle-time = <0>; |
| 263 | qcom,fast-avg-setup = <0>; |
| 264 | }; |
| 265 | |
| 266 | chan@4c { |
| 267 | label = "xo_therm"; |
| 268 | reg = <0x4c>; |
| 269 | qcom,decimation = <2>; |
| 270 | qcom,pre-div-channel-scaling = <0>; |
| 271 | qcom,calibration-type = "ratiometric"; |
| 272 | qcom,scale-function = <4>; |
| 273 | qcom,hw-settle-time = <2>; |
| 274 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 275 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 276 | }; |
| 277 | |
| 278 | chan@4d { |
| 279 | label = "msm_therm"; |
| 280 | reg = <0x4d>; |
| 281 | qcom,decimation = <2>; |
| 282 | qcom,pre-div-channel-scaling = <0>; |
| 283 | qcom,calibration-type = "ratiometric"; |
| 284 | qcom,scale-function = <2>; |
| 285 | qcom,hw-settle-time = <2>; |
| 286 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 287 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 288 | }; |
| 289 | |
| 290 | chan@4f { |
| 291 | label = "pa_therm1"; |
| 292 | reg = <0x4f>; |
| 293 | qcom,decimation = <2>; |
| 294 | qcom,pre-div-channel-scaling = <0>; |
| 295 | qcom,calibration-type = "ratiometric"; |
| 296 | qcom,scale-function = <2>; |
| 297 | qcom,hw-settle-time = <2>; |
| 298 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 299 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 300 | }; |
| 301 | |
| 302 | chan@51 { |
| 303 | label = "quiet_therm"; |
| 304 | reg = <0x51>; |
| 305 | qcom,decimation = <2>; |
| 306 | qcom,pre-div-channel-scaling = <0>; |
| 307 | qcom,calibration-type = "ratiometric"; |
| 308 | qcom,scale-function = <2>; |
| 309 | qcom,hw-settle-time = <2>; |
| 310 | qcom,fast-avg-setup = <0>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 311 | qcom,vadc-thermal-node; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 312 | }; |
| 313 | }; |
| 314 | |
| 315 | &pm8998_adc_tm { |
| 316 | chan@83 { |
| 317 | label = "vph_pwr"; |
| 318 | reg = <0x83>; |
| 319 | qcom,pre-div-channel-scaling = <1>; |
| 320 | qcom,calibration-type = "absolute"; |
| 321 | qcom,scale-function = <0>; |
| 322 | qcom,hw-settle-time = <0>; |
| 323 | qcom,btm-channel-number = <0x60>; |
| 324 | }; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 325 | }; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 326 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 327 | &thermal_zones { |
| 328 | xo-therm-adc { |
| 329 | polling-delay-passive = <0>; |
| 330 | polling-delay = <0>; |
| 331 | thermal-sensors = <&pm8998_vadc 0x4c>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 332 | }; |
| 333 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 334 | msm-therm-adc { |
| 335 | polling-delay-passive = <0>; |
| 336 | polling-delay = <0>; |
| 337 | thermal-sensors = <&pm8998_vadc 0x4d>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 338 | }; |
| 339 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 340 | pa-therm1-adc { |
| 341 | polling-delay-passive = <0>; |
| 342 | polling-delay = <0>; |
| 343 | thermal-sensors = <&pm8998_vadc 0x4f>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 344 | }; |
| 345 | |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 346 | quiet-therm-adc { |
| 347 | polling-delay-passive = <0>; |
| 348 | polling-delay = <0>; |
| 349 | thermal-sensors = <&pm8998_vadc 0x51>; |
Siddartha Mohanadoss | 8102196 | 2017-04-12 11:31:00 -0700 | [diff] [blame] | 350 | }; |
| 351 | }; |