aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/tiny
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/tiny')
-rw-r--r--target/linux/ath79/tiny/base-files/etc/board.d/01_leds5
-rw-r--r--target/linux/ath79/tiny/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version20
-rw-r--r--target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata25
4 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
index 72df8b3dea..f705c5c718 100644
--- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
@@ -93,6 +93,11 @@ tplink,tl-wa850re-v2)
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:signal4" "wlan0" "60" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:signal5" "wlan0" "80" "100"
;;
+tplink,tl-wpa8630p-v2-int|\
+tplink,tl-wpa8630p-v2.0-eu|\
+tplink,tl-wpa8630p-v2.1-eu)
+ ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
+ ;;
tplink,tl-wr940n-v3|\
tplink,tl-wr940n-v4|\
tplink,tl-wr941nd-v6)
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
index 45335c7c89..77b2444819 100644
--- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
@@ -82,6 +82,13 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
+ tplink,tl-wpa8630p-v2-int|\
+ tplink,tl-wpa8630p-v2.0-eu|\
+ tplink,tl-wpa8630p-v2.1-eu)
+ # port 5 (internal) is the power-line port
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
+ ;;
tplink,tl-wr941-v2)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version b/target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version
new file mode 100644
index 0000000000..b6c2ae48f7
--- /dev/null
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2020 OpenWrt.org
+#
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ tplink,tl-wpa8630p-v2-int|\
+ tplink,tl-wpa8630p-v2.0-eu|\
+ tplink,tl-wpa8630p-v2.1-eu)
+ ucidef_set_compat_version "2.0"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
new file mode 100644
index 0000000000..8e3e142ec9
--- /dev/null
+++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/functions/caldata.sh
+
+board=$(board_name)
+
+case "$FIRMWARE" in
+"ath10k/pre-cal-pci-0000:00:00.0.bin")
+ case $board in
+ tplink,tl-wpa8630p-v2-int|\
+ tplink,tl-wpa8630p-v2.0-eu|\
+ tplink,tl-wpa8630p-v2.1-eu)
+ caldata_extract "art" 0x5000 0x2f20
+ ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
+ ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
+ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
+ ;;
+ esac
+ ;;
+*)
+ exit 1
+ ;;
+esac