blob: 821525f7148077c25f7c6fbb7d83eee063d14614 [file] [log] [blame]
Wadim Egorov6ee2d012017-06-19 12:36:40 +02001/*
2 * Device tree file for Phytec phyCORE-RK3288 SoM
3 * Copyright (C) 2017 PHYTEC Messtechnik GmbH
4 * Author: Wadim Egorov <w.egorov@phytec.de>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
45#include <dt-bindings/net/ti-dp83867.h>
46#include "rk3288.dtsi"
47
48/ {
49 model = "Phytec RK3288 phyCORE";
50 compatible = "phytec,rk3288-phycore-som", "rockchip,rk3288";
51
52 /*
53 * Set the minimum memory size here and
54 * let the bootloader set the real size.
55 */
56 memory {
57 device_type = "memory";
58 reg = <0 0x8000000>;
59 };
60
61 aliases {
62 rtc0 = &i2c_rtc;
63 rtc1 = &rk818;
Wadim Egorovc8726842017-07-18 11:53:10 +020064 eeprom0 = &i2c_eeprom_id;
Wadim Egorov6ee2d012017-06-19 12:36:40 +020065 };
66
67 ext_gmac: external-gmac-clock {
68 compatible = "fixed-clock";
69 #clock-cells = <0>;
70 clock-frequency = <125000000>;
71 clock-output-names = "ext_gmac";
72 };
73
74 io_domains: io_domains {
75 compatible = "rockchip,rk3288-io-voltage-domain";
76
77 status = "okay";
78 sdcard-supply = <&vdd_io_sd>;
79 flash0-supply = <&vdd_emmc_io>;
80 flash1-supply = <&vdd_misc_1v8>;
81 gpio1830-supply = <&vdd_3v3_io>;
82 gpio30-supply = <&vdd_3v3_io>;
83 bb-supply = <&vdd_3v3_io>;
84 dvp-supply = <&vdd_3v3_io>;
85 lcdc-supply = <&vdd_3v3_io>;
86 wifi-supply = <&vdd_3v3_io>;
87 audio-supply = <&vdd_3v3_io>;
88 };
89
90 leds: user-leds {
91 compatible = "gpio-leds";
92 pinctrl-names = "default";
93 pinctrl-0 = <&user_led>;
94
95 user {
96 label = "green_led";
97 gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
98 linux,default-trigger = "heartbeat";
99 default-state = "keep";
100 };
101 };
102
103 vdd_emmc_io: vdd-emmc-io {
104 compatible = "regulator-fixed";
105 regulator-name = "vdd_emmc_io";
106 regulator-min-microvolt = <1800000>;
107 regulator-max-microvolt = <1800000>;
108 vin-supply = <&vdd_3v3_io>;
109 };
110
111 vdd_in_otg_out: vdd-in-otg-out {
112 compatible = "regulator-fixed";
113 regulator-name = "vdd_in_otg_out";
114 regulator-always-on;
115 regulator-boot-on;
116 regulator-min-microvolt = <5000000>;
117 regulator-max-microvolt = <5000000>;
118 };
119
120 vdd_misc_1v8: vdd-misc-1v8 {
121 compatible = "regulator-fixed";
122 regulator-name = "vdd_misc_1v8";
123 regulator-always-on;
124 regulator-boot-on;
125 regulator-min-microvolt = <1800000>;
126 regulator-max-microvolt = <1800000>;
127 };
128};
129
130&cpu0 {
131 cpu0-supply = <&vdd_cpu>;
132 operating-points = <
133 /* KHz uV */
134 1800000 1400000
135 1608000 1350000
136 1512000 1300000
137 1416000 1200000
138 1200000 1100000
139 1008000 1050000
140 816000 1000000
141 696000 950000
142 600000 900000
143 408000 900000
144 312000 900000
145 216000 900000
146 126000 900000
147 >;
148};
149
150&emmc {
151 status = "okay";
Wadim Egorov6ee2d012017-06-19 12:36:40 +0200152 bus-width = <8>;
153 cap-mmc-highspeed;
154 disable-wp;
155 non-removable;
156 num-slots = <1>;
157 pinctrl-names = "default";
158 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
159 vmmc-supply = <&vdd_3v3_io>;
160 vqmmc-supply = <&vdd_emmc_io>;
161};
162
163&gmac {
164 assigned-clocks = <&cru SCLK_MAC>;
165 assigned-clock-parents = <&ext_gmac>;
166 clock_in_out = "input";
167 pinctrl-names = "default";
168 pinctrl-0 = <&rgmii_pins &phy_rst &phy_int>;
169 phy-handle = <&phy0>;
170 phy-supply = <&vdd_eth_2v5>;
171 phy-mode = "rgmii-id";
172 snps,reset-active-low;
173 snps,reset-delays-us = <0 10000 1000000>;
174 snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_HIGH>;
175 tx_delay = <0x0>;
176 rx_delay = <0x0>;
177
178 mdio0 {
179 compatible = "snps,dwmac-mdio";
180 #address-cells = <1>;
181 #size-cells = <0>;
182
183 phy0: ethernet-phy@0 {
184 compatible = "ethernet-phy-ieee802.3-c22";
185 reg = <0>;
186 interrupt-parent = <&gpio4>;
187 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
188 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
189 ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
190 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
191 enet-phy-lane-no-swap;
192 };
193 };
194};
195
196&hdmi {
197 ddc-i2c-bus = <&i2c5>;
198};
199
200&i2c0 {
201 status = "okay";
Wadim Egorov6ee2d012017-06-19 12:36:40 +0200202 clock-frequency = <400000>;
203
204 rk818: pmic@1c {
205 status = "okay";
206 compatible = "rockchip,rk818";
207 reg = <0x1c>;
208 interrupt-parent = <&gpio0>;
209 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
210 pinctrl-names = "default";
211 pinctrl-0 = <&pmic_int>;
212 rockchip,system-power-controller;
213 wakeup-source;
214 #clock-cells = <1>;
Wadim Egorov6ee2d012017-06-19 12:36:40 +0200215
216 vcc1-supply = <&vdd_sys>;
217 vcc2-supply = <&vdd_sys>;
218 vcc3-supply = <&vdd_sys>;
219 vcc4-supply = <&vdd_sys>;
220 boost-supply = <&vdd_in_otg_out>;
221 vcc6-supply = <&vdd_sys>;
222 vcc7-supply = <&vdd_misc_1v8>;
223 vcc8-supply = <&vdd_misc_1v8>;
224 vcc9-supply = <&vdd_3v3_io>;
225 vddio-supply = <&vdd_3v3_io>;
226
227 regulators {
Wadim Egorov6ee2d012017-06-19 12:36:40 +0200228 vdd_log: DCDC_REG1 {
229 regulator-name = "vdd_log";
230 regulator-always-on;
231 regulator-boot-on;
232 regulator-min-microvolt = <1100000>;
233 regulator-max-microvolt = <1100000>;
234 regulator-state-mem {
235 regulator-off-in-suspend;
236 };
237 };
238
239 vdd_gpu: DCDC_REG2 {
240 regulator-name = "vdd_gpu";
241 regulator-always-on;
242 regulator-boot-on;
243 regulator-min-microvolt = <800000>;
244 regulator-max-microvolt = <1250000>;
245 regulator-state-mem {
246 regulator-on-in-suspend;
247 regulator-suspend-microvolt = <1000000>;
248 };
249 };
250
251 vcc_ddr: DCDC_REG3 {
252 regulator-name = "vcc_ddr";
253 regulator-always-on;
254 regulator-boot-on;
255 regulator-state-mem {
256 regulator-on-in-suspend;
257 };
258 };
259
260 vdd_3v3_io: DCDC_REG4 {
261 regulator-name = "vdd_3v3_io";
262 regulator-always-on;
263 regulator-boot-on;
264 regulator-min-microvolt = <3300000>;
265 regulator-max-microvolt = <3300000>;
266 regulator-state-mem {
267 regulator-on-in-suspend;
268 regulator-suspend-microvolt = <3300000>;
269 };
270 };
271
272 vdd_sys: DCDC_BOOST {
273 regulator-name = "vdd_sys";
274 regulator-always-on;
275 regulator-boot-on;
276 regulator-min-microvolt = <5000000>;
277 regulator-max-microvolt = <5000000>;
278 regulator-state-mem {
279 regulator-on-in-suspend;
280 regulator-suspend-microvolt = <5000000>;
281 };
282 };
283
284 /* vcc9 */
285 vdd_sd: SWITCH_REG {
286 regulator-name = "vdd_sd";
287 regulator-always-on;
288 regulator-boot-on;
289 regulator-state-mem {
290 regulator-off-in-suspend;
291 };
292 };
293
294 /* vcc6 */
295 vdd_eth_2v5: LDO_REG2 {
296 regulator-name = "vdd_eth_2v5";
297 regulator-always-on;
298 regulator-boot-on;
299 regulator-min-microvolt = <2500000>;
300 regulator-max-microvolt = <2500000>;
301 regulator-state-mem {
302 regulator-on-in-suspend;
303 regulator-suspend-microvolt = <2500000>;
304 };
305 };
306
307 /* vcc7 */
308 vdd_1v0: LDO_REG3 {
309 regulator-name = "vdd_1v0";
310 regulator-always-on;
311 regulator-boot-on;
312 regulator-min-microvolt = <1000000>;
313 regulator-max-microvolt = <1000000>;
314 regulator-state-mem {
315 regulator-on-in-suspend;
316 regulator-suspend-microvolt = <1000000>;
317 };
318 };
319
320 /* vcc8 */
321 vdd_1v8_lcd_ldo: LDO_REG4 {
322 regulator-name = "vdd_1v8_lcd_ldo";
323 regulator-always-on;
324 regulator-boot-on;
325 regulator-min-microvolt = <1800000>;
326 regulator-max-microvolt = <1800000>;
327 regulator-state-mem {
328 regulator-on-in-suspend;
329 regulator-suspend-microvolt = <1800000>;
330 };
331 };
332
333 /* vcc8 */
334 vdd_1v0_lcd: LDO_REG6 {
335 regulator-name = "vdd_1v0_lcd";
336 regulator-always-on;
337 regulator-boot-on;
338 regulator-min-microvolt = <1000000>;
339 regulator-max-microvolt = <1000000>;
340 regulator-state-mem {
341 regulator-on-in-suspend;
342 regulator-suspend-microvolt = <1000000>;
343 };
344 };
345
346 /* vcc7 */
347 vdd_1v8_ldo: LDO_REG7 {
348 regulator-name = "vdd_1v8_ldo";
349 regulator-always-on;
350 regulator-boot-on;
351 regulator-min-microvolt = <1800000>;
352 regulator-max-microvolt = <1800000>;
353 regulator-state-mem {
354 regulator-off-in-suspend;
355 regulator-suspend-microvolt = <1800000>;
356 };
357 };
358
359 /* vcc9 */
360 vdd_io_sd: LDO_REG9 {
361 regulator-name = "vdd_io_sd";
362 regulator-always-on;
363 regulator-boot-on;
364 regulator-min-microvolt = <3300000>;
365 regulator-max-microvolt = <3300000>;
366 regulator-state-mem {
367 regulator-on-in-suspend;
368 regulator-suspend-microvolt = <3300000>;
369 };
370 };
371 };
372 };
373
374 /* M24C32-D */
375 i2c_eeprom: eeprom@50 {
376 compatible = "atmel,24c32";
377 reg = <0x50>;
378 pagesize = <32>;
379 };
380
Wadim Egorovc8726842017-07-18 11:53:10 +0200381 /* M24C32-D Identification page */
382 i2c_eeprom_id: eeprom@58 {
383 compatible = "atmel,24c32";
384 reg = <0x58>;
385 pagesize = <32>;
386 };
387
Wadim Egorov6ee2d012017-06-19 12:36:40 +0200388 vdd_cpu: regulator@60 {
389 compatible = "fcs,fan53555";
390 reg = <0x60>;
391 fcs,suspend-voltage-selector = <1>;
392 regulator-always-on;
393 regulator-boot-on;
394 regulator-enable-ramp-delay = <300>;
395 regulator-name = "vdd_cpu";
396 regulator-min-microvolt = <800000>;
397 regulator-max-microvolt = <1430000>;
398 regulator-ramp-delay = <8000>;
399 vin-supply = <&vdd_sys>;
400 };
401};
402
403&pinctrl {
404 pcfg_output_high: pcfg-output-high {
405 output-high;
406 };
407
408 emmc {
409 /*
410 * We run eMMC at max speed; bump up drive strength.
411 * We also have external pulls, so disable the internal ones.
412 */
413 emmc_clk: emmc-clk {
414 rockchip,pins = <3 18 RK_FUNC_2 &pcfg_pull_none_12ma>;
415 };
416
417 emmc_cmd: emmc-cmd {
418 rockchip,pins = <3 16 RK_FUNC_2 &pcfg_pull_none_12ma>;
419 };
420
421 emmc_bus8: emmc-bus8 {
422 rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_none_12ma>,
423 <3 1 RK_FUNC_2 &pcfg_pull_none_12ma>,
424 <3 2 RK_FUNC_2 &pcfg_pull_none_12ma>,
425 <3 3 RK_FUNC_2 &pcfg_pull_none_12ma>,
426 <3 4 RK_FUNC_2 &pcfg_pull_none_12ma>,
427 <3 5 RK_FUNC_2 &pcfg_pull_none_12ma>,
428 <3 6 RK_FUNC_2 &pcfg_pull_none_12ma>,
429 <3 7 RK_FUNC_2 &pcfg_pull_none_12ma>;
430 };
431 };
432
433 gmac {
434 phy_int: phy-int {
435 rockchip,pins = <4 2 RK_FUNC_GPIO &pcfg_pull_up>;
436 };
437
438 phy_rst: phy-rst {
439 rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
440 };
441 };
442
443 leds {
444 user_led: user-led {
445 rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_output_high>;
446 };
447 };
448
449 pmic {
450 pmic_int: pmic-int {
451 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
452 };
453
454 /* Pin for switching state between sleep and non-sleep state */
455 pmic_sleep: pmic-sleep {
456 rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>;
457 };
458 };
459};
460
461&pwm1 {
462 status = "okay";
463};
464
465&saradc {
466 status = "okay";
467 vref-supply = <&vdd_1v8_ldo>;
468};
469
470&spi2 {
471 status = "okay";
472
473 serial_flash: flash@0 {
474 compatible = "micron,n25q128a13", "jedec,spi-nor";
475 reg = <0x0>;
476 spi-max-frequency = <50000000>;
477 m25p,fast-read;
478 #address-cells = <1>;
479 #size-cells = <1>;
480 status = "okay";
481 };
482};
483
484&tsadc {
485 status = "okay";
486 rockchip,hw-tshut-mode = <0>;
487 rockchip,hw-tshut-polarity = <0>;
488};
489
490&vopb {
491 status = "okay";
492};
493
494&vopb_mmu {
495 status = "okay";
496};
497
498&vopl {
499 status = "okay";
500};
501
502&vopl_mmu {
503 status = "okay";
504};
505
506&wdt {
507 status = "okay";
508};