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 "msm8996.dtsi"
9#include "pm8994.dtsi"
10#include "pmi8994.dtsi"
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
14#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
15
16/delete-node/ &slpi_region;
17/delete-node/ &venus_region;
18/delete-node/ &zap_shader_region;
19
20/ {
21	qcom,msm-id = <246 0x30001>; /* MSM8996 V3.1 (Final) */
22	qcom,pmic-id = <0x20009 0x2000a 0 0>; /* PM8994 + PMI8994 */
23	qcom,board-id = <8 0>;
24
25	chosen {
26		/*
27		 * Due to an unknown-for-a-few-years regression,
28		 * SDHCI only works on MSM8996 in PIO (lame) mode.
29		 */
30		bootargs = "sdhci.debug_quirks=0x40 sdhci.debug_quirks2=0x4 maxcpus=2";
31	};
32
33	reserved-memory {
34		ramoops@a7f00000 {
35			compatible = "ramoops";
36			reg = <0 0xa7f00000 0 0x100000>;
37			record-size = <0x20000>;
38			console-size = <0x40000>;
39			ftrace-size = <0x20000>;
40			pmsg-size = <0x20000>;
41			ecc-size = <16>;
42		};
43
44		cont_splash_mem: memory@83401000 {
45			reg = <0 0x83401000 0 0x23ff000>;
46			no-map;
47		};
48
49		zap_shader_region: gpu@90400000 {
50			compatible = "shared-dma-pool";
51			reg = <0x0 0x90400000 0x0 0x2000>;
52			no-map;
53		};
54
55		slpi_region: memory@90500000 {
56			reg = <0 0x90500000 0 0xa00000>;
57			no-map;
58		};
59
60		venus_region: memory@90f00000 {
61			reg = <0 0x90f00000 0 0x500000>;
62			no-map;
63		};
64	};
65
66	panel_tvdd: tvdd-regulator {
67		compatible = "regulator-fixed";
68		regulator-name = "panel_tvdd";
69		gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
70		pinctrl-0 = <&tp_vddio_en>;
71		pinctrl-names = "default";
72	};
73
74	usb3_id: usb3-id {
75		compatible = "linux,extcon-usb-gpio";
76		id-gpio = <&tlmm 25 GPIO_ACTIVE_LOW>;
77		pinctrl-names = "default";
78		pinctrl-0 = <&usb_detect>;
79	};
80
81	vph_pwr: vph-pwr-regulator {
82		compatible = "regulator-fixed";
83		regulator-min-microvolt = <3700000>;
84		regulator-max-microvolt = <3700000>;
85		regulator-name = "vph_pwr";
86		regulator-always-on;
87		regulator-boot-on;
88	};
89
90	wlan_en: wlan-en-1-8v {
91		compatible = "regulator-fixed";
92		regulator-name = "wlan-en-regulator";
93		regulator-min-microvolt = <1800000>;
94		regulator-max-microvolt = <1800000>;
95		gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
96		pinctrl-names = "default";
97		pinctrl-0 = <&wl_reg_on>;
98
99		/* WLAN card specific delay */
100		startup-delay-us = <70000>;
101		enable-active-high;
102	};
103};
104
105&blsp1_i2c3 {
106	status = "okay";
107	clock-frequency = <355000>;
108
109	tof_sensor: vl53l0x@29 {
110		compatible = "st,vl53l0x";
111		reg = <0x29>;
112	};
113};
114
115&blsp1_uart2 {
116	status = "okay";
117};
118
119&blsp2_i2c5 {
120	status = "okay";
121	clock-frequency = <355000>;
122
123	/* FUSB301 USB-C controller */
124};
125
126&blsp2_i2c6 {
127	status = "okay";
128	clock-frequency = <355000>;
129
130	synaptics@2c {
131		compatible = "syna,rmi4-i2c";
132		reg = <0x2c>;
133		interrupt-parent = <&tlmm>;
134		interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
135		vdd-supply = <&panel_tvdd>;
136
137		syna,reset-delay-ms = <220>;
138		syna,startup-delay-ms = <220>;
139		#address-cells = <1>;
140		#size-cells = <0>;
141
142		rmi4-f01@1 {
143			reg = <0x1>;
144			syna,nosleep-mode = <1>;
145		};
146
147		rmi4-f11@11 {
148			reg = <0x11>;
149			syna,sensor-type = <1>;
150		};
151	};
152};
153
154&blsp2_uart2 {
155	status = "okay";
156};
157
158&camera0_mclk {
159	drive-strength = <2>;
160	output-low;
161};
162
163&camera0_pwdn {
164	drive-strength = <2>;
165	output-low;
166};
167
168&camera0_rst {
169	pins = "gpio30";
170	drive-strength = <2>;
171	output-low;
172};
173
174&camera2_mclk {
175	drive-strength = <2>;
176	output-low;
177};
178
179&camera2_rst {
180	drive-strength = <2>;
181	output-low;
182};
183
184&hsusb_phy1 {
185	status = "okay";
186
187	vdda-pll-supply = <&pm8994_l12>;
188	vdda-phy-dpdm-supply = <&pm8994_l24>;
189};
190
191&mmcc {
192	vdd-gfx-supply = <&vdd_gfx>;
193};
194
195&pcie0 {
196	status = "okay";
197	perst-gpio = <&tlmm 35 GPIO_ACTIVE_LOW>;
198	wake-gpio = <&tlmm 37 GPIO_ACTIVE_HIGH>;
199	vddpe-3v3-supply = <&wlan_en>;
200	vdda-supply = <&pm8994_l28>;
201};
202
203&pcie_phy {
204	status = "okay";
205
206	vdda-phy-supply = <&pm8994_l28>;
207	vdda-pll-supply = <&pm8994_l12>;
208};
209
210&pm8994_gpios {
211	pinctrl-names = "default";
212	pinctrl-0 = <&pm8994_gpios_defaults>;
213	gpio-line-names =
214		"NC",
215		"VOL_DOWN_N",
216		"VOL_UP_N",
217		"SNAPSHOT_N",
218		"FOCUS_N",
219		"NC",
220		"NFC_VEN",
221		"NC",
222		"NC",
223		"NC",
224		"NC",
225		"NC",
226		"EAR_EN",
227		"NC",
228		"PM_DIVCLK1",
229		"PMI_CLK",
230		"NC",
231		"WL_SLEEP_CLK",
232		"NC",
233		"PMIC_SPON",
234		"UIM_BATT_ALARM",
235		"PMK_SLEEP_CLK";
236
237	/*
238	 * We don't yet know for sure which GPIOs are of our interest, but what
239	 * we do know is that if a vendor sets the pins to a non-default state, there's
240	 * probably a reason for it, and just to be on the safe side, we follow suit.
241	 */
242	pm8994_gpios_defaults: pm8994-gpios-default-state {
243		pm8994-gpio1-nc {
244			pins = "gpio1";
245			function = PMIC_GPIO_FUNC_NORMAL;
246			drive-push-pull;
247			bias-high-impedance;
248		};
249
250		vol-down-n {
251			pins = "gpio2";
252			function = PMIC_GPIO_FUNC_NORMAL;
253			drive-push-pull;
254			input-enable;
255			bias-pull-up;
256			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
257			power-source = <PM8994_GPIO_S4>;
258		};
259
260		vol-up-n {
261			pins = "gpio3";
262			function = PMIC_GPIO_FUNC_NORMAL;
263			drive-push-pull;
264			input-enable;
265			bias-pull-up;
266			power-source = <PM8994_GPIO_S4>;
267		};
268
269		camera-snapshot-n {
270			pins = "gpio4";
271			function = PMIC_GPIO_FUNC_NORMAL;
272			drive-push-pull;
273			input-enable;
274			bias-pull-up;
275			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
276			power-source = <PM8994_GPIO_S4>;
277		};
278
279		camera-focus-n {
280			pins = "gpio5";
281			function = PMIC_GPIO_FUNC_NORMAL;
282			drive-push-pull;
283			input-enable;
284			bias-pull-up;
285			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
286			power-source = <PM8994_GPIO_S4>;
287		};
288
289		pm8994-gpio6-nc {
290			pins = "gpio6";
291			function = PMIC_GPIO_FUNC_NORMAL;
292			drive-push-pull;
293			bias-high-impedance;
294			power-source = <PM8994_GPIO_VPH>;
295		};
296
297		nfc-download {
298			pins = "gpio7";
299			function = PMIC_GPIO_FUNC_NORMAL;
300			output-low;
301			drive-push-pull;
302			bias-disable;
303			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
304			power-source = <PM8994_GPIO_S4>;
305		};
306
307		pm8994-gpio8-nc {
308			pins = "gpio8";
309			function = PMIC_GPIO_FUNC_NORMAL;
310			output-low;
311			drive-push-pull;
312			bias-high-impedance;
313			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
314			power-source = <PM8994_GPIO_VPH>;
315		};
316
317		pm8994-gpio9-nc {
318			pins = "gpio9";
319			function = PMIC_GPIO_FUNC_NORMAL;
320			output-high;
321			drive-push-pull;
322			bias-high-impedance;
323			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
324			power-source = <PM8994_GPIO_VPH>;
325		};
326
327		nfc-clock {
328			pins = "gpio10";
329			function = PMIC_GPIO_FUNC_NORMAL;
330			input-enable;
331			drive-push-pull;
332			bias-pull-down;
333			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
334			power-source = <PM8994_GPIO_S4>;
335		};
336
337		pm8994-gpio11-nc {
338			pins = "gpio11";
339			function = PMIC_GPIO_FUNC_NORMAL;
340			drive-push-pull;
341			bias-high-impedance;
342			power-source = <PM8994_GPIO_VPH>;
343		};
344
345		pm8994-gpio12-nc {
346			pins = "gpio12";
347			function = PMIC_GPIO_FUNC_NORMAL;
348			drive-push-pull;
349			bias-high-impedance;
350			power-source = <PM8994_GPIO_VPH>;
351		};
352
353		ear-enable {
354			pins = "gpio13";
355			function = PMIC_GPIO_FUNC_NORMAL;
356			output-high;
357			drive-push-pull;
358			bias-disable;
359			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
360			power-source = <PM8994_GPIO_S4>;
361		};
362
363		pm8994-gpio14-nc {
364			pins = "gpio14";
365			function = PMIC_GPIO_FUNC_NORMAL;
366			drive-push-pull;
367			input-enable;
368			bias-high-impedance;
369			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
370			power-source = <PM8994_GPIO_VPH>;
371		};
372
373		pm-divclk1-gpio {
374			pins = "gpio15";
375			function = "func1";
376			output-high;
377			drive-push-pull;
378			bias-high-impedance;
379			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
380			power-source = <PM8994_GPIO_VPH>;
381		};
382
383		pmi-clk-gpio {
384			pins = "gpio16";
385			function = PMIC_GPIO_FUNC_NORMAL;
386			drive-push-pull;
387		};
388
389		pm8994-gpio17-nc {
390			pins = "gpio17";
391			function = PMIC_GPIO_FUNC_NORMAL;
392			drive-push-pull;
393			bias-high-impedance;
394			power-source = <PM8994_GPIO_VPH>;
395		};
396
397		rome-sleep {
398			pins = "gpio18";
399			function = PMIC_GPIO_FUNC_FUNC2;
400			output-low;
401			drive-push-pull;
402			bias-disable;
403			qcom,drive-strength = <PMIC_GPIO_STRENGTH_MED>;
404			power-source = <PM8994_GPIO_S4>;
405		};
406
407		pm8994-gpio19-nc {
408			pins = "gpio19";
409			function = PMIC_GPIO_FUNC_NORMAL;
410			output-low;
411			drive-push-pull;
412			bias-high-impedance;
413			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
414			power-source = <PM8994_GPIO_VPH>;
415		};
416
417		pm8994-gpio22-nc {
418			pins = "gpio22";
419			function = PMIC_GPIO_FUNC_NORMAL;
420			drive-push-pull;
421			bias-high-impedance;
422			power-source = <PM8994_GPIO_VPH>;
423		};
424	};
425};
426
427&pm8994_mpps {
428	pinctrl-names = "default";
429	pinctrl-0 = <&pm8994_mpps_defaults>;
430
431	gpio-line-names =
432		"SDC_UIM_VBIAS",
433		"LCD_ID_ADC",
434		"VREF_DACX",
435		"NC",
436		"FLASH_THERM",
437		"NC",
438		"NC",
439		"RF_ID";
440
441	pm8994_mpps_defaults: pm8994-mpps-default-state {
442		lcd-id_adc-mpp {
443			pins = "mpp2";
444			function = "analog";
445			input-enable;
446			qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH6>;
447		};
448
449		pm-mpp4-nc {
450			pins = "mpp4";
451			function = "digital";
452			bias-high-impedance;
453			power-source = <PM8994_GPIO_VPH>;
454		};
455
456		flash-therm-mpp {
457			pins = "mpp5";
458			function = "analog";
459			input-enable;
460			qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH5>;
461		};
462
463		mpp6-nc {
464			pins = "mpp6";
465			function = "digital";
466			bias-high-impedance;
467		};
468
469		rf-id-mpp {
470			pins = "mpp8";
471			function = "analog";
472			input-enable;
473			qcom,amux-route = <PMIC_MPP_AMUX_ROUTE_CH8>;
474		};
475	};
476};
477
478&pm8994_resin {
479	status = "okay";
480	linux,code = <KEY_VOLUMEUP>;
481};
482
483&pmi8994_gpios {
484	pinctrl-names = "default";
485	pinctrl-0 = <&pmi8994_gpios_defaults>;
486
487	gpio-line-names =
488		"VIB_LDO_EN",
489		"NC",
490		"NC",
491		"NC",
492		"NC",
493		"NC",
494		"NC",
495		"NC",
496		"USB_SWITCH_SEL",
497		"NC";
498
499	pmi8994_gpios_defaults: pmi8994-gpios-default-state {
500		vib-ldo-en-gpio {
501			pins = "gpio1";
502			function = PMIC_GPIO_FUNC_NORMAL;
503			drive-push-pull;
504			output-low;
505			bias-disable;
506			power-source = <PM8994_GPIO_S4>;
507		};
508
509		pmi-gpio2-nc {
510			pins = "gpio2";
511			function = PMIC_GPIO_FUNC_NORMAL;
512			drive-push-pull;
513			input-enable;
514			bias-high-impedance;
515			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
516			power-source = <PM8994_GPIO_VPH>;
517		};
518
519		pmi-gpio3-nc {
520			pins = "gpio3";
521			function = PMIC_GPIO_FUNC_NORMAL;
522			drive-push-pull;
523			input-enable;
524			bias-high-impedance;
525			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
526			power-source = <PM8994_GPIO_VPH>;
527		};
528
529		pmi-gpio4-nc {
530			pins = "gpio4";
531			function = PMIC_GPIO_FUNC_NORMAL;
532			drive-push-pull;
533			output-high;
534			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
535			power-source = <PM8994_GPIO_S4>;
536		};
537
538		pmi-gpio5-nc {
539			pins = "gpio5";
540			function = PMIC_GPIO_FUNC_NORMAL;
541			drive-push-pull;
542			output-high;
543			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
544			power-source = <PM8994_GPIO_S4>;
545		};
546
547		pmi-gpio6-nc {
548			pins = "gpio6";
549			function = PMIC_GPIO_FUNC_NORMAL;
550			drive-push-pull;
551			output-high;
552			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
553			power-source = <PM8994_GPIO_S4>;
554		};
555
556		pmi-gpio7-nc {
557			pins = "gpio7";
558			function = PMIC_GPIO_FUNC_NORMAL;
559			drive-push-pull;
560			output-high;
561			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
562			power-source = <PM8994_GPIO_S4>;
563		};
564
565		pmi-gpio8-nc {
566			pins = "gpio8";
567			function = PMIC_GPIO_FUNC_NORMAL;
568			drive-push-pull;
569			output-high;
570			qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
571			power-source = <PM8994_GPIO_S4>;
572		};
573
574		usb-switch-sel {
575			pins = "gpio9";
576			function = PMIC_GPIO_FUNC_NORMAL;
577			drive-push-pull;
578		};
579
580		pmi-gpio10-nc {
581			pins = "gpio10";
582			function = PMIC_GPIO_FUNC_NORMAL;
583			output-low;
584			drive-push-pull;
585			bias-disable;
586			qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
587			power-source = <PM8994_GPIO_S4>;
588		};
589	};
590};
591
592&pmi8994_spmi_regulators {
593	qcom,saw-reg = <&saw3>;
594
595	vdd_gfx:
596	pmi8994_s2: s2 {
597		/* Pinned to a high value for now to avoid random crashes. */
598		regulator-min-microvolt = <1015000>;
599		regulator-max-microvolt = <1015000>;
600		regulator-name = "vdd_gfx";
601		regulator-always-on;
602	};
603
604	pmi8994_s9: s9 {
605		qcom,saw-slave;
606	};
607
608	pmi8994_s10: s10 {
609		qcom,saw-slave;
610	};
611
612	pmi8994_s11: s11 {
613		qcom,saw-leader;
614		regulator-always-on;
615		regulator-min-microvolt = <470000>;
616		regulator-max-microvolt = <1140000>;
617	};
618};
619
620&pmi8994_wled {
621	status = "okay";
622	default-brightness = <512>;
623};
624
625&rpm_requests {
626	pm8994-regulators {
627		compatible = "qcom,rpm-pm8994-regulators";
628
629		vdd_s1-supply = <&vph_pwr>;
630		vdd_s2-supply = <&vph_pwr>;
631		vdd_s3-supply = <&vph_pwr>;
632		vdd_s4-supply = <&vph_pwr>;
633		vdd_s5-supply = <&vph_pwr>;
634		vdd_s6-supply = <&vph_pwr>;
635		vdd_s7-supply = <&vph_pwr>;
636		vdd_s8-supply = <&vph_pwr>;
637		vdd_s9-supply = <&vph_pwr>;
638		vdd_s10-supply = <&vph_pwr>;
639		vdd_s11-supply = <&vph_pwr>;
640		vdd_s12-supply = <&vph_pwr>;
641		vdd_l1-supply = <&pm8994_s3>;
642		vdd_l2_l26_l28-supply = <&pm8994_s3>;
643		vdd_l3_l11-supply = <&pm8994_s3>;
644		vdd_l4_l27_l31-supply = <&pm8994_s3>;
645		vdd_l5_l7-supply = <&pm8994_s5>;
646		vdd_l6_l12_l32-supply = <&pm8994_s5>;
647		vdd_l8_l16_l30-supply = <&vph_pwr>;
648		vdd_l14_l15-supply = <&pm8994_s5>;
649		vdd_l20_l21-supply = <&pm8994_s5>;
650		vdd_l25-supply = <&pm8994_s3>;
651		vdd_lvs1_2-supply = <&pm8994_s4>;
652
653		pm8994_s3: s3 {
654			regulator-min-microvolt = <1300000>;
655			regulator-max-microvolt = <1300000>;
656		};
657
658		pm8994_s4: s4 {
659			regulator-min-microvolt = <1800000>;
660			regulator-max-microvolt = <1800000>;
661			regulator-system-load = <325000>;
662			regulator-always-on;
663		};
664
665		pm8994_s5: s5 {
666			regulator-min-microvolt = <2150000>;
667			regulator-max-microvolt = <2150000>;
668		};
669
670		pm8994_s7: s7 {
671			regulator-min-microvolt = <800000>;
672			regulator-max-microvolt = <800000>;
673		};
674
675		pm8994_l1: l1 {
676			regulator-min-microvolt = <1000000>;
677			regulator-max-microvolt = <1000000>;
678		};
679
680		pm8994_l2: l2 {
681			regulator-min-microvolt = <1250000>;
682			regulator-max-microvolt = <1250000>;
683		};
684
685		pm8994_l3: l3 {
686			regulator-min-microvolt = <1100000>;
687			regulator-max-microvolt = <1100000>;
688		};
689
690		pm8994_l4: l4 {
691			regulator-min-microvolt = <1225000>;
692			regulator-max-microvolt = <1225000>;
693		};
694
695		/* L6 and L7 seem unused. */
696
697		pm8994_l8: l8 {
698			regulator-min-microvolt = <1800000>;
699			regulator-max-microvolt = <1800000>;
700		};
701
702		pm8994_l9: l9 {
703			regulator-min-microvolt = <1800000>;
704			regulator-max-microvolt = <1800000>;
705		};
706
707		pm8994_l10: l10 {
708			regulator-min-microvolt = <1800000>;
709			regulator-max-microvolt = <1800000>;
710		};
711
712		pm8994_l11: l11 {
713			regulator-min-microvolt = <1100000>;
714			regulator-max-microvolt = <1100000>;
715		};
716
717		pm8994_l12: l12 {
718			regulator-min-microvolt = <1800000>;
719			regulator-max-microvolt = <1800000>;
720			regulator-allow-set-load;
721		};
722
723		pm8994_l13: l13 {
724			regulator-min-microvolt = <1800000>;
725			regulator-max-microvolt = <2950000>;
726			regulator-system-load = <22000>;
727			regulator-allow-set-load;
728		};
729
730		pm8994_l14: l14 {
731			regulator-min-microvolt = <1700000>;
732			regulator-max-microvolt = <1900000>;
733		};
734
735		pm8994_l15: l15 {
736			regulator-min-microvolt = <1800000>;
737			regulator-max-microvolt = <1800000>;
738		};
739
740		pm8994_l16: l16 {
741			regulator-min-microvolt = <2700000>;
742			regulator-max-microvolt = <2700000>;
743		};
744
745		pm8994_l17: l17 {
746			regulator-min-microvolt = <2200000>;
747			regulator-max-microvolt = <2500000>;
748		};
749
750		pm8994_l18: l18 {
751			regulator-min-microvolt = <1800000>;
752			regulator-max-microvolt = <1800000>;
753		};
754
755		pm8994_l19: l19 {
756			regulator-min-microvolt = <3000000>;
757			regulator-max-microvolt = <3000000>;
758		};
759
760		pm8994_l20: l20 {
761			regulator-min-microvolt = <2950000>;
762			regulator-max-microvolt = <2950000>;
763			regulator-system-load = <570000>;
764			regulator-allow-set-load;
765		};
766
767		pm8994_l21: l21 {
768			regulator-min-microvolt = <2950000>;
769			regulator-max-microvolt = <2950000>;
770			regulator-system-load = <800000>;
771			regulator-allow-set-load;
772		};
773
774		pm8994_l22: l22 {
775			regulator-min-microvolt = <3000000>;
776			regulator-max-microvolt = <3000000>;
777		};
778
779		pm8994_l23: l23 {
780			regulator-min-microvolt = <2700000>;
781			regulator-max-microvolt = <2700000>;
782		};
783
784		pm8994_l24: l24 {
785			regulator-min-microvolt = <3075000>;
786			regulator-max-microvolt = <3075000>;
787			regulator-allow-set-load;
788		};
789
790		pm8994_l25: l25 {
791			regulator-min-microvolt = <1200000>;
792			regulator-max-microvolt = <1200000>;
793			regulator-allow-set-load;
794		};
795
796		pm8994_l27: l27 {
797			regulator-min-microvolt = <1000000>;
798			regulator-max-microvolt = <1200000>;
799		};
800
801		pm8994_l28: l28 {
802			regulator-min-microvolt = <925000>;
803			regulator-max-microvolt = <925000>;
804			regulator-allow-set-load;
805		};
806
807		pm8994_l29: l29 {
808			regulator-min-microvolt = <2700000>;
809			regulator-max-microvolt = <2700000>;
810		};
811
812		pm8994_l30: l30 { };
813
814		pm8994_l32: l32 {
815			regulator-min-microvolt = <1800000>;
816			regulator-max-microvolt = <1800000>;
817		};
818	};
819};
820
821&sdhc1 {
822	/* eMMC doesn't seem to cooperate even in PIO mode.. */
823	status = "disabled";
824
825	vmmc-supply = <&pm8994_l20>;
826	vqmmc-supply = <&pm8994_s4>;
827	mmc-hs400-1_8v;
828	mmc-hs200-1_8v;
829};
830
831&sdhc2 {
832	status = "okay";
833
834	cd-gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
835	vmmc-supply = <&pm8994_l21>;
836	vqmmc-supply = <&pm8994_l13>;
837};
838
839&tlmm {
840	gpio-reserved-ranges = <0 4>;
841	pinctrl-0 = <&sw_service_gpio>;
842	pinctrl-names = "default";
843
844	disp_reset_n_gpio: disp-reset-n {
845		pins = "gpio8";
846		function = "gpio";
847		drive-strength = <2>;
848		bias-disable;
849	};
850
851	mdp_vsync_p_gpio: mdp-vsync-p {
852		pins = "gpio10";
853		function = "mdp_vsync";
854		drive-strength = <2>;
855		bias-disable;
856	};
857
858	sw_service_gpio: sw-service-gpio {
859		pins = "gpio16";
860		function = "gpio";
861		drive-strength = <2>;
862		bias-pull-up;
863	};
864
865	usb_detect: usb-detect {
866		pins = "gpio25";
867		function = "gpio";
868		drive-strength = <2>;
869		bias-disable;
870		output-high;
871	};
872
873	uim_detect_en: uim-detect-en {
874		pins = "gpio29";
875		function = "gpio";
876		drive-strength = <2>;
877		bias-disable;
878		output-high;
879	};
880
881	tray_det_pin: tray-det {
882		pins = "gpio40";
883		function = "gpio";
884		drive-strength = <2>;
885		bias-disable;
886	};
887
888	tp_vddio_en: tp-vddio-en {
889		pins = "gpio50";
890		function = "gpio";
891		drive-strength = <2>;
892		bias-disable;
893		output-high;
894	};
895
896	lcd_vddio_en: lcd-vddio-en {
897		pins = "gpio51";
898		function = "gpio";
899		drive-strength = <2>;
900		bias-disable;
901		output-low;
902	};
903
904	wl_host_wake: wl-host-wake {
905		pins = "gpio79";
906		function = "gpio";
907		drive-strength = <2>;
908		bias-pull-down;
909		input-high;
910	};
911
912	wl_reg_on: wl-reg-on {
913		pins = "gpio84";
914		function = "gpio";
915		drive-strength = <2>;
916		bias-disable;
917		output-low;
918	};
919
920	ts_reset_n: ts-rst-n {
921		pins = "gpio89";
922		function = "gpio";
923		drive-strength = <2>;
924	};
925
926	touch_int_n: touch-int-n {
927		pins = "gpio125";
928		function = "gpio";
929		drive-strength = <2>;
930		bias-pull-up;
931	};
932
933	touch_int_sleep: touch-int-sleep {
934		pins = "gpio125";
935		function = "gpio";
936		drive-strength = <2>;
937		bias-pull-down;
938	};
939};
940
941/*
942 * For reasons that are currently unknown (but probably related to fusb301), USB takes about
943 * 6 minutes to wake up (nothing interesting in kernel logs), but then it works as it should.
944 */
945&usb3 {
946	status = "okay";
947	qcom,select-utmi-as-pipe-clk;
948};
949
950&usb3_dwc3 {
951	extcon = <&usb3_id>;
952	dr_mode = "peripheral";
953	phys = <&hsusb_phy1>;
954	phy-names = "usb2-phy";
955	snps,hird-threshold = /bits/ 8 <0>;
956};
957