ramips: add support for ELECOM WSC-X1800GS
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Tue, 10 Sep 2024 14:47:52 +0000 (23:47 +0900)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Sep 2024 16:52:07 +0000 (18:52 +0200)
ELECOM WSC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) mesh extender,
based on MT7621A

Specification:

- SoC             : MediaTek MT7621A
- RAM             : DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
- Flash           : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN            : 2.4/5 GHz 2T2R (MediaTek MT7915D + MT7975D)
- Ethernet        : 2x 10/100/1000 Mbps
  - switch        : MediaTek MT7530 (SoC)
- LEDs/Keys (GPIO): 9x/2x
- UART            : through-hole on PCB ("J4")
  - arrangement   : 3.3V, GND, TX, RX from tri-angle marking
  - settings      : 115200n8
- Power           : 12 VDC, 1 A (Max. 10.5 W)

Flash instruction using initramfs-factory image

1. Boot WMC-X1800GST normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory image and click apply ("適用")
   button
4. On initramfs image, download sysupgrade image to the device and
   perform sysupgrade with that image
5. Wait ~120 seconds to complete flashing

Notes:

- The "firmware" partition on the stock image is only 0xF00000 (15 MiB)
  and it's too small for the current OpenWrt firmware with UBI format.
  So use the unused area at the end of NAND flash for rootfs (UBI).

MAC addresses:

LAN    : 04:AB:18:xx:xx:6E (Factory, 0x3fff4 (hex))
2.4 GHz: 04:AB:18:xx:xx:6F (Factory, 0x3fffa (hex))
5 GHz  : 04:AB:18:xx:xx:70 (Factory,     0x4 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16384
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7621_elecom_wsc-x1800gs.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/02_network
target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh

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 (file)
index 0000000..a24edb6
--- /dev/null
@@ -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";
+       };
+};
index ada747e6312b6d5b10d1d0985cb3dc6dad4cc957..749d4828cda086ce5274f22eb19173f54417c521 100644 (file)
@@ -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
index 1460c7e10f66cfc8c09f40ab9c0a5d76cf67a83f..0ce704e02e992570955f1fde5aabef26339f4652 100644 (file)
@@ -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"
                ;;
index 8eb72aaa39c66a50ceaa93350a0e3a17be3b5663..4c8276bd49cd9264342c1a4fcfbdba5058708b80 100755 (executable)
@@ -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|\