diff --git a/target/linux/ramips/dts/mt7621_elecom_wsc-x1800gs.dts b/target/linux/ramips/dts/mt7621_elecom_wsc-x1800gs.dts new file mode 100644 index 0000000000..a24edb6136 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_elecom_wsc-x1800gs.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621_elecom_wxc-x1800gsx.dtsi" + +/ { + compatible = "elecom,wsc-x1800gs", "mediatek,mt7621-soc"; + model = "ELECOM WSC-X1800GS"; + + aliases { + label-mac-device = &wifi_band1; + }; +}; + +&state_default { + gpio { + groups = "uart3", "uart2", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&wifi { + band@0 { + reg = <0>; + nvmem-cells = <&macaddr_factory_4 (-1)>; + nvmem-cell-names = "mac-address"; + }; + + wifi_band1: band@1 { + reg = <1>; + nvmem-cells = <&macaddr_factory_4 0>; + nvmem-cell-names = "mac-address"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ada747e631..749d4828cd 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1315,6 +1315,24 @@ endif endef TARGET_DEVICES += elecom_wrc-x1800gs +define Device/elecom_wsc-x1800gs + $(Device/nand) + DEVICE_VENDOR := ELECOM + DEVICE_MODEL := WSC-X1800GS + KERNEL_SIZE := 15360k + KERNEL_LOADADDR := 0x82000000 + KERNEL := kernel-bin | relocate-kernel $(loadaddr-y) | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + ARTIFACTS := initramfs-factory.bin + ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \ + check-size $$$$(KERNEL_SIZE) | elecom-wrc-gs-factory WMC-2LX 0.00 -N | \ + append-string MT7621_ELECOM_WMC-2LX +endif + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools +endef +TARGET_DEVICES += elecom_wsc-x1800gs + define Device/etisalat_s3 $(Device/sercomm_dxx) IMAGE_SIZE := 32768k diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 1460c7e10f..0ce704e02e 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -117,6 +117,9 @@ ramips_setup_interfaces() zyxel,lte3301-plus) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; + elecom,wsc-x1800gs) + ucidef_set_interface_lan "lan1 lan2" + ;; gnubee,gb-pc1) ucidef_set_interface_lan "ethblack ethblue" ;; diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 8eb72aaa39..4c8276bd49 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -91,6 +91,7 @@ platform_do_upgrade() { dlink,dir-3060-a1|\ dlink,dir-853-a3|\ elecom,wmc-x1800gst|\ + elecom,wsc-x1800gs|\ etisalat,s3|\ h3c,tx1800-plus|\ h3c,tx1801-plus|\