ramips: fix EEPROM size for I-O DATA WN-DEAX1800GR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_iodata_wn-ac1167gr.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc";
10 model = "I-O DATA WN-AC1167GR";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 default-state = "on";
26 };
27
28 wlan2g {
29 label = "green:wlan2g";
30 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
31 };
32
33 notification {
34 label = "green:notification";
35 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan5g {
39 label = "green:wlan5g";
40 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52
53 reset {
54 label = "reset";
55 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58
59 auto {
60 label = "auto";
61 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
62 linux,code = <BTN_0>;
63 linux,input-type = <EV_SW>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x8000>;
96 read-only;
97 };
98
99 iNIC_rf: partition@48000 {
100 label = "iNIC_rf";
101 reg = <0x48000 0x8000>;
102 read-only;
103 };
104
105 partition@50000 {
106 label = "NoUsed";
107 reg = <0x50000 0x20000>;
108 read-only;
109 };
110
111 partition@70000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x70000 0x6b4000>;
115 };
116
117 partition@724000 {
118 label = "manufacture";
119 reg = <0x724000 0x8c000>;
120 read-only;
121 };
122
123 partition@7b0000 {
124 label = "backup";
125 reg = <0x7b0000 0x10000>;
126 read-only;
127 };
128
129 partition@7c0000 {
130 label = "storage";
131 reg = <0x7c0000 0x40000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &ethernet {
139 pinctrl-names = "default";
140 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
141
142 nvmem-cells = <&macaddr_factory_4>;
143 nvmem-cell-names = "mac-address";
144
145 port@5 {
146 status = "okay";
147 mediatek,fixed-link = <1000 1 1 1>;
148 phy-mode = "rgmii";
149 };
150
151 mdio-bus {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 status = "okay";
155
156 ethernet-phy@0 {
157 reg = <0>;
158 phy-mode = "rgmii";
159 };
160
161 ethernet-phy@1 {
162 reg = <1>;
163 phy-mode = "rgmii";
164 };
165
166 ethernet-phy@2 {
167 reg = <2>;
168 phy-mode = "rgmii";
169 };
170
171 ethernet-phy@3 {
172 reg = <3>;
173 phy-mode = "rgmii";
174 };
175
176 ethernet-phy@4 {
177 reg = <4>;
178 phy-mode = "rgmii";
179 };
180
181 ethernet-phy@1f {
182 reg = <0x1f>;
183 phy-mode = "rgmii";
184 };
185 };
186 };
187
188 &gsw {
189 mediatek,ephy-base = /bits/ 8 <12>;
190 };
191
192 &state_default {
193 gpio {
194 groups = "i2c", "uartf";
195 function = "gpio";
196 };
197 };
198
199 &pcie {
200 status = "okay";
201 };
202
203 &pcie0 {
204 wifi@0,0 {
205 reg = <0x0000 0 0 0 0>;
206 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
207 ieee80211-freq-limit = <5000000 6000000>;
208 };
209 };
210
211 &wmac {
212 ralink,mtd-eeprom = <&factory 0x0>;
213 };
214
215 &factory {
216 compatible = "nvmem-cells";
217 #address-cells = <1>;
218 #size-cells = <1>;
219
220 macaddr_factory_4: macaddr@4 {
221 reg = <0x4 0x6>;
222 };
223 };