xref: /linux/arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts (revision 20dfee95936413708701eb151f419597fdd9d948)
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			     "ethernet-phy-ieee802.3-c22";
266		reg = <0x1>;
267		pinctrl-names = "default";
268		pinctrl-0 = <&rtl8211f_0_rst>;
269		reset-assert-us = <20000>;
270		reset-deassert-us = <100000>;
271		reset-gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_LOW>;
272	};
273};
274
275&mdio1 {
276	rgmii_phy1: ethernet-phy@2 {
277		/* RTL8211F */
278		compatible = "ethernet-phy-id001c.c916",
279			     "ethernet-phy-ieee802.3-c22";
280		reg = <0x2>;
281		pinctrl-names = "default";
282		pinctrl-0 = <&rtl8211f_1_rst>;
283		reset-assert-us = <20000>;
284		reset-deassert-us = <100000>;
285		reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
286	};
287};
288
289&pcie2x1l0 {
290	pinctrl-names = "default";
291	pinctrl-0 = <&pcie2_0_rst>;
292	reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
293	vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
294	status = "okay";
295};
296
297&pcie2x1l2 {
298	pinctrl-names = "default";
299	pinctrl-0 = <&pcie2_2_rst>;
300	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
301	vpcie3v3-supply = <&vcc3v3_pcie2x1l2>;
302	status = "okay";
303};
304
305&pcie30phy {
306	status = "okay";
307};
308
309&pcie3x4 {
310	pinctrl-names = "default";
311	pinctrl-0 = <&pcie3_rst>;
312	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
313	vpcie3v3-supply = <&vcc3v3_pcie30>;
314	status = "okay";
315};
316
317&pinctrl {
318	pcie2 {
319		pcie2_0_rst: pcie2-0-rst {
320			rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
321		};
322
323		pcie2_2_rst: pcie2-2-rst {
324			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
325		};
326	};
327
328	pcie3 {
329		pcie3_rst: pcie3-rst {
330			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
331		};
332	};
333
334	rtl8211f {
335		rtl8211f_0_rst: rtl8211f-0-rst {
336			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
337		};
338		rtl8211f_1_rst: rtl8211f-1-rst {
339			rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
340		};
341	};
342
343	sound {
344		hp_detect: hp-detect {
345			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
346		};
347	};
348
349	tca6424a {
350		tca6424a_int: tca6424a-int {
351			rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
352		};
353	};
354};
355
356&pwm2 {
357	status = "okay";
358};
359
360&saradc {
361	vref-supply = <&avcc_1v8_s0>;
362	status = "okay";
363};
364
365&sdmmc {
366	bus-width = <4>;
367	cap-mmc-highspeed;
368	cap-sd-highspeed;
369	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
370	disable-wp;
371	max-frequency = <150000000>;
372	no-sdio;
373	no-mmc;
374	sd-uhs-sdr104;
375	vqmmc-supply = <&vccio_sd_s0>;
376	status = "okay";
377};
378
379&u2phy2 {
380	status = "okay";
381};
382
383&u2phy2_host {
384	status = "okay";
385};
386
387&u2phy3 {
388	status = "okay";
389};
390
391&u2phy3_host {
392	status = "okay";
393};
394
395&usb_host0_ehci {
396	status = "okay";
397};
398
399&usb_host0_ohci {
400	status = "okay";
401};
402
403&usb_host1_ehci {
404	status = "okay";
405};
406
407&usb_host1_ohci {
408	status = "okay";
409};
410