From 345d78e3098044b792d7d130c7f5e72ca86f5491 Mon Sep 17 00:00:00 2001 From: Jia Wang Date: Mon, 7 Sep 2026 15:46:52 +0800 Subject: [PATCH] net: stmmac: eic7700: Use common RGMII delay handling Describe the EIC7700 inherent TX delay through the common stmmac platform data and let stmmac_pltfr_probe() adjust the PHY interface mode. Keep the existing programmable TX and RX delay configuration in the EIC7700 glue driver. Signed-off-by: Jia Wang Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20260907-dwmac-ultrarisc-v2-3-9a39bf8db313@ultrarisc.com Signed-off-by: Paolo Abeni --- drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c index eab8c13fbdcc..0d654ec07f33 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c @@ -198,18 +198,9 @@ static int eic7700_dwmac_probe(struct platform_device *pdev) /* * The MAC silicon unconditionally adds ~2 ns TX delay; prevent * the PHY from also adding TX delay to avoid doubling it. - * - * DT specifies rgmii-id (TX from MAC silicon, RX from PHY); - * override to rgmii-rxid so the PHY only adds its RX delay. + * The common platform code adjusts the PHY interface accordingly. */ - if (data->has_internal_tx_delay) { - plat_dat->phy_interface = - phy_fix_phy_mode_for_mac_delays(plat_dat->phy_interface, - true, false); - if (plat_dat->phy_interface == PHY_INTERFACE_MODE_NA) - return dev_err_probe(&pdev->dev, -EINVAL, - "phy interface mode is NA\n"); - } + plat_dat->has_internal_tx_delay = data->has_internal_tx_delay; /* Read rx-internal-delay-ps and update rx_clk delay */ if (!of_property_read_u32(pdev->dev.of_node,