ar71xx: add support for MikroTik RouterBOARD 921GS-5HPacD r2 (mANTBox 15s)
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>
Thu, 21 Dec 2017 14:53:05 +0000 (15:53 +0100)
committerDaniel Golle <dangowrt@users.noreply.github.com>
Thu, 21 Dec 2017 16:06:54 +0000 (17:06 +0100)
This patch adds support for the MikroTik RouterBOARD 921GS-5HPacD r2
(mANTBox 15s), an outdoor sector antenna with a built-in 802.11ac
wireless router. Additionally, it adds a new profile for devices with
>= 128 MB NAND flash and 802.11ac to the ar71xx/mikrotik subtarget.

See https://mikrotik.com/product/RB921GS-5HPacD-15S for more info.

Specifications:
 - SoC: Qualcomm Atheros QCA9558 (720 MHz)
 - RAM: 128 MB
 - Storage: 128 MB NAND
 - Wireless: external QCA9822 802.11a/ac 2x2:2
 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in
 - SFP: 1x host

Working:
 - Board/system detection
 - NAND storage detection
 - Wireless
 - Ethernet
 - 1x user LED
 - Reset button
 - Sysupgrade

Untested:
 - SFP cage (probably not working)

Installation:
 - Boot initramfs image via TFTP and then flash sysupgrade image

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
target/linux/ar71xx/base-files/etc/board.d/02_network
target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
target/linux/ar71xx/image/mikrotik.mk

index 255585a9e8a446c6fb62f03ef36de4e31acd2a77..fb61792bf41ab0c3f9c2046d30de39a8254f551b 100755 (executable)
@@ -97,6 +97,7 @@ ar71xx_setup_interfaces()
        rb-911g-5hpnd|\
        rb-912uag-2hpnd|\
        rb-912uag-5hpnd|\
+       rb-921gs-5hpacd-r2|\
        rb-lhg-5nd|\
        rb-mapl-2nd|\
        rb-sxt2n|\
index 6a0a59f61054d26122d0450fbdca2a79e188abd0..ec5f7a3e2880b774dbb585289825e9d73100ab70 100644 (file)
@@ -132,6 +132,7 @@ case "$FIRMWARE" in
                ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
                ;;
        rb-911g-5hpacd|\
+       rb-921gs-5hpacd-r2|\
        rb-962uigs-5hact2hnt)
                ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
                ;;
index 285fa68357c76330d78bedf88448cff099fcd68a..b5440230a503c96771fc24276fa21c71f6fe7322 100755 (executable)
@@ -944,6 +944,9 @@ ar71xx_board_detect() {
        *"RouterBOARD 912UAG-5HPnD")
                name="rb-912uag-5hpnd"
                ;;
+       *"RouterBOARD 921GS-5HPacD r2")
+               name="rb-921gs-5hpacd-r2"
+               ;;
        *"RouterBOARD 941-2nD")
                name="rb-941-2nd"
                ;;
index e3c48c9eefe34b6ce4ad9da81abe8242eeaa92b9..ecf6820a2b7cc53978990b50fa04d1ddb3eb146c 100755 (executable)
@@ -512,6 +512,7 @@ platform_check_image() {
        rb-911g-5hpacd|\
        rb-912uag-2hpnd|\
        rb-912uag-5hpnd|\
+       rb-921gs-5hpacd-r2|\
        rb-951g-2hnd|\
        rb-951ui-2hnd|\
        rb-2011l|\
@@ -697,6 +698,7 @@ platform_pre_upgrade() {
        rb-911g-5hpnd|\
        rb-912uag-2hpnd|\
        rb-912uag-5hpnd|\
+       rb-921gs-5hpacd-r2|\
        rb-951g-2hnd|\
        rb-951ui-2hnd|\
        rb-2011il|\
index 1159838747e9e8d8841929138c1f0b4dcb0060fd..2f54d029f67898ab1b6ab5d8838d9515c11e719f 100644 (file)
@@ -276,9 +276,16 @@ static void __init rb922gs_setup(void)
        ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
        ath79_eth0_data.phy_mask = BIT(RB922_PHY_ADDR);
-       ath79_eth0_pll_data.pll_10 = 0x81001313;
-       ath79_eth0_pll_data.pll_100 = 0x81000101;
-       ath79_eth0_pll_data.pll_1000 = 0x8f000000;
+       if (strcmp(info->board_name, "921GS-5HPacD r2") == 0) {
+               ath79_eth0_pll_data.pll_10 = 0xa0001313;
+               ath79_eth0_pll_data.pll_100 = 0xa0000101;
+               ath79_eth0_pll_data.pll_1000 = 0x8f000000;
+       }
+       else {
+               ath79_eth0_pll_data.pll_10 = 0x81001313;
+               ath79_eth0_pll_data.pll_100 = 0x81000101;
+               ath79_eth0_pll_data.pll_1000 = 0x8f000000;
+       }
 
        ath79_register_eth(0);
 
index 8f190875c5ceafc0dea2f2ab93958de3ab399be9..fd6ca279383adea0dc358698bb0270b47a72abc6 100644 (file)
@@ -24,6 +24,15 @@ define Device/nand-large
 endef
 TARGET_DEVICES += nand-large
 
+define Device/nand-large-ac
+  $(Device/mikrotik)
+  DEVICE_TITLE := MikroTik RouterBoard (>= 128 MB NAND, 802.11ac)
+  DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
+  KERNEL := kernel-bin | kernel2minor -s 2048 -e -c
+  SUPPORTED_DEVICES := rb-921gs-5hpacd-r2
+endef
+TARGET_DEVICES += nand-large-ac
+
 define Device/rb-nor-flash-16M
   DEVICE_TITLE := MikroTik RouterBoard (16 MB SPI NOR)
   DEVICE_PACKAGES := rbcfg rssileds -nand-utils kmod-ledtrig-gpio