bc9bef13287af85a7f990eb3a3f4744792fdf657
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn577a2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "wavlink,wl-wn577a2", "maginon,wlr-755", "mediatek,mt7628an-soc";
10 model = "WAVLINK WL-WN577A2";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27
28 wps {
29 label = "wps";
30 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WPS_BUTTON>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 lan {
39 label = "green:lan";
40 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
41 };
42
43 wan {
44 label = "green:wan";
45 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
46 };
47
48 led_wps: wps {
49 label = "green:wps";
50 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &state_default {
56 gpio {
57 groups = "i2c", "wdt", "p0led_an", "p3led_an", "p4led_an";
58 function = "gpio";
59 };
60 };
61
62 &pcie {
63 status = "okay";
64 };
65
66 &pcie0 {
67 mt76@0,0 {
68 reg = <0x0000 0 0 0 0>;
69 nvmem-cells = <&eeprom_factory_8000>;
70 nvmem-cell-names = "eeprom";
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 compatible = "nvmem-cells";
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 #address-cells = <1>;
105 #size-cells = <1>;
106 read-only;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x400>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x200>;
114 };
115
116 macaddr_factory_28: macaddr@28 {
117 reg = <0x28 0x6>;
118 };
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0x7b0000>;
125 };
126 };
127 };
128 };
129
130 &wmac {
131 status = "okay";
132
133 nvmem-cells = <&eeprom_factory_0>;
134 nvmem-cell-names = "eeprom";
135 };
136
137 &ethernet {
138 nvmem-cells = <&macaddr_factory_28>;
139 nvmem-cell-names = "mac-address";
140 };
141
142 &esw {
143 mediatek,portmap = <0x2f>;
144 };
145
146 &usbphy {
147 status = "disabled";
148 };
149
150 &ehci {
151 status = "disabled";
152 };
153
154 &ohci {
155 status = "disabled";
156 };