public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net: phy: add support for disabling autonomous EEE
@ 2026-04-06  7:13 Nicolai Buchwitz
  2026-04-06  7:13 ` [PATCH net-next 1/3] net: phy: add support for disabling PHY-autonomous EEE Nicolai Buchwitz
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Nicolai Buchwitz @ 2026-04-06  7:13 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Florian Fainelli,
	Broadcom internal kernel review list
  Cc: netdev, linux-kernel, Nicolai Buchwitz

Some PHYs implement autonomous EEE where the PHY manages EEE
independently, preventing the MAC from controlling LPI signaling.
This conflicts with MACs that implement their own LPI control.

This series adds a .disable_autonomous_eee callback to struct phy_driver
and calls it from phy_support_eee(). When a MAC indicates it supports
EEE, the PHY's autonomous EEE is automatically disabled. The setting is
persisted across suspend/resume by re-applying it in phy_init_hw() after
soft reset, following the same pattern suggested by Russell King for PHY
tunables [1].

Patch 1 adds the phylib infrastructure.
Patch 2 implements it for Broadcom BCM54xx (AutogrEEEn).
Patch 3 converts the Realtek RTL8211F, which previously unconditionally
  disabled PHY-mode EEE in config_init.

This came up while adding EEE support to the Cadence macb driver (used
on Raspberry Pi 5 with a BCM54210PE PHY). The PHY's AutogrEEEn mode
prevented the MAC from tracking LPI state. The Realtek RTL8211F has
the same pattern, unconditionally disabling PHY-mode EEE with the
comment "Disable PHY-mode EEE so LPI is passed to the MAC".

Other BCM54xx PHYs likely have the same AutogrEEEn register layout,
but I only have access to the BCM54210PE/BCM54213PE datasheets. It
would be appreciated if Florian or others could confirm which other
BCM54xx variants share this register so we can wire them up too.

Tested on Raspberry Pi CM4 (bcmgenet + BCM54210PE),
Raspberry Pi CM5 (Cadence GEM + BCM54210PE) and
Raspberry Pi 5 (Cadence GEM + BCM54213PE).

[1] https://lore.kernel.org/netdev/acuwvoydmJusuj9x@shell.armlinux.org.uk/

Previous versions:
  RFC: https://lore.kernel.org/netdev/20260403090656.733985-1-nb@tipi-net.de/
  Discussion: https://lore.kernel.org/netdev/d86c53213a6328b701b8aabbde5d1c83@tipi-net.de/

Changes since RFC:
  - Simplify kdoc and commit messages, remove references to specific
    callers (Andrew Lunn)

---
Nicolai Buchwitz (3):
      net: phy: add support for disabling PHY-autonomous EEE
      net: phy: broadcom: implement .disable_autonomous_eee for BCM54xx
      net: phy: realtek: convert RTL8211F to .disable_autonomous_eee

 drivers/net/phy/broadcom.c             |  7 +++++++
 drivers/net/phy/phy_device.c           | 22 ++++++++++++++++++++++
 drivers/net/phy/realtek/realtek_main.c |  7 ++++---
 include/linux/brcmphy.h                |  3 +++
 include/linux/phy.h                    | 14 ++++++++++++++
 5 files changed, 50 insertions(+), 3 deletions(-)
---
base-commit: 3741f8fa004bf598cd5032b0ff240984332d6f05
change-id: 20260406-devel-autonomous-eee-dffa292e9bb2

Best regards,
-- 
Nicolai Buchwitz <nb@tipi-net.de>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-04-06 20:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06  7:13 [PATCH net-next 0/3] net: phy: add support for disabling autonomous EEE Nicolai Buchwitz
2026-04-06  7:13 ` [PATCH net-next 1/3] net: phy: add support for disabling PHY-autonomous EEE Nicolai Buchwitz
2026-04-06  7:13 ` [PATCH net-next 2/3] net: phy: broadcom: implement .disable_autonomous_eee for BCM54xx Nicolai Buchwitz
2026-04-06 16:54   ` Florian Fainelli
2026-04-06  7:13 ` [PATCH net-next 3/3] net: phy: realtek: convert RTL8211F to .disable_autonomous_eee Nicolai Buchwitz
2026-04-06 13:17 ` [PATCH net-next 0/3] net: phy: add support for disabling autonomous EEE Andrew Lunn
2026-04-06 13:33   ` Nicolai Buchwitz
2026-04-06 13:56     ` Andrew Lunn
2026-04-06 16:43       ` Florian Fainelli
2026-04-06 17:10         ` Russell King (Oracle)
2026-04-06 18:29           ` Nicolai Buchwitz
2026-04-06 19:24             ` Andrew Lunn
2026-04-06 20:28             ` Russell King (Oracle)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox