blob: 18fc575851d115e1aee40b4cb81206c1b0765ddc [file] [log] [blame]
Raja Mallikaac1e5992018-02-16 14:54:12 +05301/* 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
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530240/ {
241 mtp_batterydata: qcom,battery-data {
242 qcom,rpull-up-kohm = <100>;
243 qcom,vref-batt-therm = <1800000>;
244 #include "batterydata-palladium.dtsi"
245 };
246};
247
Raja Mallikaac1e5992018-02-16 14:54:12 +0530248&qcom_rng {
249 status = "okay";
250};
251
252&qcom_crypto {
253 status = "okay";
254};
255
256&qcom_cedev {
257 status = "okay";
258};
259
260&qcom_seecom {
261 status = "okay";
262};
263
264&qcom_tzlog {
265 status = "okay";
266};
267
268&qnand_1 {
269 status = "ok";
270};
271
272&sdhc_1 {
273 vdd-supply = <&pm8909_l8>;
274 qcom,vdd-voltage-level = <2900000 2900000>;
275 qcom,vdd-current-level = <200 400000>;
276
277 vdd-io-supply = <&pm8909_l5>;
278 qcom,vdd-io-always-on;
279 qcom,vdd-io-lpm-sup;
280 qcom,vdd-io-voltage-level = <1800000 1800000>;
281 qcom,vdd-io-current-level = <200 60000>;
282
283 pinctrl-names = "active", "sleep";
284 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
285 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
286
287 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
288 qcom,nonremovable;
289
290 status = "ok";
291};
292
293&sdhc_2 {
294 #address-cells = <0>;
295 interrupt-parent = <&sdhc_2>;
296 interrupts = <0 1 2>;
297 #interrupt-cells = <1>;
298 interrupt-map-mask = <0xffffffff>;
299 interrupt-map = <0 &intc 0 125 0
300 1 &intc 0 221 0
301 2 &msm_gpio 38 0>;
302 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
303 cd-gpios = <&msm_gpio 38 0x1>;
304
305 vdd-supply = <&pm8909_l11>;
306 qcom,vdd-voltage-level = <1800000 2950000>;
307 qcom,vdd-current-level = <15000 400000>;
308
309 vdd-io-supply = <&pm8909_l12>;
310 qcom,vdd-io-voltage-level = <1800000 2950000>;
311 qcom,vdd-io-current-level = <200 50000>;
312
313 pinctrl-names = "active", "sleep";
314 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
315 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
316
317 status = "ok";
318};
319
320&i2c_1 { /* BLSP1 QUP1 */
321};
322
323&mdss_mdp {
324 qcom,mdss-pref-prim-intf = "dsi";
325};
326
327&msm_gpio {
328 pmx_mdss {
329 mdss_dsi_active: mdss_dsi_active {
330 mux {
331 pins = "gpio25", "gpio37";
332 };
333 config {
334 pins = "gpio25", "gpio37";
335 };
336 };
337 mdss_dsi_suspend: mdss_dsi_suspend {
338 mux {
339 pins = "gpio25", "gpio37";
340 };
341 config {
342 pins = "gpio25", "gpio37";
343 };
344 };
345 };
346 pmx_mdss_te {
347 mdss_te_active: mdss_te_active {
348 mux {
349 pins = "gpio24";
350 };
351 config {
352 pins = "gpio24";
353 };
354 };
355 mdss_te_suspend: mdss_te_suspend {
356 mux {
357 pins = "gpio24";
358 };
359 config {
360 pins = "gpio24";
361 };
362 };
363 };
364 mpu6050_int_pin {
365 mpu6050_default: mpu6050_default {
366 mux {
367 pins = "gpio96";
368 function = "gpio";
369 };
370 config {
371 pins = "gpio96";
372 drive-dtrength = <6>;
373 bias-pull-down;
374 };
375 };
376 mpu6050_sleep: mpu6050_sleep {
377 mux {
378 pins = "gpio96";
379 function = "gpio";
380 };
381 config {
382 pins = "gpio96";
383 drive-dtrength = <2>;
384 bias-pull-down;
385 };
386 };
387 };
388 ak8963_int_pin {
389 ak8963_default: ak8963_default {
390 mux {
391 pins = "gpio65";
392 function = "gpio";
393 };
394 config {
395 pins = "gpio65";
396 drive-strength = <6>;
397 bias-pull-up;
398 };
399 };
400 ak8963_sleep: ak8963_sleep {
401 mux {
402 pins = "gpio65";
403 function = "gpio";
404 };
405 config {
406 pins = "gpio65";
407 drive-strength = <2>;
408 bias-pull-down;
409 };
410 };
411 };
412};
413
414/* CoreSight */
415&tpiu {
416 pinctrl-names = "sdcard", "trace", "swduart",
417 "swdtrc", "jtag", "spmi";
418 /* NIDnT */
419 pinctrl-0 = <&qdsd_clk_sdcard &qdsd_cmd_sdcard
420 &qdsd_data0_sdcard &qdsd_data1_sdcard
421 &qdsd_data2_sdcard &qdsd_data3_sdcard>;
422 pinctrl-1 = <&qdsd_clk_trace &qdsd_cmd_trace
423 &qdsd_data0_trace &qdsd_data1_trace
424 &qdsd_data2_trace &qdsd_data3_trace>;
425 pinctrl-2 = <&qdsd_cmd_swduart &qdsd_data0_swduart
426 &qdsd_data1_swduart &qdsd_data2_swduart
427 &qdsd_data3_swduart>;
428 pinctrl-3 = <&qdsd_clk_swdtrc &qdsd_cmd_swdtrc
429 &qdsd_data0_swdtrc &qdsd_data1_swdtrc
430 &qdsd_data2_swdtrc &qdsd_data3_swdtrc>;
431 pinctrl-4 = <&qdsd_cmd_jtag &qdsd_data0_jtag
432 &qdsd_data1_jtag &qdsd_data2_jtag
433 &qdsd_data3_jtag>;
434 pinctrl-5 = <&qdsd_clk_spmi &qdsd_cmd_spmi
435 &qdsd_data0_spmi &qdsd_data3_spmi>;
436};