mt7981: add support for zbtlink_zbt-z81103ax-c-nmbm

This commit is contained in:
Yuzhii0718
2026-03-23 10:28:25 +08:00
committed by zerowrt-bot
parent b284398796
commit ba57f33514
3 changed files with 270 additions and 0 deletions

View File

@@ -79,6 +79,8 @@ 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_TARGET_DEVICE_mediatek_mt7981_DEVICE_zbtlink_zbt-z8103ax-c-nmbm=y
CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_zbtlink_zbt-z8103ax-c-nmbm=""
CONFIG_DEVEL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_BUSYBOX_CUSTOM=y

View File

@@ -0,0 +1,250 @@
// 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>;
};
nmbm_spim_nand {
compatible = "generic,nmbm";
#address-cells = <1>;
#size-cells = <1>;
lower-mtd-device = <&spi_nand>;
forced-create;
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>;
};
/* Leave last 8 MiB for NMBM bad block table */
};
};
};
&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>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
};
};
&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

@@ -863,3 +863,21 @@ define Device/zbtlink_zbt-z8103ax-c
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += zbtlink_zbt-z8103ax-c
define Device/zbtlink_zbt-z8103ax-c-nmbm
DEVICE_VENDOR := Zbtlink
DEVICE_MODEL := ZBT-Z8103AX-C-NMBM
DEVICE_DTS := mt7981b-zbtlink-zbt-z8103ax-c-nmbm
DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
SUPPORTED_DEVICES := zbtlink,zbt-z8103ax-c-nmbm
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-nmbm