From c2ab56a7549b75b9592ddcfc0cf1040281f7d28a Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Sat, 18 Nov 2023 16:54:59 +0100 Subject: [PATCH] ath79: support MikroTik RouterBOARD 911G-5HPacD 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 --- ...a9558_mikrotik_routerboard-911g-5hpacd.dts | 29 +++++++++++++++++++ ..._mikrotik_routerboard-921gs-5hpacd-15s.dts | 8 +++++ ...58_mikrotik_routerboard-922uags-5hpacd.dts | 8 +++++ .../dts/qca9558_mikrotik_routerboard-92x.dtsi | 4 --- target/linux/ath79/image/mikrotik.mk | 9 ++++++ .../base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + .../base-files/lib/upgrade/platform.sh | 1 + 8 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 target/linux/ath79/dts/qca9558_mikrotik_routerboard-911g-5hpacd.dts 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 index 0000000000..22784075f6 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-911g-5hpacd.dts @@ -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; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts index d1f307bd48..36283ec228 100644 --- a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts +++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-15s.dts @@ -17,6 +17,14 @@ }; }; +&mdio1 { + status = "okay"; +}; + +ð1 { + status = "okay"; +}; + &pcie1 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts index 8ad834fe61..553dff0853 100644 --- a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts +++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts @@ -25,6 +25,14 @@ }; }; +&mdio1 { + status = "okay"; +}; + +ð1 { + status = "okay"; +}; + &pcie0 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi index 82b8c2ae56..bc85cad9b3 100644 --- a/target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi +++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-92x.dtsi @@ -86,8 +86,6 @@ }; &mdio1 { - status = "okay"; - phy_sfp: ethernet-phy@0 { reg = <0>; phy-mode = "sgmii"; @@ -96,8 +94,6 @@ }; ð1 { - status = "okay"; - phy-handle = <&phy_sfp>; pll-data = <0x03000000 0x00000101 0x00001616>; qca955x-sgmii-fixup; diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk index 06a2417faa..19cbf30933 100644 --- a/target/linux/ath79/image/mikrotik.mk +++ b/target/linux/ath79/image/mikrotik.mk @@ -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 diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network index f13eca243b..4da5884045 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network +++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network @@ -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|\ diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 5b918d966c..da331dc0ea 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -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|\ diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh index db0509d290..c4d401b8ae 100644 --- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh @@ -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|\ -- 2.30.2