blob: 40aceacfc472184c9e2e602799fb82138fe295ba [file] [log] [blame]
Rajesh Bharathwaj03e0c1b2020-01-07 10:50:51 -08001/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -07002 *
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 <dt-bindings/gpio/gpio.h>
14#include "sxr1130-svr-pinctrl-overlay.dtsi"
15#include "sdm670-pmic-overlay.dtsi"
16#include "sdm670-sde-display.dtsi"
17#include "sdm670-camera-sensor-svr.dtsi"
18#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
19
20&qupv3_se10_i2c {
21#include "smb1355.dtsi"
22};
23
24&ufsphy_mem {
25 compatible = "qcom,ufs-phy-qmp-v3";
26
27 vdda-phy-supply = <&pm660l_l1>; /* 0.88v */
28 vdda-pll-supply = <&pm660_l1>; /* 1.2v */
29 vdda-phy-max-microamp = <62900>;
30 vdda-pll-max-microamp = <18300>;
31
32 status = "ok";
33};
34
35&ufshc_mem {
36 vdd-hba-supply = <&ufs_phy_gdsc>;
37 vdd-hba-fixed-regulator;
38 vcc-supply = <&pm660l_l4>;
39 vcc-voltage-level = <2960000 2960000>;
40 vccq2-supply = <&pm660_l8>;
41 vcc-max-microamp = <600000>;
42 vccq2-max-microamp = <600000>;
43
44 qcom,vddp-ref-clk-supply = <&pm660_l1>;
45 qcom,vddp-ref-clk-max-microamp = <100>;
46
47 status = "ok";
48};
49
50&pm660l_switch1 {
51 pinctrl-names = "led_enable", "led_disable";
52 pinctrl-0 = <&flash_led3_front_en>;
53 pinctrl-1 = <&flash_led3_front_dis>;
54};
55
56&qupv3_se9_2uart {
57 status = "disabled";
58};
59
60&qupv3_se12_2uart {
61 status = "ok";
62};
63
64&qupv3_se8_spi {
65 status = "disabled";
66};
67
68&qupv3_se3_i2c {
69 status = "disabled";
70 nq@28 {
71 compatible = "qcom,nq-nci";
72 reg = <0x28>;
73 qcom,nq-irq = <&tlmm 44 0x00>;
74 qcom,nq-ven = <&tlmm 12 0x00>;
75 qcom,nq-firm = <&tlmm 43 0x00>;
76 qcom,nq-clkreq = <&pm660_gpios 4 0x00>;
77 qcom,nq-esepwr = <&tlmm 116 0x00>;
78 interrupt-parent = <&tlmm>;
79 interrupts = <44 0>;
80 interrupt-names = "nfc_irq";
81 pinctrl-names = "nfc_active", "nfc_suspend";
82 pinctrl-0 = <&nfc_int_active
83 &nfc_enable_active
84 &nfc_clk_default>;
85 pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>;
86 };
87};
88
89&qupv3_se9_i2c {
90 status = "ok";
91 tusb1064@10 {
92 compatible = "ti,tusb1064";
93 reg = <0x10>;
94 ti,tiusb-dp-3v3-en = <&tlmm 142 0x00>;
95 };
96
97 vxr7200@39 {
98 compatible = "synaptics,vxr7200";
99 reg = <0x39>;
100 qcom,vxr_3v3_en = <&tlmm 138 0x00>;
101 qcom,led-5v-en-gpio = <&tlmm 134 0x00>;
102 qcom,led-driver-en1-gpio = <&tlmm 110 0x00>;
103 qcom,led-driver-en2-gpio = <&tlmm 111 0x00>;
104 qcom,1p8-en-gpio = <&tlmm 2 0x00>;
105 qcom,switch-power-gpio = <&tlmm 112 0x00>;
106 qcom,selab-gpio = <&tlmm 105 0>;/* Low for DP */
107 qcom,oenab-gpio = <&tlmm 106 0>; /*Low for DP */
108 qcom,platform-reset-gpio = <&tlmm 75 0>;
109 };
110};
111
112
113&qupv3_se10_i2c {
114 status = "ok";
115};
116
117&qupv3_se6_4uart {
118 status = "ok";
119};
120
121&sdhc_1 {
122 vdd-supply = <&pm660l_l4>;
123 qcom,vdd-voltage-level = <2960000 2960000>;
124 qcom,vdd-current-level = <0 570000>;
125
126 vdd-io-supply = <&pm660_l8>;
127 qcom,vdd-io-always-on;
128 qcom,vdd-io-lpm-sup;
129 qcom,vdd-io-voltage-level = <1800000 1800000>;
130 qcom,vdd-io-current-level = <0 325000>;
131
132 pinctrl-names = "active", "sleep";
133 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
134 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
135
136 status = "ok";
137};
138
139&sdhc_2 {
140 vdd-supply = <&pm660l_l5>;
141 qcom,vdd-voltage-level = <2960000 2960000>;
142 qcom,vdd-current-level = <0 800000>;
143
144 vdd-io-supply = <&pm660l_l2>;
145 qcom,vdd-io-voltage-level = <1800000 2960000>;
146 qcom,vdd-io-current-level = <0 22000>;
147
148 pinctrl-names = "active", "sleep";
149 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
150 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
151
152 cd-gpios = <&tlmm 96 0x1>;
153
154 status = "ok";
155};
156
157&vendor {
Rajesh Bharathwaj03e0c1b2020-01-07 10:50:51 -0800158 svr_batterydata: qcom,battery-data {
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700159 qcom,batt-id-range-pct = <15>;
Rajesh Bharathwaj03e0c1b2020-01-07 10:50:51 -0800160 #include "fg-gen3-batterydata-goertek-1400mah.dtsi"
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700161 };
162};
163
164&pm660_fg {
Rajesh Bharathwaj03e0c1b2020-01-07 10:50:51 -0800165 qcom,battery-data = <&svr_batterydata>;
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700166};
167
168&pm660_charger {
Rajesh Bharathwaj03e0c1b2020-01-07 10:50:51 -0800169 qcom,battery-data = <&svr_batterydata>;
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700170};
171
172&tlmm {
173 smb_int_default: smb_int_default {
174 mux {
175 pins = "gpio54";
176 function = "gpio";
177 };
178 config {
179 pins = "gpio54";
180 drive-strength = <2>;
181 bias-pull-up;
182 input-enable;
183 };
184 };
185};
186
187&smb1355_0 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&smb_int_default
190 &smb_shutdown_default>;
191 interrupt-parent = <&tlmm>;
192 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
193 smb1355_charger_0: qcom,smb1355-charger@1000 {
194 io-channels = <&pm660_rradc 2>,
195 <&pm660_rradc 12>;
196 io-channel-names = "charger_temp",
197 "charger_temp_max";
198 status ="ok";
199 };
200};
201
202&smb1355_1 {
203 pinctrl-names = "default";
204 pinctrl-0 = <&smb_int_default
205 &smb_shutdown_default>;
206 interrupt-parent = <&tlmm>;
207 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
208 smb1355_charger_1: qcom,smb1355-charger@1000 {
209 io-channels = <&pm660_rradc 2>,
210 <&pm660_rradc 12>;
211 io-channel-names = "charger_temp",
212 "charger_temp_max";
213 status ="ok";
214 };
215};
216
217&soc {
218 gpio_keys {
219 compatible = "gpio-keys";
220 label = "gpio-keys";
221
222 pinctrl-names = "default";
223 pinctrl-0 = <&key_home_default
224 &key_cam_focus_default
225 &key_vol_up_default>;
226
227 home {
228 label = "home"; /* BACK Key*/
229 gpios = <&pm660l_gpios 5 GPIO_ACTIVE_LOW>;
230 linux,input-type = <1>;
231 linux,code = <158>;
232 gpio-key,wakeup;
233 debounce-interval = <15>;
234 linux,can-disable;
235 };
236
237 cam_focus {
238 label = "cam_focus";
239 gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>;
240 linux,input-type = <1>;
241 linux,code = <528>;
242 gpio-key,wakeup;
243 debounce-interval = <15>;
244 linux,can-disable;
245 };
246
247 vol_up {
248 label = "volume_up";
249 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
250 linux,input-type = <1>;
251 linux,code = <115>;
252 gpio-key,wakeup;
253 debounce-interval = <15>;
254 linux,can-disable;
255 };
256 };
257
258 qcom,xr-smrtvwr-misc {
259 compatible = "qcom,xr-smrtvwr-misc";
260 };
261
262 rpmh-regulator-ldoa14 {
263 pm660_l14: regulator-pm660-l14 {
264 qcom,init-mode = <RPMH_REGULATOR_MODE_HPM>;
265 };
266 };
267
Rajesh Bharathwajd6256c82020-01-13 19:16:33 -0800268 quat_mi2s_gpios: quat_mi2s_pinctrl {
269 status = "ok";
270 compatible = "qcom,msm-cdc-pinctrl";
271 pinctrl-names = "aud_active", "aud_sleep";
272 pinctrl-0 = <&quat_mi2s_sck_active
273 &quat_mi2s_ws_active
274 &quat_mi2s_d0_active>;
275 pinctrl-1 = <&quat_mi2s_sck_sleep
276 &quat_mi2s_ws_sleep
277 &quat_mi2s_d0_sleep>;
278 qcom,lpi-gpios;
279 };
280
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700281};
282
283
284
285&dsi_dual_xrsmrtvwr_jdi_video {
286 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
287 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
288 qcom,mdss-dsi-bl-min-level = <1>;
289 qcom,mdss-dsi-bl-max-level = <4095>;
290 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
291 qcom,panel-mode-gpio = <&tlmm 79 0>;
292 qcom,platform-reset-gpio = <&tlmm 75 0>;
293 qcom,led-5v-en-gpio = <&tlmm 134 0>;
294 qcom,selab-gpio = <&tlmm 105 0>;/* High for DSI */
295 qcom,oenab-gpio = <&tlmm 106 0>; /*Low for DSI */
296 qcom,1p8-en-gpio = <&tlmm 2 0>;
297 qcom,led-driver-en1-gpio = <&tlmm 110 0>;
298 qcom,led-driver-en2-gpio = <&tlmm 111 0>;
299 qcom,switch-power-gpio = <&tlmm 112 0>;
300};
301
302
303&dsi_dual_nt35597_truly_video {
304 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
305 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
306 qcom,mdss-dsi-bl-min-level = <1>;
307 qcom,mdss-dsi-bl-max-level = <4095>;
308 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
309 qcom,panel-mode-gpio = <&tlmm 76 0>;
310 qcom,platform-reset-gpio = <&tlmm 75 0>;
311};
312
313&dsi_dual_nt35597_truly_cmd {
314 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
315 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
316 qcom,mdss-dsi-bl-min-level = <1>;
317 qcom,mdss-dsi-bl-max-level = <4095>;
318 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
319 qcom,panel-mode-gpio = <&tlmm 76 0>;
320 qcom,platform-reset-gpio = <&tlmm 75 0>;
321 qcom,platform-te-gpio = <&tlmm 10 0>;
322};
323
324&dsi_nt35597_truly_dsc_video {
325 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
326 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
327 qcom,mdss-dsi-bl-min-level = <1>;
328 qcom,mdss-dsi-bl-max-level = <4095>;
329 qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
330 qcom,panel-mode-gpio = <&tlmm 76 0>;
331 qcom,platform-reset-gpio = <&tlmm 75 0>;
332};
333
334&dsi_nt35597_truly_dsc_cmd {
335 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
336 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
337 qcom,mdss-dsi-bl-min-level = <1>;
338 qcom,mdss-dsi-bl-max-level = <4095>;
339 qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
340 qcom,panel-mode-gpio = <&tlmm 76 0>;
341 qcom,platform-reset-gpio = <&tlmm 75 0>;
342 qcom,platform-te-gpio = <&tlmm 10 0>;
343};
344
345&dsi_sim_vid {
346 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
347 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
348 qcom,platform-reset-gpio = <&tlmm 90 0>;
349};
350
351&dsi_dual_sim_vid {
352 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
353 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
354 qcom,platform-reset-gpio = <&tlmm 75 0>;
355};
356
357&dsi_sim_cmd {
358 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
359 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
360 qcom,platform-reset-gpio = <&tlmm 75 0>;
361};
362
363&dsi_dual_sim_cmd {
364 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
365 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
366 qcom,platform-reset-gpio = <&tlmm 75 0>;
367};
368
369&dsi_sim_dsc_375_cmd {
370 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
371 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
372 qcom,platform-reset-gpio = <&tlmm 75 0>;
373};
374
375&dsi_dual_sim_dsc_375_cmd {
376 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
377 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
378 qcom,platform-reset-gpio = <&tlmm 75 0>;
379};
380
381&dsi_dual_nt35597_video {
382 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
383 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
384 qcom,mdss-dsi-bl-min-level = <1>;
385 qcom,mdss-dsi-bl-max-level = <4095>;
386 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
387 qcom,panel-mode-gpio = <&tlmm 76 0>;
388 qcom,platform-reset-gpio = <&tlmm 75 0>;
389};
390
391&dsi_dual_nt35597_cmd {
392 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
393 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
394 qcom,mdss-dsi-bl-min-level = <1>;
395 qcom,mdss-dsi-bl-max-level = <4095>;
396 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
397 qcom,panel-mode-gpio = <&tlmm 76 0>;
398 qcom,platform-reset-gpio = <&tlmm 75 0>;
399 qcom,platform-te-gpio = <&tlmm 10 0>;
400};
401
402&dsi_rm67195_amoled_fhd_cmd {
403 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
404 qcom,panel-supply-entries = <&dsi_panel_pwr_supply_labibb_amoled>;
405 qcom,platform-reset-gpio = <&tlmm 75 0>;
406 qcom,platform-te-gpio = <&tlmm 10 0>;
407};
408
409&dsi_nt35695b_truly_fhd_video {
410 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
411 qcom,mdss-dsi-bl-min-level = <1>;
412 qcom,mdss-dsi-bl-max-level = <4095>;
413 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
414 qcom,platform-reset-gpio = <&tlmm 75 0>;
415};
416
417&dsi_nt35695b_truly_fhd_cmd {
418 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
419 qcom,mdss-dsi-bl-min-level = <1>;
420 qcom,mdss-dsi-bl-max-level = <4095>;
421 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
422 qcom,platform-reset-gpio = <&tlmm 75 0>;
423 qcom,platform-te-gpio = <&tlmm 10 0>;
424};
425
426&dsi_hx8399_truly_cmd {
427 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
428 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
429 qcom,mdss-dsi-bl-min-level = <1>;
430 qcom,mdss-dsi-bl-max-level = <4095>;
431 qcom,platform-reset-gpio = <&tlmm 75 0>;
432 qcom,platform-te-gpio = <&tlmm 10 0>;
433 qcom,panel-mode-gpio = <&tlmm 76 0>;
434 qcom,mdss-dsi-mode-sel-gpio-state = "single_port";
435};
436
437&pm660l_wled {
438 status = "okay";
439 qcom,led-strings-list = [01 02];
440};
441
442&mdss_mdp {
443 #cooling-cells = <2>;
444};
445
446&thermal_zones {
447 xo-therm-step {
448 status = "disabled";
449 };
450};
451
452&tavil_snd {
Rajesh Bharathwajd6256c82020-01-13 19:16:33 -0800453 qcom,msm-mi2s-master = <1>, <1>, <1>, <0>, <1>;
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700454 qcom,audio-routing =
455 "AIF4 VI", "MCLK",
456 "RX_BIAS", "MCLK",
457 "MADINPUT", "MCLK",
458 "hifi amp", "LINEOUT1",
459 "hifi amp", "LINEOUT2",
460 "AMIC2", "MIC BIAS2",
461 "MIC BIAS2", "Headset Mic",
462 "AMIC3", "MIC BIAS2",
463 "MIC BIAS2", "ANCRight Headset Mic",
464 "AMIC4", "MIC BIAS2",
465 "MIC BIAS2", "ANCLeft Headset Mic",
466 "AMIC5", "MIC BIAS3",
467 "MIC BIAS3", "Handset Mic",
468 "DMIC0", "MIC BIAS1",
469 "MIC BIAS1", "Digital Mic0",
470 "DMIC1", "MIC BIAS1",
471 "MIC BIAS1", "Digital Mic1",
472 "DMIC2", "MIC BIAS4",
473 "MIC BIAS4", "Digital Mic2",
474 "DMIC3", "MIC BIAS4",
475 "MIC BIAS4", "Digital Mic3",
476 "DMIC4", "MIC BIAS3",
477 "MIC BIAS3", "Digital Mic4",
478 "DMIC5", "MIC BIAS3",
479 "MIC BIAS3", "Digital Mic5",
480 "SpkrLeft IN", "SPK1 OUT",
481 "SpkrRight IN", "SPK2 OUT";
Rajesh Bharathwajd6256c82020-01-13 19:16:33 -0800482
483 qcom,quat-mi2s-gpios = <&quat_mi2s_gpios>;
Rajesh Bharathwaj1a5d0302019-10-31 21:43:32 -0700484 qcom,msm-mbhc-hphl-swh = <1>;
485 qcom,msm-mbhc-gnd-swh = <1>;
486 qcom,hph-en0-gpio = <&tavil_hph_en0>;
487 qcom,hph-en1-gpio = <&tavil_hph_en1>;
488 qcom,msm-mclk-freq = <9600000>;
489 asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
490 asoc-codec-names = "msm-stub-codec.1", "msm-ext-disp-audio-codec-rx";
491 qcom,wsa-max-devs = <2>;
492 qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
493 <&wsa881x_0213>, <&wsa881x_0214>;
494 qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
495 "SpkrLeft", "SpkrRight";
496};
497
498&wcd_rst_gpio {
499 status = "ok";
500 pinctrl-0 = <&cdc_xr_reset_active>;
501 pinctrl-1 = <&cdc_xr_reset_sleep>;
502};
503
504&dsi_dual_xrsmrtvwr_jdi_video_display {
505 qcom,dsi-display-active;
506};
Kavya Nunna04ae91842019-11-25 17:37:54 +0530507
508&pm660_charger {
509 qcom,ufp-only-mode;
510};
Rajesh Bharathwajd6256c82020-01-13 19:16:33 -0800511
512&dai_mi2s3 {
513 qcom,msm-mi2s-rx-lines = <0>;
514 qcom,msm-mi2s-tx-lines = <1>;
515
516};
517
518&cdc_pdm_gpios {
519 status = "disabled";
520};