--- /dev/null
+// 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 "qca956x.dtsi"
+
+/ {
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ aliases {
+ led-boot = &power;
+ led-failsafe = &power;
+ led-running = &power;
+ led-upgrade = &power;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power: power {
+ label = "tp-link:green:power";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wlan2g {
+ label = "tp-link:green:wlan2g";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g {
+ label = "tp-link:green:wlan5g";
+ gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ lan {
+ label = "tp-link:green:lan";
+ gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "tp-link:green:wan";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_fail {
+ label = "tp-link:amber:wan";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ wps {
+ label = "tp-link:green:wps";
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "Reset button";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "WPS button";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&uart {
+ status = "okay";
+};
+
+&gpio {
+ status = "okay";
+};
+
+&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 = "u-boot";
+ reg = <0x000000 0x020000>;
+ read-only;
+ };
+
+ mac: partition@20000 {
+ label = "mac";
+ reg = <0x020000 0x010000>;
+ read-only;
+ };
+
+ partition@30000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x030000 0x7a0000>;
+ };
+
+ partition@7d0000 {
+ label = "tplink";
+ reg = <0x7d0000 0x020000>;
+ read-only;
+ };
+
+ art: partition@7f0000 {
+ label = "art";
+ reg = <0x7f0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ phy-mask = <0>;
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ phy-mode = "sgmii";
+
+ qca,ar8327-initvals = <
+ 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
+ 0x7c 0x0000007e /* PORT0_STATUS */
+ >;
+ };
+};
+
+ð0 {
+ status = "okay";
+
+ phy-mode = "sgmii";
+ mtd-mac-address = <&mac 0x8>;
+ phy-handle = <&phy0>;
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-cal-data = <&art 0x1000>;
+ mtd-mac-address = <&mac 0x8>;
+};
.last_sysupgrade_partition = "file-system",
},
+ /** Firmware layout for the C6v2 */
+ {
+ .id = "ARCHER-C6-V2",
+ .vendor = "",
+ .support_list =
+ "SupportList:\r\n"
+ "{product_name:Archer C6,product_ver:2.0.0,special_id:45550000}\r\n"
+ "{product_name:Archer C6,product_ver:2.0.0,special_id:52550000}\r\n"
+ "{product_name:Archer C6,product_ver:2.0.0,special_id:4A500000}\r\n",
+ .support_trail = '\x00',
+ .soft_ver = "soft_ver:1.0.0\n",
+
+ .partitions = {
+ {"fs-uboot", 0x00000, 0x20000},
+ {"default-mac", 0x20000, 0x00200},
+ {"pin", 0x20200, 0x00100},
+ {"product-info", 0x20300, 0x00200},
+ {"device-id", 0x20500, 0x0fb00},
+ {"firmware", 0x30000, 0x7a9400},
+ {"soft-version", 0x7d9400, 0x00100},
+ {"extra-para", 0x7d9500, 0x00100},
+ {"support-list", 0x7d9600, 0x00200},
+ {"profile", 0x7d9800, 0x03000},
+ {"default-config", 0x7dc800, 0x03000},
+ {"partition-table", 0x7df800, 0x00800},
+ {"user-config", 0x7e0000, 0x0c000},
+ {"certificate", 0x7ec000, 0x04000},
+ {"radio", 0x7f0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "file-system",
+ },
+
+
/** Firmware layout for the C60v1 */
{
.id = "ARCHER-C60-V1",
} else if (strcasecmp(info->id, "ARCHER-A7-V5") == 0 || strcasecmp(info->id, "ARCHER-C7-V4") == 0 || strcasecmp(info->id, "ARCHER-C7-V5") == 0) {
const char mdat[11] = {0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0xca, 0x00, 0x01, 0x00, 0x00};
parts[5] = put_data("extra-para", mdat, 11);
+ } else if (strcasecmp(info->id, "ARCHER-C6-V2") == 0) {
+ const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00};
+ parts[5] = put_data("extra-para", mdat, 11);
}
size_t len;