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