ath79: add support for MikroTik hAP (RB951Ui-2nD)
authorMaciej Krüger <mkg20001@gmail.com>
Thu, 19 May 2022 18:00:53 +0000 (20:00 +0200)
committerDavid Bauer <mail@david-bauer.net>
Sat, 21 May 2022 13:45:40 +0000 (15:45 +0200)
The MikroTik hAP (product code RB951Ui-2nD) is
an indoor 2.4Ghz AP with a 2 dBi integrated antenna built around the
Atheros QCA9531 SoC.

Specifications:
 - SoC: Atheros QCA9531
 - RAM: 64 MB
 - Storage: 16 MB NOR - Winbond 25Q128FVSG
 - Wireless: Atheros QCA9530 (SoC) 802.11b/g/n 2x2
 - Ethernet: Atheros AR934X switch, 5x 10/100 ports,
   10-28 V passive PoE in port 1, 500 mA PoE out on port 5
 - 8 user-controllable LEDs:
   · 1x power (green)
   · 1x user (green)
   · 4x LAN status (green)
   · 1x WAN status (green)
   · 1x PoE power status (red)

See https://mikrotik.com/product/RB951Ui-2nD for more details.

Notes:
 The device was already supported in the ar71xx target.

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Maciej Krüger <mkg20001@gmail.com>
(cherry picked from commit 5ce64e0646fcd5c4f374b4de898b591560c32e18)

target/linux/ath79/dts/qca9531_mikrotik_routerboard-951ui-2nd.dts [new file with mode: 0644]
target/linux/ath79/image/mikrotik.mk
target/linux/ath79/mikrotik/base-files/etc/board.d/01_leds
target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata

diff --git a/target/linux/ath79/dts/qca9531_mikrotik_routerboard-951ui-2nd.dts b/target/linux/ath79/dts/qca9531_mikrotik_routerboard-951ui-2nd.dts
new file mode 100644 (file)
index 0000000..dd9af40
--- /dev/null
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9533_mikrotik_routerboard-95x.dtsi"
+
+/ {
+       compatible = "mikrotik,routerboard-951ui-2nd", "qca,qca9531";
+       model = "MikroTik RouterBOARD 951Ui-2nD (hAP)";
+};
index 869c46627835e224c24d59cdb5c32d7b8e67e945..d8ae726e874eec82bb1e1061bce19584beea3ff0 100644 (file)
@@ -38,6 +38,15 @@ define Device/mikrotik_routerboard-922uags-5hpacd
 endef
 TARGET_DEVICES += mikrotik_routerboard-922uags-5hpacd
 
+define Device/mikrotik_routerboard-951ui-2nd
+  $(Device/mikrotik_nor)
+  SOC := qca9531
+  DEVICE_MODEL := RouterBOARD 951Ui-2nD (hAP)
+  IMAGE_SIZE := 16256k
+  SUPPORTED_DEVICES += rb-951ui-2nd
+endef
+TARGET_DEVICES += mikrotik_routerboard-951ui-2nd
+
 define Device/mikrotik_routerboard-952ui-5ac2nd
   $(Device/mikrotik_nor)
   SOC := qca9533
index baf6d004129ad31339e37d2345769dad21c9cf81..edb83b9baa6bca58bab4fc3bb91dda6014793757 100644 (file)
@@ -6,6 +6,7 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
+mikrotik,routerboard-951ui-2nd|\
 mikrotik,routerboard-952ui-5ac2nd)
        ucidef_set_led_netdev "port1" "port1" "green:port1" "eth1"
        ucidef_set_led_switch "port2" "port2" "green:port2" "switch0" "0x10"
index 9417e839e4bde390395548357f67c1f9f02b07a2..b05a41ec36bf40e97bcfa677ac9d1c4603323fee 100644 (file)
@@ -24,6 +24,7 @@ ath79_setup_interfaces()
        mikrotik,routerboard-wapr-2nd)
                ucidef_set_interface_lan "eth0"
                ;;
+       mikrotik,routerboard-951ui-2nd|\
        mikrotik,routerboard-952ui-5ac2nd)
                ucidef_set_interface_wan "eth1"
                ucidef_add_switch "switch0" \
index b5651f15e89d342008e936d9ef26b102893bfe92..0baed0665c842dd22cbb521bc695fa5d4671ef27 100644 (file)
@@ -35,6 +35,7 @@ case "$FIRMWARE" in
        mikrotik,routerboard-wap-g-5hact2hnd)
                caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 2)
                ;;
+       mikrotik,routerboard-951ui-2nd|\
        mikrotik,routerboard-952ui-5ac2nd)
                caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 6)
                ;;
index 32fc4a6f6d9ff087e6d8ec9b9a5b8e9268f58436..5b918d966c6fc719673f8fb571224c0012cf04fd 100644 (file)
@@ -12,6 +12,7 @@ case "$FIRMWARE" in
 "ath10k/cal-pci-0000:00:00.0.bin")
        case $board in
        mikrotik,routerboard-921gs-5hpacd-15s|\
+       mikrotik,routerboard-951ui-2nd|\
        mikrotik,routerboard-952ui-5ac2nd|\
        mikrotik,routerboard-962uigs-5hact2hnt|\
        mikrotik,routerboard-wap-g-5hact2hnd)