Re: [PATCH net-next] net: stmmac: dwmac-rk: only read the delays the MAC applies

From: Maxime Chevallier

Date: Fri Nov 13 2026 - 03:55:13 EST


Hi,

On 11/10/26 08:13, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@xxxxxxxxx>
>
> The tx_delay and rx_delay properties are only used for the directions in
> which the MAC inserts the RGMII clock delay itself: both for "rgmii",
> TX for "rgmii-rxid" and RX for "rgmii-txid". For "rgmii-id" (the PHY
> adds both delays, the recommended setup) and for RMII they are ignored
> by rk_gmac_powerup().
>
> The driver nevertheless parses both properties unconditionally and logs
> an error, plus the default it picks, for each one that is missing. A
> correct device tree using "rgmii-rxid" therefore gets
>
> Can not read property: rx_delay.
> set rx_delay to 0x10
>
> and one using "rgmii-id" gets the same pair for tx_delay as well, for a
> value that is never programmed.
>
> Only parse the delay values that will actually be used, so the error is
> reserved for device trees that really lack a required delay. Behaviour
> for "rgmii", "rgmii-rxid" and "rgmii-txid" is unchanged.
>
> Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>

LGTM, I was worried about breaking compat but the rk_gmac_powerup() only
applies the rx/tx delays based on the ID mode, so

Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>

Maxime