ramips: mt7621: add support for Xiaomi Mi Router 4
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_xiaomi_mi-router-4.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621_xiaomi_nand_128m.dtsi"
4
5 / {
6 compatible = "xiaomi,mi-router-4", "mediatek,mt7621-soc";
7 model = "Xiaomi Mi Router 4";
8
9 aliases {
10 led-boot = &led_status_yellow;
11 led-failsafe = &led_status_red;
12 led-running = &led_status_blue;
13 led-upgrade = &led_status_yellow;
14 label-mac-device = &gmac0;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_status_red: status_red {
21 label = "red:status";
22 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
23 };
24
25 led_status_blue: status_blue {
26 label = "blue:status";
27 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
28 };
29
30 led_status_yellow: status_yellow {
31 label = "yellow:status";
32 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
33 };
34 };
35 };
36
37 &keys {
38 minet {
39 label = "minet";
40 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WPS_BUTTON>;
42 };
43 };
44
45 &pcie {
46 status = "okay";
47 };
48
49 &pcie0 {
50 wifi@0,0 {
51 compatible = "pci14c3,7603";
52 reg = <0x0000 0 0 0 0>;
53 mediatek,mtd-eeprom = <&factory 0x0000>;
54 ieee80211-freq-limit = <2400000 2500000>;
55 };
56 };
57
58 &pcie1 {
59 wifi@0,0 {
60 compatible = "pci14c3,7662";
61 reg = <0x0000 0 0 0 0>;
62 mediatek,mtd-eeprom = <&factory 0x8000>;
63 ieee80211-freq-limit = <5000000 6000000>;
64 };
65 };
66
67 &gmac0 {
68 mtd-mac-address = <&factory 0xe000>;
69 };
70
71 &switch0 {
72 ports {
73 port@1 {
74 status = "okay";
75 label = "lan1";
76 };
77
78 port@2 {
79 status = "okay";
80 label = "lan2";
81 };
82
83 port@4 {
84 status = "okay";
85 label = "wan";
86 mtd-mac-address = <&factory 0xe006>;
87 };
88 };
89 };
90
91 &state_default {
92 gpio {
93 groups = "jtag", "uart2", "uart3", "wdt";
94 function = "gpio";
95 };
96 };