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