ramips: fix MikroTik 750Gr3 ports MAC addresses
[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 label-mac-device = &wan;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200n8";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_status_blue: status_blue {
29 label = "mir3gv2:blue:status";
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 };
32
33 led_status_yellow: status_yellow {
34 label = "mir3gv2:yellow:status";
35 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50 &spi0 {
51 status = "okay";
52
53 m25p80@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <80000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x30000>;
66 read-only;
67 };
68
69 partition@30000 {
70 label = "u-boot-env";
71 reg = <0x30000 0x10000>;
72 read-only;
73 };
74
75 partition@40000 {
76 label = "Bdata";
77 reg = <0x40000 0x10000>;
78 read-only;
79 };
80
81 factory: partition@50000 {
82 label = "factory";
83 reg = <0x50000 0x10000>;
84 read-only;
85 };
86
87 partition@60000 {
88 label = "crash";
89 reg = <0x60000 0x10000>;
90 read-only;
91 };
92
93 partition@70000 {
94 label = "cfg_bak";
95 reg = <0x70000 0x10000>;
96 read-only;
97 };
98
99 partition@80000 {
100 label = "overlay";
101 reg = <0x80000 0x100000>;
102 read-only;
103 };
104
105 firmware: partition@180000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x180000 0xe80000>;
109 };
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 compatible = "pci14c3,7662";
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x8000>;
123 ieee80211-freq-limit = <5000000 6000000>;
124 };
125 };
126
127 &pcie1 {
128 wifi@0,0 {
129 compatible = "pci14c3,7603";
130 reg = <0x0000 0 0 0 0>;
131 mediatek,mtd-eeprom = <&factory 0x0000>;
132 ieee80211-freq-limit = <2400000 2500000>;
133 };
134 };
135
136 &gmac0 {
137 mtd-mac-address = <&factory 0xe000>;
138 };
139
140 &switch0 {
141 ports {
142 port@2 {
143 status = "okay";
144 label = "lan2";
145 };
146
147 port@3 {
148 status = "okay";
149 label = "lan1";
150 };
151 wan: port@4 {
152 status = "okay";
153 label = "wan";
154 mtd-mac-address = <&factory 0xe006>;
155 };
156 };
157 };
158
159 &state_default {
160 gpio {
161 groups = "jtag", "uart2", "uart3", "wdt";
162 function = "gpio";
163 };
164 };