1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, AngeloGioacchino Del Regno
4 *                     <angelogioacchino.delregno@somainline.org>
5 * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
6 */
7
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/leds/common.h>
10#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
11#include "msm8998.dtsi"
12#include "pm8005.dtsi"
13#include "pm8998.dtsi"
14#include "pmi8998.dtsi"
15
16/ {
17	/* required for bootloader to select correct board */
18	qcom,msm-id = <0x124 0x20000>, <0x124 0x20001>; /* 8998v2, v2.1 */
19	qcom,board-id = <8 0>;
20
21	clocks {
22		div1_mclk: divclk1 {
23			compatible = "gpio-gate-clock";
24			pinctrl-0 = <&div_clk1>;
25			pinctrl-names = "default";
26			clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
27			#clock-cells = <0>;
28			enable-gpios = <&pm8998_gpios 13 GPIO_ACTIVE_HIGH>;
29		};
30	};
31
32	board_vbat: vbat-regulator {
33		compatible = "regulator-fixed";
34		regulator-name = "VBAT";
35
36		regulator-min-microvolt = <4000000>;
37		regulator-max-microvolt = <4000000>;
38		regulator-always-on;
39		regulator-boot-on;
40	};
41
42	cam0_vdig_vreg: cam0-vdig {
43		compatible = "regulator-fixed";
44		regulator-name = "cam0_vdig";
45		startup-delay-us = <0>;
46		enable-active-high;
47		gpio = <&tlmm 21 GPIO_ACTIVE_HIGH>;
48		pinctrl-names = "default";
49		pinctrl-0 = <&main_cam_pwr_en>;
50	};
51
52	cam1_vdig_vreg: cam1-vdig {
53		compatible = "regulator-fixed";
54		regulator-name = "cam1_vdig";
55		startup-delay-us = <0>;
56		enable-active-high;
57		gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>;
58		pinctrl-names = "default";
59		pinctrl-0 = <&chat_cam_pwr_en>;
60		vin-supply = <&vreg_s3a_1p35>;
61	};
62
63	cam_vio_vreg: cam-vio-vreg {
64		compatible = "regulator-fixed";
65		regulator-name = "cam_vio_vreg";
66		startup-delay-us = <0>;
67		enable-active-high;
68		gpio = <&pmi8998_gpios 1 GPIO_ACTIVE_HIGH>;
69		pinctrl-names = "default";
70		pinctrl-0 = <&main_cam_pwr_io_en>;
71		vin-supply = <&vreg_lvs1a_1p8>;
72	};
73
74	touch_vddio_vreg: touch-vddio-vreg {
75		compatible = "regulator-fixed";
76		regulator-name = "touch_vddio_vreg";
77		startup-delay-us = <10000>;
78		gpio = <&tlmm 133 GPIO_ACTIVE_HIGH>;
79		pinctrl-names = "default";
80		pinctrl-0 = <&ts_vddio_en>;
81	};
82
83	vph_pwr: vph-pwr-regulator {
84		compatible = "regulator-fixed";
85		regulator-name = "vph_pwr";
86		regulator-always-on;
87		regulator-boot-on;
88	};
89
90	extcon_usb: extcon-usb {
91		compatible = "linux,extcon-usb-gpio";
92		id-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
93		vbus-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
94		pinctrl-names = "default";
95		pinctrl-0 = <&cc_dir_default &usb_detect_en>;
96	};
97
98	gpio-keys {
99		compatible = "gpio-keys";
100		label = "Side buttons";
101		pinctrl-names = "default";
102		pinctrl-0 = <&vol_down_n &focus_n &snapshot_n>;
103		button-vol-down {
104			label = "Volume Down";
105			gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
106			linux,input-type = <EV_KEY>;
107			linux,code = <KEY_VOLUMEDOWN>;
108			wakeup-source;
109			debounce-interval = <15>;
110		};
111
112		button-camera-snapshot {
113			label = "Camera Snapshot";
114			gpios = <&pm8998_gpios 7 GPIO_ACTIVE_LOW>;
115			linux,input-type = <EV_KEY>;
116			linux,code = <KEY_CAMERA>;
117			debounce-interval = <15>;
118		};
119
120		button-camera-focus {
121			label = "Camera Focus";
122			gpios = <&pm8998_gpios 8 GPIO_ACTIVE_LOW>;
123			linux,input-type = <EV_KEY>;
124			linux,code = <KEY_CAMERA_FOCUS>;
125			debounce-interval = <15>;
126		};
127	};
128
129	gpio-hall-sensor {
130		compatible = "gpio-keys";
131		label = "Hall sensors";
132		pinctrl-names = "default";
133		pinctrl-0 = <&acc_cover_open>;
134
135		event-hall-sensor0 {
136			label = "Cover Hall Sensor";
137			gpios = <&tlmm 124 GPIO_ACTIVE_LOW>;
138			linux,input-type = <EV_SW>;
139			linux,code = <SW_LID>;
140			wakeup-source;
141			debounce-interval = <30>;
142		};
143	};
144
145	reserved-memory {
146		#address-cells = <2>;
147		#size-cells = <2>;
148		ranges;
149
150		hyp_mem: memory@85800000 {
151			reg = <0x0 0x85800000 0x0 0x3700000>;
152			no-map;
153		};
154
155		cont_splash_mem: memory@9d400000 {
156			reg = <0x0 0x9d400000 0x0 0x2400000>;
157			no-map;
158		};
159
160		zap_shader_region: memory@f6400000 {
161			compatible = "shared-dma-pool";
162			reg = <0x0 0xf6400000 0x0 0x2000>;
163			no-map;
164		};
165
166		adsp_region: memory@fe000000 {
167			reg = <0x0 0xfe000000 0x0 0x800000>;
168			no-map;
169		};
170
171		qseecom_region: memory@fe800000 {
172			reg = <0x0 0xfe800000 0x0 0x1400000>;
173			no-map;
174		};
175
176		ramoops@ffc00000 {
177			compatible = "ramoops";
178			reg = <0x0 0xffc00000 0x0 0x100000>;
179			record-size = <0x10000>;
180			console-size = <0x60000>;
181			ftrace-size = <0x10000>;
182			pmsg-size = <0x20000>;
183			ecc-size = <16>;
184		};
185	};
186
187	vibrator {
188		compatible = "gpio-vibrator";
189		enable-gpios = <&pmi8998_gpios 5 GPIO_ACTIVE_HIGH>;
190		pinctrl-names = "default";
191		pinctrl-0 = <&vib_ldo_en>;
192	};
193};
194
195&blsp1_i2c5 {
196	status = "okay";
197	clock-frequency = <355000>;
198
199	touchscreen@2c {
200		compatible = "syna,rmi4-i2c";
201		reg = <0x2c>;
202		#address-cells = <1>;
203		#size-cells = <0>;
204		interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
205
206		pinctrl-names = "default";
207		pinctrl-0 = <&ts_int_n>;
208
209		vdd-supply = <&vreg_l28_3p0>;
210		vio-supply = <&touch_vddio_vreg>;
211
212		syna,reset-delay-ms = <220>;
213		syna,startup-delay-ms = <1000>;
214
215		rmi4-f01@1 {
216			reg = <0x01>;
217			syna,nosleep-mode = <1>;
218		};
219
220		rmi4-f11@11 {
221			reg = <0x11>;
222			syna,sensor-type = <1>;
223		};
224	};
225};
226
227&blsp1_i2c5_sleep {
228	bias-disable;
229};
230
231&blsp1_uart3 {
232	status = "okay";
233
234	bluetooth {
235		compatible = "qcom,wcn3990-bt";
236
237		vddio-supply = <&vreg_s4a_1p8>;
238		vddxo-supply = <&vreg_l7a_1p8>;
239		vddrf-supply = <&vreg_l17a_1p3>;
240		vddch0-supply = <&vreg_l25a_3p3>;
241		max-speed = <3200000>;
242
243		clocks = <&rpmcc RPM_SMD_RF_CLK2_PIN>;
244	};
245};
246
247&blsp2_uart1 {
248	status = "okay";
249};
250
251&blsp2_i2c2 {
252	status = "okay";
253
254	proximity@29 {
255		compatible = "st,vl53l0x";
256		reg = <0x29>;
257
258		interrupt-parent = <&tlmm>;
259		interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
260
261		reset-gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
262		vdd-supply = <&cam_vio_vreg>;
263
264		pinctrl-names = "default";
265		pinctrl-0 = <&tof_int_n &tof_reset>;
266	};
267};
268
269&ibb {
270	regulator-min-microamp = <800000>;
271	regulator-max-microamp = <800000>;
272	regulator-enable-ramp-delay = <200>;
273	regulator-over-current-protection;
274	regulator-pull-down;
275	regulator-ramp-delay = <1>;
276	regulator-settling-time-up-us = <600>;
277	regulator-settling-time-down-us = <1000>;
278	regulator-soft-start;
279	qcom,discharge-resistor-kohms = <300>;
280};
281
282&lab {
283	regulator-min-microamp = <200000>;
284	regulator-max-microamp = <200000>;
285	regulator-enable-ramp-delay = <500>;
286	regulator-over-current-protection;
287	regulator-pull-down;
288	regulator-ramp-delay = <1>;
289	regulator-settling-time-up-us = <50000>;
290	regulator-settling-time-down-us = <3000>;
291	regulator-soft-start;
292};
293
294&pm8005_gpios {
295	gpio-line-names = "NC", /* GPIO_1 */
296			  "NC",
297			  "SLB",
298			  "OPTION_1_PM8005";
299};
300
301&pm8005_regulators {
302	/* VDD_GFX supply */
303	pm8005_s1: s1 {
304		regulator-min-microvolt = <524000>;
305		regulator-max-microvolt = <1088000>;
306		regulator-enable-ramp-delay = <500>;
307		/* Hack until we rig up the gpu consumer */
308		regulator-always-on;
309	};
310};
311
312&pm8998_gpios {
313	gpio-line-names = "UIM_BATT_ALARM", /* GPIO_1 */
314			  "NC",
315			  "WLAN_SW_CTRL (DISALLOWED)",
316			  "SSC_PWR_EN",
317			  "VOL_DOWN_N",
318			  "VOL_UP_N",
319			  "SNAPSHOT_N",
320			  "FOCUS_N",
321			  "FLASH_THERM",
322			  "", /* GPIO_10 */
323			  "",
324			  "",
325			  "DIV_CLK1",
326			  "NC",
327			  "NC (DISALLOWED)",
328			  "DIV_CLK3",
329			  "NC",
330			  "NC",
331			  "NC",
332			  "NC (DISALLOWED)", /* GPIO_20 */
333			  "NFC_CLK_REQ",
334			  "NC (DISALLOWED)",
335			  "WCSS_PWR_REQ",
336			  "OPTION_1 (DISALLOWED)",
337			  "OPTION_2 (DISALLOWED)",
338			  "PM_SLB (DISALLOWED)";
339
340	vol_down_n: vol-down-n-state {
341		pins = "gpio5";
342		function = PMIC_GPIO_FUNC_NORMAL;
343		bias-pull-up;
344		input-enable;
345		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
346	};
347
348	focus_n: focus-n-state {
349		pins = "gpio7";
350		function = PMIC_GPIO_FUNC_NORMAL;
351		bias-pull-up;
352		input-enable;
353		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
354	};
355
356	snapshot_n: snapshot-n-state {
357		pins = "gpio8";
358		function = PMIC_GPIO_FUNC_NORMAL;
359		bias-pull-up;
360		input-enable;
361		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
362	};
363
364	div_clk1: div-clk1-state {
365		pins = "gpio13";
366		function = "func2";
367		power-source = <0>;
368	};
369};
370
371&pmi8998_gpios {
372	gpio-line-names = "MAIN_CAM_PWR_IO_EN", /* GPIO_1 */
373			  "NC",
374			  "NC",
375			  "TYPEC_UUSB_SEL",
376			  "VIB_LDO_EN",
377			  "NC",
378			  "DISPLAY_TYPE_SEL",
379			  "NC",
380			  "NC",
381			  "NC", /* GPIO_10 */
382			  "NC",
383			  "DIV_CLK3",
384			  "SPMI_I2C_SEL",
385			  "NC";
386
387	main_cam_pwr_io_en: main-cam-pwr-io-en-state {
388		pins = "gpio1";
389		function = PMIC_GPIO_FUNC_NORMAL;
390		bias-disable;
391		drive-push-pull;
392		output-low;
393		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
394		power-source = <1>;
395	};
396
397	vib_ldo_en: vib-ldo-en-state {
398		pins = "gpio5";
399		function = PMIC_GPIO_FUNC_NORMAL;
400		bias-disable;
401		drive-push-pull;
402		output-low;
403		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
404		power-source = <0>;
405	};
406};
407
408&pm8998_resin {
409	linux,code = <KEY_VOLUMEUP>;
410	status = "okay";
411};
412
413&qusb2phy {
414	status = "okay";
415
416	vdda-pll-supply = <&vreg_l12a_1p8>;
417	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
418};
419
420&rpm_requests {
421	regulators-0 {
422		compatible = "qcom,rpm-pm8998-regulators";
423
424		vdd_s1-supply = <&vph_pwr>;
425		vdd_s2-supply = <&vph_pwr>;
426		vdd_s3-supply = <&vph_pwr>;
427		vdd_s4-supply = <&vph_pwr>;
428		vdd_s5-supply = <&vph_pwr>;
429		vdd_s6-supply = <&vph_pwr>;
430		vdd_s7-supply = <&vph_pwr>;
431		vdd_s8-supply = <&vph_pwr>;
432		vdd_s9-supply = <&vph_pwr>;
433		vdd_s10-supply = <&vph_pwr>;
434		vdd_s11-supply = <&vph_pwr>;
435		vdd_s12-supply = <&vph_pwr>;
436		vdd_s13-supply = <&vph_pwr>;
437		vdd_l1_l27-supply = <&vreg_s7a_1p025>;
438		vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
439		vdd_l3_l11-supply = <&vreg_s7a_1p025>;
440		vdd_l4_l5-supply = <&vreg_s7a_1p025>;
441		vdd_l6-supply = <&vreg_s5a_2p04>;
442		vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
443		vdd_l9-supply = <&vreg_bob>;
444		vdd_l10_l23_l25-supply = <&vreg_bob>;
445		vdd_l13_l19_l21-supply = <&vreg_bob>;
446		vdd_l16_l28-supply = <&vreg_bob>;
447		vdd_l18_l22-supply = <&vreg_bob>;
448		vdd_l20_l24-supply = <&vreg_bob>;
449		vdd_l26-supply = <&vreg_s3a_1p35>;
450		vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
451
452		vreg_s3a_1p35: s3 {
453			regulator-min-microvolt = <1352000>;
454			regulator-max-microvolt = <1352000>;
455		};
456
457		vreg_s4a_1p8: s4 {
458			regulator-min-microvolt = <1800000>;
459			regulator-max-microvolt = <1800000>;
460			regulator-system-load = <100000>;
461			regulator-allow-set-load;
462		};
463
464		vreg_s5a_2p04: s5 {
465			regulator-min-microvolt = <1904000>;
466			regulator-max-microvolt = <2032000>;
467		};
468
469		vreg_s7a_1p025: s7 {
470			regulator-min-microvolt = <900000>;
471			regulator-max-microvolt = <1028000>;
472		};
473
474		vreg_l1a_0p875: l1 {
475			regulator-min-microvolt = <880000>;
476			regulator-max-microvolt = <880000>;
477			regulator-system-load = <73400>;
478			regulator-allow-set-load;
479		};
480
481		vreg_l2a_1p2: l2 {
482			regulator-min-microvolt = <1200000>;
483			regulator-max-microvolt = <1200000>;
484			regulator-system-load = <12560>;
485			regulator-allow-set-load;
486		};
487
488		vreg_l3a_1p0: l3 {
489			regulator-min-microvolt = <1000000>;
490			regulator-max-microvolt = <1000000>;
491		};
492
493		vreg_l5a_0p8: l5 {
494			regulator-min-microvolt = <800000>;
495			regulator-max-microvolt = <800000>;
496		};
497
498		vreg_l6a_1p8: l6 {
499			regulator-min-microvolt = <1800000>;
500			regulator-max-microvolt = <1800000>;
501		};
502
503		vreg_l7a_1p8: l7 {
504			regulator-min-microvolt = <1800000>;
505			regulator-max-microvolt = <1800000>;
506		};
507
508		vreg_l8a_1p2: l8 {
509			regulator-min-microvolt = <1200000>;
510			regulator-max-microvolt = <1200000>;
511		};
512
513		vreg_l9a_1p8: l9 {
514			regulator-min-microvolt = <1808000>;
515			regulator-max-microvolt = <2960000>;
516		};
517
518		vreg_l10a_1p8: l10 {
519			regulator-min-microvolt = <1808000>;
520			regulator-max-microvolt = <2960000>;
521		};
522
523		vreg_l11a_1p0: l11 {
524			regulator-min-microvolt = <1000000>;
525			regulator-max-microvolt = <1000000>;
526		};
527
528		vreg_l12a_1p8: l12 {
529			regulator-min-microvolt = <1800000>;
530			regulator-max-microvolt = <1800000>;
531		};
532
533		vreg_l13a_2p95: l13 {
534			regulator-min-microvolt = <1808000>;
535			regulator-max-microvolt = <2960000>;
536			regulator-allow-set-load;
537		};
538
539		vreg_l14a_1p85: l14 {
540			regulator-min-microvolt = <1848000>;
541			regulator-max-microvolt = <1856000>;
542			regulator-system-load = <32000>;
543			regulator-allow-set-load;
544		};
545
546		vreg_l15a_1p8: l15 {
547			regulator-min-microvolt = <1800000>;
548			regulator-max-microvolt = <1800000>;
549		};
550
551		vreg_l16a_2p7: l16 {
552			regulator-min-microvolt = <2704000>;
553			regulator-max-microvolt = <2704000>;
554		};
555
556		vreg_l17a_1p3: l17 {
557			regulator-min-microvolt = <1304000>;
558			regulator-max-microvolt = <1304000>;
559		};
560
561		vreg_l18a_2p85: l18 { };
562
563		vreg_l19a_2p7: l19 {
564			regulator-min-microvolt = <2696000>;
565			regulator-max-microvolt = <2704000>;
566		};
567
568		vreg_l20a_2p95: l20 {
569			regulator-min-microvolt = <2960000>;
570			regulator-max-microvolt = <2960000>;
571			regulator-system-load = <10000>;
572			regulator-allow-set-load;
573		};
574
575		vreg_l21a_2p95: l21 {
576			regulator-min-microvolt = <2960000>;
577			regulator-max-microvolt = <2960000>;
578			regulator-system-load = <800000>;
579			regulator-allow-set-load;
580		};
581
582		vreg_l22a_2p85: l22 { };
583
584		vreg_l23a_3p3: l23 {
585			regulator-min-microvolt = <3312000>;
586			regulator-max-microvolt = <3312000>;
587		};
588
589		vreg_l24a_3p075: l24 {
590			regulator-min-microvolt = <3088000>;
591			regulator-max-microvolt = <3088000>;
592		};
593
594		vreg_l25a_3p3: l25 {
595			regulator-min-microvolt = <3104000>;
596			regulator-max-microvolt = <3312000>;
597		};
598
599		vreg_l26a_1p2: l26 {
600			regulator-min-microvolt = <1200000>;
601			regulator-max-microvolt = <1200000>;
602			regulator-allow-set-load;
603		};
604
605		vreg_l28_3p0: l28 {
606			regulator-min-microvolt = <3000000>;
607			regulator-max-microvolt = <3000000>;
608		};
609
610		vreg_lvs1a_1p8: lvs1 { };
611
612		vreg_lvs2a_1p8: lvs2 { };
613	};
614
615	regulators-1 {
616		compatible = "qcom,rpm-pmi8998-regulators";
617
618		vdd_bob-supply = <&vph_pwr>;
619
620		vreg_bob: bob {
621			regulator-min-microvolt = <3312000>;
622			regulator-max-microvolt = <3600000>;
623		};
624	};
625};
626
627&sdhc2 {
628	status = "okay";
629	cd-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>;
630
631	vmmc-supply = <&vreg_l21a_2p95>;
632	vqmmc-supply = <&vreg_l13a_2p95>;
633
634	pinctrl-names = "default", "sleep";
635	pinctrl-0 = <&sdc2_on &sdc2_cd>;
636	pinctrl-1 = <&sdc2_off &sdc2_cd>;
637};
638
639&tlmm {
640	gpio-reserved-ranges = <0 4>, <81 4>;
641	gpio-line-names = "", /* GPIO_0 */
642			  "",
643			  "",
644			  "",
645			  "DEBUG_UART_TX",
646			  "DEBUG_UART_RX",
647			  "CAMSENSOR_I2C_SDA",
648			  "CAMSENSOR_I2C_SCL",
649			  "NC",
650			  "NC",
651			  "MDP_VSYNC_P", /* GPIO_10 */
652			  "RGBC_IR_INT",
653			  "NFC_VEN",
654			  "CAM_MCLK0",
655			  "CAM_MCLK1",
656			  "NC",
657			  "NC",
658			  "CCI_I2C_SDA0",
659			  "CCI_I2C_SCL0",
660			  "CCI_I2C_SDA1",
661			  "CCI_I2C_SCL1", /* GPIO_20 */
662			  "MAIN_CAM_PWR_EN",
663			  "TOF_INT_N",
664			  "NC",
665			  "NC",
666			  "CHAT_CAM_PWR_EN",
667			  "NC",
668			  "TOF_RESET_N",
669			  "CAM2_RSTN",
670			  "NC",
671			  "CAM1_RSTN", /* GPIO_30 */
672			  "NC",
673			  "NC",
674			  "NC",
675			  "NC",
676			  "NC",
677			  "NC",
678			  "NC",
679			  "CC_DIR",
680			  "UIM2_DETECT_EN",
681			  "FP_RESET_N", /* GPIO_40 */
682			  "NC",
683			  "NC",
684			  "NC",
685			  "NC",
686			  "BT_HCI_UART_TXD",
687			  "BT_HCI_UART_RXD",
688			  "BT_HCI_UART_CTS_N",
689			  "BT_HCI_UART_RFR_N",
690			  "NC",
691			  "NC", /* GPIO_50 */
692			  "NC",
693			  "NC",
694			  "CODEC_INT2_N",
695			  "CODEC_INT1_N",
696			  "APPS_I2C_SDA",
697			  "APPS_I2C_SCL",
698			  "FORCED_USB_BOOT",
699			  "NC",
700			  "NC",
701			  "NC", /* GPIO_60 */
702			  "NC",
703			  "NC",
704			  "TRAY2_DET_DS",
705			  "CODEC_RST_N",
706			  "WSA_L_EN",
707			  "WSA_R_EN",
708			  "NC",
709			  "NC",
710			  "NC",
711			  "LPASS_SLIMBUS_CLK", /* GPIO_70 */
712			  "LPASS_SLIMBUS_DATA0",
713			  "LPASS_SLIMBUS_DATA1",
714			  "BT_FM_SLIMBUS_DATA",
715			  "BT_FM_SLIMBUS_CLK",
716			  "NC",
717			  "RF_LCD_ID_EN",
718			  "NC",
719			  "NC",
720			  "NC",
721			  "NC", /* GPIO_80 */
722			  "SW_SERVICE",
723			  "TX_GTR_THRES_IN",
724			  "HW_ID0",
725			  "HW_ID1",
726			  "NC",
727			  "NC",
728			  "TS_I2C_SDA",
729			  "TS_I2C_SCL",
730			  "TS_RESET_N",
731			  "NC", /* GPIO_90 */
732			  "NC",
733			  "NFC_IRQ",
734			  "NFC_DWLD_EN",
735			  "DISP_RESET_N",
736			  "TRAY2_DET",
737			  "CAM_SOF",
738			  "RFFE6_CLK",
739			  "RFFE6_DATA",
740			  "DEBUG_GPIO0",
741			  "DEBUG_GPIO1", /* GPIO_100 */
742			  "GRFC4",
743			  "NC",
744			  "NC",
745			  "RSVD",
746			  "UIM2_DATA",
747			  "UIM2_CLK",
748			  "UIM2_RESET",
749			  "UIM2_PRESENT",
750			  "UIM1_DATA",
751			  "UIM1_CLK", /* GPIO_110 */
752			  "UIM1_RST",
753			  "UIM1_PRESENT",
754			  "UIM_BATT_ALARM",
755			  "RSVD",
756			  "NC",
757			  "NC",
758			  "ACCEL_INT",
759			  "GYRO_INT",
760			  "COMPASS_INT",
761			  "ALS_PROX_INT_N", /* GPIO_120 */
762			  "FP_INT_N",
763			  "NC",
764			  "BAROMETER_INT",
765			  "ACC_COVER_OPEN",
766			  "TS_INT_N",
767			  "NC",
768			  "NC",
769			  "USB_DETECT_EN",
770			  "NC",
771			  "QLINK_REQUEST", /* GPIO_130 */
772			  "QLINK_ENABLE",
773			  "NC",
774			  "NC",
775			  "WMSS_RESET_N",
776			  "PA_INDICATOR_OR",
777			  "NC",
778			  "RFFE3_DATA",
779			  "RFFE3_CLK",
780			  "RFFE4_DATA",
781			  "RFFE4_CLK", /* GPIO_140 */
782			  "RFFE5_DATA",
783			  "RFFE5_CLK",
784			  "GNSS_EN",
785			  "MSS_LTE_COXM_TXD",
786			  "MSS_LTE_COXM_RXD",
787			  "RFFE2_DATA",
788			  "RFFE2_CLK",
789			  "RFFE1_DATA",
790			  "RFFE1_CLK";
791
792	mdp_vsync_p: mdp-vsync-p-state {
793		pins = "gpio10";
794		function = "mdp_vsync_a";
795		drive-strength = <2>;
796		bias-pull-down;
797	};
798
799	nfc_ven: nfc-ven-state {
800		pins = "gpio12";
801		function = "gpio";
802		bias-disable;
803		drive-strength = <2>;
804		output-low;
805	};
806
807	cam_mclk0_active: cam-mclk0-active-state {
808		pins = "gpio13";
809		function = "cam_mclk";
810		drive-strength = <2>;
811		bias-disable;
812	};
813
814	cam_mclk1_active: cam-mclk1-active-state {
815		pins = "gpio14";
816		function = "cam_mclk";
817		drive-strength = <2>;
818		bias-disable;
819	};
820
821	cci0_default: cci0-default-state {
822		pins = "gpio18", "gpio19";
823		function = "cci_i2c";
824		bias-disable;
825		drive-strength = <2>;
826	};
827
828	cci1_default: cci1-default-state {
829		pins = "gpio19", "gpio20";
830		function = "cci_i2c";
831		bias-disable;
832		drive-strength = <2>;
833	};
834
835	main_cam_pwr_en: main-cam-pwr-en-default-state {
836		pins = "gpio21";
837		function = "gpio";
838		bias-disable;
839		drive-strength = <2>;
840	};
841
842	tof_int_n: tof-int-n-state {
843		pins = "gpio22";
844		function = "gpio";
845		bias-pull-up;
846		drive-strength = <2>;
847	};
848
849	chat_cam_pwr_en: chat-cam-pwr-en-default-state {
850		pins = "gpio25";
851		function = "gpio";
852		bias-disable;
853		drive-strength = <2>;
854	};
855
856	tof_reset: tof-reset-state {
857		pins = "gpio27";
858		function = "gpio";
859		bias-disable;
860		drive-strength = <2>;
861	};
862
863	cc_dir_default: cc-dir-active-state {
864		pins = "gpio38";
865		function = "gpio";
866		bias-disable;
867		drive-strength = <16>;
868	};
869
870	acc_cover_open: acc-cover-open-state {
871		pins = "gpio124";
872		function = "gpio";
873		bias-disable;
874		drive-strength = <2>;
875	};
876
877	ts_int_n: ts-int-n-state {
878		pins = "gpio125";
879		function = "gpio";
880		drive-strength = <8>;
881		bias-pull-up;
882	};
883
884	usb_detect_en: usb-detect-en-active-state {
885		pins = "gpio128";
886		function = "gpio";
887		bias-disable;
888		drive-strength = <2>;
889		output-low;
890	};
891
892	ts_vddio_en: ts-vddio-en-default-state {
893		pins = "gpio133";
894		function = "gpio";
895		bias-disable;
896		drive-strength = <2>;
897		output-low;
898	};
899};
900
901/*
902 * WARNING:
903 * Disable UFS until card quirks are in to avoid unrecoverable hard-brick
904 * that would happen as soon as the UFS card gets probed as, without the
905 * required quirks, the bootloader will be erased right after card probe.
906 */
907&ufshc {
908	status = "disabled";
909};
910
911&ufsphy {
912	status = "disabled";
913};
914
915&usb3 {
916	status = "okay";
917};
918
919&usb3_dwc3 {
920	/* Force to peripheral until we have Type-C hooked up */
921	dr_mode = "peripheral";
922	extcon = <&extcon_usb>;
923};
924
925&usb3phy {
926	status = "okay";
927
928	vdda-phy-supply = <&vreg_l1a_0p875>;
929	vdda-pll-supply = <&vreg_l2a_1p2>;
930};
931