xref: /linux/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts (revision 76d9b92e68f2bb55890f935c5143f4fef97a935d)
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};
139
140&apps_rsc {
141	regulators-0 {
142		compatible = "qcom,pm8550-rpmh-regulators";
143		qcom,pmic-id = "b";
144
145		vdd-bob1-supply = <&vph_pwr>;
146		vdd-bob2-supply = <&vph_pwr>;
147		vdd-l1-l4-l10-supply = <&vreg_s4c_1p8>;
148		vdd-l2-l13-l14-supply = <&vreg_bob1>;
149		vdd-l5-l16-supply = <&vreg_bob1>;
150		vdd-l6-l7-supply = <&vreg_bob2>;
151		vdd-l8-l9-supply = <&vreg_bob1>;
152		vdd-l12-supply = <&vreg_s5j_1p2>;
153		vdd-l15-supply = <&vreg_s4c_1p8>;
154		vdd-l17-supply = <&vreg_bob2>;
155
156		vreg_bob1: bob1 {
157			regulator-name = "vreg_bob1";
158			regulator-min-microvolt = <3008000>;
159			regulator-max-microvolt = <3960000>;
160			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
161		};
162
163		vreg_bob2: bob2 {
164			regulator-name = "vreg_bob2";
165			regulator-min-microvolt = <2504000>;
166			regulator-max-microvolt = <3008000>;
167			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
168		};
169
170		vreg_l2b_3p0: ldo2 {
171			regulator-name = "vreg_l2b_3p0";
172			regulator-min-microvolt = <3072000>;
173			regulator-max-microvolt = <3100000>;
174			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
175		};
176
177		vreg_l14b_3p0: ldo14 {
178			regulator-name = "vreg_l14b_3p0";
179			regulator-min-microvolt = <3072000>;
180			regulator-max-microvolt = <3072000>;
181			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
182		};
183	};
184
185	regulators-1 {
186		compatible = "qcom,pm8550ve-rpmh-regulators";
187		qcom,pmic-id = "c";
188
189		vdd-l1-supply = <&vreg_s5j_1p2>;
190		vdd-l2-supply = <&vreg_s1f_0p7>;
191		vdd-l3-supply = <&vreg_s1f_0p7>;
192		vdd-s4-supply = <&vph_pwr>;
193
194		vreg_s4c_1p8: smps4 {
195			regulator-name = "vreg_s4c_1p8";
196			regulator-min-microvolt = <1856000>;
197			regulator-max-microvolt = <2000000>;
198			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
199		};
200	};
201
202	regulators-2 {
203		compatible = "qcom,pmc8380-rpmh-regulators";
204		qcom,pmic-id = "d";
205
206		vdd-l1-supply = <&vreg_s1f_0p7>;
207		vdd-l2-supply = <&vreg_s1f_0p7>;
208		vdd-l3-supply = <&vreg_s4c_1p8>;
209		vdd-s1-supply = <&vph_pwr>;
210
211		vreg_l1d_0p8: ldo1 {
212			regulator-name = "vreg_l1d_0p8";
213			regulator-min-microvolt = <880000>;
214			regulator-max-microvolt = <920000>;
215			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
216		};
217
218		vreg_l2d_0p9: ldo2 {
219			regulator-name = "vreg_l2d_0p9";
220			regulator-min-microvolt = <912000>;
221			regulator-max-microvolt = <920000>;
222			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
223		};
224
225		vreg_l3d_1p8: ldo3 {
226			regulator-name = "vreg_l3d_1p8";
227			regulator-min-microvolt = <1800000>;
228			regulator-max-microvolt = <1800000>;
229			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
230		};
231	};
232
233	regulators-3 {
234		compatible = "qcom,pmc8380-rpmh-regulators";
235		qcom,pmic-id = "e";
236
237		vdd-l2-supply = <&vreg_s1f_0p7>;
238		vdd-l3-supply = <&vreg_s5j_1p2>;
239
240		vreg_l2e_0p8: ldo2 {
241			regulator-name = "vreg_l2e_0p8";
242			regulator-min-microvolt = <880000>;
243			regulator-max-microvolt = <920000>;
244			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
245		};
246
247		vreg_l3e_1p2: ldo3 {
248			regulator-name = "vreg_l3e_1p2";
249			regulator-min-microvolt = <1200000>;
250			regulator-max-microvolt = <1200000>;
251			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
252		};
253	};
254
255	regulators-4 {
256		compatible = "qcom,pmc8380-rpmh-regulators";
257		qcom,pmic-id = "f";
258
259		vdd-l1-supply = <&vreg_s5j_1p2>;
260		vdd-l2-supply = <&vreg_s5j_1p2>;
261		vdd-l3-supply = <&vreg_s5j_1p2>;
262		vdd-s1-supply = <&vph_pwr>;
263
264		vreg_s1f_0p7: smps1 {
265			regulator-name = "vreg_s1f_0p7";
266			regulator-min-microvolt = <700000>;
267			regulator-max-microvolt = <1100000>;
268			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
269		};
270	};
271
272	regulators-6 {
273		compatible = "qcom,pm8550ve-rpmh-regulators";
274		qcom,pmic-id = "i";
275
276		vdd-l1-supply = <&vreg_s4c_1p8>;
277		vdd-l2-supply = <&vreg_s5j_1p2>;
278		vdd-l3-supply = <&vreg_s1f_0p7>;
279		vdd-s1-supply = <&vph_pwr>;
280		vdd-s2-supply = <&vph_pwr>;
281	};
282
283	regulators-7 {
284		compatible = "qcom,pm8550ve-rpmh-regulators";
285		qcom,pmic-id = "j";
286
287		vdd-l1-supply = <&vreg_s1f_0p7>;
288		vdd-l2-supply = <&vreg_s5j_1p2>;
289		vdd-l3-supply = <&vreg_s1f_0p7>;
290		vdd-s5-supply = <&vph_pwr>;
291
292		vreg_s5j_1p2: smps5 {
293			regulator-name = "vreg_s5j_1p2";
294			regulator-min-microvolt = <1256000>;
295			regulator-max-microvolt = <1304000>;
296			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
297		};
298
299		vreg_l1j_0p8: ldo1 {
300			regulator-name = "vreg_l1j_0p8";
301			regulator-min-microvolt = <880000>;
302			regulator-max-microvolt = <920000>;
303			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
304		};
305
306		vreg_l2j_1p2: ldo2 {
307			regulator-name = "vreg_l2j_1p2";
308			regulator-min-microvolt = <1200000>;
309			regulator-max-microvolt = <1200000>;
310			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
311		};
312
313		vreg_l3j_0p8: ldo3 {
314			regulator-name = "vreg_l3j_0p8";
315			regulator-min-microvolt = <880000>;
316			regulator-max-microvolt = <920000>;
317			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
318		};
319	};
320};
321
322&i2c0 {
323	clock-frequency = <400000>;
324	status = "okay";
325
326	touchpad@15 {
327		compatible = "hid-over-i2c";
328		reg = <0x15>;
329
330		hid-descr-addr = <0x1>;
331		interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
332
333		pinctrl-0 = <&tpad_default>;
334		pinctrl-names = "default";
335
336		wakeup-source;
337	};
338};
339
340&i2c1 {
341	clock-frequency = <400000>;
342	status = "okay";
343
344	/* PS8830 USB4 Retimer? @ 0x8 */
345};
346
347&i2c3 {
348	clock-frequency = <400000>;
349	status = "okay";
350
351	/* PS8830 USB4 Retimer? @ 0x8 */
352};
353
354&i2c5 {
355	clock-frequency = <400000>;
356	status = "okay";
357
358	keyboard@3a {
359		compatible = "hid-over-i2c";
360		reg = <0x3a>;
361
362		hid-descr-addr = <0x1>;
363		interrupts-extended = <&tlmm 67 IRQ_TYPE_LEVEL_LOW>;
364
365		pinctrl-0 = <&kybd_default>;
366		pinctrl-names = "default";
367
368		wakeup-source;
369	};
370
371	/* EC? @ 0x5b, 0x76 */
372};
373
374&i2c7 {
375	clock-frequency = <400000>;
376	status = "okay";
377
378	/* PS8830 USB4 Retimer? @ 0x8 */
379};
380
381&mdss {
382	status = "okay";
383};
384
385&mdss_dp3 {
386	compatible = "qcom,x1e80100-dp";
387	/delete-property/ #sound-dai-cells;
388
389	status = "okay";
390
391	aux-bus {
392		panel {
393			compatible = "edp-panel";
394			power-supply = <&vreg_edp_3p3>;
395
396			port {
397				edp_panel_in: endpoint {
398					remote-endpoint = <&mdss_dp3_out>;
399				};
400			};
401		};
402	};
403
404	ports {
405		port@1 {
406			reg = <1>;
407
408			mdss_dp3_out: endpoint {
409				data-lanes = <0 1 2 3>;
410				link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
411
412				remote-endpoint = <&edp_panel_in>;
413			};
414		};
415	};
416};
417
418&mdss_dp3_phy {
419	vdda-phy-supply = <&vreg_l3j_0p8>;
420	vdda-pll-supply = <&vreg_l2j_1p2>;
421
422	status = "okay";
423};
424
425&pcie4 {
426	status = "okay";
427};
428
429&pcie4_phy {
430	vdda-phy-supply = <&vreg_l3j_0p8>;
431	vdda-pll-supply = <&vreg_l3e_1p2>;
432
433	status = "okay";
434};
435
436&pcie6a {
437	perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
438	wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
439
440	vddpe-3v3-supply = <&vreg_nvme>;
441
442	pinctrl-0 = <&pcie6a_default>;
443	pinctrl-names = "default";
444
445	status = "okay";
446};
447
448&pcie6a_phy {
449	vdda-phy-supply = <&vreg_l1d_0p8>;
450	vdda-pll-supply = <&vreg_l2j_1p2>;
451
452	status = "okay";
453};
454
455&qupv3_0 {
456	status = "okay";
457};
458
459&qupv3_1 {
460	status = "okay";
461};
462
463&qupv3_2 {
464	status = "okay";
465};
466
467&remoteproc_adsp {
468	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qcadsp8380.mbn",
469			"qcom/x1e80100/ASUSTeK/vivobook-s15/adsp_dtbs.elf";
470
471	status = "okay";
472};
473
474&remoteproc_cdsp {
475	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qccdsp8380.mbn",
476			"qcom/x1e80100/ASUSTeK/vivobook-s15/cdsp_dtbs.elf";
477
478	status = "okay";
479};
480
481&smb2360_0_eusb2_repeater {
482	vdd18-supply = <&vreg_l3d_1p8>;
483	vdd3-supply = <&vreg_l2b_3p0>;
484};
485
486&smb2360_1_eusb2_repeater {
487	vdd18-supply = <&vreg_l3d_1p8>;
488	vdd3-supply = <&vreg_l14b_3p0>;
489};
490
491&smb2360_2 {
492	status = "disabled";
493};
494
495&tlmm {
496	gpio-reserved-ranges = <34 2>, /* Unused */
497			       <44 4>, /* SPI (TPM) */
498			       <238 1>; /* UFS Reset */
499
500	edp_reg_en: edp-reg-en-state {
501		pins = "gpio70";
502		function = "gpio";
503		drive-strength = <16>;
504		bias-disable;
505	};
506
507	kybd_default: kybd-default-state {
508		pins = "gpio67";
509		function = "gpio";
510		bias-disable;
511	};
512
513	nvme_reg_en: nvme-reg-en-state {
514		pins = "gpio18";
515		function = "gpio";
516		drive-strength = <2>;
517		bias-disable;
518	};
519
520	pcie6a_default: pcie2a-default-state {
521		clkreq-n-pins {
522			pins = "gpio153";
523			function = "pcie6a_clk";
524			drive-strength = <2>;
525			bias-pull-up;
526		};
527
528		perst-n-pins {
529			pins = "gpio152";
530			function = "gpio";
531			drive-strength = <2>;
532			bias-pull-down;
533		};
534
535		wake-n-pins {
536			pins = "gpio154";
537			function = "gpio";
538			drive-strength = <2>;
539			bias-pull-up;
540		};
541	};
542
543	tpad_default: tpad-default-state {
544		pins = "gpio3";
545		function = "gpio";
546		bias-disable;
547	};
548};
549
550&usb_1_ss0_hsphy {
551	vdd-supply = <&vreg_l3j_0p8>;
552	vdda12-supply = <&vreg_l2j_1p2>;
553
554	phys = <&smb2360_0_eusb2_repeater>;
555
556	status = "okay";
557};
558
559&usb_1_ss0_qmpphy {
560	vdda-phy-supply = <&vreg_l3e_1p2>;
561	vdda-pll-supply = <&vreg_l1j_0p8>;
562
563	orientation-switch;
564
565	status = "okay";
566};
567
568&usb_1_ss0 {
569	status = "okay";
570};
571
572&usb_1_ss0_dwc3 {
573	dr_mode = "host";
574};
575
576&usb_1_ss0_dwc3_hs {
577	remote-endpoint = <&pmic_glink_ss0_hs_in>;
578};
579
580&usb_1_ss0_qmpphy_out {
581	remote-endpoint = <&pmic_glink_ss0_ss_in>;
582};
583
584&usb_1_ss1_hsphy {
585	vdd-supply = <&vreg_l3j_0p8>;
586	vdda12-supply = <&vreg_l2j_1p2>;
587
588	phys = <&smb2360_1_eusb2_repeater>;
589
590	status = "okay";
591};
592
593&usb_1_ss1_qmpphy {
594	vdda-phy-supply = <&vreg_l3e_1p2>;
595	vdda-pll-supply = <&vreg_l2d_0p9>;
596
597	orientation-switch;
598
599	status = "okay";
600};
601
602&usb_1_ss1 {
603	status = "okay";
604};
605
606&usb_1_ss1_dwc3 {
607	dr_mode = "host";
608};
609
610&usb_1_ss1_dwc3_hs {
611	remote-endpoint = <&pmic_glink_ss1_hs_in>;
612};
613
614&usb_1_ss1_qmpphy_out {
615	remote-endpoint = <&pmic_glink_ss1_ss_in>;
616};
617