xref: /openbmc/linux/arch/arm64/boot/dts/qcom/msm8998-fxtec-pro1.dts (revision 36a7b63f069630e854beb305e99c151cddd3b8e5)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, AngeloGioacchino Del Regno
4 *                     <angelogioacchino.delregno@somainline.org>
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
12#include "msm8998.dtsi"
13#include "pm8005.dtsi"
14#include "pm8998.dtsi"
15#include "pmi8998.dtsi"
16
17/ {
18	model = "F(x)tec Pro1 (QX1000)";
19	compatible = "fxtec,pro1", "qcom,msm8998";
20	chassis-type = "handset";
21	qcom,board-id = <0x02000b 0x10>;
22
23	aliases {
24		serial0 = &blsp2_uart1;
25		serial1 = &blsp1_uart3;
26	};
27
28	/*
29	 * Until we hook up type-c detection, we
30	 * have to stick with this. But it works.
31	 */
32	extcon_usb: extcon-usb {
33		compatible = "linux,extcon-usb-gpio";
34		id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
35	};
36
37	gpio-hall-sensors {
38		compatible = "gpio-keys";
39		label = "Hall sensors";
40		pinctrl-names = "default";
41		pinctrl-0 = <&hall_sensor1_default>;
42
43		hall-sensor1 {
44			label = "Keyboard Hall Sensor";
45			gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>;
46			debounce-interval = <15>;
47			gpio-key,wakeup;
48			linux,input-type = <EV_SW>;
49			linux,code = <SW_KEYPAD_SLIDE>;
50		};
51	};
52
53	gpio-kb-extra-keys {
54		compatible = "gpio-keys";
55		label = "Keyboard extra keys";
56		pinctrl-names = "default";
57		pinctrl-0 = <&gpio_kb_pins_extra>;
58
59		home {
60			label = "Home";
61			gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
62			linux,code = <KEY_HOMEPAGE>;
63			debounce-interval = <15>;
64			linux,can-disable;
65		};
66
67		super-l {
68			label = "Super Left";
69			gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
70			linux,code = <KEY_FN>;
71			debounce-interval = <15>;
72			linux,can-disable;
73		};
74
75		super-r {
76			label = "Super Right";
77			gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
78			linux,code = <KEY_FN>;
79			debounce-interval = <15>;
80			linux,can-disable;
81		};
82
83		shift {
84			label = "Shift";
85			gpios = <&tlmm 114 GPIO_ACTIVE_LOW>;
86			linux,code = <KEY_RIGHTSHIFT>;
87			debounce-interval = <15>;
88			linux,can-disable;
89		};
90
91		ctrl {
92			label = "Ctrl";
93			gpios = <&tlmm 128 GPIO_ACTIVE_LOW>;
94			linux,code = <KEY_LEFTCTRL>;
95			debounce-interval = <15>;
96			linux,can-disable;
97		};
98
99		alt {
100			label = "Alt";
101			gpios = <&tlmm 129 GPIO_ACTIVE_LOW>;
102			linux,code = <KEY_LEFTALT>;
103			debounce-interval = <15>;
104			linux,can-disable;
105		};
106	};
107
108	gpio-keys {
109		compatible = "gpio-keys";
110		label = "Side buttons";
111		#address-cells = <1>;
112		#size-cells = <0>;
113		pinctrl-names = "default";
114		pinctrl-0 = <&vol_up_pin_a>, <&cam_focus_pin_a>,
115			    <&cam_snapshot_pin_a>;
116		vol-up {
117			label = "Volume Up";
118			gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
119			linux,input-type = <EV_KEY>;
120			linux,code = <KEY_VOLUMEUP>;
121			gpio-key,wakeup;
122			debounce-interval = <15>;
123		};
124
125		camera-snapshot {
126			label = "Camera Snapshot";
127			gpios = <&pm8998_gpio 7 GPIO_ACTIVE_LOW>;
128			linux,input-type = <EV_KEY>;
129			linux,code = <KEY_CAMERA>;
130			debounce-interval = <15>;
131		};
132
133		camera-focus {
134			label = "Camera Focus";
135			gpios = <&pm8998_gpio 8 GPIO_ACTIVE_LOW>;
136			linux,input-type = <EV_KEY>;
137			linux,code = <KEY_CAMERA_FOCUS>;
138			debounce-interval = <15>;
139		};
140	};
141
142	keyboard-leds {
143		compatible = "gpio-leds";
144
145		backlight {
146			color = <LED_COLOR_ID_WHITE>;
147			default-state = "off";
148			function = LED_FUNCTION_KBD_BACKLIGHT;
149			gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
150			label = "white:kbd_backlight";
151			retain-state-suspended;
152		};
153
154		caps-lock {
155			color = <LED_COLOR_ID_YELLOW>;
156			default-state = "off";
157			function = LED_FUNCTION_CAPSLOCK;
158			gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
159			label = "yellow:capslock";
160			linux,default-trigger = "kbd-capslock";
161		};
162	};
163
164	reserved-memory {
165		cont_splash_mem: memory@9d400000 {
166			reg = <0x0 0x9d400000 0x0 0x2000000>;
167			no-map;
168		};
169
170		zap_shader_region: memory@f6400000 {
171			compatible = "shared-dma-pool";
172			reg = <0x0 0xf6400000 0x0 0x2000>;
173			no-map;
174		};
175
176		ramoops@ffc00000 {
177			compatible = "ramoops";
178			reg = <0x0 0xffc00000 0x0 0x100000>;
179			console-size = <0x60000>;
180			ecc-size = <16>;
181			ftrace-size = <0x10000>;
182			pmsg-size = <0x20000>;
183			record-size = <0x10000>;
184		};
185	};
186
187	ts_vio_vreg: ts-vio-vreg {
188		compatible = "regulator-fixed";
189		regulator-name = "ts_vio_reg";
190		startup-delay-us = <2>;
191		enable-active-high;
192		gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>;
193		pinctrl-names = "default";
194		pinctrl-0 = <&ts_vio_default>;
195		regulator-always-on;
196	};
197
198	vph_pwr: vph-pwr-regulator {
199		compatible = "regulator-fixed";
200		regulator-name = "vph_pwr";
201		regulator-always-on;
202		regulator-boot-on;
203	};
204};
205
206&blsp1_uart3 {
207	status = "okay";
208
209	bluetooth {
210		compatible = "qcom,wcn3990-bt";
211
212		vddio-supply = <&vreg_s4a_1p8>;
213		vddxo-supply = <&vreg_l7a_1p8>;
214		vddrf-supply = <&vreg_l17a_1p3>;
215		vddch0-supply = <&vreg_l25a_3p3>;
216		max-speed = <3200000>;
217	};
218};
219
220&blsp1_uart3_on {
221	rx {
222		/delete-property/ bias-disable;
223		/*
224		 * Configure a pull-up on 45 (RX). This is needed to
225		 * avoid garbage data when the TX pin of the Bluetooth
226		 * module is in tri-state (module powered off or not
227		 * driving the signal yet).
228		 */
229		bias-pull-up;
230	};
231
232	cts {
233		/delete-property/ bias-disable;
234		/*
235		 * Configure a pull-down on 47 (CTS) to match the pull
236		 * of the Bluetooth module.
237		 */
238		bias-pull-down;
239	};
240};
241
242&blsp2_uart1 {
243	status = "okay";
244};
245
246&blsp2_i2c1 {
247	status = "okay";
248
249	touchscreen@14 {
250		compatible = "goodix,gt9286";
251		reg = <0x14>;
252		interrupt-parent = <&tlmm>;
253		interrupts = <125 IRQ_TYPE_LEVEL_LOW>;
254		reset-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
255		AVDD28-supply = <&vreg_l28_3p0>;
256		VDDIO-supply = <&ts_vio_vreg>;
257		pinctrl-names = "active";
258		pinctrl-0 = <&ts_rst_n>, <&ts_int_n>;
259	};
260};
261
262&etf {
263	status = "okay";
264};
265
266&etm1 {
267	status = "okay";
268};
269
270&etm2 {
271	status = "okay";
272};
273
274&etm3 {
275	status = "okay";
276};
277
278&etm4 {
279	status = "okay";
280};
281
282&etm5 {
283	status = "okay";
284};
285
286&etm6 {
287	status = "okay";
288};
289
290&etm7 {
291	status = "okay";
292};
293
294&etm8 {
295	status = "okay";
296};
297
298&etr {
299	status = "okay";
300};
301
302&funnel1 {
303	status = "okay";
304};
305
306&funnel2 {
307	status = "okay";
308};
309
310&funnel3 {
311	status = "okay";
312};
313
314&funnel4 {
315	// FIXME: Figure out why clock late_initcall crashes the board with
316	// this enabled.
317	// status = "okay";
318};
319
320&funnel5 {
321	// FIXME: Figure out why clock late_initcall crashes the board with
322	// this enabled.
323	// status = "okay";
324};
325
326&pcie0 {
327	status = "okay";
328};
329
330&pcie_phy {
331	status = "okay";
332};
333
334&pm8005_regulators {
335	vdd_s1-supply = <&vph_pwr>;
336
337	pm8005_s1: s1 { /* VDD_GFX supply */
338		regulator-min-microvolt = <524000>;
339		regulator-max-microvolt = <1100000>;
340		regulator-enable-ramp-delay = <500>;
341
342		/* Hack until we rig up the gpu consumer */
343		regulator-always-on;
344	};
345};
346
347&pm8998_gpio {
348	vol_up_pin_a: vol-up-active-state {
349		pins = "gpio6";
350		function = "normal";
351		bias-pull-up;
352		input-enable;
353		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
354	};
355
356	cam_focus_pin_a: cam-focus-btn-active-state {
357		pins = "gpio7";
358		function = "normal";
359		bias-pull-up;
360		input-enable;
361		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
362	};
363
364	cam_snapshot_pin_a: cam-snapshot-btn-active-state {
365		pins = "gpio8";
366		function = "normal";
367		bias-pull-up;
368		input-enable;
369		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
370	};
371};
372
373&pm8998_pon {
374	resin {
375		compatible = "qcom,pm8941-resin";
376		interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>;
377		bias-pull-up;
378		debounce = <15625>;
379		linux,code = <KEY_VOLUMEDOWN>;
380	};
381};
382
383&qusb2phy {
384	status = "okay";
385
386	vdda-pll-supply = <&vreg_l12a_1p8>;
387	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
388};
389
390&replicator1 {
391	status = "okay";
392};
393
394&rpm_requests {
395	pm8998-regulators {
396		compatible = "qcom,rpm-pm8998-regulators";
397
398		vdd_s1-supply = <&vph_pwr>;
399		vdd_s2-supply = <&vph_pwr>;
400		vdd_s3-supply = <&vph_pwr>;
401		vdd_s4-supply = <&vph_pwr>;
402		vdd_s5-supply = <&vph_pwr>;
403		vdd_s6-supply = <&vph_pwr>;
404		vdd_s7-supply = <&vph_pwr>;
405		vdd_s8-supply = <&vph_pwr>;
406		vdd_s9-supply = <&vph_pwr>;
407		vdd_s10-supply = <&vph_pwr>;
408		vdd_s11-supply = <&vph_pwr>;
409		vdd_s12-supply = <&vph_pwr>;
410		vdd_s13-supply = <&vph_pwr>;
411		vdd_l1_l27-supply = <&vreg_s7a_1p025>;
412		vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
413		vdd_l3_l11-supply = <&vreg_s7a_1p025>;
414		vdd_l4_l5-supply = <&vreg_s7a_1p025>;
415		vdd_l6-supply = <&vreg_s5a_2p04>;
416		vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
417		vdd_l9-supply = <&vreg_bob>;
418		vdd_l10_l23_l25-supply = <&vreg_bob>;
419		vdd_l13_l19_l21-supply = <&vreg_bob>;
420		vdd_l16_l28-supply = <&vreg_bob>;
421		vdd_l18_l22-supply = <&vreg_bob>;
422		vdd_l20_l24-supply = <&vreg_bob>;
423		vdd_l26-supply = <&vreg_s3a_1p35>;
424		vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
425
426		vreg_s3a_1p35: s3 {
427			regulator-min-microvolt = <1352000>;
428			regulator-max-microvolt = <1352000>;
429		};
430
431		vreg_s4a_1p8: s4 {
432			regulator-min-microvolt = <1800000>;
433			regulator-max-microvolt = <1800000>;
434			regulator-allow-set-load;
435		};
436
437		vreg_s5a_2p04: s5 {
438			regulator-min-microvolt = <1904000>;
439			regulator-max-microvolt = <2040000>;
440		};
441
442		vreg_s7a_1p025: s7 {
443			regulator-min-microvolt = <900000>;
444			regulator-max-microvolt = <1028000>;
445		};
446
447		vreg_l1a_0p875: l1 {
448			regulator-min-microvolt = <880000>;
449			regulator-max-microvolt = <880000>;
450		};
451
452		vreg_l2a_1p2: l2 {
453			regulator-min-microvolt = <1200000>;
454			regulator-max-microvolt = <1200000>;
455		};
456
457		vreg_l3a_1p0: l3 {
458			regulator-min-microvolt = <1000000>;
459			regulator-max-microvolt = <1000000>;
460		};
461
462		vreg_l5a_0p8: l5 {
463			regulator-min-microvolt = <800000>;
464			regulator-max-microvolt = <800000>;
465		};
466
467		vreg_l6a_1p8: l6 {
468			regulator-min-microvolt = <1808000>;
469			regulator-max-microvolt = <1808000>;
470		};
471
472		vreg_l7a_1p8: l7 {
473			regulator-min-microvolt = <1800000>;
474			regulator-max-microvolt = <1800000>;
475		};
476
477		vreg_l8a_1p2: l8 {
478			regulator-min-microvolt = <1200000>;
479			regulator-max-microvolt = <1200000>;
480		};
481
482		vreg_l9a_1p8: l9 {
483			regulator-min-microvolt = <1808000>;
484			regulator-max-microvolt = <2960000>;
485		};
486
487		vreg_l10a_1p8: l10 {
488			regulator-min-microvolt = <1808000>;
489			regulator-max-microvolt = <2960000>;
490		};
491
492		vreg_l11a_1p0: l11 {
493			regulator-min-microvolt = <1000000>;
494			regulator-max-microvolt = <1000000>;
495		};
496
497		vreg_l12a_1p8: l12 {
498			regulator-min-microvolt = <1800000>;
499			regulator-max-microvolt = <1800000>;
500		};
501
502		vreg_l13a_2p95: l13 {
503			regulator-min-microvolt = <1808000>;
504			regulator-max-microvolt = <2960000>;
505		};
506
507		vreg_l14a_1p88: l14 {
508			regulator-min-microvolt = <1880000>;
509			regulator-max-microvolt = <1880000>;
510		};
511
512		vreg_l15a_1p8: l15 {
513			regulator-min-microvolt = <1800000>;
514			regulator-max-microvolt = <1800000>;
515		};
516
517		vreg_l16a_2p7: l16 {
518			regulator-min-microvolt = <2704000>;
519			regulator-max-microvolt = <2704000>;
520		};
521
522		vreg_l17a_1p3: l17 {
523			regulator-min-microvolt = <1304000>;
524			regulator-max-microvolt = <1304000>;
525		};
526
527		vreg_l18a_2p7: l18 {
528			regulator-min-microvolt = <2704000>;
529			regulator-max-microvolt = <2704000>;
530		};
531
532		vreg_l19a_3p0: l19 {
533			regulator-min-microvolt = <3008000>;
534			regulator-max-microvolt = <3008000>;
535		};
536
537		vreg_l20a_2p95: l20 {
538			regulator-min-microvolt = <2960000>;
539			regulator-max-microvolt = <2960000>;
540			regulator-allow-set-load;
541		};
542
543		vreg_l21a_2p95: l21 {
544			regulator-min-microvolt = <2960000>;
545			regulator-max-microvolt = <2960000>;
546			regulator-system-load = <800000>;
547			regulator-allow-set-load;
548		};
549
550		vreg_l22a_2p85: l22 {
551			regulator-min-microvolt = <2864000>;
552			regulator-max-microvolt = <2864000>;
553		};
554
555		vreg_l23a_3p3: l23 {
556			regulator-min-microvolt = <3312000>;
557			regulator-max-microvolt = <3312000>;
558		};
559
560		vreg_l24a_3p075: l24 {
561			regulator-min-microvolt = <3088000>;
562			regulator-max-microvolt = <3088000>;
563		};
564
565		vreg_l25a_3p3: l25 {
566			regulator-min-microvolt = <3104000>;
567			regulator-max-microvolt = <3312000>;
568		};
569
570		vreg_l26a_1p2: l26 {
571			regulator-min-microvolt = <1200000>;
572			regulator-max-microvolt = <1200000>;
573			regulator-allow-set-load;
574		};
575
576		vreg_l28_3p0: l28 {
577			regulator-min-microvolt = <3008000>;
578			regulator-max-microvolt = <3008000>;
579		};
580
581		vreg_lvs1a_1p8: lvs1 {
582			regulator-min-microvolt = <1800000>;
583			regulator-max-microvolt = <1800000>;
584		};
585
586		vreg_lvs2a_1p8: lvs2 {
587			regulator-min-microvolt = <1800000>;
588			regulator-max-microvolt = <1800000>;
589		};
590
591	};
592
593	pmi8998-regulators {
594		compatible = "qcom,rpm-pmi8998-regulators";
595
596		vdd_bob-supply = <&vph_pwr>;
597
598		vreg_bob: bob {
599			regulator-min-microvolt = <3312000>;
600			regulator-max-microvolt = <3600000>;
601		};
602	};
603};
604
605&remoteproc_adsp {
606	status = "okay";
607};
608
609&remoteproc_mss {
610	status = "okay";
611};
612
613&remoteproc_slpi {
614	status = "okay";
615};
616
617&tlmm {
618	gpio-reserved-ranges = <0 4>;
619
620	mdp_vsync_n: mdp-vsync-n {
621		pins = "gpio10";
622		function = "mdp_vsync_a";
623		bias-pull-down;
624		drive-strength = <2>;
625	};
626
627	gpio_kb_pins_extra: gpio-kb-pins-extra {
628		pins = "gpio21", "gpio32", "gpio33", "gpio114",
629		       "gpio128", "gpio129";
630		function = "gpio";
631		drive-strength = <2>;
632		bias-pull-up;
633	};
634
635	ts_vio_default: ts-vio-def {
636		pins = "gpio81";
637		function = "gpio";
638		bias-disable;
639		drive-strength = <2>;
640	};
641
642	ts_rst_n: ts-rst-n {
643		pins = "gpio89";
644		function = "gpio";
645		bias-pull-up;
646		drive-strength = <8>;
647	};
648
649	hall_sensor1_default: hall-sensor1-def {
650		pins = "gpio124";
651		function = "gpio";
652		bias-disable;
653		drive-strength = <2>;
654		input-enable;
655	};
656
657	ts_int_n: ts-int-n {
658		pins = "gpio125";
659		function = "gpio";
660		bias-disable;
661		drive-strength = <8>;
662	};
663};
664
665&sdhc2 {
666	status = "okay";
667	cd-gpios = <&tlmm 95 GPIO_ACTIVE_LOW>;
668
669	vmmc-supply = <&vreg_l21a_2p95>;
670	vqmmc-supply = <&vreg_l13a_2p95>;
671
672	pinctrl-names = "default", "sleep";
673	pinctrl-0 = <&sdc2_on &sdc2_cd>;
674	pinctrl-1 = <&sdc2_off &sdc2_cd>;
675};
676
677&stm {
678	status = "okay";
679};
680
681&ufshc {
682	status = "okay";
683	vcc-supply = <&vreg_l20a_2p95>;
684	vccq-supply = <&vreg_l26a_1p2>;
685	vccq2-supply = <&vreg_s4a_1p8>;
686	vcc-max-microamp = <750000>;
687	vccq-max-microamp = <560000>;
688	vccq2-max-microamp = <750000>;
689};
690
691&ufsphy {
692	status = "okay";
693	vdda-phy-supply = <&vreg_l1a_0p875>;
694	vdda-pll-supply = <&vreg_l2a_1p2>;
695	vddp-ref-clk-supply = <&vreg_l26a_1p2>;
696};
697
698&usb3 {
699	status = "okay";
700};
701
702&usb3_dwc3 {
703	dr_mode = "peripheral";
704	extcon = <&extcon_usb>;
705};
706
707&usb3phy {
708	status = "okay";
709
710	vdda-phy-supply = <&vreg_l1a_0p875>;
711	vdda-pll-supply = <&vreg_l2a_1p2>;
712};
713
714/* GT9286 analog supply */
715&vreg_l28_3p0 {
716	regulator-min-microvolt = <2800000>;
717	regulator-max-microvolt = <2800000>;
718};
719
720&wifi {
721	status = "okay";
722
723	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
724	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
725	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
726	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
727};
728