--- /dev/null
+// 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";
+ };
+ };
+};
+
+ðphy0 {
+ /delete-property/ interrupts;
+};
+
+&gmac0 {
+ nvmem-cells = <&macaddr_factory_e000 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ status = "okay";
+ label = "wan";
+ phy-handle = <ðphy0>;
+ 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";
+ };
+ };
+};
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)