Re: [PATCH v4 4/7] net: stmmac: dwmac-meson8b: follow the generic RGMII delay rules on the T7

From: Lucas Tanure

Date: Tue Nov 03 2026 - 12:04:55 EST


On Mon, Nov 2, 2026 at 1:25 AM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > +/*
> > + * Delay handling of the SoCs up to the G12A. It reads phy-mode as the
> > + * list of delays this glue has to add, falls back to a 2ns TX delay and
> > + * takes the vendor delay properties, all of which ethernet-controller.yaml
> > + * rules out. The boards in the tree depend on it, so it stays, but a new
> > + * SoC must not use it.
> > + */
> > static int meson8b_init_rgmii_delays(struct meson8b_dwmac *dwmac)
> > {
> > u32 tx_dly_config, rx_adj_config, cfg_rxclk_dly, delay_config;
> > + struct device_node *np = dwmac->dev->of_node;
> > + u32 tx_delay_ns, rx_delay_ps = 0;
> > int ret;
>
> Does this code need to change?
>
> It would be better if you did not need to change the old code, so you
> don't need to worry about breaking other SoCs. Just don't call it for
> the T7, use you new function in its place.

OK. In v5 the old code is untouched: the parsing stays in probe and
meson8b_init_rgmii_delays() is as it was. The T7 gets a callback of
its own, and the only change to probe is calling the callback instead
of the function directly. The T7 keeps has_prg_eth1_rgmii_rx_delay,
so the existing probe code already validates its RX value.

>
> Andrew