blob: 9a7e742d6aaaacb9a6b5701a91404818838f2315 [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>;
78};
79
Fenglin Wu60069b32017-11-09 09:41:26 +080080&pm660_charger {
Fenglin Wu064dfd32017-12-08 14:24:41 +080081 qcom,thermal-mitigation = <4200000 3500000 3000000 2500000
82 2000000 1500000 1000000 500000>;
Fenglin Wu60069b32017-11-09 09:41:26 +080083 qcom,battery-data = <&qrd_batterydata>;
84 qcom,sw-jeita-enable;
85};
86
Fenglin Wu8ec09b12017-10-11 20:25:29 +080087&tlmm {
88 smb_int_default: smb_int_default {
89 mux {
90 pins = "gpio54";
91 function = "gpio";
92 };
93 config {
94 pins = "gpio54";
95 drive-strength = <2>;
96 bias-pull-up;
97 input-enable;
98 };
99 };
100};
101
102&smb1355_0 {
103 pinctrl-names = "default";
104 pinctrl-0 = <&smb_int_default
105 &smb_shutdown_default>;
106 interrupt-parent = <&tlmm>;
107 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
108 smb1355_charger_0: qcom,smb1355-charger@1000 {
109 io-channels = <&pm660_rradc 2>,
110 <&pm660_rradc 12>;
111 io-channel-names = "charger_temp",
112 "charger_temp_max";
113 status = "ok";
114 };
115};
116
117&smb1355_1 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&smb_int_default
120 &smb_shutdown_default>;
121 interrupt-parent = <&tlmm>;
122 interrupts = <54 IRQ_TYPE_LEVEL_LOW>;
123 smb1355_charger_1: qcom,smb1355-charger@1000 {
124 io-channels = <&pm660_rradc 2>,
125 <&pm660_rradc 12>;
126 io-channel-names = "charger_temp",
127 "charger_temp_max";
128 status = "ok";
129 };
130};
131
132&soc {
133 gpio_keys {
134 compatible = "gpio-keys";
135 label = "gpio-keys";
136 pinctrl-names = "default";
137 pinctrl-0 = <&key_vol_up_default>;
138
139 vol_up {
140 label = "volume_up";
141 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
142 linux,input-type = <1>;
143 linux,code = <115>;
144 gpio-key,wakeup;
145 debounce-interval = <15>;
146 linux,can-disable;
147 };
148 };
149};
150
Liangliang Lua6e08792017-11-14 20:57:34 +0800151&qusb_phy0 {
152 qcom,qusb-phy-init-seq =
153 /* <value reg_offset> */
154 <0x23 0x210 /* PWR_CTRL1 */
155 0x03 0x04 /* PLL_ANALOG_CONTROLS_TWO */
156 0x7c 0x18c /* PLL_CLOCK_INVERTERS */
157 0x80 0x2c /* PLL_CMODE */
158 0x0a 0x184 /* PLL_LOCK_DELAY */
159 0x19 0xb4 /* PLL_DIGITAL_TIMERS_TWO */
160 0x40 0x194 /* PLL_BIAS_CONTROL_1 */
161 0x20 0x198 /* PLL_BIAS_CONTROL_2 */
162 0x21 0x214 /* PWR_CTRL2 */
Liangliang Lud76080f2018-01-09 16:09:50 +0800163 0x00 0x220 /* IMP_CTRL1 */
164 0x1a 0x224 /* IMP_CTRL2 */
165 0x47 0x240 /* TUNE1 */
Liangliang Lua6e08792017-11-14 20:57:34 +0800166 0x29 0x244 /* TUNE2 */
167 0xca 0x248 /* TUNE3 */
168 0x04 0x24c /* TUNE4 */
169 0x03 0x250 /* TUNE5 */
170 0x00 0x23c /* CHG_CTRL2 */
171 0x22 0x210>; /* PWR_CTRL1 */
172};
173
Fenglin Wu8ec09b12017-10-11 20:25:29 +0800174&pm660_haptics {
175 qcom,vmax-mv = <1800>;
176 qcom,wave-play-rate-us = <4255>;
177 qcom,lra-auto-mode;
178 status = "okay";
179};
180
Walter Yang23d30b72017-09-22 13:37:51 +0800181&int_codec {
Walter Yangf5d18732017-10-20 14:03:33 +0800182 qcom,model = "sdm670-skuw-snd-card";
Walter Yang764ac132017-11-27 17:15:39 +0800183 qcom,msm-micbias1-ext-cap;
Walter Yang23d30b72017-09-22 13:37:51 +0800184 qcom,audio-routing =
185 "RX_BIAS", "INT_MCLK0",
186 "SPK_RX_BIAS", "INT_MCLK0",
187 "INT_LDO_H", "INT_MCLK0",
188 "MIC BIAS External2", "Headset Mic",
189 "AMIC2", "MIC BIAS External2",
190 "MIC BIAS External", "Handset Mic",
191 "AMIC1", "MIC BIAS External",
192 "MIC BIAS External", "Secondary Mic",
193 "AMIC3", "MIC BIAS External",
194 "SpkrLeft IN", "SPK1 OUT",
195 "PDM_IN_RX1", "PDM_OUT_RX1",
196 "PDM_IN_RX2", "PDM_OUT_RX2",
197 "PDM_IN_RX3", "PDM_OUT_RX3",
198 "ADC1_IN", "ADC1_OUT",
199 "ADC2_IN", "ADC2_OUT",
200 "ADC3_IN", "ADC3_OUT";
201 qcom,wsa-max-devs = <1>;
202 qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_213_en>;
203 qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft";
204};
Can Guo880f5372017-09-25 23:05:02 -0700205
206&sdhc_1 {
207 vdd-supply = <&pm660l_l4>;
208 qcom,vdd-voltage-level = <2960000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530209 qcom,vdd-current-level = <0 570000>;
Can Guo880f5372017-09-25 23:05:02 -0700210
211 vdd-io-supply = <&pm660_l8>;
212 qcom,vdd-io-always-on;
213 qcom,vdd-io-lpm-sup;
214 qcom,vdd-io-voltage-level = <1800000 1800000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530215 qcom,vdd-io-current-level = <0 325000>;
Can Guo880f5372017-09-25 23:05:02 -0700216
217 pinctrl-names = "active", "sleep";
218 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
219 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
220
221 status = "ok";
222};
Can Guoc0c4a3b42017-09-25 23:30:49 -0700223
224&sdhc_2 {
225 vdd-supply = <&pm660l_l5>;
226 qcom,vdd-voltage-level = <2960000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530227 qcom,vdd-current-level = <0 800000>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700228
229 vdd-io-supply = <&pm660l_l2>;
230 qcom,vdd-io-voltage-level = <1800000 2960000>;
Vijay Viswanath5aa2d262017-12-13 12:42:40 +0530231 qcom,vdd-io-current-level = <0 22000>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700232
233 pinctrl-names = "active", "sleep";
Can Guo56a826d2017-11-06 16:38:20 +0800234 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
235 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
Can Guoc0c4a3b42017-09-25 23:30:49 -0700236
237 cd-gpios = <&tlmm 96 0>;
238
239 status = "ok";
240};
Jin Fu598a0432017-10-08 12:26:24 +0800241
242&tlmm {
243 pmx_ts_rst_active {
244 ts_rst_active: ts_rst_active {
245 mux {
246 pins = "gpio99";
247 function = "gpio";
248 };
249
250 config {
251 pins = "gpio99";
252 drive-strength = <16>;
253 bias-pull-up;
254 };
255 };
256 };
257
258 pmx_ts_rst_suspend {
259 ts_rst_suspend: ts_rst_suspend {
260 mux {
261 pins = "gpio99";
262 function = "gpio";
263 };
264
265 config {
266 pins = "gpio99";
267 drive-strength = <2>;
268 bias-pull-down;
269 };
270 };
271 };
272};
273
274&soc {
275 hbtp {
276 compatible = "qcom,hbtp-input";
277 pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
278 pinctrl-0 = <&ts_rst_active>;
279 pinctrl-1 = <&ts_rst_suspend>;
280 vcc_ana-supply = <&pm660l_l3>;
281 vcc_dig-supply = <&pm660_l13>;
282 qcom,afe-load = <20000>;
283 qcom,afe-vtg-min = <3000000>;
284 qcom,afe-vtg-max = <3000000>;
285 qcom,dig-load = <40000>;
286 qcom,dig-vtg-min = <1800000>;
287 qcom,dig-vtg-max = <1800000>;
288 qcom,fb-resume-delay-us = <1000>;
289 qcom,afe-force-power-on;
290 qcom,afe-power-on-delay-us = <6>;
291 qcom,afe-power-off-delay-us = <6>;
292 };
293};
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800294
295&dsi_dual_nt36850_truly_cmd {
296 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
297 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
298 qcom,mdss-dsi-bl-min-level = <1>;
299 qcom,mdss-dsi-bl-max-level = <4095>;
300 qcom,panel-mode-gpio = <&tlmm 76 0>;
301 qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
302 qcom,platform-reset-gpio = <&tlmm 75 0>;
303 qcom,platform-te-gpio = <&tlmm 10 0>;
304};
305
306&dsi_dual_nt36850_truly_cmd_display {
307 qcom,dsi-display-active;
308};
309
Yuan Zhao33c507a2018-01-04 19:39:07 +0800310&dsi_panel_pwr_supply {
311 qcom,panel-supply-entry@2 {
312 qcom,supply-post-off-sleep = <5>;
313 };
314};
315
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800316&pm660l_wled {
317 status = "okay";
Fenglin Wud835dd22017-11-24 15:57:16 +0800318 qcom,led-strings-list = [00 01];
Yuan Zhao3e1868e2017-09-25 16:47:29 +0800319};
320
321&mdss_mdp {
322 #cooling-cells = <2>;
323};