rootfs: fix USE_APK detection
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn578a2.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-wn578a2", "mediatek,mt7628an-soc";
10 model = "Wavlink WL-WN578A2";
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 ap {
35 label = "ap";
36 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
37 linux,code = <BTN_0>;
38 linux,input-type = <EV_SW>;
39 };
40
41 repeater {
42 label = "repeater";
43 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
44 linux,code = <BTN_1>;
45 linux,input-type = <EV_SW>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 wifi-high {
53 label = "green:wifi-high";
54 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi-med {
58 label = "green:wifi-med";
59 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
60 };
61
62 wifi-low {
63 label = "green:wifi-low";
64 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
65 };
66
67 lan {
68 label = "green:lan";
69 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
70 };
71
72 wan {
73 label = "green:wan";
74 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
75 };
76
77 led_wps: wps {
78 label = "green:wps";
79 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
80 };
81 };
82 };
83
84 &state_default {
85 gpio {
86 groups = "i2c", "wdt", "wled_an", "p0led_an", "p1led_an",
87 "p2led_an", "p3led_an", "p4led_an", "refclk", "gpio";
88 function = "gpio";
89 };
90 };
91
92 &pcie {
93 status = "okay";
94 };
95
96 &pcie0 {
97 wifi@0,0 {
98 reg = <0x0000 0 0 0 0>;
99 mediatek,mtd-eeprom = <&factory 0x8000>;
100 ieee80211-freq-limit = <5000000 6000000>;
101 };
102 };
103
104 &spi0 {
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 reg = <0>;
110 spi-max-frequency = <40000000>;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 partition@0 {
118 label = "u-boot";
119 reg = <0x0 0x30000>;
120 read-only;
121 };
122
123 partition@30000 {
124 label = "u-boot-env";
125 reg = <0x30000 0x10000>;
126 read-only;
127 };
128
129 factory: partition@40000 {
130 label = "factory";
131 reg = <0x40000 0x10000>;
132 read-only;
133 };
134
135 partition@50000 {
136 compatible = "denx,uimage";
137 label = "firmware";
138 reg = <0x50000 0x7b0000>;
139 };
140 };
141 };
142 };
143
144 &wmac {
145 status = "okay";
146
147 mediatek,mtd-eeprom = <&factory 0x0>;
148 };
149
150 &ethernet {
151 nvmem-cells = <&macaddr_factory_28>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &esw {
156 mediatek,portmap = <0x2f>;
157 };
158
159 &usbphy {
160 status = "disabled";
161 };
162
163 &ehci {
164 status = "disabled";
165 };
166
167 &ohci {
168 status = "disabled";
169 };
170
171 &factory {
172 compatible = "nvmem-cells";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 macaddr_factory_28: macaddr@28 {
177 reg = <0x28 0x6>;
178 };
179 };