summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Stockhausen2026-02-20 06:55:24 +0000
committerHauke Mehrtens2026-02-20 23:29:07 +0000
commit1ff39f9e986dbe99b2b1232cf0307437b20b41d2 (patch)
treeaa5419aea03cc2e9387dcfe7de896f9ca1b41514
parentb270580deabb40fa7af702d35d32b1f9f80fd007 (diff)
downloadopenwrt-1ff39f9e986dbe99b2b1232cf0307437b20b41d2.tar.gz
realtek: mdio: setup polling for RTL8261
Startup of mdio on a RTL8216 based device currently shows the following warnings. [1.948608] skip polling setup for unknown PHY 001ccaf3 on port 0 [1.968920] skip polling setup for unknown PHY 001ccaf3 on port 8 [1.989171] skip polling setup for unknown PHY 001ccaf3 on port 16 [2.009704] skip polling setup for unknown PHY 001ccaf3 on port 20 [2.030209] skip polling setup for unknown PHY 001ccaf3 on port 24 [2.052270] realtek-otto-serdes-mdio 1b000000.switchcore:mdio-serdes: Realtek SerDes mdio bus initialized, 12 SerDes, 64 pages Add the phy detection to the mdio bus so that polling setup works. While we are here sort the phy ids alphabetically. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/22109 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
index e38f98914e..a0919cca48 100644
--- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
+++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c
@@ -16,12 +16,13 @@
#define RTMDIO_PHY_AQR113C_A 0x31c31c12
#define RTMDIO_PHY_AQR113C_B 0x31c31c13
#define RTMDIO_PHY_AQR813 0x31c31cb2
+#define RTMDIO_PHY_RTL8218D 0x001cc983
+#define RTMDIO_PHY_RTL8218E 0x001cc984
#define RTMDIO_PHY_RTL8221B_VB_CG 0x001cc849
#define RTMDIO_PHY_RTL8221B_VM_CG 0x001cc84a
#define RTMDIO_PHY_RTL8224 0x001ccad0
#define RTMDIO_PHY_RTL8226 0x001cc838
-#define RTMDIO_PHY_RTL8218D 0x001cc983
-#define RTMDIO_PHY_RTL8218E 0x001cc984
+#define RTMDIO_PHY_RTL8261 0x001ccaf3
#define RTMDIO_PHY_MAC_1G 3
#define RTMDIO_PHY_MAC_2G_PLUS 1
@@ -637,6 +638,11 @@ static int rtmdio_get_phy_info(struct mii_bus *bus, int addr, struct rtmdio_phy_
phyinfo->poll_adv_1000 = RTMDIO_PHY_POLL_MMD(31, 0xa412, 9);
phyinfo->poll_lpa_1000 = RTMDIO_PHY_POLL_MMD(31, 0xa414, 11);
break;
+ case RTMDIO_PHY_RTL8261:
+ phyinfo->mac_type = RTMDIO_PHY_MAC_2G_PLUS;
+ phyinfo->has_giga_lite = true;
+ phyinfo->has_res_reg = true;
+ break;
default:
pr_warn("skip polling setup for unknown PHY %08x on port %d\n", phyid, addr);
ret = -EINVAL;