ramips: use destinct 11AC NAS board name
authorMathias Kresin <dev@kresin.me>
Fri, 23 Dec 2016 07:21:31 +0000 (08:21 +0100)
committerMathias Kresin <dev@kresin.me>
Sat, 24 Dec 2016 09:03:38 +0000 (10:03 +0100)
Use a distinct board name even if the board is near to identical to
the WeVO W2914NS v2.

To make sure that a 11AC NAS image can not be installed on a
WeVO W2914NS v2, both board need to use different names.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/dts/11ACNAS.dts
target/linux/ramips/dts/W2914NSV2.dts
target/linux/ramips/dts/W2914NSV2.dtsi

index bcb1df1050bd7f56cad9eecfc8bc519b37c6eb8c..b7f3b36d8a45b0c775bfe766b8cfc7197db6685f 100755 (executable)
@@ -17,6 +17,16 @@ board=$(ramips_board_name)
 board_config_update
 
 case $board in
+11acnas|\
+all0239-3g|\
+hw550-3g|\
+mofi3500-3gn|\
+sap-g3200u3|\
+sk-wb8|\
+w2914nsv2|\
+wf-2881)
+       set_usb_led "$board:green:usb"
+       ;;
 3g150b|\
 3g300m)
        set_usb_led "$board:blue:3g"
@@ -45,14 +55,6 @@ air3gii)
        set_wifi_led "$board:green:wlan"
        set_usb_led "$board:green:mobile"
        ;;
-all0239-3g|\
-hw550-3g|\
-mofi3500-3gn|\
-sap-g3200u3|\
-sk-wb8|\
-wf-2881)
-       set_usb_led "$board:green:usb"
-       ;;
 all0256n)
        ucidef_set_rssimon "wlan0" "200000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssilow" "wlan0" "1" "40" "0" "6"
@@ -315,9 +317,6 @@ vocore)
        ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
        set_wifi_led "$board:green:status"
        ;;
-w2914nsv2)
-       set_usb_led "$board:green:usb"
-       ;;
 w502u)
        set_usb_led "$board:blue:usb"
        set_wifi_led "rt2800pci-phy0::radio"
index 94cf0ec7fcf3f258e278ee9da2eb61e01f442825..daf9b33a74424a8f1e74d58ad4dc7d76bbfae20d 100755 (executable)
@@ -32,6 +32,11 @@ ramips_setup_interfaces()
        local board="$1"
 
        case $board in
+       11acnas|\
+       w2914nsv2)
+               ucidef_add_switch "switch0" \
+                       "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
+               ;;
        3g150b|\
        3g300m|\
        a5-v11|\
@@ -251,10 +256,6 @@ ramips_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
                ;;
-       w2914nsv2)
-               ucidef_add_switch "switch0" \
-                       "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
-               ;;
        wcr-150gn)
                ucidef_add_switch "switch0" \
                        "0:lan" "6t@eth0"
index 50903c75d6fccd88c8e63ba15c0dde23705f6ac9..31a204969652f622b329d9951eed7fd713d04e04 100755 (executable)
@@ -14,7 +14,7 @@ ramips_board_detect() {
 
        case "$machine" in
        *"11AC NAS Router")
-               name="w2914nsv2"
+               name="11acnas"
                ;;
        *"3G150B")
                name="3g150b"
index 55678f532b0eb9a14a65bb609a91f6948c16668d..8be9869db9ad4ea86ef70d9e0015e9fe5fc32c95 100644 (file)
@@ -9,4 +9,18 @@
                device_type = "memory";
                reg = <0x0 0x10000000>;
        };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               // Only USB LED is connected to GPIO.
+               // All of other LEDs are connected directly to
+               // switch, WiFi chip, Vcc, so they are not controllable
+               // via GPIO
+
+               usb {
+                       label = "11acnas:green:usb";
+                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
index 37afffd475c545826af80d8efdb100e75994dbeb..ac26dbe75d9b00090083a86ccc7496dfd65ea5d4 100644 (file)
@@ -9,4 +9,18 @@
                device_type = "memory";
                reg = <0x0 0x8000000>;
        };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               // Only USB LED is connected to GPIO.
+               // All of other LEDs are connected directly to
+               // switch, WiFi chip, Vcc, so they are not controllable
+               // via GPIO
+
+               usb {
+                       label = "w2914nsv2:green:usb";
+                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
index e80b1877d416c0bcdb0f3dd11ddb3088f3adcf98..7b11a0f6a22ec7649e78c42397d161eb5f14b293 100644 (file)
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
-
-       gpio-leds {
-               compatible = "gpio-leds";
-
-               // Only USB LED is connected to GPIO.
-               // All of other LEDs are connected directly to
-               // switch, WiFi chip, Vcc, so they are not controllable
-               // via GPIO
-
-               usb {
-                       label = "w2914nsv2:green:usb";
-                       gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
-               };
-       };
 };
 
 &xhci {