ramips: fix wrong pcie port number for Arcadyan WE420223-99
[openwrt/staging/noltari.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 label = "Factory";
134 reg = <0x40000 0x10000>;
135 read-only;
136 };
137
138 partition@50000 {
139 label = "kernel";
140 reg = <0x50000 0x1f60000>;
141 };
142
143 partition@490000 {
144 label = "rootfs";
145 reg = <0x490000 0x1b20000>;
146 };
147
148 partition@1000000 {
149 label = "Kernel2";
150 reg = <0x1000000 0xfb0000>;
151 };
152
153 partition@1440000 {
154 label = "RootFS2";
155 reg = <0x1440000 0xb70000>;
156 };
157
158 partition@1fb0000 {
159 label = "glbcfg";
160 reg = <0x1fb0000 0x10000>;
161 read-only;
162 };
163
164 partition@1fc0000 {
165 label = "board_data";
166 reg = <0x1fc0000 0x10000>;
167 read-only;
168 };
169
170 partition@1fd0000 {
171 label = "glbcfg2";
172 reg = <0x1fd0000 0x10000>;
173 read-only;
174 };
175
176 partition@1fe0000 {
177 label = "board_data2";
178 reg = <0x1fe0000 0x10000>;
179 read-only;
180 };
181 };
182 };
183 };
184
185 &xhci {
186 status = "disabled";
187 };
188
189 &switch0 {
190 ports {
191 port@1 {
192 status = "okay";
193 label = "swp1";
194 };
195 };
196 };
197
198 &gmac1 {
199 status = "okay";
200 label = "swp0";
201 phy-handle = <&ethphy0>;
202 };
203
204 &mdio {
205 ethphy0: ethernet-phy@0 {
206 reg = <0>;
207 };
208 };
209
210 &pcie {
211 status = "okay";
212 };
213
214 &pcie1 {
215 mt76@0,0 {
216 reg = <0x0000 0 0 0 0>;
217 mediatek,mtd-eeprom = <&factory 0x0000>;
218 };
219 };