Yuri,
I am still having difficulties with getting the PCIe link up. I was able to find that the PCI Reset was not properly firing/wired and have resolved that issue. I can see data on the clock/TX/RX signals that look ok. I can try to adjust the levels per your previous comment, but I am having trouble getting insight into what is happening. It has been a little difficult digging through the IMX PCI and clock drivers, code, and documentation, but I am starting to have better feeling for how all that is handled. I have limited experience with PCIe at this level, but I have started to investigate the PCIE Debug registers when the driver tries to bring the link up.
Per the print outs below - In the function imx6_pcie_link_up () of file pci-imx.c of the, I added an extra print right after Debug Register 1 is first read and turned up the debug printing and I am seeing the following prints out of the imx6_pcie_link_up function. I had also extended some of the delays in the process.
Is there any insight you can see from the debug registers during the link-up process?
[ 6.947872] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=004abc43 debug_r1=08000000
[ 6.976156] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 6.981953] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=004abc43 debug_r1=08000000
[ 7.010225] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 7.016022] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08000000
[ 7.044307] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 7.050090] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08000000
[ 7.078373] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08100000
[ 7.084169] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08100000
[ 7.112454] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08100000
[ 7.118236] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08100000
[ 7.146521] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08100000
[ 7.152317] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08100000
[ 7.180589] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 7.186371] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08000000
[ 7.214660] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 7.220457] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08000000
[ 7.248729] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08000000
[ 7.254525] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=00b5bc43 debug_r1=08000000
[ 7.282808] imx6q-pcie 1ffc000.pcie: CLU - debug_r1=08100000
[ 7.288592] imx6q-pcie 1ffc000.pcie: TG2 - debug_r0=004abc43 debug_r1=08100000
After investigating the registers by hand and finding the i.MX6 “PHY link never came up” page I ran the decoder program someone through put on GitHub.
syn-3.10.53-1.1.2$ ./imx6-pcie-decoder
LTSSM current state: 0x3 (S_POLL_COMPLIANCE)
PIPE transmit K indication: 1
PIPE Transmit data: 0x4abc
Receiver is receiving logical idle: no
Second symbol is also idle (16-bit PHY interface only): no
Currently receiving k237 (PAD) in place of link number: no
Currently receiving k237 (PAD) in place of lane number: no
Link control bits advertised by link partner: 0x0
Receiver detected lane reversal: no
TS2 training sequence received: no
TS1 training sequence received: no
Receiver reports skip reception: no
LTSSM reports PHY link up: no
A skip ordered set has been transmitted: no
Link number advertised/confirmed by link partner: 0
Application request to initiate training reset: no
PIPE transmit compliance request: yes
PIPE transmit electrical idle request: no
PIPE receiver detect/loopback request: no
LTSSM-negotiated link reset: yes
LTSSM testing for polarity reversal: no
LTSSM performing link training: no
LTSSM in DISABLE state; link inoperable: no
Scrambling disabled for the link: no
I am going to continue to research the problem and PCIe, but I would appreciate any assistance/help.