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