]> git.sur5r.net Git - u-boot/blob - arch/arm/dts/rk3288-vyasa.dts
ARM: dts: rockchip: Add usb host for rk3288-vyasa
[u-boot] / arch / arm / dts / rk3288-vyasa.dts
1 /*
2  * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com>
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 file 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 file 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 "rk3288.dtsi"
45
46 / {
47         model = "Amarula Vyasa-RK3288";
48         compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
49
50         chosen {
51                 stdout-path = &uart2;
52         };
53
54         memory {
55                 reg = <0x0 0x0 0x0 0x80000000>;
56                 device_type = "memory";
57         };
58
59         dc12_vbat: dc12-vbat {
60                 compatible = "regulator-fixed";
61                 regulator-name = "dc12_vbat";
62                 regulator-min-microvolt = <12000000>;
63                 regulator-max-microvolt = <12000000>;
64                 regulator-always-on;
65                 regulator-boot-on;
66         };
67
68         vboot_3v3: vboot-3v3 {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vboot_3v3";
71                 regulator-min-microvolt = <3300000>;
72                 regulator-max-microvolt = <3300000>;
73                 regulator-always-on;
74                 regulator-boot-on;
75                 vin-supply = <&dc12_vbat>;
76         };
77
78         vcc_sys: vsys-regulator {
79                 compatible = "regulator-fixed";
80                 regulator-name = "vcc_sys";
81                 regulator-min-microvolt = <3700000>;
82                 regulator-max-microvolt = <3700000>;
83                 regulator-always-on;
84                 regulator-boot-on;
85                 vin-supply = <&dc12_vbat>;
86         };
87
88         vboot_5v: vboot-5v {
89                 compatible = "regulator-fixed";
90                 regulator-name = "vboot_sv";
91                 regulator-min-microvolt = <5000000>;
92                 regulator-max-microvolt = <5000000>;
93                 regulator-always-on;
94                 regulator-boot-on;
95                 vin-supply = <&dc12_vbat>;
96         };
97
98         v3g_3v3: v3g-3v3 {
99                 compatible = "regulator-fixed";
100                 regulator-name = "v3g_3v3";
101                 regulator-min-microvolt = <3300000>;
102                 regulator-max-microvolt = <3300000>;
103                 regulator-always-on;
104                 regulator-boot-on;
105                 vin-supply = <&dc12_vbat>;
106         };
107
108         vsus_5v: vsus-5v {
109                 compatible = "regulator-fixed";
110                 regulator-name = "vsus_5v";
111                 regulator-min-microvolt = <5000000>;
112                 regulator-max-microvolt = <5000000>;
113                 regulator-always-on;
114                 regulator-boot-on;
115                 vin-supply = <&vcc_io>;
116         };
117
118         vusb2_5v: vusb2-5v {
119                 compatible = "regulator-fixed";
120                 regulator-name = "vusb2_5v";
121                 enable-active-high;
122                 gpio = <&gpio8 RK_PB1 GPIO_ACTIVE_HIGH>; /* USB2_PWR_EN */
123                 pinctrl-names = "default";
124                 pinctrl-0 = <&usb2_pwr_en>;
125                 regulator-min-microvolt = <5000000>;
126                 regulator-max-microvolt = <5000000>;
127                 regulator-always-on;
128                 regulator-boot-on;
129                 vin-supply = <&vsus_5v>;
130         };
131
132         ext_gmac: external-gmac-clock {
133                 compatible = "fixed-clock";
134                 #clock-cells = <0>;
135                 clock-frequency = <125000000>;
136                 clock-output-names = "ext_gmac";
137         };
138 };
139
140 &cpu0 {
141         cpu0-supply = <&vdd_cpu>;
142 };
143
144 &gmac {
145         assigned-clocks = <&cru SCLK_MAC>;
146         assigned-clock-parents = <&ext_gmac>;
147         clock_in_out = "input";
148         pinctrl-names = "default";
149         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
150         phy-supply = <&vcc_lan>;
151         phy-mode = "rgmii";
152         snps,reset-active-low;
153         snps,reset-delays-us = <0 10000 1000000>;
154         snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
155         tx_delay = <0x30>;
156         rx_delay = <0x10>;
157         status = "okay";
158 };
159
160 &gpu {
161         mali-supply = <&vdd_gpu>;
162         status = "okay";
163 };
164
165 &hdmi {
166         ddc-i2c-bus = <&i2c2>;
167         status = "okay";
168 };
169
170 &i2c0 {
171         clock-frequency = <400000>;
172         status = "okay";
173
174         rk808: pmic@1b {
175                 compatible = "rockchip,rk808";
176                 reg = <0x1b>;
177                 interrupt-parent = <&gpio0>;
178                 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
179                 #clock-cells = <1>;
180                 clock-output-names = "xin32k", "rk808-clkout2";
181                 pinctrl-names = "default";
182                 pinctrl-0 = <&pmic_int &global_pwroff>;
183                 rockchip,system-power-controller;
184                 wakeup-source;
185
186                 vcc1-supply = <&vcc_sys>;
187                 vcc2-supply = <&vcc_sys>;
188                 vcc3-supply = <&vcc_sys>;
189                 vcc4-supply = <&vcc_sys>;
190                 vcc6-supply = <&vcc_sys>;
191                 vcc7-supply = <&vcc_sys>;
192                 vcc8-supply = <&vcc_io>;
193                 vcc9-supply = <&vcc_sys>;
194                 vcc10-supply = <&vcc_sys>;
195                 vcc11-supply = <&vcc_sys>;
196                 vcc12-supply = <&vcc_io>;
197
198                 regulators {
199                         vdd_cpu: DCDC_REG1 {
200                                 regulator-name = "vdd_arm";
201                                 regulator-min-microvolt = <750000>;
202                                 regulator-max-microvolt = <1350000>;
203                                 regulator-always-on;
204                                 regulator-boot-on;
205                                 regulator-state-mem {
206                                         regulator-off-in-suspend;
207                                 };
208                         };
209
210                         vdd_gpu: DCDC_REG2 {
211                                 regulator-name = "vdd_gpu";
212                                 regulator-min-microvolt = <850000>;
213                                 regulator-max-microvolt = <1250000>;
214                                 regulator-always-on;
215                                 regulator-boot-on;
216                                 regulator-state-mem {
217                                         regulator-on-in-suspend;
218                                         regulator-suspend-microvolt = <1000000>;
219                                 };
220                         };
221
222                         vcc_ddr: DCDC_REG3 {
223                                 regulator-name = "vcc_ddr";
224                                 regulator-always-on;
225                                 regulator-boot-on;
226                                 regulator-state-mem {
227                                         regulator-on-in-suspend;
228                                 };
229                         };
230
231                         vcc_io: DCDC_REG4 {
232                                 regulator-name = "vcc_io";
233                                 regulator-min-microvolt = <3300000>;
234                                 regulator-max-microvolt = <3300000>;
235                                 regulator-always-on;
236                                 regulator-boot-on;
237                                 regulator-state-mem {
238                                         regulator-on-in-suspend;
239                                         regulator-suspend-microvolt = <3300000>;
240                                 };
241                         };
242
243                         vcca_tp: LDO_REG1 {
244                                 regulator-name = "vcc_tp";
245                                 regulator-min-microvolt = <3300000>;
246                                 regulator-max-microvolt = <3300000>;
247                                 regulator-always-on;
248                                 regulator-boot-on;
249                                 regulator-state-mem {
250                                         regulator-on-in-suspend;
251                                         regulator-suspend-microvolt = <3300000>;
252                                 };
253                         };
254
255                         vcc_codec: LDO_REG2 {
256                                 regulator-name = "vcc_codec";
257                                 regulator-min-microvolt = <3300000>;
258                                 regulator-max-microvolt = <3300000>;
259                                 regulator-always-on;
260                                 regulator-boot-on;
261                                 regulator-state-mem {
262                                         regulator-off-in-suspend;
263                                 };
264                         };
265
266                         vdd_10: LDO_REG3 {
267                                 regulator-name = "vdd_10";
268                                 regulator-min-microvolt = <1000000>;
269                                 regulator-max-microvolt = <1000000>;
270                                 regulator-always-on;
271                                 regulator-boot-on;
272                                 regulator-state-mem {
273                                         regulator-on-in-suspend;
274                                         regulator-suspend-microvolt = <1000000>;
275                                 };
276                         };
277
278                         vcc_gps: LDO_REG4 {
279                                 regulator-name = "vcc_gps";
280                                 regulator-min-microvolt = <1800000>;
281                                 regulator-max-microvolt = <1800000>;
282                                 regulator-always-on;
283                                 regulator-boot-on;
284                                 regulator-state-mem {
285                                         regulator-on-in-suspend;
286                                         regulator-suspend-microvolt = <1800000>;
287                                 };
288                         };
289
290                         vccio_sd: LDO_REG5 {
291                                 regulator-name = "vccio_sd";
292                                 regulator-min-microvolt = <1800000>;
293                                 regulator-max-microvolt = <3300000>;
294                                 regulator-always-on;
295                                 regulator-boot-on;
296                                 regulator-state-mem {
297                                         regulator-on-in-suspend;
298                                         regulator-suspend-microvolt = <3300000>;
299                                 };
300                         };
301
302                         vcc10_lcd: LDO_REG6 {
303                                 regulator-name = "vcc10_lcd";
304                                 regulator-min-microvolt = <1000000>;
305                                 regulator-max-microvolt = <1000000>;
306                                 regulator-always-on;
307                                 regulator-boot-on;
308                                 regulator-state-mem {
309                                         regulator-on-in-suspend;
310                                         regulator-suspend-microvolt = <1800000>;
311                                 };
312                         };
313
314                         vcc_18: LDO_REG7 {
315                                 regulator-name = "vcc_18";
316                                 regulator-min-microvolt = <1800000>;
317                                 regulator-max-microvolt = <1800000>;
318                                 regulator-always-on;
319                                 regulator-boot-on;
320                                 regulator-state-mem {
321                                         regulator-on-in-suspend;
322                                         regulator-suspend-microvolt = <1800000>;
323                                 };
324                         };
325
326                         vcc18_lcd: LDO_REG8 {
327                                 regulator-name = "vcc18_lcd";
328                                 regulator-min-microvolt = <1800000>;
329                                 regulator-max-microvolt = <1800000>;
330                                 regulator-always-on;
331                                 regulator-boot-on;
332                                 regulator-state-mem {
333                                         regulator-on-in-suspend;
334                                         regulator-suspend-microvolt = <1800000>;
335                                 };
336                         };
337
338                         vcc_sd: SWITCH_REG1 {
339                                 regulator-name = "vcc_sd";
340                                 regulator-min-microvolt = <3300000>;
341                                 regulator-max-microvolt = <3300000>;
342                                 regulator-always-on;
343                                 regulator-boot-on;
344                                 regulator-state-mem {
345                                         regulator-on-in-suspend;
346                                 };
347                         };
348
349                         vcc_lan: SWITCH_REG2 {
350                                 regulator-name = "vcc_lan";
351                                 regulator-min-microvolt = <3300000>;
352                                 regulator-max-microvolt = <3300000>;
353                                 regulator-always-on;
354                                 regulator-boot-on;
355                                 regulator-state-mem {
356                                         regulator-on-in-suspend;
357                                 };
358                         };
359                 };
360         };
361 };
362
363 &i2c2 {
364         status = "okay";
365 };
366
367 &sdmmc {
368         bus-width = <4>;
369         cap-mmc-highspeed;
370         cap-sd-highspeed;
371         card-detect-delay = <200>;
372         disable-wp;
373         pinctrl-names = "default";
374         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
375         vmmc-supply = <&vcc_sd>;
376         vqmmc-supply = <&vccio_sd>;
377         status = "okay";
378 };
379
380 &uart2 {
381         status = "okay";
382 };
383
384 &usbphy {
385         status = "okay";
386 };
387
388 &usb_host0_ehci {
389         status = "okay";
390 };
391
392 &usb_host1 {
393         pinctrl-names = "default";
394         pinctrl-0 = <&phy_pwr_en>;
395         status = "okay";
396 };
397
398 &vopb {
399         status = "okay";
400 };
401
402 &vopb_mmu {
403         status = "okay";
404 };
405
406 &vopl {
407         status = "okay";
408 };
409
410 &vopl_mmu {
411         status = "okay";
412 };
413
414 &wdt {
415         status = "okay";
416 };
417
418 &pinctrl {
419         pcfg_output_high: pcfg-output-high {
420                 output-high;
421         };
422
423         gmac {
424                 phy_int: phy-int {
425                         rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
426                 };
427
428                 phy_pmeb: phy-pmeb {
429                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
430                 };
431
432                 phy_rst: phy-rst {
433                         rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
434                 };
435         };
436
437         pmic {
438                 pmic_int: pmic-int {
439                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
440                 };
441         };
442
443         usb_host {
444                 phy_pwr_en: phy-pwr-en {
445                         rockchip,pins = <RK_GPIO2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
446                 };
447
448                 usb2_pwr_en: usb2-pwr-en {
449                         rockchip,pins = <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
450                 };
451         };
452 };