b4ba1519d3df37b856234a16eb69bac3114e69d2
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-2533dhpl.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 = "buffalo,wsr-2533dhpl", "mediatek,mt7621-soc";
10 model = "Buffalo WSR-2533DHPL";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_diag;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 internet_green {
24 label = "green:internet";
25 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
26 };
27
28 router_green {
29 label = "green:router";
30 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
31 };
32
33 router_amber {
34 label = "amber:router";
35 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
36 };
37
38 internet_amber {
39 label = "amber:internet";
40 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
41 };
42
43 wireless_amber {
44 label = "amber:wireless";
45 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
46 };
47
48 led_power: power {
49 label = "green:power";
50 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
51 };
52
53 led_diag: diag {
54 label = "amber:diag";
55 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
56 };
57
58 wireless_green {
59 label = "green:wireless";
60 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66
67 reset {
68 label = "reset";
69 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
70 linux,code = <KEY_RESTART>;
71 };
72
73 aoss {
74 label = "aoss";
75 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_WPS_BUTTON>;
77 };
78
79 auto {
80 label = "auto";
81 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
82 linux,code = <BTN_0>;
83 linux,input-type = <EV_SW>;
84 };
85
86 bridge {
87 label = "wb";
88 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
89 linux,code = <BTN_1>;
90 linux,input-type = <EV_SW>;
91 };
92
93 router {
94 label = "router";
95 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
96 linux,code = <BTN_1>;
97 linux,input-type = <EV_SW>;
98 };
99
100 power {
101 label = "power";
102 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
103 linux,code = <KEY_POWER>;
104 };
105 };
106 };
107
108 &spi0 {
109 status = "okay";
110
111 flash@0 {
112 compatible = "jedec,spi-nor";
113 reg = <0>;
114 spi-max-frequency = <40000000>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 partition@0 {
122 label = "u-boot";
123 reg = <0x0 0x30000>;
124 read-only;
125 };
126
127 partition@30000 {
128 label = "u-boot-env";
129 reg = <0x30000 0x10000>;
130 read-only;
131 };
132
133 factory: partition@40000 {
134 label = "factory";
135 reg = <0x40000 0x10000>;
136 read-only;
137
138 nvmem-layout {
139 compatible = "fixed-layout";
140 #address-cells = <1>;
141 #size-cells = <1>;
142
143 eeprom_factory_0: eeprom@0 {
144 reg = <0x0 0x4da8>;
145 };
146
147 eeprom_factory_8000: eeprom@8000 {
148 reg = <0x8000 0x4da8>;
149 };
150
151 macaddr_factory_4: macaddr@4 {
152 compatible = "mac-base";
153 reg = <0x4 0x6>;
154 #nvmem-cell-cells = <1>;
155 };
156 };
157 };
158
159 partition@50000 {
160 compatible = "openwrt,trx";
161 label = "firmware";
162 reg = <0x50000 0x7c0000>;
163 };
164
165 partition@810000 {
166 label = "Kernel2";
167 reg = <0x810000 0x7c0000>;
168 read-only;
169 };
170
171 partition@fd0000 {
172 label = "glbcfg";
173 reg = <0xfd0000 0x010000>;
174 read-only;
175 };
176
177 partition@fe0000 {
178 label = "board_data";
179 reg = <0xfe0000 0x20000>;
180 read-only;
181 };
182 };
183 };
184 };
185
186 &gmac0 {
187 nvmem-cells = <&macaddr_factory_4 (-1)>;
188 nvmem-cell-names = "mac-address";
189 };
190
191 &gmac1 {
192 status = "okay";
193 label = "wan";
194 phy-handle = <&ethphy0>;
195
196 nvmem-cells = <&macaddr_factory_4 (-1)>;
197 nvmem-cell-names = "mac-address";
198 };
199
200 &mdio {
201 ethphy0: ethernet-phy@0 {
202 reg = <0>;
203 };
204 };
205
206 &switch0 {
207 ports {
208 port@1 {
209 status = "okay";
210 label = "lan4";
211 };
212
213 port@2 {
214 status = "okay";
215 label = "lan3";
216 };
217
218 port@3 {
219 status = "okay";
220 label = "lan2";
221 };
222
223 port@4 {
224 status = "okay";
225 label = "lan1";
226 };
227 };
228 };
229
230 &pcie {
231 status = "okay";
232 };
233
234 &pcie0 {
235 wifi@0,0 {
236 compatible = "mediatek,mt76";
237 reg = <0x0000 0 0 0 0>;
238 nvmem-cells = <&eeprom_factory_0>;
239 nvmem-cell-names = "eeprom";
240 ieee80211-freq-limit = <2400000 2500000>;
241 };
242 };
243
244 &pcie1 {
245 wifi@0,0 {
246 compatible = "mediatek,mt76";
247 reg = <0x0000 0 0 0 0>;
248 nvmem-cells = <&eeprom_factory_8000>;
249 nvmem-cell-names = "eeprom";
250 ieee80211-freq-limit = <5000000 6000000>;
251 };
252 };
253
254 &state_default {
255 gpio {
256 groups = "i2c", "uart2", "uart3", "wdt", "sdhci";
257 function = "gpio";
258 };
259 };
260
261 &xhci {
262 status = "disabled";
263 };