xref: /linux/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts (revision e3fc2fd77c63cd2e37ebd33a336602a68650f22b)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4#include "rk3588-fet3588-c.dtsi"
5
6/ {
7	model = "Forlinx OK3588-C Board";
8	compatible = "forlinx,ok3588-c", "forlinx,fet3588-c", "rockchip,rk3588";
9
10	aliases {
11		ethernet0 = &gmac0;
12		ethernet1 = &gmac1;
13		mmc1 = &sdmmc;
14	};
15
16	adc-keys-0 {
17		compatible = "adc-keys";
18		io-channels = <&saradc 0>;
19		io-channel-names = "buttons";
20		keyup-threshold-microvolt = <1800000>;
21		poll-interval = <100>;
22
23		button-maskrom {
24			label = "Maskrom";
25			linux,code = <KEY_SETUP>;
26			press-threshold-microvolt = <400>;
27		};
28	};
29
30	adc-keys-1 {
31		compatible = "adc-keys";
32		io-channels = <&saradc 1>;
33		io-channel-names = "buttons";
34		keyup-threshold-microvolt = <1800000>;
35		poll-interval = <100>;
36
37		button-volume-up {
38			label = "V+/Recovery";
39			linux,code = <KEY_VOLUMEUP>;
40			press-threshold-microvolt = <17000>;
41		};
42
43		button-volume-down {
44			label = "V-";
45			linux,code = <KEY_VOLUMEDOWN>;
46			press-threshold-microvolt = <417000>;
47		};
48
49		button-menu {
50			label = "Menu";
51			linux,code = <KEY_MENU>;
52			press-threshold-microvolt = <890000>;
53		};
54
55		button-escape {
56			label = "ESC";
57			linux,code = <KEY_ESC>;
58			press-threshold-microvolt = <1235000>;
59		};
60	};
61
62	fan: pwm-fan {
63		compatible = "pwm-fan";
64		cooling-levels = <0 95 145 195 255>;
65		fan-supply = <&vcc12v_dcin>;
66		pwms = <&pwm2 0 50000 0>;
67		#cooling-cells = <2>;
68	};
69
70	sound {
71		compatible = "simple-audio-card";
72		pinctrl-names = "default";
73		pinctrl-0 = <&hp_detect>;
74		simple-audio-card,name = "RK3588 OK3588-C Audio";
75		simple-audio-card,bitclock-master = <&masterdai>;
76		simple-audio-card,format = "i2s";
77		simple-audio-card,frame-master = <&masterdai>;
78		simple-audio-card,hp-det-gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
79		simple-audio-card,mclk-fs = <256>;
80		simple-audio-card,pin-switches = "Headphones", "Speaker";
81		simple-audio-card,widgets =
82			"Headphones", "Headphones",
83			"Speaker", "Speaker",
84			"Microphone", "Internal Microphone",
85			"Microphone", "Headset Microphone";
86		simple-audio-card,routing =
87			"Headphones", "LHP",
88			"Headphones", "RHP",
89			"Speaker", "LSPK",
90			"Speaker", "RSPK",
91			"LMICP", "Headset Microphone",
92			"RMICP", "Internal Microphone";
93
94		simple-audio-card,cpu {
95			sound-dai = <&i2s0_8ch>;
96		};
97
98		masterdai: simple-audio-card,codec {
99			sound-dai = <&nau8822>;
100		};
101	};
102
103	vcc12v_dcin: vcc12v-dcin-regulator {
104		compatible = "regulator-fixed";
105		regulator-name = "vcc12v_dcin";
106		regulator-always-on;
107		regulator-boot-on;
108		regulator-min-microvolt = <12000000>;
109		regulator-max-microvolt = <12000000>;
110	};
111
112	vcc1v8_sys: vcc1v8-sys-regulator {
113		compatible = "regulator-fixed";
114		regulator-name = "vcc1v8_sys";
115		regulator-always-on;
116		regulator-boot-on;
117		regulator-min-microvolt = <1800000>;
118		regulator-max-microvolt = <1800000>;
119		vin-supply = <&vcc3v3_sys>;
120	};
121
122	vcc3v3_pcie2x1l0: vcc3v3-pcie2x1l0-regulator {
123		compatible = "regulator-fixed";
124		regulator-name = "vcc3v3_pcie2x1l0";
125		regulator-min-microvolt = <3300000>;
126		regulator-max-microvolt = <3300000>;
127		startup-delay-us = <50000>;
128		vin-supply = <&vcc5v0_sys>;
129	};
130
131	vcc3v3_pcie2x1l2: vcc3v3-pcie2x1l2-regulator {
132		compatible = "regulator-fixed";
133		regulator-name = "vcc3v3_pcie2x1l2";
134		regulator-min-microvolt = <3300000>;
135		regulator-max-microvolt = <3300000>;
136		startup-delay-us = <5000>;
137		vin-supply = <&vcc5v0_sys>;
138	};
139
140	vcc3v3_pcie30: vcc3v3_pcie30-regulator {
141		compatible = "regulator-fixed";
142		regulator-name = "vcc3v3_pcie30";
143		regulator-always-on;
144		regulator-boot-on;
145		regulator-min-microvolt = <3300000>;
146		regulator-max-microvolt = <3300000>;
147		vin-supply = <&vcc5v0_sys>;
148	};
149
150	vcc3v3_sys: vcc3v3-sys-regulator {
151		compatible = "regulator-fixed";
152		regulator-name = "vcc3v3_sys";
153		regulator-always-on;
154		regulator-boot-on;
155		regulator-min-microvolt = <3300000>;
156		regulator-max-microvolt = <3300000>;
157		vin-supply = <&vcc5v0_sys>;
158	};
159
160	vcc5v0_sys: vcc5v0-sys-regulator {
161		compatible = "regulator-fixed";
162		regulator-name = "vcc5v0_sys";
163		regulator-always-on;
164		regulator-boot-on;
165		regulator-min-microvolt = <5000000>;
166		regulator-max-microvolt = <5000000>;
167		vin-supply = <&vcc12v_dcin>;
168	};
169};
170
171&gmac0 {
172	clock_in_out = "output";
173	phy-handle = <&rgmii_phy0>;
174	phy-mode = "rgmii-rxid";
175	pinctrl-names = "default";
176	pinctrl-0 = <&gmac0_miim
177		     &gmac0_tx_bus2
178		     &gmac0_rx_bus2
179		     &gmac0_rgmii_clk
180		     &gmac0_rgmii_bus>;
181	tx_delay = <0x44>;
182	rx_delay = <0x00>;
183	status = "okay";
184};
185
186&gmac1 {
187	clock_in_out = "output";
188	phy-handle = <&rgmii_phy1>;
189	phy-mode = "rgmii-rxid";
190	pinctrl-names = "default";
191	pinctrl-0 = <&gmac1_miim
192		     &gmac1_tx_bus2
193		     &gmac1_rx_bus2
194		     &gmac1_rgmii_clk
195		     &gmac1_rgmii_bus>;
196	tx_delay = <0x44>;
197	rx_delay = <0x00>;
198	status = "okay";
199};
200
201&gpu {
202	mali-supply = <&vdd_gpu_s0>;
203	status = "okay";
204};
205
206&i2c2 {
207	status = "okay";
208
209	tca6424a: gpio@23 {
210		compatible = "ti,tca6424";
211		reg = <0x23>;
212		gpio-controller;
213		#gpio-cells = <2>;
214
215		interrupt-parent = <&gpio1>;
216		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
217		interrupt-controller;
218		#interrupt-cells = <2>;
219
220		pinctrl-names = "default";
221		pinctrl-0 = <&tca6424a_int>;
222		vcc-supply = <&vcc3v3_sys>;
223	};
224};
225
226&i2c5 {
227	status = "okay";
228	pinctrl-names = "default";
229	pinctrl-0 = <&i2c5m2_xfer>;
230
231	pcf8563: rtc@51 {
232		compatible = "nxp,pcf8563";
233		reg = <0x51>;
234	};
235};
236
237&i2c7 {
238	status = "okay";
239
240	nau8822: audio-codec@1a {
241		compatible = "nuvoton,nau8822";
242		reg = <0x1a>;
243		clocks = <&cru I2S0_8CH_MCLKOUT>;
244		clock-names = "mclk";
245		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
246		assigned-clock-rates = <12288000>;
247		#sound-dai-cells = <0>;
248	};
249};
250
251&i2s0_8ch {
252	pinctrl-names = "default";
253	pinctrl-0 = <&i2s0_lrck
254		     &i2s0_mclk
255		     &i2s0_sclk
256		     &i2s0_sdi0
257		     &i2s0_sdo0>;
258	status = "okay";
259};
260
261&mdio0 {
262	rgmii_phy0: ethernet-phy@1 {
263		/* RTL8211F */
264		compatible = "ethernet-phy-id001c.c916";
265		reg = <0x1>;
266		pinctrl-names = "default";
267		pinctrl-0 = <&rtl8211f_0_rst>;
268		reset-assert-us = <20000>;
269		reset-deassert-us = <100000>;
270		reset-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
271	};
272};
273
274&mdio1 {
275	rgmii_phy1: ethernet-phy@2 {
276		/* RTL8211F */
277		compatible = "ethernet-phy-id001c.c916";
278		reg = <0x2>;
279		pinctrl-names = "default";
280		pinctrl-0 = <&rtl8211f_1_rst>;
281		reset-assert-us = <20000>;
282		reset-deassert-us = <100000>;
283		reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
284	};
285};
286
287&pcie2x1l0 {
288	pinctrl-names = "default";
289	pinctrl-0 = <&pcie2_0_rst>;
290	reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
291	vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
292	status = "okay";
293};
294
295&pcie2x1l2 {
296	pinctrl-names = "default";
297	pinctrl-0 = <&pcie2_2_rst>;
298	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
299	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
300	status = "okay";
301};
302
303&pcie30phy {
304	status = "okay";
305};
306
307&pcie3x4 {
308	pinctrl-names = "default";
309	pinctrl-0 = <&pcie3_rst>;
310	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
311	vpcie3v3-supply = <&vcc3v3_pcie30>;
312	status = "okay";
313};
314
315&pinctrl {
316	pcie2 {
317		pcie2_0_rst: pcie2-0-rst {
318			rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
319		};
320
321		pcie2_2_rst: pcie2-2-rst {
322			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
323		};
324	};
325
326	pcie3 {
327		pcie3_rst: pcie3-rst {
328			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
329		};
330	};
331
332	rtl8211f {
333		rtl8211f_0_rst: rtl8211f-0-rst {
334			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
335		};
336		rtl8211f_1_rst: rtl8211f-1-rst {
337			rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
338		};
339	};
340
341	sound {
342		hp_detect: hp-detect {
343			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
344		};
345	};
346
347	tca6424a {
348		tca6424a_int: tca6424a-int {
349			rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
350		};
351	};
352};
353
354&pwm2 {
355	status = "okay";
356};
357
358&saradc {
359	vref-supply = <&avcc_1v8_s0>;
360	status = "okay";
361};
362
363&sdmmc {
364	bus-width = <4>;
365	cap-mmc-highspeed;
366	cap-sd-highspeed;
367	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
368	disable-wp;
369	max-frequency = <150000000>;
370	no-sdio;
371	no-mmc;
372	sd-uhs-sdr104;
373	vqmmc-supply = <&vccio_sd_s0>;
374	status = "okay";
375};
376
377&tsadc {
378	status = "okay";
379};
380
381&u2phy2 {
382	status = "okay";
383};
384
385&u2phy2_host {
386	status = "okay";
387};
388
389&u2phy3 {
390	status = "okay";
391};
392
393&u2phy3_host {
394	status = "okay";
395};
396
397&usb_host0_ehci {
398	status = "okay";
399};
400
401&usb_host0_ohci {
402	status = "okay";
403};
404
405&usb_host1_ehci {
406	status = "okay";
407};
408
409&usb_host1_ohci {
410	status = "okay";
411};
412