123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- --- /dev/null
- +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts
- @@ -0,0 +1,157 @@
- +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
- +
- +#include "mt7621.dtsi"
- +
- +#include <dt-bindings/gpio/gpio.h>
- +#include <dt-bindings/input/input.h>
- +
- +/ {
- + compatible = "xiaomi,mi-router-4a-gigabit-v2", "mediatek,mt7621-soc";
- + model = "Xiaomi Mi Router 4A Gigabit Edition V2";
- +
- + aliases {
- + led-boot = &led_status_yellow;
- + led-failsafe = &led_status_yellow;
- + led-running = &led_status_blue;
- + led-upgrade = &led_status_yellow;
- + label-mac-device = &wan;
- + };
- +
- + chosen {
- + bootargs = "console=ttyS0,115200n8";
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led_status_blue: status_blue {
- + label = "blue:status";
- + gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
- + };
- +
- + led_status_yellow: status_yellow {
- + label = "yellow:status";
- + gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
- + };
- + };
- +
- + keys {
- + compatible = "gpio-keys";
- +
- + reset {
- + label = "reset";
- + gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
- + linux,code = <KEY_RESTART>;
- + };
- + };
- +};
- +
- +&spi0 {
- + status = "okay";
- +
- + flash@0 {
- + compatible = "jedec,spi-nor";
- + reg = <0>;
- + spi-max-frequency = <50000000>;
- + m25p,fast-read;
- +
- + partitions {
- + compatible = "fixed-partitions";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + partition@0 {
- + label = "u-boot";
- + reg = <0x0 0x30000>;
- + read-only;
- + };
- +
- + partition@30000 {
- + label = "u-boot-env";
- + reg = <0x30000 0x10000>;
- + read-only;
- + };
- +
- + factory: partition@40000 {
- + label = "factory";
- + reg = <0x40000 0x10000>;
- + read-only;
- + };
- +
- + partition@50000 {
- + compatible = "denx,uimage";
- + label = "firmware";
- + reg = <0x50000 0xfb0000>;
- + };
- + };
- + };
- +};
- +
- +&pcie {
- + status = "okay";
- +};
- +
- +&pcie0 {
- + wifi@0,0 {
- + compatible = "pci14c3,7603";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x0000>;
- + ieee80211-freq-limit = <2400000 2500000>;
- + };
- +};
- +
- +&pcie1 {
- + wifi@0,0 {
- + compatible = "pci14c3,7663";
- + reg = <0x0000 0 0 0 0>;
- + mediatek,mtd-eeprom = <&factory 0x8000>;
- + ieee80211-freq-limit = <5000000 6000000>;
- + };
- +};
- +
- +&gmac0 {
- + nvmem-cells = <&macaddr_factory_e000>;
- + nvmem-cell-names = "mac-address";
- +};
- +
- +&switch0 {
- + ports {
- + port@1 {
- + status = "okay";
- + label = "lan1";
- + };
- +
- + port@2 {
- + status = "okay";
- + label = "lan2";
- + };
- +
- + wan: port@3 {
- + status = "okay";
- + label = "wan";
- + nvmem-cells = <&macaddr_factory_e006>;
- + nvmem-cell-names = "mac-address";
- + };
- + };
- +};
- +
- +&state_default {
- + gpio {
- + groups = "jtag", "uart2", "uart3", "wdt";
- + function = "gpio";
- + };
- +};
- +
- +&factory {
- + compatible = "nvmem-cells";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + macaddr_factory_e000: macaddr@e000 {
- + reg = <0xe000 0x6>;
- + };
- +
- + macaddr_factory_e006: macaddr@e006 {
- + reg = <0xe006 0x6>;
- + };
- +};
- diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
- index 795f567c2bdb..40b56c58bb74 100644
- --- a/target/linux/ramips/image/mt7621.mk
- +++ b/target/linux/ramips/image/mt7621.mk
- @@ -1770,6 +1770,17 @@ define Device/xiaomi_mi-router-4a-gigabit
- endef
- TARGET_DEVICES += xiaomi_mi-router-4a-gigabit
-
- +define Device/xiaomi_mi-router-4a-gigabit-v2
- + $(Device/dsa-migration)
- + $(Device/uimage-lzma-loader)
- + IMAGE_SIZE := 16064k
- + DEVICE_VENDOR := Xiaomi
- + DEVICE_MODEL := Mi Router 4A
- + DEVICE_VARIANT := Gigabit Edition V2
- + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap
- +endef
- +TARGET_DEVICES += xiaomi_mi-router-4a-gigabit-v2
- +
- define Device/xiaomi_mi-router-ac2100
- $(Device/xiaomi_nand_separate)
- DEVICE_MODEL := Mi Router AC2100
- diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- index dab53124c6ef..51d7af4eb787 100644
- --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- @@ -38,7 +38,8 @@ ramips_setup_interfaces()
- xiaomi,mi-router-3g|\
- xiaomi,mi-router-3g-v2|\
- xiaomi,mi-router-4|\
- - xiaomi,mi-router-4a-gigabit)
- + xiaomi,mi-router-4a-gigabit|\
- + xiaomi,mi-router-4a-gigabit-v2)
- ucidef_set_interfaces_lan_wan "lan1 lan2" "wan"
- ;;
- beeline,smartbox-turbo-plus)
|