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