new file mode 100644
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca9557.dtsi"
+
+/ {
+ compatible = "mikrotik,rb-wapg-5hact2hnd", "qca,qca9556";
+ model = "MikroTik RouterBOARD wAP G-5HacT2HnD";
+
+ aliases {
+ serial0 = &uart;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&spi {
+ status = "okay";
+ num-cs = <1>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "routerboot";
+ reg = <0x000000 0x00e000>;
+ read-only;
+ };
+
+ partition@e000 {
+ label = "hard_config";
+ reg = <0x000e000 0x00f000>;
+ read-only;
+ };
+
+ partition@f000 {
+ label = "bios";
+ reg = <0x000f000 0x010000>;
+ read-only;
+ };
+
+ partition@10000 {
+ label = "routerboot2";
+ reg = <0x010000 0x01f000>;
+ read-only;
+ };
+
+ partition@1f000 {
+ label = "soft_config";
+ reg = <0x001f000 0x020000>;
+ read-only;
+ };
+
+ partition@20000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x020000 0x1000000>;
+ };
+ };
+ };
+};
+
+&uart {
+ status = "okay";
+};
+
+&pcie0 {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0 0 0 0 0>;
+ };
+};
+
+ð0 {
+ status = "okay";
+};
+
+&wmac {
+ status = "okay";
+};
new file mode 100644
@@ -0,0 +1,25 @@
+define Device/mikrotik
+ DEVICE_VENDOR := MikroTik
+ DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
+ BOARD_NAME := routerboard
+ LOADER_TYPE := elf
+ KERNEL_NAME := vmlinux.elf
+ KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
+ MIKROTIK_CHUNKSIZE :=
+endef
+DEVICE_VARS += MIKROTIK_CHUNKSIZE
+
+define Device/rb-nor-flash-16M
+ $(Device/mikrotik)
+ DEVICE_PACKAGES := rbcfg rssileds -nand-utils kmod-ledtrig-gpio
+ IMAGE_SIZE := 16000k
+ KERNEL_INSTALL := 1
+ IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | pad-to $$$$(BLOCKSIZE) | \
+ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+endef
+
+define Device/rb-nor-flash-16M-ac
+ $(Device/rb-nor-flash-16M)
+ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct ath10k-firmware-qca9887-ct kmod-usb-ehci
+ SUPPORTED_DEVICES += rb-wapg-5hact2hnd mikrotik_rb-wapg-5hact2hnd
+endef
@@ -1,4 +1,5 @@
include ./common-buffalo.mk
+include ./common-mikrotik.mk
include ./common-netgear.mk
include ./common-tp-link.mk
@@ -684,6 +685,17 @@ define Device/librerouter_librerouter-v1
endef
TARGET_DEVICES += librerouter_librerouter-v1
+define Device/mikrotik_rb-wapg-5hact2hnd
+ $(Device/rb-nor-flash-16M-ac)
+ ATH_SOC := qca9556
+ DEVICE_VENDOR := MikroTik
+ DEVICE_MODEL := MikroTik RouterBOARD wAP G-5HacT2HnD (wAP AC)
+ LOADER_TYPE := elf
+ KERNEL := kernel-bin | append-dtb
+ KERNEL_INITRAMFS := kernel-bin | append-dtb
+endef
+TARGET_DEVICES += mikrotik_rb-wapg-5hact2hnd
+
define Device/nec_wg1200cr
ATH_SOC := qca9563
DEVICE_VENDOR := NEC