SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
The function power state machine is the highest-level PM FSM in a PCIe device. The power state control bitfield is part of standard PCIe register bitfield- (EP)PM_CSR/(RC)PM_CSR [1:0] PWR_STATE.
A Vaux power source is not tied to the PCIe core, that is why the state D3_cold with Vaux switched-on is unsupported by the PCIe PM FSM.
The six available D-states are, by order of decreasing power: D0_uninitialized (default), D0_active, D1, D2, D3_hot, D3_cold. Note that the function power state Cfg field - is only 2 bit, encoding only 4 combinations: D0, D1, D2, D3. The difference between uninitialized and active (D0), and between hot and cold (D3) is implicit.
The eventual (“stable” or “quiescent”) power state of a PCIe link (link state) is determined by the D-state of the downstream device. For the current controller, it means that the D-state determines the link state in EP type mode, but not in RC type mode.
Note also that the device may go through a number of transient link states before entering/after exiting its quiescent link state, so that a device, for example, in D3_hot may be consuming maximum instantaneous power .
D0_uninitialized is the function’s default state, entered after powerup and/or reset. It is used by the RC software to enumerate the function (Cfg transactions). Mem and IO transaction are disabled. It can only be entered though a reset, partial or total. Together with D0_active, it is the highest-power D-state.
D0_active is the function’s active state, where all Memory and I/O transactions take place. By definition, a function transitions from D0_uninitialized to D0_active after the RC software enables Memory and I/O transactions, either as completer ("Cfg" write 0b1 to memory space enable: MSE/IO space enable: ISE) or as requester ("Cfg" write 1 to bus master enable: BME). D0_active can be exited to/entered from D1, D2, or D3_hot by the RC software writing to the function’s (EP)PM_CSR[1:0] PWR_STATE power state. Together with D0_uninitialized, it is the highest-power D-state.
D1 and D2 are two optional states, with reduced power compared to D0. Both operate the same way, and have the same action on lower-level PM FSM, with D1 expected to have a faster wakeup and D2 a lower power. Both are supported by the current controller. D1 and D2 can be exited to/entered from D0_active, D1, D2, or exited to D3_hot , by the RC software writing to the function’s (EP)PM_CSR[1:0] PWR_STATE power state bitfield. The current controller supports D1 and D2 but a fully compliant implementation also depends on the system providing the right combination of HW and software.
D3_hot is a lower-power state (compared to D0, D1, D2). It can be entered from D0_active, D1, or D2 by the RC software writing to the function’s (EP)PM_CSR[1:0] PWR_STATE. Transition to D3_hot is typically continued to D3_cold and main power (VMAIN) shutdown. It can also be exited to D0 by the RC writing (0b00) to the (EP)PM_CSR[1:0] PWR_STATE. The state transition to either D0_active or D0_uninitialized depends on the NSR value written in the bit (EP)PM_CSR[3] NSR (No_Soft_Reset bit) of 0b1 ( that means - function is not reset) or 0b0 (that means - function is reset, link is restarted and must be reconfigured) respectively.
D3_cold is the lowest-power state, defined by the VMAIN being turned off. It it typically entered from D3_hot as shown in the figure below, but any turn-off request will actually place the function in that state. It can only be exited to D0_uninitialized, by restoring VMAIN and after resetting the function, totally or partially (see link states below).
The Figure 26-162 shows the state transitions in the power state. NSR is the “No_Soft_Reset” bit in the function’s (EP)PM_CSR configuration register. NSR advertizes the ability of the device to go into D3_hot while retaining its register settings (when 1), or conversely, the inability to do so and the reset of those setting upon D3_hot exit (when 0).
NSR is read-only to the RC software over Cfg accesses, but it can be set by the EP's local software over DIF (CS access) prior to enumeration. The controller shall apply the NSR to itself accordingly.
Most function power state transitions are done explicitly by the RC-side software writing into the EP function’s (EP)PM_CSR[1:0] PWR_STATE, over the PCIe wire. This is one of the two PM control mechanisms of PCIe, the other one being ASPM . The remaining function power state transitions are caused by resets.
The D-state of a device sets the link power state (L-state) for the PCIe link above. In other words, the L-state of a PCIe link (connecting an upstream device, closer to the RC, and a downstream device, closer to an EP) is set by the downstream device.