Re: [PATCH net-next v2 2/2] net: stmmac: dwmac-rk: enable the reference clock for output mode
From: Maxime Chevallier
Date: Fri Jul 17 2026 - 05:48:58 EST
Hi,
On 7/17/26 08:59, Jiaxing Hu wrote:
> rk_gmac_clk_init() only requests the refout clock group for RMII. The
> ArmSoM CM5 has an on-module YT8531 RGMII PHY with no crystal that needs
> the SoC 25 MHz reference (clk_mac_refout), so in RGMII the clock was
> never enabled and the PHY did not respond on MDIO.
>
> Request the group whenever the SoC drives the clock (clock_in_out =
> "output"), not just for RMII. The clocks are optional, so other boards
> are unaffected.
You've taken my review into account (thanks :) ), but you're failing to
address Andrew's comment.
The PHY should be the one requesting the MAC to output the refclk, in
that case the MAC will act as a clock provider, something like this :
https://elixir.bootlin.com/linux/v7.1.3/source/drivers/net/phy/air_en8811h.c#L1156
The PHY then requests the clock (probably an optional clock).
Maxime