ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_xiaomi_mir3g-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "xiaomi,mir3g-v2", "mediatek,mt7621-soc";
11 model = "Xiaomi Mi Router 3G v2";
12
13 aliases {
14 led-boot = &led_status_yellow;
15 led-failsafe = &led_status_yellow;
16 led-running = &led_status_blue;
17 led-upgrade = &led_status_yellow;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200n8";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_status_blue: status_blue {
28 label = "mir3gv2:blue:status";
29 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30 };
31
32 led_status_yellow: status_yellow {
33 label = "mir3gv2:yellow:status";
34 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &spi0 {
50 status = "okay";
51
52 m25p80@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <80000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x0 0x30000>;
65 read-only;
66 };
67
68 partition@30000 {
69 label = "u-boot-env";
70 reg = <0x30000 0x10000>;
71 read-only;
72 };
73
74 partition@40000 {
75 label = "Bdata";
76 reg = <0x40000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@50000 {
81 label = "factory";
82 reg = <0x50000 0x10000>;
83 read-only;
84 };
85
86 partition@60000 {
87 label = "crash";
88 reg = <0x60000 0x10000>;
89 read-only;
90 };
91
92 partition@70000 {
93 label = "cfg_bak";
94 reg = <0x70000 0x10000>;
95 read-only;
96 };
97
98 partition@80000 {
99 label = "overlay";
100 reg = <0x80000 0x100000>;
101 read-only;
102 };
103
104 firmware: partition@180000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x180000 0xe80000>;
108 };
109 };
110 };
111 };
112
113 &pcie {
114 status = "okay";
115 };
116
117 &pcie0 {
118 wifi@0,0 {
119 compatible = "pci14c3,7662";
120 reg = <0x0000 0 0 0 0>;
121 mediatek,mtd-eeprom = <&factory 0x8000>;
122 ieee80211-freq-limit = <5000000 6000000>;
123 };
124 };
125
126 &pcie1 {
127 wifi@0,0 {
128 compatible = "pci14c3,7603";
129 reg = <0x0000 0 0 0 0>;
130 mediatek,mtd-eeprom = <&factory 0x0000>;
131 ieee80211-freq-limit = <2400000 2500000>;
132 };
133 };
134
135 &ethernet {
136 mtd-mac-address = <&factory 0xe000>;
137 mediatek,portmap = "llllw";
138 };
139
140 &state_default {
141 gpio {
142 ralink,group = "jtag", "uart2", "uart3", "wdt";
143 ralink,function = "gpio";
144 };
145 };