All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: cadence: macb: add IEEE 802.3az EEE support
@ 2026-02-23  9:04 Nicolai Buchwitz
  2026-02-23  9:04 ` [PATCH net-next 1/5] net: cadence: macb: add EEE register definitions and capability flag Nicolai Buchwitz
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Nicolai Buchwitz @ 2026-02-23  9:04 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, claudiu.beznea, davem, edumazet, kuba,
	nicolas.ferre, pabeni, linux, Nicolai Buchwitz

Add Energy Efficient Ethernet (IEEE 802.3az) support to the Cadence GEM
(macb) driver. The GEM MAC has hardware LPI registers but no built-in
idle timer, so the driver implements software-managed TX LPI using a
delayed_work timer, as recommended by Microchip's GMAC documentation.

The series is structured as follows:

  1. Register definitions: LPI counter offsets (0x270-0x27c), TXLPIEN
     bitfield (NCR bit 19), and a MACB_CAPS_EEE capability flag.

  2. LPI statistics: Expose the four hardware EEE counters (RX/TX LPI
     transitions and time) through ethtool -S, accumulated in software
     since they are clear-on-read.

  3. TX LPI engine: A delayed_work-based idle timer that enters LPI
     after 250ms of TX inactivity and wakes before transmit with a
     conservative 50us PHY wake delay. LPI entry is deferred 1 second
     after link-up per IEEE 802.3az.

  4. ethtool EEE ops: get_eee/set_eee delegating to phylink for PHY
     negotiation; the MAC-level TXLPIEN is controlled only from the
     phylink mac_link_up/mac_link_down callbacks.

  5. RP1 enablement: Set MACB_CAPS_EEE for the Raspberry Pi 5's RP1
     southbridge (Cadence GEM_GXL rev 0x00070109 + BCM54213PE PHY).

Tested on Raspberry Pi 5 with iperf3 throughput/latency benchmarks,
ethtool --show-eee / --set-eee, ethtool -S LPI counter verification,
and cable unplug/replug cycling.

Nicolai Buchwitz (5):
  net: cadence: macb: add EEE register definitions and capability flag
  net: cadence: macb: add EEE LPI statistics counters
  net: cadence: macb: implement EEE TX LPI support
  net: cadence: macb: add ethtool EEE support
  net: cadence: macb: enable EEE for Raspberry Pi RP1

 drivers/net/ethernet/cadence/macb.h      |  23 ++++
 drivers/net/ethernet/cadence/macb_main.c | 160 ++++++++++++++++++++++-
 2 files changed, 180 insertions(+), 3 deletions(-)

-- 
2.39.5


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

end of thread, other threads:[~2026-02-23 14:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23  9:04 [PATCH net-next 0/5] net: cadence: macb: add IEEE 802.3az EEE support Nicolai Buchwitz
2026-02-23  9:04 ` [PATCH net-next 1/5] net: cadence: macb: add EEE register definitions and capability flag Nicolai Buchwitz
2026-02-23  9:04 ` [PATCH net-next 2/5] net: cadence: macb: add EEE LPI statistics counters Nicolai Buchwitz
2026-02-23  9:04 ` [PATCH net-next 3/5] net: cadence: macb: implement EEE TX LPI support Nicolai Buchwitz
2026-02-23 10:07   ` Russell King (Oracle)
2026-02-23 14:54     ` nb
2026-02-23  9:04 ` [PATCH net-next 4/5] net: cadence: macb: add ethtool EEE support Nicolai Buchwitz
2026-02-23  9:04 ` [PATCH net-next 5/5] net: cadence: macb: enable EEE for Raspberry Pi RP1 Nicolai Buchwitz
2026-02-23  9:14 ` [PATCH net-next 0/5] net: cadence: macb: add IEEE 802.3az EEE support Russell King (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.