This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM67A: Question about Linux PCIe driver

Part Number: AM67A
Other Parts Discussed in Thread: AM67

Tool/software:

We want to use the AM67x Linux PCIe driver – for interfacing with FPGA. Does the IP or driver automatically switch to appropriate L-state (L0s – L3) based on activity?

  • Response

    From the Technical Reference Manual for AM67/J722S/J7AEN at https://www.ti.com/product/AM67:

    12.2.2.1.1 PCIe Subsystem Features

    • PCI Power Management states:

    – L1 Power Management sub-state support
    – Device Power Management states D0, D1, D3Hot

     

    12.2.2.1.2 PCIe Subsystem Not Supported Features

    • L2 power state

     

    12.2.2.3.3 PCIe Subsystem Power Management

    • PCIe has multiple power management protocols. Some of them are invoked by the hardware, such as Active State Power Management (ASPM), while others are activated at higher levels via software.
    • Link power states L0, L0s, L1, L1s are supported.
    • L0s entry and exit is managed by the PCIe core if ASPM L0s is enabled.
    • L1 entry and exit is also managed by the PCIe core if ASPM L1 is enabled. Software can force the exit from L1 by writing to the PCIE_USER_PMCMD[0] CLIENT_REQ_EXIT_L1 bit in the PCIe subsystem. Entry into L1 can also be blocked by setting the PCIE_USER_PMCMD[0] CLIENT_REQ_EXIT_L1 bit.
    • L1s support requires that the CLKREQ pin be connected to the remote peer. L1s power state is entered when the link is in L1 and CLKREQ pin is de-asserted. Software can force the exit fromL1s by writing to either the PCIE_USER_PMCMD[0] CLIENT_REQ_EXIT_L1 or PCIE_USER_PMCMD[1]

    CLIENT_REQ_EXIT_L1_SUBSTATE bits in the PCIe subsystem.

     

    ASPM in Linux can be enabled or disabled by using the CONFIG_PCIEASPM config when building Linux. Linux has a dedicated ASPM driver independent of the PCIe Controller driver. The PCIe Controller driver exposes APIs to the PCIe subsystem and therefore the ASPM driver as well to allow reads and writes to the PCIe configuration space which contains the ASPM specific registers to enable link state transition.

     

    Based on the System's power saving policy, the following function in the ASPM driver will translate to the corresponding link power state:
    https://github.com/torvalds/linux/blob/v6.13/drivers/pci/pcie/aspm.c#L269