blob: 5b4fd6de97b30e83b30ad7ad399b47dfa4539e6d [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"
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 {
Himanshu Agrawal91c4ac12020-03-17 10:45:34 +053074 compatible = "synaptics,dsx-i2c";
Raja Mallikaac1e5992018-02-16 14:54:12 +053075 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>;
Himanshu Agrawal91c4ac12020-03-17 10:45:34 +053087 synaptics,irq-on-state = <0>;
88 synaptics,irq-flags = <0x2008>;
89
Raja Mallikaac1e5992018-02-16 14:54:12 +053090 synaptics,reset-gpio = <&msm_gpio 12 0x0>;
Himanshu Agrawal91c4ac12020-03-17 10:45:34 +053091 synaptics,reset-on-state = <0>;
92 synaptics,reset-active-ms = <20>;
93 synaptics,cap-button-codes = <139 158 172>;
94 /delete-property/ synaptics,disable-gpios;
95 /delete-property/ synaptics,display-coords;
96 /delete-property/ synaptics,panel-coords;
Raja Mallikaac1e5992018-02-16 14:54:12 +053097 };
98 };
99
100 i2c@78b6000 { /* BLSP1 QUP2 */
101 nq@28 {
102 compatible = "qcom,nq-nci";
103 reg = <0x28>;
104 qcom,nq-irq = <&msm_gpio 21 0x00>;
105 qcom,nq-ven = <&msm_gpio 20 0x00>;
106 qcom,nq-firm = <&msm_gpio 45 0x00>;
107 qcom,clk-src = "BBCLK2";
108 interrupt-parent = <&msm_gpio>;
109 interrupts = <21 0>;
110 interrupt-names = "nfc_irq";
111 pinctrl-names = "nfc_active","nfc_suspend";
112 pinctrl-0 = <&nfc_int_active &nfc_disable_active>;
113 pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>;
114 clocks = <&clock_rpm clk_bb_clk2_pin>;
115 clock-names = "ref_clk";
116 };
117 };
118
Himanshu Agrawal91c4ac12020-03-17 10:45:34 +0530119 gen-vkeys {
120 compatible = "qcom,gen-vkeys";
121 label = "synaptics_dsx_i2c";
122 qcom,disp-maxx = <719>;
123 qcom,disp-maxy = <1279>;
124 qcom,panel-maxx = <719>;
125 qcom,panel-maxy = <1405>;
126 qcom,key-codes = <158 139 172 217>;
127 };
128
Raja Mallikaac1e5992018-02-16 14:54:12 +0530129 gpio_keys {
130 compatible = "gpio-keys";
131 input-name = "gpio-keys";
Shantanu Jain9b7f71e2018-08-13 19:15:58 +0530132 pinctrl-names = "default";
Raja Mallikaac1e5992018-02-16 14:54:12 +0530133 pinctrl-0 = <&gpio_key_active>;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530134
135 camera_focus {
136 label = "camera_focus";
137 gpios = <&msm_gpio 91 0x1>;
138 linux,input-type = <1>;
139 linux,code = <0x210>;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530140 debounce-interval = <15>;
Shantanu Jain9b7f71e2018-08-13 19:15:58 +0530141 linux,can-disable;
142 gpio-key,wakeup;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530143 };
144
145 camera_snapshot {
146 label = "camera_snapshot";
147 gpios = <&msm_gpio 92 0x1>;
148 linux,input-type = <1>;
149 linux,code = <0x2fe>;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530150 debounce-interval = <15>;
Shantanu Jain9b7f71e2018-08-13 19:15:58 +0530151 linux,can-disable;
152 gpio-key,wakeup;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530153 };
154
155 vol_up {
156 label = "volume_up";
157 gpios = <&msm_gpio 90 0x1>;
158 linux,input-type = <1>;
159 linux,code = <115>;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530160 debounce-interval = <15>;
Shantanu Jain9b7f71e2018-08-13 19:15:58 +0530161 linux,can-disable;
162 gpio-key,wakeup;
Raja Mallikaac1e5992018-02-16 14:54:12 +0530163 };
164 };
165
166 audio_codec_mtp: sound {
167 compatible = "qcom,msm8952-audio-codec";
168 qcom,model = "msm8909-snd-card";
169 reg = <0x7702000 0x4>,
170 <0x7702004 0x4>,
171 <0x7702008 0x4>;
172 reg-names = "csr_gp_io_mux_mic_ctl",
173 "csr_gp_io_mux_spkr_ctl",
174 "csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel";
175
176 qcom,msm-snd-card-id = <0>;
177 qcom,msm-codec-type = "internal";
178 qcom,msm-ext-pa = "primary";
179 qcom,msm-mclk-freq = <9600000>;
180 qcom,msm-mbhc-hphl-swh = <0>;
181 qcom,msm-mbhc-gnd-swh = <0>;
182 qcom,msm-hs-micbias-type = "internal";
183 qcom,msm-micbias1-ext-cap;
184 qcom,split-a2dp;
185 qcom,audio-routing =
186 "RX_BIAS", "MCLK",
187 "SPK_RX_BIAS", "MCLK",
188 "INT_LDO_H", "MCLK",
189 "MIC BIAS External", "Handset Mic",
190 "MIC BIAS Internal2", "Headset Mic",
191 "MIC BIAS External", "Secondary Mic",
192 "AMIC1", "MIC BIAS External",
193 "AMIC2", "MIC BIAS Internal2",
194 "AMIC3", "MIC BIAS External";
195 qcom,msm-gpios =
196 "pri_i2s",
197 "us_eu_gpio";
198 qcom,pinctrl-names =
199 "all_off",
200 "pri_i2s_act",
201 "us_eu_gpio_act",
202 "pri_i2s_us_eu_gpio_act";
203 pinctrl-names =
204 "all_off",
205 "pri_i2s_act",
206 "us_eu_gpio_act",
207 "pri_i2s_us_eu_gpio_act";
208 pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus
209 &vdd_spkdrv_sus>;
210 pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus
211 &vdd_spkdrv_act>;
212 pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act
213 &vdd_spkdrv_sus>;
214 pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act
215 &vdd_spkdrv_act>;
216 qcom,cdc-us-euro-gpios = <&msm_gpio 97 0>;
217 asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
218 <&loopback>, <&compress>, <&hostless>,
219 <&afe>, <&lsm>, <&routing>, <&lpa>,
220 <&voice_svc>;
221 asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
222 "msm-pcm-dsp.2", "msm-voip-dsp",
223 "msm-pcm-voice", "msm-pcm-loopback",
224 "msm-compress-dsp", "msm-pcm-hostless",
225 "msm-pcm-afe", "msm-lsm-client",
226 "msm-pcm-routing", "msm-pcm-lpa",
227 "msm-voice-svc";
228 asoc-cpu = <&dai_pri_auxpcm>,
229 <&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>,
Meng Wang76ffa832018-08-10 12:07:27 +0800230 <&dai_mi2s3>, <&dai_mi2s4>, <&dai_mi2s5>,
Raja Mallikaac1e5992018-02-16 14:54:12 +0530231 <&bt_sco_rx>, <&bt_sco_tx>, <&bt_a2dp_rx>,
232 <&int_fm_rx>, <&int_fm_tx>, <&afe_pcm_rx>,
233 <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>,
234 <&incall_record_rx>, <&incall_record_tx>,
235 <&incall_music_rx>, <&incall_music_2_rx>;
236 asoc-cpu-names = "msm-dai-q6-auxpcm.1",
237 "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
238 "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
Meng Wang76ffa832018-08-10 12:07:27 +0800239 "msm-dai-q6-mi2s.4", "msm-dai-q6-mi2s.6",
Raja Mallikaac1e5992018-02-16 14:54:12 +0530240 "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
241 "msm-dai-q6-dev.12290", "msm-dai-q6-dev.12292",
242 "msm-dai-q6-dev.12293", "msm-dai-q6-dev.224",
243 "msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
244 "msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
245 "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
246 "msm-dai-q6-dev.32770";
247 asoc-codec = <&stub_codec>, <&pm8909_conga_dig>;
248 asoc-codec-names = "msm-stub-codec.1", "cajon_codec";
249 };
250};
251
252&blsp1_uart1 {
253 status = "ok";
254 pinctrl-names = "default";
255 pinctrl-0 = <&uart_console_sleep>;
256};
257
Sundara Vinayagambde65ab2018-03-19 14:27:33 +0530258/ {
259 mtp_batterydata: qcom,battery-data {
260 qcom,rpull-up-kohm = <100>;
261 qcom,vref-batt-therm = <1800000>;
262 #include "batterydata-palladium.dtsi"
263 };
264};
265
Raja Mallikaac1e5992018-02-16 14:54:12 +0530266&qcom_rng {
267 status = "okay";
268};
269
270&qcom_crypto {
271 status = "okay";
272};
273
274&qcom_cedev {
275 status = "okay";
276};
277
278&qcom_seecom {
279 status = "okay";
280};
281
282&qcom_tzlog {
283 status = "okay";
284};
285
286&qnand_1 {
287 status = "ok";
288};
289
290&sdhc_1 {
291 vdd-supply = <&pm8909_l8>;
292 qcom,vdd-voltage-level = <2900000 2900000>;
293 qcom,vdd-current-level = <200 400000>;
294
295 vdd-io-supply = <&pm8909_l5>;
296 qcom,vdd-io-always-on;
297 qcom,vdd-io-lpm-sup;
298 qcom,vdd-io-voltage-level = <1800000 1800000>;
299 qcom,vdd-io-current-level = <200 60000>;
300
301 pinctrl-names = "active", "sleep";
302 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
303 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
304
305 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
306 qcom,nonremovable;
307
308 status = "ok";
309};
310
311&sdhc_2 {
312 #address-cells = <0>;
313 interrupt-parent = <&sdhc_2>;
314 interrupts = <0 1 2>;
315 #interrupt-cells = <1>;
316 interrupt-map-mask = <0xffffffff>;
317 interrupt-map = <0 &intc 0 125 0
318 1 &intc 0 221 0
319 2 &msm_gpio 38 0>;
320 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
321 cd-gpios = <&msm_gpio 38 0x1>;
322
323 vdd-supply = <&pm8909_l11>;
324 qcom,vdd-voltage-level = <1800000 2950000>;
325 qcom,vdd-current-level = <15000 400000>;
326
327 vdd-io-supply = <&pm8909_l12>;
328 qcom,vdd-io-voltage-level = <1800000 2950000>;
329 qcom,vdd-io-current-level = <200 50000>;
330
331 pinctrl-names = "active", "sleep";
332 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
333 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
334
335 status = "ok";
336};
337
338&i2c_1 { /* BLSP1 QUP1 */
339};
340
341&mdss_mdp {
342 qcom,mdss-pref-prim-intf = "dsi";
343};
344
Himanshu Agrawalfc47a5c2020-03-06 15:08:00 +0530345&dsi_hx8394d_720_vid {
346 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
347 qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
348 qcom,mdss-dsi-bl-pmic-bank-select = <0>;
349 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
350};
351
Raja Mallikaac1e5992018-02-16 14:54:12 +0530352&msm_gpio {
353 pmx_mdss {
354 mdss_dsi_active: mdss_dsi_active {
355 mux {
356 pins = "gpio25", "gpio37";
357 };
358 config {
359 pins = "gpio25", "gpio37";
360 };
361 };
362 mdss_dsi_suspend: mdss_dsi_suspend {
363 mux {
364 pins = "gpio25", "gpio37";
365 };
366 config {
367 pins = "gpio25", "gpio37";
368 };
369 };
370 };
371 pmx_mdss_te {
372 mdss_te_active: mdss_te_active {
373 mux {
374 pins = "gpio24";
375 };
376 config {
377 pins = "gpio24";
378 };
379 };
380 mdss_te_suspend: mdss_te_suspend {
381 mux {
382 pins = "gpio24";
383 };
384 config {
385 pins = "gpio24";
386 };
387 };
388 };
389 mpu6050_int_pin {
390 mpu6050_default: mpu6050_default {
391 mux {
392 pins = "gpio96";
393 function = "gpio";
394 };
395 config {
396 pins = "gpio96";
397 drive-dtrength = <6>;
398 bias-pull-down;
399 };
400 };
401 mpu6050_sleep: mpu6050_sleep {
402 mux {
403 pins = "gpio96";
404 function = "gpio";
405 };
406 config {
407 pins = "gpio96";
408 drive-dtrength = <2>;
409 bias-pull-down;
410 };
411 };
412 };
413 ak8963_int_pin {
414 ak8963_default: ak8963_default {
415 mux {
416 pins = "gpio65";
417 function = "gpio";
418 };
419 config {
420 pins = "gpio65";
421 drive-strength = <6>;
422 bias-pull-up;
423 };
424 };
425 ak8963_sleep: ak8963_sleep {
426 mux {
427 pins = "gpio65";
428 function = "gpio";
429 };
430 config {
431 pins = "gpio65";
432 drive-strength = <2>;
433 bias-pull-down;
434 };
435 };
436 };
437};
Himanshu Agrawalfc47a5c2020-03-06 15:08:00 +0530438
439&mdss_dsi0 {
440 qcom,dsi-pref-prim-pan = <&dsi_hx8394d_720_vid>;
441 pinctrl-names = "mdss_default", "mdss_sleep";
442 pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
443 pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
444
445 qcom,platform-reset-gpio = <&msm_gpio 25 0>;
446 qcom,platform-bklight-en-gpio = <&msm_gpio 37 0>;
447};