treewide: fix MERCUSYS brand spelling
[openwrt/staging/hauke.git] / target / linux / mediatek / dts / mt7986b-mercusys-mr90x-v1.dts
1 // SPDX-License-Identifier: (GL-2.0 OR MIT)
2
3 /dts-v1/;
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 #include "mt7986b.dtsi"
8
9 / {
10 compatible = "mercusys,mr90x-v1", "mediatek,mt7986b";
11 model = "MERCUSYS MR90X v1";
12
13 aliases {
14 serial0 = &uart0;
15
16 led-boot = &led_status_green;
17 led-failsafe = &led_status_green;
18 led-running = &led_status_green;
19 led-upgrade = &led_status_green;
20 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 memory {
27 reg = <0 0x40000000 0 0x20000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 gpios = <&pio 10 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led-0 {
44 label = "green:lan2";
45 gpios = <&pio 7 GPIO_ACTIVE_LOW>;
46 };
47
48 led-1 {
49 label = "green:lan1";
50 gpios = <&pio 9 GPIO_ACTIVE_LOW>;
51 };
52
53 led-2 {
54 label = "green:lan0";
55 gpios = <&pio 12 GPIO_ACTIVE_LOW>;
56 };
57
58 led-3 {
59 label = "green:wan";
60 gpios = <&pio 13 GPIO_ACTIVE_LOW>;
61 };
62
63 led-4 {
64 label = "orange:status";
65 gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
66 };
67
68 led_status_green: led-5 {
69 label = "green:status";
70 gpios = <&pio 17 GPIO_ACTIVE_HIGH>;
71 panic-indicator;
72 };
73 };
74 };
75
76 &crypto {
77 status = "okay";
78 };
79
80 &eth {
81 status = "okay";
82
83 gmac0: mac@0 {
84 compatible = "mediatek,eth-mac";
85 reg = <0>;
86 phy-mode = "2500base-x";
87
88 fixed-link {
89 speed = <2500>;
90 full-duplex;
91 pause;
92 };
93 };
94
95 gmac1: mac@1 {
96 compatible = "mediatek,eth-mac";
97 reg = <1>;
98 phy-handle = <&phy6>;
99 phy-mode = "2500base-x";
100 };
101
102 mdio: mdio-bus {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 };
106 };
107
108 &mdio {
109 #address-cells = <1>;
110 #size-cells = <0>;
111
112 reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
113 reset-delay-us = <1500000>;
114 reset-post-delay-us = <1000000>;
115
116 /* WAN/LAN 2.5Gbps phy
117 MaxLinear GPY211C0VC (SLNW8) */
118 phy6: phy@6 {
119 compatible = "ethernet-phy-ieee802.3-c45";
120 reg = <6>;
121 };
122
123 switch: switch@0 {
124 compatible = "mediatek,mt7531";
125 reg = <31>;
126 reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
127 };
128 };
129
130 &switch {
131 ports {
132 #address-cells = <1>;
133 #size-cells = <0>;
134
135 /* WAN/LAN 1Gbps port */
136 port@0 {
137 reg = <0>;
138 label = "lan0";
139 };
140
141 /* LAN1 port */
142 port@1 {
143 reg = <1>;
144 label = "lan1";
145 };
146
147 /* LAN2 port */
148 port@2 {
149 reg = <2>;
150 label = "lan2";
151 };
152
153 port@6 {
154 reg = <6>;
155 ethernet = <&gmac0>;
156 phy-mode = "2500base-x";
157
158 fixed-link {
159 speed = <2500>;
160 full-duplex;
161 pause;
162 };
163 };
164 };
165 };
166
167 &pio {
168 spi_flash_pins: spi-flash-pins-33-to-38 {
169 mux {
170 function = "spi";
171 groups = "spi0", "spi0_wp_hold";
172 };
173 conf-pu {
174 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
175 drive-strength = <8>;
176 mediatek,pull-up-adv = <0>; /* bias-disable */
177 };
178 conf-pd {
179 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
180 drive-strength = <8>;
181 mediatek,pull-down-adv = <0>; /* bias-disable */
182 };
183 };
184
185 wf_2g_5g_pins: wf_2g_5g-pins {
186 mux {
187 function = "wifi";
188 groups = "wf_2g", "wf_5g";
189 };
190 conf {
191 pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
192 "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
193 "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
194 "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
195 "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
196 "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
197 "WF1_TOP_CLK", "WF1_TOP_DATA";
198 drive-strength = <4>;
199 };
200 };
201 };
202
203 &spi0 {
204 pinctrl-names = "default";
205 pinctrl-0 = <&spi_flash_pins>;
206 status = "okay";
207
208 spi_nand_flash: flash@0 {
209 compatible = "spi-nand";
210 #address-cells = <1>;
211 #size-cells = <1>;
212 reg = <0>;
213
214 spi-max-frequency = <20000000>;
215 spi-tx-bus-width = <4>;
216 spi-rx-bus-width = <4>;
217
218 partitions: partitions {
219 compatible = "fixed-partitions";
220 #address-cells = <1>;
221 #size-cells = <1>;
222
223 partition@0 {
224 label = "boot";
225 reg = <0x0 0x200000>;
226 read-only;
227 };
228
229 partition@200000 {
230 label = "u-boot-env";
231 reg = <0x200000 0x100000>;
232 };
233
234 partition@300000 {
235 label = "ubi0";
236 reg = <0x300000 0x3200000>;
237 };
238
239 partition@3500000 {
240 label = "ubi1";
241 reg = <0x3500000 0x3200000>;
242 read-only;
243 };
244
245 partition@6700000 {
246 label = "userconfig";
247 reg = <0x6700000 0x800000>;
248 read-only;
249 };
250
251 partition@6f00000 {
252 label = "tp_data";
253 reg = <0x6f00000 0x400000>;
254 read-only;
255 };
256 };
257 };
258 };
259
260 &trng {
261 status = "okay";
262 };
263
264 &uart0 {
265 status = "okay";
266 };
267
268 &watchdog {
269 status = "okay";
270 };
271
272 &wifi {
273 status = "okay";
274 pinctrl-names = "default";
275 pinctrl-0 = <&wf_2g_5g_pins>;
276 };