1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/input/input.h>
6#include "rk3229.dtsi"
7
8/ {
9	model = "Rockchip RK3229 Evaluation board";
10	compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
11
12	memory@60000000 {
13		device_type = "memory";
14		reg = <0x60000000 0x40000000>;
15	};
16
17	dc_12v: dc-12v-regulator {
18		compatible = "regulator-fixed";
19		regulator-name = "dc_12v";
20		regulator-always-on;
21		regulator-boot-on;
22		regulator-min-microvolt = <12000000>;
23		regulator-max-microvolt = <12000000>;
24	};
25
26	ext_gmac: ext_gmac {
27		compatible = "fixed-clock";
28		clock-frequency = <125000000>;
29		clock-output-names = "ext_gmac";
30		#clock-cells = <0>;
31	};
32
33	vcc_host: vcc-host-regulator {
34		compatible = "regulator-fixed";
35		enable-active-high;
36		gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
37		pinctrl-names = "default";
38		pinctrl-0 = <&host_vbus_drv>;
39		regulator-name = "vcc_host";
40		regulator-always-on;
41		regulator-boot-on;
42		vin-supply = <&vcc_sys>;
43	};
44
45	vcc_phy: vcc-phy-regulator {
46		compatible = "regulator-fixed";
47		enable-active-high;
48		regulator-name = "vcc_phy";
49		regulator-min-microvolt = <1800000>;
50		regulator-max-microvolt = <1800000>;
51		regulator-always-on;
52		regulator-boot-on;
53		vin-supply = <&vccio_1v8>;
54	};
55
56	vcc_sys: vcc-sys-regulator {
57		compatible = "regulator-fixed";
58		regulator-name = "vcc_sys";
59		regulator-always-on;
60		regulator-boot-on;
61		regulator-min-microvolt = <5000000>;
62		regulator-max-microvolt = <5000000>;
63		vin-supply = <&dc_12v>;
64	};
65
66	vccio_1v8: vccio-1v8-regulator {
67		compatible = "regulator-fixed";
68		regulator-name = "vccio_1v8";
69		regulator-min-microvolt = <1800000>;
70		regulator-max-microvolt = <1800000>;
71		regulator-always-on;
72		vin-supply = <&vcc_sys>;
73	};
74
75	vccio_3v3: vccio-3v3-regulator {
76		compatible = "regulator-fixed";
77		regulator-name = "vccio_3v3";
78		regulator-min-microvolt = <3300000>;
79		regulator-max-microvolt = <3300000>;
80		regulator-always-on;
81		vin-supply = <&vcc_sys>;
82	};
83
84	vdd_arm: vdd-arm-regulator {
85		compatible = "pwm-regulator";
86		pwms = <&pwm1 0 25000 1>;
87		pwm-supply = <&vcc_sys>;
88		regulator-name = "vdd_arm";
89		regulator-min-microvolt = <950000>;
90		regulator-max-microvolt = <1400000>;
91		regulator-always-on;
92		regulator-boot-on;
93	};
94
95	vdd_log: vdd-log-regulator {
96		compatible = "pwm-regulator";
97		pwms = <&pwm2 0 25000 1>;
98		pwm-supply = <&vcc_sys>;
99		regulator-name = "vdd_log";
100		regulator-min-microvolt = <1000000>;
101		regulator-max-microvolt = <1300000>;
102		regulator-always-on;
103		regulator-boot-on;
104	};
105
106	gpio_keys {
107		compatible = "gpio-keys";
108		autorepeat;
109		pinctrl-names = "default";
110		pinctrl-0 = <&pwr_key>;
111
112		power_key: power-key {
113			label = "GPIO Key Power";
114			gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
115			linux,code = <KEY_POWER>;
116			debounce-interval = <100>;
117			wakeup-source;
118		};
119	};
120};
121
122&cpu0 {
123	cpu-supply = <&vdd_arm>;
124};
125
126&cpu1 {
127	cpu-supply = <&vdd_arm>;
128};
129
130&cpu2 {
131	cpu-supply = <&vdd_arm>;
132};
133
134&cpu3 {
135	cpu-supply = <&vdd_arm>;
136};
137
138&emmc {
139	cap-mmc-highspeed;
140	disable-wp;
141	non-removable;
142	status = "okay";
143};
144
145&gmac {
146	assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
147	assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
148	clock_in_out = "input";
149	phy-supply = <&vcc_phy>;
150	phy-mode = "rgmii";
151	pinctrl-names = "default";
152	pinctrl-0 = <&rgmii_pins>;
153	snps,reset-gpio = <&gpio2 RK_PD0 GPIO_ACTIVE_LOW>;
154	snps,reset-active-low;
155	snps,reset-delays-us = <0 10000 1000000>;
156	tx_delay = <0x30>;
157	rx_delay = <0x10>;
158	status = "okay";
159};
160
161&io_domains {
162	status = "okay";
163
164	vccio1-supply = <&vccio_3v3>;
165	vccio2-supply = <&vccio_1v8>;
166	vccio4-supply = <&vccio_3v3>;
167};
168
169&pinctrl {
170	keys {
171		pwr_key: pwr-key {
172			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
173		};
174	};
175
176	usb {
177		host_vbus_drv: host-vbus-drv {
178			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
179		};
180	};
181};
182
183&pwm1 {
184	status = "okay";
185};
186
187&pwm2 {
188	status = "okay";
189};
190
191&tsadc {
192	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
193	status = "okay";
194};
195
196&uart2 {
197	status = "okay";
198};
199
200&u2phy0 {
201	status = "okay";
202
203	u2phy0_otg: otg-port {
204		status = "okay";
205	};
206
207	u2phy0_host: host-port {
208		phy-supply = <&vcc_host>;
209		status = "okay";
210	};
211};
212
213&u2phy1 {
214	status = "okay";
215
216	u2phy1_otg: otg-port {
217		phy-supply = <&vcc_host>;
218		status = "okay";
219	};
220
221	u2phy1_host: host-port {
222		phy-supply = <&vcc_host>;
223		status = "okay";
224	};
225};
226
227&usb_host0_ehci {
228	status = "okay";
229};
230
231&usb_host0_ohci {
232	status = "okay";
233};
234
235&usb_host1_ehci {
236	status = "okay";
237};
238
239&usb_host1_ohci {
240	status = "okay";
241};
242
243&usb_host2_ehci {
244	status = "okay";
245};
246
247&usb_host2_ohci {
248	status = "okay";
249};
250
251&usb_otg {
252	status = "okay";
253};
254