aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rwxr-xr-xtarget/linux/ath79/base-files/etc/board.d/02_network7
-rwxr-xr-xtarget/linux/ath79/base-files/etc/board.d/03_gpio_switches15
-rw-r--r--target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac4
-rw-r--r--target/linux/ath79/base-files/lib/upgrade/platform.sh4
-rw-r--r--target/linux/ath79/dts/ar7161_adtran_bsap1800-v2.dts9
-rw-r--r--target/linux/ath79/dts/ar7161_adtran_bsap1840.dts9
-rw-r--r--target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi99
-rw-r--r--target/linux/ath79/image/generic.mk26
8 files changed, 173 insertions, 0 deletions
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index f7cac3e300..56650c3f6b 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -9,6 +9,8 @@ ath79_setup_interfaces()
local board="$1"
case "$board" in
+ adtran,bsap1800-v2|\
+ adtran,bsap1840|\
aruba,ap-105|\
avm,fritz300e|\
devolo,dvl1200i|\
@@ -269,6 +271,11 @@ ath79_setup_macs()
local board="$1"
case "$board" in
+ adtran,bsap1800-v2|\
+ adtran,bsap1840)
+ fconfig -s -w -d $(find_mtd_part "RedBoot config") -n boot_cntb -x 0
+ lan_mac=$(mtd_get_mac_binary "Board data" 2)
+ ;;
avm,fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
;;
diff --git a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches
index 7f40285daf..f588b29956 100755
--- a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches
@@ -10,6 +10,21 @@ board_config_update
board=$(board_name)
case "$board" in
+adtran,bsap1800-v2|\
+adtran,bsap1840)
+ ucidef_add_gpio_switch "wifi1_ext_a" "5GHz External Antenna A" "489" "1"
+ ucidef_add_gpio_switch "wifi1_int_a" "5GHz Internal Antenna A" "493"
+ ucidef_add_gpio_switch "wifi1_ext_b" "5GHz External Antenna B" "494" "1"
+ ucidef_add_gpio_switch "wifi1_int_b" "5GHz Internal Antenna B" "495"
+ ucidef_add_gpio_switch "wifi1_ext_c" "5GHz External Antenna C" "496" "1"
+ ucidef_add_gpio_switch "wifi1_int_c" "5GHz Internal Antenna C" "497"
+ ucidef_add_gpio_switch "wifi0_ext_a" "2.4GHz External Antenna A" "505" "1"
+ ucidef_add_gpio_switch "wifi0_int_a" "2.4GHz Internal Antenna A" "506"
+ ucidef_add_gpio_switch "wifi0_ext_b" "2.4GHz External Antenna B" "507" "1"
+ ucidef_add_gpio_switch "wifi0_int_b" "2.4GHz Internal Antenna B" "508"
+ ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1"
+ ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510"
+ ;;
comfast,cf-e5)
ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1"
ucidef_add_gpio_switch "lte_wakeup" "LTE Wakeup" "11" "1"
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index bdb8b71ff7..bf3e14aa9c 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -13,6 +13,10 @@ PHYNBR=${DEVPATH##*/phy}
board=$(board_name)
case "$board" in
+ adtran,bsap1800-v2|\
+ adtran,bsap1840)
+ macaddr_add "$(mtd_get_mac_binary 'Board data' 2)" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
+ ;;
iodata,wn-ag300dgr)
# There is no eeprom data for 5 GHz wlan in "art" partition
# which would allow to patch the macaddress
diff --git a/target/linux/ath79/base-files/lib/upgrade/platform.sh b/target/linux/ath79/base-files/lib/upgrade/platform.sh
index 8c5a8e52fe..3aff5dee14 100644
--- a/target/linux/ath79/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/base-files/lib/upgrade/platform.sh
@@ -40,6 +40,10 @@ platform_do_upgrade() {
local board=$(board_name)
case "$board" in
+ adtran,bsap1800-v2|\
+ adtran,bsap1840)
+ redboot_fis_do_upgrade "$1" vmlinux_2
+ ;;
jjplus,ja76pf2)
redboot_fis_do_upgrade "$1" linux
;;
diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1800-v2.dts b/target/linux/ath79/dts/ar7161_adtran_bsap1800-v2.dts
new file mode 100644
index 0000000000..1745ac76fb
--- /dev/null
+++ b/target/linux/ath79/dts/ar7161_adtran_bsap1800-v2.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7161_adtran_bsap1880.dtsi"
+
+/ {
+ model = "Adtran/Bluesocket BSAP-1800 v2";
+ compatible = "adtran,bsap1800-v2", "qca,ar7161";
+};
diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1840.dts b/target/linux/ath79/dts/ar7161_adtran_bsap1840.dts
new file mode 100644
index 0000000000..38b87a1e32
--- /dev/null
+++ b/target/linux/ath79/dts/ar7161_adtran_bsap1840.dts
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7161_adtran_bsap1880.dtsi"
+
+/ {
+ model = "Adtran/Bluesocket BSAP-1840";
+ compatible = "adtran,bsap1840", "qca,ar7161";
+};
diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
new file mode 100644
index 0000000000..ba9b588bec
--- /dev/null
+++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar7100.dtsi"
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ aliases {
+ led-boot = &led_green_status;
+ led-failsafe = &led_yellow_status;
+ led-running = &led_green_status;
+ led-upgrade = &led_yellow_status;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ wlan5g {
+ label = "bluesocket:green:wifi5g";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan2g {
+ label = "bluesocket:green:wifi2g";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ led_green_status: green_status {
+ label = "bluesocket:green:status";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ led_yellow_status: yellow_status {
+ label = "bluesocket:yellow:status";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ phy-mask = <0x1>;
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy0>;
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&spi {
+ status = "okay";
+ num-cs = <1>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+
+ partitions {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ecoscentric,redboot-fis-partitions";
+ };
+ };
+};
+
+&uart {
+ status = "okay";
+};
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 4662383541..3c679fb480 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -85,6 +85,32 @@ define Device/8dev_carambola2
endef
TARGET_DEVICES += 8dev_carambola2
+define Device/adtran_bsap1880
+ ATH_SOC := ar7161
+ DEVICE_VENDOR := Adtran/Bluesocket
+ DEVICE_PACKAGES += -swconfig -uboot-envtools fconfig
+ KERNEL := kernel-bin | append-dtb | lzma
+ KERNEL_INITRAMFS := kernel-bin | append-dtb
+ IMAGE_SIZE := 11200k
+ IMAGES += kernel.bin rootfs.bin
+ IMAGE/kernel.bin := append-kernel | pad-to $$$$(BLOCKSIZE)
+ IMAGE/rootfs.bin := append-rootfs | pad-rootfs
+ IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | append-metadata | check-size $$$$(IMAGE_SIZE)
+endef
+
+define Device/adtran_bsap1800-v2
+ $(Device/adtran_bsap1880)
+ DEVICE_MODEL := BSAP-1800
+ DEVICE_VARIANT := v2
+endef
+TARGET_DEVICES += adtran_bsap1800-v2
+
+define Device/adtran_bsap1840
+ $(Device/adtran_bsap1880)
+ DEVICE_MODEL := BSAP-1840
+endef
+TARGET_DEVICES += adtran_bsap1840
+
define Device/aruba_ap-105
ATH_SOC := ar7161
DEVICE_VENDOR := Aruba