ramips: add support for WAVLINK WL-WN577A2
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn577a2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 #include "mt7628an.dtsi"
8
9 / {
10 compatible = "wavlink,wl-wn577a2", "maginon,wlr-755", "mediatek,mt7628an-soc";
11 model = "WAVLINK WL-WN577A2";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 lan {
40 label = "wl-wn577a2:green:lan";
41 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
42 };
43
44 wan {
45 label = "wl-wn577a2:green:wan";
46 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
47 };
48
49 led_wps: wps {
50 label = "wl-wn577a2:green:wps";
51 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
52 };
53 };
54 };
55
56 &state_default {
57 gpio {
58 groups = "i2c", "wdt", "p0led_an", "p3led_an", "p4led_an";
59 function = "gpio";
60 };
61 };
62
63 &pcie {
64 status = "okay";
65 };
66
67 &pcie0 {
68 mt76@0,0 {
69 reg = <0x0000 0 0 0 0>;
70 mediatek,mtd-eeprom = <&factory 0x8000>;
71 ieee80211-freq-limit = <5000000 6000000>;
72 };
73 };
74
75 &spi0 {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <40000000>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "u-boot-env";
96 reg = <0x30000 0x10000>;
97 read-only;
98 };
99
100 factory: partition@40000 {
101 label = "factory";
102 reg = <0x40000 0x10000>;
103 read-only;
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x50000 0x7b0000>;
110 };
111 };
112 };
113 };
114
115 &wmac {
116 status = "okay";
117 };
118
119 &ethernet {
120 mtd-mac-address = <&factory 0x28>;
121 };
122
123 &esw {
124 mediatek,portmap = <0x2f>;
125 };
126
127 &usbphy {
128 status = "disabled";
129 };
130
131 &ehci {
132 status = "disabled";
133 };
134
135 &ohci {
136 status = "disabled";
137 };