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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
4,557 次查看
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 项奖励
回复
1 解答
2,430 次查看
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 项奖励
回复
4 回复数
2,430 次查看
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 项奖励
回复
2,430 次查看
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 项奖励
回复
2,431 次查看
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 项奖励
回复
2,430 次查看
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 项奖励
回复