xref: /linux/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts (revision 566ab427f827b0256d3e8ce0235d088e6a9c28bd)
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		vreg_l3i_0p8: ldo3 {
283			regulator-name = "vreg_l3i_0p8";
284			regulator-min-microvolt = <880000>;
285			regulator-max-microvolt = <920000>;
286			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
287		};
288	};
289
290	regulators-7 {
291		compatible = "qcom,pm8550ve-rpmh-regulators";
292		qcom,pmic-id = "j";
293
294		vdd-l1-supply = <&vreg_s1f_0p7>;
295		vdd-l2-supply = <&vreg_s5j_1p2>;
296		vdd-l3-supply = <&vreg_s1f_0p7>;
297		vdd-s5-supply = <&vph_pwr>;
298
299		vreg_s5j_1p2: smps5 {
300			regulator-name = "vreg_s5j_1p2";
301			regulator-min-microvolt = <1256000>;
302			regulator-max-microvolt = <1304000>;
303			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
304		};
305
306		vreg_l1j_0p8: ldo1 {
307			regulator-name = "vreg_l1j_0p8";
308			regulator-min-microvolt = <880000>;
309			regulator-max-microvolt = <920000>;
310			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
311		};
312
313		vreg_l2j_1p2: ldo2 {
314			regulator-name = "vreg_l2j_1p2";
315			regulator-min-microvolt = <1200000>;
316			regulator-max-microvolt = <1200000>;
317			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
318		};
319
320		vreg_l3j_0p8: ldo3 {
321			regulator-name = "vreg_l3j_0p8";
322			regulator-min-microvolt = <880000>;
323			regulator-max-microvolt = <920000>;
324			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
325		};
326	};
327};
328
329&i2c0 {
330	clock-frequency = <400000>;
331	status = "okay";
332
333	touchpad@15 {
334		compatible = "hid-over-i2c";
335		reg = <0x15>;
336
337		hid-descr-addr = <0x1>;
338		interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
339
340		pinctrl-0 = <&tpad_default>;
341		pinctrl-names = "default";
342
343		wakeup-source;
344	};
345};
346
347&i2c1 {
348	clock-frequency = <400000>;
349	status = "okay";
350
351	/* PS8830 USB4 Retimer? @ 0x8 */
352};
353
354&i2c3 {
355	clock-frequency = <400000>;
356	status = "okay";
357
358	/* PS8830 USB4 Retimer? @ 0x8 */
359};
360
361&i2c5 {
362	clock-frequency = <400000>;
363	status = "okay";
364
365	keyboard@3a {
366		compatible = "hid-over-i2c";
367		reg = <0x3a>;
368
369		hid-descr-addr = <0x1>;
370		interrupts-extended = <&tlmm 67 IRQ_TYPE_LEVEL_LOW>;
371
372		pinctrl-0 = <&kybd_default>;
373		pinctrl-names = "default";
374
375		wakeup-source;
376	};
377
378	/* EC? @ 0x5b, 0x76 */
379};
380
381&i2c7 {
382	clock-frequency = <400000>;
383	status = "okay";
384
385	/* PS8830 USB4 Retimer? @ 0x8 */
386};
387
388&mdss {
389	status = "okay";
390};
391
392&mdss_dp3 {
393	compatible = "qcom,x1e80100-dp";
394	/delete-property/ #sound-dai-cells;
395
396	status = "okay";
397
398	aux-bus {
399		panel {
400			compatible = "edp-panel";
401			power-supply = <&vreg_edp_3p3>;
402
403			port {
404				edp_panel_in: endpoint {
405					remote-endpoint = <&mdss_dp3_out>;
406				};
407			};
408		};
409	};
410
411	ports {
412		port@1 {
413			reg = <1>;
414
415			mdss_dp3_out: endpoint {
416				data-lanes = <0 1 2 3>;
417				link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
418
419				remote-endpoint = <&edp_panel_in>;
420			};
421		};
422	};
423};
424
425&mdss_dp3_phy {
426	vdda-phy-supply = <&vreg_l3j_0p8>;
427	vdda-pll-supply = <&vreg_l2j_1p2>;
428
429	status = "okay";
430};
431
432&pcie4 {
433	perst-gpios = <&tlmm 146 GPIO_ACTIVE_LOW>;
434	wake-gpios = <&tlmm 148 GPIO_ACTIVE_LOW>;
435
436	pinctrl-0 = <&pcie4_default>;
437	pinctrl-names = "default";
438
439	status = "okay";
440};
441
442&pcie4_phy {
443	vdda-phy-supply = <&vreg_l3i_0p8>;
444	vdda-pll-supply = <&vreg_l3e_1p2>;
445
446	status = "okay";
447};
448
449&pcie6a {
450	perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
451	wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
452
453	vddpe-3v3-supply = <&vreg_nvme>;
454
455	pinctrl-0 = <&pcie6a_default>;
456	pinctrl-names = "default";
457
458	status = "okay";
459};
460
461&pcie6a_phy {
462	vdda-phy-supply = <&vreg_l1d_0p8>;
463	vdda-pll-supply = <&vreg_l2j_1p2>;
464
465	status = "okay";
466};
467
468&qupv3_0 {
469	status = "okay";
470};
471
472&qupv3_1 {
473	status = "okay";
474};
475
476&qupv3_2 {
477	status = "okay";
478};
479
480&remoteproc_adsp {
481	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qcadsp8380.mbn",
482			"qcom/x1e80100/ASUSTeK/vivobook-s15/adsp_dtbs.elf";
483
484	status = "okay";
485};
486
487&remoteproc_cdsp {
488	firmware-name = "qcom/x1e80100/ASUSTeK/vivobook-s15/qccdsp8380.mbn",
489			"qcom/x1e80100/ASUSTeK/vivobook-s15/cdsp_dtbs.elf";
490
491	status = "okay";
492};
493
494&smb2360_0_eusb2_repeater {
495	vdd18-supply = <&vreg_l3d_1p8>;
496	vdd3-supply = <&vreg_l2b_3p0>;
497};
498
499&smb2360_1_eusb2_repeater {
500	vdd18-supply = <&vreg_l3d_1p8>;
501	vdd3-supply = <&vreg_l14b_3p0>;
502};
503
504&tlmm {
505	gpio-reserved-ranges = <34 2>, /* Unused */
506			       <44 4>, /* SPI (TPM) */
507			       <238 1>; /* UFS Reset */
508
509	edp_reg_en: edp-reg-en-state {
510		pins = "gpio70";
511		function = "gpio";
512		drive-strength = <16>;
513		bias-disable;
514	};
515
516	kybd_default: kybd-default-state {
517		pins = "gpio67";
518		function = "gpio";
519		bias-disable;
520	};
521
522	nvme_reg_en: nvme-reg-en-state {
523		pins = "gpio18";
524		function = "gpio";
525		drive-strength = <2>;
526		bias-disable;
527	};
528
529	pcie4_default: pcie4-default-state {
530		clkreq-n-pins {
531			pins = "gpio147";
532			function = "pcie4_clk";
533			drive-strength = <2>;
534			bias-pull-up;
535		};
536
537		perst-n-pins {
538			pins = "gpio146";
539			function = "gpio";
540			drive-strength = <2>;
541			bias-disable;
542		};
543
544		wake-n-pins {
545			pins = "gpio148";
546			function = "gpio";
547			drive-strength = <2>;
548			bias-pull-up;
549		};
550	};
551
552	pcie6a_default: pcie6a-default-state {
553		clkreq-n-pins {
554			pins = "gpio153";
555			function = "pcie6a_clk";
556			drive-strength = <2>;
557			bias-pull-up;
558		};
559
560		perst-n-pins {
561			pins = "gpio152";
562			function = "gpio";
563			drive-strength = <2>;
564			bias-disable;
565		};
566
567		wake-n-pins {
568			pins = "gpio154";
569			function = "gpio";
570			drive-strength = <2>;
571			bias-pull-up;
572		};
573	};
574
575	tpad_default: tpad-default-state {
576		pins = "gpio3";
577		function = "gpio";
578		bias-disable;
579	};
580};
581
582&usb_1_ss0_hsphy {
583	vdd-supply = <&vreg_l3j_0p8>;
584	vdda12-supply = <&vreg_l2j_1p2>;
585
586	phys = <&smb2360_0_eusb2_repeater>;
587
588	status = "okay";
589};
590
591&usb_1_ss0_qmpphy {
592	vdda-phy-supply = <&vreg_l3e_1p2>;
593	vdda-pll-supply = <&vreg_l1j_0p8>;
594
595	orientation-switch;
596
597	status = "okay";
598};
599
600&usb_1_ss0 {
601	status = "okay";
602};
603
604&usb_1_ss0_dwc3 {
605	dr_mode = "host";
606};
607
608&usb_1_ss0_dwc3_hs {
609	remote-endpoint = <&pmic_glink_ss0_hs_in>;
610};
611
612&usb_1_ss0_qmpphy_out {
613	remote-endpoint = <&pmic_glink_ss0_ss_in>;
614};
615
616&usb_1_ss1_hsphy {
617	vdd-supply = <&vreg_l3j_0p8>;
618	vdda12-supply = <&vreg_l2j_1p2>;
619
620	phys = <&smb2360_1_eusb2_repeater>;
621
622	status = "okay";
623};
624
625&usb_1_ss1_qmpphy {
626	vdda-phy-supply = <&vreg_l3e_1p2>;
627	vdda-pll-supply = <&vreg_l2d_0p9>;
628
629	orientation-switch;
630
631	status = "okay";
632};
633
634&usb_1_ss1 {
635	status = "okay";
636};
637
638&usb_1_ss1_dwc3 {
639	dr_mode = "host";
640};
641
642&usb_1_ss1_dwc3_hs {
643	remote-endpoint = <&pmic_glink_ss1_hs_in>;
644};
645
646&usb_1_ss1_qmpphy_out {
647	remote-endpoint = <&pmic_glink_ss1_ss_in>;
648};
649