aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorKristian Evensen <kristian.evensen@gmail.com>2019-11-02 15:18:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-03 15:10:22 +0100
commit5f108bbc58ff1454e3ac5542dc8a64e83198c276 (patch)
tree34d16e5820e5462870dd7e4847414720305a1002 /target
parenta033f14fe9c65609e319a7bc1306d7ad6043a3a6 (diff)
downloadupstream-5f108bbc58ff1454e3ac5542dc8a64e83198c276.tar.gz
upstream-5f108bbc58ff1454e3ac5542dc8a64e83198c276.tar.bz2
upstream-5f108bbc58ff1454e3ac5542dc8a64e83198c276.zip
ramips: add support for ZBT WE1026-H
This commit adds support for the ZBT WE1026-H, an outdoor AP with support for adding an internal LTE modem. The detailed specs are: * CPU: MT7620A * 2x 10/100Mbps Ethernet (LAN port has passive PoE support). * 16/32 MB Flash. * 128/256 MB RAM. * 1x USB 2.0 port. * 1x mini-PCIe slot (only USB2.0 bus). * 1x SIM slot (standard size). * 1x 2.4Ghz WIFI (rt2800). * 1x button. * 6x LEDS (4 GPIO-controlled). * 1x micro-SD reader. The following have been tested and working: - Ethernet switch - Wifi - Mini-PCIe slot + SIM slot - USB port - microSD slot - sysupgrade - reset button Installation and recovery: In order to install OpenWRT the first time or ito recover the router, you can use the web-based recovery system. Keep the reset button pressed during boot and access 192.168.1.1 in your browser when your machine obtains an IP address. Upload the firmware to start the recovery process. Notes: * When binding the USB LED to a usbport, the LED is switched on all the time due to the presence of an internal hub. Thus, it does not really signal any USB-information. * I only have the 32MB version and have only added support for this device. However, the files are structured so that adding support for the 16MB version should be easy. * Only the LAN port is accessible from the outside of the casing and LEDs are not visible. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [rebased onto base-files split, minor style fixes, removed use of USB led as power LED] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts14
-rw-r--r--target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi33
-rw-r--r--target/linux/ramips/image/mt7620.mk11
-rwxr-xr-xtarget/linux/ramips/mt7620/base-files/etc/board.d/01_leds5
-rwxr-xr-xtarget/linux/ramips/mt7620/base-files/etc/board.d/02_network8
5 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts
new file mode 100644
index 0000000000..e00ad83817
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h-32m.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a_zbtlink_zbt-we1026-h.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-h-32m", "zbtlink,zbt-we1026-h",
+ "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
+ model = "Zbtlink ZBT-WE1026-H (32M)";
+};
+
+&firmware {
+ reg = <0x50000 0x1fb0000>;
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi
new file mode 100644
index 0000000000..800e8e6e03
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7620a_zbtlink_zbt-we1026.dtsi"
+
+/ {
+ compatible = "zbtlink,zbt-we1026-h", "zbtlink,zbt-we1026",
+ "ralink,mt7620a-soc";
+
+ leds {
+ compatible = "gpio-leds";
+
+ usb {
+ label = "we1026-h:green:usb";
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "we1026-h:green:lan";
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "we1026-h:green:wan";
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi {
+ label = "we1026-h:green:wifi";
+ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 95de1c0e46..bca2363699 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -984,6 +984,17 @@ define Device/zbtlink_zbt-we1026-5g-16m
endef
TARGET_DEVICES += zbtlink_zbt-we1026-5g-16m
+define Device/zbtlink_zbt-we1026-h-32m
+ MTK_SOC := mt7620a
+ IMAGE_SIZE := 32448k
+ DEVICE_VENDOR := Zbtlink
+ DEVICE_MODEL := ZBT-WE1026-H
+ DEVICE_VARIANT := 32M
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \
+ kmod-ledtrig-netdev
+endef
+TARGET_DEVICES += zbtlink_zbt-we1026-h-32m
+
define Device/zbtlink_zbt-we2026
MTK_SOC := mt7620n
IMAGE_SIZE := 7552k
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index 45d08043d7..6d6dcde6af 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -212,6 +212,11 @@ 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-we1026-h-32m)
+ set_wifi_led "we1026-h:green:wifi"
+ ucidef_set_led_switch "lan" "lan" "we1026-h:green:lan" "switch0" "0x8"
+ ucidef_set_led_switch "wan" "wan" "we1026-h:green:wan" "switch0" "0x10"
+ ;;
zbtlink,zbt-we2026)
set_wifi_led "$boardname:green:wlan"
;;
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index 9341e0deff..4e50117a4c 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -189,6 +189,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "6t@eth0"
;;
+ zbtlink,zbt-we1026-h-32m)
+ ucidef_add_switch "switch0" \
+ "3:lan" "4:wan" "6@eth0"
+ ;;
zbtlink,zbt-we2026)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
@@ -276,6 +280,10 @@ ramips_setup_macs()
zbtlink,zbt-we1026-5g-16m)
label_mac=$(cat /sys/class/ieee80211/phy1/macaddress)
;;
+ zbtlink,zbt-we1026-h-32m)
+ wan_mac=$(mtd_get_mac_binary factory 0x2e)
+ label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ ;;
zyxel,keenetic-omni|\
zyxel,keenetic-omni-ii|\
zyxel,keenetic-viva)