From bd98cb0312ffcbef4c07e31d12e62b7225553599 Mon Sep 17 00:00:00 2001 From: Lynn-Becky <60915579+Lynn-Becky@users.noreply.github.com> Date: Sun, 28 Jun 2026 00:37:40 +0800 Subject: [PATCH 1/2] fix(machine): SWTG024AS V2.0 fix 5th RJ45 port --- rtl837x_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rtl837x_init.c b/rtl837x_init.c index 50d94f6..e665688 100644 --- a/rtl837x_init.c +++ b/rtl837x_init.c @@ -76,6 +76,16 @@ void static sds_init(void) sds_read(0, 0, 0); pval = SFR_DATA_U16; sds_write_v(0, 0, 0, pval | 0x200); +#if defined MACHINE_SWTG024AS_V2_0 + // OEM firmware also sets the companion SDS0 polarity bits. + sds_read(0, 0, 0); + pval = SFR_DATA_U16; + sds_write_v(0, 0, 0, pval | 0x100); + + sds_read(0, 6, 2); + pval = SFR_DATA_U16; + sds_write_v(0, 6, 2, pval | 0x4000); +#endif } } else if (machine.n_10g == 1) { reg_read_m(RTL837X_CFG_PHY_MDI_REVERSE); From 17d41b53b708daae2e98545723d52065b2b4650f Mon Sep 17 00:00:00 2001 From: Lynn-Becky <60915579+Lynn-Becky@users.noreply.github.com> Date: Sun, 28 Jun 2026 00:56:50 +0800 Subject: [PATCH 2/2] update doc --- doc/devices/SWTG024AS-V2.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/devices/SWTG024AS-V2.0.md b/doc/devices/SWTG024AS-V2.0.md index 91b4ffc..c787428 100644 --- a/doc/devices/SWTG024AS-V2.0.md +++ b/doc/devices/SWTG024AS-V2.0.md @@ -17,8 +17,7 @@ ### What works The device is fully supported: -- Port 1-4 2.5GBASE-T RJ45 ports work at 10/100/1000/2500 Mbps -- Port 5 2.5GBASE-T RJ45 ports through RTL8221B not work (Wait to fix) +- ALL 2.5GBASE-T RJ45 ports work at 10/100/1000/2500 Mbps - The SFP+ port supports 1G, 2.5G and 10G modules - LEDs work with the same indiciations as the OEM firmware - Online update does not work with 512KiB flash.