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