xref: /linux/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5-pro.dts (revision cbe8aadf1551f3f4a853f24b3b96d9f0eea49c53)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include "rk3588s-orangepi-5.dtsi"
6
7/ {
8	model = "Xunlong Orange Pi 5 Pro";
9	compatible = "xunlong,orangepi-5-pro", "rockchip,rk3588s";
10
11	aliases {
12		mmc0 = &sdhci;
13		mmc1 = &sdmmc;
14		mmc2 = &sdio;
15	};
16
17	analog-sound {
18		compatible = "simple-audio-card";
19		pinctrl-names = "default";
20		pinctrl-0 = <&hp_detect>;
21		simple-audio-card,format = "i2s";
22		simple-audio-card,hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
23		simple-audio-card,mclk-fs = <256>;
24		simple-audio-card,name = "rockchip,es8388";
25		simple-audio-card,routing =
26			"Headphones", "LOUT1",
27			"Headphones", "ROUT1",
28			"LINPUT1", "Microphone Jack",
29			"RINPUT1", "Microphone Jack",
30			"LINPUT2", "Onboard Microphone",
31			"RINPUT2", "Onboard Microphone";
32		simple-audio-card,widgets =
33			"Microphone", "Microphone Jack",
34			"Microphone", "Onboard Microphone",
35			"Headphone", "Headphones";
36
37		simple-audio-card,cpu {
38			sound-dai = <&i2s2_2ch>;
39		};
40
41		simple-audio-card,codec {
42			sound-dai = <&es8388>;
43			system-clock-frequency = <12288000>;
44		};
45	};
46
47	pwm-leds {
48		compatible = "pwm-leds";
49
50		led-0 {
51			color = <LED_COLOR_ID_BLUE>;
52			function = LED_FUNCTION_STATUS;
53			linux,default-trigger = "heartbeat";
54			max-brightness = <255>;
55			pwms = <&pwm15 0 1000000 0>;
56		};
57
58		led-1 {
59			color = <LED_COLOR_ID_GREEN>;
60			function = LED_FUNCTION_ACTIVITY;
61			linux,default-trigger = "heartbeat";
62			max-brightness = <255>;
63			pwms = <&pwm3 0 1000000 0>;
64		};
65	};
66
67	fan: pwm-fan {
68		compatible = "pwm-fan";
69		#cooling-cells = <2>;
70		cooling-levels = <0 50 100 150 200 255>;
71		fan-supply = <&vcc5v0_sys>;
72		pwms = <&pwm2 0 20000000 0>;
73	};
74
75	vcc3v3_eth: regulator-vcc3v3-eth {
76		compatible = "regulator-fixed";
77		enable-active-high;
78		gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
79		pinctrl-names = "default";
80		pinctrl-0 = <&ethernet_en>;
81		regulator-max-microvolt = <3300000>;
82		regulator-min-microvolt = <3300000>;
83		regulator-name = "vcc3v3_eth";
84		startup-delay-us = <50000>;
85		vin-supply = <&vcc_3v3_s3>;
86	};
87
88	vcc5v0_otg: regulator-vcc5v0-otg {
89		compatible = "regulator-fixed";
90		enable-active-high;
91		gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
92		pinctrl-names = "default";
93		pinctrl-0 = <&vcc5v0_otg_en>;
94		regulator-max-microvolt = <5000000>;
95		regulator-min-microvolt = <5000000>;
96		regulator-name = "vcc5v0_otg";
97		vin-supply = <&vcc5v0_sys>;
98	};
99
100	sdio_pwrseq: sdio-pwrseq {
101		compatible = "mmc-pwrseq-simple";
102		clocks = <&hym8563>;
103		clock-names = "ext_clock";
104		pinctrl-names = "default";
105		pinctrl-0 = <&wifi_enable_h>;
106		post-power-on-delay-ms = <200>;
107		reset-gpios = <&gpio0 RK_PD0 GPIO_ACTIVE_LOW>;
108	};
109
110	typea_con: usb-a-connector {
111		compatible = "usb-a-connector";
112		data-role = "host";
113		label = "USB3 Type-A";
114		power-role = "source";
115		vbus-supply = <&vcc5v0_otg>;
116	};
117};
118
119&i2c1 {
120	pinctrl-names = "default";
121	pinctrl-0 = <&i2c1m4_xfer>;
122	status = "okay";
123};
124
125&i2c3 {
126	pinctrl-names = "default";
127	pinctrl-0 = <&i2c3m0_xfer>;
128	status = "okay";
129
130	es8388: audio-codec@11 {
131		compatible = "everest,es8388", "everest,es8328";
132		reg = <0x11>;
133		#sound-dai-cells = <0>;
134		AVDD-supply = <&vcca_3v3_s0>;
135		DVDD-supply = <&vcca_1v8_s0>;
136		HPVDD-supply = <&vcca_3v3_s0>;
137		PVDD-supply = <&vcca_1v8_s0>;
138		assigned-clock-rates = <12288000>;
139		assigned-clocks = <&cru I2S2_2CH_MCLKOUT>;
140		clocks = <&cru I2S2_2CH_MCLKOUT>;
141		pinctrl-names = "default";
142		pinctrl-0 = <&i2s2m1_mclk>;
143	};
144};
145
146&i2c4 {
147	pinctrl-names = "default";
148	pinctrl-0 = <&i2c4m3_xfer>;
149	status = "okay";
150};
151
152&i2s2_2ch {
153	pinctrl-0 = <&i2s2m1_lrck &i2s2m1_sclk
154		     &i2s2m1_sdi &i2s2m1_sdo>;
155	status = "okay";
156};
157
158&package_thermal {
159	polling-delay = <1000>;
160
161	cooling-maps {
162		map0 {
163			trip = <&package_fan0>;
164			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
165		};
166
167		map1 {
168			trip = <&package_fan1>;
169			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
170		};
171	};
172
173	trips {
174		package_fan0: package-fan0 {
175			hysteresis = <2000>;
176			temperature = <55000>;
177			type = "active";
178		};
179
180		package_fan1: package-fan1 {
181			hysteresis = <2000>;
182			temperature = <65000>;
183			type = "active";
184		};
185	};
186};
187
188/* NVMe */
189&pcie2x1l1 {
190	pinctrl-names = "default";
191	pinctrl-0 = <&pcie30x1m1_1_perstn>, <&pcie30x1m1_1_clkreqn>,
192		    <&pcie30x1m1_1_waken>;
193	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
194	supports-clkreq;
195	vpcie3v3-supply = <&vcc_3v3_s3>;
196	status = "okay";
197};
198
199/* NIC */
200&pcie2x1l2 {
201	pinctrl-names = "default";
202	pinctrl-0 = <&pcie20x1m0_perstn>, <&pcie20x1m0_clkreqn>,
203		    <&pcie20x1m0_waken>;
204	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
205	vpcie3v3-supply = <&vcc3v3_eth>;
206	status = "okay";
207};
208
209&pinctrl {
210	bluetooth {
211		bt_wake_gpio: bt-wake-pin {
212			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
213		};
214
215		bt_wake_host_irq: bt-wake-host-irq {
216			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_down>;
217		};
218	};
219
220	ethernet {
221		ethernet_en: ethernet-en {
222			rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_down>;
223		};
224	};
225
226	usb {
227		vcc5v0_otg_en: vcc5v0-otg-en {
228			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
229		};
230	};
231
232	wlan {
233		wifi_enable_h: wifi-enable-h {
234			rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>;
235		};
236
237		wifi_host_wake_irq: wifi-host-wake-irq {
238			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
239		};
240	};
241};
242
243&pwm15 {
244	pinctrl-names = "default";
245	pinctrl-0 = <&pwm15m2_pins>;
246	status = "okay";
247};
248
249&pwm2 {
250	pinctrl-names = "default";
251	pinctrl-0 = <&pwm2m1_pins>;
252	status = "okay";
253};
254
255&pwm3 {
256	pinctrl-names = "default";
257	pinctrl-0 = <&pwm3m2_pins>;
258	status = "okay";
259};
260
261&rk806 {
262	regulators {
263		vcca_1v8_s0: pldo-reg1 {
264			regulator-name = "vcca_1v8_s0";
265			regulator-always-on;
266			regulator-boot-on;
267			regulator-min-microvolt = <1800000>;
268			regulator-max-microvolt = <1800000>;
269
270			regulator-state-mem {
271				regulator-off-in-suspend;
272				regulator-suspend-microvolt = <1800000>;
273			};
274		};
275
276		vcc_1v8_s0: pldo-reg2 {
277			regulator-name = "vcc_1v8_s0";
278			regulator-always-on;
279			regulator-boot-on;
280			regulator-min-microvolt = <1800000>;
281			regulator-max-microvolt = <1800000>;
282
283			regulator-state-mem {
284				regulator-off-in-suspend;
285			};
286		};
287	};
288};
289
290&sdhci {
291	status = "okay";
292};
293
294&sdio {
295	#address-cells = <1>;
296	#size-cells = <0>;
297	bus-width = <4>;
298	cap-sd-highspeed;
299	cap-sdio-irq;
300	keep-power-in-suspend;
301	max-frequency = <150000000>;
302	mmc-pwrseq = <&sdio_pwrseq>;
303	no-mmc;
304	no-sd;
305	non-removable;
306	sd-uhs-sdr104;
307	status = "okay";
308
309	ap6256: wifi@1 {
310		compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac";
311		reg = <1>;
312		interrupt-names = "host-wake";
313		interrupt-parent = <&gpio0>;
314		interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
315		pinctrl-names = "default";
316		pinctrl-0 = <&wifi_host_wake_irq>;
317	};
318};
319
320&uart9 {
321	pinctrl-names = "default";
322	pinctrl-0 = <&uart9m2_xfer &uart9m2_ctsn &uart9m2_rtsn>;
323	uart-has-rtscts;
324	status = "okay";
325
326	bluetooth {
327		compatible = "brcm,bcm4345c5";
328		clocks = <&hym8563>;
329		clock-names = "lpo";
330		device-wakeup-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
331		interrupt-names = "host-wakeup";
332		interrupt-parent = <&gpio0>;
333		interrupts = <RK_PC5 IRQ_TYPE_LEVEL_HIGH>;
334		max-speed = <1500000>;
335		pinctrl-names = "default";
336		pinctrl-0 = <&bt_wake_host_irq &bt_wake_gpio>;
337		shutdown-gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
338		vbat-supply = <&vcc_3v3_s3>;
339		vddio-supply = <&vcc_1v8_s3>;
340	};
341};
342
343&u2phy0_otg {
344	phy-supply = <&vcc5v0_otg>;
345};
346
347&usb_host0_xhci {
348	dr_mode = "host";
349};
350
351&usbdp_phy0 {
352	/*
353	 * The USB3 Type-A host connector is wired to PHY lanes 2/3. Lanes 0/1
354	 * are connected to the LT8711UXD DP-to-HDMI bridge on the board.
355	 * dp-lane-mux routes USB3 SuperSpeed to the correct lanes.
356	 */
357	rockchip,dp-lane-mux = <0 1>;
358};
359