blob: 5b3caf7b05ce83d1f1c2060eb50f7adacfd36ccb [file] [log] [blame]
Jingbiao Ludc9d8782018-01-31 16:35:04 +08001/*
2 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
3 *
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
Lei Chen92dd0bc2018-03-15 17:43:03 +080014#include "msm8937-mdss-panels.dtsi"
Yulei Yaof8348272018-04-11 17:24:51 +080015#include "sdm439-camera-sensor-qrd.dtsi"
Lei Chen92dd0bc2018-03-15 17:43:03 +080016
Jingbiao Ludc9d8782018-01-31 16:35:04 +080017&blsp1_uart2 {
18 status = "ok";
19};
Sayali Lokhandea59d1132018-03-06 08:24:01 +053020
21&sdhc_1 {
22 /* device core power supply */
23 vdd-supply = <&pm8953_l8>;
24 qcom,vdd-voltage-level = <2900000 2900000>;
25 qcom,vdd-current-level = <200 570000>;
26
27 /* device communication power supply */
28 vdd-io-supply = <&pm8953_l5>;
29 qcom,vdd-io-always-on;
30 qcom,vdd-io-lpm-sup;
31 qcom,vdd-io-voltage-level = <1800000 1800000>;
32 qcom,vdd-io-current-level = <200 325000>;
33
34 pinctrl-names = "active", "sleep";
35 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>;
36 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>;
37
38 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 192000000
39 384000000>;
40 qcom,nonremovable;
41 qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";
42
43 status = "ok";
44};
45
Xiaojun Sang0619b382018-03-16 15:47:04 +080046&int_codec {
47 status = "okay";
48 qcom,model = "sdm439-sku1-snd-card";
49 qcom,msm-micbias1-ext-cap;
50 qcom,msm-micbias2-ext-cap;
51 qcom,msm-mbhc-hphl-swh = <1>;
52 qcom,msm-mbhc-gnd-swh = <0>;
53 qcom,msm-hs-micbias-type = "external";
Xiaojun Sang157a69b2018-05-09 17:10:33 +080054 /delete-property/ qcom,quin-mi2s-gpios;
55};
56
57&cdc_quin_mi2s_gpios {
58 status = "disabled";
Xiaojun Sang0619b382018-03-16 15:47:04 +080059};
60
61&wsa881x_i2c_f {
62 status = "okay";
63};
64
65&wsa881x_i2c_45 {
66 status = "okay";
67};
68
c_pbembr8ea68ce2018-04-13 18:23:36 +053069&pm8953_gpios {
70 nfc_clk {
71 nfc_clk_default: nfc_clk_default {
72 pins = "gpio2";
73 function = "normal";
74 input-enable;
75 power-source = <1>;
76 };
77 };
78};
79
80&i2c_5 { /* BLSP2 QUP1 (NFC) */
81 status = "ok";
82 nq@28 {
83 compatible = "qcom,nq-nci";
84 reg = <0x28>;
85 qcom,nq-irq = <&tlmm 17 0x00>;
86 qcom,nq-ven = <&tlmm 16 0x00>;
87 qcom,nq-firm = <&tlmm 130 0x00>;
88 qcom,nq-clkreq = <&pm8953_gpios 2 0x00>;
89 qcom,nq-esepwr = <&tlmm 93 0x00>;
90 interrupt-parent = <&tlmm>;
91 qcom,clk-src = "BBCLK2";
92 interrupts = <17 0>;
93 interrupt-names = "nfc_irq";
94 pinctrl-names = "nfc_active", "nfc_suspend";
95 pinctrl-0 = <&nfc_int_active &nfc_disable_active
96 &nfc_clk_default>;
97 pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>;
98 clocks = <&clock_gcc clk_bb_clk2_pin>;
99 clock-names = "ref_clk";
100 };
101};
102
Sayali Lokhandea59d1132018-03-06 08:24:01 +0530103&sdhc_2 {
104 /* device core power supply */
105 vdd-supply = <&pm8953_l11>;
106 qcom,vdd-voltage-level = <2950000 2950000>;
107 qcom,vdd-current-level = <15000 800000>;
108
109 /* device communication power supply */
110 vdd-io-supply = <&pm8953_l12>;
111 qcom,vdd-io-voltage-level = <1800000 2950000>;
112 qcom,vdd-io-current-level = <200 22000>;
113
114 pinctrl-names = "active", "sleep";
115 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
116 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
117
118 cd-gpios = <&tlmm 67 0x1>;
119
120 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000
121 200000000>;
122 qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
123
124 status = "ok";
125};
Shantanu Jain18501ee2018-04-04 16:48:09 +0530126
127&soc {
128 gpio_keys {
129 compatible = "gpio-keys";
130 input-name = "gpio-keys";
131 pinctrl-names = "default";
132 pinctrl-0 = <&gpio_key_active>;
133
134 vol_up {
135 label = "volume_up";
136 gpios = <&tlmm 91 0x1>;
137 linux,input-type = <1>;
138 linux,code = <115>;
139 debounce-interval = <15>;
140 linux,can-disable;
141 gpio-key,wakeup;
142 };
143 };
Gan Guoc7ab2212018-05-11 09:29:58 +0800144
145 fpc1020 {
146 compatible = "fpc,fpc1020";
147 interrupt-parent = <&tlmm>;
148 interrupts = <48 0>;
149 fpc,gpio_rst = <&tlmm 124 0x0>;
150 fpc,gpio_irq = <&tlmm 48 0>;
151 vcc_spi-supply = <&pm8953_l5>;
152 vdd_io-supply = <&pm8953_l5>;
153 vdd_ana-supply = <&pm8953_l5>;
154 fpc,enable-on-boot;
155 pinctrl-names = "fpc1020_reset_reset",
156 "fpc1020_reset_active",
157 "fpc1020_irq_active";
158 pinctrl-0 = <&fpc_reset_low>;
159 pinctrl-1 = <&fpc_reset_high>;
160 pinctrl-2 = <&fpc_int_low>;
161 };
Shantanu Jain18501ee2018-04-04 16:48:09 +0530162};
Lei Chen92dd0bc2018-03-15 17:43:03 +0800163
164&tlmm {
Xin Hua Lufeaa3862018-03-15 20:33:11 +0800165 pmx_ts_rst_active {
166 ts_rst_active: ts_rst_active {
167 mux {
168 pins = "gpio99";
169 function = "gpio";
170 };
171
172 config {
173 pins = "gpio99";
174 drive-strength = <16>;
175 bias-pull-up;
176 };
177 };
178 };
179
180 pmx_ts_rst_suspend {
181 ts_rst_suspend: ts_rst_suspend {
182 mux {
183 pins = "gpio99";
184 function = "gpio";
185 };
186
187 config {
188 pins = "gpio99";
189 drive-strength = <2>;
190 bias-pull-down;
191 };
192 };
193 };
194};
195
196&soc {
197 hbtp {
198 compatible = "qcom,hbtp-input";
199 pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
200 pinctrl-0 = <&ts_rst_active>;
201 pinctrl-1 = <&ts_rst_suspend>;
202 vcc_ana-supply = <&pm8953_l10>;
203 vcc_dig-supply = <&pm8953_l5>;
204 qcom,afe-load = <20000>;
205 qcom,afe-vtg-min = <3000000>;
206 qcom,afe-vtg-max = <3000000>;
207 qcom,dig-load = <40000>;
208 qcom,dig-vtg-min = <1800000>;
209 qcom,dig-vtg-max = <1800000>;
210 qcom,fb-resume-delay-us = <1000>;
211 qcom,afe-force-power-on;
212 qcom,afe-power-on-delay-us = <6>;
213 qcom,afe-power-off-delay-us = <6>;
214 };
215};
216
217&tlmm {
Lei Chen92dd0bc2018-03-15 17:43:03 +0800218 pmx_mdss {
219 mdss_dsi_active: mdss_dsi_active {
220 mux {
221 pins = "gpio60";
222 };
223 config {
224 pins = "gpio60";
225 };
226 };
227 mdss_dsi_suspend: mdss_dsi_suspend {
228 mux {
229 pins = "gpio60";
230 };
231 config {
232 pins = "gpio60";
233 };
234 };
235 };
236};
237
238&dsi_panel_pwr_supply {
239 qcom,panel-supply-entry@0 {
240 reg = <0>;
241 qcom,supply-name = "bklight_en";
242 qcom,supply-min-voltage = <1800000>;
243 qcom,supply-max-voltage = <1800000>;
244 qcom,supply-enable-load = <100000>;
245 qcom,supply-disable-load = <100>;
246 };
247
248 qcom,panel-supply-entry@2 {
249 reg = <2>;
250 qcom,supply-name = "lab";
251 qcom,supply-min-voltage = <4600000>;
252 qcom,supply-max-voltage = <6000000>;
253 qcom,supply-enable-load = <100000>;
254 qcom,supply-disable-load = <100>;
255 };
256
257 qcom,panel-supply-entry@3 {
258 reg = <3>;
259 qcom,supply-name = "ibb";
260 qcom,supply-min-voltage = <4600000>;
261 qcom,supply-max-voltage = <6000000>;
262 qcom,supply-enable-load = <100000>;
263 qcom,supply-disable-load = <100>;
264 qcom,supply-post-on-sleep = <10>;
265 };
266};
267
268&mdss_dsi {
269 hw-config = "single_dsi";
270};
271
272&mdss_mdp {
273 qcom,mdss-pref-prim-intf = "dsi";
274};
275
276&mdss_dsi0 {
277 lab-supply = <&lcdb_ldo_vreg>;
278 ibb-supply = <&lcdb_ncp_vreg>;
279 bklight_en-supply = <&pm8953_l5>;
280 vddio-supply = <&pm8953_l6>;
281
282 qcom,dsi-pref-prim-pan = <&dsi_hx8399c_truly_vid>;
283 /delete-property/ qcom,platform-bklight-en-gpio;
284 pinctrl-names = "mdss_default", "mdss_sleep";
285 pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
286 pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
287 qcom,platform-te-gpio = <&tlmm 24 0>;
288 qcom,platform-reset-gpio = <&tlmm 60 0>;
289};
290
291&mdss_dsi1 {
292 status = "disabled";
293};
294
295&pm8953_pwm {
296 status = "ok";
297};
298
299&dsi_hx8399c_truly_vid {
300 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
301 qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
302 qcom,mdss-dsi-bl-pmic-bank-select = <0>;
303 qcom,mdss-dsi-pwm-gpio = <&pm8953_gpios 8 0>;
304 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
Padmanabhan Komanduru9bbf9cd2018-04-14 10:59:03 +0530305 /delete-property/ qcom,mdss-dsi-panel-timings;
306 qcom,mdss-dsi-panel-timings-phy-12nm = [18 0a 10 06 03 08 06 0e];
307 qcom,mdss-dsi-t-clk-post = <0x02>;
308 qcom,mdss-dsi-t-clk-pre = <0x2d>;
Padmanabhan Komanduru399d3c32018-04-23 17:34:04 +0530309 qcom,esd-check-enabled;
310 qcom,mdss-dsi-panel-status-check-mode = "reg_read";
311 qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a];
312 qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
313 qcom,mdss-dsi-panel-status-value = <0x9d 0x9d 0x9d 0x9d>;
314 qcom,mdss-dsi-panel-on-check-value = <0x9d 0x9d 0x9d 0x9d>;
315 qcom,mdss-dsi-panel-status-read-length = <4>;
316 qcom,mdss-dsi-panel-max-error-count = <3>;
317 qcom,mdss-dsi-min-refresh-rate = <48>;
318 qcom,mdss-dsi-max-refresh-rate = <60>;
319 qcom,mdss-dsi-pan-enable-dynamic-fps;
320 qcom,mdss-dsi-pan-fps-update =
321 "dfps_immediate_porch_mode_vfp";
Lei Chen92dd0bc2018-03-15 17:43:03 +0800322};
Lei Chen26398b92018-05-08 14:47:56 +0800323
324&dsi_hx8399c_hd_vid {
325 /delete-property/ qcom,mdss-dsi-panel-timings;
326 qcom,mdss-dsi-panel-timings-phy-12nm = [08 06 0a 02 00 04 02 08];
327 qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
328 qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
329 qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
330 qcom,mdss-dsi-bl-pmic-bank-select = <0>;
331 qcom,mdss-dsi-pwm-gpio = <&pm8953_gpios 8 0>;
Padmanabhan Komanduru115ac152018-05-17 15:11:24 +0530332 qcom,esd-check-enabled;
333 qcom,mdss-dsi-panel-status-check-mode = "reg_read";
334 qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a];
335 qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
336 qcom,mdss-dsi-panel-status-value = <0x9d 0x9d 0x9d 0x9d>;
337 qcom,mdss-dsi-panel-on-check-value = <0x9d 0x9d 0x9d 0x9d>;
338 qcom,mdss-dsi-panel-status-read-length = <4>;
339 qcom,mdss-dsi-panel-max-error-count = <3>;
340 qcom,mdss-dsi-min-refresh-rate = <48>;
341 qcom,mdss-dsi-max-refresh-rate = <60>;
342 qcom,mdss-dsi-pan-enable-dynamic-fps;
343 qcom,mdss-dsi-pan-fps-update =
344 "dfps_immediate_porch_mode_vfp";
Lei Chen26398b92018-05-08 14:47:56 +0800345};
Ashay Jaiswalcc0c4232018-05-21 15:37:53 +0530346
347&i2c_2 {
348#include "smb1355.dtsi"
349};
350
351&pmi632_gpios {
352 smb_en {
353 smb_en_default: smb_en_default {
354 pins = "gpio2";
355 function = "func1";
356 output-enable;
357 };
358 };
Anirudh Ghayalca13a0c2018-05-28 11:44:26 +0530359
360 pmi632_sense {
361 /* GPIO 7 and 8 are external-sense pins for PMI632 */
362 pmi632_sense_default: pmi632_sense_default {
363 pins = "gpio7", "gpio8";
364 bias-high-impedance; /* disable the GPIO */
365 bias-disable; /* no-pull */
366 };
367 };
Ashay Jaiswalcc0c4232018-05-21 15:37:53 +0530368};
369
370&tlmm {
371 smb_int_default: smb_int_default {
372 mux {
373 pins = "gpio59";
374 function = "gpio";
375 };
376 config {
377 pins = "gpio59";
378 drive-strength = <2>;
379 bias-pull-up;
380 input-enable;
381 };
382 };
383};
384
385&smb1355_0 {
386 pinctrl-names = "default";
387 pinctrl-0 = <&smb_int_default
Anirudh Ghayalca13a0c2018-05-28 11:44:26 +0530388 &smb_en_default &pmi632_sense_default>;
Ashay Jaiswalcc0c4232018-05-21 15:37:53 +0530389 interrupt-parent = <&tlmm>;
390 interrupts = <59 IRQ_TYPE_LEVEL_LOW>;
391 smb1355_charger_0: qcom,smb1355-charger@1000 {
392 status ="ok";
393 /delete-property/ io-channels;
394 /delete-property/ io-channels-names;
395 qcom,parallel-mode = <1>;
396 };
397};
398
399&smb1355_1 {
400 pinctrl-names = "default";
401 pinctrl-0 = <&smb_int_default
Anirudh Ghayalca13a0c2018-05-28 11:44:26 +0530402 &smb_en_default &pmi632_sense_default>;
Ashay Jaiswalcc0c4232018-05-21 15:37:53 +0530403 interrupt-parent = <&tlmm>;
404 interrupts = <59 IRQ_TYPE_LEVEL_LOW>;
405 smb1355_charger_1: qcom,smb1355-charger@1000 {
406 status ="ok";
407 /delete-property/ io-channels;
408 /delete-property/ io-channels-names;
409 qcom,parallel-mode = <1>;
410 };
411};