Linux iMX6 PCIe driver not working

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

Linux iMX6 PCIe driver not working

4,274 Views
jonathanolson
Contributor II

I am having difficulties with the iMX6 PCIe bus working.  Although the card shows up with lspci, the iMX6 pcie driver always shows the following error message, and the first access to the PCI address space after driver initialization hangs the kernel, requiring a power-cycle to recover.

[    0.922384] imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!

[    0.932455] imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!

[    0.942542] imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!

[    0.952603] imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!

[    0.962674] imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!

$ sudo lspci -v

Password:

00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01) (prog-if 00 [Normal decode])

  Flags: fast devsel, IRQ 384

  Memory at 01200000 (64-bit, prefetchable) [disabled] [size=1M]

  Bus: primary=00, secondary=00, subordinate=00, sec-latency=0

  I/O behind bridge: 00000000-00000fff

  Memory behind bridge: 00000000-000fffff

  Prefetchable memory behind bridge: 00000000-000fffff

  [virtual] Expansion ROM at 01300000 [disabled] [size=64K]

  Capabilities: [40] Power Management version 3

  Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+

  Capabilities: [70] Express Root Port (Slot-), MSI 00

  Capabilities: [100] Advanced Error Reporting

  Capabilities: [140] Virtual Channel

  Kernel driver in use: pcieport

01:00.0 Multimedia video controller: Conexant Systems, Inc. Device 5851 (rev 01)

  Subsystem: Conexant Systems, Inc. Device 0952

  Flags: fast devsel, IRQ 155

  Memory at 01000000 (64-bit, non-prefetchable) [disabled] [size=2M]

  Capabilities: [40] Express Endpoint, MSI 00

  Capabilities: [80] Power Management version 3

  Capabilities: [90] Vital Product Data

  Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+

  Capabilities: [100] Advanced Error Reporting

  Capabilities: [200] Virtual Channel

The hardware and software configuration is the following:

  1. Linux kernel 3.14.54
  2. Hummingboard Edge with iMX6Q CPU
  3. Vecow VMX-200 PCIe video capture card

The kernel configurations associated with the PCI bus are:

#

# Bus support

#

CONFIG_PCI=y

CONFIG_PCI_DOMAINS=y

CONFIG_PCI_SYSCALL=y

CONFIG_PCI_MSI=y

# CONFIG_PCI_DEBUG is not set

# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set

# CONFIG_PCI_STUB is not set

# CONFIG_PCI_DISABLE_COMMON_QUIRKS is not set

CONFIG_PCI_ATS=y

CONFIG_PCI_IOV=y

CONFIG_PCI_PRI=y

CONFIG_PCI_PASID=y

#

# PCI host controller drivers

#

CONFIG_PCIE_DW=y

CONFIG_PCI_IMX6=y

# CONFIG_PCI_IMX6SX_EXTREMELY_PWR_SAVE is not set

# CONFIG_EP_MODE_IN_EP_RC_SYS is not set

# CONFIG_RC_MODE_IN_EP_RC_SYS is not set

# CONFIG_PCI_HOST_GENERIC is not set

CONFIG_PCIEPORTBUS=y

# CONFIG_PCIEAER is not set

# CONFIG_PCIEASPM is not set

CONFIG_PCIE_PME=y

# CONFIG_PCCARD is not set

Note that the above pcie errors occur at system boot before any driver initialization.  Has anyone had success with PCIe cards on iMX6?   How can I get past the "transition to gen2 is stuck" error in the iMX6 PCIe driver?

Labels (2)
0 Kudos
Reply
3 Replies

1,627 Views
wooosaiiii
Contributor III

Hello JONATHAN OLSON,

did you solve the problem?

Thanks for any information,

Primoz

0 Kudos
Reply

1,627 Views
jonathanolson
Contributor II

Yes, in fact I found the problem.

Removing out the following changes which were made to the imx6qdl clocking

fixed the PCIe problems.

diff --git a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi

b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi

index 5ab7a4d..4a18203 100644

--- a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi

+++ b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi

@@ -49,8 +49,6 @@

phy-reset-duration =

0 Kudos
Reply

1,627 Views
wooosaiiii
Contributor III

Hello Jonathan,

thank you for prompt answer to my question.

It looks like we might have a problem somewhere else. It is not just PHY timing...

We observe instant iMX6Q SoC hang when accessing memory mapped PCI BARs when LTSSM not in L0 (0x11) state.

Sometimes it also happens during PM suspend/resume that we get:

"imx6q-pcie 1ffc000.pcie: transition to gen2 is stuck, reset PHY!"

on resume call and then followed by immediate SoC hang.

Looks like iMX6Q PCIe core is full of errata!

Regards,

Primož

0 Kudos
Reply