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 0000000000..9402a319de --- /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 0000000000..bd097cc844 --- /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 3a1d60101d..a3e4c7e4fe 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 f97feee133..dcfbe909e6 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 3d272efd1f..5d0c9d62c2 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 a779b94365..7e2d0ad090 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