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