Skip to content

Commit b1abe9e

Browse files
committed
net: cadence: macb: add EEE register definitions and capability flag
Add register and bitfield definitions for the Cadence GEM MAC's IEEE 802.3az Energy Efficient Ethernet (EEE) support: - LPI statistics counter registers (GEM_RXLPI, GEM_RXLPITIME, GEM_TXLPI, GEM_TXLPITIME) at offsets 0x270-0x27c - TX LPI enable bitfield (GEM_TXLPIEN) in the NCR register (bit 19), which directly asserts/deasserts LPI on the transmit path - MACB_CAPS_EEE capability flag to gate EEE support per platform These registers are present in all Cadence GEM revisions that support EEE (verified on SAMA5D2, SAME70, PIC32CZ, and RP1 variants). No functional change. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
1 parent f0d41dc commit b1abe9e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • drivers/net/ethernet/cadence

drivers/net/ethernet/cadence/macb.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@
176176
#define GEM_PCSANNPTX 0x021c /* PCS AN Next Page TX */
177177
#define GEM_PCSANNPLP 0x0220 /* PCS AN Next Page LP */
178178
#define GEM_PCSANEXTSTS 0x023c /* PCS AN Extended Status */
179+
#define GEM_RXLPI 0x0270 /* EEE RX LPI Transitions */
180+
#define GEM_RXLPITIME 0x0274 /* EEE RX LPI Time */
181+
#define GEM_TXLPI 0x0278 /* EEE TX LPI Transitions */
182+
#define GEM_TXLPITIME 0x027c /* EEE TX LPI Time */
179183
#define GEM_DCFG1 0x0280 /* Design Config 1 */
180184
#define GEM_DCFG2 0x0284 /* Design Config 2 */
181185
#define GEM_DCFG3 0x0288 /* Design Config 3 */
@@ -258,6 +262,10 @@
258262
#define MACB_MIIONRGMII_OFFSET 28 /* MII Usage on RGMII Interface */
259263
#define MACB_MIIONRGMII_SIZE 1
260264

265+
/* GEM specific NCR bitfields. */
266+
#define GEM_TXLPIEN_OFFSET 19 /* TX LPI Enable */
267+
#define GEM_TXLPIEN_SIZE 1
268+
261269
/* Bitfields in NCFGR */
262270
#define MACB_SPD_OFFSET 0 /* Speed */
263271
#define MACB_SPD_SIZE 1
@@ -756,6 +764,7 @@
756764
#define MACB_CAPS_MIIONRGMII 0x00000200
757765
#define MACB_CAPS_NEED_TSUCLK 0x00000400
758766
#define MACB_CAPS_QUEUE_DISABLE 0x00000800
767+
#define MACB_CAPS_EEE 0x00001000
759768
#define MACB_CAPS_PCS 0x01000000
760769
#define MACB_CAPS_HIGH_SPEED 0x02000000
761770
#define MACB_CAPS_CLK_HW_CHG 0x04000000

0 commit comments

Comments
 (0)