[openwrt/openwrt] kernel: support RTL8264 in rtl8261n driver

LEDE Commits lede-commits at lists.infradead.org
Wed Jul 9 05:45:18 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d2f9846760b9dd97b35b7c6a0b6c40f1a2439845

commit d2f9846760b9dd97b35b7c6a0b6c40f1a2439845
Author: Andrew LaMarche <andrewjlamarche at gmail.com>
AuthorDate: Mon Jun 9 18:38:03 2025 +0000

    kernel: support RTL8264 in rtl8261n driver
    
    Add support for the RTL8264 (quad-10G phy) by matching the appropriate PHY_ID
    in the driver.
    
    Signed-off-by: Andrew LaMarche <andrewjlamarche at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19081
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../generic/files/drivers/net/phy/rtl8261n/rtk_phy.c    | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c b/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c
index 2818a2736b..23e1d8c4ec 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c
@@ -13,6 +13,7 @@
 
 #define REALTEK_PHY_ID_RTL8261N         0x001CCAF3
 #define REALTEK_PHY_ID_RTL8264B         0x001CC813
+#define REALTEK_PHY_ID_RTL8264          0x001CCAF2
 
 static int rtl826xb_get_features(struct phy_device *phydev)
 {
@@ -66,7 +67,8 @@ static int rtkphy_config_init(struct phy_device *phydev)
     {
         case REALTEK_PHY_ID_RTL8261N:
         case REALTEK_PHY_ID_RTL8264B:
-            phydev_info(phydev, "%s:%u [RTL8261N/RTL826XB] phy_id: 0x%X PHYAD:%d\n", __FUNCTION__, __LINE__, phydev->drv->phy_id, phydev->mdio.addr);
+        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);
 
 
           #if 1 /* toggle reset */
@@ -264,6 +266,18 @@ static struct phy_driver rtk_phy_drivers[] = {
         .aneg_done          = rtkphy_c45_aneg_done,
         .read_status        = rtkphy_c45_read_status,
     },
+    {
+        PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264),
+        .name               = "Realtek RTL8264",
+        .get_features       = rtl826xb_get_features,
+        .config_init        = rtkphy_config_init,
+        .probe              = rtl826xb_probe,
+        .suspend            = rtkphy_c45_suspend,
+        .resume             = rtkphy_c45_resume,
+        .config_aneg        = rtkphy_c45_config_aneg,
+        .aneg_done          = rtkphy_c45_aneg_done,
+        .read_status        = rtkphy_c45_read_status,
+    },
 };
 
 module_phy_driver(rtk_phy_drivers);
@@ -272,6 +286,7 @@ module_phy_driver(rtk_phy_drivers);
 static struct mdio_device_id __maybe_unused rtk_phy_tbl[] = {
     { PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8261N) },
     { PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264B) },
+    { PHY_ID_MATCH_EXACT(REALTEK_PHY_ID_RTL8264) },
     { },
 };
 




More information about the lede-commits mailing list