i.MX6 - PCIe not detecting some devices in Linux 3.14.28

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

i.MX6 - PCIe not detecting some devices in Linux 3.14.28

Jump to solution
3,284 Views
Ansari
Contributor IV

Hi,

We are using imx6Q custom platform based on sabresd platform.  For our development we are using Linux 3.14.28_1.0.0-GA BSP but initially we used Linux 3.10.53_1.0.0-GA BSP.

We have seen  that the pcie driver file is updated in  Linux 3.14.28.

The problem we are facing is,  we have a PCIe device which is SSD SATA.

With Linux 3.14.28_1.0.0-GA BSP, the PCIe-SATA is not getting detected and it is showing below error.

imx6q-pcie 1ffc000.pcie: phy link never came up

imx6q-pcie 1ffc000.pcie: Failed to bring link up!

imx6q-pcie 1ffc000.pcie: failed to initialize host

imx6q-pcie: probe of 1ffc000.pcie failed with error -22

With Linux 3.10.53_1.0.0-GA BSP, the same PCIe-SATA is getting detected and mounted as block device.

Here we have not changed any hardware.  We just replaced the booting SD card which contains Linux 3.10.53_1.0.0-GA BSP binaries.

In addition, ,  we have checked with several PCIe devices (network PCIe devices) with Linux 3.14.28_1.0.0-GA BSP.  Only some of the PCIe devices are getting detected.

Please note that, all the devices are getting detected in the Linux 3.10.53_1.0.0-GA BSP.

Please help us to resolve this issue.

 

Thank You,

Regards,

Ansari

0 Kudos
1 Solution
1,157 Views
Ansari
Contributor IV

  Dear Mathieu,

    

  We have fixed the issue with below change and we are able to detect

  all devices which we have.

  We would like to know, why the below usleep delay removed in the

  3.14.28 kernel.

  "usleep_range(100, 1000)"

    

  diff a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c

   --- a/drivers/pci/host/pci-imx6.c

   +++ b/drivers/pci/host/pci-imx6.c

   static int imx6_pcie_wait_for_link(struct pcie_port *pp)

   {

           int count = 200;

               while (!dw_pcie_link_up(pp)) {

   -               udelay(100);

   +               usleep_range(100, 1000);

                   if (--count)

                           continue;

                       dev_err(pp->dev, "phy link never came up\n");

    

  Regards,

Ansari

View solution in original post

0 Kudos
4 Replies
1,157 Views
Yuri
NXP Employee
NXP Employee

  I have forwarded request to the team.

Hope they help soon.


Have a great day,
Yuri

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

0 Kudos
1,157 Views
mathieuslabbinc
Contributor I

Hi,

I'm experiencing 99% the same issue. We're just using a wifi module on the pcie.

Has this ever been looked at?

What caused this issue?

Kr

Mathieu

0 Kudos
1,158 Views
Ansari
Contributor IV

  Dear Mathieu,

    

  We have fixed the issue with below change and we are able to detect

  all devices which we have.

  We would like to know, why the below usleep delay removed in the

  3.14.28 kernel.

  "usleep_range(100, 1000)"

    

  diff a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c

   --- a/drivers/pci/host/pci-imx6.c

   +++ b/drivers/pci/host/pci-imx6.c

   static int imx6_pcie_wait_for_link(struct pcie_port *pp)

   {

           int count = 200;

               while (!dw_pcie_link_up(pp)) {

   -               udelay(100);

   +               usleep_range(100, 1000);

                   if (--count)

                           continue;

                       dev_err(pp->dev, "phy link never came up\n");

    

  Regards,

Ansari

0 Kudos
1,157 Views
Yuri
NXP Employee
NXP Employee

Hello,

Please look at the following discussion Re: PCIe, diagnosing and improving eye diagram

Also, please try adjust parameters of PCIe_PHY  by changing the IOMUXC_GPR8 register.

You may refer to app note http://cache.nxp.com/files/32bit/doc/app_note/AN4784.pdf

for details.

Regards,

Yuri.

0 Kudos