]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: add support for Comfast CF-EW84 24112/head
authorVincenzo Suraci <vincenzo.suraci@gmail.com>
Mon, 6 Jul 2026 09:43:05 +0000 (11:43 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Jul 2026 11:09:05 +0000 (13:09 +0200)
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>
package/boot/uboot-tools/uboot-envtools/files/ramips
target/linux/ramips/dts/mt7621_comfast_cf-ew84.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/02_network

index 05bf9ba60ed3d2bbdb5e562b39c4f2fdeeb8438a..109c0b6a65b5f1060b1f79ae3bb923c630c76624 100644 (file)
@@ -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 (file)
index 0000000..243f12a
--- /dev/null
@@ -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";
+               };
+       };
+};
index 96653683de6393a8fb034b2ee067bdc132c9a7a9..75b7c3ce36a58f4b26b4995f0b0521f060a75262 100644 (file)
@@ -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)
index cf0515b0d3acf9a4f11d47fb989b3f351c63436b..5d267458728b9f16db47446a592b95fe63ececff 100644 (file)
@@ -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|\