Skip to content

Commit d7d6faf

Browse files
fildunskyhauke
authored andcommitted
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 <[email protected]> Link: openwrt/openwrt#21225 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent f4c9ab6 commit d7d6faf

File tree

6 files changed

+172
-1
lines changed

6 files changed

+172
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
3+
/dts-v1/;
4+
#include "mt7981b-cudy-wbr3000uax-v1.dtsi"
5+
6+
/ {
7+
model = "Cudy WBR3000UAX v1";
8+
compatible = "cudy,wbr3000uax-v1", "mediatek,mt7981";
9+
};
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
3+
/dts-v1/;
4+
5+
#include "mt7981b-cudy-wr3000-nand.dtsi"
6+
7+
/ {
8+
aliases {
9+
label-mac-device = &gmac0;
10+
led-boot = &led_status;
11+
led-failsafe = &led_warning;
12+
led-running = &led_status;
13+
led-upgrade = &led_warning;
14+
serial0 = &uart0;
15+
};
16+
17+
leds {
18+
compatible = "gpio-leds";
19+
20+
led_status: led_power {
21+
function = LED_FUNCTION_POWER;
22+
color = <LED_COLOR_ID_BLUE>;
23+
gpios = <&pio 8 GPIO_ACTIVE_LOW>;
24+
};
25+
26+
led_internet {
27+
function = LED_FUNCTION_WAN_ONLINE;
28+
color = <LED_COLOR_ID_BLUE>;
29+
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
30+
};
31+
32+
led_warning: led_fault {
33+
function = LED_FUNCTION_FAULT;
34+
color = <LED_COLOR_ID_RED>;
35+
gpios = <&pio 4 GPIO_ACTIVE_LOW>;
36+
};
37+
38+
led_wan {
39+
function = LED_FUNCTION_WAN;
40+
color = <LED_COLOR_ID_BLUE>;
41+
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
42+
};
43+
44+
led_lan {
45+
function = LED_FUNCTION_LAN;
46+
color = <LED_COLOR_ID_BLUE>;
47+
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
48+
};
49+
50+
led_wps {
51+
function = LED_FUNCTION_WPS;
52+
color = <LED_COLOR_ID_RED>;
53+
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
54+
};
55+
56+
led_wifi2g {
57+
function = LED_FUNCTION_WLAN_2GHZ;
58+
color = <LED_COLOR_ID_BLUE>;
59+
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
60+
linux,default-trigger = "phy0tpt";
61+
};
62+
63+
led_wifi5g {
64+
function = LED_FUNCTION_WLAN_5GHZ;
65+
color = <LED_COLOR_ID_BLUE>;
66+
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
67+
linux,default-trigger = "phy1tpt";
68+
};
69+
};
70+
71+
usb_vbus: regulator-usb {
72+
compatible = "regulator-fixed";
73+
regulator-name = "usb-vbus";
74+
regulator-min-microvolt = <5000000>;
75+
regulator-max-microvolt = <5000000>;
76+
gpios = <&pio 35 GPIO_ACTIVE_HIGH>;
77+
enable-active-high;
78+
regulator-boot-on;
79+
};
80+
};
81+
82+
&switch {
83+
ports {
84+
#address-cells = <1>;
85+
#size-cells = <0>;
86+
87+
port@0 {
88+
reg = <0>;
89+
label = "wan";
90+
91+
nvmem-cell-names = "mac-address";
92+
nvmem-cells = <&macaddr_bdinfo_de00 1>;
93+
};
94+
95+
port@1 {
96+
reg = <1>;
97+
label = "lan1";
98+
};
99+
100+
port@2 {
101+
reg = <2>;
102+
label = "lan2";
103+
};
104+
105+
port@3 {
106+
reg = <3>;
107+
label = "lan3";
108+
};
109+
110+
port@4 {
111+
reg = <4>;
112+
label = "lan4";
113+
};
114+
115+
port@6 {
116+
reg = <6>;
117+
label = "cpu";
118+
ethernet = <&gmac0>;
119+
phy-mode = "2500base-x";
120+
121+
fixed-link {
122+
speed = <2500>;
123+
full-duplex;
124+
pause;
125+
};
126+
};
127+
};
128+
};
129+
130+
&usb_phy {
131+
status = "okay";
132+
};
133+
134+
&xhci {
135+
status = "okay";
136+
vbus-supply = <&usb_vbus>;
137+
};

target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
read-only;
147147
};
148148

149-
partition@5c0000 {
149+
ubi: partition@5c0000 {
150150
label = "ubi";
151151
reg = <0x5c0000 0x4000000>;
152152
compatible = "linux,ubi";

target/linux/mediatek/filogic/base-files/etc/board.d/01_leds

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ cudy,wr3000p-v1)
7676
ucidef_set_led_netdev "wan" "wan" "white:wan" "wan" "link tx rx"
7777
ucidef_set_led_netdev "internet" "internet" "white:wan-online" "wan" "link"
7878
;;
79+
cudy,wbr3000uax-v1)
80+
ucidef_set_led_default "internet_off" "internet_off" "red:fault" "1"
81+
ucidef_set_led_netdev "internet" "internet" "blue:wan-online" "wan" "link"
82+
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "tx rx"
83+
ucidef_set_led_default "lan_off" "lan_off" "red:wps" "1"
84+
ucidef_set_led_netdev "lan" "lan" "blue:lan" "br-lan" "link tx rx"
85+
;;
7986
elecom,wrc-x3000gs3)
8087
ucidef_set_led_netdev "wan" "wan" "green:wan" "wan"
8188
;;

target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ case "$board" in
9090
cudy,tr3000-256mb-v1|\
9191
cudy,tr3000-v1|\
9292
cudy,tr3000-v1-ubootmod|\
93+
cudy,wbr3000uax-v1|\
9394
cudy,wr3000e-v1|\
9495
cudy,wr3000s-v1|\
9596
cudy,wr3000h-v1|\

target/linux/mediatek/image/filogic.mk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,23 @@ define Device/cudy_wr3000p-v1
12311231
endef
12321232
TARGET_DEVICES += cudy_wr3000p-v1
12331233

1234+
define Device/cudy_wbr3000uax-v1
1235+
DEVICE_VENDOR := Cudy
1236+
DEVICE_MODEL := WBR3000UAX
1237+
DEVICE_VARIANT := v1
1238+
DEVICE_DTS := mt7981b-cudy-wbr3000uax-v1
1239+
DEVICE_DTS_DIR := ../dts
1240+
SUPPORTED_DEVICES += R120
1241+
UBINIZE_OPTS := -E 5
1242+
BLOCKSIZE := 128k
1243+
PAGESIZE := 2048
1244+
IMAGE_SIZE := 65536k
1245+
KERNEL_IN_UBI := 1
1246+
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
1247+
DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
1248+
endef
1249+
TARGET_DEVICES += cudy_wbr3000uax-v1
1250+
12341251
define Device/dlink_aquila-pro-ai-m30-a1
12351252
DEVICE_VENDOR := D-Link
12361253
DEVICE_MODEL := AQUILA PRO AI M30

0 commit comments

Comments
 (0)