ramips: prepare ZBT-WG3526 for hardware variants
authorMathias Kresin <dev@kresin.me>
Fri, 7 Apr 2017 21:52:27 +0000 (23:52 +0200)
committerMathias Kresin <dev@kresin.me>
Tue, 25 Apr 2017 17:29:59 +0000 (19:29 +0200)
The ZBT-WG3526 is available with 16 or 32 MByte of flash. Rename the
current supported 16MByte version to indicate which flash size variant
is supported.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/base-files/etc/diag.sh
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/ZBT-WG3526-16M.dts [new file with mode: 0644]
target/linux/ramips/dts/ZBT-WG3526.dts [deleted file]
target/linux/ramips/image/mt7621.mk

index 1abe13991f8af757194c323b116b8d1fe33aa033..391a8b69c4fc78de8ace20ae2dd20bd341ddb899 100755 (executable)
@@ -115,7 +115,7 @@ ramips_setup_interfaces()
        zbt-we1326|\
        zbt-we826|\
        zbt-wg2626|\
-       zbt-wg3526|\
+       zbt-wg3526-16M|\
        zbt-wr8305rt)
                ucidef_add_switch "switch0" \
                        "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
index e5b4b5992d4d6b2eea998e9268f92456ef205a3c..999ad9fc4e06e699a65bac469cd07aeea1c14bfe 100644 (file)
@@ -79,8 +79,7 @@ get_status_led() {
        rut5xx|\
        v11st-fe|\
        wmr-300|\
-       zbt-wg2626|\
-       zbt-wg3526)
+       zbt-wg2626)
                status_led="$board:green:status"
                ;;
        ai-br100|\
@@ -275,6 +274,9 @@ get_status_led() {
        zbt-cpe102)
                status_led="$board:green:4g-0"
                ;;
+       zbt-wg3526-16M)
+               status_led="zbt-wg3526:green:status"
+               ;;
        esac
 }
 
index 61f8a70719619e9e628b000deecb3b8bbdb41c77..d0abd2db2b4da3f5910e47461bd0fc0296488129 100755 (executable)
@@ -661,8 +661,8 @@ ramips_board_detect() {
        *"ZBT-WG2626")
                name="zbt-wg2626"
                ;;
-       *"ZBT-WG3526")
-               name="zbt-wg3526"
+       *"ZBT-WG3526 (16M)")
+               name="zbt-wg3526-16M"
                ;;
        *"ZBT-WR8305RT")
                name="zbt-wr8305rt"
index ae5a07b0b488389d57961b31631befa883575f57..f329b434e52ebe8efd3c8fe6c2129e9b60868d54 100755 (executable)
@@ -196,7 +196,7 @@ platform_check_image() {
        zbt-we2026|\
        zbt-we826|\
        zbt-wg2626|\
-       zbt-wg3526|\
+       zbt-wg3526-16M|\
        zbt-wr8305rt|\
        zte-q7|\
        youku-yk1)
diff --git a/target/linux/ramips/dts/ZBT-WG3526-16M.dts b/target/linux/ramips/dts/ZBT-WG3526-16M.dts
new file mode 100644 (file)
index 0000000..fb64450
--- /dev/null
@@ -0,0 +1,15 @@
+/dts-v1/;
+
+#include "ZBT-WG3526.dtsi"
+
+/ {
+       model = "ZBT-WG3526 (16M)";
+};
+
+&firmware {
+       reg = <0x50000 0xfb0000>;
+};
+
+&status_led {
+       label = "zbt-wg3526:green:status";
+};
diff --git a/target/linux/ramips/dts/ZBT-WG3526.dts b/target/linux/ramips/dts/ZBT-WG3526.dts
deleted file mode 100644 (file)
index c361bdd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/dts-v1/;
-
-#include "ZBT-WG3526.dtsi"
-
-/ {
-       model = "ZBT-WG3526";
-};
-
-&firmware {
-       reg = <0x50000 0xfb0000>;
-};
-
-&status_led {
-       label = "zbt-wg3526:green:status";
-};
index 0e418fe47e696c04e531c313eac0c0030d70d5bf..ae5bf5e1738f8bcabb92a2d98bbed9c1a0effdbc 100644 (file)
@@ -261,13 +261,14 @@ define Device/zbt-wg2626
 endef
 TARGET_DEVICES += zbt-wg2626
 
-define Device/zbt-wg3526
-  DTS := ZBT-WG3526
+define Device/zbt-wg3526-16M
+  DTS := ZBT-WG3526-16M
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
-  DEVICE_TITLE := ZBT WG3526
+  SUPPORTED_DEVICES += zbt-wg3526
+  DEVICE_TITLE := ZBT WG3526 (16MB flash)
   DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620
 endef
-TARGET_DEVICES += zbt-wg3526
+TARGET_DEVICES += zbt-wg3526-16M
 
 # FIXME: is this still needed?
 define Image/Prepare