--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca953x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "ASUS RP-AC51";
+ compatible = "asus,rp-ac51", "qca,qca9531";
+
+ aliases {
+ led-boot = &led_wps;
+ led-failsafe = &led_wps;
+ led-running = &led_wps;
+ led-upgrade = &led_wps;
+ label-mac-device = ð0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ wps {
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ reset {
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ led_wps: wps {
+ label = "red:wps";
+ gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ lan {
+ label = "blue:lan";
+ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&pcie0 {
+ status = "okay";
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x000000 0x40000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot-env";
+ reg = <0x040000 0x10000>;
+ read-only;
+ };
+
+ art: partition@50000 {
+ label = "art";
+ reg = <0x050000 0x10000>;
+ read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_1002: macaddr@1002 {
+ reg = <0x1002 0x6>;
+ };
+ };
+
+ partition@60000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x060000 0xfa0000>;
+ };
+ };
+ };
+};
+
+ð0 {
+ status = "okay";
+
+ phy-handle = <&swphy4>;
+
+ nvmem-cells = <&macaddr_art_0>;
+ nvmem-cell-names = "mac-address";
+};
+
+ð1 {
+ nvmem-cells = <&macaddr_art_1002>;
+ nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+ status = "okay";
+
+ qca,no-eeprom;
+};
;;
"ath10k/pre-cal-pci-0000:00:00.0.bin")
case $board in
+ asus,rp-ac51|\
+ yuncore,a782|\
+ yuncore,xd4200)
+ caldata_extract "art" 0x5000 0x2f20
+ ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
+ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
+ ;;
comfast,cf-e313ac)
caldata_extract "art" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary art 0x6)
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
- yuncore,a782|\
- yuncore,xd4200)
- caldata_extract "art" 0x5000 0x2f20
- ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
- /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
- ;;
esac
;;
*)