[openwrt/openwrt] realtek: phy: cleanup RTL8214C configuration
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 27 15:28:51 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3c024c00ce8d2f8074aa6daf1bf110a3ddf06515
commit 3c024c00ce8d2f8074aa6daf1bf110a3ddf06515
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Jan 26 14:11:09 2026 +0100
realtek: phy: cleanup RTL8214C configuration
RTL8214C configuration is currently useless.
- It uses register 29 (write only companion of ext. page register 30)
- "configuration" only reads registers 2/3 and writes a message
- "configuration" is run during probing
Drop the useless coding. As this was the last consumer drop register
29 define too.
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21716
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../files-6.12/drivers/net/phy/rtl83xx-phy.c | 25 +---------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 5d77bd15d6..171d6be3da 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -38,9 +38,6 @@ extern struct rtl83xx_soc_info soc_info;
*/
#define RTL838X_PAGE_RAW 0x0fff
-/* internal RTL821X PHY uses register 0x1d to select media page */
-#define RTL821XINT_MEDIA_PAGE_SELECT 0x1d
-/* external RTL821X PHY uses register 0x1e to select media page */
#define RTL821XEXT_MEDIA_PAGE_SELECT 0x1e
#define RTL821X_PHYCR2 0x19
#define RTL821X_PHYCR2_PHY_EEE_ENABLE BIT(5)
@@ -536,25 +533,6 @@ static int rtl8214fc_write_mmd(struct phy_device *phydev, int devnum, u16 regnum
return rtl821x_write_mmd(phydev, devnum, regnum, val);
}
-static int rtl8380_configure_rtl8214c(struct phy_device *phydev)
-{
- u32 phy_id, val;
- int mac = phydev->mdio.addr;
-
- val = phy_read(phydev, 2);
- phy_id = val << 16;
- val = phy_read(phydev, 3);
- phy_id |= val;
- pr_debug("Phy on MAC %d: %x\n", mac, phy_id);
-
- phydev_info(phydev, "Detected external RTL8214C\n");
-
- /* GPHY auto conf */
- phy_write_paged(phydev, RTL821X_PAGE_GPHY, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
-
- return 0;
-}
-
static int rtl8214fc_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
{
__ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, };
@@ -588,8 +566,7 @@ static const struct sfp_upstream_ops rtl8214fc_sfp_ops = {
static int rtl8214c_phy_probe(struct phy_device *phydev)
{
- if (rtl821x_package_join(phydev, 4) == RTL821X_JOIN_LAST)
- return rtl8380_configure_rtl8214c(get_base_phy(phydev));
+ rtl821x_package_join(phydev, 4);
return 0;
}
More information about the lede-commits
mailing list