diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface index e0d2a9c7c5e..ed166de595a 100644 --- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface +++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface @@ -1,6 +1,7 @@ set_preinit_iface() { case $(board_name) in cudy,m3000-v1|\ + cudy,tr3000-256mb-v1|\ cudy,tr3000-v1|\ cudy,tr3000-v1-ubootmod|\ glinet,gl-mt2500|\ diff --git a/target/linux/mediatek/dts/mt7981b-cudy-tr3000-256mb-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-256mb-v1.dts new file mode 100644 index 00000000000..823f0aef93a --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-256mb-v1.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +#include "mt7981b-cudy-tr3000-v1.dtsi" + +/ { + model = "Cudy TR3000 256MB v1"; + compatible = "cudy,tr3000-256mb-v1", "mediatek,mt7981"; +}; + +&spi_nand { + spi-cal-enable; + spi-cal-mode = "read-data"; + spi-cal-datalen = <7>; + spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; + spi-cal-addrlen = <5>; + spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; + + mediatek,nmbm; + mediatek,bmt-max-ratio = <1>; + mediatek,bmt-max-reserved-blocks = <64>; +}; + +&ubi { + reg = <0x5c0000 0xe600000>; +}; + diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index a96ea99bc90..ae99120e1a2 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -97,6 +97,7 @@ mediatek_setup_interfaces() ucidef_set_interface_lan "eth0" ;; cudy,m3000-v1|\ + cudy,tr3000-256mb-v1|\ cudy,tr3000-v1|\ cudy,tr3000-v1-ubootmod|\ glinet,gl-mt2500|\ diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index c42399cf645..b447dbdfe3e 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -79,6 +79,7 @@ case "$board" in cudy,ap3000-v1|\ cudy,m3000-v1|\ cudy,re3000-v1|\ + cudy,tr3000-256mb-v1|\ cudy,tr3000-v1|\ cudy,tr3000-v1-ubootmod|\ cudy,wr3000e-v1|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index b977d6117e0..14b8ecd02ae 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -762,6 +762,23 @@ define Device/cudy_re3000-v1 endef TARGET_DEVICES += cudy_re3000-v1 +define Device/cudy_tr3000-256mb-v1 + DEVICE_VENDOR := Cudy + DEVICE_MODEL := TR3000 + DEVICE_VARIANT := 256mb v1 + DEVICE_DTS := mt7981b-cudy-tr3000-256mb-v1 + DEVICE_DTS_DIR := ../dts + SUPPORTED_DEVICES += R103 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 235520k + KERNEL_IN_UBI := 1 + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware +endef +TARGET_DEVICES += cudy_tr3000-256mb-v1 + define Device/cudy_tr3000-v1 DEVICE_VENDOR := Cudy DEVICE_MODEL := TR3000