5eacdfaaed78cebfe7625544bf39c51c2047d122
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_xiaoyu_xy-c5.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaoyu,xy-c5", "mediatek,mt7621-soc";
10 model = "XiaoYu XY-C5";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 work {
24 label = "xy-c5:green:work";
25 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
26 };
27
28 led_sys: sys {
29 label = "xy-c5:green:sys";
30 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <25000000>;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74 };
75
76 partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 reg = <0x50000 0x1fb0000>;
80 };
81 };
82 };
83 };
84
85 &pcie {
86 status = "okay";
87 };
88
89 &gmac0 {
90 mtd-mac-address = <&factory 0x4>;
91 };
92
93 &switch0 {
94 ports {
95 port@0 {
96 status = "okay";
97 label = "lan1";
98 };
99
100 port@1 {
101 status = "okay";
102 label = "lan2";
103 };
104
105 port@2 {
106 status = "okay";
107 label = "lan3";
108 };
109
110 port@3 {
111 status = "okay";
112 label = "lan4";
113 };
114
115 port@4 {
116 status = "okay";
117 label = "wan";
118 mtd-mac-address = <&factory 0x4>;
119 mtd-mac-address-increment = <1>;
120 };
121 };
122 };
123
124 &state_default {
125 gpio {
126 groups = "uart3", "wdt";
127 function = "gpio";
128 };
129 };