blob: 43f146508f321372040ce1f49379f3c4eee1aab7 [file] [log] [blame]
Liangliang Lud76080f2018-01-09 16:09:50 +08001/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +08002 *
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
Fenglin Wu8ec09b12017-10-11 20:25:29 +080013#include <dt-bindings/gpio/gpio.h>
Pengfei Liu9e037e92017-10-15 20:52:46 +080014#include "sdm670-camera-sensor-qrd.dtsi"
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +080015#include "sdm670-pmic-overlay.dtsi"
Walter Yang23d30b72017-09-22 13:37:51 +080016#include "sdm670-audio-overlay.dtsi"
Fenglin Wu8ec09b12017-10-11 20:25:29 +080017#include "smb1355.dtsi"
Yuan Zhao3e1868e2017-09-25 16:47:29 +080018#include "sdm670-sde-display.dtsi"
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +080019
20&qupv3_se9_2uart {
21 status = "disabled";
22};
23
24&qupv3_se12_2uart {
25 status = "ok";
26};
27
28&qupv3_se8_spi {
29 status = "disabled";
30};
31
32&qupv3_se3_i2c {
Rohit Rangwani0a1cd652017-09-19 13:29:12 +053033 status = "ok";
34 nq@28 {
35 compatible = "qcom,nq-nci";
36 reg = <0x28>;
37 qcom,nq-irq = <&tlmm 44 0x00>;
38 qcom,nq-ven = <&tlmm 12 0x00>;
39 qcom,nq-firm = <&tlmm 43 0x00>;
40 qcom,nq-clkreq = <&pm660_gpios 4 0x00>;
41 qcom,nq-esepwr = <&tlmm 116 0x00>;
42 interrupt-parent = <&tlmm>;
43 qcom,clk-src = "BBCLK3";
44 interrupts = <44 0>;
45 interrupt-names = "nfc_irq";
46 pinctrl-names = "nfc_active", "nfc_suspend";
47 pinctrl-0 = <&nfc_int_active
48 &nfc_enable_active
49 &nfc_clk_default>;
50 pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>;
51 clocks = <&clock_rpmh RPMH_LN_BB_CLK3>;
52 clock-names = "ref_clk";
53 };
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +080054};
55
56&qupv3_se10_i2c {
Fenglin Wu8ec09b12017-10-11 20:25:29 +080057 status = "ok";
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +080058};
59
60&qupv3_se6_4uart {
xiaowang28d94a92017-10-16 10:51:11 +080061 status = "ok";
Jiangen Jiao1b7d71e2017-09-19 11:36:16 +080062};
Walter Yang23d30b72017-09-22 13:37:51 +080063
Fenglin Wu8ec09b12017-10-11 20:25:29 +080064&vendor {
65 qrd_batterydata: qcom,battery-data {
66 qcom,batt-id-range-pct = <15>;
67 #include "fg-gen3-batterydata-mlp356477-2800mah.dtsi"
68 };
69};
70
Liangliang Luc0602cd2017-11-21 15:11:19 +080071&eud {
72 vdda33-supply = <&pm660l_l7>;
73};
74
Fenglin Wu8ec09b12017-10-11 20:25:29 +080075&pm660_fg {
76 qcom,battery-data = <&qrd_batterydata>;
77 qcom,fg-bmd-en-delay-ms = <300>;
Fenglin Wu2de71a82018-02-02 11:20:34 +080078 qcom,fg-jeita-thresholds = <0 15 45 55>;
Fenglin Wu8ec09b12017-10-11 20:25:29 +080079};
80
Fenglin Wu60069b32017-11-09 09:41:26 +080081&pm660_charger {
Fenglin Wu064dfd32017-12-08 14:24:41 +080082 qcom,thermal-mitigation = <4200000 3500000 3000000 2500000
83 2000000 1500000 1000000 500000>;
Fenglin Wu60069b32017-11-09 09:41:26 +080084 qcom,battery-data = <&qrd_batterydata>;
85 qcom,sw-jeita-enable;
86};
87
Fenglin Wu8ec09b12017-10-11 20:25:29 +080088&tlmm {
89 smb_int_default: smb_int_default {
90 mux {
91 pins = "gpio54";
92 function = "gpio";
93 };
94 config {
95 pins = "gpio54";
96 drive-strength = <2>;
97 bias-pull-up;
98 input-enable;
99 };
100 };
101};
102
103&smb1355_0 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&smb_int_default
106 &smb_shutdown_default>;
107 interrupt-parent = <&tlmm>;
108 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
109 smb1355_charger_0: qcom,smb1355-charger@1000 {
110 io-channels = <&pm660_rradc 2>,
111 <&pm660_rradc 12>;
112 io-channel-names = "charger_temp",
113 "charger_temp_max";
114 status = "ok";
115 };
116};
117
118&smb1355_1 {
119 pinctrl-names = "default";
120 pinctrl-0 = <&smb_int_default
121 &smb_shutdown_default>;
122 interrupt-parent = <&tlmm>;
123 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
124 smb1355_charger_1: qcom,smb1355-charger@1000 {
125 io-channels = <&pm660_rradc 2>,
126 <&pm660_rradc 12>;
127 io-channel-names = "charger_temp",
128 "charger_temp_max";
129 status = "ok";
130 };
131};
132
133&soc {
134 gpio_keys {
135 compatible = "gpio-keys";
136 label = "gpio-keys";
137 pinctrl-names = "default";
138 pinctrl-0 = <&key_vol_up_default>;
139
140 vol_up {
141 label = "volume_up";
142 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
143 linux,input-type = <1>;
144 linux,code = <115>;
145 gpio-key,wakeup;
146 debounce-interval = <15>;
147 linux,can-disable;
148 };
149 };
150};
151
Liangliang Lua6e08792017-11-14 20:57:34 +0800152&qusb_phy0 {
153 qcom,qusb-phy-init-seq =
154 /* <value reg_offset> */
155 <0x23 0x210 /* PWR_CTRL1 */
156 0x03 0x04 /* PLL_ANALOG_CONTROLS_TWO */
157 0x7c 0x18c /* PLL_CLOCK_INVERTERS */
158 0x80 0x2c /* PLL_CMODE */
159 0x0a 0x184 /* PLL_LOCK_DELAY */
160 0x19 0xb4 /* PLL_DIGITAL_TIMERS_TWO */
161 0x40 0x194 /* PLL_BIAS_CONTROL_1 */
162 0x20 0x198 /* PLL_BIAS_CONTROL_2 */
163 0x21 0x214 /* PWR_CTRL2 */
Liangliang Lud76080f2018-01-09 16:09:50 +0800164 0x00 0x220 /* IMP_CTRL1 */
165 0x1a 0x224 /* IMP_CTRL2 */
166 0x47 0x240 /* TUNE1 */
Liangliang Lua6e08792017-11-14 20:57:34 +0800167 0x29 0x244 /* TUNE2 */
168 0xca 0x248 /* TUNE3 */
169 0x04 0x24c /* TUNE4 */
170 0x03 0x250 /* TUNE5 */
171 0x00 0x23c /* CHG_CTRL2 */
172 0x22 0x210>; /* PWR_CTRL1 */
173};
174
Fenglin Wu8ec09b12017-10-11 20:25:29 +0800175&pm660_haptics {
176 qcom,vmax-mv = <1800>;
177 qcom,wave-play-rate-us = <4255>;
178 qcom,lra-auto-mode;
179 status = "okay";
180};
181
Walter Yang23d30b72017-09-22 13:37:51 +0800182&int_codec {
Walter Yangf5d18732017-10-20 14:03:33 +0800183 qcom,model = "sdm670-skuw-snd-card";
Walter Yang764ac132017-11-27 17:15:39 +0800184 qcom,msm-micbias1-ext-cap;
Walter Yang23d30b72017-09-22 13:37:51 +0800185 qcom,audio-routing =
186 "RX_BIAS", "INT_MCLK0",
187 "SPK_RX_BIAS", "INT_MCLK0",
188 "INT_LDO_H", "INT_MCLK0",
189 "MIC BIAS External2", "Headset Mic",
190 "AMIC2", "MIC BIAS External2",
191 "MIC BIAS External", "Handset Mic",
192 "AMIC1", "MIC BIAS External",
193 "MIC BIAS External", "Secondary Mic",
194 "AMIC3", "MIC BIAS External",
195 "SpkrLeft IN", "SPK1 OUT",
196 "PDM_IN_RX1", "PDM_OUT_RX1",
197 "PDM_IN_RX2", "PDM_OUT_RX2",
198 "PDM_IN_RX3", "PDM_OUT_RX3",
199 "ADC1_IN", "ADC1_OUT",
200 "ADC2_IN", "ADC2_OUT",
201 "ADC3_IN", "ADC3_OUT";
202 qcom,wsa-max-devs = <1>;
203 qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_213_en>;
204 qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft";
205};
Can Guo880f5372017-09-25 23:05:02 -0700206
207&sdhc_1 {
208 vdd-supply = <&pm660l_l4>;
209 qcom,vdd-voltage-level = <2960000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530210 qcom,vdd-current-level = <0 570000>;
Can Guo880f5372017-09-25 23:05:02 -0700211
212 vdd-io-supply = <&pm660_l8>;
213 qcom,vdd-io-always-on;
214 qcom,vdd-io-lpm-sup;
215 qcom,vdd-io-voltage-level = <1800000 1800000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530216 qcom,vdd-io-current-level = <0 325000>;
Can Guo880f5372017-09-25 23:05:02 -0700217
218 pinctrl-names = "active", "sleep";
219 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
220 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
221
222 status = "ok";
223};
Can Guoc0c4a3b42017-09-25 23:30:49 -0700224
225&sdhc_2 {
226 vdd-supply = <&pm660l_l5>;
227 qcom,vdd-voltage-level = <2960000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530228 qcom,vdd-current-level = <0 800000>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700229
230 vdd-io-supply = <&pm660l_l2>;
231 qcom,vdd-io-voltage-level = <1800000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530232 qcom,vdd-io-current-level = <0 22000>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700233
234 pinctrl-names = "active", "sleep";
Can Guo56a826d2017-11-06 16:38:20 +0800235 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
236 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700237
238 cd-gpios = <&tlmm 96 0>;
239
240 status = "ok";
241};
Jin Fu598a0432017-10-08 12:26:24 +0800242
243&tlmm {
244 pmx_ts_rst_active {
245 ts_rst_active: ts_rst_active {
246 mux {
247 pins = "gpio99";
248 function = "gpio";
249 };
250
251 config {
252 pins = "gpio99";
253 drive-strength = <16>;
254 bias-pull-up;
255 };
256 };
257 };
258
259 pmx_ts_rst_suspend {
260 ts_rst_suspend: ts_rst_suspend {
261 mux {
262 pins = "gpio99";
263 function = "gpio";
264 };
265
266 config {
267 pins = "gpio99";
268 drive-strength = <2>;
269 bias-pull-down;
270 };
271 };
272 };
273};
274
275&soc {
276 hbtp {
277 compatible = "qcom,hbtp-input";
278 pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
279 pinctrl-0 = <&ts_rst_active>;
280 pinctrl-1 = <&ts_rst_suspend>;
281 vcc_ana-supply = <&pm660l_l3>;
282 vcc_dig-supply = <&pm660_l13>;
283 qcom,afe-load = <20000>;
284 qcom,afe-vtg-min = <3000000>;
285 qcom,afe-vtg-max = <3000000>;
286 qcom,dig-load = <40000>;
287 qcom,dig-vtg-min = <1800000>;
288 qcom,dig-vtg-max = <1800000>;
289 qcom,fb-resume-delay-us = <1000>;
290 qcom,afe-force-power-on;
291 qcom,afe-power-on-delay-us = <6>;
292 qcom,afe-power-off-delay-us = <6>;
293 };
294};
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800295
296&dsi_dual_nt36850_truly_cmd {
297 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
298 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
299 qcom,mdss-dsi-bl-min-level = <1>;
300 qcom,mdss-dsi-bl-max-level = <4095>;
301 qcom,panel-mode-gpio = <&tlmm 76 0>;
302 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
303 qcom,platform-reset-gpio = <&tlmm 75 0>;
304 qcom,platform-te-gpio = <&tlmm 10 0>;
305};
306
307&dsi_dual_nt36850_truly_cmd_display {
308 qcom,dsi-display-active;
309};
310
Yuan Zhao33c507a2018-01-04 19:39:07 +0800311&dsi_panel_pwr_supply {
312 qcom,panel-supply-entry@2 {
313 qcom,supply-post-off-sleep = <5>;
314 };
315};
316
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800317&pm660l_wled {
318 status = "okay";
Fenglin Wud835dd22017-11-24 15:57:16 +0800319 qcom,led-strings-list = [00 01];
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800320};
321
322&mdss_mdp {
323 #cooling-cells = <2>;
324};