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"; |
| 116 | pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend"; |
| 117 | pinctrl-0 = <&gpio_key_active>; |
| 118 | pinctrl-1 = <&gpio_key_suspend>; |
| 119 | |
| 120 | camera_focus { |
| 121 | label = "camera_focus"; |
| 122 | gpios = <&msm_gpio 91 0x1>; |
| 123 | linux,input-type = <1>; |
| 124 | linux,code = <0x210>; |
| 125 | gpio-key,wakeup; |
| 126 | debounce-interval = <15>; |
| 127 | }; |
| 128 | |
| 129 | camera_snapshot { |
| 130 | label = "camera_snapshot"; |
| 131 | gpios = <&msm_gpio 92 0x1>; |
| 132 | linux,input-type = <1>; |
| 133 | linux,code = <0x2fe>; |
| 134 | gpio-key,wakeup; |
| 135 | debounce-interval = <15>; |
| 136 | }; |
| 137 | |
| 138 | vol_up { |
| 139 | label = "volume_up"; |
| 140 | gpios = <&msm_gpio 90 0x1>; |
| 141 | linux,input-type = <1>; |
| 142 | linux,code = <115>; |
| 143 | gpio-key,wakeup; |
| 144 | debounce-interval = <15>; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | audio_codec_mtp: sound { |
| 149 | compatible = "qcom,msm8952-audio-codec"; |
| 150 | qcom,model = "msm8909-snd-card"; |
| 151 | reg = <0x7702000 0x4>, |
| 152 | <0x7702004 0x4>, |
| 153 | <0x7702008 0x4>; |
| 154 | reg-names = "csr_gp_io_mux_mic_ctl", |
| 155 | "csr_gp_io_mux_spkr_ctl", |
| 156 | "csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel"; |
| 157 | |
| 158 | qcom,msm-snd-card-id = <0>; |
| 159 | qcom,msm-codec-type = "internal"; |
| 160 | qcom,msm-ext-pa = "primary"; |
| 161 | qcom,msm-mclk-freq = <9600000>; |
| 162 | qcom,msm-mbhc-hphl-swh = <0>; |
| 163 | qcom,msm-mbhc-gnd-swh = <0>; |
| 164 | qcom,msm-hs-micbias-type = "internal"; |
| 165 | qcom,msm-micbias1-ext-cap; |
| 166 | qcom,split-a2dp; |
| 167 | qcom,audio-routing = |
| 168 | "RX_BIAS", "MCLK", |
| 169 | "SPK_RX_BIAS", "MCLK", |
| 170 | "INT_LDO_H", "MCLK", |
| 171 | "MIC BIAS External", "Handset Mic", |
| 172 | "MIC BIAS Internal2", "Headset Mic", |
| 173 | "MIC BIAS External", "Secondary Mic", |
| 174 | "AMIC1", "MIC BIAS External", |
| 175 | "AMIC2", "MIC BIAS Internal2", |
| 176 | "AMIC3", "MIC BIAS External"; |
| 177 | qcom,msm-gpios = |
| 178 | "pri_i2s", |
| 179 | "us_eu_gpio"; |
| 180 | qcom,pinctrl-names = |
| 181 | "all_off", |
| 182 | "pri_i2s_act", |
| 183 | "us_eu_gpio_act", |
| 184 | "pri_i2s_us_eu_gpio_act"; |
| 185 | pinctrl-names = |
| 186 | "all_off", |
| 187 | "pri_i2s_act", |
| 188 | "us_eu_gpio_act", |
| 189 | "pri_i2s_us_eu_gpio_act"; |
| 190 | pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus |
| 191 | &vdd_spkdrv_sus>; |
| 192 | pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus |
| 193 | &vdd_spkdrv_act>; |
| 194 | pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act |
| 195 | &vdd_spkdrv_sus>; |
| 196 | pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act |
| 197 | &vdd_spkdrv_act>; |
| 198 | qcom,cdc-us-euro-gpios = <&msm_gpio 97 0>; |
| 199 | asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>, |
| 200 | <&loopback>, <&compress>, <&hostless>, |
| 201 | <&afe>, <&lsm>, <&routing>, <&lpa>, |
| 202 | <&voice_svc>; |
| 203 | asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1", |
| 204 | "msm-pcm-dsp.2", "msm-voip-dsp", |
| 205 | "msm-pcm-voice", "msm-pcm-loopback", |
| 206 | "msm-compress-dsp", "msm-pcm-hostless", |
| 207 | "msm-pcm-afe", "msm-lsm-client", |
| 208 | "msm-pcm-routing", "msm-pcm-lpa", |
| 209 | "msm-voice-svc"; |
| 210 | asoc-cpu = <&dai_pri_auxpcm>, |
| 211 | <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, |
| 212 | <&dai_mi2s3>, <&dai_mi2s5>, <&dai_mi2s6>, |
| 213 | <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>, |
| 214 | <&int_fm_rx>, <&int_fm_tx>, <&afe_pcm_rx>, |
| 215 | <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>, |
| 216 | <&incall_record_rx>, <&incall_record_tx>, |
| 217 | <&incall_music_rx>, <&incall_music_2_rx>; |
| 218 | asoc-cpu-names = "msm-dai-q6-auxpcm.1", |
| 219 | "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1", |
| 220 | "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", |
| 221 | "msm-dai-q6-mi2s.5", "msm-dai-q6-mi2s.6", |
| 222 | "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", |
| 223 | "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292", |
| 224 | "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224", |
| 225 | "msm-dai-q6-dev.225", "msm-dai-q6-dev.241", |
| 226 | "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771", |
| 227 | "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", |
| 228 | "msm-dai-q6-dev.32770"; |
| 229 | asoc-codec = <&stub_codec>, <&pm8909_conga_dig>; |
| 230 | asoc-codec-names = "msm-stub-codec.1", "cajon_codec"; |
| 231 | }; |
| 232 | }; |
| 233 | |
| 234 | &blsp1_uart1 { |
| 235 | status = "ok"; |
| 236 | pinctrl-names = "default"; |
| 237 | pinctrl-0 = <&uart_console_sleep>; |
| 238 | }; |
| 239 | |
| 240 | &qcom_rng { |
| 241 | status = "okay"; |
| 242 | }; |
| 243 | |
| 244 | &qcom_crypto { |
| 245 | status = "okay"; |
| 246 | }; |
| 247 | |
| 248 | &qcom_cedev { |
| 249 | status = "okay"; |
| 250 | }; |
| 251 | |
| 252 | &qcom_seecom { |
| 253 | status = "okay"; |
| 254 | }; |
| 255 | |
| 256 | &qcom_tzlog { |
| 257 | status = "okay"; |
| 258 | }; |
| 259 | |
| 260 | &qnand_1 { |
| 261 | status = "ok"; |
| 262 | }; |
| 263 | |
| 264 | &sdhc_1 { |
| 265 | vdd-supply = <&pm8909_l8>; |
| 266 | qcom,vdd-voltage-level = <2900000 2900000>; |
| 267 | qcom,vdd-current-level = <200 400000>; |
| 268 | |
| 269 | vdd-io-supply = <&pm8909_l5>; |
| 270 | qcom,vdd-io-always-on; |
| 271 | qcom,vdd-io-lpm-sup; |
| 272 | qcom,vdd-io-voltage-level = <1800000 1800000>; |
| 273 | qcom,vdd-io-current-level = <200 60000>; |
| 274 | |
| 275 | pinctrl-names = "active", "sleep"; |
| 276 | pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; |
| 277 | pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; |
| 278 | |
| 279 | qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v"; |
| 280 | qcom,nonremovable; |
| 281 | |
| 282 | status = "ok"; |
| 283 | }; |
| 284 | |
| 285 | &sdhc_2 { |
| 286 | #address-cells = <0>; |
| 287 | interrupt-parent = <&sdhc_2>; |
| 288 | interrupts = <0 1 2>; |
| 289 | #interrupt-cells = <1>; |
| 290 | interrupt-map-mask = <0xffffffff>; |
| 291 | interrupt-map = <0 &intc 0 125 0 |
| 292 | 1 &intc 0 221 0 |
| 293 | 2 &msm_gpio 38 0>; |
| 294 | interrupt-names = "hc_irq", "pwr_irq", "status_irq"; |
| 295 | cd-gpios = <&msm_gpio 38 0x1>; |
| 296 | |
| 297 | vdd-supply = <&pm8909_l11>; |
| 298 | qcom,vdd-voltage-level = <1800000 2950000>; |
| 299 | qcom,vdd-current-level = <15000 400000>; |
| 300 | |
| 301 | vdd-io-supply = <&pm8909_l12>; |
| 302 | qcom,vdd-io-voltage-level = <1800000 2950000>; |
| 303 | qcom,vdd-io-current-level = <200 50000>; |
| 304 | |
| 305 | pinctrl-names = "active", "sleep"; |
| 306 | pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; |
| 307 | pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; |
| 308 | |
| 309 | status = "ok"; |
| 310 | }; |
| 311 | |
| 312 | &i2c_1 { /* BLSP1 QUP1 */ |
| 313 | }; |
| 314 | |
| 315 | &mdss_mdp { |
| 316 | qcom,mdss-pref-prim-intf = "dsi"; |
| 317 | }; |
| 318 | |
| 319 | &msm_gpio { |
| 320 | pmx_mdss { |
| 321 | mdss_dsi_active: mdss_dsi_active { |
| 322 | mux { |
| 323 | pins = "gpio25", "gpio37"; |
| 324 | }; |
| 325 | config { |
| 326 | pins = "gpio25", "gpio37"; |
| 327 | }; |
| 328 | }; |
| 329 | mdss_dsi_suspend: mdss_dsi_suspend { |
| 330 | mux { |
| 331 | pins = "gpio25", "gpio37"; |
| 332 | }; |
| 333 | config { |
| 334 | pins = "gpio25", "gpio37"; |
| 335 | }; |
| 336 | }; |
| 337 | }; |
| 338 | pmx_mdss_te { |
| 339 | mdss_te_active: mdss_te_active { |
| 340 | mux { |
| 341 | pins = "gpio24"; |
| 342 | }; |
| 343 | config { |
| 344 | pins = "gpio24"; |
| 345 | }; |
| 346 | }; |
| 347 | mdss_te_suspend: mdss_te_suspend { |
| 348 | mux { |
| 349 | pins = "gpio24"; |
| 350 | }; |
| 351 | config { |
| 352 | pins = "gpio24"; |
| 353 | }; |
| 354 | }; |
| 355 | }; |
| 356 | mpu6050_int_pin { |
| 357 | mpu6050_default: mpu6050_default { |
| 358 | mux { |
| 359 | pins = "gpio96"; |
| 360 | function = "gpio"; |
| 361 | }; |
| 362 | config { |
| 363 | pins = "gpio96"; |
| 364 | drive-dtrength = <6>; |
| 365 | bias-pull-down; |
| 366 | }; |
| 367 | }; |
| 368 | mpu6050_sleep: mpu6050_sleep { |
| 369 | mux { |
| 370 | pins = "gpio96"; |
| 371 | function = "gpio"; |
| 372 | }; |
| 373 | config { |
| 374 | pins = "gpio96"; |
| 375 | drive-dtrength = <2>; |
| 376 | bias-pull-down; |
| 377 | }; |
| 378 | }; |
| 379 | }; |
| 380 | ak8963_int_pin { |
| 381 | ak8963_default: ak8963_default { |
| 382 | mux { |
| 383 | pins = "gpio65"; |
| 384 | function = "gpio"; |
| 385 | }; |
| 386 | config { |
| 387 | pins = "gpio65"; |
| 388 | drive-strength = <6>; |
| 389 | bias-pull-up; |
| 390 | }; |
| 391 | }; |
| 392 | ak8963_sleep: ak8963_sleep { |
| 393 | mux { |
| 394 | pins = "gpio65"; |
| 395 | function = "gpio"; |
| 396 | }; |
| 397 | config { |
| 398 | pins = "gpio65"; |
| 399 | drive-strength = <2>; |
| 400 | bias-pull-down; |
| 401 | }; |
| 402 | }; |
| 403 | }; |
| 404 | }; |
| 405 | |
| 406 | /* CoreSight */ |
| 407 | &tpiu { |
| 408 | pinctrl-names = "sdcard", "trace", "swduart", |
| 409 | "swdtrc", "jtag", "spmi"; |
| 410 | /* NIDnT */ |
| 411 | pinctrl-0 = <&qdsd_clk_sdcard &qdsd_cmd_sdcard |
| 412 | &qdsd_data0_sdcard &qdsd_data1_sdcard |
| 413 | &qdsd_data2_sdcard &qdsd_data3_sdcard>; |
| 414 | pinctrl-1 = <&qdsd_clk_trace &qdsd_cmd_trace |
| 415 | &qdsd_data0_trace &qdsd_data1_trace |
| 416 | &qdsd_data2_trace &qdsd_data3_trace>; |
| 417 | pinctrl-2 = <&qdsd_cmd_swduart &qdsd_data0_swduart |
| 418 | &qdsd_data1_swduart &qdsd_data2_swduart |
| 419 | &qdsd_data3_swduart>; |
| 420 | pinctrl-3 = <&qdsd_clk_swdtrc &qdsd_cmd_swdtrc |
| 421 | &qdsd_data0_swdtrc &qdsd_data1_swdtrc |
| 422 | &qdsd_data2_swdtrc &qdsd_data3_swdtrc>; |
| 423 | pinctrl-4 = <&qdsd_cmd_jtag &qdsd_data0_jtag |
| 424 | &qdsd_data1_jtag &qdsd_data2_jtag |
| 425 | &qdsd_data3_jtag>; |
| 426 | pinctrl-5 = <&qdsd_clk_spmi &qdsd_cmd_spmi |
| 427 | &qdsd_data0_spmi &qdsd_data3_spmi>; |
| 428 | }; |