ath79: add support for D-Link COVR-C1200 A1
authorSebastian Schaper <openwrt@sebastianschaper.net>
Sun, 11 Feb 2024 17:55:43 +0000 (18:55 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 9 Mar 2024 19:00:11 +0000 (20:00 +0100)
The COVR-C1200 devices are sold as "Whole Home Mesh Wi-Fi"
sets in packs of two (COVR-C1202) and three (COVR-C1203).

Specifications:
 * QCA9563, 16 MiB flash, 128 MiB RAM, 2x3:2 802.11n
 * QCA9886 2x2:2 801.11ac Wave 2
 * AR8337, 2 Gigabit ports (1: WAN; 2: LAN)
 * USB Type-C power connector (5V, 3A)

Installation COVR Point A:
 * In factory reset state: OEM Web UI is at 192.168.0.50
   no DHCP, skip wizard by directly accessing:
     http://192.168.0.50/UpdateFirmware_Simple.html
 * After completing setup wizard: Web UI is at 192.168.0.1
     DHCP enabled, login with empty password
 * Flash factory.bin
 * Perform a factory reset to restore OpenWrt UCI defaults

Installation COVR Points B:
 * OEM Web UI is at 192.168.0.50, no DHCP, empty password
 * Flash factory.bin
 * Perform a factory reset to restore OpenWrt UCI defaults

Recovery:
 * Keep reset button pressed during power on
 * Recovery Web UI is at 192.168.0.50, no DHCP
 * Flash factory.bin
   used to work best with Chromium-based browsers or curl:
     curl -F firmware=@factory.bin \
       http://192.168.0.50/upgrade.cgi
   since this fails to work on modern Linux systems,
   there is also a script dlink_recovery_upload.py

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
target/linux/ath79/dts/qca9563_dlink_covr-c1200-a1.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/qca9563_dlink_covr-c1200-a1.dts b/target/linux/ath79/dts/qca9563_dlink_covr-c1200-a1.dts
new file mode 100644 (file)
index 0000000..b4f0bb3
--- /dev/null
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9563_dlink_covr.dtsi"
+
+/ {
+       compatible = "dlink,covr-c1200-a1", "qca,qca9563";
+       model = "D-Link COVR-C1200 A1";
+
+       aliases {
+               led-boot = &led_power_orange;
+               led-failsafe = &led_power_red;
+               led-running = &led_power_white;
+               led-upgrade = &led_power_red;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&jtag_disable_pins>;
+
+               led_power_red: power_red {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_RED>;
+                       gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+               };
+
+               led_power_white: power_white {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_WHITE>;
+                       gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+               };
+
+               led_power_orange: power_orange {
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_ORANGE>;
+                       gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+};
index 4e08860cfadcaffcf1c85136fa81fd090d035581..6c1cb8623554bf2588fd95d297bf740f1d0ad2d3 100644 (file)
@@ -292,6 +292,10 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:wan" "3:lan" "4:lan"
                ;;
+       dlink,covr-c1200-a1)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:wan" "2:lan"
+               ;;
        dlink,covr-p2500-a1)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan" "3:wan" "4:plc"
@@ -644,6 +648,11 @@ ath79_setup_macs()
        devolo,magic-2-wifi)
                label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
                ;;
+       dlink,covr-c1200-a1)
+               lan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
+               wan_mac=$(mtd_get_mac_ascii art "protest_wan_mac")
+               label_mac=$lan_mac
+               ;;
        dlink,covr-p2500-a1)
                lan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
                wan_mac=$(mtd_get_mac_ascii art "protest_lan_mac")
index 9574d8a17d90b5240f51f0879aff8c19ce18a93b..b90e382223ae502edfc2bdffc6500cea438ba3bc 100644 (file)
@@ -17,6 +17,7 @@ case "$board" in
        adtran,bsap1840)
                macaddr_add "$(mtd_get_mac_binary 'Board data' 2)" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
                ;;
+       dlink,covr-c1200-a1|\
        dlink,covr-p2500-a1)
                [ "$PHYNBR" -eq 0 ] && \
                        mtd_get_mac_ascii art "protest_ath1_mac" > /sys${DEVPATH}/macaddress
index d5d8aa55925915f9c7e189c0194f24d9c51ea302..e7960efbaa2de9228cb2aac89669829a2ffa6cd9 100644 (file)
@@ -1021,6 +1021,16 @@ define Device/dlink_covr
        append-loader-okli-uimage $(1) | pad-to 15616k
 endef
 
+define Device/dlink_covr-c1200-a1
+  $(Device/dlink_covr)
+  DEVICE_MODEL := COVR-C1200
+  DEVICE_VARIANT := A1
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(IMAGE/recovery.bin) | \
+       dlink-sge-signature COVR-C1200 | dlink-sge-image COVR-C1200
+endef
+TARGET_DEVICES += dlink_covr-c1200-a1
+
 define Device/dlink_covr-p2500-a1
   $(Device/dlink_covr)
   DEVICE_MODEL := COVR-P2500