xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/x1e80100-asus-vivobook-s15.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4 * Copyright (c) 2024, Xilin Wu <wuxilin123@gmail.com>
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11
12#include "x1e80100.dtsi"
13#include "x1e80100-pmics.dtsi"
14
15/ {
16	model = "ASUS Vivobook S 15";
17	compatible = "asus,vivobook-s15", "qcom,x1e80100";
18	chassis-type = "laptop";
19
20	pmic-glink {
21		compatible = "qcom,x1e80100-pmic-glink",
22			     "qcom,sm8550-pmic-glink",
23			     "qcom,pmic-glink";
24		orientation-gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>,
25				    <&tlmm 123 GPIO_ACTIVE_HIGH>;
26		#address-cells = <1>;
27		#size-cells = <0>;
28
29		/* Left-side port, closer to the screen */
30		connector@0 {
31			compatible = "usb-c-connector";
32			reg = <0>;
33			power-role = "dual";
34			data-role = "dual";
35
36			ports {
37				#address-cells = <1>;
38				#size-cells = <0>;
39
40				port@0 {
41					reg = <0>;
42
43					pmic_glink_ss0_hs_in: endpoint {
44						remote-endpoint = <&usb_1_ss0_dwc3_hs>;
45					};
46				};
47
48				port@1 {
49					reg = <1>;
50
51					pmic_glink_ss0_ss_in: endpoint {
52						remote-endpoint = <&usb_1_ss0_qmpphy_out>;
53					};
54				};
55			};
56		};
57
58		/* Left-side port, farther from the screen */
59		connector@1 {
60			compatible = "usb-c-connector";
61			reg = <1>;
62			power-role = "dual";
63			data-role = "dual";
64
65			ports {
66				#address-cells = <1>;
67				#size-cells = <0>;
68
69				port@0 {
70					reg = <0>;
71
72					pmic_glink_ss1_hs_in: endpoint {
73						remote-endpoint = <&usb_1_ss1_dwc3_hs>;
74					};
75				};
76
77				port@1 {
78					reg = <1>;
79
80					pmic_glink_ss1_ss_in: endpoint {
81						remote-endpoint = <&usb_1_ss1_qmpphy_out>;
82					};
83				};
84			};
85		};
86	};
87
88	reserved-memory {
89		linux,cma {
90			compatible = "shared-dma-pool";
91			size = <0x0 0x8000000>;
92			reusable;
93			linux,cma-default;
94		};
95	};
96
97	vph_pwr: vph-pwr-regulator {
98		compatible = "regulator-fixed";
99
100		regulator-name = "vph_pwr";
101		regulator-min-microvolt = <3700000>;
102		regulator-max-microvolt = <3700000>;
103
104		regulator-always-on;
105		regulator-boot-on;
106	};
107
108	vreg_edp_3p3: regulator-edp-3p3 {
109		compatible = "regulator-fixed";
110
111		regulator-name = "VREG_EDP_3P3";
112		regulator-min-microvolt = <3300000>;
113		regulator-max-microvolt = <3300000>;
114
115		gpio = <&tlmm 70 GPIO_ACTIVE_HIGH>;
116		enable-active-high;
117
118		pinctrl-0 = <&edp_reg_en>;
119		pinctrl-names = "default";
120
121		regulator-always-on;
122		regulator-boot-on;
123	};
124
125	vreg_nvme: regulator-nvme {
126		compatible = "regulator-fixed";
127
128		regulator-name = "VREG_NVME_3P3";
129		regulator-min-microvolt = <3300000>;
130		regulator-max-microvolt = <3300000>;
131
132		gpio = <&tlmm 18 GPIO_ACTIVE_HIGH>;
133		enable-active-high;
134
135		pinctrl-0 = <&nvme_reg_en>;
136		pinctrl-names = "default";
137
138		regulator-boot-on;
139	};
140};
141
142&apps_rsc {
143	regulators-0 {
144		compatible = "qcom,pm8550-rpmh-regulators";
145		qcom,pmic-id = "b";
146
147		vdd-bob1-supply = <&vph_pwr>;
148		vdd-bob2-supply = <&vph_pwr>;
149		vdd-l1-l4-l10-supply = <&vreg_s4c_1p8>;
150		vdd-l2-l13-l14-supply = <&vreg_bob1>;
151		vdd-l5-l16-supply = <&vreg_bob1>;
152		vdd-l6-l7-supply = <&vreg_bob2>;
153		vdd-l8-l9-supply = <&vreg_bob1>;
154		vdd-l12-supply = <&vreg_s5j_1p2>;
155		vdd-l15-supply = <&vreg_s4c_1p8>;
156		vdd-l17-supply = <&vreg_bob2>;
157
158		vreg_bob1: bob1 {
159			regulator-name = "vreg_bob1";
160			regulator-min-microvolt = <3008000>;
161			regulator-max-microvolt = <3960000>;
162			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
163		};
164
165		vreg_bob2: bob2 {
166			regulator-name = "vreg_bob2";
167			regulator-min-microvolt = <2504000>;
168			regulator-max-microvolt = <3008000>;
169			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
170		};
171
172		vreg_l2b_3p0: ldo2 {
173			regulator-name = "vreg_l2b_3p0";
174			regulator-min-microvolt = <3072000>;
175			regulator-max-microvolt = <3100000>;
176			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
177		};
178
179		vreg_l14b_3p0: ldo14 {
180			regulator-name = "vreg_l14b_3p0";
181			regulator-min-microvolt = <3072000>;
182			regulator-max-microvolt = <3072000>;
183			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
184		};
185	};
186
187	regulators-1 {
188		compatible = "qcom,pm8550ve-rpmh-regulators";
189		qcom,pmic-id = "c";
190
191		vdd-l1-supply = <&vreg_s5j_1p2>;
192		vdd-l2-supply = <&vreg_s1f_0p7>;
193		vdd-l3-supply = <&vreg_s1f_0p7>;
194		vdd-s4-supply = <&vph_pwr>;
195
196		vreg_s4c_1p8: smps4 {
197			regulator-name = "vreg_s4c_1p8";
198			regulator-min-microvolt = <1856000>;
199			regulator-max-microvolt = <2000000>;
200			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
201		};
202	};
203
204	regulators-2 {
205		compatible = "qcom,pmc8380-rpmh-regulators";
206		qcom,pmic-id = "d";
207
208		vdd-l1-supply = <&vreg_s1f_0p7>;
209		vdd-l2-supply = <&vreg_s1f_0p7>;
210		vdd-l3-supply = <&vreg_s4c_1p8>;
211		vdd-s1-supply = <&vph_pwr>;
212
213		vreg_l1d_0p8: ldo1 {
214			regulator-name = "vreg_l1d_0p8";
215			regulator-min-microvolt = <880000>;
216			regulator-max-microvolt = <920000>;
217			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
218		};
219
220		vreg_l2d_0p9: ldo2 {
221			regulator-name = "vreg_l2d_0p9";
222			regulator-min-microvolt = <912000>;
223			regulator-max-microvolt = <920000>;
224			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
225		};
226
227		vreg_l3d_1p8: ldo3 {
228			regulator-name = "vreg_l3d_1p8";
229			regulator-min-microvolt = <1800000>;
230			regulator-max-microvolt = <1800000>;
231			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
232		};
233	};
234
235	regulators-3 {
236		compatible = "qcom,pmc8380-rpmh-regulators";
237		qcom,pmic-id = "e";
238
239		vdd-l2-supply = <&vreg_s1f_0p7>;
240		vdd-l3-supply = <&vreg_s5j_1p2>;
241
242		vreg_l2e_0p8: ldo2 {
243			regulator-name = "vreg_l2e_0p8";
244			regulator-min-microvolt = <880000>;
245			regulator-max-microvolt = <920000>;
246			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
247		};
248
249		vreg_l3e_1p2: ldo3 {
250			regulator-name = "vreg_l3e_1p2";
251			regulator-min-microvolt = <1200000>;
252			regulator-max-microvolt = <1200000>;
253			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
254		};
255	};
256
257	regulators-4 {
258		compatible = "qcom,pmc8380-rpmh-regulators";
259		qcom,pmic-id = "f";
260
261		vdd-l1-supply = <&vreg_s5j_1p2>;
262		vdd-l2-supply = <&vreg_s5j_1p2>;
263		vdd-l3-supply = <&vreg_s5j_1p2>;
264		vdd-s1-supply = <&vph_pwr>;
265
266		vreg_s1f_0p7: smps1 {
267			regulator-name = "vreg_s1f_0p7";
268			regulator-min-microvolt = <700000>;
269			regulator-max-microvolt = <1100000>;
270			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
271		};
272	};
273
274	regulators-6 {
275		compatible = "qcom,pm8550ve-rpmh-regulators";
276		qcom,pmic-id = "i";
277
278		vdd-l1-supply = <&vreg_s4c_1p8>;
279		vdd-l2-supply = <&vreg_s5j_1p2>;
280		vdd-l3-supply = <&vreg_s1f_0p7>;
281		vdd-s1-supply = <&vph_pwr>;
282		vdd-s2-supply = <&vph_pwr>;
283
284		vreg_l3i_0p8: ldo3 {
285			regulator-name = "vreg_l3i_0p8";
286			regulator-min-microvolt = <880000>;
287			regulator-max-microvolt = <920000>;
288			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
289		};
290	};
291
292	regulators-7 {
293		compatible = "qcom,pm8550ve-rpmh-regulators";
294		qcom,pmic-id = "j";
295
296		vdd-l1-supply = <&vreg_s1f_0p7>;
297		vdd-l2-supply = <&vreg_s5j_1p2>;
298		vdd-l3-supply = <&vreg_s1f_0p7>;
299		vdd-s5-supply = <&vph_pwr>;
300
301		vreg_s5j_1p2: smps5 {
302			regulator-name = "vreg_s5j_1p2";
303			regulator-min-microvolt = <1256000>;
304			regulator-max-microvolt = <1304000>;
305			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
306		};
307
308		vreg_l1j_0p8: ldo1 {
309			regulator-name = "vreg_l1j_0p8";
310			regulator-min-microvolt = <880000>;
311			regulator-max-microvolt = <920000>;
312			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
313		};
314
315		vreg_l2j_1p2: ldo2 {
316			regulator-name = "vreg_l2j_1p2";
317			regulator-min-microvolt = <1200000>;
318			regulator-max-microvolt = <1200000>;
319			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
320		};
321
322		vreg_l3j_0p8: ldo3 {
323			regulator-name = "vreg_l3j_0p8";
324			regulator-min-microvolt = <880000>;
325			regulator-max-microvolt = <920000>;
326			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
327		};
328	};
329};
330
331&i2c0 {
332	clock-frequency = <400000>;
333	status = "okay";
334
335	touchpad@15 {
336		compatible = "hid-over-i2c";
337		reg = <0x15>;
338
339		hid-descr-addr = <0x1>;
340		interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
341
342		pinctrl-0 = <&tpad_default>;
343		pinctrl-names = "default";
344
345		wakeup-source;
346	};
347};
348
349&i2c1 {
350	clock-frequency = <400000>;
351	status = "okay";
352
353	/* PS8830 USB4 Retimer? @ 0x8 */
354};
355
356&i2c3 {
357	clock-frequency = <400000>;
358	status = "okay";
359
360	/* PS8830 USB4 Retimer? @ 0x8 */
361};
362
363&i2c5 {
364	clock-frequency = <400000>;
365	status = "okay";
366
367	keyboard@3a {
368		compatible = "hid-over-i2c";
369		reg = <0x3a>;
370
371		hid-descr-addr = <0x1>;
372		interrupts-extended = <&tlmm 67 IRQ_TYPE_LEVEL_LOW>;
373
374		pinctrl-0 = <&kybd_default>;
375		pinctrl-names = "default";
376
377		wakeup-source;
378	};
379
380	/* EC? @ 0x5b, 0x76 */
381};
382
383&i2c7 {
384	clock-frequency = <400000>;
385	status = "okay";
386
387	/* PS8830 USB4 Retimer? @ 0x8 */
388};
389
390&mdss {
391	status = "okay";
392};
393
394&mdss_dp3 {
395	compatible = "qcom,x1e80100-dp";
396	/delete-property/ #sound-dai-cells;
397
398	status = "okay";
399
400	aux-bus {
401		panel {
402			compatible = "edp-panel";
403			power-supply = <&vreg_edp_3p3>;
404
405			port {
406				edp_panel_in: endpoint {
407					remote-endpoint = <&mdss_dp3_out>;
408				};
409			};
410		};
411	};
412
413	ports {
414		port@1 {
415			reg = <1>;
416
417			mdss_dp3_out: endpoint {
418				data-lanes = <0 1 2 3>;
419				link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
420
421				remote-endpoint = <&edp_panel_in>;
422			};
423		};
424	};
425};
426
427&mdss_dp3_phy {
428	vdda-phy-supply = <&vreg_l3j_0p8>;
429	vdda-pll-supply = <&vreg_l2j_1p2>;
430
431	status = "okay";
432};
433
434&pcie4 {
435	perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
436	wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
437
438	pinctrl-0 = <&pcie4_default>;
439	pinctrl-names = "default";
440
441	status = "okay";
442};
443
444&pcie4_phy {
445	vdda-phy-supply = <&vreg_l3i_0p8>;
446	vdda-pll-supply = <&vreg_l3e_1p2>;
447
448	status = "okay";
449};
450
451&pcie6a {
452	perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
453	wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
454
455	vddpe-3v3-supply = <&vreg_nvme>;
456
457	pinctrl-0 = <&pcie6a_default>;
458	pinctrl-names = "default";
459
460	status = "okay";
461};
462
463&pcie6a_phy {
464	vdda-phy-supply = <&vreg_l1d_0p8>;
465	vdda-pll-supply = <&vreg_l2j_1p2>;
466
467	status = "okay";
468};
469
470&qupv3_0 {
471	status = "okay";
472};
473
474&qupv3_1 {
475	status = "okay";
476};
477
478&qupv3_2 {
479	status = "okay";
480};
481
482&remoteproc_adsp {
483	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qcadsp8380.mbn",
484			"qcom/x1e80100/ASUSTeK/vivobook-s15/adsp_dtbs.elf";
485
486	status = "okay";
487};
488
489&remoteproc_cdsp {
490	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qccdsp8380.mbn",
491			"qcom/x1e80100/ASUSTeK/vivobook-s15/cdsp_dtbs.elf";
492
493	status = "okay";
494};
495
496&smb2360_0_eusb2_repeater {
497	vdd18-supply = <&vreg_l3d_1p8>;
498	vdd3-supply = <&vreg_l2b_3p0>;
499};
500
501&smb2360_1_eusb2_repeater {
502	vdd18-supply = <&vreg_l3d_1p8>;
503	vdd3-supply = <&vreg_l14b_3p0>;
504};
505
506&tlmm {
507	gpio-reserved-ranges = <34 2>, /* Unused */
508			       <44 4>, /* SPI (TPM) */
509			       <238 1>; /* UFS Reset */
510
511	edp_reg_en: edp-reg-en-state {
512		pins = "gpio70";
513		function = "gpio";
514		drive-strength = <16>;
515		bias-disable;
516	};
517
518	kybd_default: kybd-default-state {
519		pins = "gpio67";
520		function = "gpio";
521		bias-disable;
522	};
523
524	nvme_reg_en: nvme-reg-en-state {
525		pins = "gpio18";
526		function = "gpio";
527		drive-strength = <2>;
528		bias-disable;
529	};
530
531	pcie4_default: pcie4-default-state {
532		clkreq-n-pins {
533			pins = "gpio147";
534			function = "pcie4_clk";
535			drive-strength = <2>;
536			bias-pull-up;
537		};
538
539		perst-n-pins {
540			pins = "gpio146";
541			function = "gpio";
542			drive-strength = <2>;
543			bias-disable;
544		};
545
546		wake-n-pins {
547			pins = "gpio148";
548			function = "gpio";
549			drive-strength = <2>;
550			bias-pull-up;
551		};
552	};
553
554	pcie6a_default: pcie6a-default-state {
555		clkreq-n-pins {
556			pins = "gpio153";
557			function = "pcie6a_clk";
558			drive-strength = <2>;
559			bias-pull-up;
560		};
561
562		perst-n-pins {
563			pins = "gpio152";
564			function = "gpio";
565			drive-strength = <2>;
566			bias-disable;
567		};
568
569		wake-n-pins {
570			pins = "gpio154";
571			function = "gpio";
572			drive-strength = <2>;
573			bias-pull-up;
574		};
575	};
576
577	tpad_default: tpad-default-state {
578		pins = "gpio3";
579		function = "gpio";
580		bias-disable;
581	};
582};
583
584&usb_1_ss0_hsphy {
585	vdd-supply = <&vreg_l3j_0p8>;
586	vdda12-supply = <&vreg_l2j_1p2>;
587
588	phys = <&smb2360_0_eusb2_repeater>;
589
590	status = "okay";
591};
592
593&usb_1_ss0_qmpphy {
594	vdda-phy-supply = <&vreg_l3e_1p2>;
595	vdda-pll-supply = <&vreg_l1j_0p8>;
596
597	orientation-switch;
598
599	status = "okay";
600};
601
602&usb_1_ss0 {
603	status = "okay";
604};
605
606&usb_1_ss0_dwc3 {
607	dr_mode = "host";
608};
609
610&usb_1_ss0_dwc3_hs {
611	remote-endpoint = <&pmic_glink_ss0_hs_in>;
612};
613
614&usb_1_ss0_qmpphy_out {
615	remote-endpoint = <&pmic_glink_ss0_ss_in>;
616};
617
618&usb_1_ss1_hsphy {
619	vdd-supply = <&vreg_l3j_0p8>;
620	vdda12-supply = <&vreg_l2j_1p2>;
621
622	phys = <&smb2360_1_eusb2_repeater>;
623
624	status = "okay";
625};
626
627&usb_1_ss1_qmpphy {
628	vdda-phy-supply = <&vreg_l3e_1p2>;
629	vdda-pll-supply = <&vreg_l2d_0p9>;
630
631	orientation-switch;
632
633	status = "okay";
634};
635
636&usb_1_ss1 {
637	status = "okay";
638};
639
640&usb_1_ss1_dwc3 {
641	dr_mode = "host";
642};
643
644&usb_1_ss1_dwc3_hs {
645	remote-endpoint = <&pmic_glink_ss1_hs_in>;
646};
647
648&usb_1_ss1_qmpphy_out {
649	remote-endpoint = <&pmic_glink_ss1_ss_in>;
650};
651