summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Bilker2025-05-14 04:12:53 +0000
committerHauke Mehrtens2025-10-05 16:18:32 +0000
commit10363b5e264d60461b10e9858714609ec5ef35cb (patch)
tree9c10b051151e6b5cdd44920d2ea0eb3a11de9b54
parent3c04d09336e363c2489c15b57b119ee6d1aa4127 (diff)
downloadopenwrt-10363b5e264d60461b10e9858714609ec5ef35cb.tar.gz
mediatek: filogic: fix for new GL.iNet GL-MT2500/GL-MT2500A hardware revision
GL.iNet shipped a hardware change of the WAN PHY going from the MaxLinear GPY211C to the Airoha EN8811H. Signed-off-by: Matthew Bilker <me@mbilker.us> Link: https://github.com/openwrt/openwrt/pull/18799 (cherry picked from commit 8d30e07180367cdeb4affd79adead6e1025355c9) Link: https://github.com/openwrt/openwrt/pull/20307 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts15
-rw-r--r--target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts15
-rw-r--r--target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi (renamed from target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts)6
-rw-r--r--target/linux/mediatek/image/filogic.mk19
4 files changed, 47 insertions, 8 deletions
diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts
new file mode 100644
index 0000000000..fc7524c5c0
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include "mt7981b-glinet-gl-mt2500.dtsi"
+
+&gmac0 {
+ phy-handle = <&phy5>;
+};
+
+&mdio_bus {
+ phy5: ethernet-phy@5 {
+ reg = <5>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ };
+};
diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts
new file mode 100644
index 0000000000..6f6c11427c
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include "mt7981b-glinet-gl-mt2500.dtsi"
+
+&gmac0 {
+ phy-handle = <&phy13>;
+};
+
+&mdio_bus {
+ phy13: ethernet-phy@13 {
+ reg = <13>;
+ compatible = "ethernet-phy-ieee802.3-c45";
+ };
+};
diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
index 0bd3ac0a29..2465216dc5 100644
--- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts
+++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
@@ -108,7 +108,6 @@
reg = <0>;
phy-mode = "2500base-x";
- phy-handle = <&phy5>;
};
gmac1: mac@1 {
@@ -125,11 +124,6 @@
reset-gpios = <&pio 14 GPIO_ACTIVE_LOW>;
reset-delay-us = <600>;
reset-post-delay-us = <20000>;
-
- phy5: ethernet-phy@5 {
- reg = <5>;
- compatible = "ethernet-phy-ieee802.3-c45";
- };
};
&usb_phy {
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 6a18adaa7b..6369586736 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -927,16 +927,31 @@ TARGET_DEVICES += gatonetworks_gdsp
define Device/glinet_gl-mt2500
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-MT2500
- DEVICE_DTS := mt7981b-glinet-gl-mt2500
+ DEVICE_VARIANT := MaxLinear PHY
+ DEVICE_DTS := mt7981b-glinet-gl-mt2500-v1
DEVICE_DTS_DIR := ../dts
DEVICE_DTS_LOADADDR := 0x47000000
DEVICE_PACKAGES := -wpad-basic-mbedtls e2fsprogs f2fsck mkf2fs kmod-usb3
- SUPPORTED_DEVICES += glinet,mt2500-emmc
+ SUPPORTED_DEVICES += glinet,mt2500-emmc glinet,gl-mt2500-airoha
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := sysupgrade-tar | append-gl-metadata
endef
TARGET_DEVICES += glinet_gl-mt2500
+define Device/glinet_gl-mt2500-airoha
+ DEVICE_VENDOR := GL.iNet
+ DEVICE_MODEL := GL-MT2500
+ DEVICE_VARIANT := Airoha PHY
+ DEVICE_DTS := mt7981b-glinet-gl-mt2500-v2
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_DTS_LOADADDR := 0x47000000
+ DEVICE_PACKAGES := -wpad-basic-mbedtls e2fsprogs f2fsck mkf2fs kmod-usb3 kmod-phy-airoha-en8811h airoha-en8811h-firmware
+ SUPPORTED_DEVICES += glinet,mt2500-emmc glinet,gl-mt2500
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-gl-metadata
+endef
+TARGET_DEVICES += glinet_gl-mt2500-airoha
+
define Device/glinet_gl-mt3000
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-MT3000