blob: a826263287bd059e1ce429aa72dc0a1fef2cf187 [file] [log] [blame]
Banajit Goswami7885c692017-03-16 16:00:34 -07001/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
Channagoud Kadabi6d4bb832016-06-30 23:40:05 -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 */
Kyle Yan6a20fae2017-02-14 13:34:41 -080012
David Collinsc6686252017-03-31 14:23:09 -070013#include <dt-bindings/gpio/gpio.h>
Jigarkumar Zala861231152017-02-28 14:05:11 -080014#include "sdm845-camera-sensor-cdp.dtsi"
Sungjun Parkc9f9c062017-03-21 16:45:18 -070015
16/ {
17 bluetooth: bt_wcn3990 {
18 compatible = "qca,wcn3990";
19 qca,bt-vdd-io-supply = <&pm8998_s3>;
20 qca,bt-vdd-xtal-supply = <&pm8998_s5>;
21 qca,bt-vdd-core-supply = <&pm8998_l7>;
22 qca,bt-vdd-pa-supply = <&pm8998_l17>;
23 qca,bt-vdd-ldo-supply = <&pm8998_l25>;
24
25 qca,bt-vdd-io-voltage-level = <1352000 1352000>;
26 qca,bt-vdd-xtal-voltage-level = <2040000 2040000>;
27 qca,bt-vdd-core-voltage-level = <1800000 1800000>;
28 qca,bt-vdd-pa-voltage-level = <1304000 1304000>;
29 qca,bt-vdd-ldo-voltage-level = <3312000 3312000>;
30
31 qca,bt-vdd-io-current-level = <1>; /* LPM/PFM */
32 qca,bt-vdd-xtal-current-level = <1>; /* LPM/PFM */
33 qca,bt-vdd-core-current-level = <1>; /* LPM/PFM */
34 qca,bt-vdd-pa-current-level = <1>; /* LPM/PFM */
35 qca,bt-vdd-ldo-current-level = <1>; /* LPM/PFM */
36 };
37};
38
Banajit Goswamic0b75812017-03-16 16:14:17 -070039&soc {
40 sound-tavil {
41 qcom,us-euro-gpios = <&tavil_us_euro_sw>;
42 };
David Collinsc6686252017-03-31 14:23:09 -070043
44 gpio_keys {
45 compatible = "gpio-keys";
46 label = "gpio-keys";
47
48 pinctrl-names = "default";
49 pinctrl-0 = <&key_home_default
50 &key_vol_up_default
51 &key_cam_snapshot_default
52 &key_cam_focus_default>;
53
54 home {
55 label = "home";
56 gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
57 linux,input-type = <1>;
58 linux,code = <102>;
59 gpio-key,wakeup;
60 debounce-interval = <15>;
61 linux,can-disable;
62 };
63
64 vol_up {
65 label = "volume_up";
66 gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
67 linux,input-type = <1>;
68 linux,code = <115>;
69 gpio-key,wakeup;
70 debounce-interval = <15>;
71 linux,can-disable;
72 };
73
74 cam_snapshot {
75 label = "cam_snapshot";
76 gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
77 linux,input-type = <1>;
78 linux,code = <766>;
79 gpio-key,wakeup;
80 debounce-interval = <15>;
81 linux,can-disable;
82 };
83
84 cam_focus {
85 label = "cam_focus";
86 gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
87 linux,input-type = <1>;
88 linux,code = <528>;
89 gpio-key,wakeup;
90 debounce-interval = <15>;
91 linux,can-disable;
92 };
93 };
Banajit Goswamic0b75812017-03-16 16:14:17 -070094};
Subhash Jadavani20a48962017-03-27 15:37:57 -070095
Ram Chandrasekar316c3932017-04-25 12:48:55 -060096&mdss_mdp {
97 #cooling-cells = <2>;
98};
99
Subhash Jadavani20a48962017-03-27 15:37:57 -0700100&ufsphy_mem {
101 compatible = "qcom,ufs-phy-qmp-v3";
102
103 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
104 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -0700105 vdda-phy-max-microamp = <62900>;
106 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -0700107
108 status = "ok";
109};
110
111&ufshc_mem {
112 vdd-hba-supply = <&ufs_phy_gdsc>;
113 vdd-hba-fixed-regulator;
114 vcc-supply = <&pm8998_l20>;
115 vccq2-supply = <&pm8998_s4>;
116 vcc-max-microamp = <600000>;
117 vccq2-max-microamp = <600000>;
118
Subhash Jadavani05480172017-04-01 15:51:52 -0700119 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
120 qcom,vddp-ref-clk-max-microamp = <100>;
121
Subhash Jadavani20a48962017-03-27 15:37:57 -0700122 status = "ok";
123};
124
Subhash Jadavanidd416c42017-05-15 11:54:10 -0700125&extcon_storage_cd {
126 gpio = <&tlmm 126 GPIO_ACTIVE_LOW>;
127 debounce-ms = <200>;
128 irq-flags = <IRQ_TYPE_EDGE_BOTH>;
129
130 pinctrl-names = "default";
131 pinctrl-0 = <&storage_cd>;
132
133 status = "ok";
134};
135
Subhash Jadavani20a48962017-03-27 15:37:57 -0700136&ufsphy_card {
137 compatible = "qcom,ufs-phy-qmp-v3";
138
139 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
140 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -0700141 vdda-phy-max-microamp = <62900>;
142 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -0700143
144 status = "ok";
145};
146
147&ufshc_card {
148 vdd-hba-supply = <&ufs_card_gdsc>;
149 vdd-hba-fixed-regulator;
150 vcc-supply = <&pm8998_l21>;
151 vccq2-supply = <&pm8998_s4>;
152 vcc-max-microamp = <300000>;
153 vccq2-max-microamp = <300000>;
154
Subhash Jadavani05480172017-04-01 15:51:52 -0700155 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
156 qcom,vddp-ref-clk-max-microamp = <100>;
157
Subhash Jadavani20a48962017-03-27 15:37:57 -0700158 status = "ok";
159};
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700160
Xiaonian Wange5dedbb2017-04-08 06:48:59 +0800161&sdhc_2 {
162 vdd-supply = <&pm8998_l21>;
163 qcom,vdd-voltage-level = <2950000 2960000>;
164 qcom,vdd-current-level = <200 800000>;
165
166 vdd-io-supply = <&pm8998_l13>;
167 qcom,vdd-io-voltage-level = <1808000 2960000>;
168 qcom,vdd-io-current-level = <200 22000>;
169
170 pinctrl-names = "active", "sleep";
171 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
172 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
173
174 qcom,clk-rates = <400000 20000000 25000000
175 50000000 100000000 200000000>;
176 qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
177
Subhash Jadavanidd416c42017-05-15 11:54:10 -0700178 extcon = <&extcon_storage_cd>;
179
Xiaonian Wange5dedbb2017-04-08 06:48:59 +0800180 status = "ok";
181};
182
Subbaraman Narayanamurthy58377f02017-03-21 20:38:43 -0700183&pmi8998_switch1 {
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700184 pinctrl-names = "led_enable", "led_disable";
185 pinctrl-0 = <&flash_led3_front_en>;
186 pinctrl-1 = <&flash_led3_front_dis>;
187};
Harry Yang67111662017-04-05 15:14:52 -0700188
189&pmi8998_charger {
190 qcom,batteryless-platform;
191};
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600192
193/ {
Jack Phamc2160c842017-04-05 09:48:59 -0700194 extcon_usb1: extcon_usb1 {
195 compatible = "linux,extcon-usb-gpio";
196 id-gpio = <&pmi8998_gpios 9 GPIO_ACTIVE_HIGH>;
197 vbus-gpio = <&pmi8998_gpios 8 GPIO_ACTIVE_HIGH>;
198
199 pinctrl-names = "default";
200 pinctrl-0 = <&usb2_vbus_det_default
201 &usb2_id_det_default>;
202 };
203
204 usb1_vbus_vreg: usb1_vbus_vreg {
205 compatible = "regulator-fixed";
206 regulator-name = "usb_vbus_vreg";
207 gpio = <&pmi8998_gpios 2 GPIO_ACTIVE_HIGH>;
208 enable-active-high;
209
210 /* Typical EN-to-VBUS turn on time for NX5P1100 */
211 regulator-enable-ramp-delay = <630>;
212
213 pinctrl-names = "default";
214 pinctrl-0 = <&usb2_vbus_boost_default>;
215 };
216
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600217aliases {
218 serial0 = &qupv3_se9_2uart;
219 spi0 = &qupv3_se8_spi;
220 i2c0 = &qupv3_se10_i2c;
221 i2c1 = &qupv3_se3_i2c;
Girish Mahadevan1d38bd32017-04-11 17:59:47 -0600222 hsuart0 = &qupv3_se6_4uart;
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600223 };
224};
225
226&qupv3_se9_2uart {
227 status = "ok";
228};
229
Shashank Babu Chinta Venkata59e305f2017-04-05 12:14:18 -0700230&labibb {
231 status = "ok";
232 qcom,qpnp-labibb-mode = "lcd";
233};
234
235&dsi_dual_nt35597_truly_video {
236 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
237 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
238 qcom,mdss-dsi-bl-min-level = <1>;
239 qcom,mdss-dsi-bl-max-level = <4095>;
240 qcom,mdss-dsi-panel-mode-gpio-state = "dual_port";
241 qcom,panel-mode-gpio = <&tlmm 52 0>;
242 qcom,platform-reset-gpio = <&tlmm 6 0>;
243};
244
Narendra Muppallae8c25c82017-04-02 19:20:57 -0700245&dsi_sim_vid {
246 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
247 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
248 qcom,platform-reset-gpio = <&tlmm 6 0>;
249};
250
251&dsi_dual_sim_vid {
252 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
253 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
254 qcom,platform-reset-gpio = <&tlmm 6 0>;
255};
256
Narendra Muppallaa1a55462017-04-04 18:07:27 -0700257&dsi_sim_cmd {
258 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
259 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
260 qcom,platform-reset-gpio = <&tlmm 6 0>;
261};
262
263&dsi_dual_sim_cmd {
264 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
265 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
266 qcom,platform-reset-gpio = <&tlmm 6 0>;
267};
268
Shashank Babu Chinta Venkata59e305f2017-04-05 12:14:18 -0700269&dsi_dual_nt35597_truly_video_display {
270 qcom,dsi-display-active;
271};
272
273&pmi8998_wled {
274 status = "okay";
275 qcom,led-strings-list = [01 02];
276};
277
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600278&qupv3_se8_spi {
279 status = "ok";
280};
281
282&qupv3_se3_i2c {
283 status = "ok";
284};
285
286&qupv3_se10_i2c {
287 status = "ok";
288};
Jack Phamc2160c842017-04-05 09:48:59 -0700289
Girish Mahadevan1d38bd32017-04-11 17:59:47 -0600290&qupv3_se6_4uart {
291 status = "ok";
292};
293
Jack Phamc2160c842017-04-05 09:48:59 -0700294&usb1 {
295 status = "okay";
296 extcon = <&extcon_usb1>;
297 vbus_dwc3-supply = <&usb1_vbus_vreg>;
298};
299
300&qusb_phy1 {
301 status = "okay";
302};
303
304&usb_qmp_phy {
305 status = "okay";
306};
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700307
308&pm8998_vadc {
309 chan@83 {
310 label = "vph_pwr";
311 reg = <0x83>;
312 qcom,decimation = <2>;
313 qcom,pre-div-channel-scaling = <1>;
314 qcom,calibration-type = "absolute";
315 qcom,scale-function = <0>;
316 qcom,hw-settle-time = <0>;
317 qcom,fast-avg-setup = <0>;
318 };
319
320 chan@85 {
321 label = "vcoin";
322 reg = <0x85>;
323 qcom,decimation = <2>;
324 qcom,pre-div-channel-scaling = <1>;
325 qcom,calibration-type = "absolute";
326 qcom,scale-function = <0>;
327 qcom,hw-settle-time = <0>;
328 qcom,fast-avg-setup = <0>;
329 };
330
331 chan@4c {
332 label = "xo_therm";
333 reg = <0x4c>;
334 qcom,decimation = <2>;
335 qcom,pre-div-channel-scaling = <0>;
336 qcom,calibration-type = "ratiometric";
337 qcom,scale-function = <4>;
338 qcom,hw-settle-time = <2>;
339 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700340 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700341 };
342
343 chan@4d {
344 label = "msm_therm";
345 reg = <0x4d>;
346 qcom,decimation = <2>;
347 qcom,pre-div-channel-scaling = <0>;
348 qcom,calibration-type = "ratiometric";
349 qcom,scale-function = <2>;
350 qcom,hw-settle-time = <2>;
351 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700352 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700353 };
354
355 chan@4f {
356 label = "pa_therm1";
357 reg = <0x4f>;
358 qcom,decimation = <2>;
359 qcom,pre-div-channel-scaling = <0>;
360 qcom,calibration-type = "ratiometric";
361 qcom,scale-function = <2>;
362 qcom,hw-settle-time = <2>;
363 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700364 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700365 };
366
367 chan@51 {
368 label = "quiet_therm";
369 reg = <0x51>;
370 qcom,decimation = <2>;
371 qcom,pre-div-channel-scaling = <0>;
372 qcom,calibration-type = "ratiometric";
373 qcom,scale-function = <2>;
374 qcom,hw-settle-time = <2>;
375 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700376 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700377 };
378};
379
380&pm8998_adc_tm {
381 chan@83 {
382 label = "vph_pwr";
383 reg = <0x83>;
384 qcom,pre-div-channel-scaling = <1>;
385 qcom,calibration-type = "absolute";
386 qcom,scale-function = <0>;
387 qcom,hw-settle-time = <0>;
388 qcom,btm-channel-number = <0x60>;
389 };
Siddartha Mohanadossd550ea42017-05-12 10:03:17 -0700390
391 chan@4c {
392 label = "xo_therm";
393 reg = <0x4c>;
394 qcom,pre-div-channel-scaling = <0>;
395 qcom,calibration-type = "ratiometric";
396 qcom,scale-function = <4>;
397 qcom,hw-settle-time = <2>;
398 qcom,btm-channel-number = <0x68>;
399 qcom,thermal-node;
400 };
401
402 chan@4d {
403 label = "msm_therm";
404 reg = <0x4d>;
405 qcom,pre-div-channel-scaling = <0>;
406 qcom,calibration-type = "ratiometric";
407 qcom,scale-function = <2>;
408 qcom,hw-settle-time = <2>;
409 qcom,btm-channel-number = <0x70>;
410 qcom,thermal-node;
411 };
412
413 chan@4f {
414 label = "pa_therm1";
415 reg = <0x4f>;
416 qcom,pre-div-channel-scaling = <0>;
417 qcom,calibration-type = "ratiometric";
418 qcom,scale-function = <2>;
419 qcom,hw-settle-time = <2>;
420 qcom,btm-channel-number = <0x78>;
421 qcom,thermal-node;
422 };
423
424 chan@51 {
425 label = "quiet_therm";
426 reg = <0x51>;
427 qcom,pre-div-channel-scaling = <0>;
428 qcom,calibration-type = "ratiometric";
429 qcom,scale-function = <2>;
430 qcom,hw-settle-time = <2>;
431 qcom,btm-channel-number = <0x80>;
432 qcom,thermal-node;
433 };
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700434};
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700435
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700436&thermal_zones {
437 xo-therm-adc {
438 polling-delay-passive = <0>;
439 polling-delay = <0>;
Siddartha Mohanadossd550ea42017-05-12 10:03:17 -0700440 thermal-sensors = <&pm8998_adc_tm 0x4c>;
441 thermal-governor = "user_space";
442
443 trips {
444 active-config0 {
445 temperature = <65000>;
446 hysteresis = <1000>;
447 type = "passive";
448 };
449 };
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700450 };
451
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700452 msm-therm-adc {
453 polling-delay-passive = <0>;
454 polling-delay = <0>;
Siddartha Mohanadossd550ea42017-05-12 10:03:17 -0700455 thermal-sensors = <&pm8998_adc_tm 0x4d>;
456 thermal-governor = "user_space";
457
458 trips {
459 active-config0 {
460 temperature = <65000>;
461 hysteresis = <1000>;
462 type = "passive";
463 };
464 };
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700465 };
466
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700467 pa-therm1-adc {
468 polling-delay-passive = <0>;
469 polling-delay = <0>;
Siddartha Mohanadossd550ea42017-05-12 10:03:17 -0700470 thermal-sensors = <&pm8998_adc_tm 0x4f>;
471 thermal-governor = "user_space";
472
473 trips {
474 active-config0 {
475 temperature = <65000>;
476 hysteresis = <1000>;
477 type = "passive";
478 };
479 };
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700480 };
481
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700482 quiet-therm-adc {
483 polling-delay-passive = <0>;
484 polling-delay = <0>;
Siddartha Mohanadossd550ea42017-05-12 10:03:17 -0700485 thermal-sensors = <&pm8998_adc_tm 0x51>;
486 thermal-governor = "user_space";
487
488 trips {
489 active-config0 {
490 temperature = <65000>;
491 hysteresis = <1000>;
492 type = "passive";
493 };
494 };
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700495 };
496};