From 978998628fe98f8cfc81910b851e5a3dfd316bac Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Fri, 17 Mar 2017 14:30:33 +1030 Subject: ar71xx: add support for MikroTik hAP ac This patch adds initial support for the MikroTik RouterBOARD hAP ac (RB962UiGS-5HacT2HnT). All functions are supported except: -SFP cage (eth1) is not working -WLAN LEDs are not working Signed-off-by: Ryan Mounce --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 3 +++ target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 3 ++- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx/base-files') diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index a5b2730603..fdbdddd299 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -249,6 +249,9 @@ rb-952ui-5ac2nd) ucidef_set_led_switch "port5" "port5" "rb:green:port5" "switch0" "0x02" ucidef_set_led_wlan "wlan" "WLAN" "rb:blue:wlan" "phy0tpt" ;; +rb-962uigs-5hact2hnt) + ucidef_set_led_timer "user" "USER/SFP" "rb:green:user" "1000" "1000" + ;; rb-2011l|\ rb-2011uas|\ rb-2011uias|\ diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 3888cbe897..0965d717ee 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -171,6 +171,7 @@ ar71xx_setup_interfaces() rb-750gl|\ rb-751g|\ rb-951g-2hnd|\ + rb-962uigs-5hact2hnt|\ wlr8100|\ wzr-hp-g450h) ucidef_add_switch "switch0" \ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 8b2cc08269..c8eafa5b0b 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -307,6 +307,7 @@ get_status_led() { rb-941-2nd|\ rb-951ui-2nd|\ rb-952ui-5ac2nd|\ + rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ rb-mapl-2nd) status_led="rb:green:user" diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 323aa40518..d4afbbcc25 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -127,7 +127,8 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; - rb-911g-5hpacd) + rb-911g-5hpacd | \ + rb-962uigs-5hact2hnt) ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 ;; esac diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 63c09871d4..32f3bfbbeb 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -908,6 +908,9 @@ ar71xx_board_detect() { *"RouterBOARD 952Ui-5ac2nD") name="rb-952ui-5ac2nd" ;; + *"RouterBOARD 962UiGS-5HacT2HnT") + name="rb-962uigs-5hact2hnt" + ;; *"RouterBOARD LHG 5nD") name="rb-lhg-5nd" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index f5f37f044d..7a0bbb63b4 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -639,6 +639,7 @@ platform_check_image() { rb-941-2nd|\ rb-951ui-2nd|\ rb-952ui-5ac2nd|\ + rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ rb-mapl-2nd) return 0 @@ -692,6 +693,7 @@ platform_pre_upgrade() { rb-941-2nd|\ rb-951ui-2nd|\ rb-952ui-5ac2nd|\ + rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ rb-mapl-2nd) # erase firmware if booted from initramfs -- cgit v1.2.3