1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include "rk3328.dtsi"
8
9/ {
10	model = "Rockchip RK3328 EVB";
11	compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
12
13	aliases {
14		ethernet0 = &gmac2phy;
15		mmc0 = &sdmmc;
16		mmc1 = &sdio;
17		mmc2 = &emmc;
18	};
19
20	chosen {
21		stdout-path = "serial2:1500000n8";
22	};
23
24	dc_12v: dc-12v {
25		compatible = "regulator-fixed";
26		regulator-name = "dc_12v";
27		regulator-always-on;
28		regulator-boot-on;
29		regulator-min-microvolt = <12000000>;
30		regulator-max-microvolt = <12000000>;
31	};
32
33	sdio_pwrseq: sdio-pwrseq {
34		compatible = "mmc-pwrseq-simple";
35		pinctrl-names = "default";
36		pinctrl-0 = <&wifi_enable_h>;
37
38		/*
39		 * On the module itself this is one of these (depending
40		 * on the actual card populated):
41		 * - SDIO_RESET_L_WL_REG_ON
42		 * - PDN (power down when low)
43		 */
44		reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
45	};
46
47	vcc_sd: sdmmc-regulator {
48		compatible = "regulator-fixed";
49		gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
50		pinctrl-names = "default";
51		pinctrl-0 = <&sdmmc0m1_pin>;
52		regulator-name = "vcc_sd";
53		regulator-min-microvolt = <3300000>;
54		regulator-max-microvolt = <3300000>;
55		vin-supply = <&vcc_io>;
56	};
57
58	vcc_sys: vcc-sys {
59		compatible = "regulator-fixed";
60		regulator-name = "vcc_sys";
61		regulator-always-on;
62		regulator-boot-on;
63		regulator-min-microvolt = <5000000>;
64		regulator-max-microvolt = <5000000>;
65		vin-supply = <&dc_12v>;
66	};
67
68	vcc_phy: vcc-phy-regulator {
69		compatible = "regulator-fixed";
70		regulator-name = "vcc_phy";
71		regulator-always-on;
72		regulator-boot-on;
73	};
74};
75
76&cpu0 {
77	cpu-supply = <&vdd_arm>;
78};
79
80&cpu1 {
81	cpu-supply = <&vdd_arm>;
82};
83
84&cpu2 {
85	cpu-supply = <&vdd_arm>;
86};
87
88&cpu3 {
89	cpu-supply = <&vdd_arm>;
90};
91
92&emmc {
93	bus-width = <8>;
94	cap-mmc-highspeed;
95	non-removable;
96	pinctrl-names = "default";
97	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
98	status = "okay";
99};
100
101&gmac2phy {
102	phy-supply = <&vcc_phy>;
103	clock_in_out = "output";
104	assigned-clock-rate = <50000000>;
105	assigned-clocks = <&cru SCLK_MAC2PHY>;
106	assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
107	status = "okay";
108};
109
110&i2c1 {
111	status = "okay";
112
113	rk805: pmic@18 {
114		compatible = "rockchip,rk805";
115		reg = <0x18>;
116		interrupt-parent = <&gpio2>;
117		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
118		#clock-cells = <1>;
119		clock-output-names = "xin32k", "rk805-clkout2";
120		gpio-controller;
121		#gpio-cells = <2>;
122		pinctrl-names = "default";
123		pinctrl-0 = <&pmic_int_l>;
124		rockchip,system-power-controller;
125		wakeup-source;
126
127		vcc1-supply = <&vcc_sys>;
128		vcc2-supply = <&vcc_sys>;
129		vcc3-supply = <&vcc_sys>;
130		vcc4-supply = <&vcc_sys>;
131		vcc5-supply = <&vcc_io>;
132		vcc6-supply = <&vcc_io>;
133
134		regulators {
135			vdd_logic: DCDC_REG1 {
136				regulator-name = "vdd_logic";
137				regulator-min-microvolt = <712500>;
138				regulator-max-microvolt = <1450000>;
139				regulator-always-on;
140				regulator-boot-on;
141				regulator-state-mem {
142					regulator-on-in-suspend;
143					regulator-suspend-microvolt = <1000000>;
144				};
145			};
146
147			vdd_arm: DCDC_REG2 {
148				regulator-name = "vdd_arm";
149				regulator-min-microvolt = <712500>;
150				regulator-max-microvolt = <1450000>;
151				regulator-always-on;
152				regulator-boot-on;
153				regulator-state-mem {
154					regulator-on-in-suspend;
155					regulator-suspend-microvolt = <950000>;
156				};
157			};
158
159			vcc_ddr: DCDC_REG3 {
160				regulator-name = "vcc_ddr";
161				regulator-always-on;
162				regulator-boot-on;
163				regulator-state-mem {
164					regulator-on-in-suspend;
165				};
166			};
167
168			vcc_io: DCDC_REG4 {
169				regulator-name = "vcc_io";
170				regulator-min-microvolt = <3300000>;
171				regulator-max-microvolt = <3300000>;
172				regulator-always-on;
173				regulator-boot-on;
174				regulator-state-mem {
175					regulator-on-in-suspend;
176					regulator-suspend-microvolt = <3300000>;
177				};
178			};
179
180			vcc_18: LDO_REG1 {
181				regulator-name = "vcc_18";
182				regulator-min-microvolt = <1800000>;
183				regulator-max-microvolt = <1800000>;
184				regulator-always-on;
185				regulator-boot-on;
186				regulator-state-mem {
187					regulator-on-in-suspend;
188					regulator-suspend-microvolt = <1800000>;
189				};
190			};
191
192			vcc18_emmc: LDO_REG2 {
193				regulator-name = "vcc18_emmc";
194				regulator-min-microvolt = <1800000>;
195				regulator-max-microvolt = <1800000>;
196				regulator-always-on;
197				regulator-boot-on;
198				regulator-state-mem {
199					regulator-on-in-suspend;
200					regulator-suspend-microvolt = <1800000>;
201				};
202			};
203
204			vdd_10: LDO_REG3 {
205				regulator-name = "vdd_10";
206				regulator-min-microvolt = <1000000>;
207				regulator-max-microvolt = <1000000>;
208				regulator-always-on;
209				regulator-boot-on;
210				regulator-state-mem {
211					regulator-on-in-suspend;
212					regulator-suspend-microvolt = <1000000>;
213				};
214			};
215		};
216	};
217};
218
219&pinctrl {
220	pmic {
221		pmic_int_l: pmic-int-l {
222			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
223		};
224	};
225
226	sdio-pwrseq {
227		wifi_enable_h: wifi-enable-h {
228		rockchip,pins =
229			<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
230		};
231	};
232};
233
234&sdio {
235	bus-width = <4>;
236	cap-sd-highspeed;
237	cap-sdio-irq;
238	keep-power-in-suspend;
239	max-frequency = <150000000>;
240	mmc-pwrseq = <&sdio_pwrseq>;
241	non-removable;
242	pinctrl-names = "default";
243	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
244	status = "okay";
245};
246
247&sdmmc {
248	bus-width = <4>;
249	cap-mmc-highspeed;
250	cap-sd-highspeed;
251	disable-wp;
252	max-frequency = <150000000>;
253	pinctrl-names = "default";
254	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
255	vmmc-supply = <&vcc_sd>;
256	status = "okay";
257};
258
259&tsadc {
260	status = "okay";
261};
262
263&uart2 {
264	status = "okay";
265};
266
267&u2phy {
268	status = "okay";
269};
270
271&u2phy_host {
272	status = "okay";
273};
274
275&u2phy_otg {
276	status = "okay";
277};
278
279&usb20_otg {
280	status = "okay";
281};
282
283&usb_host0_ehci {
284	status = "okay";
285};
286
287&usb_host0_ohci {
288	status = "okay";
289};
290