xref: /linux/arch/arm64/boot/dts/rockchip/rk3588-armsom-w3.dts (revision 26bda0dff9ca74ae071643e0176f248d72f43580)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/leds/common.h>
7#include "rk3588-armsom-lm7.dtsi"
8
9/ {
10	model = "ArmSoM W3";
11	compatible = "armsom,w3", "armsom,lm7", "rockchip,rk3588";
12
13	aliases {
14		mmc1 = &sdmmc;
15		mmc2 = &sdio;
16	};
17
18	analog-sound {
19		compatible = "audio-graph-card";
20		label = "rk3588-es8316";
21
22		widgets = "Microphone", "Mic Jack",
23			  "Headphone", "Headphones";
24
25		routing = "MIC2", "Mic Jack",
26			  "Headphones", "HPOL",
27			  "Headphones", "HPOR";
28
29		dais = <&i2s0_8ch_p0>;
30		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
31		pinctrl-names = "default";
32		pinctrl-0 = <&hp_detect>;
33	};
34
35	leds {
36		compatible = "gpio-leds";
37		pinctrl-names = "default";
38		pinctrl-0 = <&led_rgb_b>;
39
40		led-rgb-b {
41			function = LED_FUNCTION_STATUS;
42			color = <LED_COLOR_ID_BLUE>;
43			gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
44			linux,default-trigger = "heartbeat";
45		};
46
47		led-rgb-r {
48			function = LED_FUNCTION_STATUS;
49			color = <LED_COLOR_ID_RED>;
50			gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
51			linux,default-trigger = "none";
52		};
53	};
54
55	fan: pwm-fan {
56		compatible = "pwm-fan";
57		cooling-levels = <0 120 150 180 210 240 255>;
58		fan-supply = <&vcc5v0_sys>;
59		pwms = <&pwm1 0 50000 0>;
60		#cooling-cells = <2>;
61	};
62
63	rfkill {
64		compatible = "rfkill-gpio";
65		label = "rfkill-pcie-wlan";
66		radio-type = "wlan";
67		shutdown-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
68	};
69
70	rfkill-bt {
71		compatible = "rfkill-gpio";
72		label = "rfkill-m2-bt";
73		radio-type = "bluetooth";
74		shutdown-gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
75	};
76
77	vcc3v3_pcie2x1l0: regulator-vcc3v3-pcie2x1l0 {
78		compatible = "regulator-fixed";
79		enable-active-high;
80		gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
81		pinctrl-names = "default";
82		pinctrl-0 = <&pcie2_0_vcc3v3_en>;
83		regulator-name = "vcc3v3_pcie2x1l0";
84		regulator-always-on;
85		regulator-boot-on;
86		regulator-min-microvolt = <3300000>;
87		regulator-max-microvolt = <3300000>;
88		startup-delay-us = <50000>;
89		vin-supply = <&vcc5v0_sys>;
90	};
91
92	vcc3v3_pcie2x1l2: regulator-vcc3v3-pcie2x1l2 {
93		compatible = "regulator-fixed";
94		regulator-name = "vcc3v3_pcie2x1l2";
95		regulator-min-microvolt = <3300000>;
96		regulator-max-microvolt = <3300000>;
97		startup-delay-us = <5000>;
98		vin-supply = <&vcc_3v3_s3>;
99	};
100
101	vcc3v3_pcie30: regulator-vcc3v3-pcie30 {
102		compatible = "regulator-fixed";
103		enable-active-high;
104		gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
105		pinctrl-names = "default";
106		pinctrl-0 = <&pcie3_vcc3v3_en>;
107		regulator-name = "vcc3v3_pcie30";
108		regulator-min-microvolt = <3300000>;
109		regulator-max-microvolt = <3300000>;
110		startup-delay-us = <5000>;
111		vin-supply = <&vcc5v0_sys>;
112	};
113
114	vcc5v0_host: regulator-vcc5v0-host {
115		compatible = "regulator-fixed";
116		regulator-name = "vcc5v0_host";
117		regulator-boot-on;
118		regulator-always-on;
119		regulator-min-microvolt = <5000000>;
120		regulator-max-microvolt = <5000000>;
121		enable-active-high;
122		gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
123		pinctrl-names = "default";
124		pinctrl-0 = <&vcc5v0_host_en>;
125		vin-supply = <&vcc5v0_sys>;
126	};
127};
128
129&combphy0_ps {
130	status = "okay";
131};
132
133&combphy1_ps {
134	status = "okay";
135};
136
137&combphy2_psu {
138	status = "okay";
139};
140
141&i2c6 {
142	status = "okay";
143
144	hym8563: rtc@51 {
145		compatible = "haoyu,hym8563";
146		reg = <0x51>;
147		#clock-cells = <0>;
148		clock-output-names = "hym8563";
149		pinctrl-names = "default";
150		pinctrl-0 = <&hym8563_int>;
151		interrupt-parent = <&gpio0>;
152		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
153		wakeup-source;
154	};
155};
156
157&i2c7 {
158	status = "okay";
159
160	es8316: audio-codec@11 {
161		compatible = "everest,es8316";
162		reg = <0x11>;
163		clocks = <&cru I2S0_8CH_MCLKOUT>;
164		clock-names = "mclk";
165		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
166		assigned-clock-rates = <12288000>;
167		#sound-dai-cells = <0>;
168
169		port {
170			es8316_p0_0: endpoint {
171				remote-endpoint = <&i2s0_8ch_p0_0>;
172			};
173		};
174	};
175};
176
177&i2s0_8ch {
178	pinctrl-names = "default";
179	pinctrl-0 = <&i2s0_lrck
180		     &i2s0_mclk
181		     &i2s0_sclk
182		     &i2s0_sdi0
183		     &i2s0_sdo0>;
184	status = "okay";
185
186	i2s0_8ch_p0: port {
187		i2s0_8ch_p0_0: endpoint {
188			dai-format = "i2s";
189			mclk-fs = <256>;
190			remote-endpoint = <&es8316_p0_0>;
191		};
192	};
193};
194
195&package_thermal {
196	polling-delay = <1000>;
197
198	trips {
199		package_fan0: package-fan0 {
200			temperature = <55000>;
201			hysteresis = <2000>;
202			type = "active";
203		};
204
205		package_fan1: package-fan1 {
206			temperature = <65000>;
207			hysteresis = <2000>;
208			type = "active";
209		};
210	};
211
212	cooling-maps {
213		map0 {
214			trip = <&package_fan0>;
215			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
216		};
217
218		map1 {
219			trip = <&package_fan1>;
220			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
221		};
222	};
223};
224
225&pcie2x1l0 {
226	pinctrl-names = "default";
227	pinctrl-0 = <&pcie2_0_rst>;
228	reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
229	vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
230	status = "okay";
231};
232
233&pcie2x1l2 {
234	pinctrl-names = "default";
235	pinctrl-0 = <&pcie2_2_rst>;
236	reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
237	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
238	status = "okay";
239};
240
241&pcie30phy {
242	status = "okay";
243};
244
245&pcie3x4 {
246	pinctrl-names = "default";
247	pinctrl-0 = <&pcie3_rst>;
248	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
249	vpcie3v3-supply = <&vcc3v3_pcie30>;
250	status = "okay";
251};
252
253&pinctrl {
254	hym8563 {
255		hym8563_int: hym8563-int {
256			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
257		};
258	};
259
260	leds {
261		led_rgb_b: led-rgb-b {
262			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
263		};
264	};
265
266	sound {
267		hp_detect: hp-detect {
268			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
269		};
270	};
271
272	pcie2 {
273		pcie2_0_rst: pcie2-0-rst {
274			rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
275		};
276
277		pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
278			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
279		};
280
281		pcie2_2_rst: pcie2-2-rst {
282			rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
283		};
284	};
285
286	pcie3 {
287		pcie3_rst: pcie3-rst {
288			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
289		};
290
291		pcie3_vcc3v3_en: pcie3-vcc3v3-en {
292			rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
293		};
294	};
295
296	usb {
297		vcc5v0_host_en: vcc5v0-host-en {
298			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
299		};
300	};
301};
302
303&pwm1 {
304	status = "okay";
305};
306
307&sdmmc {
308	bus-width = <4>;
309	cap-mmc-highspeed;
310	cap-sd-highspeed;
311	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
312	disable-wp;
313	max-frequency = <200000000>;
314	no-sdio;
315	no-mmc;
316	sd-uhs-sdr104;
317	vmmc-supply = <&vcc_3v3_s3>;
318	vqmmc-supply = <&vccio_sd_s0>;
319	status = "okay";
320};
321
322&sdio {
323	bus-width = <4>;
324	cap-sdio-irq;
325	disable-wp;
326	keep-power-in-suspend;
327	max-frequency = <200000000>;
328	no-sd;
329	no-mmc;
330	non-removable;
331	pinctrl-names = "default";
332	pinctrl-0 = <&sdiom0_pins>;
333	sd-uhs-sdr12;
334	sd-uhs-sdr25;
335	sd-uhs-sdr50;
336	sd-uhs-sdr104;
337	vmmc-supply = <&vcc3v3_pcie2x1l0>;
338	vqmmc-supply = <&vcc_1v8_s3>;
339	wakeup-source;
340	status = "okay";
341};
342
343&uart2 {
344	pinctrl-0 = <&uart2m0_xfer>;
345	status = "okay";
346};
347
348&uart6 {
349	pinctrl-names = "default";
350	pinctrl-0 = <&uart6m1_xfer &uart6m1_ctsn &uart6m1_rtsn>;
351	status = "okay";
352};
353
354&u2phy1 {
355	status = "okay";
356};
357
358&u2phy1_otg {
359	status = "okay";
360};
361
362&u2phy2 {
363	status = "okay";
364};
365
366&u2phy2_host {
367	/* connected to USB hub, which is powered by vcc5v0_sys */
368	phy-supply = <&vcc5v0_sys>;
369	status = "okay";
370};
371
372&u2phy3 {
373	status = "okay";
374};
375
376&u2phy3_host {
377	phy-supply = <&vcc5v0_host>;
378	status = "okay";
379};
380
381&usbdp_phy1 {
382	status = "okay";
383};
384
385&usb_host0_ehci {
386	status = "okay";
387};
388
389&usb_host0_ohci {
390	status = "okay";
391};
392
393&usb_host1_ehci {
394	status = "okay";
395};
396
397&usb_host1_ohci {
398	status = "okay";
399};
400
401&usb_host1_xhci {
402	dr_mode = "host";
403	status = "okay";
404};
405
406&usb_host2_xhci {
407	status = "okay";
408};
409