blob: 1117d3913ed70ac17b56d6b3d998207056adfa6e [file] [log] [blame]
Tom Rini8b0c8a12018-05-06 18:27:01 -04001// SPDX-License-Identifier: GPL-2.0+ OR X11
Simon Glassec3be542015-08-30 16:55:41 -06002/*
3 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
Simon Glassec3be542015-08-30 16:55:41 -06004 */
5
6#include "rk3288.dtsi"
7
8/ {
9 memory {
10 reg = <0 0x80000000>;
11 };
12
13 ext_gmac: external-gmac-clock {
14 compatible = "fixed-clock";
15 #clock-cells = <0>;
16 clock-frequency = <125000000>;
17 clock-output-names = "ext_gmac";
18 };
19
20 ir: ir-receiver {
21 compatible = "gpio-ir-receiver";
22 pinctrl-names = "default";
23 pinctrl-0 = <&ir_int>;
24 };
25
26 keys: gpio-keys {
27 compatible = "gpio-keys";
Simon Glassec3be542015-08-30 16:55:41 -060028
29 button@0 {
30 gpio-key,wakeup = <1>;
31 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
32 label = "GPIO Power";
33 linux,code = <116>;
34 pinctrl-names = "default";
35 pinctrl-0 = <&pwr_key>;
36 };
37 };
38
39 leds {
Simon Glassec3be542015-08-30 16:55:41 -060040 compatible = "gpio-leds";
41
42 work {
Simon Glassec3be542015-08-30 16:55:41 -060043 gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
44 label = "firefly:blue:user";
45 linux,default-trigger = "rc-feedback";
46 pinctrl-names = "default";
47 pinctrl-0 = <&work_led>;
48 };
49
50 power {
Simon Glassec3be542015-08-30 16:55:41 -060051 gpios = <&gpio8 2 GPIO_ACTIVE_LOW>;
52 label = "firefly:green:power";
53 linux,default-trigger = "default-on";
54 pinctrl-names = "default";
55 pinctrl-0 = <&power_led>;
56 };
57 };
58
59 vcc_sys: vsys-regulator {
60 compatible = "regulator-fixed";
61 regulator-name = "vcc_sys";
62 regulator-min-microvolt = <5000000>;
63 regulator-max-microvolt = <5000000>;
64 regulator-always-on;
65 regulator-boot-on;
66 };
67
68 vcc_sd: sdmmc-regulator {
69 compatible = "regulator-fixed";
70 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
71 pinctrl-names = "default";
72 pinctrl-0 = <&sdmmc_pwr>;
73 regulator-name = "vcc_sd";
74 regulator-min-microvolt = <3300000>;
75 regulator-max-microvolt = <3300000>;
76 startup-delay-us = <100000>;
77 vin-supply = <&vcc_io>;
78 };
79
80 vcc_flash: flash-regulator {
81 compatible = "regulator-fixed";
82 regulator-name = "vcc_flash";
83 regulator-min-microvolt = <1800000>;
84 regulator-max-microvolt = <1800000>;
85 vin-supply = <&vcc_io>;
86 };
87
88 vcc_5v: usb-regulator {
89 compatible = "regulator-fixed";
90 regulator-name = "vcc_5v";
91 regulator-min-microvolt = <5000000>;
92 regulator-max-microvolt = <5000000>;
93 regulator-always-on;
94 regulator-boot-on;
95 vin-supply = <&vcc_sys>;
96 };
97
98 vcc_host_5v: usb-host-regulator {
99 compatible = "regulator-fixed";
100 enable-active-high;
101 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
102 pinctrl-names = "default";
103 pinctrl-0 = <&host_vbus_drv>;
104 regulator-name = "vcc_host_5v";
105 regulator-min-microvolt = <5000000>;
106 regulator-max-microvolt = <5000000>;
107 regulator-always-on;
108 vin-supply = <&vcc_5v>;
109 };
110
111 vcc_otg_5v: usb-otg-regulator {
112 compatible = "regulator-fixed";
113 enable-active-high;
114 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
115 pinctrl-names = "default";
116 pinctrl-0 = <&otg_vbus_drv>;
117 regulator-name = "vcc_otg_5v";
118 regulator-min-microvolt = <5000000>;
119 regulator-max-microvolt = <5000000>;
120 regulator-always-on;
121 vin-supply = <&vcc_5v>;
122 };
123};
124
125&cpu0 {
126 cpu0-supply = <&vdd_cpu>;
127};
128
129&emmc {
130 broken-cd;
131 bus-width = <8>;
132 cap-mmc-highspeed;
133 disable-wp;
134 non-removable;
135 num-slots = <1>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
138 vmmc-supply = <&vcc_io>;
139 vqmmc-supply = <&vcc_flash>;
140 status = "okay";
141};
142
Sjoerd Simons4407d002016-02-28 22:25:02 +0100143&gmac {
144 assigned-clocks = <&cru SCLK_MAC>;
145 assigned-clock-parents = <&ext_gmac>;
146 clock_in_out = "input";
147 pinctrl-names = "default";
148 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
149 phy-supply = <&vcc_lan>;
150 phy-mode = "rgmii";
151 snps,reset-active-low;
152 snps,reset-delays-us = <0 10000 1000000>;
153 snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
154 tx_delay = <0x30>;
155 rx_delay = <0x10>;
156 status = "okay";
157};
158
Simon Glassec3be542015-08-30 16:55:41 -0600159&hdmi {
160 ddc-i2c-bus = <&i2c5>;
161 status = "okay";
162};
163
164&i2c0 {
165 clock-frequency = <400000>;
166 status = "okay";
167
168 vdd_cpu: syr827@40 {
169 compatible = "silergy,syr827";
170 fcs,suspend-voltage-selector = <1>;
171 reg = <0x40>;
172 regulator-name = "vdd_cpu";
173 regulator-min-microvolt = <850000>;
174 regulator-max-microvolt = <1350000>;
175 regulator-always-on;
176 regulator-boot-on;
177 vin-supply = <&vcc_sys>;
178 };
179
180 vdd_gpu: syr828@41 {
181 compatible = "silergy,syr828";
182 fcs,suspend-voltage-selector = <1>;
183 reg = <0x41>;
184 regulator-name = "vdd_gpu";
185 regulator-min-microvolt = <850000>;
186 regulator-max-microvolt = <1350000>;
187 regulator-always-on;
188 vin-supply = <&vcc_sys>;
189 };
190
191 hym8563: hym8563@51 {
192 compatible = "haoyu,hym8563";
193 reg = <0x51>;
194 #clock-cells = <0>;
195 clock-frequency = <32768>;
196 clock-output-names = "xin32k";
197 interrupt-parent = <&gpio7>;
198 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
199 pinctrl-names = "default";
200 pinctrl-0 = <&rtc_int>;
201 };
202
203 act8846: act8846@5a {
204 compatible = "active-semi,act8846";
205 reg = <0x5a>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
208 system-power-controller;
209
210 regulators {
211 vcc_ddr: REG1 {
212 regulator-name = "vcc_ddr";
213 regulator-min-microvolt = <1200000>;
214 regulator-max-microvolt = <1200000>;
215 regulator-always-on;
216 };
217
218 vcc_io: REG2 {
219 regulator-name = "vcc_io";
220 regulator-min-microvolt = <3300000>;
221 regulator-max-microvolt = <3300000>;
222 regulator-always-on;
223 };
224
225 vdd_log: REG3 {
226 regulator-name = "vdd_log";
227 regulator-min-microvolt = <1100000>;
228 regulator-max-microvolt = <1100000>;
229 regulator-always-on;
230 };
231
232 vcc_20: REG4 {
233 regulator-name = "vcc_20";
234 regulator-min-microvolt = <2000000>;
235 regulator-max-microvolt = <2000000>;
236 regulator-always-on;
237 };
238
239 vccio_sd: REG5 {
240 regulator-name = "vccio_sd";
241 regulator-min-microvolt = <3300000>;
242 regulator-max-microvolt = <3300000>;
243 regulator-always-on;
244 };
245
246 vdd10_lcd: REG6 {
247 regulator-name = "vdd10_lcd";
248 regulator-min-microvolt = <1000000>;
249 regulator-max-microvolt = <1000000>;
250 regulator-always-on;
251 };
252
253 vcca_18: REG7 {
254 regulator-name = "vcca_18";
255 regulator-min-microvolt = <1800000>;
256 regulator-max-microvolt = <1800000>;
257 };
258
259 vcca_33: REG8 {
260 regulator-name = "vcca_33";
261 regulator-min-microvolt = <3300000>;
262 regulator-max-microvolt = <3300000>;
263 };
264
265 vcc_lan: REG9 {
266 regulator-name = "vcc_lan";
267 regulator-min-microvolt = <3300000>;
268 regulator-max-microvolt = <3300000>;
269 };
270
271 vdd_10: REG10 {
272 regulator-name = "vdd_10";
273 regulator-min-microvolt = <1000000>;
274 regulator-max-microvolt = <1000000>;
275 regulator-always-on;
276 };
277
278 vcc_18: REG11 {
279 regulator-name = "vcc_18";
280 regulator-min-microvolt = <1800000>;
281 regulator-max-microvolt = <1800000>;
282 regulator-always-on;
283 };
284
285 vcc18_lcd: REG12 {
286 regulator-name = "vcc18_lcd";
287 regulator-min-microvolt = <1800000>;
288 regulator-max-microvolt = <1800000>;
289 regulator-always-on;
290 };
291 };
292 };
293};
294
295&i2c1 {
296 status = "okay";
297};
298
299&i2c2 {
300 status = "okay";
301};
302
303&i2c4 {
304 status = "okay";
305};
306
307&i2c5 {
308 status = "okay";
309};
310
311&pinctrl {
312 pcfg_output_high: pcfg-output-high {
313 output-high;
314 };
315
316 pcfg_output_low: pcfg-output-low {
317 output-low;
318 };
319
Kever Yangab7fddc2019-07-09 21:58:51 +0800320 pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
321 bias-pull-up;
322 drive-strength = <12>;
323 };
324
Simon Glassec3be542015-08-30 16:55:41 -0600325 act8846 {
326 pwr_hold: pwr-hold {
327 rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
328 };
329 };
330
331 gmac {
332 phy_int: phy-int {
333 rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
334 };
335
336 phy_pmeb: phy-pmeb {
337 rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
338 };
339
340 phy_rst: phy-rst {
341 rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
342 };
343 };
344
345 hym8563 {
346 rtc_int: rtc-int {
347 rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
348 };
349 };
350
351 keys {
352 pwr_key: pwr-key {
353 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
354 };
355 };
356
357 leds {
358 power_led: power-led {
359 rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
360 };
361
362 work_led: work-led {
363 rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
364 };
365 };
366
367 sdmmc {
Kever Yangab7fddc2019-07-09 21:58:51 +0800368 /*
369 * Default drive strength isn't enough to achieve even
370 * high-speed mode on firefly board so bump up to 12ma.
371 */
372 sdmmc_bus4: sdmmc-bus4 {
373 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
374 <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
375 <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
376 <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
377 };
378
379 sdmmc_clk: sdmmc-clk {
380 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
381 };
382
383 sdmmc_cmd: sdmmc-cmd {
384 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
385 };
386
Simon Glassec3be542015-08-30 16:55:41 -0600387 sdmmc_pwr: sdmmc-pwr {
Kever Yangab7fddc2019-07-09 21:58:51 +0800388 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
Simon Glassec3be542015-08-30 16:55:41 -0600389 };
390 };
391
392 usb_host {
393 host_vbus_drv: host-vbus-drv {
394 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
395 };
396
397 usbhub_rst: usbhub-rst {
398 rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
399 };
400 };
401
402 usb_otg {
403 otg_vbus_drv: otg-vbus-drv {
404 rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
405 };
406 };
407};
408
409&saradc {
410 vref-supply = <&vcc_18>;
411 status = "okay";
412};
413
414&sdio0 {
415 broken-cd;
416 bus-width = <4>;
417 disable-wp;
418 non-removable;
419 num-slots = <1>;
420 pinctrl-names = "default";
421 pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
422 vmmc-supply = <&vcc_18>;
Sjoerd Simonsd8e65982015-08-30 16:55:46 -0600423 status = "disabled";
Simon Glassec3be542015-08-30 16:55:41 -0600424};
425
426&sdmmc {
427 bus-width = <4>;
428 cap-mmc-highspeed;
429 cap-sd-highspeed;
430 card-detect-delay = <200>;
431 disable-wp;
432 num-slots = <1>;
433 pinctrl-names = "default";
434 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
435 vmmc-supply = <&vcc_sd>;
436 status = "okay";
437};
438
439&spi0 {
440 pinctrl-names = "default";
441 pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
442 status = "okay";
443};
444
445&uart0 {
446 pinctrl-names = "default";
447 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
448 status = "okay";
449};
450
451&uart1 {
452 status = "okay";
453};
454
455&uart2 {
456 status = "okay";
457};
458
459&uart3 {
460 status = "okay";
461};
462
463&usb_host1 {
464 pinctrl-names = "default";
465 pinctrl-0 = <&usbhub_rst>;
466 status = "okay";
467};
468
469&usb_otg {
470 status = "okay";
471};
472
473&vopb {
474 status = "okay";
475};
476
477&vopb_mmu {
478 status = "okay";
479};
480
481&vopl {
482 status = "okay";
483};
484
485&vopl_mmu {
486 status = "okay";
487};
488
489&wdt {
490 status = "okay";
491};