[openwrt/openwrt] ath79: add support for D-Link COVR-C1200 A1
LEDE Commits
lede-commits at lists.infradead.org
Sat Mar 9 11:35:24 PST 2024
chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ee69f81ca5032f13e39ce7c2515ae9c5ee0a78f1
commit ee69f81ca5032f13e39ce7c2515ae9c5ee0a78f1
Author: Sebastian Schaper <openwrt at sebastianschaper.net>
AuthorDate: Sun Feb 11 18:55:43 2024 +0100
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 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 at sebastianschaper.net>
---
.../ath79/dts/qca9563_dlink_covr-c1200-a1.dts | 40 ++++++++++++++++++++++
.../generic/base-files/etc/board.d/02_network | 9 +++++
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 1 +
target/linux/ath79/image/generic.mk | 10 ++++++
4 files changed, 60 insertions(+)
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
index 0000000000..b4f0bb3b64
--- /dev/null
+++ b/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";
+ };
+ };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 4e08860cfa..6c1cb86235 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -292,6 +292,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0 at eth0" "2:wan" "3:lan" "4:lan"
;;
+ dlink,covr-c1200-a1)
+ ucidef_add_switch "switch0" \
+ "0 at eth0" "1:wan" "2:lan"
+ ;;
dlink,covr-p2500-a1)
ucidef_add_switch "switch0" \
"0 at 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")
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 9574d8a17d..b90e382223 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/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
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index d5d8aa5592..e7960efbaa 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/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
More information about the lede-commits
mailing list