blob: 6f35bf71e37ed02adfff0adf3372926fc27df45c [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
96&ufsphy_mem {
97 compatible = "qcom,ufs-phy-qmp-v3";
98
99 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
100 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -0700101 vdda-phy-max-microamp = <62900>;
102 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -0700103
104 status = "ok";
105};
106
107&ufshc_mem {
108 vdd-hba-supply = <&ufs_phy_gdsc>;
109 vdd-hba-fixed-regulator;
110 vcc-supply = <&pm8998_l20>;
111 vccq2-supply = <&pm8998_s4>;
112 vcc-max-microamp = <600000>;
113 vccq2-max-microamp = <600000>;
114
Subhash Jadavani05480172017-04-01 15:51:52 -0700115 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
116 qcom,vddp-ref-clk-max-microamp = <100>;
117
Subhash Jadavani20a48962017-03-27 15:37:57 -0700118 status = "ok";
119};
120
121&ufsphy_card {
122 compatible = "qcom,ufs-phy-qmp-v3";
123
124 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
125 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -0700126 vdda-phy-max-microamp = <62900>;
127 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -0700128
129 status = "ok";
130};
131
132&ufshc_card {
133 vdd-hba-supply = <&ufs_card_gdsc>;
134 vdd-hba-fixed-regulator;
135 vcc-supply = <&pm8998_l21>;
136 vccq2-supply = <&pm8998_s4>;
137 vcc-max-microamp = <300000>;
138 vccq2-max-microamp = <300000>;
139
Subhash Jadavani05480172017-04-01 15:51:52 -0700140 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
141 qcom,vddp-ref-clk-max-microamp = <100>;
142
Subhash Jadavani20a48962017-03-27 15:37:57 -0700143 status = "ok";
144};
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700145
Xiaonian Wange5dedbb2017-04-08 06:48:59 +0800146&sdhc_2 {
147 vdd-supply = <&pm8998_l21>;
148 qcom,vdd-voltage-level = <2950000 2960000>;
149 qcom,vdd-current-level = <200 800000>;
150
151 vdd-io-supply = <&pm8998_l13>;
152 qcom,vdd-io-voltage-level = <1808000 2960000>;
153 qcom,vdd-io-current-level = <200 22000>;
154
155 pinctrl-names = "active", "sleep";
156 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
157 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
158
159 qcom,clk-rates = <400000 20000000 25000000
160 50000000 100000000 200000000>;
161 qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
162
163 status = "ok";
164};
165
Subbaraman Narayanamurthy58377f02017-03-21 20:38:43 -0700166&pmi8998_switch1 {
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700167 pinctrl-names = "led_enable", "led_disable";
168 pinctrl-0 = <&flash_led3_front_en>;
169 pinctrl-1 = <&flash_led3_front_dis>;
170};
Harry Yang67111662017-04-05 15:14:52 -0700171
172&pmi8998_charger {
173 qcom,batteryless-platform;
174};
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600175
176/ {
Jack Phamc2160c842017-04-05 09:48:59 -0700177 extcon_usb1: extcon_usb1 {
178 compatible = "linux,extcon-usb-gpio";
179 id-gpio = <&pmi8998_gpios 9 GPIO_ACTIVE_HIGH>;
180 vbus-gpio = <&pmi8998_gpios 8 GPIO_ACTIVE_HIGH>;
181
182 pinctrl-names = "default";
183 pinctrl-0 = <&usb2_vbus_det_default
184 &usb2_id_det_default>;
185 };
186
187 usb1_vbus_vreg: usb1_vbus_vreg {
188 compatible = "regulator-fixed";
189 regulator-name = "usb_vbus_vreg";
190 gpio = <&pmi8998_gpios 2 GPIO_ACTIVE_HIGH>;
191 enable-active-high;
192
193 /* Typical EN-to-VBUS turn on time for NX5P1100 */
194 regulator-enable-ramp-delay = <630>;
195
196 pinctrl-names = "default";
197 pinctrl-0 = <&usb2_vbus_boost_default>;
198 };
199
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600200aliases {
201 serial0 = &qupv3_se9_2uart;
202 spi0 = &qupv3_se8_spi;
203 i2c0 = &qupv3_se10_i2c;
204 i2c1 = &qupv3_se3_i2c;
205 };
206};
207
208&qupv3_se9_2uart {
209 status = "ok";
210};
211
212&qupv3_se8_spi {
213 status = "ok";
214};
215
216&qupv3_se3_i2c {
217 status = "ok";
218};
219
220&qupv3_se10_i2c {
221 status = "ok";
222};
Jack Phamc2160c842017-04-05 09:48:59 -0700223
224&usb1 {
225 status = "okay";
226 extcon = <&extcon_usb1>;
227 vbus_dwc3-supply = <&usb1_vbus_vreg>;
228};
229
230&qusb_phy1 {
231 status = "okay";
232};
233
234&usb_qmp_phy {
235 status = "okay";
236};
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700237
238&pm8998_vadc {
239 chan@83 {
240 label = "vph_pwr";
241 reg = <0x83>;
242 qcom,decimation = <2>;
243 qcom,pre-div-channel-scaling = <1>;
244 qcom,calibration-type = "absolute";
245 qcom,scale-function = <0>;
246 qcom,hw-settle-time = <0>;
247 qcom,fast-avg-setup = <0>;
248 };
249
250 chan@85 {
251 label = "vcoin";
252 reg = <0x85>;
253 qcom,decimation = <2>;
254 qcom,pre-div-channel-scaling = <1>;
255 qcom,calibration-type = "absolute";
256 qcom,scale-function = <0>;
257 qcom,hw-settle-time = <0>;
258 qcom,fast-avg-setup = <0>;
259 };
260
261 chan@4c {
262 label = "xo_therm";
263 reg = <0x4c>;
264 qcom,decimation = <2>;
265 qcom,pre-div-channel-scaling = <0>;
266 qcom,calibration-type = "ratiometric";
267 qcom,scale-function = <4>;
268 qcom,hw-settle-time = <2>;
269 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700270 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700271 };
272
273 chan@4d {
274 label = "msm_therm";
275 reg = <0x4d>;
276 qcom,decimation = <2>;
277 qcom,pre-div-channel-scaling = <0>;
278 qcom,calibration-type = "ratiometric";
279 qcom,scale-function = <2>;
280 qcom,hw-settle-time = <2>;
281 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700282 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700283 };
284
285 chan@4f {
286 label = "pa_therm1";
287 reg = <0x4f>;
288 qcom,decimation = <2>;
289 qcom,pre-div-channel-scaling = <0>;
290 qcom,calibration-type = "ratiometric";
291 qcom,scale-function = <2>;
292 qcom,hw-settle-time = <2>;
293 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700294 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700295 };
296
297 chan@51 {
298 label = "quiet_therm";
299 reg = <0x51>;
300 qcom,decimation = <2>;
301 qcom,pre-div-channel-scaling = <0>;
302 qcom,calibration-type = "ratiometric";
303 qcom,scale-function = <2>;
304 qcom,hw-settle-time = <2>;
305 qcom,fast-avg-setup = <0>;
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700306 qcom,vadc-thermal-node;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700307 };
308};
309
310&pm8998_adc_tm {
311 chan@83 {
312 label = "vph_pwr";
313 reg = <0x83>;
314 qcom,pre-div-channel-scaling = <1>;
315 qcom,calibration-type = "absolute";
316 qcom,scale-function = <0>;
317 qcom,hw-settle-time = <0>;
318 qcom,btm-channel-number = <0x60>;
319 };
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700320};
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700321
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700322&thermal_zones {
323 xo-therm-adc {
324 polling-delay-passive = <0>;
325 polling-delay = <0>;
326 thermal-sensors = <&pm8998_vadc 0x4c>;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700327 };
328
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700329 msm-therm-adc {
330 polling-delay-passive = <0>;
331 polling-delay = <0>;
332 thermal-sensors = <&pm8998_vadc 0x4d>;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700333 };
334
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700335 pa-therm1-adc {
336 polling-delay-passive = <0>;
337 polling-delay = <0>;
338 thermal-sensors = <&pm8998_vadc 0x4f>;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700339 };
340
Siddartha Mohanadoss0fbfc822017-04-21 11:41:32 -0700341 quiet-therm-adc {
342 polling-delay-passive = <0>;
343 polling-delay = <0>;
344 thermal-sensors = <&pm8998_vadc 0x51>;
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700345 };
346};