diff --git a/defconfig/luci-app-mtk-deprecated/mt7981-ax3000.config b/defconfig/luci-app-mtk-deprecated/mt7981-ax3000.config index fd98011e1b..a7238829b7 100644 --- a/defconfig/luci-app-mtk-deprecated/mt7981-ax3000.config +++ b/defconfig/luci-app-mtk-deprecated/mt7981-ax3000.config @@ -13,6 +13,8 @@ CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_cmcc_rax3000m=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_cmcc_rax3000m="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_h3c_nx30pro=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_h3c_nx30pro="" +CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_honor_fur-602=y +CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_honor_fur-602="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_imou_lc-hx3001=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_imou_lc-hx3001="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_jcg_q30=y diff --git a/defconfig/mt7981-ax3000.config b/defconfig/mt7981-ax3000.config index f337b7da03..ebc53ffd77 100644 --- a/defconfig/mt7981-ax3000.config +++ b/defconfig/mt7981-ax3000.config @@ -17,6 +17,8 @@ CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_glinet_gl-mt3000=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_glinet_gl-mt3000="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_h3c_nx30pro=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_h3c_nx30pro="" +CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_honor_fur-602=y +CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_honor_fur-602="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_imou_lc-hx3001=y CONFIG_TARGET_DEVICE_PACKAGES_mediatek_mt7981_DEVICE_imou_lc-hx3001="" CONFIG_TARGET_DEVICE_mediatek_mt7981_DEVICE_jcg_q30=y diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek index e207b312c0..100891663e 100644 --- a/package/boot/uboot-envtools/files/mediatek +++ b/package/boot/uboot-envtools/files/mediatek @@ -30,6 +30,7 @@ ruijie,rg-x60-pro* |\ cmcc,rax3000m) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x20000" "4" ;; +*honor,fur-602* |\ *imou,lc-hx3001*) ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x80000" "0x80000" "1" ;; diff --git a/package/mtk/applications/mtk-smp/files/smp.sh b/package/mtk/applications/mtk-smp/files/smp.sh index 0352f20b68..e215f2ab5e 100755 --- a/package/mtk/applications/mtk-smp/files/smp.sh +++ b/package/mtk/applications/mtk-smp/files/smp.sh @@ -756,6 +756,7 @@ setup_model() xiaomi,mi-router-ax3000t* |\ *rax3000m* |\ h3c,nx30pro |\ + *honor,fur-602* |\ konka,komi-a31 |\ *nokia,ea0326gmp* |\ nradio,wt9103 |\ diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-honor-fur-602.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-honor-fur-602.dts new file mode 100644 index 0000000000..361731e0fb --- /dev/null +++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-honor-fur-602.dts @@ -0,0 +1,220 @@ +/dts-v1/; +#include +#include +#include "mt7981.dtsi" + +/ { + model = "HONOR FUR-602/603"; + compatible = "honor,fur-602", "mediatek,mt7981"; + + aliases { + led-boot = &status_red_led; + led-failsafe = &status_red_led; + led-running = &status_green_led; + led-upgrade = &status_green_led; + }; + + chosen { + bootargs = "console=ttyS0,115200n1 loglevel=8 \ + earlycon=uart8250,mmio32,0x11002000"; + }; + + memory { + reg = <0 0x40000000 0 0x10000000>; + }; + + leds { + compatible = "gpio-leds"; + + status_green_led: led-0 { + label = "green:status"; + gpios = <&pio 8 GPIO_ACTIVE_LOW>; + }; + + status_red_led: led-1 { + label = "red:status"; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + button-reset { + label = "reset"; + linux,code = ; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + }; + + button-mesh { + label = "mesh"; + gpios = <&pio 0 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + }; + + gsw: gsw@0 { + compatible = "mediatek,mt753x"; + mediatek,ethsys = <ðsys>; + #address-cells = <1>; + #size-cells = <0>; + }; + + nmbm_spim_nand { + compatible = "generic,nmbm"; + #address-cells = <1>; + #size-cells = <1>; + + lower-mtd-device = <&spi_nand>; + forced-create; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x00 0x100000>; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x100000 0x80000>; + }; + + partition@180000 { + label = "Factory"; + reg = <0x180000 0x1e0000>; + }; + + partition@360000 { + label = "Trace"; + reg = <0x360000 0x20000>; + }; + + partition@380000 { + label = "FIP"; + reg = <0x380000 0x200000>; + }; + + partition@580000 { + label = "ubi"; + reg = <0x580000 0x7200000>; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&gsw { + mediatek,mdio = <&mdio>; + mediatek,portmap = "wllll"; + mediatek,mdio_master_pinmux = <0>; + reset-gpios = <&pio 39 0>; + interrupt-parent = <&pio>; + interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; + status = "okay"; + + port5: port@5 { + compatible = "mediatek,mt753x-port"; + reg = <5>; + phy-mode = "sgmii"; + + fixed-link { + speed = <2500>; + full-duplex; + }; + }; + + port6: port@6 { + compatible = "mediatek,mt753x-port"; + mediatek,ssc-on; + reg = <6>; + phy-mode = "sgmii"; + + fixed-link { + speed = <2500>; + full-duplex; + }; + }; +}; + +&hnat { + mtketh-wan = "eth0.2"; + mtketh-ppd = "eth0.1"; + mtketh-lan = "eth0"; + mtketh-max-gmac = <1>; + status = "okay"; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "okay"; + + spi_nand: spi_nand@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <52000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + spi-cal-enable; + spi-cal-mode = "read-data"; + spi-cal-datalen = <7>; + spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; /* 'SPINAND' */ + spi-cal-addrlen = <5>; + spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; + }; +}; + +&pio { + spi0_flash_pins: spi0-pins { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + + conf-pu { + pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; + drive-strength = ; + bias-pull-up = ; + }; + + conf-pd { + pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; + drive-strength = ; + bias-pull-down = ; + }; + }; +}; diff --git a/target/linux/mediatek/image/mt7981.mk b/target/linux/mediatek/image/mt7981.mk index 00a6fab58f..471953a7b1 100644 --- a/target/linux/mediatek/image/mt7981.mk +++ b/target/linux/mediatek/image/mt7981.mk @@ -599,6 +599,23 @@ define Device/h3c_nx30pro endef TARGET_DEVICES += h3c_nx30pro +define Device/honor_fur-602 + DEVICE_VENDOR := HONOR + DEVICE_MODEL := FUR-602 + DEVICE_DTS := mt7981-honor-fur-602 + DEVICE_DTS_DIR := $(DTS_DIR)/mediatek + SUPPORTED_DEVICES := honor,fur-602 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 116736k + KERNEL_IN_UBI := 1 + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += honor_fur-602 + define Device/konka_komi-a31 DEVICE_VENDOR := KONKA DEVICE_MODEL := KOMI A31 diff --git a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network index c43e8b3ec0..571afbe2d8 100755 --- a/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/mt7981/base-files/etc/board.d/02_network @@ -39,6 +39,11 @@ mediatek_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:wan" "6t@eth0" ;; + *honor,fur-602*) + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + ucidef_add_switch "switch0" \ + "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "6t@eth0" + ;; *clt,r30b1* |\ h3c,nx30pro |\ *imou,lc-hx3001* |\ diff --git a/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh index 6654394967..d583812aad 100644 --- a/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7981/base-files/lib/upgrade/platform.sh @@ -205,6 +205,7 @@ platform_do_upgrade() { cmcc,a10 |\ cmcc,rax3000m |\ h3c,nx30pro |\ + *honor,fur-602* |\ *konka,komi-a31* |\ routerich,ax3000 |\ *nokia,ea0326gmp* |\ @@ -254,6 +255,7 @@ platform_check_image() { cmcc,a10 |\ cmcc,rax3000m* |\ h3c,nx30pro |\ + *honor,fur-602* |\ *konka,komi-a31* |\ *nokia,ea0326gmp* |\ nradio,wt9103 |\