b5f8ff03a80d610220d24e0920a409e2fa6c9ebd
[openwrt/staging/mkresin.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 mediatek,mtd-eeprom = <&factory 0x8000>;
70 ieee80211-freq-limit = <5000000 6000000>;
71 };
72 };
73
74 &spi0 {
75 status = "okay";
76
77 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <40000000>;
81
82 partitions {
83 compatible = "fixed-partitions";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 partition@0 {
88 label = "u-boot";
89 reg = <0x0 0x30000>;
90 read-only;
91 };
92
93 partition@30000 {
94 label = "u-boot-env";
95 reg = <0x30000 0x10000>;
96 read-only;
97 };
98
99 factory: partition@40000 {
100 label = "factory";
101 reg = <0x40000 0x10000>;
102 read-only;
103 };
104
105 partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x50000 0x7b0000>;
109 };
110 };
111 };
112 };
113
114 &wmac {
115 status = "okay";
116 };
117
118 &ethernet {
119 mtd-mac-address = <&factory 0x28>;
120 };
121
122 &esw {
123 mediatek,portmap = <0x2f>;
124 };
125
126 &usbphy {
127 status = "disabled";
128 };
129
130 &ehci {
131 status = "disabled";
132 };
133
134 &ohci {
135 status = "disabled";
136 };