Browse Source

ath79: add support for D-Link COVR-C1200 A1

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 [email protected] \
       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 <[email protected]>
Sebastian Schaper 1 year ago
parent
commit
ee69f81ca5

+ 40 - 0
target/linux/ath79/dts/qca9563_dlink_covr-c1200-a1.dts

@@ -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";
+		};
+	};
+};

+ 9 - 0
target/linux/ath79/generic/base-files/etc/board.d/02_network

@@ -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")

+ 1 - 0
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

@@ -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

+ 10 - 0
target/linux/ath79/image/generic.mk

@@ -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