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