summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincenzo Suraci2026-07-06 09:43:05 +0000
committerHauke Mehrtens2026-07-19 11:09:05 +0000
commitbacda03b76aa831b035a08571559e3590112196d (patch)
treed3dd161bcb39387ab9c3fccf259f426451ce4900
parentb10eb807c84d2c1b0278cbad1f8068756684204e (diff)
downloadopenwrt-main.tar.gz
ramips: add support for Comfast CF-EW84HEADmastermain
Add support for the Comfast CF-EW84 based on the MediaTek MT7621 SoC. Hardware: CPU/SoC: MediaTek MT7621DA RAM: 128 MB DDR3 Flash: Macronix MX25L12805D 16 MB Switch: MediaTek MT7530 WiFi 2.4 GHz: MediaTek MT7603E WiFi 5 GHz: MediaTek MT7613B Ports: 1x WAN, 2x LAN (10/100/1000 Mbps) LEDs: Power, WAN, LAN1, LAN2, WLAN Buttons: Reset UART: through-hole on PCB pinout: RX, TX, GND, 3.3V settings: 115200n8 Flash instructions: 1. Connect the bundled PoE injector to power. 2. Connect the PC to the LAN1 or LAN2 port of the device. 3. Configure a static IP on the computer's Ethernet adapter: IP: 192.168.1.x (x = 2 to 254) Mask: 255.255.255.0 Gateway: empty DNS: empty 4. Connect a second Ethernet cable to the PoE port of the bundled injector. 5. Press and hold the reset button on the device. 6. While holding the reset button, plug the other end of the second Ethernet cable into the WAN port. 7. Wait at least 3 seconds, then release the reset button. 8. Browse to http://192.168.1.1: the MediaTek U-Boot System Recovery page should appear. 9. Click Upload and select the *-sysupgrade.bin firmware file. 10. After flashing completes, browse to http://192.168.1.1 again: the LuCI login page should appear. Factory data: 2.4 GHz EEPROM: factory offset 0x0000 5 GHz EEPROM: factory offset 0x8000 LAN MAC address: factory offset 0xe000 WAN MAC address: factory offset 0xe000 (+1) LED layout: The Comfast CF-EW84 has five physical LEDs, but only the WLAN LED is software-controllable through the Linux GPIO-LEDs subsystem. Signed-off-by: Vincenzo Suraci <vincenzo.suraci@gmail.com> Link: https://github.com/openwrt/openwrt/pull/24112 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/boot/uboot-tools/uboot-envtools/files/ramips1
-rw-r--r--target/linux/ramips/dts/mt7621_comfast_cf-ew84.dts163
-rw-r--r--target/linux/ramips/image/mt7621.mk12
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/board.d/02_network1
4 files changed, 177 insertions, 0 deletions
diff --git a/package/boot/uboot-tools/uboot-envtools/files/ramips b/package/boot/uboot-tools/uboot-envtools/files/ramips
index 05bf9ba60e..109c0b6a65 100644
--- a/package/boot/uboot-tools/uboot-envtools/files/ramips
+++ b/package/boot/uboot-tools/uboot-envtools/files/ramips
@@ -32,6 +32,7 @@ allnet,all0256n-4m|\
allnet,all0256n-8m|\
allnet,all5002|\
asiarf,ap7621-004-v3|\
+comfast,cf-ew84|\
plasmacloud,pax1800-lite|\
yuncore,ax820)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-ew84.dts b/target/linux/ramips/dts/mt7621_comfast_cf-ew84.dts
new file mode 100644
index 0000000000..243f12a8b4
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_comfast_cf-ew84.dts
@@ -0,0 +1,163 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "comfast,cf-ew84", "mediatek,mt7621-soc";
+ model = "COMFAST CF-EW84";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ aliases {
+ label-mac-device = &gmac0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_WLAN;
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "network";
+ };
+ };
+};
+
+&ethphy0 {
+ /delete-property/ interrupts;
+};
+
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_e000 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ status = "okay";
+ label = "wan";
+ phy-handle = <&ethphy0>;
+ nvmem-cells = <&macaddr_factory_e000 1>;
+ nvmem-cell-names = "mac-address";
+};
+
+&pcie {
+ status = "okay";
+};
+
+// pcie0 → mt7603e (2.4GHz)
+&pcie0 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <2400000 2500000>;
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom";
+ };
+};
+
+// pcie1 → mt7663 (5GHz)
+&pcie1 {
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ ieee80211-freq-limit = <5000000 6000000>;
+ nvmem-cells = <&eeprom_factory_8000>;
+ nvmem-cell-names = "eeprom";
+ };
+};
+
+&pinctrl {
+ pinctrl0 {
+ gpio {
+ groups = "i2c", "uart2", "uart3", "sdhci", "jtag";
+ function = "gpio";
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0x000000 0x030000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "Config";
+ reg = <0x030000 0x010000>;
+ };
+
+ partition@40000 {
+ label = "factory";
+ reg = <0x040000 0x010000>;
+ read-only;
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x400>;
+ };
+
+ eeprom_factory_8000: eeprom@8000 {
+ reg = <0x8000 0x4da8>;
+ };
+
+ macaddr_factory_e000: macaddr@e000 {
+ compatible = "mac-base";
+ reg = <0xe000 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x050000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&switch0 {
+ ports {
+ port@1 {
+ status = "okay";
+ };
+
+ port@2 {
+ status = "okay";
+ };
+ };
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 96653683de..75b7c3ce36 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -735,6 +735,18 @@ define Device/comfast_cf-ew72-v2
endef
TARGET_DEVICES += comfast_cf-ew72-v2
+define Device/comfast_cf-ew84
+ $(Device/dsa-migration)
+ $(Device/uimage-lzma-loader)
+ IMAGE_SIZE := 16064k
+ DEVICE_VENDOR := COMFAST
+ DEVICE_MODEL := CF-EW84
+ DEVICE_ALT0_VENDOR := NEWFAST
+ DEVICE_ALT0_MODEL := NF-A882
+ DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap kmod-ledtrig-network
+endef
+TARGET_DEVICES += comfast_cf-ew84
+
define Device/confiabits_mt7621-v1
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index cf0515b0d3..5d26745872 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -99,6 +99,7 @@ ramips_setup_interfaces()
asiarf,ap7621-nv1|\
beeline,smartbox-flash|\
beeline,smartbox-giga|\
+ comfast,cf-ew84|\
elecom,wmc-x1800gst|\
elecom,wrc-x1800gs|\
gemtek,wvrtm-127acn|\