ramips: apply consistent device name/compatible to ZBT-WE1026-5G
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Thu, 26 Sep 2019 12:44:23 +0000 (14:44 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 28 Sep 2019 22:08:20 +0000 (00:08 +0200)
All Zbtlink ramips devices except the ZBT-WE1026-5G include the
zbt-/ZBT- prefix in their model name.

This changes ZBT-WE1026-5G to also follow that scheme.

The patch moves some block to keep alphatical order.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts [deleted file]
target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi [deleted file]
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts [new file with mode: 0644]
target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi [new file with mode: 0644]
target/linux/ramips/image/mt7620.mk

index 46202b4..f8a270b 100755 (executable)
@@ -445,10 +445,6 @@ youku,yk1)
        set_wifi_led "$boardname:blue:air"
        ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10"
        ;;
-zbtlink,we1026-5g-16m)
-       ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
-       set_wifi_led "we1026-5g:green:wifi"
-       ;;
 zbtlink,zbt-ape522ii)
        ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$boardname:green:wlan2g4" "wlan1"
        ucidef_set_led_netdev "sys1" "wlan1" "$boardname:green:sys1" "wlan1" "tx rx"
@@ -461,6 +457,10 @@ zbtlink,zbt-we826-16m|\
 zbtlink,zbt-we826-32m)
        set_wifi_led "zbt-we826:green:wifi"
        ;;
+zbtlink,zbt-we1026-5g-16m)
+       ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
+       set_wifi_led "we1026-5g:green:wifi"
+       ;;
 zbtlink,zbt-we1226)
        set_wifi_led "$boardname:green:wlan"
        ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x01"
index 947bf14..ae05c82 100755 (executable)
@@ -451,7 +451,7 @@ ramips_setup_interfaces()
                        "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
                ;;
        sparklan,wcr-150gn|\
-       zbtlink,we1026-5g-16m)
+       zbtlink,zbt-we1026-5g-16m)
                ucidef_add_switch "switch0" \
                        "0:lan" "6t@eth0"
                ;;
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g-16m.dts
deleted file mode 100644 (file)
index a05e8d4..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  BSD LICENSE
- *
- *  Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    * Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *    * Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions and the following disclaimer in
- *      the documentation and/or other materials provided with the
- *      distribution.
- *    * Neither the name of Broadcom Corporation nor the names of its
- *      contributors may be used to endorse or promote products derived
- *      from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/dts-v1/;
-
-#include "mt7620a_zbtlink_we1026-5g.dtsi"
-
-/ {
-       compatible = "zbtlink,we1026-5g-16m", "ralink,mt7620a-soc";
-       model = "Zbtlink ZBT-WE1026-5G (16M)";
-};
-
-&spi0 {
-       status = "okay";
-
-       en25q128@0 {
-               compatible = "jedec,spi-nor";
-               reg = <0>;
-               spi-max-frequency = <10000000>;
-
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       partition@0 {
-                               label = "u-boot";
-                               reg = <0x0 0x30000>;
-                               read-only;
-                       };
-
-                       partition@30000 {
-                               label = "u-boot-env";
-                               reg = <0x30000 0x10000>;
-                               read-only;
-                       };
-
-                       factory: partition@40000 {
-                               label = "factory";
-                               reg = <0x40000 0x10000>;
-                               read-only;
-                       };
-
-                       firmware: partition@50000 {
-                               compatible = "denx,uimage";
-                               label = "firmware";
-                               reg = <0x50000 0xfb0000>;
-                       };
-               };
-       };
-};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_we1026-5g.dtsi
deleted file mode 100644 (file)
index e7e64e2..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- *  BSD LICENSE
- *
- *  Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
- *  All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *    * Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *    * Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions and the following disclaimer in
- *      the documentation and/or other materials provided with the
- *      distribution.
- *    * Neither the name of Broadcom Corporation nor the names of its
- *      contributors may be used to endorse or promote products derived
- *      from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "mt7620a.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
-/ {
-       compatible = "zbtlink,we1026-5g", "ralink,mt7620a-soc";
-
-       chosen {
-               bootargs = "console=ttyS0,115200";
-       };
-
-       leds {
-               compatible = "gpio-leds";
-               lan {
-                       label = "we1026-5g:green:lan";
-                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
-               };
-
-               usb {
-                       label = "we1026-5g:green:usb";
-                       gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
-                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
-                       linux,default-trigger = "usbport";
-               };
-
-               wifi {
-                       label = "we1026-5g:green:wifi";
-                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
-               };
-       };
-
-       keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <20>;
-               reset {
-                       label = "reset";
-                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_RESTART>;
-               };
-       };
-};
-
-&gpio2 {
-       status = "okay";
-};
-
-&gpio3 {
-       status = "okay";
-};
-
-&sdhci {
-       status = "okay";
-};
-
-&ehci {
-       status = "okay";
-};
-
-&ohci {
-       status = "okay";
-};
-
-&ethernet {
-       mtd-mac-address = <&factory 0x28>;
-};
-
-&wmac {
-       ralink,mtd-eeprom = <&factory 0>;
-};
-
-&pinctrl {
-       state_default: pinctrl0 {
-               default {
-                       ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled";
-                       ralink,function = "gpio";
-               };
-       };
-};
-
-&pcie {
-       status = "okay";
-};
-
-&pcie0 {
-       wifi@0,0 {
-               compatible = "pci14c3,7662";
-               reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x8000>;
-               ieee80211-freq-limit = <5000000 6000000>;
-       };
-};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g-16m.dts
new file mode 100644 (file)
index 0000000..feba297
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "mt7620a_zbtlink_zbt-we1026-5g.dtsi"
+
+/ {
+       compatible = "zbtlink,zbt-we1026-5g-16m", "ralink,mt7620a-soc";
+       model = "Zbtlink ZBT-WE1026-5G (16M)";
+};
+
+&spi0 {
+       status = "okay";
+
+       en25q128@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "u-boot-env";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@40000 {
+                               label = "factory";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       firmware: partition@50000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x50000 0xfb0000>;
+                       };
+               };
+       };
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi
new file mode 100644 (file)
index 0000000..68a74ed
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "zbtlink,zbt-we1026-5g", "ralink,mt7620a-soc";
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               lan {
+                       label = "we1026-5g:green:lan";
+                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+               };
+
+               usb {
+                       label = "we1026-5g:green:usb";
+                       gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
+               };
+
+               wifi {
+                       label = "we1026-5g:green:wifi";
+                       gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys-polled";
+               poll-interval = <20>;
+               reset {
+                       label = "reset";
+                       gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+};
+
+&gpio2 {
+       status = "okay";
+};
+
+&gpio3 {
+       status = "okay";
+};
+
+&sdhci {
+       status = "okay";
+};
+
+&ehci {
+       status = "okay";
+};
+
+&ohci {
+       status = "okay";
+};
+
+&ethernet {
+       mtd-mac-address = <&factory 0x28>;
+};
+
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};
+
+&pinctrl {
+       state_default: pinctrl0 {
+               default {
+                       ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled";
+                       ralink,function = "gpio";
+               };
+       };
+};
+
+&pcie {
+       status = "okay";
+};
+
+&pcie0 {
+       wifi@0,0 {
+               compatible = "pci14c3,7662";
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&factory 0x8000>;
+               ieee80211-freq-limit = <5000000 6000000>;
+       };
+};
index 36898c9..6543958 100644 (file)
@@ -943,17 +943,6 @@ define Device/yukai_bocco
 endef
 TARGET_DEVICES += yukai_bocco
 
-define Device/zbtlink_we1026-5g-16m
-  MTK_SOC := mt7620a
-  IMAGE_SIZE := 16064k
-  DEVICE_VENDOR := Zbtlink
-  DEVICE_MODEL := ZBT-WE1026-5G
-  DEVICE_VARIANT := 16M
-  DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
-  SUPPORTED_DEVICES += we1026-5g-16m
-endef
-TARGET_DEVICES += zbtlink_we1026-5g-16m
-
 define Device/zbtlink_zbt-ape522ii
   MTK_SOC := mt7620a
   IMAGE_SIZE := 15872k
@@ -984,6 +973,17 @@ define Device/zbtlink_zbt-wa05
 endef
 TARGET_DEVICES += zbtlink_zbt-wa05
 
+define Device/zbtlink_zbt-we1026-5g-16m
+  MTK_SOC := mt7620a
+  IMAGE_SIZE := 16064k
+  DEVICE_VENDOR := Zbtlink
+  DEVICE_MODEL := ZBT-WE1026-5G
+  DEVICE_VARIANT := 16M
+  DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
+  SUPPORTED_DEVICES += we1026-5g-16m zbtlink,we1026-5g-16m
+endef
+TARGET_DEVICES += zbtlink_zbt-we1026-5g-16m
+
 define Device/zbtlink_zbt-we2026
   MTK_SOC := mt7620n
   IMAGE_SIZE := 7552k