blob: bf2241a6a55916800e44841cd241435c2bfaaac2 [file] [log] [blame]
shaoxing174ab762017-11-13 18:15:14 +08001/*
shaoxingcb5a8eb2018-01-02 17:43:27 +08002 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
shaoxing174ab762017-11-13 18:15:14 +08003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include "sdm670-mtp.dtsi"
15#include "sdm670-camera-sensor-360camera.dtsi"
16#include "sdm670-audio-overlay.dtsi"
17
18&qupv3_se3_i2c {
19 status = "disabled";
20};
21
22&qupv3_se10_i2c {
23 status = "okay";
24};
25
26&qupv3_se12_2uart {
27 status = "okay";
28};
29
30&qupv3_se6_4uart {
31 status = "okay";
32};
33
34&qupv3_se13_i2c {
35 status = "disabled";
36};
37
38&qupv3_se13_spi {
39 status = "disabled";
40};
41
shaoxingcb5a8eb2018-01-02 17:43:27 +080042&dsi_dual_nt36850_truly_cmd_display {
43 status = "disabled";
44};
45
46&dsi_dual_nt35597_truly_video {
47 status = "disabled";
48};
49
shaoxing174ab762017-11-13 18:15:14 +080050&int_codec {
51 qcom,model = "sdm670-360cam-snd-card";
52 qcom,audio-routing =
53 "RX_BIAS", "INT_MCLK0",
54 "SPK_RX_BIAS", "INT_MCLK0",
55 "INT_LDO_H", "INT_MCLK0",
56 "DMIC1", "MIC BIAS External",
57 "MIC BIAS External", "Digital Mic1",
58 "DMIC2", "MIC BIAS External",
59 "MIC BIAS External", "Digital Mic2",
60 "DMIC3", "MIC BIAS External2",
61 "MIC BIAS External2", "Digital Mic3",
62 "DMIC4", "MIC BIAS External2",
63 "MIC BIAS External2", "Digital Mic4",
64 "PDM_IN_RX1", "PDM_OUT_RX1",
65 "PDM_IN_RX2", "PDM_OUT_RX2",
66 "PDM_IN_RX3", "PDM_OUT_RX3",
67 "ADC1_IN", "ADC1_OUT",
68 "ADC2_IN", "ADC2_OUT",
69 "ADC3_IN", "ADC3_OUT";
70 qcom,wsa-max-devs = <0>;
71};
shaoxing0b3c35a2017-11-17 18:08:30 +080072
73&tlmm {
74 pwr_led_green_default: pwr_led_green_default {
75 mux {
76 pins = "gpio106";
77 function = "gpio";
78 };
79 config {
80 pins = "gpio106";
81 drive-strength = <8>; /* 8 mA */
82 bias-disable;
83 output-low;
84 };
85 };
86
87 pwr_led_red_default: pwr_led_red_default {
88 mux {
89 pins = "gpio111";
90 function = "gpio";
91 };
92 config {
93 pins = "gpio111";
94 drive-strength = <8>; /* 8 mA */
95 bias-disable;
96 output-low;
97 };
98 };
99
100 wifi_led_green_default: wifi_led_green_default {
101 mux {
102 pins = "gpio114";
103 function = "gpio";
104 };
105 config {
106 pins = "gpio114";
107 drive-strength = <8>; /* 8 mA */
108 bias-disable;
109 output-low;
110 };
111 };
112
113 wifi_led_red_default: wifi_led_red_default {
114 mux {
115 pins = "gpio115";
116 function = "gpio";
117 };
118 config {
119 pins = "gpio115";
120 drive-strength = <8>; /* 8 mA */
121 bias-disable;
122 output-low;
123 };
124 };
125
126 key_wcnss_default: key_wcnss_default {
127 mux {
128 pins = "gpio120";
129 function = "gpio";
130 };
131 config {
132 pins = "gpio120";
133 drive-strength = <8>; /* 8 mA */
134 bias-pull-up;
135 input-enable;
136 };
137 };
138
139 key_record_default: key_record_default {
140 mux {
141 pins = "gpio119";
142 function = "gpio";
143 };
144 config {
145 pins = "gpio119";
146 drive-strength = <8>; /* 8 mA */
147 bias-pull-up;
148 input-enable;
149 };
150 };
151
152 key_snapshot_default: key_snapshot_default {
153 mux {
154 pins = "gpio91";
155 function = "gpio";
156 };
157 config {
158 pins = "gpio91";
159 drive-strength = <8>; /* 8 mA */
160 bias-pull-up;
161 input-enable;
162 };
163 };
164};
165
166&soc {
167 gpio-leds {
168 compatible = "gpio-leds";
169 pinctrl-names = "default";
170 pinctrl-0 = <&pwr_led_green_default
171 &pwr_led_red_default
172 &wifi_led_green_default
173 &wifi_led_red_default>;
174 status = "okay";
c_xlin003208e2018-01-17 11:06:58 +0800175 vdd_ldo_1-supply = <&pm660_l15>;
176 vdd_ldo_2-supply = <&pm660_l17>;
shaoxing0b3c35a2017-11-17 18:08:30 +0800177
178 led@1 {
179 label = "PWR_LED:red:106";
180 gpios = <&tlmm 106 GPIO_ACTIVE_HIGH>;
181 linux,default-trigger = "wlan";
182 default-state = "off";
183 };
184
185 led@2 {
186 label = "PWR_LED:green:111";
187 gpios = <&tlmm 111 GPIO_ACTIVE_HIGH>;
188 linux,default-trigger = "wlan";
189 default-state = "on";
190 };
191
192 led@3 {
193 label = "WIFI_LED:red:114";
194 gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>;
195 linux,default-trigger = "wlan";
196 default-state = "on";
197 };
198
199 led@4 {
200 label = "WIFI_LED:green:115";
201 gpios = <&tlmm 115 GPIO_ACTIVE_HIGH>;
202 linux,default-trigger = "wlan";
203 default-state = "off";
204 };
205 };
206
207 gpio_keys {
208 compatible = "gpio-keys";
209 label = "gpio-keys";
210
211 pinctrl-names = "default";
212 pinctrl-0 = <&key_snapshot_default
213 &key_record_default
214 &key_wcnss_default>;
215 status = "okay";
216 cam_snapshot {
217 label = "cam_snapshot";
218 gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
219 linux,input-type = <1>;
220 linux,code = <766>;
221 gpio-key,wakeup;
222 debounce-interval = <15>;
223 linux,can-disable;
224 };
225
226 cam_record {
227 label = "cam_record";
228 gpios = <&tlmm 119 GPIO_ACTIVE_LOW>;
229 linux,input-type = <1>;
230 linux,code = <766>;
231 gpio-key,wakeup;
232 debounce-interval = <15>;
233 linux,can-disable;
234 };
235
236 wcnss_key {
237 label = "wcnss_key";
238 gpios = <&tlmm 120 GPIO_ACTIVE_LOW>;
239 linux,input-type = <1>;
240 linux,code = <528>;
241 gpio-key,wakeup;
242 debounce-interval = <15>;
243 linux,can-disable;
244 };
245 };
246};
keqili14e7e132017-11-28 17:09:29 +0800247&pm660_vadc{
248
249 chan@4e {
250 label = "emmc_therm";
251 reg = <0x4e>;
252 qcom,decimation = <2>;
253 qcom,pre-div-channel-scaling = <0>;
254 qcom,calibration-type = "ratiometric";
255 qcom,scale-function = <2>;
256 qcom,hw-settle-time = <2>;
257 qcom,fast-avg-setup = <0>;
258 };
259
260 chan@4f {
261 label = "pa_therm0";
262 reg = <0x4f>;
263 qcom,decimation = <2>;
264 qcom,pre-div-channel-scaling = <0>;
265 qcom,calibration-type = "ratiometric";
266 qcom,scale-function = <2>;
267 qcom,hw-settle-time = <2>;
268 qcom,fast-avg-setup = <0>;
269 };
270};
271
272&pm660_adc_tm{
273
274 chan@4e {
275 label = "emmc_therm";
276 reg = <0x4e>;
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,btm-channel-number = <0x80>;
282 qcom,thermal-node;
283 };
284
285 chan@4f {
286 label = "pa_therm0";
287 reg = <0x4f>;
288 qcom,pre-div-channel-scaling = <0>;
289 qcom,calibration-type = "ratiometric";
290 qcom,scale-function = <2>;
291 qcom,hw-settle-time = <2>;
292 qcom,btm-channel-number = <0x88>;
293 qcom,thermal-node;
294 };
295};