xref: /linux/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts (revision e42f6f9be4f83c537aa81b4c6239ea94ff5b29ce)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Collabora Ltd.
4 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
5 *
6 * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw
7 */
8
9/dts-v1/;
10#include "rk3399.dtsi"
11#include "rk3399-opp.dtsi"
12
13/ {
14	model = "96boards RK3399 Ficus";
15	compatible = "vamrs,ficus", "rockchip,rk3399";
16
17	chosen {
18		stdout-path = "serial2:1500000n8";
19	};
20
21	clkin_gmac: external-gmac-clock {
22		compatible = "fixed-clock";
23		clock-frequency = <125000000>;
24		clock-output-names = "clkin_gmac";
25		#clock-cells = <0>;
26	};
27
28	vcc1v8_s0: vcc1v8-s0 {
29		compatible = "regulator-fixed";
30		regulator-name = "vcc1v8_s0";
31		regulator-min-microvolt = <1800000>;
32		regulator-max-microvolt = <1800000>;
33		regulator-always-on;
34	};
35
36	vcc_sys: vcc-sys {
37		compatible = "regulator-fixed";
38		regulator-name = "vcc_sys";
39		regulator-min-microvolt = <5000000>;
40		regulator-max-microvolt = <5000000>;
41		regulator-always-on;
42	};
43
44	vcc3v3_sys: vcc3v3-sys {
45		compatible = "regulator-fixed";
46		regulator-name = "vcc3v3_sys";
47		regulator-min-microvolt = <3300000>;
48		regulator-max-microvolt = <3300000>;
49		regulator-always-on;
50		vin-supply = <&vcc_sys>;
51	};
52
53	vcc3v3_pcie: vcc3v3-pcie-regulator {
54		compatible = "regulator-fixed";
55		enable-active-high;
56		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
57		pinctrl-names = "default";
58		pinctrl-0 = <&pcie_drv>;
59		regulator-boot-on;
60		regulator-name = "vcc3v3_pcie";
61		regulator-min-microvolt = <3300000>;
62		regulator-max-microvolt = <3300000>;
63		vin-supply = <&vcc3v3_sys>;
64	};
65
66	vcc5v0_host: vcc5v0-host-regulator {
67		compatible = "regulator-fixed";
68		enable-active-high;
69		gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
70		pinctrl-names = "default";
71		pinctrl-0 = <&host_vbus_drv>;
72		regulator-name = "vcc5v0_host";
73		regulator-min-microvolt = <5000000>;
74		regulator-max-microvolt = <5000000>;
75		regulator-always-on;
76		vin-supply = <&vcc_sys>;
77	};
78
79	vdd_log: vdd-log {
80		compatible = "pwm-regulator";
81		pwms = <&pwm2 0 25000 0>;
82		regulator-name = "vdd_log";
83		regulator-min-microvolt = <800000>;
84		regulator-max-microvolt = <1400000>;
85		regulator-always-on;
86		regulator-boot-on;
87		vin-supply = <&vcc_sys>;
88	};
89
90};
91
92&cpu_l0 {
93	cpu-supply = <&vdd_cpu_l>;
94};
95
96&cpu_l1 {
97	cpu-supply = <&vdd_cpu_l>;
98};
99
100&cpu_l2 {
101	cpu-supply = <&vdd_cpu_l>;
102};
103
104&cpu_l3 {
105	cpu-supply = <&vdd_cpu_l>;
106};
107
108&cpu_b0 {
109	cpu-supply = <&vdd_cpu_b>;
110};
111
112&cpu_b1 {
113	cpu-supply = <&vdd_cpu_b>;
114};
115
116&emmc_phy {
117	status = "okay";
118};
119
120&gmac {
121	assigned-clocks = <&cru SCLK_RMII_SRC>;
122	assigned-clock-parents = <&clkin_gmac>;
123	clock_in_out = "input";
124	phy-supply = <&vcc3v3_sys>;
125	phy-mode = "rgmii";
126	pinctrl-names = "default";
127	pinctrl-0 = <&rgmii_pins>;
128	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
129	snps,reset-active-low;
130	snps,reset-delays-us = <0 10000 50000>;
131	tx_delay = <0x28>;
132	rx_delay = <0x11>;
133	status = "okay";
134};
135
136&hdmi {
137	ddc-i2c-bus = <&i2c3>;
138	pinctrl-names = "default";
139	pinctrl-0 = <&hdmi_cec>;
140	status = "okay";
141};
142
143&i2c0 {
144	clock-frequency = <400000>;
145	i2c-scl-rising-time-ns = <168>;
146	i2c-scl-falling-time-ns = <4>;
147	status = "okay";
148
149	vdd_cpu_b: regulator@40 {
150		compatible = "silergy,syr827";
151		reg = <0x40>;
152		fcs,suspend-voltage-selector = <1>;
153		regulator-name = "vdd_cpu_b";
154		regulator-min-microvolt = <712500>;
155		regulator-max-microvolt = <1500000>;
156		regulator-ramp-delay = <1000>;
157		regulator-always-on;
158		regulator-boot-on;
159		vin-supply = <&vcc_sys>;
160		status = "okay";
161
162		regulator-state-mem {
163			regulator-off-in-suspend;
164		};
165	};
166
167	vdd_gpu: regulator@41 {
168		compatible = "silergy,syr828";
169		reg = <0x41>;
170		fcs,suspend-voltage-selector = <1>;
171		regulator-name = "vdd_gpu";
172		regulator-min-microvolt = <712500>;
173		regulator-max-microvolt = <1500000>;
174		regulator-ramp-delay = <1000>;
175		regulator-always-on;
176		regulator-boot-on;
177		vin-supply = <&vcc_sys>;
178		regulator-state-mem {
179			regulator-off-in-suspend;
180		};
181	};
182
183	rk808: pmic@1b {
184		compatible = "rockchip,rk808";
185		reg = <0x1b>;
186		interrupt-parent = <&gpio1>;
187		interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
188		pinctrl-names = "default";
189		pinctrl-0 = <&pmic_int_l>;
190		rockchip,system-power-controller;
191		wakeup-source;
192		#clock-cells = <1>;
193		clock-output-names = "xin32k", "rk808-clkout2";
194
195		vcc1-supply = <&vcc_sys>;
196		vcc2-supply = <&vcc_sys>;
197		vcc3-supply = <&vcc_sys>;
198		vcc4-supply = <&vcc_sys>;
199		vcc6-supply = <&vcc_sys>;
200		vcc7-supply = <&vcc_sys>;
201		vcc8-supply = <&vcc3v3_sys>;
202		vcc9-supply = <&vcc_sys>;
203		vcc10-supply = <&vcc_sys>;
204		vcc11-supply = <&vcc_sys>;
205		vcc12-supply = <&vcc3v3_sys>;
206		vddio-supply = <&vcc_1v8>;
207
208		regulators {
209			vdd_center: DCDC_REG1 {
210				regulator-name = "vdd_center";
211				regulator-min-microvolt = <750000>;
212				regulator-max-microvolt = <1350000>;
213				regulator-always-on;
214				regulator-boot-on;
215				regulator-state-mem {
216					regulator-off-in-suspend;
217				};
218			};
219
220			vdd_cpu_l: DCDC_REG2 {
221				regulator-name = "vdd_cpu_l";
222				regulator-min-microvolt = <750000>;
223				regulator-max-microvolt = <1350000>;
224				regulator-always-on;
225				regulator-boot-on;
226				regulator-state-mem {
227					regulator-off-in-suspend;
228				};
229			};
230
231			vcc_ddr: DCDC_REG3 {
232				regulator-name = "vcc_ddr";
233				regulator-always-on;
234				regulator-boot-on;
235				regulator-state-mem {
236					regulator-on-in-suspend;
237				};
238			};
239
240			vcc_1v8: DCDC_REG4 {
241				regulator-name = "vcc_1v8";
242				regulator-min-microvolt = <1800000>;
243				regulator-max-microvolt = <1800000>;
244				regulator-always-on;
245				regulator-boot-on;
246				regulator-state-mem {
247					regulator-on-in-suspend;
248					regulator-suspend-microvolt = <1800000>;
249				};
250			};
251
252			vcc1v8_dvp: LDO_REG1 {
253				regulator-name = "vcc1v8_dvp";
254				regulator-min-microvolt = <1800000>;
255				regulator-max-microvolt = <1800000>;
256				regulator-always-on;
257				regulator-boot-on;
258				regulator-state-mem {
259					regulator-on-in-suspend;
260					regulator-suspend-microvolt = <1800000>;
261				};
262			};
263
264			vcca1v8_hdmi: LDO_REG2 {
265				regulator-name = "vcca1v8_hdmi";
266				regulator-min-microvolt = <1800000>;
267				regulator-max-microvolt = <1800000>;
268				regulator-always-on;
269				regulator-boot-on;
270				regulator-state-mem {
271					regulator-on-in-suspend;
272					regulator-suspend-microvolt = <1800000>;
273				};
274			};
275
276			vcca_1v8: LDO_REG3 {
277				regulator-name = "vcca_1v8";
278				regulator-min-microvolt = <1800000>;
279				regulator-max-microvolt = <1800000>;
280				regulator-always-on;
281				regulator-boot-on;
282				regulator-state-mem {
283					regulator-on-in-suspend;
284					regulator-suspend-microvolt = <1800000>;
285				};
286			};
287
288			vcc_sd: LDO_REG4 {
289				regulator-name = "vcc_sd";
290				regulator-min-microvolt = <1800000>;
291				regulator-max-microvolt = <3300000>;
292				regulator-always-on;
293				regulator-boot-on;
294				regulator-state-mem {
295					regulator-on-in-suspend;
296					regulator-suspend-microvolt = <3300000>;
297				};
298			};
299
300			vcc3v0_sd: LDO_REG5 {
301				regulator-name = "vcc3v0_sd";
302				regulator-min-microvolt = <3000000>;
303				regulator-max-microvolt = <3000000>;
304				regulator-always-on;
305				regulator-boot-on;
306				regulator-state-mem {
307					regulator-on-in-suspend;
308					regulator-suspend-microvolt = <3000000>;
309				};
310			};
311
312			vcc_1v5: LDO_REG6 {
313				regulator-name = "vcc_1v5";
314				regulator-min-microvolt = <1500000>;
315				regulator-max-microvolt = <1500000>;
316				regulator-always-on;
317				regulator-boot-on;
318				regulator-state-mem {
319					regulator-on-in-suspend;
320					regulator-suspend-microvolt = <1500000>;
321				};
322			};
323
324			vcca0v9_hdmi: LDO_REG7 {
325				regulator-name = "vcca0v9_hdmi";
326				regulator-min-microvolt = <900000>;
327				regulator-max-microvolt = <900000>;
328				regulator-always-on;
329				regulator-boot-on;
330				regulator-state-mem {
331					regulator-on-in-suspend;
332					regulator-suspend-microvolt = <900000>;
333				};
334			};
335
336			vcc_3v0: LDO_REG8 {
337				regulator-name = "vcc_3v0";
338				regulator-min-microvolt = <3000000>;
339				regulator-max-microvolt = <3000000>;
340				regulator-always-on;
341				regulator-boot-on;
342				regulator-state-mem {
343					regulator-on-in-suspend;
344					regulator-suspend-microvolt = <3000000>;
345				};
346			};
347
348			vcc3v3_s3: SWITCH_REG1 {
349				regulator-name = "vcc3v3_s3";
350				regulator-always-on;
351				regulator-boot-on;
352				regulator-state-mem {
353					regulator-on-in-suspend;
354				};
355			};
356
357			vcc3v3_s0: SWITCH_REG2 {
358				regulator-name = "vcc3v3_s0";
359				regulator-always-on;
360				regulator-boot-on;
361				regulator-state-mem {
362					regulator-on-in-suspend;
363				};
364			};
365		};
366	};
367};
368
369&i2c1 {
370	status = "okay";
371};
372
373&i2c2 {
374	status = "okay";
375};
376
377&i2c3 {
378	status = "okay";
379};
380
381&i2c4 {
382	status = "okay";
383};
384
385&io_domains {
386	bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
387	audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
388	sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
389	gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
390	status = "okay";
391};
392
393&pcie_phy {
394	status = "okay";
395};
396
397&pcie0 {
398	ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
399	num-lanes = <4>;
400	pinctrl-names = "default";
401	pinctrl-0 = <&pcie_clkreqn_cpm>;
402	vpcie3v3-supply = <&vcc3v3_pcie>;
403	status = "okay";
404};
405
406&pmu_io_domains {
407	pmu1830-supply = <&vcc_1v8>;
408	status = "okay";
409};
410
411&pinctrl {
412	gmac {
413		rgmii_sleep_pins: rgmii-sleep-pins {
414			rockchip,pins =
415				<3 15 RK_FUNC_GPIO &pcfg_output_low>;
416		};
417	};
418
419	sdmmc {
420		sdmmc_bus1: sdmmc-bus1 {
421			rockchip,pins =
422				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>;
423		};
424
425		sdmmc_bus4: sdmmc-bus4 {
426			rockchip,pins =
427				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>,
428				<4 9 RK_FUNC_1 &pcfg_pull_up_8ma>,
429				<4 10 RK_FUNC_1 &pcfg_pull_up_8ma>,
430				<4 11 RK_FUNC_1 &pcfg_pull_up_8ma>;
431		};
432
433		sdmmc_clk: sdmmc-clk {
434			rockchip,pins =
435				<4 12 RK_FUNC_1 &pcfg_pull_none_18ma>;
436		};
437
438		sdmmc_cmd: sdmmc-cmd {
439			rockchip,pins =
440				<4 13 RK_FUNC_1 &pcfg_pull_up_8ma>;
441		};
442	};
443
444	pcie {
445		pcie_drv: pcie-drv {
446			rockchip,pins =
447				<1 24 RK_FUNC_GPIO &pcfg_pull_none>;
448			};
449	};
450
451	pmic {
452		pmic_int_l: pmic-int-l {
453			rockchip,pins =
454				<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
455		};
456
457		vsel1_gpio: vsel1-gpio {
458			rockchip,pins =
459				<1 17 RK_FUNC_GPIO &pcfg_pull_down>;
460		};
461
462		vsel2_gpio: vsel2-gpio {
463			rockchip,pins =
464				<1 14 RK_FUNC_GPIO &pcfg_pull_down>;
465		};
466	};
467
468	usb2 {
469		host_vbus_drv: host-vbus-drv {
470			rockchip,pins =
471				<4 27 RK_FUNC_GPIO &pcfg_pull_none>;
472		};
473	};
474};
475
476&pwm2 {
477	status = "okay";
478};
479
480&pwm3 {
481	status = "okay";
482};
483
484&sdhci {
485	bus-width = <8>;
486	mmc-hs400-1_8v;
487	mmc-hs400-enhanced-strobe;
488	non-removable;
489	status = "okay";
490};
491
492&sdmmc {
493	bus-width = <4>;
494	cap-mmc-highspeed;
495	cap-sd-highspeed;
496	clock-frequency = <100000000>;
497	clock-freq-min-max = <100000 100000000>;
498	disable-wp;
499	sd-uhs-sdr104;
500	vqmmc-supply = <&vcc_sd>;
501	card-detect-delay = <800>;
502	pinctrl-names = "default";
503	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
504	status = "okay";
505};
506
507&tcphy0 {
508	status = "okay";
509};
510
511&tcphy1 {
512	status = "okay";
513};
514
515&u2phy0 {
516	status = "okay";
517};
518
519&u2phy1 {
520	status = "okay";
521};
522
523&u2phy0_host {
524	phy-supply = <&vcc5v0_host>;
525	status = "okay";
526};
527
528&u2phy1_host {
529	phy-supply = <&vcc5v0_host>;
530	status = "okay";
531};
532
533&u2phy0_otg {
534	status = "okay";
535};
536
537&u2phy1_otg {
538	status = "okay";
539};
540
541&uart0 {
542	pinctrl-names = "default";
543	pinctrl-0 = <&uart0_xfer &uart0_cts>;
544	status = "okay";
545};
546
547&uart2 {
548	status = "okay";
549};
550
551&usb_host0_ehci {
552	status = "okay";
553};
554
555&usb_host0_ohci {
556	status = "okay";
557};
558
559&usb_host1_ehci {
560	status = "okay";
561};
562
563&usb_host1_ohci {
564	status = "okay";
565};
566
567&usbdrd3_0 {
568	status = "okay";
569};
570
571&usbdrd_dwc3_0 {
572	status = "okay";
573	dr_mode = "host";
574};
575
576&usbdrd3_1 {
577	status = "okay";
578};
579
580&usbdrd_dwc3_1 {
581	status = "okay";
582	dr_mode = "host";
583};
584
585&vopb {
586	status = "okay";
587};
588
589&vopb_mmu {
590	status = "okay";
591};
592
593&vopl {
594	status = "okay";
595};
596
597&vopl_mmu {
598	status = "okay";
599};
600