summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Stockhausen2026-01-26 13:11:09 +0000
committerHauke Mehrtens2026-01-27 23:28:15 +0000
commit3c024c00ce8d2f8074aa6daf1bf110a3ddf06515 (patch)
tree540246639332483ea77110e791cb75d3976362a4
parent1d0e2859c5c7cd01c1092019b89dd0f56bf3dda8 (diff)
downloadopenwrt-3c024c00ce8d2f8074aa6daf1bf110a3ddf06515.tar.gz
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@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21716 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c25
1 files changed, 1 insertions, 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;
}