From 540edf704501db3ec8dcb278a7f1df52de222ae0 Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Wed, 8 Mar 2017 19:37:00 +1030 Subject: ar71xx: add support for MikroTik hAP ac lite This patch adds support for the MikroTik RouterBOARD hAP ac lite (RB952Ui-5ac2nD). The hAP ac lite is nearly identical to the hAP, with an added QCA9887 5GHz radio. The 2.4GHz radio ID is also changed in the hAP ac lite. 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/board.d/03_gpio_switches | 3 ++- 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 ++ 7 files changed, 14 insertions(+), 2 deletions(-) (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 686ae31b75..a5b2730603 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -239,7 +239,8 @@ rb-750up-r2) rb-941-2nd) ucidef_set_led_timer "user" "USR/ACT" "rb:green:user" "1000" "1000" ;; -rb-951ui-2nd) +rb-951ui-2nd|\ +rb-952ui-5ac2nd) ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000" ucidef_set_led_netdev "port1" "port1" "rb:green:port1" "eth0" ucidef_set_led_switch "port2" "port2" "rb:green:port2" "switch0" "0x10" 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 20b34e8965..3888cbe897 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -142,6 +142,7 @@ ar71xx_setup_interfaces() rb-750up-r2|\ rb-951ui-2hnd|\ rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ routerstation|\ tl-wr710n|\ tl-wr720n-v3|\ diff --git a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches index 4bb319c937..2b18741cd9 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches @@ -28,7 +28,8 @@ rb-912uag-5hpnd) ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "1" ;; rb-750up-r2|\ -rb-951ui-2nd) +rb-951ui-2nd|\ +rb-952ui-5ac2nd) ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "45" "1" ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "14" ;; diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 0c4349ff2b..8b2cc08269 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -306,6 +306,7 @@ get_status_led() { rb-912uag-5hpnd|\ rb-941-2nd|\ rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ 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 4938e2653a..323aa40518 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 @@ -106,6 +106,9 @@ case "$FIRMWARE" in unifiac-pro) ath10kcal_extract "EEPROM" 20480 2116 ;; + rb-952ui-5ac2nd) + ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 + ;; esac ;; "ath10k/cal-pci-0000:01:00.0.bin") diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 4951e5b625..63c09871d4 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -905,6 +905,9 @@ ar71xx_board_detect() { *"RouterBOARD 951Ui-2nD") name="rb-951ui-2nd" ;; + *"RouterBOARD 952Ui-5ac2nD") + name="rb-952ui-5ac2nd" + ;; *"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 364a32f76c..f5f37f044d 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -638,6 +638,7 @@ platform_check_image() { rb-750up-r2|\ rb-941-2nd|\ rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ rb-lhg-5nd|\ rb-mapl-2nd) return 0 @@ -690,6 +691,7 @@ platform_pre_upgrade() { rb-750up-r2|\ rb-941-2nd|\ rb-951ui-2nd|\ + rb-952ui-5ac2nd|\ rb-lhg-5nd|\ rb-mapl-2nd) # erase firmware if booted from initramfs -- cgit v1.2.3