]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm64/rockchip/rk3328-evb.dts
dts: Import DTS for arm64
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm64 / rockchip / rk3328-evb.dts
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         sdio_pwrseq: sdio-pwrseq {
64                 compatible = "mmc-pwrseq-simple";
65                 pinctrl-names = "default";
66                 pinctrl-0 = <&wifi_enable_h>;
67
68                 /*
69                  * On the module itself this is one of these (depending
70                  * on the actual card populated):
71                  * - SDIO_RESET_L_WL_REG_ON
72                  * - PDN (power down when low)
73                  */
74                 reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
75         };
76
77         vcc_sd: sdmmc-regulator {
78                 compatible = "regulator-fixed";
79                 gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
80                 pinctrl-names = "default";
81                 pinctrl-0 = <&sdmmc0m1_gpio>;
82                 regulator-name = "vcc_sd";
83                 regulator-min-microvolt = <3300000>;
84                 regulator-max-microvolt = <3300000>;
85                 vin-supply = <&vcc_io>;
86         };
87
88         vcc_sys: vcc-sys {
89                 compatible = "regulator-fixed";
90                 regulator-name = "vcc_sys";
91                 regulator-always-on;
92                 regulator-boot-on;
93                 regulator-min-microvolt = <5000000>;
94                 regulator-max-microvolt = <5000000>;
95                 vin-supply = <&dc_12v>;
96         };
97
98         vcc_phy: vcc-phy-regulator {
99                 compatible = "regulator-fixed";
100                 regulator-name = "vcc_phy";
101                 regulator-always-on;
102                 regulator-boot-on;
103         };
104 };
105
106 &cpu0 {
107         cpu-supply = <&vdd_arm>;
108 };
109
110 &emmc {
111         bus-width = <8>;
112         cap-mmc-highspeed;
113         non-removable;
114         pinctrl-names = "default";
115         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
116         status = "okay";
117 };
118
119 &gmac2phy {
120         phy-supply = <&vcc_phy>;
121         clock_in_out = "output";
122         assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
123         assigned-clock-rate = <50000000>;
124         assigned-clocks = <&cru SCLK_MAC2PHY>;
125         assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
126
127 };
128
129 &i2c1 {
130         status = "okay";
131
132         rk805: rk805@18 {
133                 compatible = "rockchip,rk805";
134                 reg = <0x18>;
135                 interrupt-parent = <&gpio2>;
136                 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
137                 #clock-cells = <1>;
138                 clock-output-names = "xin32k", "rk805-clkout2";
139                 gpio-controller;
140                 #gpio-cells = <2>;
141                 pinctrl-names = "default";
142                 pinctrl-0 = <&pmic_int_l>;
143                 rockchip,system-power-controller;
144                 wakeup-source;
145
146                 vcc1-supply = <&vcc_sys>;
147                 vcc2-supply = <&vcc_sys>;
148                 vcc3-supply = <&vcc_sys>;
149                 vcc4-supply = <&vcc_sys>;
150                 vcc5-supply = <&vcc_io>;
151                 vcc6-supply = <&vcc_io>;
152
153                 regulators {
154                         vdd_logic: DCDC_REG1 {
155                                 regulator-name = "vdd_logic";
156                                 regulator-min-microvolt = <712500>;
157                                 regulator-max-microvolt = <1450000>;
158                                 regulator-always-on;
159                                 regulator-boot-on;
160                                 regulator-state-mem {
161                                         regulator-on-in-suspend;
162                                         regulator-suspend-microvolt = <1000000>;
163                                 };
164                         };
165
166                         vdd_arm: DCDC_REG2 {
167                                 regulator-name = "vdd_arm";
168                                 regulator-min-microvolt = <712500>;
169                                 regulator-max-microvolt = <1450000>;
170                                 regulator-always-on;
171                                 regulator-boot-on;
172                                 regulator-state-mem {
173                                         regulator-on-in-suspend;
174                                         regulator-suspend-microvolt = <950000>;
175                                 };
176                         };
177
178                         vcc_ddr: DCDC_REG3 {
179                                 regulator-name = "vcc_ddr";
180                                 regulator-always-on;
181                                 regulator-boot-on;
182                                 regulator-state-mem {
183                                         regulator-on-in-suspend;
184                                 };
185                         };
186
187                         vcc_io: DCDC_REG4 {
188                                 regulator-name = "vcc_io";
189                                 regulator-min-microvolt = <3300000>;
190                                 regulator-max-microvolt = <3300000>;
191                                 regulator-always-on;
192                                 regulator-boot-on;
193                                 regulator-state-mem {
194                                         regulator-on-in-suspend;
195                                         regulator-suspend-microvolt = <3300000>;
196                                 };
197                         };
198
199                         vcc_18: LDO_REG1 {
200                                 regulator-name = "vcc_18";
201                                 regulator-min-microvolt = <1800000>;
202                                 regulator-max-microvolt = <1800000>;
203                                 regulator-always-on;
204                                 regulator-boot-on;
205                                 regulator-state-mem {
206                                         regulator-on-in-suspend;
207                                         regulator-suspend-microvolt = <1800000>;
208                                 };
209                         };
210
211                         vcc18_emmc: LDO_REG2 {
212                                 regulator-name = "vcc18_emmc";
213                                 regulator-min-microvolt = <1800000>;
214                                 regulator-max-microvolt = <1800000>;
215                                 regulator-always-on;
216                                 regulator-boot-on;
217                                 regulator-state-mem {
218                                         regulator-on-in-suspend;
219                                         regulator-suspend-microvolt = <1800000>;
220                                 };
221                         };
222
223                         vdd_10: LDO_REG3 {
224                                 regulator-name = "vdd_10";
225                                 regulator-min-microvolt = <1000000>;
226                                 regulator-max-microvolt = <1000000>;
227                                 regulator-always-on;
228                                 regulator-boot-on;
229                                 regulator-state-mem {
230                                         regulator-on-in-suspend;
231                                         regulator-suspend-microvolt = <1000000>;
232                                 };
233                         };
234                 };
235         };
236 };
237
238 &pinctrl {
239         pmic {
240                 pmic_int_l: pmic-int-l {
241                         rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
242                 };
243         };
244
245         sdio-pwrseq {
246                 wifi_enable_h: wifi-enable-h {
247                 rockchip,pins =
248                         <1 18 RK_FUNC_GPIO &pcfg_pull_none>;
249                 };
250         };
251 };
252
253 &sdio {
254         bus-width = <4>;
255         cap-sd-highspeed;
256         cap-sdio-irq;
257         keep-power-in-suspend;
258         max-frequency = <150000000>;
259         mmc-pwrseq = <&sdio_pwrseq>;
260         non-removable;
261         pinctrl-names = "default";
262         pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
263         status = "okay";
264 };
265
266 &sdmmc {
267         bus-width = <4>;
268         cap-mmc-highspeed;
269         cap-sd-highspeed;
270         disable-wp;
271         max-frequency = <150000000>;
272         pinctrl-names = "default";
273         pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
274         vmmc-supply = <&vcc_sd>;
275         status = "okay";
276 };
277
278 &tsadc {
279         status = "okay";
280 };
281
282 &uart2 {
283         status = "okay";
284 };
285
286 &u2phy {
287         status = "okay";
288 };
289
290 &u2phy_host {
291         status = "okay";
292 };
293
294 &u2phy_otg {
295         status = "okay";
296 };
297
298 &usb20_otg {
299         status = "okay";
300 };
301
302 &usb_host0_ehci {
303         status = "okay";
304 };
305
306 &usb_host0_ohci {
307         status = "okay";
308 };