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.

AM5K2E04: TI Keystone II: Diagnosis of PCIe connection problems

Part Number: AM5K2E04

Hi,

a customer of mine has designed a new processor board which is based on a Keystone II device, namely the AM5K2E04. Currently we’re in the bring-up phase of the project, i.e. we’re trying to get all relevant hardware units up and running. Unfortunately, we ran into problems when enabling the PCI Express controllers of the Keystone processor.

Our board acts as a PCIe root complex and uses both PCIe interfaces of the Keystone. PCIe #0 is connected to an FPGA, PCIe#1 is connected to a PCIe switch. Both interfaces use 2 lanes PCIe Gen 2.   Our problem is that neither of the PCIe interfaces of the Keystone is able to establish a stable physical connection to its communication partner.

To look into this, we’ve modified the bootloader (UBoot) so that it continuously monitors the state of the PCIe controllers.

The bootloader does the following:

  • It switches both controller into root complex mode
  • It initializes the SerDes with the settings provided by TI
  • It enables the PCIe power domains
  • It triggers PCIe link training

After that, the bootloader enters an endless loop where it continuously reads and outputs a number of PCIe debug registers, most importantly the physical link state (LTSSM)  In this loop we can see that the link training takes very, very long (seconds!).  And even if the link comes up, it usually breaks down after some time (sometimes seconds, sometimes minutes).  All this pretty much non-deterministically.

Because of that, we guess that there’s probably a hardware problem. But how can we proceed to diagnose this?

So our questions are:

  • Do you have any advice on how to tackle problems related to PCIe link training / physical layer problems?
  • Is there anything to consider when initializing the SerDes PHYs?
    The SerDes spec (spruho3a.pdf) states that the customer should *never* use any settings other than those provided by TI. Are there any known use cases where customers needed special PHY settings?

Thanks

  • Hello,
    I have never tried by myself, as my system is gen1. But just in case, why don't you try to downgrade your link from gen2 to gen1? If that would help somehow, you may guess for sure the trouble was due to poor signal quality at higher speed.
  • Hi Frederik,

    In addition, before we begin debugging the CSL settings. Can your customer verify that they've followed the Hardware Design Guide for Keystone II Devices (www.ti.com/.../sprabv0.pdf), section 6.6 Peripheral Component Interconnect Express (PCIe) and the KeyStone Architecture Peripheral Component Interconnect Express (PCIe) User Guide (www.ti.com/.../spruho3a.pdf), section 10.2 Recommended SerDes PCB Layout Constraints?

    Best Regards,
    Yordan

  • Hi everyone,

    I'm the customer, Frederik is talking about :-)
    First of all thanks for your suggestions.

    Yes, we've already tried downgrading to PCIe Gen1, unfortunately w/o success.
    Regarding the PCie design documents I'm pretty sure out HW developers have considered that. Anyway we'll double-check everything.

    @Yordan: The document links you've provided are not working (at least not for me). Could you please check them?

    Thanks,
    Gerald
  • Hi Gerald,

    I've edited my post. The links should be working now.

    Best Regards,
    Yordan
  • Hi,

    "modified the bootloader (UBoot) so that it continuously monitors the state of the PCIe controllers."====> The TI U-boot doesn't intialize PCIE. Please elaborate what software (Linux or RTOS) and release version you used for PCIE intialization?

    Normally, the Linux kernel has PCIE driver and does the PSC/RC mode/serdes/link training. Or, we have processor SDK RTOS for the same.

    The PCIE Serdes setup typically we don't touch, it is robust from our experience and no tuning is required.

    Regards, Eric
  • Thanks, Eric!  At first we used an unmodfied Uboot along with the standard Linux driver code. We only modified UBoot in order to diagnose the link status.

    Anyway I guess we've found the problem. Seems like we didn't properly connect the PCIe reference resistors PCIE0REFRES / PCIE1REFRES :-(  HW develeopment is currently looking into a way to fix the board somehow.

    Regardless of this, the information that the SerDes setup does not need to be adapted is also very valuable. We were wondering if all these esoteric parameters need to be reviewed as well. Good to hear that the standard settings are pretty much okay.

    Thanks everyone for your help!