mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-05 00:53:32 +08:00
mediatek: add support for xiaomi ax3000t with an8855 variant
This commit is contained in:
parent
9bce0f9947
commit
d6138f353d
@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-xiaomi-mi-router-ax3000t-stock.dts"
|
||||
|
||||
/ {
|
||||
model = "Xiaomi Mi Router AX3000T with AN8855 (stock layout)";
|
||||
compatible = "xiaomi,mi-router-ax3000t-an8855-stock", "mediatek,mt7981";
|
||||
};
|
||||
|
||||
&gsw {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&gsw_an8855 {
|
||||
airoha,mdio = <&mdio>;
|
||||
reset-gpios = <&pio 39 0>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
|
||||
port@5 {
|
||||
compatible = "airoha,an8855-port";
|
||||
reg = <5>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7981-xiaomi-mi-router-ax3000t.dts"
|
||||
|
||||
/ {
|
||||
model = "Xiaomi Mi Router AX3000T with AN8855";
|
||||
compatible = "xiaomi,mi-router-ax3000t-an8855", "mediatek,mt7981";
|
||||
};
|
||||
|
||||
&gsw {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&gsw_an8855 {
|
||||
airoha,mdio = <&mdio>;
|
||||
reset-gpios = <&pio 39 0>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
|
||||
port@5 {
|
||||
compatible = "airoha,an8855-port";
|
||||
reg = <5>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
@ -61,6 +61,13 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
gsw_an8855: gsw@1 {
|
||||
compatible = "airoha,an8855";
|
||||
#mediatek,ethsys = <ðsys>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
nmbm_spim_nand: nmbm_spim_nand {
|
||||
compatible = "generic,nmbm";
|
||||
|
||||
|
@ -433,6 +433,35 @@ define Device/xiaomi_mi-router-ax3000t
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mi-router-ax3000t
|
||||
|
||||
define Device/xiaomi_mi-router-ax3000t-an8855-stock
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Mi Router AX3000T with AN8855 (stock layout)
|
||||
DEVICE_DTS := mt7981-xiaomi-mi-router-ax3000t-an8855-stock
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 34816k
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mi-router-ax3000t-an8855-stock
|
||||
|
||||
define Device/xiaomi_mi-router-ax3000t-an8855
|
||||
DEVICE_VENDOR := Xiaomi
|
||||
DEVICE_MODEL := Mi Router AX3000T with AN8855
|
||||
DEVICE_DTS := mt7981-xiaomi-mi-router-ax3000t-an8855
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 114688k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mi-router-ax3000t-an8855
|
||||
|
||||
define Device/glinet_gl-mt3000
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-MT3000
|
||||
|
@ -23,12 +23,19 @@ mediatek_setup_interfaces()
|
||||
*2500wan-p5*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t* |\
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-ax3000t-stock|\
|
||||
xiaomi,mi-router-wr30u*)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "0:wan" "6u@eth0" "5u@eth1"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t-an8855|\
|
||||
xiaomi,mi-router-ax3000t-an8855-stock)
|
||||
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan" "2:lan" "3:lan" "0:wan" "5t@eth0"
|
||||
;;
|
||||
*360,t7*)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
|
@ -177,6 +177,7 @@ xiaomi_mt7981_initial_setup()
|
||||
local board=$(board_name)
|
||||
case "$board" in
|
||||
xiaomi,mi-router-ax3000t-stock|\
|
||||
xiaomi,mi-router-ax3000t-an8855-stock|\
|
||||
xiaomi,mi-router-wr30u-stock)
|
||||
fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)"
|
||||
;;
|
||||
@ -189,6 +190,7 @@ platform_do_upgrade() {
|
||||
case "$board" in
|
||||
xiaomi,mi-router-wr30u-112m|\
|
||||
xiaomi,mi-router-ax3000t|\
|
||||
xiaomi,mi-router-ax3000t-an8855|\
|
||||
*mt3000* |\
|
||||
glinet,x3000-emmc |\
|
||||
*xe3000* |\
|
||||
@ -223,6 +225,7 @@ platform_do_upgrade() {
|
||||
emmc_do_upgrade "$1"
|
||||
;;
|
||||
xiaomi,mi-router-ax3000t-stock|\
|
||||
xiaomi,mi-router-ax3000t-an8855-stock|\
|
||||
xiaomi,mi-router-wr30u-stock)
|
||||
xiaomi_mt7981_nand_upgrade_tar "$1"
|
||||
;;
|
||||
@ -296,6 +299,7 @@ platform_pre_upgrade() {
|
||||
|
||||
case "$board" in
|
||||
xiaomi,mi-router-ax3000t-stock|\
|
||||
xiaomi,mi-router-ax3000t-an8855-stock|\
|
||||
xiaomi,mi-router-wr30u-stock)
|
||||
xiaomi_mt7981_initial_setup
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user