ramips: fix DTS EEPROM property for some MT7628 devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc";
10 model = "I-O DATA WNPR2600G";
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 = <&gpio 7 GPIO_ACTIVE_HIGH>;
25 default-state = "on";
26 };
27
28 notification {
29 label = "green:notification";
30 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan2g {
34 label = "green:wlan2g";
35 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy0radio";
37 };
38
39 wlan5g {
40 label = "green:wlan5g";
41 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42 linux,default-trigger = "phy1radio";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 auto {
50 label = "auto";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 linux,code = <BTN_0>;
53 linux,input-type = <EV_SW>;
54 };
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <40000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x030000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x030000 0x010000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 compatible = "nvmem-cells";
97 label = "factory";
98 reg = <0x040000 0x010000>;
99 #address-cells = <1>;
100 #size-cells = <1>;
101 read-only;
102
103 eeprom_factory_0: eeprom@0 {
104 reg = <0x0 0x4da8>;
105 };
106
107 eeprom_factory_8000: eeprom@8000 {
108 reg = <0x8000 0x4da8>;
109 };
110
111 macaddr_factory_4: macaddr@4 {
112 reg = <0x4 0x6>;
113 };
114 };
115
116 partition@50000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x050000 0xda0000>;
120 };
121
122 partition@df0000 {
123 label = "manufacture";
124 reg = <0xdf0000 0x190000>;
125 read-only;
126 };
127
128 partition@f80000 {
129 label = "storage";
130 reg = <0xf80000 0x080000>;
131 read-only;
132 };
133 };
134 };
135 };
136
137 &gmac0 {
138 nvmem-cells = <&macaddr_factory_4>;
139 nvmem-cell-names = "mac-address";
140 };
141
142 &gmac1 {
143 status = "okay";
144 label = "wan";
145 phy-handle = <&ethphy0>;
146
147 nvmem-cells = <&macaddr_factory_4>;
148 nvmem-cell-names = "mac-address";
149 };
150
151 &mdio {
152 ethphy0: ethernet-phy@0 {
153 reg = <0>;
154 };
155 };
156
157 &switch0 {
158 ports {
159 port@1 {
160 status = "okay";
161 label = "lan4";
162 };
163
164 port@2 {
165 status = "okay";
166 label = "lan3";
167 };
168
169 port@3 {
170 status = "okay";
171 label = "lan2";
172 };
173
174 port@4 {
175 status = "okay";
176 label = "lan1";
177 };
178 };
179 };
180
181 &state_default {
182 gpio {
183 groups = "uart2", "uart3", "jtag", "wdt";
184 function = "gpio";
185 };
186 };
187
188 &pcie {
189 status = "okay";
190 };
191
192 &pcie0 {
193 wifi@0,0 {
194 compatible = "mediatek,mt76";
195 reg = <0x0000 0 0 0 0>;
196 nvmem-cells = <&eeprom_factory_0>;
197 nvmem-cell-names = "eeprom";
198 ieee80211-freq-limit = <2400000 2500000>;
199 };
200 };
201
202 &pcie1 {
203 wifi@0,0 {
204 compatible = "mediatek,mt76";
205 reg = <0x0000 0 0 0 0>;
206 nvmem-cells = <&eeprom_factory_8000>;
207 nvmem-cell-names = "eeprom";
208 ieee80211-freq-limit = <5000000 6000000>;
209 };
210 };
211
212 &xhci {
213 status = "disabled";
214 };