]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: rtl8261n: always configure as USXGMII
authorSven Eckelmann <sven@narfation.org>
Fri, 24 Apr 2026 06:50:21 +0000 (08:50 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 25 Apr 2026 17:56:08 +0000 (19:56 +0200)
In the past, all the configuration of SerDes and PHYs on the realtek
switches were done  using u-boot (`rtk init`). But since RTL930x switched
to SerDes configuration under Linux, the SoC side is no longer using the
Realtek-proprietary variant of USXGMII. The communication to the RTL8261N
PHYs on those switches broke because of this incompatibility.

Enabling the full initialization on `CONFIG_MACH_REALTEK_RTL` converts also
the PHY side to the standard USXGMII and therefore ensures that both sides
speak the same dialect.

Co-authored-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23076
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c

index 8c142afee6087ae8b759cae1459702823b3edf71..7307bd30adcd9964a29fe77217c96aafe168b350 100644 (file)
@@ -78,9 +78,6 @@ static int rtkphy_config_init(struct phy_device *phydev)
         case REALTEK_PHY_ID_RTL8264B:
         case REALTEK_PHY_ID_RTL8264:
             phydev_info(phydev, "%s:%u [RTL8261N/RTL8264/RTL826XB] phy_id: 0x%X PHYAD:%d\n", __FUNCTION__, __LINE__, phydev->drv->phy_id, phydev->mdio.addr);
-#ifdef CONFIG_MACH_REALTEK_RTL
-            return 0;
-#endif
 
           #if 1 /* toggle reset */
             phy_modify_mmd_changed(phydev, 30, 0x145, BIT(0)  , 1);