From: Fil Dunsky Date: Fri, 12 Dec 2025 13:16:50 +0000 (+0300) Subject: mediatek: add support for Cudy WBR3000UAX v1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7d6faf26f39b59d22c38d09321e0d345fbec950;p=thirdparty%2Fopenwrt.git mediatek: add support for Cudy WBR3000UAX v1 Another OEM variation of a Cudy WR3000 series device made for Russian market. Hardware: - SoC: MediaTek MT7981B - CPU: 2x 1.3 GHz Cortex-A53 - Flash: 128 MiB GigaDevice SPI NAND. Flash Model: F50L1G41LB, ID: C801 - RAM: DDR3, 512 MiB - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax) - 1x WAN MT7531 (JXD 2531Z) 10/100/1000 Mbps - 4x LAN 2x MT7530 (JXD 2529S) 10/100/1000 Mbps - USB 3.0 port - Buttons: Reset, WPS - 8x LEDs: 2x Red, 6x Blue - Serial console: no need to solder, just open the case and unskrew the radiator, TX-RX, RX-TX, GND-GND, VCC do not connect, 115200 8n1 - Power: 12 VDC, 1.5 A +---------+-------------------+-----------+ | | MAC | Algorithm | +---------+-------------------+-----------+ | WAN | 80:AF:CA:xx:xx:x1 | label+1 | | LAN | 80:AF:CA:xx:xx:x0 | label | | WLAN 2g | 80:AF:CA:xx:xx:x0 | label | | WLAN 5g | 82:AF:CA:xx:xx:x1 | label+1 | +---------+-------------------+-----------+ Based on a factory layout with only 64mb partition for easier transition from factory to OpenWrt for users if the "intermediate" RSA signed firmware will be provided by Cudy. **Installation** The installation must be done via UART & TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware and dts to make installation easier, but since this router is OEM special WB order for local RU market there is a possibility they will not provide it. **Install using UART & TFTP** 1. Connect to UART. 2. Since the factory BL is locked and the boot process can not be stopped, you have to use mtkuartboot, hold reset, engage the power, boot into your payloaded bl2 & fip. 3. Connect to LAN and set your IP to 192.168.1.254. 4. Configure a TFTP server to serve openwrt-mediatek-filogic-cudy_wbr3000uax-v1-initramfs-kernel.bin file. 5. Run these steps in u-boot using the name of your file: ``` setenv bootfile openwrt-mediatek-filogic-cudy_wbr3000uax-v1-initramfs-kernel.bin setenv ipaddr 192.168.1.1 setenv serverip 192.168.1.254 tftpboot bootm ``` 6. Router will boot into OpenWrt initramfs recovery, just open your browser `192.168.1.1` and sysupgrade with the `Keep settings` option turned off. Tested-by: many 4pda users Signed-off-by: Fil Dunsky Link: https://github.com/openwrt/openwrt/pull/21225 Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dts new file mode 100644 index 00000000000..9402a319de4 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; +#include "mt7981b-cudy-wbr3000uax-v1.dtsi" + +/ { + model = "Cudy WBR3000UAX v1"; + compatible = "cudy,wbr3000uax-v1", "mediatek,mt7981"; +}; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dtsi b/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dtsi new file mode 100644 index 00000000000..bd097cc8444 --- /dev/null +++ b/target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dtsi @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; + +#include "mt7981b-cudy-wr3000-nand.dtsi" + +/ { + aliases { + label-mac-device = &gmac0; + led-boot = &led_status; + led-failsafe = &led_warning; + led-running = &led_status; + led-upgrade = &led_warning; + serial0 = &uart0; + }; + + leds { + compatible = "gpio-leds"; + + led_status: led_power { + function = LED_FUNCTION_POWER; + color = ; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + led_internet { + function = LED_FUNCTION_WAN_ONLINE; + color = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + + led_warning: led_fault { + function = LED_FUNCTION_FAULT; + color = ; + gpios = <&pio 4 GPIO_ACTIVE_LOW>; + }; + + led_wan { + function = LED_FUNCTION_WAN; + color = ; + gpios = <&pio 11 GPIO_ACTIVE_LOW>; + }; + + led_lan { + function = LED_FUNCTION_LAN; + color = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + led_wps { + function = LED_FUNCTION_WPS; + color = ; + gpios = <&pio 5 GPIO_ACTIVE_LOW>; + }; + + led_wifi2g { + function = LED_FUNCTION_WLAN_2GHZ; + color = ; + gpios = <&pio 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_wifi5g { + function = LED_FUNCTION_WLAN_5GHZ; + color = ; + gpios = <&pio 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; + + usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&pio 35 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "wan"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_bdinfo_de00 1>; + }; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&xhci { + status = "okay"; + vbus-supply = <&usb_vbus>; +}; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi index 3a1d60101d1..a3e4c7e4feb 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi +++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi @@ -146,7 +146,7 @@ read-only; }; - partition@5c0000 { + ubi: partition@5c0000 { label = "ubi"; reg = <0x5c0000 0x4000000>; compatible = "linux,ubi"; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index bb8283a3d07..a42a72406e5 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -76,6 +76,13 @@ cudy,wr3000p-v1) ucidef_set_led_netdev "wan" "wan" "white:wan" "wan" "link tx rx" ucidef_set_led_netdev "internet" "internet" "white:wan-online" "wan" "link" ;; +cudy,wbr3000uax-v1) + ucidef_set_led_default "internet_off" "internet_off" "red:fault" "1" + ucidef_set_led_netdev "internet" "internet" "blue:wan-online" "wan" "link" + ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "tx rx" + ucidef_set_led_default "lan_off" "lan_off" "red:wps" "1" + ucidef_set_led_netdev "lan" "lan" "blue:lan" "br-lan" "link tx rx" + ;; elecom,wrc-x3000gs3) ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" ;; 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 8ced69c1522..057ed79af9e 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 @@ -90,6 +90,7 @@ case "$board" in cudy,tr3000-256mb-v1|\ cudy,tr3000-v1|\ cudy,tr3000-v1-ubootmod|\ + cudy,wbr3000uax-v1|\ cudy,wr3000e-v1|\ cudy,wr3000s-v1|\ cudy,wr3000h-v1|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 4d5ca41835b..c86666b8573 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -1231,6 +1231,23 @@ define Device/cudy_wr3000p-v1 endef TARGET_DEVICES += cudy_wr3000p-v1 +define Device/cudy_wbr3000uax-v1 + DEVICE_VENDOR := Cudy + DEVICE_MODEL := WBR3000UAX + DEVICE_VARIANT := v1 + DEVICE_DTS := mt7981b-cudy-wbr3000uax-v1 + DEVICE_DTS_DIR := ../dts + SUPPORTED_DEVICES += R120 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 65536k + 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_wbr3000uax-v1 + define Device/dlink_aquila-pro-ai-m30-a1 DEVICE_VENDOR := D-Link DEVICE_MODEL := AQUILA PRO AI M30