aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/dts/qca9558_engenius_esr900.dts85
-rw-r--r--target/linux/ath79/generic/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac3
-rw-r--r--target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh3
-rw-r--r--target/linux/ath79/image/generic.mk14
5 files changed, 108 insertions, 1 deletions
diff --git a/target/linux/ath79/dts/qca9558_engenius_esr900.dts b/target/linux/ath79/dts/qca9558_engenius_esr900.dts
new file mode 100644
index 0000000000..269f743223
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_engenius_esr900.dts
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca955x_senao_router-dual.dtsi"
+
+/ {
+ compatible = "engenius,esr900", "qca,qca9558";
+ model = "EnGenius ESR900";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "amber:power";
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wps_amber {
+ label = "amber:wps";
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+ };
+
+ wps_blue {
+ label = "blue:wps";
+ gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&phy0 {
+ qca,mib-poll-interval = <500>;
+
+ qca,ar8327-initvals = <
+ 0x04 0x07680000 /* PORT0 PAD MODE CTRL */
+ 0x10 0x40000000 /* POWER_ON_STRAP */
+ 0x50 0xcf35cf35 /* LED_CTRL0 */
+ 0x54 0xcf35cf35 /* LED_CTRL1 */
+ 0x58 0xcf35cf35 /* LED_CTRL2 */
+ 0x5c 0x03ffff00 /* LED_CTRL3 */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ >;
+};
+
+&usb_phy1 {
+ status = "okay";
+};
+
+&usb1 {
+ status = "okay";
+};
+
+&wmac {
+ nvmem-cells = <&calibration_art_1000>;
+ nvmem-cell-names = "calibration";
+};
+
+&pcie0 {
+ status = "okay";
+
+ wifi@0,0,0 {
+ compatible = "pci168c,0033";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&calibration_art_5000>;
+ nvmem-cell-names = "calibration";
+ };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 3330cd2b0a..14baee3ae7 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -287,6 +287,7 @@ ath79_setup_interfaces()
dlink,dir-842-c3|\
dlink,dir-859-a1|\
engenius,epg5000|\
+ engenius,esr900|\
sitecom,wlr-7100|\
tplink,archer-c2-v3|\
tplink,tl-wr1043nd-v4|\
@@ -665,7 +666,8 @@ ath79_setup_macs()
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
label_mac=$lan_mac
;;
- engenius,epg5000)
+ engenius,epg5000|\
+ engenius,esr900)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 74345843f5..42fa44c30e 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -35,6 +35,9 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
;;
+ engenius,esr900)
+ macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" "$PHYNBR" > /sys${DEVPATH}/macaddress
+ ;;
fortinet,fap-221-b)
macaddr_add "$(mtd_get_mac_text u-boot 0x3ff80 12)" $((PHYNBR*7+1)) > /sys${DEVPATH}/macaddress
;;
diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
index bf40efe72b..50855f543f 100644
--- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
+++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -12,6 +12,9 @@ preinit_set_mac_address() {
ip link set dev eth0 address $(mtd_get_mac_ascii bdcfg "lanmac")
ip link set dev eth1 address $(mtd_get_mac_ascii bdcfg "wanmac")
;;
+ engenius,esr900)
+ ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env ethaddr)
+ ;;
enterasys,ws-ap3705i)
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env0 ethaddr)
;;
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index d12fa7226e..47a8b0fe79 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1299,6 +1299,20 @@ define Device/engenius_epg5000
endef
TARGET_DEVICES += engenius_epg5000
+define Device/engenius_esr900
+ SOC := qca9558
+ DEVICE_VENDOR := EnGenius
+ DEVICE_MODEL := ESR900
+ DEVICE_PACKAGES := kmod-usb2
+ IMAGE_SIZE := 14656k
+ IMAGES += factory.dlf
+ IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+ append-rootfs | pad-rootfs | check-size | \
+ senao-header -r 0x101 -p 0x4e -t 2
+ SUPPORTED_DEVICES += esr900
+endef
+TARGET_DEVICES += engenius_esr900
+
define Device/engenius_ews511ap
SOC := qca9531
DEVICE_VENDOR := EnGenius