araknis,an-500-ap-i-ac|\
araknis,an-700-ap-i-ac|\
arduino,yun|\
+asus,rt-ac59u|\
+asus,rt-ac59u-v2|\
+asus,zenwifi-cd6n|\
+asus,zenwifi-cd6r|\
buffalo,bhr-4grv2|\
devolo,magic-2-wifi|\
dlink,dir-859-a1|\
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ label-mac-device = ð0;
+ };
+};
+
+ð0 {
+ status = "okay";
+
+ pll-data = <0x03000101 0x00000101 0x00001919>;
+
+ phy-mode = "sgmii";
+ phy-handle = <&phy0>;
+
+ nvmem-cells = <&macaddr_factory_1002>;
+ nvmem-cell-names = "mac-address";
+};
+
+&mdio0 {
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "sgmii";
+ qca,mib-poll-interval = <500>;
+
+ qca,ar8327-initvals = <
+ 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
+ 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
+ 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
+ 0x10 0x00000080 /* POWER_ON_STRAP */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ 0x94 0x00000200 /* PORT6_STATUS */
+ >;
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0 0 0 0 0>;
+
+ nvmem-cells = <&precal_factory_5000>;
+ nvmem-cell-names = "pre-calibration";
+ };
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ m25p,fast-read;
+
+ mtdparts: partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x000000 0x040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "nvram";
+ reg = <0x040000 0x010000>;
+ read-only;
+ };
+
+ partition@50000 {
+ label = "Factory";
+ reg = <0x050000 0x010000>;
+ read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_factory_1000: cal@1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ macaddr_factory_1002: macaddr@1002 {
+ reg = <0x1002 0x6>;
+ };
+
+ precal_factory_5000: precal@5000 {
+ reg = <0x5000 0x2f20>;
+ };
+ };
+ };
+ };
+};
+
+&wmac {
+ /* Does not work due to lack of QCN5502 support in ath9k. */
+ status = "disabled";
+
+ nvmem-cells = <&cal_factory_1000>;
+ nvmem-cell-names = "calibration";
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus_rt-ac59u.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-ac59u-v2", "qca,qcn5500", "qca,qca9560";
+ model = "ASUS RT-AC59U v2";
+};
+
+&mtdparts {
+ partition@60000 {
+ label = "firmware";
+ reg = <0x060000 0x1fa0000>;
+ compatible = "denx,uimage";
+ };
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus_rt-ac59u.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,rt-ac59u", "qca,qcn5500", "qca,qca9560";
+ model = "ASUS RT-AC59U";
+};
+
+&mtdparts {
+ partition@60000 {
+ label = "firmware";
+ reg = <0x060000 0xfa0000>;
+ compatible = "denx,uimage";
+ };
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "blue:power";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&hub_port0>;
+ linux,default-trigger = "usbport";
+ };
+
+ wlan2g {
+ label = "blue:wlan2g";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&usb_phy0 {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ aliases {
+ led-boot = &led_blue;
+ led-failsafe = &led_red;
+ led-running = &led_blue;
+ led-upgrade = &led_red;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_blue: blue {
+ label = "blue";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ green {
+ label = "green";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ led_red: red {
+ label = "red";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ white {
+ label = "white";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus_zenwifi-cd6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,zenwifi-cd6n", "qca,qcn5500", "qca,qca9560";
+ model = "ASUS ZenWiFi CD6N";
+};
+
+&mtdparts {
+ partition@60000 {
+ label = "firmware";
+ reg = <0x060000 0xfa0000>;
+ compatible = "denx,uimage";
+ };
+};
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcn5502_asus_zenwifi-cd6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "asus,zenwifi-cd6r", "qca,qcn5500", "qca,qca9560";
+ model = "ASUS ZenWiFi CD6R";
+};
+
+&mtdparts {
+ partition@60000 {
+ label = "firmware";
+ reg = <0x060000 0x1fa0000>;
+ compatible = "denx,uimage";
+ };
+};
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "6:lan:4"
;;
+ asus,zenwifi-cd6n)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan:1" "4:lan:2"
+ ;;
+ asus,zenwifi-cd6r)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan:2" "3:lan:1" "4:lan:3" "2:wan"
+ ;;
atheros,db120)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan"
;;
+ asus,rt-ac59u|\
+ asus,rt-ac59u-v2|\
mercury,mw4530r-v1|\
tplink,archer-a7-v5|\
tplink,archer-a9-v6|\
endef
TARGET_DEVICES += asus_rp-ac66
+define Device/asus_qcn5502
+ SOC := qcn5502
+ DEVICE_VENDOR := ASUS
+ DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
+ IMAGES += factory.bin
+ IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+ append-rootfs | pad-rootfs
+endef
+
+define Device/asus_rt-ac59u
+ $(Device/asus_qcn5502)
+ DEVICE_MODEL := RT-AC59U
+ DEVICE_ALT0_VENDOR := ASUS
+ DEVICE_ALT0_MODEL := RT-AC1200GE
+ DEVICE_ALT1_VENDOR := ASUS
+ DEVICE_ALT1_MODEL := RT-AC1500G PLUS
+ DEVICE_ALT2_VENDOR := ASUS
+ DEVICE_ALT2_MODEL := RT-AC1500UHP
+ DEVICE_ALT3_VENDOR := ASUS
+ DEVICE_ALT3_MODEL := RT-AC57U
+ DEVICE_ALT3_VARIANT := v2
+ DEVICE_ALT4_VENDOR := ASUS
+ DEVICE_ALT4_MODEL := RT-AC58U
+ DEVICE_ALT4_VARIANT := v2
+ DEVICE_ALT5_VENDOR := ASUS
+ DEVICE_ALT5_MODEL := RT-ACRH12
+ IMAGE_SIZE := 16000k
+ DEVICE_PACKAGES += kmod-usb2 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += asus_rt-ac59u
+
+define Device/asus_rt-ac59u-v2
+ $(Device/asus_qcn5502)
+ DEVICE_MODEL := RT-AC59U
+ DEVICE_VARIANT := v2
+ DEVICE_ALT0_VENDOR := ASUS
+ DEVICE_ALT0_MODEL := RT-AC1300G PLUS
+ DEVICE_ALT0_VARIANT := v3
+ DEVICE_ALT1_VENDOR := ASUS
+ DEVICE_ALT1_MODEL := RT-AC57U
+ DEVICE_ALT1_VARIANT := v3
+ DEVICE_ALT2_VENDOR := ASUS
+ DEVICE_ALT2_MODEL := RT-AC58U
+ DEVICE_ALT2_VARIANT := v3
+ IMAGE_SIZE := 32384k
+ DEVICE_PACKAGES += kmod-usb2 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += asus_rt-ac59u-v2
+
+define Device/asus_zenwifi-cd6n
+ $(Device/asus_qcn5502)
+ DEVICE_MODEL := ZenWiFi CD6N
+ IMAGE_SIZE := 16000k
+endef
+TARGET_DEVICES += asus_zenwifi-cd6n
+
+define Device/asus_zenwifi-cd6r
+ $(Device/asus_qcn5502)
+ DEVICE_MODEL := ZenWiFi CD6R
+ IMAGE_SIZE := 32384k
+endef
+TARGET_DEVICES += asus_zenwifi-cd6r
+
define Device/atheros_db120
$(Device/loader-okli-uimage)
SOC := ar9344