i.MX6sx PCIe failes LTSSM training

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6sx PCIe failes LTSSM training

982 Views
randysilagi
Contributor II

In the i.MX6sx Saber demo board, using the Freescale kernel:  linux-rel_imx_4.1.15_2.0.0_ga, from the git.freescale.com the imx6_pcie_link_up the LINK_UP is never detected.  Here is the code, I've added the printk that shows the register value.

while (1) {
   rc = readl(pp->dbi_base + PCIE_PHY_DEBUG_R1);
   if (printk_ratelimit())
       printk(KERN_INFO "%s: Debug_R1: %#x; UP: %#x, Training: %#x\n",
             __FUNCTION__, rc, PCIE_PHY_DEBUG_R1_XMLH_LINK_UP,     

             PCIE_PHY_DEBUG_R1_XMLH_LINK_IN_TRAINING);
     if (!(rc & PCIE_PHY_DEBUG_R1_XMLH_LINK_UP))
         break;
     if (!(rc & PCIE_PHY_DEBUG_R1_XMLH_LINK_IN_TRAINING))
          return 1;

imx6_pcie_link_up: Debug_R1: 0x8200000; UP: 0x10, Training: 0x20000000

Where can I look to determine why the link is never UP?  What can I do to get the Link up?  The imx6_pcie_link_up is called from imx6_pcie_wait_for_link().  The "link_up" is polled every 100 us, 20000 times. 

Thanks for your help

Randy S.

Labels (1)
0 Kudos
1 Reply

581 Views
igorpadykov
NXP Employee
NXP Employee

Hi Randy

formal steps for finding root cause of why the link is never up and get link up would
be following AN5158 PCI Express® Certification Guide for the i.MX 6SoloX
http://www.nxp.com/assets/documents/data/en/application-notes/AN5158.pdf
encoding for LTSSM states can be found on
https://community.nxp.com/thread/329647
If PCIe is enabled in uboot, try to disable PCIe support in uboot.
Please try several PCIe cards, it may be useful to check verified cards described
in attached Linux Manual sect.40.4 Using PCIe Endpoint and Running Tests

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos