blob: 591d30d26077cf9a9a75c91e8d37aaaaf7b11835 [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";
196 qcom,msm-gpios =
197 "pri_i2s",
198 "us_eu_gpio";
199 qcom,pinctrl-names =
200 "all_off",
201 "pri_i2s_act",
202 "us_eu_gpio_act",
203 "pri_i2s_us_eu_gpio_act";
204 pinctrl-names =
205 "all_off",
206 "pri_i2s_act",
207 "us_eu_gpio_act",
208 "pri_i2s_us_eu_gpio_act";
209 pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus
210 &vdd_spkdrv_sus>;
211 pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus
212 &vdd_spkdrv_act>;
213 pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act
214 &vdd_spkdrv_sus>;
215 pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act
216 &vdd_spkdrv_act>;
217 qcom,cdc-us-euro-gpios = <&msm_gpio 97 0>;
218 asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
219 <&loopback>, <&compress>, <&hostless>,
220 <&afe>, <&lsm>, <&routing>, <&lpa>,
221 <&voice_svc>;
222 asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
223 "msm-pcm-dsp.2", "msm-voip-dsp",
224 "msm-pcm-voice", "msm-pcm-loopback",
225 "msm-compress-dsp", "msm-pcm-hostless",
226 "msm-pcm-afe", "msm-lsm-client",
227 "msm-pcm-routing", "msm-pcm-lpa",
228 "msm-voice-svc";
229 asoc-cpu = <&dai_pri_auxpcm>,
230 <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>,
Meng Wang76ffa832018-08-10 12:07:27 +0800231 <&dai_mi2s3>, <&dai_mi2s4>, <&dai_mi2s5>,
Raja Mallikaac1e5992018-02-16 14:54:12 +0530232 <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>,
233 <&int_fm_rx>, <&int_fm_tx>, <&afe_pcm_rx>,
234 <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>,
235 <&incall_record_rx>, <&incall_record_tx>,
236 <&incall_music_rx>, <&incall_music_2_rx>;
237 asoc-cpu-names = "msm-dai-q6-auxpcm.1",
238 "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
239 "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
Meng Wang76ffa832018-08-10 12:07:27 +0800240 "msm-dai-q6-mi2s.4", "msm-dai-q6-mi2s.6",
Raja Mallikaac1e5992018-02-16 14:54:12 +0530241 "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
242 "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292",
243 "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224",
244 "msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
245 "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
246 "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
247 "msm-dai-q6-dev.32770";
248 asoc-codec = <&stub_codec>, <&pm8909_conga_dig>;
249 asoc-codec-names = "msm-stub-codec.1", "cajon_codec";
250 };
251};
252
253&blsp1_uart1 {
254 status = "ok";
255 pinctrl-names = "default";
256 pinctrl-0 = <&uart_console_sleep>;
257};
258
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530259/ {
260 mtp_batterydata: qcom,battery-data {
261 qcom,rpull-up-kohm = <100>;
262 qcom,vref-batt-therm = <1800000>;
263 #include "batterydata-palladium.dtsi"
264 };
265};
266
Raja Mallikaac1e5992018-02-16 14:54:12 +0530267&qcom_rng {
268 status = "okay";
269};
270
271&qcom_crypto {
272 status = "okay";
273};
274
275&qcom_cedev {
276 status = "okay";
277};
278
279&qcom_seecom {
280 status = "okay";
281};
282
283&qcom_tzlog {
284 status = "okay";
285};
286
287&qnand_1 {
288 status = "ok";
289};
290
291&sdhc_1 {
292 vdd-supply = <&pm8909_l8>;
293 qcom,vdd-voltage-level = <2900000 2900000>;
294 qcom,vdd-current-level = <200 400000>;
295
296 vdd-io-supply = <&pm8909_l5>;
297 qcom,vdd-io-always-on;
298 qcom,vdd-io-lpm-sup;
299 qcom,vdd-io-voltage-level = <1800000 1800000>;
300 qcom,vdd-io-current-level = <200 60000>;
301
302 pinctrl-names = "active", "sleep";
303 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
304 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
305
306 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
307 qcom,nonremovable;
308
309 status = "ok";
310};
311
312&sdhc_2 {
313 #address-cells = <0>;
314 interrupt-parent = <&sdhc_2>;
315 interrupts = <0 1 2>;
316 #interrupt-cells = <1>;
317 interrupt-map-mask = <0xffffffff>;
318 interrupt-map = <0 &intc 0 125 0
319 1 &intc 0 221 0
320 2 &msm_gpio 38 0>;
321 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
322 cd-gpios = <&msm_gpio 38 0x1>;
323
324 vdd-supply = <&pm8909_l11>;
325 qcom,vdd-voltage-level = <1800000 2950000>;
326 qcom,vdd-current-level = <15000 400000>;
327
328 vdd-io-supply = <&pm8909_l12>;
329 qcom,vdd-io-voltage-level = <1800000 2950000>;
330 qcom,vdd-io-current-level = <200 50000>;
331
332 pinctrl-names = "active", "sleep";
333 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
334 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
335
336 status = "ok";
337};
338
339&i2c_1 { /* BLSP1 QUP1 */
340};
341
342&mdss_mdp {
343 qcom,mdss-pref-prim-intf = "dsi";
344};
345
Himanshu Agrawalfc47a5c2020-03-06 15:08:00 +0530346&dsi_hx8394d_720_vid {
347 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
348 qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
349 qcom,mdss-dsi-bl-pmic-bank-select = <0>;
350 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
351};
352
Raja Mallikaac1e5992018-02-16 14:54:12 +0530353&msm_gpio {
354 pmx_mdss {
355 mdss_dsi_active: mdss_dsi_active {
356 mux {
357 pins = "gpio25", "gpio37";
358 };
359 config {
360 pins = "gpio25", "gpio37";
361 };
362 };
363 mdss_dsi_suspend: mdss_dsi_suspend {
364 mux {
365 pins = "gpio25", "gpio37";
366 };
367 config {
368 pins = "gpio25", "gpio37";
369 };
370 };
371 };
372 pmx_mdss_te {
373 mdss_te_active: mdss_te_active {
374 mux {
375 pins = "gpio24";
376 };
377 config {
378 pins = "gpio24";
379 };
380 };
381 mdss_te_suspend: mdss_te_suspend {
382 mux {
383 pins = "gpio24";
384 };
385 config {
386 pins = "gpio24";
387 };
388 };
389 };
390 mpu6050_int_pin {
391 mpu6050_default: mpu6050_default {
392 mux {
393 pins = "gpio96";
394 function = "gpio";
395 };
396 config {
397 pins = "gpio96";
398 drive-dtrength = <6>;
399 bias-pull-down;
400 };
401 };
402 mpu6050_sleep: mpu6050_sleep {
403 mux {
404 pins = "gpio96";
405 function = "gpio";
406 };
407 config {
408 pins = "gpio96";
409 drive-dtrength = <2>;
410 bias-pull-down;
411 };
412 };
413 };
414 ak8963_int_pin {
415 ak8963_default: ak8963_default {
416 mux {
417 pins = "gpio65";
418 function = "gpio";
419 };
420 config {
421 pins = "gpio65";
422 drive-strength = <6>;
423 bias-pull-up;
424 };
425 };
426 ak8963_sleep: ak8963_sleep {
427 mux {
428 pins = "gpio65";
429 function = "gpio";
430 };
431 config {
432 pins = "gpio65";
433 drive-strength = <2>;
434 bias-pull-down;
435 };
436 };
437 };
438};
Himanshu Agrawalfc47a5c2020-03-06 15:08:00 +0530439
440&mdss_dsi0 {
441 qcom,dsi-pref-prim-pan = <&dsi_hx8394d_720_vid>;
442 pinctrl-names = "mdss_default", "mdss_sleep";
443 pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
444 pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
445
446 qcom,platform-reset-gpio = <&msm_gpio 25 0>;
447 qcom,platform-bklight-en-gpio = <&msm_gpio 37 0>;
448};