1d55453c8d53071d8ed2cccd7938c71ce61f27da
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_arcadyan_we420223-99.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Arcadyan WE420223-99";
11 compatible = "arcadyan,we420223-99", "mediatek,mt7621-soc";
12
13 aliases {
14 led-boot = &led_power_green;
15 led-failsafe = &led_power_red;
16 led-running = &led_power_green;
17 led-upgrade = &led_wps_green;
18 led-wifi = &led_wifi_green;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600 ubi.mtd=5 root=/dev/ubiblock0_0";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33
34 wps {
35 label = "wps";
36 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_WPS_BUTTON>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_power_green: power_green {
45 label = "green:power";
46 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
47 color = <LED_COLOR_ID_GREEN>;
48 function = LED_FUNCTION_POWER;
49 default-state = "on";
50 };
51
52 led_power_red: power_red {
53 label = "red:power";
54 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
55 color = <LED_COLOR_ID_RED>;
56 function = LED_FUNCTION_FAULT;
57 };
58
59 led_wifi_blue: wifi_blue {
60 label = "blue:wifi";
61 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
62 color = <LED_COLOR_ID_BLUE>;
63 function = LED_FUNCTION_WLAN;
64 };
65
66 led_wifi_green: wifi_green {
67 label = "green:wifi";
68 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
69 color = <LED_COLOR_ID_GREEN>;
70 function = LED_FUNCTION_WLAN;
71 };
72
73 led_wps_red: wps_red {
74 label = "red:wps";
75 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
76 color = <LED_COLOR_ID_RED>;
77 function = LED_FUNCTION_WPS;
78 };
79
80 led_wps_green: wps_green {
81 label = "green:wps";
82 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
83 color = <LED_COLOR_ID_GREEN>;
84 function = LED_FUNCTION_WPS;
85 };
86
87 led_followme_r: followme_red {
88 label = "red:followme";
89 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
90 color = <LED_COLOR_ID_RED>;
91 };
92
93 led_followme_g: followme_green {
94 label = "green:followme";
95 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
96 color = <LED_COLOR_ID_GREEN>;
97 };
98 };
99 };
100
101 &spi0 {
102 status = "okay";
103
104 flash@0 {
105 compatible = "jedec,spi-nor";
106
107 reg = <0>;
108 spi-max-frequency = <70000000>;
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "ALL";
117 reg = <0x0 0x2000000>;
118 read-only;
119 };
120
121 partition@1 {
122 label = "Bootloader";
123 reg = <0x0 0x30000>;
124 read-only;
125 };
126
127 partition@30000 {
128 label = "Config";
129 reg = <0x30000 0x10000>;
130 };
131
132 factory: partition@40000 {
133 compatible = "nvmem-cells";
134 label = "Factory";
135 reg = <0x40000 0x10000>;
136 #address-cells = <1>;
137 #size-cells = <1>;
138 read-only;
139
140 eeprom_factory_0: eeprom@0 {
141 reg = <0x0 0x4da8>;
142 };
143 };
144
145 partition@50000 {
146 label = "kernel";
147 reg = <0x50000 0x1f60000>;
148 };
149
150 partition@490000 {
151 label = "rootfs";
152 reg = <0x490000 0x1b20000>;
153 };
154
155 partition@1000000 {
156 label = "Kernel2";
157 reg = <0x1000000 0xfb0000>;
158 };
159
160 partition@1440000 {
161 label = "RootFS2";
162 reg = <0x1440000 0xb70000>;
163 };
164
165 partition@1fb0000 {
166 label = "glbcfg";
167 reg = <0x1fb0000 0x10000>;
168 read-only;
169 };
170
171 partition@1fc0000 {
172 label = "board_data";
173 reg = <0x1fc0000 0x10000>;
174 read-only;
175 };
176
177 partition@1fd0000 {
178 label = "glbcfg2";
179 reg = <0x1fd0000 0x10000>;
180 read-only;
181 };
182
183 partition@1fe0000 {
184 label = "board_data2";
185 reg = <0x1fe0000 0x10000>;
186 read-only;
187 };
188 };
189 };
190 };
191
192 &xhci {
193 status = "disabled";
194 };
195
196 &switch0 {
197 ports {
198 port@1 {
199 status = "okay";
200 label = "swp1";
201 };
202 };
203 };
204
205 &gmac1 {
206 status = "okay";
207 label = "swp0";
208 phy-handle = <&ethphy0>;
209 };
210
211 &mdio {
212 ethphy0: ethernet-phy@0 {
213 reg = <0>;
214 };
215 };
216
217 &pcie {
218 status = "okay";
219 };
220
221 &pcie1 {
222 mt76@0,0 {
223 reg = <0x0000 0 0 0 0>;
224 nvmem-cells = <&eeprom_factory_0>;
225 nvmem-cell-names = "eeprom";
226 };
227 };