1/*
2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 *  a) This library is free software; you can redistribute it and/or
10 *     modify it under the terms of the GNU General Public License as
11 *     published by the Free Software Foundation; either version 2 of the
12 *     License, or (at your option) any later version.
13 *
14 *     This library is distributed in the hope that it will be useful,
15 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *     GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 *  b) Permission is hereby granted, free of charge, to any person
22 *     obtaining a copy of this software and associated documentation
23 *     files (the "Software"), to deal in the Software without
24 *     restriction, including without limitation the rights to use,
25 *     copy, modify, merge, publish, distribute, sublicense, and/or
26 *     sell copies of the Software, and to permit persons to whom the
27 *     Software is furnished to do so, subject to the following
28 *     conditions:
29 *
30 *     The above copyright notice and this permission notice shall be
31 *     included in all copies or substantial portions of the Software.
32 *
33 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 *     OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44#include "rk3328.dtsi"
45
46/ {
47	model = "Rockchip RK3328 EVB";
48	compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
49
50	chosen {
51		stdout-path = "serial2:1500000n8";
52	};
53
54	dc_12v: dc-12v {
55		compatible = "regulator-fixed";
56		regulator-name = "dc_12v";
57		regulator-always-on;
58		regulator-boot-on;
59		regulator-min-microvolt = <12000000>;
60		regulator-max-microvolt = <12000000>;
61	};
62
63	vcc_sys: vcc-sys {
64		compatible = "regulator-fixed";
65		regulator-name = "vcc_sys";
66		regulator-always-on;
67		regulator-boot-on;
68		regulator-min-microvolt = <5000000>;
69		regulator-max-microvolt = <5000000>;
70		vin-supply = <&dc_12v>;
71	};
72
73	vcc_phy: vcc-phy-regulator {
74		compatible = "regulator-fixed";
75		regulator-name = "vcc_phy";
76		regulator-always-on;
77		regulator-boot-on;
78	};
79};
80
81&gmac2phy {
82	phy-supply = <&vcc_phy>;
83	clock_in_out = "output";
84	assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
85	assigned-clock-rate = <50000000>;
86	assigned-clocks = <&cru SCLK_MAC2PHY>;
87	assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
88	status = "okay";
89};
90
91&i2c1 {
92	status = "okay";
93
94	rk805: rk805@18 {
95		compatible = "rockchip,rk805";
96		reg = <0x18>;
97		interrupt-parent = <&gpio2>;
98		interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
99		#clock-cells = <1>;
100		clock-output-names = "xin32k", "rk805-clkout2";
101		gpio-controller;
102		#gpio-cells = <2>;
103		pinctrl-names = "default";
104		pinctrl-0 = <&pmic_int_l>;
105		rockchip,system-power-controller;
106		wakeup-source;
107
108		vcc1-supply = <&vcc_sys>;
109		vcc2-supply = <&vcc_sys>;
110		vcc3-supply = <&vcc_sys>;
111		vcc4-supply = <&vcc_sys>;
112		vcc5-supply = <&vcc_io>;
113		vcc6-supply = <&vcc_io>;
114
115		regulators {
116			vdd_logic: DCDC_REG1 {
117				regulator-name = "vdd_logic";
118				regulator-min-microvolt = <712500>;
119				regulator-max-microvolt = <1450000>;
120				regulator-always-on;
121				regulator-boot-on;
122				regulator-state-mem {
123					regulator-on-in-suspend;
124					regulator-suspend-microvolt = <1000000>;
125				};
126			};
127
128			vdd_arm: DCDC_REG2 {
129				regulator-name = "vdd_arm";
130				regulator-min-microvolt = <712500>;
131				regulator-max-microvolt = <1450000>;
132				regulator-always-on;
133				regulator-boot-on;
134				regulator-state-mem {
135					regulator-on-in-suspend;
136					regulator-suspend-microvolt = <950000>;
137				};
138			};
139
140			vcc_ddr: DCDC_REG3 {
141				regulator-name = "vcc_ddr";
142				regulator-always-on;
143				regulator-boot-on;
144				regulator-state-mem {
145					regulator-on-in-suspend;
146				};
147			};
148
149			vcc_io: DCDC_REG4 {
150				regulator-name = "vcc_io";
151				regulator-min-microvolt = <3300000>;
152				regulator-max-microvolt = <3300000>;
153				regulator-always-on;
154				regulator-boot-on;
155				regulator-state-mem {
156					regulator-on-in-suspend;
157					regulator-suspend-microvolt = <3300000>;
158				};
159			};
160
161			vcc_18: LDO_REG1 {
162				regulator-name = "vcc_18";
163				regulator-min-microvolt = <1800000>;
164				regulator-max-microvolt = <1800000>;
165				regulator-always-on;
166				regulator-boot-on;
167				regulator-state-mem {
168					regulator-on-in-suspend;
169					regulator-suspend-microvolt = <1800000>;
170				};
171			};
172
173			vcc18_emmc: LDO_REG2 {
174				regulator-name = "vcc18_emmc";
175				regulator-min-microvolt = <1800000>;
176				regulator-max-microvolt = <1800000>;
177				regulator-always-on;
178				regulator-boot-on;
179				regulator-state-mem {
180					regulator-on-in-suspend;
181					regulator-suspend-microvolt = <1800000>;
182				};
183			};
184
185			vdd_10: LDO_REG3 {
186				regulator-name = "vdd_10";
187				regulator-min-microvolt = <1000000>;
188				regulator-max-microvolt = <1000000>;
189				regulator-always-on;
190				regulator-boot-on;
191				regulator-state-mem {
192					regulator-on-in-suspend;
193					regulator-suspend-microvolt = <1000000>;
194				};
195			};
196		};
197	};
198};
199
200&pinctrl {
201	pmic {
202		pmic_int_l: pmic-int-l {
203			rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
204		};
205	};
206};
207
208&tsadc {
209	status = "okay";
210};
211
212&uart2 {
213	status = "okay";
214};
215
216&u2phy {
217	status = "okay";
218};
219
220&u2phy_host {
221	status = "okay";
222};
223
224&u2phy_otg {
225	status = "okay";
226};
227
228&usb20_otg {
229	status = "okay";
230};
231
232&usb_host0_ehci {
233	status = "okay";
234};
235
236&usb_host0_ohci {
237	status = "okay";
238};
239