xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3568-fastrhino-r66s.dtsi (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3/dts-v1/;
4#include <dt-bindings/gpio/gpio.h>
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include <dt-bindings/soc/rockchip,vop2.h>
9#include "rk3568.dtsi"
10
11/ {
12	chosen: chosen {
13		stdout-path = "serial2:1500000n8";
14	};
15
16	gpio-keys {
17		compatible = "gpio-keys";
18		pinctrl-names = "default";
19		pinctrl-0 = <&reset_button_pin>;
20
21		button-reset {
22			debounce-interval = <50>;
23			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
24			label = "reset";
25			linux,code = <KEY_RESTART>;
26		};
27	};
28
29	gpio-leds {
30		compatible = "gpio-leds";
31		pinctrl-names = "default";
32		pinctrl-0 = <&status_led_pin>;
33
34		status_led: led-status {
35			color = <LED_COLOR_ID_BLUE>;
36			function = LED_FUNCTION_STATUS;
37			gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
38			linux,default-trigger = "heartbeat";
39		};
40	};
41
42	dc_12v: dc-12v-regulator {
43		compatible = "regulator-fixed";
44		regulator-name = "dc_12v";
45		regulator-always-on;
46		regulator-boot-on;
47		regulator-min-microvolt = <12000000>;
48		regulator-max-microvolt = <12000000>;
49	};
50
51	vcc3v3_pcie: vcc3v3-pcie-regulator {
52		compatible = "regulator-fixed";
53		regulator-name = "vcc3v3_pcie";
54		regulator-always-on;
55		regulator-boot-on;
56		regulator-min-microvolt = <3300000>;
57		regulator-max-microvolt = <3300000>;
58		vin-supply = <&vcc5v0_sys>;
59	};
60
61	vcc3v3_sys: vcc3v3-sys-regulator {
62		compatible = "regulator-fixed";
63		regulator-name = "vcc3v3_sys";
64		regulator-always-on;
65		regulator-boot-on;
66		regulator-min-microvolt = <3300000>;
67		regulator-max-microvolt = <3300000>;
68		vin-supply = <&dc_12v>;
69	};
70
71	vcc5v0_sys: vcc5v0-sys-regulator {
72		compatible = "regulator-fixed";
73		regulator-name = "vcc5v0_sys";
74		regulator-always-on;
75		regulator-boot-on;
76		regulator-min-microvolt = <5000000>;
77		regulator-max-microvolt = <5000000>;
78		vin-supply = <&dc_12v>;
79	};
80
81	vcc5v0_usb_host: vcc5v0-usb-host-regulator {
82		compatible = "regulator-fixed";
83		regulator-name = "vcc5v0_usb_host";
84		regulator-always-on;
85		regulator-boot-on;
86		regulator-min-microvolt = <5000000>;
87		regulator-max-microvolt = <5000000>;
88	};
89
90	vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
91		compatible = "regulator-fixed";
92		enable-active-high;
93		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
94		pinctrl-names = "default";
95		pinctrl-0 = <&vcc5v0_usb_otg_en>;
96		regulator-name = "vcc5v0_usb_otg";
97		regulator-always-on;
98		regulator-boot-on;
99	};
100};
101
102&combphy0 {
103	status = "okay";
104};
105
106&combphy1 {
107	status = "okay";
108};
109
110&cpu0 {
111	cpu-supply = <&vdd_cpu>;
112};
113
114&cpu1 {
115	cpu-supply = <&vdd_cpu>;
116};
117
118&cpu2 {
119	cpu-supply = <&vdd_cpu>;
120};
121
122&cpu3 {
123	cpu-supply = <&vdd_cpu>;
124};
125
126&gpu {
127	mali-supply = <&vdd_gpu>;
128	status = "okay";
129};
130
131&i2c0 {
132	status = "okay";
133
134	vdd_cpu: regulator@1c {
135		compatible = "tcs,tcs4525";
136		reg = <0x1c>;
137		fcs,suspend-voltage-selector = <1>;
138		regulator-name = "vdd_cpu";
139		regulator-always-on;
140		regulator-boot-on;
141		regulator-min-microvolt = <800000>;
142		regulator-max-microvolt = <1150000>;
143		regulator-ramp-delay = <2300>;
144		vin-supply = <&vcc5v0_sys>;
145
146		regulator-state-mem {
147			regulator-off-in-suspend;
148		};
149	};
150
151	rk809: pmic@20 {
152		compatible = "rockchip,rk809";
153		reg = <0x20>;
154		interrupt-parent = <&gpio0>;
155		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
156		#clock-cells = <1>;
157		pinctrl-names = "default";
158		pinctrl-0 = <&pmic_int>;
159		rockchip,system-power-controller;
160		vcc1-supply = <&vcc3v3_sys>;
161		vcc2-supply = <&vcc3v3_sys>;
162		vcc3-supply = <&vcc3v3_sys>;
163		vcc4-supply = <&vcc3v3_sys>;
164		vcc5-supply = <&vcc3v3_sys>;
165		vcc6-supply = <&vcc3v3_sys>;
166		vcc7-supply = <&vcc3v3_sys>;
167		vcc8-supply = <&vcc3v3_sys>;
168		vcc9-supply = <&vcc3v3_sys>;
169		wakeup-source;
170
171		regulators {
172			vdd_logic: DCDC_REG1 {
173				regulator-name = "vdd_logic";
174				regulator-always-on;
175				regulator-boot-on;
176				regulator-initial-mode = <0x2>;
177				regulator-min-microvolt = <500000>;
178				regulator-max-microvolt = <1350000>;
179				regulator-ramp-delay = <6001>;
180
181				regulator-state-mem {
182					regulator-off-in-suspend;
183				};
184			};
185
186			vdd_gpu: DCDC_REG2 {
187				regulator-name = "vdd_gpu";
188				regulator-always-on;
189				regulator-initial-mode = <0x2>;
190				regulator-min-microvolt = <500000>;
191				regulator-max-microvolt = <1350000>;
192				regulator-ramp-delay = <6001>;
193
194				regulator-state-mem {
195					regulator-off-in-suspend;
196				};
197			};
198
199			vcc_ddr: DCDC_REG3 {
200				regulator-name = "vcc_ddr";
201				regulator-always-on;
202				regulator-boot-on;
203				regulator-initial-mode = <0x2>;
204
205				regulator-state-mem {
206					regulator-on-in-suspend;
207				};
208			};
209
210			vdd_npu: DCDC_REG4 {
211				regulator-name = "vdd_npu";
212				regulator-initial-mode = <0x2>;
213				regulator-min-microvolt = <500000>;
214				regulator-max-microvolt = <1350000>;
215				regulator-ramp-delay = <6001>;
216
217				regulator-state-mem {
218					regulator-off-in-suspend;
219				};
220			};
221
222			vcc_1v8: DCDC_REG5 {
223				regulator-name = "vcc_1v8";
224				regulator-always-on;
225				regulator-boot-on;
226				regulator-min-microvolt = <1800000>;
227				regulator-max-microvolt = <1800000>;
228
229				regulator-state-mem {
230					regulator-off-in-suspend;
231				};
232			};
233
234			vdda0v9_image: LDO_REG1 {
235				regulator-name = "vdda0v9_image";
236				regulator-min-microvolt = <950000>;
237				regulator-max-microvolt = <950000>;
238
239				regulator-state-mem {
240					regulator-off-in-suspend;
241				};
242			};
243
244			vdda_0v9: LDO_REG2 {
245				regulator-name = "vdda_0v9";
246				regulator-always-on;
247				regulator-boot-on;
248				regulator-min-microvolt = <900000>;
249				regulator-max-microvolt = <900000>;
250
251				regulator-state-mem {
252					regulator-off-in-suspend;
253				};
254			};
255
256			vdda0v9_pmu: LDO_REG3 {
257				regulator-name = "vdda0v9_pmu";
258				regulator-always-on;
259				regulator-boot-on;
260				regulator-min-microvolt = <900000>;
261				regulator-max-microvolt = <900000>;
262
263				regulator-state-mem {
264					regulator-on-in-suspend;
265					regulator-suspend-microvolt = <900000>;
266				};
267			};
268
269			vccio_acodec: LDO_REG4 {
270				regulator-name = "vccio_acodec";
271				regulator-always-on;
272				regulator-min-microvolt = <3300000>;
273				regulator-max-microvolt = <3300000>;
274
275				regulator-state-mem {
276					regulator-off-in-suspend;
277				};
278			};
279
280			vccio_sd: LDO_REG5 {
281				regulator-name = "vccio_sd";
282				regulator-min-microvolt = <1800000>;
283				regulator-max-microvolt = <3300000>;
284
285				regulator-state-mem {
286					regulator-off-in-suspend;
287				};
288			};
289
290			vcc3v3_pmu: LDO_REG6 {
291				regulator-name = "vcc3v3_pmu";
292				regulator-always-on;
293				regulator-boot-on;
294				regulator-min-microvolt = <3300000>;
295				regulator-max-microvolt = <3300000>;
296
297				regulator-state-mem {
298					regulator-on-in-suspend;
299					regulator-suspend-microvolt = <3300000>;
300				};
301			};
302
303			vcca_1v8: LDO_REG7 {
304				regulator-name = "vcca_1v8";
305				regulator-always-on;
306				regulator-boot-on;
307				regulator-min-microvolt = <1800000>;
308				regulator-max-microvolt = <1800000>;
309
310				regulator-state-mem {
311					regulator-off-in-suspend;
312				};
313			};
314
315			vcca1v8_pmu: LDO_REG8 {
316				regulator-name = "vcca1v8_pmu";
317				regulator-always-on;
318				regulator-boot-on;
319				regulator-min-microvolt = <1800000>;
320				regulator-max-microvolt = <1800000>;
321
322				regulator-state-mem {
323					regulator-on-in-suspend;
324					regulator-suspend-microvolt = <1800000>;
325				};
326			};
327
328			vcca1v8_image: LDO_REG9 {
329				regulator-name = "vcca1v8_image";
330				regulator-min-microvolt = <950000>;
331				regulator-max-microvolt = <1800000>;
332
333				regulator-state-mem {
334					regulator-off-in-suspend;
335					regulator-suspend-microvolt = <950000>;
336				};
337			};
338
339			vcc_3v3: SWITCH_REG1 {
340				regulator-name = "vcc_3v3";
341				regulator-always-on;
342				regulator-boot-on;
343
344				regulator-state-mem {
345					regulator-off-in-suspend;
346				};
347			};
348
349			vcc3v3_sd: SWITCH_REG2 {
350				regulator-name = "vcc3v3_sd";
351
352				regulator-state-mem {
353					regulator-off-in-suspend;
354				};
355			};
356		};
357	};
358};
359
360&pcie30phy {
361	data-lanes = <1 2>;
362	status = "okay";
363};
364
365&pcie3x1 {
366	num-lanes = <1>;
367	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
368	vpcie3v3-supply = <&vcc3v3_pcie>;
369	status = "okay";
370};
371
372&pcie3x2 {
373	num-lanes = <1>;
374	reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
375	vpcie3v3-supply = <&vcc3v3_pcie>;
376	status = "okay";
377};
378
379&pinctrl {
380	gpio-leds {
381		status_led_pin: status-led-pin {
382			rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
383		};
384	};
385
386	pmic {
387		pmic_int: pmic-int {
388			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
389		};
390	};
391
392	rockchip-key {
393		reset_button_pin: reset-button-pin {
394			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
395		};
396	};
397
398	usb {
399		vcc5v0_usb_otg_en: vcc5v0-usb-otg-en {
400			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
401		};
402	};
403};
404
405&pmu_io_domains {
406	pmuio1-supply = <&vcc3v3_pmu>;
407	pmuio2-supply = <&vcc3v3_pmu>;
408	vccio1-supply = <&vccio_acodec>;
409	vccio3-supply = <&vccio_sd>;
410	vccio4-supply = <&vcc_1v8>;
411	vccio5-supply = <&vcc_3v3>;
412	vccio6-supply = <&vcc_1v8>;
413	vccio7-supply = <&vcc_3v3>;
414	status = "okay";
415};
416
417&saradc {
418	vref-supply = <&vcca_1v8>;
419	status = "okay";
420};
421
422&tsadc {
423	rockchip,hw-tshut-mode = <1>;
424	rockchip,hw-tshut-polarity = <0>;
425	status = "okay";
426};
427
428&uart2 {
429	status = "okay";
430};
431
432&usb_host0_ehci {
433	status = "okay";
434};
435
436&usb_host0_ohci {
437	status = "okay";
438};
439
440&usb_host0_xhci {
441	dr_mode = "host";
442	extcon = <&usb2phy0>;
443	status = "okay";
444};
445
446&usb_host1_ehci {
447	status = "okay";
448};
449
450&usb_host1_ohci {
451	status = "okay";
452};
453
454&usb_host1_xhci {
455	status = "okay";
456};
457
458&usb2phy0 {
459	status = "okay";
460};
461
462&usb2phy0_host {
463	phy-supply = <&vcc5v0_usb_host>;
464	status = "okay";
465};
466
467&usb2phy0_otg {
468	phy-supply = <&vcc5v0_usb_otg>;
469	status = "okay";
470};
471
472&vop {
473	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
474	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
475	status = "okay";
476};
477
478&vop_mmu {
479	status = "okay";
480};
481