blob: 850aa2581852a8a2552159ffc6cb2298ec43ed56 [file] [log] [blame]
Jagan Teki59ea6182017-09-12 17:15:47 +05301/*
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 {
Jagan Tekif233c432018-02-14 21:26:14 +053055 reg = <0x0 0x0 0x0 0x80000000>;
Jagan Teki59ea6182017-09-12 17:15:47 +053056 device_type = "memory";
Jagan Teki59ea6182017-09-12 17:15:47 +053057 };
58
Jagan Teki4d0706b2018-02-14 21:26:17 +053059 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
Jagan Teki59ea6182017-09-12 17:15:47 +053078 vcc_sys: vsys-regulator {
79 compatible = "regulator-fixed";
80 regulator-name = "vcc_sys";
Jagan Teki4d0706b2018-02-14 21:26:17 +053081 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";
Jagan Teki59ea6182017-09-12 17:15:47 +053091 regulator-min-microvolt = <5000000>;
92 regulator-max-microvolt = <5000000>;
93 regulator-always-on;
94 regulator-boot-on;
Jagan Teki4d0706b2018-02-14 21:26:17 +053095 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>;
Jagan Teki59ea6182017-09-12 17:15:47 +0530106 };
Jagan Teki11afc3d2018-02-14 21:26:18 +0530107
Jagan Tekidaffdd32018-02-14 21:26:20 +0530108 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
Jagan Tekicf106b62018-02-14 21:26:21 +0530118 vusb1_5v: vusb1-5v {
119 compatible = "regulator-fixed";
120 regulator-name = "vusb1_5v";
121 enable-active-high;
122 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; /* OTG_VBUS_DRV */
123 pinctrl-names = "default";
124 pinctrl-0 = <&otg_vbus_drv>;
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
Jagan Tekidaffdd32018-02-14 21:26:20 +0530132 vusb2_5v: vusb2-5v {
133 compatible = "regulator-fixed";
134 regulator-name = "vusb2_5v";
135 enable-active-high;
136 gpio = <&gpio8 RK_PB1 GPIO_ACTIVE_HIGH>; /* USB2_PWR_EN */
137 pinctrl-names = "default";
138 pinctrl-0 = <&usb2_pwr_en>;
139 regulator-min-microvolt = <5000000>;
140 regulator-max-microvolt = <5000000>;
141 regulator-always-on;
142 regulator-boot-on;
143 vin-supply = <&vsus_5v>;
144 };
145
Jagan Teki11afc3d2018-02-14 21:26:18 +0530146 ext_gmac: external-gmac-clock {
147 compatible = "fixed-clock";
148 #clock-cells = <0>;
149 clock-frequency = <125000000>;
150 clock-output-names = "ext_gmac";
151 };
Jagan Teki59ea6182017-09-12 17:15:47 +0530152};
153
Jagan Teki59ea6182017-09-12 17:15:47 +0530154&cpu0 {
155 cpu0-supply = <&vdd_cpu>;
156};
157
Jagan Tekiec55f422018-02-14 21:26:22 +0530158&emmc {
159 bus-width = <8>;
160 cap-mmc-highspeed;
161 disable-wp;
162 non-removable;
163 pinctrl-names = "default";
164 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
165 vmmc-supply = <&vcc_io>;
166 status = "okay";
167};
168
Jagan Teki11afc3d2018-02-14 21:26:18 +0530169&gmac {
170 assigned-clocks = <&cru SCLK_MAC>;
171 assigned-clock-parents = <&ext_gmac>;
172 clock_in_out = "input";
173 pinctrl-names = "default";
174 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
175 phy-supply = <&vcc_lan>;
176 phy-mode = "rgmii";
177 snps,reset-active-low;
178 snps,reset-delays-us = <0 10000 1000000>;
179 snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
180 tx_delay = <0x30>;
181 rx_delay = <0x10>;
182 status = "okay";
183};
184
Jagan Tekif233c432018-02-14 21:26:14 +0530185&gpu {
186 mali-supply = <&vdd_gpu>;
187 status = "okay";
188};
189
190&hdmi {
191 ddc-i2c-bus = <&i2c2>;
192 status = "okay";
193};
194
Jagan Teki59ea6182017-09-12 17:15:47 +0530195&i2c0 {
196 clock-frequency = <400000>;
197 status = "okay";
198
199 rk808: pmic@1b {
200 compatible = "rockchip,rk808";
201 reg = <0x1b>;
202 interrupt-parent = <&gpio0>;
203 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
Jagan Tekif233c432018-02-14 21:26:14 +0530204 #clock-cells = <1>;
205 clock-output-names = "xin32k", "rk808-clkout2";
Jagan Teki59ea6182017-09-12 17:15:47 +0530206 pinctrl-names = "default";
207 pinctrl-0 = <&pmic_int &global_pwroff>;
Jagan Teki59ea6182017-09-12 17:15:47 +0530208 rockchip,system-power-controller;
Jagan Tekif233c432018-02-14 21:26:14 +0530209 wakeup-source;
Jagan Teki59ea6182017-09-12 17:15:47 +0530210
211 vcc1-supply = <&vcc_sys>;
212 vcc2-supply = <&vcc_sys>;
213 vcc3-supply = <&vcc_sys>;
214 vcc4-supply = <&vcc_sys>;
215 vcc6-supply = <&vcc_sys>;
216 vcc7-supply = <&vcc_sys>;
217 vcc8-supply = <&vcc_io>;
218 vcc9-supply = <&vcc_sys>;
219 vcc10-supply = <&vcc_sys>;
220 vcc11-supply = <&vcc_sys>;
221 vcc12-supply = <&vcc_io>;
222
223 regulators {
Jagan Teki91d838d2018-02-14 21:26:15 +0530224 vdd_cpu: DCDC_REG1 {
225 regulator-name = "vdd_arm";
Jagan Teki59ea6182017-09-12 17:15:47 +0530226 regulator-min-microvolt = <750000>;
227 regulator-max-microvolt = <1350000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530228 regulator-always-on;
229 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530230 regulator-state-mem {
231 regulator-off-in-suspend;
232 };
233 };
234
235 vdd_gpu: DCDC_REG2 {
Jagan Tekif233c432018-02-14 21:26:14 +0530236 regulator-name = "vdd_gpu";
Jagan Teki59ea6182017-09-12 17:15:47 +0530237 regulator-min-microvolt = <850000>;
238 regulator-max-microvolt = <1250000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530239 regulator-always-on;
240 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530241 regulator-state-mem {
242 regulator-on-in-suspend;
243 regulator-suspend-microvolt = <1000000>;
244 };
245 };
246
247 vcc_ddr: DCDC_REG3 {
Jagan Tekif233c432018-02-14 21:26:14 +0530248 regulator-name = "vcc_ddr";
Jagan Teki59ea6182017-09-12 17:15:47 +0530249 regulator-always-on;
250 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530251 regulator-state-mem {
252 regulator-on-in-suspend;
253 };
254 };
255
256 vcc_io: DCDC_REG4 {
Jagan Tekif233c432018-02-14 21:26:14 +0530257 regulator-name = "vcc_io";
Jagan Teki59ea6182017-09-12 17:15:47 +0530258 regulator-min-microvolt = <3300000>;
259 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530260 regulator-always-on;
261 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530262 regulator-state-mem {
263 regulator-on-in-suspend;
264 regulator-suspend-microvolt = <3300000>;
265 };
266 };
267
268 vcca_tp: LDO_REG1 {
Jagan Tekif233c432018-02-14 21:26:14 +0530269 regulator-name = "vcc_tp";
Jagan Teki59ea6182017-09-12 17:15:47 +0530270 regulator-min-microvolt = <3300000>;
271 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530272 regulator-always-on;
273 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530274 regulator-state-mem {
275 regulator-on-in-suspend;
276 regulator-suspend-microvolt = <3300000>;
277 };
278 };
279
280 vcc_codec: LDO_REG2 {
Jagan Tekif233c432018-02-14 21:26:14 +0530281 regulator-name = "vcc_codec";
Jagan Teki59ea6182017-09-12 17:15:47 +0530282 regulator-min-microvolt = <3300000>;
283 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530284 regulator-always-on;
285 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530286 regulator-state-mem {
287 regulator-off-in-suspend;
288 };
289 };
290
291 vdd_10: LDO_REG3 {
Jagan Tekif233c432018-02-14 21:26:14 +0530292 regulator-name = "vdd_10";
Jagan Teki59ea6182017-09-12 17:15:47 +0530293 regulator-min-microvolt = <1000000>;
294 regulator-max-microvolt = <1000000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530295 regulator-always-on;
296 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530297 regulator-state-mem {
298 regulator-on-in-suspend;
299 regulator-suspend-microvolt = <1000000>;
300 };
301 };
302
303 vcc_gps: LDO_REG4 {
Jagan Tekif233c432018-02-14 21:26:14 +0530304 regulator-name = "vcc_gps";
Jagan Teki59ea6182017-09-12 17:15:47 +0530305 regulator-min-microvolt = <1800000>;
306 regulator-max-microvolt = <1800000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530307 regulator-always-on;
308 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530309 regulator-state-mem {
310 regulator-on-in-suspend;
311 regulator-suspend-microvolt = <1800000>;
312 };
313 };
314
315 vccio_sd: LDO_REG5 {
Jagan Tekif233c432018-02-14 21:26:14 +0530316 regulator-name = "vccio_sd";
Jagan Teki59ea6182017-09-12 17:15:47 +0530317 regulator-min-microvolt = <1800000>;
318 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530319 regulator-always-on;
320 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530321 regulator-state-mem {
322 regulator-on-in-suspend;
323 regulator-suspend-microvolt = <3300000>;
324 };
325 };
326
327 vcc10_lcd: LDO_REG6 {
Jagan Tekif233c432018-02-14 21:26:14 +0530328 regulator-name = "vcc10_lcd";
Jagan Teki59ea6182017-09-12 17:15:47 +0530329 regulator-min-microvolt = <1000000>;
330 regulator-max-microvolt = <1000000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530331 regulator-always-on;
332 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530333 regulator-state-mem {
334 regulator-on-in-suspend;
335 regulator-suspend-microvolt = <1800000>;
336 };
337 };
338
339 vcc_18: LDO_REG7 {
Jagan Tekif233c432018-02-14 21:26:14 +0530340 regulator-name = "vcc_18";
Jagan Teki59ea6182017-09-12 17:15:47 +0530341 regulator-min-microvolt = <1800000>;
342 regulator-max-microvolt = <1800000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530343 regulator-always-on;
344 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530345 regulator-state-mem {
346 regulator-on-in-suspend;
347 regulator-suspend-microvolt = <1800000>;
348 };
349 };
350
351 vcc18_lcd: LDO_REG8 {
Jagan Tekif233c432018-02-14 21:26:14 +0530352 regulator-name = "vcc18_lcd";
Jagan Teki59ea6182017-09-12 17:15:47 +0530353 regulator-min-microvolt = <1800000>;
354 regulator-max-microvolt = <1800000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530355 regulator-always-on;
356 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530357 regulator-state-mem {
358 regulator-on-in-suspend;
359 regulator-suspend-microvolt = <1800000>;
360 };
361 };
362
Jagan Teki5d8a9b82018-02-14 21:26:16 +0530363 vcc_sd: SWITCH_REG1 {
364 regulator-name = "vcc_sd";
Jagan Teki59ea6182017-09-12 17:15:47 +0530365 regulator-min-microvolt = <3300000>;
366 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530367 regulator-always-on;
368 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530369 regulator-state-mem {
370 regulator-on-in-suspend;
371 };
372 };
373
374 vcc_lan: SWITCH_REG2 {
Jagan Tekif233c432018-02-14 21:26:14 +0530375 regulator-name = "vcc_lan";
Jagan Teki59ea6182017-09-12 17:15:47 +0530376 regulator-min-microvolt = <3300000>;
377 regulator-max-microvolt = <3300000>;
Jagan Tekif233c432018-02-14 21:26:14 +0530378 regulator-always-on;
379 regulator-boot-on;
Jagan Teki59ea6182017-09-12 17:15:47 +0530380 regulator-state-mem {
381 regulator-on-in-suspend;
382 };
383 };
384 };
385 };
386};
387
Jagan Tekif233c432018-02-14 21:26:14 +0530388&i2c2 {
Jagan Teki59ea6182017-09-12 17:15:47 +0530389 status = "okay";
Jagan Tekif233c432018-02-14 21:26:14 +0530390};
Jagan Teki59ea6182017-09-12 17:15:47 +0530391
Jagan Tekif233c432018-02-14 21:26:14 +0530392&sdmmc {
Jagan Teki59ea6182017-09-12 17:15:47 +0530393 bus-width = <4>;
394 cap-mmc-highspeed;
395 cap-sd-highspeed;
396 card-detect-delay = <200>;
397 disable-wp;
398 pinctrl-names = "default";
399 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
400 vmmc-supply = <&vcc_sd>;
401 vqmmc-supply = <&vccio_sd>;
Jagan Tekif233c432018-02-14 21:26:14 +0530402 status = "okay";
Jagan Teki59ea6182017-09-12 17:15:47 +0530403};
404
405&uart2 {
Jagan Tekif233c432018-02-14 21:26:14 +0530406 status = "okay";
407};
408
Jagan Tekidaffdd32018-02-14 21:26:20 +0530409&usbphy {
410 status = "okay";
411};
412
413&usb_host0_ehci {
414 status = "okay";
415};
416
417&usb_host1 {
418 pinctrl-names = "default";
419 pinctrl-0 = <&phy_pwr_en>;
420 status = "okay";
421};
422
Jagan Tekicf106b62018-02-14 21:26:21 +0530423&usb_otg {
424 status = "okay";
425};
426
Jagan Tekif233c432018-02-14 21:26:14 +0530427&vopb {
428 status = "okay";
429};
430
431&vopb_mmu {
Jagan Teki59ea6182017-09-12 17:15:47 +0530432 status = "okay";
433};
434
Jagan Tekif233c432018-02-14 21:26:14 +0530435&vopl {
436 status = "okay";
437};
438
439&vopl_mmu {
440 status = "okay";
441};
442
Jagan Teki59ea6182017-09-12 17:15:47 +0530443&wdt {
444 status = "okay";
445};
446
447&pinctrl {
Jagan Teki11afc3d2018-02-14 21:26:18 +0530448 pcfg_output_high: pcfg-output-high {
449 output-high;
450 };
451
452 gmac {
453 phy_int: phy-int {
454 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
455 };
456
457 phy_pmeb: phy-pmeb {
458 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
459 };
460
461 phy_rst: phy-rst {
462 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
463 };
464 };
465
Jagan Teki59ea6182017-09-12 17:15:47 +0530466 pmic {
467 pmic_int: pmic-int {
468 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
469 };
470 };
Jagan Tekidaffdd32018-02-14 21:26:20 +0530471
472 usb_host {
473 phy_pwr_en: phy-pwr-en {
474 rockchip,pins = <RK_GPIO2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>;
475 };
476
477 usb2_pwr_en: usb2-pwr-en {
478 rockchip,pins = <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
479 };
480 };
Jagan Tekicf106b62018-02-14 21:26:21 +0530481
482 usb_otg {
483 otg_vbus_drv: otg-vbus-drv {
484 rockchip,pins = <RK_GPIO0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
485
486 };
487 };
Jagan Teki59ea6182017-09-12 17:15:47 +0530488};