Re: [RFC PATCH 3/6] net: stmmac: dwmac-meson8b: add support for the Amlogic T7

From: Maxime Chevallier

Date: Sun Oct 04 2026 - 17:13:51 EST


Hi Lucas,

On 10/4/26 16:40, Lucas Tanure wrote:
> The glue registers on the T7 are laid out exactly as the G12A ones, RX
> delay field included, so the T7 can reuse the G12A settings.
>
> What the T7 does not share is how the controller reaches DRAM: the bus
> path goes through a pipeline stage with a gate of its own, and no device
> other than the controller has any use for that gate. Claim it and hold
> it enabled for as long as the controller is bound, otherwise it is
> switched off as unused and a transfer that has been started can never
> complete.
>
> Give the T7 match data of its own so that only it looks the clock up,
> and require the clock instead of treating it as optional: the controller
> cannot do DMA without it, and failing the probe with a clear message
> beats booting and hitting an undiagnosable hang later.
>
> Assisted-by: LLM
> Signed-off-by: Lucas Tanure <tanure@xxxxxxxxx>
> ---

[...]

>
> +static const struct meson8b_dwmac_data meson_t7_dwmac_data = {
> + .set_phy_mode = meson_axg_set_phy_mode,
> + .has_prg_eth1_rgmii_rx_delay = true,

Hmpf sorry this falls onto your series, but looking at the code it seems
that this glue has the RGMII handling backwards...

In meson8b_init_rgmii_delays :

switch (dwmac->phy_mode) {
case PHY_INTERFACE_MODE_RGMII:
delay_config = tx_dly_config | rx_adj_config;
break;
case PHY_INTERFACE_MODE_RGMII_RXID:
delay_config = tx_dly_config;
cfg_rxclk_dly = 0;
break;
case PHY_INTERFACE_MODE_RGMII_TXID:
delay_config = rx_adj_config;
break;
case PHY_INTERFACE_MODE_RGMII_ID:
case PHY_INTERFACE_MODE_RMII:
delay_config = 0;
cfg_rxclk_dly = 0;

This is the behaviour one would expect from a PHY perspective.

And indeed, 66 amlogic dts have "phy-mode = rgmii".

grep "phy-mode = \"rgmii\"" $(find arch/ | grep amlogic) | wc -l
66

I really think all these 66 "rgmii" instance should have been "rgmii-id"...

It's probably too late to change that though :(

Maxime