[openwrt/openwrt] ramips: add support for ELECOM WRC-2533GST2

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 21 15:32:44 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3a8d65010d999275a583c42064b60ab9a3cdce84

commit 3a8d65010d999275a583c42064b60ab9a3cdce84
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 16 17:39:26 2020 +0900

    ramips: add support for ELECOM WRC-2533GST2
    
    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 at gmail.com>
---
 .../linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts | 32 +++++++++++++++++
 .../linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts | 32 +++++++++++++++++
 .../ramips/dts/mt7621_elecom_wrc-2533gst2.dts      | 41 ++++++++++++++++++++++
 target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi | 32 +----------------
 target/linux/ramips/image/mt7621.mk                | 12 +++++++
 5 files changed, 118 insertions(+), 31 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
index 7cbf2cd803..4b99cee31e 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1900gst.dts
@@ -7,3 +7,35 @@
 	compatible = "elecom,wrc-1900gst", "mediatek,mt7621-soc";
 	model = "ELECOM WRC-1900GST";
 };
+
+&partitions {
+	partition at 50000 {
+		compatible = "denx,uimage";
+		label = "firmware";
+		reg = <0x50000 0xb00000>;
+	};
+
+	partition at b50000 {
+		label = "tm_pattern";
+		reg = <0xb50000 0x380000>;
+		read-only;
+	};
+
+	partition at ed0000 {
+		label = "tm_key";
+		reg = <0xed0000 0x80000>;
+		read-only;
+	};
+
+	partition at f50000 {
+		label = "art_block";
+		reg = <0xf50000 0x30000>;
+		read-only;
+	};
+
+	partition at f80000 {
+		label = "user_data";
+		reg = <0xf80000 0x80000>;
+		read-only;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
index aa15674b43..6158cf196a 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst.dts
@@ -6,3 +6,35 @@
 	compatible = "elecom,wrc-2533gst", "mediatek,mt7621-soc";
 	model = "ELECOM WRC-2533GST";
 };
+
+&partitions {
+	partition at 50000 {
+		compatible = "denx,uimage";
+		label = "firmware";
+		reg = <0x50000 0xb00000>;
+	};
+
+	partition at b50000 {
+		label = "tm_pattern";
+		reg = <0xb50000 0x380000>;
+		read-only;
+	};
+
+	partition at ed0000 {
+		label = "tm_key";
+		reg = <0xed0000 0x80000>;
+		read-only;
+	};
+
+	partition at f50000 {
+		label = "art_block";
+		reg = <0xf50000 0x30000>;
+		read-only;
+	};
+
+	partition at 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
index 0000000000..01f32e9b20
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533gst2.dts
@@ -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 at 50000 {
+		compatible = "denx,uimage";
+		label = "firmware";
+		reg = <0x50000 0x1800000>;
+	};
+
+	partition at 1850000 {
+		label = "tm_pattern";
+		reg = <0x1850000 0x400000>;
+		read-only;
+	};
+
+	partition at 1c50000 {
+		label = "tm_key";
+		reg = <0x1c50000 0x100000>;
+		read-only;
+	};
+
+	partition at 1d50000 {
+		label = "nvram";
+		reg = <0x1d50000 0xb0000>;
+		read-only;
+	};
+
+	partition at 1e00000 {
+		label = "user_data";
+		reg = <0x1e00000 0x200000>;
+		read-only;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi
index 43f31cf2b6..c28ba7d973 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gst.dtsi
@@ -129,7 +129,7 @@
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 
-		partitions {
+		partitions: partitions {
 			compatible = "fixed-partitions";
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -151,36 +151,6 @@
 				reg = <0x40000 0x10000>;
 				read-only;
 			};
-
-			partition at 50000 {
-				compatible = "denx,uimage";
-				label = "firmware";
-				reg = <0x50000 0xb00000>;
-			};
-
-			partition at b50000 {
-				label = "tm_pattern";
-				reg = <0xb50000 0x380000>;
-				read-only;
-			};
-
-			partition at ed0000 {
-				label = "tm_key";
-				reg = <0xed0000 0x80000>;
-				read-only;
-			};
-
-			partition at f50000 {
-				label = "art_block";
-				reg = <0xf50000 0x30000>;
-				read-only;
-			};
-
-			partition at f80000 {
-				label = "user_data";
-				reg = <0xf80000 0x80000>;
-				read-only;
-			};
 		};
 	};
 };
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 848a0785fb..d6423f81d9 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -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



More information about the lede-commits mailing list