mt7981: add support for zbtlink_zbt-z81103ax-c

This commit is contained in:
Yuzhii0718
2026-03-22 17:59:08 +08:00
committed by zerowrt-bot
parent 6a4c07c88f
commit b284398796
7 changed files with 267 additions and 2 deletions

View File

@@ -77,6 +77,8 @@ CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-112m=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-112m=""
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-stock=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_xiaomi_mi-router-wr30u-stock=""
CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_zbtlink_zbt-z8103ax-c=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_zbtlink_zbt-z8103ax-c=""
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_BUSYBOX_CUSTOM=y

View File

@@ -43,7 +43,8 @@ cmcc,rax3000m)
;;
xiaomi,mi-router-ax3000t* |\
xiaomi,mi-router-wr30u* |\
xiaomi,redmi-router-ax6000*)
xiaomi,redmi-router-ax6000* |\
*zbtlink,zbt-z8103ax*)
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x10000" "0x20000" "1"
;;
cmcc_a10|\

View File

@@ -768,6 +768,7 @@ setup_model()
ruijie,rg-x30e* |\
philips,hy3000 |\
sn,r1* |\
*zbtlink,zbt-z8103ax* |\
*7981*)
MT7981_whnat $num_of_wifi $usbnet
;;

View File

@@ -0,0 +1,234 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7981.dtsi"
/ {
model = "Zbtlink 3000M(WiFi6) ZBT-Z8103AX-C";
compatible = "zbtlink,zbt-z8103ax-c", "mediatek,mt7981b";
aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_red;
led-running = &led_status_green;
led-upgrade = &led_status_green;
};
chosen: chosen {
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000";
};
memory {
reg = <0 0x40000000 0 0x10000000>;
};
gpio-keys {
compatible = "gpio-keys";
button-mesh {
label = "mesh";
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
};
button-reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
compatible = "gpio-leds";
led-wan {
label = "green:wan";
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
};
led-status-blue {
label = "status:blue";
gpios = <&pio 23 GPIO_ACTIVE_HIGH>;
};
led_status_green: led-status-green {
label = "status:green";
gpios = <&pio 24 GPIO_ACTIVE_LOW>;
};
led_status_red: led-status-red {
label = "status:red";
gpios = <&pio 25 GPIO_ACTIVE_LOW>;
};
led-wlan2g {
label = "wlan2g";
gpios = <&pio 34 GPIO_ACTIVE_LOW>;
};
led-wlan5g {
label = "wlan5g";
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
};
};
gsw: gsw@0 {
compatible = "mediatek,mt753x";
mediatek,ethsys = <&ethsys>;
#address-cells = <1>;
#size-cells = <0>;
};
};
&eth {
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "gmii";
phy-handle = <&phy0>;
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@0 {
compatible = "ethernet-phy-id03a2.9461";
reg = <0>;
phy-mode = "gmii";
nvmem-cells = <&phy_calibration>;
nvmem-cell-names = "phy-cal-data";
};
};
};
&gsw {
mediatek,mdio = <&mdio>;
mediatek,mdio_master_pinmux = <0>;
reset-gpios = <&pio 39 0>;
interrupt-parent = <&pio>;
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";
port6: port@6 {
compatible = "mediatek,mt753x-port";
mediatek,ssc-on;
reg = <6>;
phy-mode = "sgmii";
fixed-link {
speed = <2500>;
full-duplex;
};
};
};
&hnat {
mtketh-wan = "eth1";
mtketh-lan = "eth0";
mtketh-max-gmac = <2>;
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
spi_nand: spi_nand@0 {
compatible = "spi-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
spi-max-frequency = <52000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
partitions: partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bl2";
reg = <0x0000000 0x0100000>;
read-only;
};
partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x80000>;
};
partition@180000 {
label = "Factory";
reg = <0x180000 0x200000>;
read-only;
};
partition@380000 {
label = "FIP";
reg = <0x380000 0x200000>;
read-only;
};
partition@580000 {
label = "ubi";
reg = <0x580000 0x7280000>;
};
};
};
};
&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <8>;
bias-pull-up = <103>;
};
conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <8>;
bias-pull-down = <103>;
};
};
};
&uart0 {
status = "okay";
};
&watchdog {
status = "okay";
};
&xhci {
phys = <&u2port0 PHY_TYPE_USB2>;
mediatek,u3p-dis-msk = <0x1>;
status = "okay";
};

View File

@@ -845,3 +845,21 @@ define Device/sn_r1-longlife
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += sn_r1-longlife
define Device/zbtlink_zbt-z8103ax-c
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-Z8103AX-C
DEVICE_DTS := mt7981b-zbtlink-zbt-z8103ax-c
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
SUPPORTED_DEVICES := zbtlink,zbt-z8103ax-c
DEVICE_PACKAGES := $(MT7981_USB_PKGS) luci-app-samba4
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 117248k
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 += zbtlink_zbt-z8103ax-c

View File

@@ -79,7 +79,8 @@ mediatek_setup_interfaces()
"0:lan:3" "1:lan:2" "2:lan:1" "6u@eth0"
;;
*newland,nl-wr9103* |\
*nokia,ea0326gmp*)
*nokia,ea0326gmp* |\
*zbtlink,zbt-z8103ax*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "6u@eth0"
@@ -324,6 +325,12 @@ mediatek_setup_macs()
lan_mac=$(macaddr_add $wifi_mac -1)
wan_mac=$(macaddr_add $wifi_mac -2)
;;
*zbtlink,zbt-z8103ax*)
local base_mac=$(mtd_get_mac_binary Factory 0x4)
lan_mac=$(macaddr_add $base_mac 2)
wan_mac=$(macaddr_add $base_mac 3)
label_mac=$base_mac
;;
*)
wan_mac=$(mtd_get_mac_binary $part_name $wan_mac_offset)
lan_mac=$(mtd_get_mac_binary $part_name $lan_mac_offset)

View File

@@ -214,6 +214,7 @@ platform_do_upgrade() {
*nokia,ea0326gmp* |\
*newland,nl-wr8103* |\
newland,nl-wr9103 |\
*zbtlink,zbt-z8103ax* |\
*snand*)
nand_do_upgrade "$1"
;;
@@ -271,6 +272,7 @@ platform_check_image() {
*newland,nl-wr8103* |\
newland,nl-wr9103 |\
nradio,wt9103 |\
*zbtlink,zbt-z8103ax* |\
philips,hy3000 |\
sn,r1* |\
*snand* |\