f8990b25cf48eba2a237277d00272ee577a2811e
[openwrt/staging/blocktrron.git] / target / linux / mediatek / dts / mt7622-buffalo-wsr-2533dhp2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/leds/common.h>
6
7 #include "mt7622.dtsi"
8 #include "mt6380.dtsi"
9
10 / {
11 model = "Buffalo WSR-2533DHP2";
12 compatible = "buffalo,wsr-2533dhp2", "mediatek,mt7622";
13
14 aliases {
15 serial0 = &uart0;
16 led-boot = &power_green;
17 led-failsafe = &power_amber;
18 led-running = &power_green;
19 led-upgrade = &power_green;
20 label-mac-device = &gmac0;
21 };
22
23 chosen {
24 bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
25 };
26
27 memory {
28 reg = <0 0x40000000 0 0x0F000000>;
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led-0 {
35 label = "amber:wireless";
36 gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
37 color = <LED_COLOR_ID_AMBER>;
38 function = LED_FUNCTION_WLAN;
39 };
40
41 power_amber: led-1 {
42 label = "amber:power";
43 gpios = <&pio 3 GPIO_ACTIVE_LOW>;
44 color = <LED_COLOR_ID_AMBER>;
45 function = LED_FUNCTION_POWER;
46 };
47
48 power_green: led-2 {
49 label = "green:power";
50 gpios = <&pio 4 GPIO_ACTIVE_LOW>;
51 color = <LED_COLOR_ID_GREEN>;
52 function = LED_FUNCTION_POWER;
53 };
54
55 led-3 {
56 label = "green:wireless";
57 gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
58 color = <LED_COLOR_ID_GREEN>;
59 function = LED_FUNCTION_WLAN;
60 };
61
62 led-4 {
63 label = "green:internet";
64 gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
65 color = <LED_COLOR_ID_GREEN>;
66 function = LED_FUNCTION_WAN;
67 };
68
69 led-5 {
70 label = "green:router";
71 gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
72 color = <LED_COLOR_ID_GREEN>;
73 function = LED_FUNCTION_INDICATOR;
74 };
75 };
76
77 keys {
78 compatible = "gpio-keys";
79
80 key-reset {
81 label = "reset";
82 gpios = <&pio 0 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RESTART>;
84 };
85
86 /* GPIO 1 and 16 are a tri-state switch button with
87 * ROUTER / AP / WB.
88 */
89 key-router {
90 label = "router";
91 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
92 linux,code = <BTN_0>;
93 linux,input-type = <EV_SW>;
94 };
95
96 key-bridge {
97 label = "wb";
98 gpios = <&pio 16 GPIO_ACTIVE_LOW>;
99 linux,code = <BTN_1>;
100 linux,input-type = <EV_SW>;
101 };
102
103 /* GPIO 18 is a switch button with AUTO / MANUAL. */
104 key-manual {
105 label = "manual";
106 gpios = <&pio 18 GPIO_ACTIVE_LOW>;
107 linux,code = <BTN_2>;
108 linux,input-type = <EV_SW>;
109 };
110
111 key-wps {
112 label = "wps";
113 gpios = <&pio 102 GPIO_ACTIVE_LOW>;
114 linux,code = <KEY_WPS_BUTTON>;
115 };
116 };
117
118 rtkgsw: rtkgsw@0 {
119 compatible = "mediatek,rtk-gsw";
120 mediatek,ethsys = <&ethsys>;
121 mediatek,mdio = <&mdio>;
122 mediatek,reset-pin = <&pio 54 GPIO_ACTIVE_HIGH>;
123 };
124 };
125
126 &cpu0 {
127 proc-supply = <&mt6380_vcpu_reg>;
128 sram-supply = <&mt6380_vm_reg>;
129 };
130
131 &cpu1 {
132 proc-supply = <&mt6380_vcpu_reg>;
133 sram-supply = <&mt6380_vm_reg>;
134 };
135
136 &pcie0 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&pcie0_pins>;
139 status = "okay";
140 };
141
142 &slot0 {
143 status = "okay";
144
145 wifi@0,0 {
146 compatible = "mediatek,mt76";
147 reg = <0x0000 0 0 0 0>;
148 mediatek,mtd-eeprom = <&factory 0x5000>;
149 ieee80211-freq-limit = <5000000 6000000>;
150 };
151 };
152
153 &pio {
154 eth_pins: eth-pins {
155 mux {
156 function = "eth";
157 groups = "mdc_mdio", "rgmii_via_gmac2";
158 };
159 };
160
161 /* Parallel nand is shared pin with eMMC */
162 parallel_nand_pins: parallel-nand-pins {
163 mux {
164 function = "flash";
165 groups = "par_nand";
166 };
167
168 conf-cmd-dat {
169 pins = "NCEB", "NWEB", "NREB",
170 "NDL4", "NDL5", "NDL6",
171 "NDL7", "NRB", "NCLE",
172 "NALE", "NDL0", "NDL1",
173 "NDL2", "NDL3";
174 input-enable;
175 drive-strength = <8>;
176 bias-pull-up;
177 };
178 };
179
180 pcie0_pins: pcie0-pins {
181 mux {
182 function = "pcie";
183 groups = "pcie0_pad_perst",
184 "pcie0_1_waken",
185 "pcie0_1_clkreq";
186 };
187 };
188
189 pmic_bus_pins: pmic-bus-pins {
190 mux {
191 function = "pmic";
192 groups = "pmic_bus";
193 };
194 };
195
196 pwm7_pins: pwm1-2-pins {
197 mux {
198 function = "pwm";
199 groups = "pwm_ch7_2";
200 };
201 };
202
203 uart0_pins: uart0-pins {
204 mux {
205 function = "uart";
206 groups = "uart0_0_tx_rx" ;
207 };
208 };
209
210 watchdog_pins: watchdog-pins {
211 mux {
212 function = "watchdog";
213 groups = "watchdog";
214 };
215 };
216 };
217
218 &bch {
219 status = "okay";
220 };
221
222 &eth {
223 pinctrl-names = "default";
224 pinctrl-0 = <&eth_pins>;
225 status = "okay";
226
227 gmac0: mac@0 {
228 compatible = "mediatek,eth-mac";
229 reg = <0>;
230
231 phy-connection-type = "2500base-x";
232
233 nvmem-cells = <&macaddr_factory_4 (-1)>;
234 nvmem-cell-names = "mac-address";
235
236 fixed-link {
237 speed = <2500>;
238 full-duplex;
239 pause;
240 };
241 };
242
243 mdio: mdio-bus {
244 #address-cells = <1>;
245 #size-cells = <0>;
246 };
247 };
248
249 &nandc {
250 pinctrl-names = "default";
251 pinctrl-0 = <&parallel_nand_pins>;
252 status = "okay";
253
254 nand@0 {
255 reg = <0>;
256 nand-ecc-mode = "hw";
257
258 partitions {
259 compatible = "fixed-partitions";
260 #address-cells = <1>;
261 #size-cells = <1>;
262
263 partition@0 {
264 label = "Preloader";
265 reg = <0x0 0x80000>;
266 read-only;
267 };
268
269 partition@80000 {
270 label = "ATF";
271 reg = <0x80000 0x40000>;
272 read-only;
273 };
274
275 partition@c0000 {
276 label = "Bootloader";
277 reg = <0xc0000 0x80000>;
278 read-only;
279 };
280
281 partition@140000 {
282 label = "Config";
283 reg = <0x140000 0x80000>;
284 };
285
286 factory: partition@1c0000 {
287 compatible = "nvmem-cells";
288 label = "factory";
289 reg = <0x1c0000 0x40000>;
290 read-only;
291
292 nvmem-layout {
293 compatible = "fixed-layout";
294 #address-cells = <1>;
295 #size-cells = <1>;
296
297 macaddr_factory_4: macaddr@4 {
298 compatible = "mac-base";
299 reg = <0x4 0x6>;
300 #nvmem-cell-cells = <1>;
301 };
302 };
303 };
304
305 partition@200000 {
306 compatible = "brcm,trx";
307 brcm,trx-magic = <0x32504844>;
308 label = "firmware";
309 reg = <0x200000 0x3a00000>;
310 };
311
312 partition@3C00000 {
313 label = "Kernel2";
314 reg = <0x3c00000 0x3a00000>;
315 };
316
317 partition@7600000 {
318 label = "glbcfg";
319 reg = <0x7600000 0x200000>;
320 read-only;
321 };
322
323 partition@7800000 {
324 label = "board_data";
325 reg = <0x7800000 0x200000>;
326 read-only;
327 };
328 };
329 };
330 };
331
332 &pwm {
333 pinctrl-names = "default";
334 pinctrl-0 = <&pwm7_pins>;
335 status = "okay";
336 };
337
338 &pwrap {
339 pinctrl-names = "default";
340 pinctrl-0 = <&pmic_bus_pins>;
341 status = "okay";
342 };
343
344 &uart0 {
345 pinctrl-names = "default";
346 pinctrl-0 = <&uart0_pins>;
347 status = "okay";
348 };
349
350 &watchdog {
351 pinctrl-names = "default";
352 pinctrl-0 = <&watchdog_pins>;
353 status = "okay";
354 };
355
356 &wmac {
357 status = "okay";
358
359 mediatek,mtd-eeprom = <&factory 0x0>;
360 };
361
362 &rtc {
363 status = "disabled";
364 };