Energy Efficient Ethernet (EEE) enables the IEEE
802.3 Media Access Control (MAC) sublayer along with a family of physical layers to
operate in the Low-Power Idle (LPI) mode. In the Transmit path, the software must
set the LPIEN bit of the MAC_LPI_Control_Status register to indicate to the MAC to
stop transmission and initiate the LPI protocol.
Complete the following steps during QoS core initialization:
- Read the PHY register through the MDIO interface, check if the remote end has the EEE capability, and then negotiate the timer values.
- Program the PHY registers through the MDIO interface (including the RX_CLK_stoppable bit that indicates to the PHY whether to stop Rx clock in LPI mode.)
- Program bits[25:16] and bits[15:0] in MAC_LPI_Timers_Control Register.
- Read the link status of the PHY chip by using the MDIO interface and update
bit 17 of MAC_LPI_Control_Status accordingly. This update can be done whenever
the link status in the PHY chip changes
- Program the MAC_1US_Tic_Counter as per the frequency of the clock used for
accessing the CSR slave
port.
- Program the MAC_LPI_Entry_Timer register (LPIET) with the IDLE time that the
MAC must wait before entering the LPI state.
- Set LPITE and LPITXA (bit[20:19]) of MAC_LPI_Control_Status register to enable the auto-entry into LPI and auto-exit of MAC from LPI state.
- Program the MAC_1US_Tic_Counter as per the frequency of the clock used for
accessing the CSR slave
port.
- Program the MAC_LPI_Entry_Timer register (LPIET) with the IDLE time that the
MAC must wait before entering the LPI state.
- Set LPITE and LPITXA (bit[20:19]) of MAC_LPI_Control_Status register to enable the auto-entry into LPI and auto-exit of MAC from LPI state.
- Set bit 16 of MAC_LPI_Control_Status Register to make the MAC Transmitter
enter the LPI state. The MAC enters the LPI mode after completing all scheduled
packets and remains IDLE for the time indicated by LPIET. The MAC sets the
TLPIEN (bit[0]) after entry to LPI state.
- When a packet is scheduled for transmission (when the TxDMA comes out of IDLE
state or when a packet is presented at ATI or MTI interface), the MAC
Transmitter exits LPI state automatically. The MAC waits for TWT time before
setting the TLPIEX interrupt status bit and then resumes the packet
transmission.
- MAC Transmitter re-enters LPI state, if the MAC remains IDLE for LPIET time
and sets the TLPIEN bit and the entry-exit cycle continues.
- Reset LPITXEN in case the application wants to over-ride the auto-entry/exit modes and make the MAC Transmitter exit the LPI state directly.
Note: To make the MAC enter the LPI state only after
the MAC completes the transmission of all queued frames in the Tx FIFO, set bit 19
in MAC_LPI_Control_Status Register.
To switch off the MII transmit clock during the LPI state, use the
sbd_tx_clk_gating_ctrl_o signal for gating the clock input.
To switch off the CSR clock or
power to the rest of the system during the LPI state, wait for the TLPIEN
interrupt of MAC_LPI_Control_Status Register to be generated. Restore the clocks
before performing step 6 when you want to come out of the LPI state.