]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: add support for Cudy TR3000 256MB v1 flash version 19167/head
authorcheng wang <typedelta@outlook.com>
Sun, 22 Jun 2025 00:44:30 +0000 (08:44 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Jun 2025 17:17:25 +0000 (19:17 +0200)
This device is similar to the Cudy TR3000 v1 128MB version.
The difference is that the flash memory is 128mb and the other is 256mb

Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 256 MiB SPI NAND
 - RAM: 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
 - USB 3.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Power: 5 VDC, 3 A

Installation:
Cudy has distributed intermediate firmware to make installation easier
1. Go to [Cudy CN official website](https://www.cudy.com/zh-cn/pages/download-center/tr3000-1-0) and download the intermediate firmware
2. Upgrade the intermediate firmware on the page
3. Visit the intermediate firmware 192.168.1.1 webpage and use the sysupgrade image to update

other:
If you fail to flash the device, you can use TFTP to flash back to the original firmware.
1. Ask Cudy CN official customer service for the original firmware
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an recovery.bin firmware file.

Signed-off-by: cheng wang <typedelta@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19167
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
target/linux/mediatek/dts/mt7981b-cudy-tr3000-256mb-v1.dts [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
target/linux/mediatek/image/filogic.mk

index e0d2a9c7c5e23d12bce9bd7b8a1e4330188a03a0..ed166de595aeb8e21cca096f89671a85939ec724 100644 (file)
@@ -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 (file)
index 0000000..823f0ae
--- /dev/null
@@ -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>;
+};
+
index a96ea99bc902b87c4ab0c620094e9c35349e9787..ae99120e1a2a267d314365daa582b0da73889deb 100644 (file)
@@ -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|\
index c42399cf6454c8cd59db9bc78644c657442de992..b447dbdfe3ec69170b3537a9357d8975504a445a 100644 (file)
@@ -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|\
index b977d6117e0b08c9836ff8b0943ab7d755932ac1..14b8ecd02ae3ec5b6df18d755955ffdd000b6bfb 100644 (file)
@@ -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