Skip to contentSkip to conversation

net: bcmgenet: update PHY power down

PATCH Applied Florian Fainelli 3 participants 3 messages Jun 14, 2025 – Jun 17, 2025

Subsystems (3)
lore
Share & tools
lore

Florian Fainelli

author maintainer
#0 lore raw

PATCH v2 1/1 net: bcmgenet: update PHY power down

From: Doug Berger <[email protected]>

The disable sequence in bcmgenet_phy_power_set() is updated to match the inverse sequence and timing (and spacing) of the enable sequence. This ensures that LEDs driven by the GENET IP are disabled when the GPHY is powered down.

---
Changes in v2:

- use proper "From" email address for Doug

 drivers/net/ethernet/broadcom/genet/bcmmii.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmmii.c +6 -1
index b6437ba7a2eb..573e8b279e52 100644
@@ -169,10 +169,15 @@ void bcmgenet_phy_power_set(struct net_device *dev, bool enable)
 
 			reg &= ~EXT_GPHY_RESET;
 		} else {
+			reg |= EXT_GPHY_RESET;
+			bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
+			mdelay(1);
+
 			reg |= EXT_CFG_IDDQ_BIAS | EXT_CFG_PWR_DOWN |
-			       EXT_GPHY_RESET | EXT_CFG_IDDQ_GLOBAL_PWR;
+			       EXT_CFG_IDDQ_GLOBAL_PWR;
 			bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
 			mdelay(1);
+
 			reg |= EXT_CK25_DIS;
 		}
 		bcmgenet_ext_writel(priv, reg, EXT_GPHY_CTRL);
Signature · 1 line
2.43.0
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Florian Fainelli

From: Doug Berger <[email protected]>

The disable sequence in bcmgenet_phy_power_set() is updated to match the inverse sequence and timing (and spacing) of the enable sequence. This ensures that LEDs driven by the GENET IP are disabled when the GPHY is powered down.

Thanks Doug and Florian,

I agree that the code does what it says on the wrapper. Although I have no way to test it's effect on real hardware.

#2 lore raw
In reply to Florian Fainelli
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 13 Jun 2025 19:58:16 -0700 you wrote:

From: Doug Berger <[email protected]>

The disable sequence in bcmgenet_phy_power_set() is updated to match the inverse sequence and timing (and spacing) of the enable sequence. This ensures that LEDs driven by the GENET IP are disabled when the GPHY is powered down.

[...]

Here is the summary with links:
- [net-next,v2] net: bcmgenet: update PHY power down

    https://git.kernel.org/netdev/net-next/c/90b4e1cf6de0

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html