[PATCH net-next v2 2/5] net: stmmac: sophgo: Use common RGMII delay handling
From: Jia Wang
Date: Mon Sep 07 2026 - 03:47:40 EST
Describe the SG2042 internal RX delay through the common stmmac
platform data and let stmmac_pltfr_probe() adjust the PHY interface
mode.
This removes the duplicated mode conversion without changing the
hardware behavior.
Signed-off-by: Jia Wang <wangjia@xxxxxxxxxxxxx>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
index e02ad3762b5f..f62c803665ad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c
@@ -55,14 +55,10 @@ static int sophgo_dwmac_probe(struct platform_device *pdev)
return ret;
data = device_get_match_data(&pdev->dev);
- if (data && data->has_internal_rx_delay) {
- plat_dat->phy_interface = phy_fix_phy_mode_for_mac_delays(plat_dat->phy_interface,
- false, true);
- if (plat_dat->phy_interface == PHY_INTERFACE_MODE_NA)
- return -EINVAL;
- }
-
- return stmmac_dvr_probe(dev, plat_dat, &stmmac_res);
+ if (data)
+ plat_dat->has_internal_rx_delay = data->has_internal_rx_delay;
+
+ return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
}
static const struct sophgo_dwmac_data sg2042_dwmac_data = {
--
2.34.1