]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: filogic: gl-mt2500 fix compatibles PHY variants 21842/head
authorMario Andrés Pérez <mapb_@outlook.com>
Thu, 5 Feb 2026 00:19:08 +0000 (01:19 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 10 Feb 2026 23:03:05 +0000 (00:03 +0100)
These devices share the same "compatible" in device tree causing some
incompatibilities (sysupgrades, ASU profile identification), assign a
unique "compatible" and "model" to each variant.

Context:
Commit [1] added each variant's dts compatible to the SUPPORTED_DEVICES
field of the other variant to make easy sysupgrades between these
physically indistinguishable devices variants possible.

But there were found three issues which does not allow this:
- the sysupgrade's stricter check still used in some sysupgrade
paths(this check is being replaced(and redundant) with the newer fwtool's
SUPPORTED_DEVICES check using the info in images METADATA), this check
will fail when sysupgrading from a different board_name(compatible dts)
that the image was created for (image profile name).[2]
- ASU needs unique "dts compatible" to identify the devices profile.
- and an ASU's profile identification limitation when several devices from
a common target share SUPPORTED_DEVICES entries.[3]

There is a proposal for these issues but not yet implemented [4][3].

Until these issues are fixed we won't allow "easy" sysupgrades between
these two device variants.

Commit [5] avoided the ASU profile identification limitation but
missed the required two unique dts compatibles in order to make the two
variants fully work, although not allowing easy sysupgrade between them.

[1]: https://github.com/openwrt/openwrt/commit/8d30e07180367cdeb4affd79adead6e1025355c9
[2]: sysupgrade stricter check https://github.com/openwrt/openwrt/issues/20566#issuecomment-3583555482
[3]: ASU proposal https://github.com/openwrt/asu/pull/1533
[4]: allow easy sysupgrade proposal https://github.com/openwrt/openwrt/pull/20947
[5]: https://github.com/openwrt/openwrt/commit/b71f4665cda10c284c9460409ae30fb9b0beecf8
Fixes: b71f466 ("mediatek: filogic: fix supported_devices list for gl-mt2500")
Fixes: 8d30e07 ("mediatek: filogic: fix for new GL.iNet GL-MT2500/GL-MT2500A hardware revision")
Fixes: https://github.com/openwrt/openwrt/issues/20566
Fixes: https://github.com/openwrt/asu/issues/1525
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21842
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts
target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts
target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

index 5972233bae44a5c1868b686624d96436a1b11daa..bf779c8162c3d7cd245ba8465ce5062315d6819a 100644 (file)
@@ -58,6 +58,7 @@ acer,predator-w6|\
 acer,predator-w6d|\
 acer,vero-w6m|\
 glinet,gl-mt2500|\
+glinet,gl-mt2500-airoha|\
 glinet,gl-mt6000|\
 glinet,gl-x3000|\
 glinet,gl-xe3000|\
index 828912ca22923a2e98e7deeff4472670827ffbfd..b43d223da6d2fc05baf9a0e5584abcb55b7e32f5 100644 (file)
@@ -6,6 +6,7 @@ set_preinit_iface() {
        cudy,tr3000-v1|\
        cudy,tr3000-v1-ubootmod|\
        glinet,gl-mt2500|\
+       glinet,gl-mt2500-airoha|\
        glinet,gl-mt3000|\
        openembed,som7981|\
        wavlink,wl-wn573hx3)
index fc7524c5c07e841d9875a3fe0948b873c86226f0..36e83a32d07ff81ea85cc55c3fa48433651e5481 100644 (file)
@@ -3,6 +3,11 @@
 /dts-v1/;
 #include "mt7981b-glinet-gl-mt2500.dtsi"
 
+/ {
+       model = "GL.iNet GL-MT2500 (MaxLinear PHY)";
+       compatible = "glinet,gl-mt2500", "mediatek,mt7981";
+};
+
 &gmac0 {
        phy-handle = <&phy5>;
 };
index 6f6c11427cc6b7bbc4d017528c7f8f7e46a26574..1fb69f13bea04c92493eda0a7fc72a7094d234e5 100644 (file)
@@ -3,6 +3,11 @@
 /dts-v1/;
 #include "mt7981b-glinet-gl-mt2500.dtsi"
 
+/ {
+       model = "GL.iNet GL-MT2500 (Airoha PHY)";
+       compatible = "glinet,gl-mt2500-airoha", "mediatek,mt7981";
+};
+
 &gmac0 {
        phy-handle = <&phy13>;
 };
index 73d254ff10fb75e81f950899edf158e73acbe93b..51e9309cdc27fb9d7ab9d2226871c94e7fdd78c1 100644 (file)
@@ -5,9 +5,6 @@
 #include <dt-bindings/pinctrl/mt65xx.h>
 
 / {
-       model = "GL.iNet GL-MT2500";
-       compatible = "glinet,gl-mt2500", "mediatek,mt7981";
-
        aliases {
                label-mac-device = &gmac0;
                led-boot = &led_sys_white;
index a07b5c136f210d7c311102585875bb754b5dd18d..fa206fafce526008ca3031cb649b32d6511efce8 100644 (file)
@@ -130,6 +130,7 @@ mediatek_setup_interfaces()
        cudy,tr3000-v1|\
        cudy,tr3000-v1-ubootmod|\
        glinet,gl-mt2500|\
+       glinet,gl-mt2500-airoha|\
        glinet,gl-mt3000|\
        glinet,gl-x3000|\
        glinet,gl-xe3000|\
index 01858dbf7cdb0a8cceb80c3d5239fe97924f7e1a..8e7d2bdfe881c1a5bea07c24e514c2a4750068cd 100644 (file)
@@ -128,6 +128,7 @@ platform_do_upgrade() {
        airpi,ap3000m|\
        arcadyan,mozart|\
        glinet,gl-mt2500|\
+       glinet,gl-mt2500-airoha|\
        glinet,gl-mt6000|\
        glinet,gl-x3000|\
        glinet,gl-xe3000|\
@@ -352,6 +353,7 @@ platform_copy_config() {
        airpi,ap3000m|\
        arcadyan,mozart|\
        glinet,gl-mt2500|\
+       glinet,gl-mt2500-airoha|\
        glinet,gl-mt6000|\
        glinet,gl-x3000|\
        glinet,gl-xe3000|\