Skip to content

Commit 3ebb157

Browse files
map-bhauke
authored andcommitted
mediatek: filogic: gl-mt2500 fix compatibles PHY variants
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]: openwrt/openwrt@8d30e07 [2]: sysupgrade stricter check openwrt/openwrt#20566 (comment) [3]: ASU proposal openwrt/asu#1533 [4]: allow easy sysupgrade proposal openwrt/openwrt#20947 [5]: openwrt/openwrt@b71f466 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: openwrt/openwrt#20566 Fixes: openwrt/asu#1525 Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com> Link: openwrt/openwrt#21842 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 7aa1f7e)
1 parent 82fec21 commit 3ebb157

File tree

7 files changed

+15
-3
lines changed

7 files changed

+15
-3
lines changed

package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ acer,predator-w6|\
5858
acer,predator-w6d|\
5959
acer,vero-w6m|\
6060
glinet,gl-mt2500|\
61+
glinet,gl-mt2500-airoha|\
6162
glinet,gl-mt6000|\
6263
glinet,gl-x3000|\
6364
glinet,gl-xe3000|\

target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set_preinit_iface() {
55
cudy,tr3000-v1|\
66
cudy,tr3000-v1-ubootmod|\
77
glinet,gl-mt2500|\
8+
glinet,gl-mt2500-airoha|\
89
glinet,gl-mt3000|\
910
openembed,som7981|\
1011
wavlink,wl-wn573hx3)

target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v1.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
/dts-v1/;
44
#include "mt7981b-glinet-gl-mt2500.dtsi"
55

6+
/ {
7+
model = "GL.iNet GL-MT2500 (MaxLinear PHY)";
8+
compatible = "glinet,gl-mt2500", "mediatek,mt7981";
9+
};
10+
611
&gmac0 {
712
phy-handle = <&phy5>;
813
};

target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500-v2.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
/dts-v1/;
44
#include "mt7981b-glinet-gl-mt2500.dtsi"
55

6+
/ {
7+
model = "GL.iNet GL-MT2500 (Airoha PHY)";
8+
compatible = "glinet,gl-mt2500-airoha", "mediatek,mt7981";
9+
};
10+
611
&gmac0 {
712
phy-handle = <&phy13>;
813
};

target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#include <dt-bindings/pinctrl/mt65xx.h>
66

77
/ {
8-
model = "GL.iNet GL-MT2500";
9-
compatible = "glinet,gl-mt2500", "mediatek,mt7981";
10-
118
aliases {
129
label-mac-device = &gmac0;
1310
led-boot = &led_sys_white;

target/linux/mediatek/filogic/base-files/etc/board.d/02_network

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ mediatek_setup_interfaces()
129129
cudy,tr3000-v1|\
130130
cudy,tr3000-v1-ubootmod|\
131131
glinet,gl-mt2500|\
132+
glinet,gl-mt2500-airoha|\
132133
glinet,gl-mt3000|\
133134
glinet,gl-x3000|\
134135
glinet,gl-xe3000|\

target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ platform_do_upgrade() {
127127
airpi,ap3000m|\
128128
arcadyan,mozart|\
129129
glinet,gl-mt2500|\
130+
glinet,gl-mt2500-airoha|\
130131
glinet,gl-mt6000|\
131132
glinet,gl-x3000|\
132133
glinet,gl-xe3000|\
@@ -350,6 +351,7 @@ platform_copy_config() {
350351
airpi,ap3000m|\
351352
arcadyan,mozart|\
352353
glinet,gl-mt2500|\
354+
glinet,gl-mt2500-airoha|\
353355
glinet,gl-mt6000|\
354356
glinet,gl-x3000|\
355357
glinet,gl-xe3000|\

0 commit comments

Comments
 (0)