[][Add dts files for Panther RFBs with 2.5G WAN port]

[Description]
Add dts files for Panther RFBs with 2.5G WAN port, and keep other RFBs
using switch port4 as WAN port.

[Release-log]
N/A

Change-Id: Ie9703fbbead0e08b148b634b026b17ef4995e850
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4688543
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-nor-rfb.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-nor-rfb.dts
new file mode 100644
index 0000000..77c1d73
--- /dev/null
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-nor-rfb.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+#include "mt7986a-rfb.dtsi"
+/ {
+	model = "MediaTek MT7986a RFB";
+	compatible = "mediatek,mt7986a-2500wan-nor-rfb";
+};
+
+&wbsys {
+	mediatek,mtd-eeprom = <&factory 0x0000>;
+	status = "okay";
+};
+
+&mdio {
+	switch@0 {
+		ports {
+			port@4 {
+				reg = <4>;
+				label = "lan4";
+			};
+
+			port@5 {
+				reg = <5>;
+				label = "lan5";
+				phy-mode = "2500base-x";
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+	};
+};
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-snand-rfb.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-snand-rfb.dts
new file mode 100644
index 0000000..22cf909
--- /dev/null
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-2500wan-snand-rfb.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+#include "mt7986a-rfb.dtsi"
+/ {
+	model = "MediaTek MT7986a RFB";
+	compatible = "mediatek,mt7986a-2500wan-snand-rfb";
+};
+
+&wbsys {
+	mediatek,mtd-eeprom = <&factory 0x0000>;
+	status = "okay";
+};
+
+&mdio {
+	switch@0 {
+		ports {
+			port@4 {
+				reg = <4>;
+				label = "lan4";
+			};
+
+			port@5 {
+				reg = <5>;
+				label = "lan5";
+				phy-mode = "2500base-x";
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+	};
+};
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index 6194b2e..8fb5cd2 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -184,23 +184,6 @@
                                         label = "lan3";
                                 };
 
-                                port@4 {
-                                        reg = <4>;
-                                        label = "lan4";
-                                };
-
-                                port@5 {
-                                        reg = <5>;
-                                        label = "lan5";
-                                        phy-mode = "2500base-x";
-
-                                        fixed-link {
-                                                speed = <2500>;
-                                                full-duplex;
-                                                pause;
-                                        };
-                                };
-
                                 port@6 {
                                         reg = <6>;
                                         label = "cpu";
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-nor-rfb.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-nor-rfb.dts
new file mode 100644
index 0000000..184d214
--- /dev/null
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-nor-rfb.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+#include "mt7986b-rfb.dtsi"
+/ {
+	model = "MediaTek MT7986b RFB";
+	compatible = "mediatek,mt7986b-nor-rfb";
+};
+
+&wbsys {
+	mediatek,mtd-eeprom = <&factory 0x0000>;
+	status = "okay";
+};
+
+&mdio {
+	switch@0 {
+		ports {
+			port@4 {
+				reg = <4>;
+				label = "lan4";
+			};
+
+			port@5 {
+				reg = <5>;
+				label = "lan5";
+				phy-mode = "2500base-x";
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+	};
+};
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-snand-rfb.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-snand-rfb.dts
new file mode 100644
index 0000000..475316d
--- /dev/null
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-2500wan-snand-rfb.dts
@@ -0,0 +1,34 @@
+/dts-v1/;
+#include "mt7986b-rfb.dtsi"
+/ {
+	model = "MediaTek MT7986b RFB";
+	compatible = "mediatek,mt7986b-snand-rfb";
+};
+
+&wbsys {
+	mediatek,mtd-eeprom = <&factory 0x0000>;
+	status = "okay";
+};
+
+&mdio {
+	switch@0 {
+		ports {
+			port@4 {
+				reg = <4>;
+				label = "lan4";
+			};
+
+			port@5 {
+				reg = <5>;
+				label = "lan5";
+				phy-mode = "2500base-x";
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+	};
+};
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
index 33afd5c..4c43506 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
@@ -139,23 +139,6 @@
                                         label = "lan3";
                                 };
 
-                                port@4 {
-                                        reg = <4>;
-                                        label = "lan4";
-                                };
-
-                                port@5 {
-                                        reg = <5>;
-                                        label = "lan5";
-                                        phy-mode = "2500base-x";
-
-                                        fixed-link {
-                                                speed = <2500>;
-                                                full-duplex;
-                                                pause;
-                                        };
-                                };
-
                                 port@6 {
                                         reg = <6>;
                                         label = "cpu";
diff --git a/target/linux/mediatek/image/mt7986.mk b/target/linux/mediatek/image/mt7986.mk
index e1617be..36ea2eb 100644
--- a/target/linux/mediatek/image/mt7986.mk
+++ b/target/linux/mediatek/image/mt7986.mk
@@ -25,6 +25,31 @@
 endef
 TARGET_DEVICES += mt7986a-ax6000-snand-rfb
 
+define Device/mt7986a-ax6000-2500wan-nor-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986a-ax6000-2500wan-nor-rfb
+  DEVICE_DTS := mt7986a-2500wan-nor-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+endef
+TARGET_DEVICES += mt7986a-ax6000-2500wan-nor-rfb
+
+define Device/mt7986a-ax6000-2500wan-snand-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986a-ax6000-2500wan-snand-rfb (SPI-NAND,UBI)
+  DEVICE_DTS := mt7986a-2500wan-snand-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+  SUPPORTED_DEVICES := mediatek,mt7986a-2500wan-snand-rfb
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += mt7986a-ax6000-2500wan-snand-rfb
+
 define Device/mt7986a-ax7800-nor-rfb
   DEVICE_VENDOR := MediaTek
   DEVICE_MODEL := mt7986a-ax7800-nor-rfb
@@ -50,6 +75,31 @@
 endef
 TARGET_DEVICES += mt7986a-ax7800-snand-rfb
 
+define Device/mt7986a-ax7800-2500wan-nor-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986a-ax7800-2500wan-nor-rfb
+  DEVICE_DTS := mt7986a-2500wan-nor-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+endef
+TARGET_DEVICES += mt7986a-ax7800-2500wan-nor-rfb
+
+define Device/mt7986a-ax7800-2500wan-snand-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986a-ax7800-2500wan-snand-rfb (SPI-NAND,UBI)
+  DEVICE_DTS := mt7986a-2500wan-snand-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+  SUPPORTED_DEVICES := mediatek,mt7986a-2500wan-snand-rfb
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += mt7986a-ax7800-2500wan-snand-rfb
+
 define Device/mt7986b-ax6000-nor-rfb
   DEVICE_VENDOR := MediaTek
   DEVICE_MODEL := mt7986b-ax6000-nor-rfb
@@ -75,6 +125,31 @@
 endef
 TARGET_DEVICES += mt7986b-ax6000-snand-rfb
 
+define Device/mt7986b-ax6000-2500wan-nor-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986b-ax6000-2500wan-nor-rfb
+  DEVICE_DTS := mt7986b-2500wan-nor-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+endef
+TARGET_DEVICES += mt7986b-ax6000-2500wan-nor-rfb
+
+define Device/mt7986b-ax6000-2500wan-snand-rfb
+  DEVICE_VENDOR := MediaTek
+  DEVICE_MODEL := mt7986b-ax6000-2500wan-snand-rfb (SPI-NAND,UBI)
+  DEVICE_DTS := mt7986b-2500wan-snand-rfb
+  DEVICE_DTS_DIR := $(DTS_DIR)/mediatek
+  SUPPORTED_DEVICES := mediatek,mt7986b-2500wan-snand-rfb
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += mt7986b-ax6000-2500wan-snand-rfb
+
 define Device/mt7986b-mt7976-ax6000-rfb4-snand
   DEVICE_VENDOR := MediaTek
   DEVICE_MODEL := mt7986b-mt7976-ax6000-rfb4-snand (SPI-NAND,UBI)