Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2014-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 "msm8909.dtsi" |
| 14 | #include "msm8909-pinctrl.dtsi" |
| 15 | #include "msm8909-regulator.dtsi" |
| 16 | |
| 17 | &soc { |
| 18 | /* |
| 19 | * DT node to add support for SMB135x charger and integrate |
| 20 | * with VM-BMS. |
| 21 | */ |
| 22 | i2c@78b8000 { |
| 23 | smb1357_otg_vreg: smb1357-charger@57 { |
| 24 | compatible = "qcom,smb1357-charger"; |
| 25 | reg = <0x57>; |
| 26 | interrupt-parent = <&msm_gpio>; |
| 27 | interrupts = <58 8>; |
| 28 | pinctrl-names = "default"; |
| 29 | pinctrl-0 = <&smb_int_default>; |
| 30 | |
| 31 | qcom,bmd-algo-disabled; |
| 32 | qcom,float-voltage-mv = <4200>; |
| 33 | qcom,charging-timeout = <1536>; |
| 34 | qcom,recharge-thresh-mv = <100>; |
| 35 | regulator-name = "smb1357_otg_vreg"; |
| 36 | qcom,soft-vfloat-comp-disabled; |
| 37 | qcom,thermal-mitigation = <1500 700 600 0>; |
| 38 | |
| 39 | qcom,bms-psy-name = "bms"; |
| 40 | |
| 41 | /* |
| 42 | * Disable SMB1357 based charging termination as BMS |
| 43 | * controls charging. |
| 44 | */ |
| 45 | qcom,iterm-disabled; |
| 46 | |
| 47 | /* |
| 48 | * Disable charge inhibit feature to start chargin on |
| 49 | * charger insertion independent of battery voltage. |
| 50 | */ |
| 51 | qcom,inhibit-disabled; |
| 52 | |
| 53 | /* BMS is controlling charging/re-charge */ |
| 54 | qcom,bms-controlled-charging; |
| 55 | |
| 56 | /* |
| 57 | * To enable charger node: |
| 58 | * set status = "ok" and |
| 59 | * add 'qcom,use-external-charger' to pm8909_chg node |
| 60 | */ |
| 61 | status = "disabled"; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | /* |
| 66 | * DT node to add support for SMB358 charger and integrate |
| 67 | * with VM-BMS. |
| 68 | */ |
| 69 | i2c@78b8000 { |
| 70 | }; |
| 71 | |
| 72 | i2c@78b9000 { /* BLSP1 QUP5 */ |
| 73 | synaptics@20 { |
| 74 | compatible = "synaptics,dsx"; |
| 75 | reg = <0x20>; |
| 76 | interrupt-parent = <&msm_gpio>; |
| 77 | interrupts = <13 0x2008>; |
| 78 | avdd-supply = <&pm8909_l17>; |
| 79 | vdd-supply = <&pm8909_l6>; |
| 80 | /* pins used by touchscreen */ |
| 81 | pinctrl-names = "pmx_ts_active", |
| 82 | "pmx_ts_suspend","pmx_ts_release"; |
| 83 | pinctrl-0 = <&ts_int_active &ts_reset_active>; |
| 84 | pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; |
| 85 | pinctrl-2 = <&ts_release>; |
| 86 | synaptics,irq-gpio = <&msm_gpio 13 0x2008>; |
| 87 | synaptics,reset-gpio = <&msm_gpio 12 0x0>; |
| 88 | synaptics,disable-gpios; |
| 89 | synaptics,display-coords = <0 0 719 1279>; |
| 90 | synaptics,panel-coords = <0 0 719 1405>; |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | i2c@78b6000 { /* BLSP1 QUP2 */ |
| 95 | nq@28 { |
| 96 | compatible = "qcom,nq-nci"; |
| 97 | reg = <0x28>; |
| 98 | qcom,nq-irq = <&msm_gpio 21 0x00>; |
| 99 | qcom,nq-ven = <&msm_gpio 20 0x00>; |
| 100 | qcom,nq-firm = <&msm_gpio 45 0x00>; |
| 101 | qcom,clk-src = "BBCLK2"; |
| 102 | interrupt-parent = <&msm_gpio>; |
| 103 | interrupts = <21 0>; |
| 104 | interrupt-names = "nfc_irq"; |
| 105 | pinctrl-names = "nfc_active","nfc_suspend"; |
| 106 | pinctrl-0 = <&nfc_int_active &nfc_disable_active>; |
| 107 | pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>; |
| 108 | clocks = <&clock_rpm clk_bb_clk2_pin>; |
| 109 | clock-names = "ref_clk"; |
| 110 | }; |
| 111 | }; |
| 112 | |
| 113 | gpio_keys { |
| 114 | compatible = "gpio-keys"; |
| 115 | input-name = "gpio-keys"; |
Shantanu Jain | 9b7f71e | 2018-08-13 19:15:58 +0530 | [diff] [blame] | 116 | pinctrl-names = "default"; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 117 | pinctrl-0 = <&gpio_key_active>; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 118 | |
| 119 | camera_focus { |
| 120 | label = "camera_focus"; |
| 121 | gpios = <&msm_gpio 91 0x1>; |
| 122 | linux,input-type = <1>; |
| 123 | linux,code = <0x210>; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 124 | debounce-interval = <15>; |
Shantanu Jain | 9b7f71e | 2018-08-13 19:15:58 +0530 | [diff] [blame] | 125 | linux,can-disable; |
| 126 | gpio-key,wakeup; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 127 | }; |
| 128 | |
| 129 | camera_snapshot { |
| 130 | label = "camera_snapshot"; |
| 131 | gpios = <&msm_gpio 92 0x1>; |
| 132 | linux,input-type = <1>; |
| 133 | linux,code = <0x2fe>; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 134 | debounce-interval = <15>; |
Shantanu Jain | 9b7f71e | 2018-08-13 19:15:58 +0530 | [diff] [blame] | 135 | linux,can-disable; |
| 136 | gpio-key,wakeup; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 137 | }; |
| 138 | |
| 139 | vol_up { |
| 140 | label = "volume_up"; |
| 141 | gpios = <&msm_gpio 90 0x1>; |
| 142 | linux,input-type = <1>; |
| 143 | linux,code = <115>; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 144 | debounce-interval = <15>; |
Shantanu Jain | 9b7f71e | 2018-08-13 19:15:58 +0530 | [diff] [blame] | 145 | linux,can-disable; |
| 146 | gpio-key,wakeup; |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 147 | }; |
| 148 | }; |
| 149 | |
| 150 | audio_codec_mtp: sound { |
| 151 | compatible = "qcom,msm8952-audio-codec"; |
| 152 | qcom,model = "msm8909-snd-card"; |
| 153 | reg = <0x7702000 0x4>, |
| 154 | <0x7702004 0x4>, |
| 155 | <0x7702008 0x4>; |
| 156 | reg-names = "csr_gp_io_mux_mic_ctl", |
| 157 | "csr_gp_io_mux_spkr_ctl", |
| 158 | "csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel"; |
| 159 | |
| 160 | qcom,msm-snd-card-id = <0>; |
| 161 | qcom,msm-codec-type = "internal"; |
| 162 | qcom,msm-ext-pa = "primary"; |
| 163 | qcom,msm-mclk-freq = <9600000>; |
| 164 | qcom,msm-mbhc-hphl-swh = <0>; |
| 165 | qcom,msm-mbhc-gnd-swh = <0>; |
| 166 | qcom,msm-hs-micbias-type = "internal"; |
| 167 | qcom,msm-micbias1-ext-cap; |
| 168 | qcom,split-a2dp; |
| 169 | qcom,audio-routing = |
| 170 | "RX_BIAS", "MCLK", |
| 171 | "SPK_RX_BIAS", "MCLK", |
| 172 | "INT_LDO_H", "MCLK", |
| 173 | "MIC BIAS External", "Handset Mic", |
| 174 | "MIC BIAS Internal2", "Headset Mic", |
| 175 | "MIC BIAS External", "Secondary Mic", |
| 176 | "AMIC1", "MIC BIAS External", |
| 177 | "AMIC2", "MIC BIAS Internal2", |
| 178 | "AMIC3", "MIC BIAS External"; |
| 179 | qcom,msm-gpios = |
| 180 | "pri_i2s", |
| 181 | "us_eu_gpio"; |
| 182 | qcom,pinctrl-names = |
| 183 | "all_off", |
| 184 | "pri_i2s_act", |
| 185 | "us_eu_gpio_act", |
| 186 | "pri_i2s_us_eu_gpio_act"; |
| 187 | pinctrl-names = |
| 188 | "all_off", |
| 189 | "pri_i2s_act", |
| 190 | "us_eu_gpio_act", |
| 191 | "pri_i2s_us_eu_gpio_act"; |
| 192 | pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus |
| 193 | &vdd_spkdrv_sus>; |
| 194 | pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus |
| 195 | &vdd_spkdrv_act>; |
| 196 | pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act |
| 197 | &vdd_spkdrv_sus>; |
| 198 | pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act |
| 199 | &vdd_spkdrv_act>; |
| 200 | qcom,cdc-us-euro-gpios = <&msm_gpio 97 0>; |
| 201 | asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>, |
| 202 | <&loopback>, <&compress>, <&hostless>, |
| 203 | <&afe>, <&lsm>, <&routing>, <&lpa>, |
| 204 | <&voice_svc>; |
| 205 | asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", |
| 206 | "msm-pcm-dsp.2", "msm-voip-dsp", |
| 207 | "msm-pcm-voice", "msm-pcm-loopback", |
| 208 | "msm-compress-dsp", "msm-pcm-hostless", |
| 209 | "msm-pcm-afe", "msm-lsm-client", |
| 210 | "msm-pcm-routing", "msm-pcm-lpa", |
| 211 | "msm-voice-svc"; |
| 212 | asoc-cpu = <&dai_pri_auxpcm>, |
| 213 | <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, |
Meng Wang | 76ffa83 | 2018-08-10 12:07:27 +0800 | [diff] [blame^] | 214 | <&dai_mi2s3>, <&dai_mi2s4>, <&dai_mi2s5>, |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 215 | <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, |
| 216 | <&int_fm_rx>, <&int_fm_tx>, <&afe_pcm_rx>, |
| 217 | <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, |
| 218 | <&incall_record_rx>, <&incall_record_tx>, |
| 219 | <&incall_music_rx>, <&incall_music_2_rx>; |
| 220 | asoc-cpu-names = "msm-dai-q6-auxpcm.1", |
| 221 | "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", |
| 222 | "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", |
Meng Wang | 76ffa83 | 2018-08-10 12:07:27 +0800 | [diff] [blame^] | 223 | "msm-dai-q6-mi2s.4", "msm-dai-q6-mi2s.6", |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 224 | "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", |
| 225 | "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", |
| 226 | "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", |
| 227 | "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", |
| 228 | "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", |
| 229 | "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", |
| 230 | "msm-dai-q6-dev.32770"; |
| 231 | asoc-codec = <&stub_codec>, <&pm8909_conga_dig>; |
| 232 | asoc-codec-names = "msm-stub-codec.1", "cajon_codec"; |
| 233 | }; |
| 234 | }; |
| 235 | |
| 236 | &blsp1_uart1 { |
| 237 | status = "ok"; |
| 238 | pinctrl-names = "default"; |
| 239 | pinctrl-0 = <&uart_console_sleep>; |
| 240 | }; |
| 241 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame] | 242 | / { |
| 243 | mtp_batterydata: qcom,battery-data { |
| 244 | qcom,rpull-up-kohm = <100>; |
| 245 | qcom,vref-batt-therm = <1800000>; |
| 246 | #include "batterydata-palladium.dtsi" |
| 247 | }; |
| 248 | }; |
| 249 | |
Raja Mallik | aac1e599 | 2018-02-16 14:54:12 +0530 | [diff] [blame] | 250 | &qcom_rng { |
| 251 | status = "okay"; |
| 252 | }; |
| 253 | |
| 254 | &qcom_crypto { |
| 255 | status = "okay"; |
| 256 | }; |
| 257 | |
| 258 | &qcom_cedev { |
| 259 | status = "okay"; |
| 260 | }; |
| 261 | |
| 262 | &qcom_seecom { |
| 263 | status = "okay"; |
| 264 | }; |
| 265 | |
| 266 | &qcom_tzlog { |
| 267 | status = "okay"; |
| 268 | }; |
| 269 | |
| 270 | &qnand_1 { |
| 271 | status = "ok"; |
| 272 | }; |
| 273 | |
| 274 | &sdhc_1 { |
| 275 | vdd-supply = <&pm8909_l8>; |
| 276 | qcom,vdd-voltage-level = <2900000 2900000>; |
| 277 | qcom,vdd-current-level = <200 400000>; |
| 278 | |
| 279 | vdd-io-supply = <&pm8909_l5>; |
| 280 | qcom,vdd-io-always-on; |
| 281 | qcom,vdd-io-lpm-sup; |
| 282 | qcom,vdd-io-voltage-level = <1800000 1800000>; |
| 283 | qcom,vdd-io-current-level = <200 60000>; |
| 284 | |
| 285 | pinctrl-names = "active", "sleep"; |
| 286 | pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; |
| 287 | pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; |
| 288 | |
| 289 | qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v"; |
| 290 | qcom,nonremovable; |
| 291 | |
| 292 | status = "ok"; |
| 293 | }; |
| 294 | |
| 295 | &sdhc_2 { |
| 296 | #address-cells = <0>; |
| 297 | interrupt-parent = <&sdhc_2>; |
| 298 | interrupts = <0 1 2>; |
| 299 | #interrupt-cells = <1>; |
| 300 | interrupt-map-mask = <0xffffffff>; |
| 301 | interrupt-map = <0 &intc 0 125 0 |
| 302 | 1 &intc 0 221 0 |
| 303 | 2 &msm_gpio 38 0>; |
| 304 | interrupt-names = "hc_irq", "pwr_irq", "status_irq"; |
| 305 | cd-gpios = <&msm_gpio 38 0x1>; |
| 306 | |
| 307 | vdd-supply = <&pm8909_l11>; |
| 308 | qcom,vdd-voltage-level = <1800000 2950000>; |
| 309 | qcom,vdd-current-level = <15000 400000>; |
| 310 | |
| 311 | vdd-io-supply = <&pm8909_l12>; |
| 312 | qcom,vdd-io-voltage-level = <1800000 2950000>; |
| 313 | qcom,vdd-io-current-level = <200 50000>; |
| 314 | |
| 315 | pinctrl-names = "active", "sleep"; |
| 316 | pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; |
| 317 | pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; |
| 318 | |
| 319 | status = "ok"; |
| 320 | }; |
| 321 | |
| 322 | &i2c_1 { /* BLSP1 QUP1 */ |
| 323 | }; |
| 324 | |
| 325 | &mdss_mdp { |
| 326 | qcom,mdss-pref-prim-intf = "dsi"; |
| 327 | }; |
| 328 | |
| 329 | &msm_gpio { |
| 330 | pmx_mdss { |
| 331 | mdss_dsi_active: mdss_dsi_active { |
| 332 | mux { |
| 333 | pins = "gpio25", "gpio37"; |
| 334 | }; |
| 335 | config { |
| 336 | pins = "gpio25", "gpio37"; |
| 337 | }; |
| 338 | }; |
| 339 | mdss_dsi_suspend: mdss_dsi_suspend { |
| 340 | mux { |
| 341 | pins = "gpio25", "gpio37"; |
| 342 | }; |
| 343 | config { |
| 344 | pins = "gpio25", "gpio37"; |
| 345 | }; |
| 346 | }; |
| 347 | }; |
| 348 | pmx_mdss_te { |
| 349 | mdss_te_active: mdss_te_active { |
| 350 | mux { |
| 351 | pins = "gpio24"; |
| 352 | }; |
| 353 | config { |
| 354 | pins = "gpio24"; |
| 355 | }; |
| 356 | }; |
| 357 | mdss_te_suspend: mdss_te_suspend { |
| 358 | mux { |
| 359 | pins = "gpio24"; |
| 360 | }; |
| 361 | config { |
| 362 | pins = "gpio24"; |
| 363 | }; |
| 364 | }; |
| 365 | }; |
| 366 | mpu6050_int_pin { |
| 367 | mpu6050_default: mpu6050_default { |
| 368 | mux { |
| 369 | pins = "gpio96"; |
| 370 | function = "gpio"; |
| 371 | }; |
| 372 | config { |
| 373 | pins = "gpio96"; |
| 374 | drive-dtrength = <6>; |
| 375 | bias-pull-down; |
| 376 | }; |
| 377 | }; |
| 378 | mpu6050_sleep: mpu6050_sleep { |
| 379 | mux { |
| 380 | pins = "gpio96"; |
| 381 | function = "gpio"; |
| 382 | }; |
| 383 | config { |
| 384 | pins = "gpio96"; |
| 385 | drive-dtrength = <2>; |
| 386 | bias-pull-down; |
| 387 | }; |
| 388 | }; |
| 389 | }; |
| 390 | ak8963_int_pin { |
| 391 | ak8963_default: ak8963_default { |
| 392 | mux { |
| 393 | pins = "gpio65"; |
| 394 | function = "gpio"; |
| 395 | }; |
| 396 | config { |
| 397 | pins = "gpio65"; |
| 398 | drive-strength = <6>; |
| 399 | bias-pull-up; |
| 400 | }; |
| 401 | }; |
| 402 | ak8963_sleep: ak8963_sleep { |
| 403 | mux { |
| 404 | pins = "gpio65"; |
| 405 | function = "gpio"; |
| 406 | }; |
| 407 | config { |
| 408 | pins = "gpio65"; |
| 409 | drive-strength = <2>; |
| 410 | bias-pull-down; |
| 411 | }; |
| 412 | }; |
| 413 | }; |
| 414 | }; |