[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <750971e1-b133-4776-b518-32d66df29949@lunn.ch>
Date: Fri, 7 Nov 2025 14:29:04 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Marek Vasut <marex@...x.de>, Wei Fang <wei.fang@....com>,
Clark Wang <xiaoning.wang@....com>
Subject: Re: [PATCH v2 net-next 4/6] net: phy: realtek: allow CLKOUT to be
disabled on RTL8211F(D)(I)-VD-CG
On Fri, Nov 07, 2025 at 01:08:15PM +0200, Vladimir Oltean wrote:
> Add CLKOUT disable support for RTL8211F(D)(I)-VD-CG. Like with other PHY
> variants, this feature might be requested by customers when the clock
> output is not used, in order to reduce electromagnetic interference (EMI).
>
> In the common driver, the CLKOUT configuration is done through PHYCR2.
> The RTL_8211FVD_PHYID is singled out as not having that register, and
> execution in rtl8211f_config_init() returns early after commit
> 2c67301584f2 ("net: phy: realtek: Avoid PHYCR2 access if PHYCR2 not
> present").
>
> But actually CLKOUT is configured through a different register for this
> PHY. Instead of pretending this is PHYCR2 (which it is not), just add
> some code for modifying this register inside the rtl8211f_disable_clk_out()
> function, and move that outside the code portion that runs only if
> PHYCR2 exists.
>
> In practice this reorders the PHYCR2 writes to disable PHY-mode EEE and
> to disable the CLKOUT for the normal RTL8211F variants, but this should
> be perfectly fine.
>
> It was not noted that RTL8211F(D)(I)-VD-CG would need a genphy_soft_reset()
> call after disabling the CLKOUT.
>
> Co-developed-by: Clark Wang <xiaoning.wang@....com>
> Signed-off-by: Clark Wang <xiaoning.wang@....com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists