mediatek: drop pwm7_pins from Buffalo WSR-2533DHP2
[openwrt/staging/jow.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 uart0_pins: uart0-pins {
197 mux {
198 function = "uart";
199 groups = "uart0_0_tx_rx" ;
200 };
201 };
202
203 watchdog_pins: watchdog-pins {
204 mux {
205 function = "watchdog";
206 groups = "watchdog";
207 };
208 };
209 };
210
211 &bch {
212 status = "okay";
213 };
214
215 &eth {
216 pinctrl-names = "default";
217 pinctrl-0 = <&eth_pins>;
218 status = "okay";
219
220 gmac0: mac@0 {
221 compatible = "mediatek,eth-mac";
222 reg = <0>;
223
224 phy-connection-type = "2500base-x";
225
226 nvmem-cells = <&macaddr_factory_4 (-1)>;
227 nvmem-cell-names = "mac-address";
228
229 fixed-link {
230 speed = <2500>;
231 full-duplex;
232 pause;
233 };
234 };
235
236 mdio: mdio-bus {
237 #address-cells = <1>;
238 #size-cells = <0>;
239 };
240 };
241
242 &nandc {
243 pinctrl-names = "default";
244 pinctrl-0 = <&parallel_nand_pins>;
245 status = "okay";
246
247 nand@0 {
248 reg = <0>;
249 nand-ecc-mode = "hw";
250
251 partitions {
252 compatible = "fixed-partitions";
253 #address-cells = <1>;
254 #size-cells = <1>;
255
256 partition@0 {
257 label = "Preloader";
258 reg = <0x0 0x80000>;
259 read-only;
260 };
261
262 partition@80000 {
263 label = "ATF";
264 reg = <0x80000 0x40000>;
265 read-only;
266 };
267
268 partition@c0000 {
269 label = "Bootloader";
270 reg = <0xc0000 0x80000>;
271 read-only;
272 };
273
274 partition@140000 {
275 label = "Config";
276 reg = <0x140000 0x80000>;
277 };
278
279 factory: partition@1c0000 {
280 compatible = "nvmem-cells";
281 label = "factory";
282 reg = <0x1c0000 0x40000>;
283 read-only;
284
285 nvmem-layout {
286 compatible = "fixed-layout";
287 #address-cells = <1>;
288 #size-cells = <1>;
289
290 macaddr_factory_4: macaddr@4 {
291 compatible = "mac-base";
292 reg = <0x4 0x6>;
293 #nvmem-cell-cells = <1>;
294 };
295 };
296 };
297
298 partition@200000 {
299 compatible = "brcm,trx";
300 brcm,trx-magic = <0x32504844>;
301 label = "firmware";
302 reg = <0x200000 0x3a00000>;
303 };
304
305 partition@3C00000 {
306 label = "Kernel2";
307 reg = <0x3c00000 0x3a00000>;
308 };
309
310 partition@7600000 {
311 label = "glbcfg";
312 reg = <0x7600000 0x200000>;
313 read-only;
314 };
315
316 partition@7800000 {
317 label = "board_data";
318 reg = <0x7800000 0x200000>;
319 read-only;
320 };
321 };
322 };
323 };
324
325 &pwm {
326 status = "okay";
327 };
328
329 &pwrap {
330 pinctrl-names = "default";
331 pinctrl-0 = <&pmic_bus_pins>;
332 status = "okay";
333 };
334
335 &uart0 {
336 pinctrl-names = "default";
337 pinctrl-0 = <&uart0_pins>;
338 status = "okay";
339 };
340
341 &watchdog {
342 pinctrl-names = "default";
343 pinctrl-0 = <&watchdog_pins>;
344 status = "okay";
345 };
346
347 &wmac {
348 status = "okay";
349
350 mediatek,mtd-eeprom = <&factory 0x0>;
351 };
352
353 &rtc {
354 status = "disabled";
355 };