ramips: add support for ELECOM WRC-2533GST2
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sat, 16 May 2020 08:39:26 +0000 (17:39 +0900)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 21 Jun 2020 18:56:42 +0000 (20:56 +0200)
ELECOM WRC-2533GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 256 MiB
- Flash : SPI-NOR 32 MiB
- WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615)
- Ethernet : 10/100/1000 Mbps x5
  - Switch : MediaTek MT7530 (SoC)
- LED/keys : 4x/6x (2x buttons, 1x slide-switch)
- UART : through-hole on PCB
  - J4: 3.3V, GND, TX, RX from ethernet port side
  - 57600n8
- Power : 12VDC, 1.5A

Flash instruction using factory image:

1. Boot WRC-2533GST2 normally
2. Access to "http://192.168.2.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory image and click apply ("適用") button
4. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts [new file with mode: 0644]
target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi
target/linux/ramips/image/mt7621.mk

index 7cbf2cd803aae85301a3bf4bc7aa539eab68f6c1..4b99cee31e612672e029260f34c96726fdbec0d2 100644 (file)
@@ -7,3 +7,35 @@
        compatible = "elecom,wrc-1900gst", "mediatek,mt7621-soc";
        model = "ELECOM WRC-1900GST";
 };
+
+&partitions {
+       partition@50000 {
+               compatible = "denx,uimage";
+               label = "firmware";
+               reg = <0x50000 0xb00000>;
+       };
+
+       partition@b50000 {
+               label = "tm_pattern";
+               reg = <0xb50000 0x380000>;
+               read-only;
+       };
+
+       partition@ed0000 {
+               label = "tm_key";
+               reg = <0xed0000 0x80000>;
+               read-only;
+       };
+
+       partition@f50000 {
+               label = "art_block";
+               reg = <0xf50000 0x30000>;
+               read-only;
+       };
+
+       partition@f80000 {
+               label = "user_data";
+               reg = <0xf80000 0x80000>;
+               read-only;
+       };
+};
index aa15674b4310967d47c10269570f3a884ef12e32..6158cf196ab309b391bebe53f5403f60b62b26ee 100644 (file)
@@ -6,3 +6,35 @@
        compatible = "elecom,wrc-2533gst", "mediatek,mt7621-soc";
        model = "ELECOM WRC-2533GST";
 };
+
+&partitions {
+       partition@50000 {
+               compatible = "denx,uimage";
+               label = "firmware";
+               reg = <0x50000 0xb00000>;
+       };
+
+       partition@b50000 {
+               label = "tm_pattern";
+               reg = <0xb50000 0x380000>;
+               read-only;
+       };
+
+       partition@ed0000 {
+               label = "tm_key";
+               reg = <0xed0000 0x80000>;
+               read-only;
+       };
+
+       partition@f50000 {
+               label = "art_block";
+               reg = <0xf50000 0x30000>;
+               read-only;
+       };
+
+       partition@f80000 {
+               label = "user_data";
+               reg = <0xf80000 0x80000>;
+               read-only;
+       };
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
new file mode 100644 (file)
index 0000000..01f32e9
--- /dev/null
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621_elecom_wrc-gst.dtsi"
+
+/ {
+       compatible = "elecom,wrc-2533gst2", "mediatek,mt7621-soc";
+       model = "ELECOM WRC-2533GST2";
+};
+
+&partitions {
+       partition@50000 {
+               compatible = "denx,uimage";
+               label = "firmware";
+               reg = <0x50000 0x1800000>;
+       };
+
+       partition@1850000 {
+               label = "tm_pattern";
+               reg = <0x1850000 0x400000>;
+               read-only;
+       };
+
+       partition@1c50000 {
+               label = "tm_key";
+               reg = <0x1c50000 0x100000>;
+               read-only;
+       };
+
+       partition@1d50000 {
+               label = "nvram";
+               reg = <0x1d50000 0xb0000>;
+               read-only;
+       };
+
+       partition@1e00000 {
+               label = "user_data";
+               reg = <0x1e00000 0x200000>;
+               read-only;
+       };
+};
index 43f31cf2b67be65ed5e67f153e1f6f76ac83a637..c28ba7d973ebaf37f458df87f29d0099a2f71ab7 100644 (file)
                reg = <0>;
                spi-max-frequency = <40000000>;
 
-               partitions {
+               partitions: partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;
                                reg = <0x40000 0x10000>;
                                read-only;
                        };
-
-                       partition@50000 {
-                               compatible = "denx,uimage";
-                               label = "firmware";
-                               reg = <0x50000 0xb00000>;
-                       };
-
-                       partition@b50000 {
-                               label = "tm_pattern";
-                               reg = <0xb50000 0x380000>;
-                               read-only;
-                       };
-
-                       partition@ed0000 {
-                               label = "tm_key";
-                               reg = <0xed0000 0x80000>;
-                               read-only;
-                       };
-
-                       partition@f50000 {
-                               label = "art_block";
-                               reg = <0xf50000 0x30000>;
-                               read-only;
-                       };
-
-                       partition@f80000 {
-                               label = "user_data";
-                               reg = <0xf80000 0x80000>;
-                               read-only;
-                       };
                };
        };
 };
index 848a0785fbcb7f74aef9a9d521581dde522d9b3b..d6423f81d9eea18904221ee873858c074fe8537b 100644 (file)
@@ -307,6 +307,18 @@ define Device/elecom_wrc-2533gst
 endef
 TARGET_DEVICES += elecom_wrc-2533gst
 
+define Device/elecom_wrc-2533gst2
+  $(Device/uimage-lzma-loader)
+  IMAGE_SIZE := 24576k
+  DEVICE_VENDOR := ELECOM
+  DEVICE_MODEL := WRC-2533GST2
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
+       elecom-gst-factory WRC-2533GST2 0.00
+  DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware wpad-basic
+endef
+TARGET_DEVICES += elecom_wrc-2533gst2
+
 define Device/firefly_firewrt
   IMAGE_SIZE := 16064k
   DEVICE_VENDOR := Firefly