1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
10 compatible = "xiaomi,mi-router-3-pro", "mediatek,mt7621-soc";
11 model = "Xiaomi Mi Router 3 Pro";
14 led-boot = &led_status_yellow;
15 led-failsafe = &led_status_red;
16 led-running = &led_status_blue;
17 led-upgrade = &led_status_yellow;
18 label-mac-device = &gmac0;
22 bootargs = "console=ttyS0,115200n8";
26 compatible = "gpio-leds";
28 led_status_red: led-0 {
30 color = <LED_COLOR_ID_RED>;
31 function = LED_FUNCTION_STATUS;
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
35 led_status_blue: led-1 {
36 label = "blue:status";
37 color = <LED_COLOR_ID_BLUE>;
38 function = LED_FUNCTION_STATUS;
39 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
42 led_status_yellow: led-2 {
43 label = "yellow:status";
44 color = <LED_COLOR_ID_YELLOW>;
45 function = LED_FUNCTION_STATUS;
46 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
51 color = <LED_COLOR_ID_AMBER>;
52 function = LED_FUNCTION_WAN;
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "mt7530-0:04:1Gbps";
59 color = <LED_COLOR_ID_AMBER>;
60 function = LED_FUNCTION_LAN;
61 function-enumerator = <3>;
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "mt7530-0:03:1Gbps";
68 color = <LED_COLOR_ID_AMBER>;
69 function = LED_FUNCTION_LAN;
70 function-enumerator = <2>;
71 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
72 linux,default-trigger = "mt7530-0:02:1Gbps";
77 color = <LED_COLOR_ID_AMBER>;
78 function = LED_FUNCTION_LAN;
79 function-enumerator = <1>;
80 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
81 linux,default-trigger = "mt7530-0:01:1Gbps";
86 compatible = "gpio-keys";
90 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RESTART>;
95 reg_usb_vbus: regulator {
96 compatible = "regulator-fixed";
97 regulator-name = "usb_vbus";
98 regulator-min-microvolt = <5000000>;
99 regulator-max-microvolt = <5000000>;
100 gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
106 vbus-supply = <®_usb_vbus>;
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
118 label = "Bootloader";
125 reg = <0x40000 0x40000>;
130 reg = <0x80000 0x40000>;
134 factory: partition@c0000 {
135 compatible = "nvmem-cells";
137 reg = <0x0c0000 0x40000>;
138 #address-cells = <1>;
142 eeprom_factory_0: eeprom@0 {
146 eeprom_factory_8000: eeprom@8000 {
147 reg = <0x8000 0x4da8>;
150 macaddr_factory_e000: macaddr@e000 {
154 macaddr_factory_e006: macaddr@e006 {
161 reg = <0x100000 0x40000>;
165 label = "crash_syslog";
166 reg = <0x140000 0x80000>;
171 reg = <0x1c0000 0x40000>;
175 /* We keep stock xiaomi firmware (kernel0) here */
177 label = "kernel_stock";
178 reg = <0x200000 0x400000>;
183 reg = <0x600000 0x400000>;
188 reg = <0xa00000 0xf580000>;
199 compatible = "mediatek,mt76";
200 reg = <0x0000 0 0 0 0>;
201 nvmem-cells = <&eeprom_factory_0>;
202 nvmem-cell-names = "eeprom";
203 ieee80211-freq-limit = <2400000 2500000>;
209 compatible = "mediatek,mt76";
210 reg = <0x0000 0 0 0 0>;
211 nvmem-cells = <&eeprom_factory_8000>;
212 nvmem-cell-names = "eeprom";
213 ieee80211-freq-limit = <5000000 6000000>;
218 nvmem-cells = <&macaddr_factory_e006>;
219 nvmem-cell-names = "mac-address";
225 phy-handle = <ðphy4>;
227 nvmem-cells = <&macaddr_factory_e000>;
228 nvmem-cell-names = "mac-address";
232 ethphy4: ethernet-phy@4 {
258 groups = "jtag", "uart2", "uart3", "wdt";