ath79: support MikroTik RouterBOARD 911G-5HPacD
authorLech Perczak <lech.perczak@gmail.com>
Sat, 18 Nov 2023 15:54:59 +0000 (16:54 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 7 Jan 2024 00:19:56 +0000 (01:19 +0100)
The MikroTik RouterBOARD 911G-5HPacD is a stripped-down version of
RB921GS-5HPacD, removing the SFP cage.
This ports the board from ar71xx, and is based on support for
RB921GS-5HPacD.

Disable mdio1 and eth1 nodes in routerboard-92x.dtsi, then re-enable
them in devices using that, so the newly-added device has the port
disabled properly.

See https://mikrotik.com/product/RB911G-5HPacD for more info.

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

Working:
 - NAND storage detection
 - Ethernet
 - Wireless
 - 1x user LED (blinks during boot, sysupgrade)
 - Reset button
 - Sysupgrade

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

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
target/linux/ath79/dts/qca9558_mikrotik_routerboard-911g-5hpacd.dts [new file with mode: 0644]
target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi
target/linux/ath79/image/mikrotik.mk
target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh

diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-911g-5hpacd.dts b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-911g-5hpacd.dts
new file mode 100644 (file)
index 0000000..2278407
--- /dev/null
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9558_mikrotik_routerboard-92x.dtsi"
+
+/ {
+       compatible = "mikrotik,routerboard-911g-5hpacd", "qca,qca9558";
+       model = "MikroTik RouterBOARD 911G-5HPacD";
+
+       ath10k-leds {
+               compatible = "gpio-leds";
+
+               wlan5g {
+                       label = "green:wlan5g";
+                       gpios = <&ath10k 0 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+       };
+};
+
+&pcie1 {
+       status = "okay";
+
+       ath10k: wifi@0,0 {
+               compatible = "qcom,ath10k";
+               reg = <0 0 0 0 0>;
+               #gpio-cells = <2>;
+               gpio-controller;
+       };
+};
index d1f307bd481352cae9c0ac837c8b807c46a1daaf..36283ec2281c9170fbbef67ad501b0b2b3e6d891 100644 (file)
        };
 };
 
+&mdio1 {
+       status = "okay";
+};
+
+&eth1 {
+       status = "okay";
+};
+
 &pcie1 {
        status = "okay";
 
index 8ad834fe61a7b5aa77056f70f459a91280b406ec..553dff0853d299a1dd3c9aab89faf79e4a408612 100644 (file)
        };
 };
 
+&mdio1 {
+       status = "okay";
+};
+
+&eth1 {
+       status = "okay";
+};
+
 &pcie0 {
        status = "okay";
 
index 82b8c2ae56f6fb98e99473634e81738abe310121..bc85cad9b37b0327d53f02d6740f35a2d13ae195 100644 (file)
@@ -86,8 +86,6 @@
 };
 
 &mdio1 {
-       status = "okay";
-
        phy_sfp: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
@@ -96,8 +94,6 @@
 };
 
 &eth1 {
-       status = "okay";
-
        phy-handle = <&phy_sfp>;
        pll-data = <0x03000000 0x00000101 0x00001616>;
        qca955x-sgmii-fixup;
index 06a2417faae44117d487156cba0fc3dadf658ea4..19cbf3093364ac2b68d36f17b3d1a47c956d078c 100644 (file)
@@ -50,6 +50,15 @@ define Device/mikrotik_routerboard-912uag-2hpnd
 endef
 TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
 
+define Device/mikrotik_routerboard-911g-5hpacd
+  $(Device/mikrotik_nand)
+  SOC := qca9558
+  DEVICE_MODEL := RouterBOARD 911G-5HPacD
+  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  SUPPORTED_DEVICES += rb-921gs-5hpacd-r2
+endef
+TARGET_DEVICES += mikrotik_routerboard-911g-5hpacd
+
 define Device/mikrotik_routerboard-921gs-5hpacd-15s
   $(Device/mikrotik_nand)
   SOC := qca9558
index f13eca243bad3f722c98a3f5b27faaf00542dc6e..4da588404582c1686ea13f845260417ab60c2257 100644 (file)
@@ -62,6 +62,7 @@ ath79_setup_macs()
 
        case "$board" in
        mikrotik,routerboard-911-lite|\
+       mikrotik,routerboard-911g-5hpacd|\
        mikrotik,routerboard-911g-xhpnd|\
        mikrotik,routerboard-912uag-2hpnd|\
        mikrotik,routerboard-lhg-2nd|\
index 5b918d966c6fc719673f8fb571224c0012cf04fd..da331dc0eac89db6cbc16d489cb137871cadbad3 100644 (file)
@@ -11,6 +11,7 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath10k/cal-pci-0000:00:00.0.bin")
        case $board in
+       mikrotik,routerboard-911g-5hpacd|\
        mikrotik,routerboard-921gs-5hpacd-15s|\
        mikrotik,routerboard-951ui-2nd|\
        mikrotik,routerboard-952ui-5ac2nd|\
index db0509d29018c08f66028f61f0753ea4c5593dc9..c4d401b8ae8b65377b94e226886bcb0253abcadc 100644 (file)
@@ -30,6 +30,7 @@ platform_do_upgrade() {
 
        case "$board" in
        mikrotik,routerboard-493g|\
+       mikrotik,routerboard-911g-5hpacd|\
        mikrotik,routerboard-911g-xhpnd|\
        mikrotik,routerboard-912uag-2hpnd|\
        mikrotik,routerboard-921gs-5hpacd-15s|\