* [PATCH net-next v4] net: phy: motorcomm: enable the reference clock for YT8521
@ 2026-07-31 1:38 Jiaxing Hu
2026-08-04 0:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiaxing Hu @ 2026-07-31 1:38 UTC (permalink / raw)
To: Frank.Sae, andrew, hkallweit1, linux, davem, edumazet, kuba,
pabeni
Cc: netdev, linux-kernel, maxime.chevallier, heiko, linux-rockchip,
attinagaoxu, alchark
Commit 42310a24389c ("net: phy: motorcomm: Enable optional clock for
YT8531") enables the SoC-provided reference clock for the YT8531 in its
probe. The YT8521 has the same need on crystal-less boards but goes
through yt8521_probe(), so enable it there too. The clock is optional,
so crystal-clocked boards are unaffected.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Gavin Gao <attinagaoxu@gmail.com>
Signed-off-by: Jiaxing Hu <gahing@gahingwoo.com>
---
Changes in v4:
- Rebased on net-next/main (Jakub Kicinski). The YT8531 clock enable
landed meanwhile as 42310a24389c, so v4 now only adds the YT8521 path;
the include and the yt8531 change are already upstream. No helper, per
Andrew's and Alexey's preference on v3.
v1..v3 history:
- v1 https://lore.kernel.org/all/20260719034555.3623003-1-gahing@gahingwoo.com/ (YT8531; superseded upstream by 42310a24389c)
- v2 https://lore.kernel.org/all/20260727205602.1188008-1-gahing@gahingwoo.com/ (added YT8521 via a helper)
- v3 https://lore.kernel.org/all/20260728055659.1211459-1-gahing@gahingwoo.com/ (open-coded)
Tested by Gavin Gao on a PicoCOM RK3576 board with a YT8521.
drivers/net/phy/motorcomm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
index 3396a38..c5a2cda 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1065,6 +1065,7 @@ static int yt8521_probe(struct phy_device *phydev)
{
struct device *dev = &phydev->mdio.dev;
struct yt8521_priv *priv;
+ struct clk *clk;
int chip_config;
u16 mask, val;
u32 freq;
@@ -1076,6 +1077,11 @@ static int yt8521_probe(struct phy_device *phydev)
phydev->priv = priv;
+ clk = devm_clk_get_optional_enabled(dev, NULL);
+ if (IS_ERR(clk))
+ return dev_err_probe(dev, PTR_ERR(clk),
+ "failed to get and enable PHY clock\n");
+
chip_config = ytphy_read_ext_with_lock(phydev, YT8521_CHIP_CONFIG_REG);
if (chip_config < 0)
return chip_config;
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v4] net: phy: motorcomm: enable the reference clock for YT8521
2026-07-31 1:38 [PATCH net-next v4] net: phy: motorcomm: enable the reference clock for YT8521 Jiaxing Hu
@ 2026-08-04 0:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-04 0:50 UTC (permalink / raw)
To: Jiaxing Hu
Cc: Frank.Sae, andrew, hkallweit1, linux, davem, edumazet, kuba,
pabeni, netdev, linux-kernel, maxime.chevallier, heiko,
linux-rockchip, attinagaoxu, alchark
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 31 Jul 2026 13:38:07 +1200 you wrote:
> Commit 42310a24389c ("net: phy: motorcomm: Enable optional clock for
> YT8531") enables the SoC-provided reference clock for the YT8531 in its
> probe. The YT8521 has the same need on crystal-less boards but goes
> through yt8521_probe(), so enable it there too. The clock is optional,
> so crystal-clocked boards are unaffected.
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Gavin Gao <attinagaoxu@gmail.com>
> Signed-off-by: Jiaxing Hu <gahing@gahingwoo.com>
>
> [...]
Here is the summary with links:
- [net-next,v4] net: phy: motorcomm: enable the reference clock for YT8521
https://git.kernel.org/netdev/net-next/c/dc3b7209b5d3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-04 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 1:38 [PATCH net-next v4] net: phy: motorcomm: enable the reference clock for YT8521 Jiaxing Hu
2026-08-04 0:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox