ramips: mt7621: nix mac-address-increment
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_cudy_wr1300-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "cudy,wr1300-v1", "mediatek,mt7621-soc";
10 model = "Cudy WR1300 v1";
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 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_sys: sys {
44 label = "green:sys";
45 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
46 };
47
48 usb {
49 label = "green:usb";
50 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
51 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
52 linux,default-trigger = "usbport";
53 };
54
55 wps {
56 label = "green:wps";
57 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <10000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91
92 nvmem-layout {
93 compatible = "fixed-layout";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 eeprom_factory_0: eeprom@0 {
98 reg = <0x0 0x400>;
99 };
100
101 eeprom_factory_8000: eeprom@8000 {
102 reg = <0x8000 0x200>;
103 };
104 };
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0xf80000>;
111 };
112
113 partition@fd0000 {
114 label = "debug";
115 reg = <0xfd0000 0x10000>;
116 read-only;
117 };
118
119 partition@fe0000 {
120 label = "backup";
121 reg = <0xfe0000 0x10000>;
122 read-only;
123 };
124
125 bdinfo: partition@ff0000 {
126 label = "bdinfo";
127 reg = <0xff0000 0x10000>;
128 read-only;
129
130 nvmem-layout {
131 compatible = "fixed-layout";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 macaddr_bdinfo_de00: macaddr@de00 {
136 compatible = "mac-base";
137 reg = <0xde00 0x6>;
138 #nvmem-cell-cells = <1>;
139 };
140 };
141 };
142 };
143 };
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 wifi@0,0 {
152 compatible = "pci14c3,7603";
153 reg = <0x0000 0 0 0 0>;
154 nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00 0>;
155 nvmem-cell-names = "eeprom", "mac-address";
156 ieee80211-freq-limit = <2400000 2500000>;
157
158 led {
159 led-active-low;
160 };
161 };
162 };
163
164 &pcie1 {
165 wifi@0,0 {
166 compatible = "pci14c3,7662";
167 reg = <0x0000 0 0 0 0>;
168 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00 2>;
169 nvmem-cell-names = "eeprom", "mac-address";
170 ieee80211-freq-limit = <5000000 6000000>;
171
172 led {
173 led-sources = <2>;
174 led-active-low;
175 };
176 };
177 };
178
179 &gmac0 {
180 nvmem-cells = <&macaddr_bdinfo_de00 0>;
181 nvmem-cell-names = "mac-address";
182 };
183
184 &gmac1 {
185 status = "okay";
186 label = "wan";
187 phy-handle = <&ethphy4>;
188
189 nvmem-cells = <&macaddr_bdinfo_de00 1>;
190 nvmem-cell-names = "mac-address";
191 };
192
193 &mdio {
194 ethphy4: ethernet-phy@4 {
195 reg = <4>;
196 };
197 };
198
199 &switch0 {
200 ports {
201 port@0 {
202 status = "okay";
203 label = "lan4";
204 };
205
206 port@1 {
207 status = "okay";
208 label = "lan3";
209 };
210
211 port@2 {
212 status = "okay";
213 label = "lan2";
214 };
215
216 port@3 {
217 status = "okay";
218 label = "lan1";
219 };
220 };
221 };
222
223 &state_default {
224 gpio {
225 groups = "wdt", "i2c", "jtag";
226 function = "gpio";
227 };
228 };