blob: 6a433d2babcbdf73339f08e1cd806bc2f69f2d3d [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"
Banajit Goswamic0b75812017-03-16 16:14:17 -070015&soc {
16 sound-tavil {
17 qcom,us-euro-gpios = <&tavil_us_euro_sw>;
18 };
David Collinsc6686252017-03-31 14:23:09 -070019
20 gpio_keys {
21 compatible = "gpio-keys";
22 label = "gpio-keys";
23
24 pinctrl-names = "default";
25 pinctrl-0 = <&key_home_default
26 &key_vol_up_default
27 &key_cam_snapshot_default
28 &key_cam_focus_default>;
29
30 home {
31 label = "home";
32 gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
33 linux,input-type = <1>;
34 linux,code = <102>;
35 gpio-key,wakeup;
36 debounce-interval = <15>;
37 linux,can-disable;
38 };
39
40 vol_up {
41 label = "volume_up";
42 gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
43 linux,input-type = <1>;
44 linux,code = <115>;
45 gpio-key,wakeup;
46 debounce-interval = <15>;
47 linux,can-disable;
48 };
49
50 cam_snapshot {
51 label = "cam_snapshot";
52 gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
53 linux,input-type = <1>;
54 linux,code = <766>;
55 gpio-key,wakeup;
56 debounce-interval = <15>;
57 linux,can-disable;
58 };
59
60 cam_focus {
61 label = "cam_focus";
62 gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
63 linux,input-type = <1>;
64 linux,code = <528>;
65 gpio-key,wakeup;
66 debounce-interval = <15>;
67 linux,can-disable;
68 };
69 };
Banajit Goswamic0b75812017-03-16 16:14:17 -070070};
Subhash Jadavani20a48962017-03-27 15:37:57 -070071
72&ufsphy_mem {
73 compatible = "qcom,ufs-phy-qmp-v3";
74
75 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
76 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -070077 vdda-phy-max-microamp = <62900>;
78 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -070079
80 status = "ok";
81};
82
83&ufshc_mem {
84 vdd-hba-supply = <&ufs_phy_gdsc>;
85 vdd-hba-fixed-regulator;
86 vcc-supply = <&pm8998_l20>;
87 vccq2-supply = <&pm8998_s4>;
88 vcc-max-microamp = <600000>;
89 vccq2-max-microamp = <600000>;
90
Subhash Jadavani05480172017-04-01 15:51:52 -070091 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
92 qcom,vddp-ref-clk-max-microamp = <100>;
93
Subhash Jadavani20a48962017-03-27 15:37:57 -070094 status = "ok";
95};
96
97&ufsphy_card {
98 compatible = "qcom,ufs-phy-qmp-v3";
99
100 vdda-phy-supply = <&pm8998_l1>; /* 0.88v */
101 vdda-pll-supply = <&pm8998_l26>; /* 1.2v */
Subhash Jadavani20a48962017-03-27 15:37:57 -0700102 vdda-phy-max-microamp = <62900>;
103 vdda-pll-max-microamp = <18300>;
Subhash Jadavani20a48962017-03-27 15:37:57 -0700104
105 status = "ok";
106};
107
108&ufshc_card {
109 vdd-hba-supply = <&ufs_card_gdsc>;
110 vdd-hba-fixed-regulator;
111 vcc-supply = <&pm8998_l21>;
112 vccq2-supply = <&pm8998_s4>;
113 vcc-max-microamp = <300000>;
114 vccq2-max-microamp = <300000>;
115
Subhash Jadavani05480172017-04-01 15:51:52 -0700116 qcom,vddp-ref-clk-supply = <&pm8998_l2>;
117 qcom,vddp-ref-clk-max-microamp = <100>;
118
Subhash Jadavani20a48962017-03-27 15:37:57 -0700119 status = "ok";
120};
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700121
Subbaraman Narayanamurthy58377f02017-03-21 20:38:43 -0700122&pmi8998_switch1 {
Subbaraman Narayanamurthycd21c812017-03-30 18:36:49 -0700123 pinctrl-names = "led_enable", "led_disable";
124 pinctrl-0 = <&flash_led3_front_en>;
125 pinctrl-1 = <&flash_led3_front_dis>;
126};
Harry Yang67111662017-04-05 15:14:52 -0700127
128&pmi8998_charger {
129 qcom,batteryless-platform;
130};
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600131
132/ {
Jack Phamc2160c842017-04-05 09:48:59 -0700133 extcon_usb1: extcon_usb1 {
134 compatible = "linux,extcon-usb-gpio";
135 id-gpio = <&pmi8998_gpios 9 GPIO_ACTIVE_HIGH>;
136 vbus-gpio = <&pmi8998_gpios 8 GPIO_ACTIVE_HIGH>;
137
138 pinctrl-names = "default";
139 pinctrl-0 = <&usb2_vbus_det_default
140 &usb2_id_det_default>;
141 };
142
143 usb1_vbus_vreg: usb1_vbus_vreg {
144 compatible = "regulator-fixed";
145 regulator-name = "usb_vbus_vreg";
146 gpio = <&pmi8998_gpios 2 GPIO_ACTIVE_HIGH>;
147 enable-active-high;
148
149 /* Typical EN-to-VBUS turn on time for NX5P1100 */
150 regulator-enable-ramp-delay = <630>;
151
152 pinctrl-names = "default";
153 pinctrl-0 = <&usb2_vbus_boost_default>;
154 };
155
Girish Mahadevan11bc2ff2017-04-08 08:26:35 -0600156aliases {
157 serial0 = &qupv3_se9_2uart;
158 spi0 = &qupv3_se8_spi;
159 i2c0 = &qupv3_se10_i2c;
160 i2c1 = &qupv3_se3_i2c;
161 };
162};
163
164&qupv3_se9_2uart {
165 status = "ok";
166};
167
168&qupv3_se8_spi {
169 status = "ok";
170};
171
172&qupv3_se3_i2c {
173 status = "ok";
174};
175
176&qupv3_se10_i2c {
177 status = "ok";
178};
Jack Phamc2160c842017-04-05 09:48:59 -0700179
180&usb1 {
181 status = "okay";
182 extcon = <&extcon_usb1>;
183 vbus_dwc3-supply = <&usb1_vbus_vreg>;
184};
185
186&qusb_phy1 {
187 status = "okay";
188};
189
190&usb_qmp_phy {
191 status = "okay";
192};
Siddartha Mohanadoss81021962017-04-12 11:31:00 -0700193
194&pm8998_vadc {
195 chan@83 {
196 label = "vph_pwr";
197 reg = <0x83>;
198 qcom,decimation = <2>;
199 qcom,pre-div-channel-scaling = <1>;
200 qcom,calibration-type = "absolute";
201 qcom,scale-function = <0>;
202 qcom,hw-settle-time = <0>;
203 qcom,fast-avg-setup = <0>;
204 };
205
206 chan@85 {
207 label = "vcoin";
208 reg = <0x85>;
209 qcom,decimation = <2>;
210 qcom,pre-div-channel-scaling = <1>;
211 qcom,calibration-type = "absolute";
212 qcom,scale-function = <0>;
213 qcom,hw-settle-time = <0>;
214 qcom,fast-avg-setup = <0>;
215 };
216
217 chan@4c {
218 label = "xo_therm";
219 reg = <0x4c>;
220 qcom,decimation = <2>;
221 qcom,pre-div-channel-scaling = <0>;
222 qcom,calibration-type = "ratiometric";
223 qcom,scale-function = <4>;
224 qcom,hw-settle-time = <2>;
225 qcom,fast-avg-setup = <0>;
226 };
227
228 chan@4d {
229 label = "msm_therm";
230 reg = <0x4d>;
231 qcom,decimation = <2>;
232 qcom,pre-div-channel-scaling = <0>;
233 qcom,calibration-type = "ratiometric";
234 qcom,scale-function = <2>;
235 qcom,hw-settle-time = <2>;
236 qcom,fast-avg-setup = <0>;
237 };
238
239 chan@4f {
240 label = "pa_therm1";
241 reg = <0x4f>;
242 qcom,decimation = <2>;
243 qcom,pre-div-channel-scaling = <0>;
244 qcom,calibration-type = "ratiometric";
245 qcom,scale-function = <2>;
246 qcom,hw-settle-time = <2>;
247 qcom,fast-avg-setup = <0>;
248 };
249
250 chan@51 {
251 label = "quiet_therm";
252 reg = <0x51>;
253 qcom,decimation = <2>;
254 qcom,pre-div-channel-scaling = <0>;
255 qcom,calibration-type = "ratiometric";
256 qcom,scale-function = <2>;
257 qcom,hw-settle-time = <2>;
258 qcom,fast-avg-setup = <0>;
259 };
260};
261
262&pm8998_adc_tm {
263 chan@83 {
264 label = "vph_pwr";
265 reg = <0x83>;
266 qcom,pre-div-channel-scaling = <1>;
267 qcom,calibration-type = "absolute";
268 qcom,scale-function = <0>;
269 qcom,hw-settle-time = <0>;
270 qcom,btm-channel-number = <0x60>;
271 };
272
273 chan@4d {
274 label = "msm_therm";
275 reg = <0x4d>;
276 qcom,pre-div-channel-scaling = <0>;
277 qcom,calibration-type = "ratiometric";
278 qcom,scale-function = <2>;
279 qcom,hw-settle-time = <2>;
280 qcom,btm-channel-number = <0x68>;
281 qcom,thermal-node;
282 };
283
284 chan@51 {
285 label = "quiet_therm";
286 reg = <0x51>;
287 qcom,pre-div-channel-scaling = <0>;
288 qcom,calibration-type = "ratiometric";
289 qcom,scale-function = <2>;
290 qcom,hw-settle-time = <2>;
291 qcom,btm-channel-number = <0x70>;
292 qcom,thermal-node;
293 };
294
295 chan@4c {
296 label = "xo_therm";
297 reg = <0x4c>;
298 qcom,pre-div-channel-scaling = <0>;
299 qcom,calibration-type = "ratiometric";
300 qcom,scale-function = <4>;
301 qcom,hw-settle-time = <2>;
302 qcom,btm-channel-number = <0x78>;
303 qcom,thermal-node;
304 };
305
306 chan@4f {
307 label = "pa_therm1";
308 reg = <0x4f>;
309 qcom,pre-div-channel-scaling = <0>;
310 qcom,calibration-type = "ratiometric";
311 qcom,scale-function = <2>;
312 qcom,hw-settle-time = <2>;
313 qcom,btm-channel-number = <0x80>;
314 qcom,thermal-node;
315 };
316};