ramips: mt7621: nix mac-address-increment
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_iodata_wn-ax1167gr.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc";
8 model = "I-O DATA WN-AX1167GR";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "green:power";
26 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
27 };
28
29 wps {
30 label = "green:wps";
31 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 wps {
45 label = "wps";
46 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_WPS_BUTTON>;
48 };
49
50 auto {
51 label = "auto";
52 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
53 linux,code = <BTN_0>;
54 linux,input-type = <EV_SW>;
55 };
56
57 custom {
58 label = "custom";
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 linux,input-type = <EV_SW>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "Bootloader";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "Config";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x200>;
103 };
104
105 macaddr_factory_4: macaddr@4 {
106 compatible = "mac-base";
107 reg = <0x4 0x6>;
108 #nvmem-cell-cells = <1>;
109 };
110 };
111 };
112
113 iNIC_rf: partition@50000 {
114 label = "iNIC_rf";
115 reg = <0x50000 0x10000>;
116 read-only;
117
118 nvmem-layout {
119 compatible = "fixed-layout";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 eeprom_iNIC_rf_0: eeprom@0 {
124 reg = <0x0 0x400>;
125 };
126
127 macaddr_iNIC_rf_4: macaddr@4 {
128 reg = <0x4 0x6>;
129 };
130 };
131 };
132
133 partition@60000 {
134 compatible = "denx,uimage";
135 label = "firmware";
136 reg = <0x60000 0xf30000>;
137 };
138
139 partition@f90000 {
140 label = "Key";
141 reg = <0xf90000 0x10000>;
142 read-only;
143 };
144
145 partition@fa0000 {
146 label = "backup";
147 reg = <0xfa0000 0x10000>;
148 read-only;
149 };
150
151 partition@fb0000 {
152 label = "storage";
153 reg = <0xfb0000 0x50000>;
154 read-only;
155 };
156 };
157 };
158 };
159
160 &gmac0 {
161 nvmem-cells = <&macaddr_iNIC_rf_4>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &gmac1 {
166 status = "okay";
167 label = "wan";
168 phy-handle = <&ethphy0>;
169
170 nvmem-cells = <&macaddr_factory_4 1>;
171 nvmem-cell-names = "mac-address";
172 };
173
174 &mdio {
175 ethphy0: ethernet-phy@0 {
176 reg = <0>;
177 };
178 };
179
180 &switch0 {
181 ports {
182 port@1 {
183 status = "okay";
184 label = "lan4";
185 };
186
187 port@2 {
188 status = "okay";
189 label = "lan3";
190 };
191
192 port@3 {
193 status = "okay";
194 label = "lan2";
195 };
196
197 port@4 {
198 status = "okay";
199 label = "lan1";
200 };
201 };
202 };
203
204 &state_default {
205 gpio {
206 groups = "uart2", "uart3", "jtag";
207 function = "gpio";
208 };
209 };
210
211 &pcie {
212 status = "okay";
213 };
214
215 &pcie0 {
216 mt76@0,0 {
217 reg = <0x0000 0 0 0 0>;
218 nvmem-cells = <&eeprom_iNIC_rf_0>;
219 nvmem-cell-names = "eeprom";
220 };
221 };
222
223 &pcie1 {
224 mt76@0,0 {
225 reg = <0x0000 0 0 0 0>;
226 nvmem-cells = <&eeprom_factory_0>;
227 nvmem-cell-names = "eeprom";
228 ieee80211-freq-limit = <5000000 6000000>;
229 };
230 };
231
232 &xhci {
233 status = "disabled";
234 };