xref: /linux/scripts/dtc/include-prefixes/arm64/rockchip/rk3566-onething-edge-cube.dts (revision e65f4718a577fcc84d40431f022985898b6dbf2e)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include <dt-bindings/pwm/pwm.h>
9#include "rk3566.dtsi"
10
11/ {
12	model = "OneThing Edge Cube (OEC)/OEC Turbo";
13	compatible = "onething,edge-cube", "rockchip,rk3566";
14
15	aliases {
16		ethernet0 = &gmac1;
17		mmc0 = &sdhci;
18	};
19
20	chosen: chosen {
21		stdout-path = "serial2:1500000n8";
22	};
23
24	gmac1_clkin: external-gmac1-clock {
25		compatible = "fixed-clock";
26		clock-frequency = <125000000>;
27		clock-output-names = "gmac1_clkin";
28		#clock-cells = <0>;
29	};
30
31	leds {
32		compatible = "gpio-leds";
33
34		rgb_led_b: led-0 {
35			color = <LED_COLOR_ID_BLUE>;
36			default-state = "off";
37			function = LED_FUNCTION_STATUS;
38			gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
39			pinctrl-names = "default";
40			pinctrl-0 = <&rgb_led_b_enable_l>;
41		};
42
43		rgb_led_g: led-1 {
44			color = <LED_COLOR_ID_GREEN>;
45			default-state = "on";
46			function = LED_FUNCTION_STATUS;
47			gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
48			pinctrl-names = "default";
49			pinctrl-0 = <&rgb_led_g_enable_l>;
50		};
51
52		rgb_led_r: led-2 {
53			color = <LED_COLOR_ID_RED>;
54			default-state = "off";
55			function = LED_FUNCTION_STATUS;
56			gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>;
57			pinctrl-names = "default";
58			pinctrl-0 = <&rgb_led_r_enable_l>;
59		};
60	};
61
62	vcc_1v8: regulator-vcc-1v8 {
63		compatible = "regulator-fixed";
64		regulator-name = "vcc_1v8";
65		regulator-always-on;
66		regulator-boot-on;
67		regulator-min-microvolt = <1800000>;
68		regulator-max-microvolt = <1800000>;
69		vin-supply = <&vcc5v0_sys>;
70	};
71
72	vcc_3v3: regulator-vcc-3v3 {
73		compatible = "regulator-fixed";
74		regulator-name = "vcc_3v3";
75		regulator-always-on;
76		regulator-boot-on;
77		regulator-min-microvolt = <3300000>;
78		regulator-max-microvolt = <3300000>;
79		vin-supply = <&vcc5v0_sys>;
80	};
81
82	vcc12v0_dcin: regulator-vcc12v0-dcin {
83		compatible = "regulator-fixed";
84		regulator-name = "vcc12v0_dcin";
85		regulator-always-on;
86		regulator-boot-on;
87		regulator-min-microvolt = <12000000>;
88		regulator-max-microvolt = <12000000>;
89	};
90
91	vcc3v3_sys: regulator-vcc3v3-sys {
92		compatible = "regulator-fixed";
93		regulator-name = "vcc3v3_sys";
94		regulator-always-on;
95		regulator-boot-on;
96		regulator-min-microvolt = <3300000>;
97		regulator-max-microvolt = <3300000>;
98		vin-supply = <&vcc12v0_dcin>;
99	};
100
101	vcc5v0_sys: regulator-vcc5v0-sys {
102		compatible = "regulator-fixed";
103		regulator-name = "vcc5v0_sys";
104		regulator-always-on;
105		regulator-boot-on;
106		regulator-min-microvolt = <5000000>;
107		regulator-max-microvolt = <5000000>;
108		vin-supply = <&vcc12v0_dcin>;
109	};
110
111	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
112		compatible = "regulator-fixed";
113		enable-active-high;
114		gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
115		pinctrl-names = "default";
116		pinctrl-0 = <&vcc5v0_usb_host_en>;
117		regulator-name = "vcc5v0_usb_host";
118		regulator-min-microvolt = <5000000>;
119		regulator-max-microvolt = <5000000>;
120		vin-supply = <&vcc5v0_sys>;
121	};
122
123	vdd_cpu: regulator-vdd-cpu {
124		compatible = "pwm-regulator";
125		pwms = <&pwm0 0 5000 PWM_POLARITY_INVERTED>;
126		regulator-always-on;
127		regulator-boot-on;
128		regulator-name = "vdd_cpu";
129		regulator-min-microvolt = <800000>;
130		regulator-max-microvolt = <1200000>;
131		regulator-settling-time-up-us = <250>;
132		pwm-supply = <&vcc5v0_sys>;
133	};
134
135	vdd_fixed: regulator-vdd-fixed {
136		compatible = "regulator-fixed";
137		regulator-always-on;
138		regulator-boot-on;
139		regulator-name = "vdd_fixed";
140		regulator-min-microvolt = <950000>;
141		regulator-max-microvolt = <950000>;
142		vin-supply = <&vcc5v0_sys>;
143	};
144
145	vdd_logic: regulator-vdd-logic {
146		compatible = "pwm-regulator";
147		pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
148		regulator-name = "vdd_logic";
149		regulator-always-on;
150		regulator-boot-on;
151		regulator-min-microvolt = <800000>;
152		regulator-max-microvolt = <1100000>;
153		regulator-settling-time-up-us = <250>;
154		pwm-supply = <&vcc5v0_sys>;
155	};
156};
157
158
159/* No hardware video output port */
160&display_subsystem {
161	status = "disabled";
162};
163
164&combphy1 {
165	status = "okay";
166};
167
168&combphy2 {
169	status = "okay";
170};
171
172&cpu0 {
173	cpu-supply = <&vdd_cpu>;
174};
175
176&cpu1 {
177	cpu-supply = <&vdd_cpu>;
178};
179
180&cpu2 {
181	cpu-supply = <&vdd_cpu>;
182};
183
184&cpu3 {
185	cpu-supply = <&vdd_cpu>;
186};
187
188&gmac1 {
189	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
190	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
191	clock_in_out = "input";
192	phy-handle = <&rgmii_phy1>;
193	phy-mode = "rgmii-id";
194	pinctrl-names = "default";
195	pinctrl-0 = <&gmac1m1_miim
196		    &gmac1m1_tx_bus2
197		    &gmac1m1_rx_bus2
198		    &gmac1m1_rgmii_clk
199		    &gmac1m1_rgmii_bus
200		    &gmac1m1_clkinout>;
201	status = "okay";
202};
203
204&gpu {
205	status = "okay";
206};
207
208&mdio1 {
209	rgmii_phy1: ethernet-phy@1 {
210		compatible = "ethernet-phy-ieee802.3-c22";
211		reg = <0x1>;
212		reset-assert-us = <20000>;
213		reset-deassert-us = <100000>;
214		reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
215	};
216};
217
218&pinctrl {
219	gmac {
220		eth_phy_reset_pin: eth-phy-reset-pin {
221			rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
222		};
223	};
224
225	leds {
226		rgb_led_b_enable_l: rgb-led-b-enable-l {
227			rockchip,pins = <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
228		};
229
230		rgb_led_g_enable_l: rgb-led-g-enable-l {
231			rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
232		};
233
234		rgb_led_r_enable_l: rgb-led-r-enable-l {
235			rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
236		};
237	};
238
239	usb {
240		vcc5v0_usb_host_en: vcc5v0-usb-host-en {
241			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
242		};
243	};
244};
245
246&pmu_io_domains {
247	pmuio1-supply = <&vcc_3v3>;
248	pmuio2-supply = <&vcc_3v3>;
249	vccio1-supply = <&vcc_1v8>;
250	vccio3-supply = <&vcc_3v3>;
251	vccio4-supply = <&vcc_1v8>;
252	vccio5-supply = <&vcc_3v3>;
253	vccio6-supply = <&vcc_1v8>;
254	vccio7-supply = <&vcc_3v3>;
255	status = "okay";
256};
257
258&pwm0 {
259	status = "okay";
260};
261
262&pwm1 {
263	status = "okay";
264};
265
266&saradc {
267	vref-supply = <&vcc_1v8>;
268	status = "okay";
269};
270
271&sata2 {
272	status = "okay";
273};
274
275&sdhci {
276	bus-width = <8>;
277	cap-mmc-highspeed;
278	mmc-hs200-1_8v;
279	no-sd;
280	no-sdio;
281	non-removable;
282	pinctrl-names = "default";
283	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
284	status = "okay";
285};
286
287&tsadc {
288	rockchip,hw-tshut-mode = <1>;
289	rockchip,hw-tshut-polarity = <0>;
290	status = "okay";
291};
292
293&uart2 {
294	status = "okay";
295};
296
297&usb_host0_ehci {
298	status = "okay";
299};
300
301&usb_host0_ohci {
302	status = "okay";
303};
304
305&usb_host1_ehci {
306	status = "okay";
307};
308
309&usb_host1_ohci {
310	status = "okay";
311};
312
313&usb_host1_xhci  {
314	status = "okay";
315};
316
317&usb2phy0 {
318	status = "okay";
319};
320
321&usb2phy0_host {
322	phy-supply = <&vcc5v0_usb_host>;
323	status = "okay";
324};
325
326&usb2phy0_otg {
327	status = "okay";
328};
329
330&usb2phy1 {
331	status = "okay";
332};
333
334&usb2phy1_host {
335	phy-supply = <&vcc5v0_usb_host>;
336	status = "okay";
337};
338
339&usb2phy1_otg {
340	phy-supply = <&vcc5v0_usb_host>;
341	status = "okay";
342};
343