imx6q-pcie: phy link never came up, DEBUG_R0: 0x00ea6102, DEBUG_R1: 0x08200000

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

imx6q-pcie: phy link never came up, DEBUG_R0: 0x00ea6102, DEBUG_R1: 0x08200000

932 Views
wiking
Contributor I

Observed Phenomenon

Initially, the Wi-Fi module of the device functions normally. However, after approximately two years of use, Wi-Fi-related issues occur. At first, it was suspected that the problem lay with the Wi-Fi module; yet, the same issue persisted even after replacing the Wi-Fi module.

Description

    1. The interface of the device's Wi-Fi module is PCIe.
    2. The Wi-Fi module uses the PCIe-1 interface of the iMX8 chip (PCIe ports are numbered starting from 1 in the circuit diagram), while PCIe ports in the code are numbered starting from 0. Therefore, it corresponds to "pcie0" in the code.

Logs are as follows:

imx6q-pcie 33800000.pcie: imx pcie probe
OF: PCI: host bridge /pcie@0x33800000 ranges:
OF: PCI:   No bus range found for /pcie@0x33800000, using [bus 00-ff]
OF: PCI:    IO 0x1ff80000..0x1ff8ffff -> 0x00000000
OF: PCI:   MEM 0x18000000..0x1fefffff -> 0x18000000
imx6q-pcie 33800000.pcie: pcie phy pll is locked.
imx6q-pcie 33800000.pcie: phy link never came up
imx6q-pcie 33800000.pcie: DEBUG_R0: 0x00ea6102, DEBUG_R1: 0x08200000

 

 

0 Kudos
Reply
2 Replies

838 Views
danielchen
NXP TechSupport
NXP TechSupport

For the debug info, it is the LTSSM state,  a state machine  defined by the PCI express specification that governs how a PCIe link is established, trained, and maintained.  it transitions through various states during link initialization and operation.

 

Here are the most common LTSSM states and their hex codes:

Hex Code LTSSM State Description
0x00 DETECT_QUIET No electrical activity detected
0x01 DETECT_ACTIVE Trying to detect receiver
0x02 POLL_ACTIVE Sending TS1 ordered sets
0x03 POLL_COMPLIANCE Compliance pattern testing
0x04 POLL_CONFIG Sending TS2 ordered sets
0x07 CFG_LINKWD_START Starting link width configuration
0x08 CFG_LINKWD_ACCEPT Accepting link width
0x09 CFG_LANENUM_WAIT Waiting for lane number config
0x0A CFG_LANENUM_ACCEPT Accepting lane number config
0x0B CFG_COMPLETE Configuration complete
0x11 L0 Link is up and active
0x12 L0s Low power idle state
0x13 L1 Deeper power saving state
0x17 DISABLED_ENTRY Entering disabled state
0x18 DISABLED_IDLE Disabled but idle
0x19 DISABLED Fully disabled
0x1E HOT_RESET_ENTRY Entering hot reset
0x1F HOT_RESET In hot reset

 

when your log shows 

imx6q-pcie 33800000.pcie: DEBUG_R0: 0x00ea6102, DEBUG_R1: 0x08200000

 

You can extract the LTSSM state from the lowest byte, (0x02  in this case).

0x02POLL_ACTIVE → The controller is sending TS1 ordered sets but not receiving a valid response from the endpoint.

This means the PCIe link is stuck in the polling phase, likely due to:

  • Endpoint not responding (e.g., Wi-Fi module not powered or reset properly),
  • Signal integrity issues,
  • Clock or reset timing problems.

 

 

0 Kudos
Reply

900 Views
wiking
Contributor I

SoC: MCIMX8MQ6DVAJZAA
linux-imx:  v4.14.98

dts: fsl-imx8mq-evk.dts

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2184612%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx6q-pcie%3A%20phy%20link%20never%20came%20up%2C%20DEBUG_R0%3A%200x00ea6102%2C%20DEBUG_R1%3A%200x08200000%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2184612%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CH1%20id%3D%22toc-hId-1275501787%22%20id%3D%22toc-hId-1299483543%22%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20size%3D%224%22%3EObserved%20Phenomenon%3C%2FFONT%3E%3C%2FH1%3E%3CDIV%20class%3D%22%22%3EInitially%2C%20the%20Wi-Fi%20module%20of%20the%20device%20functions%20normally.%20However%2C%20after%20approximately%20two%20years%20of%20use%2C%20Wi-Fi-related%20issues%20occur.%20At%20first%2C%20it%20was%20suspected%20that%20the%20problem%20lay%20with%20the%20Wi-Fi%20module%3B%20yet%2C%20the%20same%20issue%20persisted%20even%20after%20replacing%20the%20Wi-Fi%20module.%3C%2FDIV%3E%3CH1%20id%3D%22toc-hId--531952676%22%20id%3D%22toc-hId--507970920%22%3E%3CFONT%20size%3D%224%22%3EDescription%3C%2FFONT%3E%3C%2FH1%3E%3COL%3E%3COL%3E%3CLI%3EThe%20interface%20of%20the%20device's%20Wi-Fi%20module%20is%20PCIe.%3C%2FLI%3E%3CLI%3EThe%20Wi-Fi%20module%20uses%20the%20PCIe-1%20interface%20of%20the%20iMX8%20chip%20(PCIe%20ports%20are%20numbered%20starting%20from%201%20in%20the%20circuit%20diagram)%2C%20while%20PCIe%20ports%20in%20the%20code%20are%20numbered%20starting%20from%200.%20Therefore%2C%20it%20corresponds%20to%20%22pcie0%22%20in%20the%20code.%3C%2FLI%3E%3C%2FOL%3E%3C%2FOL%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%3ELogs%20are%20as%20follows%3C%2FSPAN%3E%3A%3C%2FFONT%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3Eimx6q-pcie%2033800000.pcie%3A%20imx%20pcie%20probe%0AOF%3A%20PCI%3A%20host%20bridge%20%2Fpcie%400x33800000%20ranges%3A%0AOF%3A%20PCI%3A%20%20%20No%20bus%20range%20found%20for%20%2Fpcie%400x33800000%2C%20using%20%5Bbus%2000-ff%5D%0AOF%3A%20PCI%3A%20%20%20%20IO%200x1ff80000..0x1ff8ffff%20-%26gt%3B%200x00000000%0AOF%3A%20PCI%3A%20%20%20MEM%200x18000000..0x1fefffff%20-%26gt%3B%200x18000000%0Aimx6q-pcie%2033800000.pcie%3A%20pcie%20phy%20pll%20is%20locked.%0Aimx6q-pcie%2033800000.pcie%3A%20phy%20link%20never%20came%20up%0Aimx6q-pcie%2033800000.pcie%3A%20DEBUG_R0%3A%200x00ea6102%2C%20DEBUG_R1%3A%200x08200000%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2188847%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx6q-pcie%3A%20phy%20link%20never%20came%20up%2C%20DEBUG_R0%3A%200x00ea6102%2C%20DEBUG_R1%3A%200x08200000%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2188847%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFor%20the%20debug%20info%2C%20it%20is%20the%20LTSSM%20state%2C%26nbsp%3B%20a%20state%20machine%26nbsp%3B%20defined%20by%20the%20PCI%20express%20specification%20that%20governs%20how%20a%20PCIe%20link%20is%20established%2C%20trained%2C%20and%20maintained.%26nbsp%3B%20it%20transitions%20through%20various%20states%20during%20link%20initialization%20and%20operation.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHere%20are%20the%20most%20common%20LTSSM%20states%20and%20their%20hex%20codes%3A%3C%2FP%3E%0A%3CDIV%20class%3D%22___i31lg00%20f10pi13n%20f14t3ns0%20f1nbblvp%20fat0sn4%20f1ov4xf1%20fekwl8i%20f1lmfglv%20f1oz7aqm%20f1abmfm4%20f1w619qj%20f16h0jq8%22%3E%0A%3CTABLE%20class%3D%22___1hm93bs%20f1ddd56o%20f16vktn6%20f1enuhaj%20fdclmfp%20f1ev3kgc%20ftgm304%20f1uinfot%20fibjyge%20fvueend%20f9yszdx%20f1fu4s3n%20f3l3pb3%20f1s2k7dp%20f8fmt76%20fjvbh62%20fysh76l%20fic4ptz%20f1yenhzu%20f1yn6nvh%20f14tj6oe%20f1jq587y%20f1el8yx3%20f1pymoxg%20f1ofu761%20fe6itr%20f7coize%20f1794535%20f70r78m%20f4zgifc%20fk1v6el%20f16pyhcb%20fo436u6%20fzy4j18%20fc43013%20f1hmrcvb%20fc4t9fq%20fgp09rh%20fjnyn6r%22%20tabindex%3D%220%22%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTH%3EHex%20Code%3C%2FTH%3E%0A%3CTH%3ELTSSM%20State%3C%2FTH%3E%0A%3CTH%3EDescription%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x00%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EDETECT_QUIET%3C%2FTD%3E%0A%3CTD%3ENo%20electrical%20activity%20detected%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x01%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EDETECT_ACTIVE%3C%2FTD%3E%0A%3CTD%3ETrying%20to%20detect%20receiver%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x02%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EPOLL_ACTIVE%3C%2FTD%3E%0A%3CTD%3ESending%20TS1%20ordered%20sets%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x03%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EPOLL_COMPLIANCE%3C%2FTD%3E%0A%3CTD%3ECompliance%20pattern%20testing%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x04%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EPOLL_CONFIG%3C%2FTD%3E%0A%3CTD%3ESending%20TS2%20ordered%20sets%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x07%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3ECFG_LINKWD_START%3C%2FTD%3E%0A%3CTD%3EStarting%20link%20width%20configuration%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x08%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3ECFG_LINKWD_ACCEPT%3C%2FTD%3E%0A%3CTD%3EAccepting%20link%20width%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x09%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3ECFG_LANENUM_WAIT%3C%2FTD%3E%0A%3CTD%3EWaiting%20for%20lane%20number%20config%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x0A%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3ECFG_LANENUM_ACCEPT%3C%2FTD%3E%0A%3CTD%3EAccepting%20lane%20number%20config%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x0B%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3ECFG_COMPLETE%3C%2FTD%3E%0A%3CTD%3EConfiguration%20complete%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x11%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EL0%3C%2FTD%3E%0A%3CTD%3ELink%20is%20up%20and%20active%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x12%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EL0s%3C%2FTD%3E%0A%3CTD%3ELow%20power%20idle%20state%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x13%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EL1%3C%2FTD%3E%0A%3CTD%3EDeeper%20power%20saving%20state%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x17%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EDISABLED_ENTRY%3C%2FTD%3E%0A%3CTD%3EEntering%20disabled%20state%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x18%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EDISABLED_IDLE%3C%2FTD%3E%0A%3CTD%3EDisabled%20but%20idle%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x19%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EDISABLED%3C%2FTD%3E%0A%3CTD%3EFully%20disabled%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x1E%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EHOT_RESET_ENTRY%3C%2FTD%3E%0A%3CTD%3EEntering%20hot%20reset%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%3CCODE%3E0x1F%3C%2FCODE%3E%3C%2FTD%3E%0A%3CTD%3EHOT_RESET%3C%2FTD%3E%0A%3CTD%3EIn%20hot%20reset%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CBR%20%2F%3E%0A%3CP%3Ewhen%20your%20log%20shows%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20%20language-javascript%22%3E%3CCODE%3Eimx6q-pcie%2033800000.pcie%3A%20DEBUG_R0%3A%200x00ea6102%2C%20DEBUG_R1%3A%200x08200000%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EYou%20can%20extract%20the%20LTSSM%20state%20from%20the%20lowest%20byte%2C%20(0x02%26nbsp%3B%20in%20this%20case).%3C%2FP%3E%0A%3CP%3E%3CCODE%3E0x02%3C%2FCODE%3E%20%E2%86%92%20%3CCODE%3EPOLL_ACTIVE%3C%2FCODE%3E%20%E2%86%92%20The%20controller%20is%20sending%20TS1%20ordered%20sets%20but%20not%20receiving%20a%20valid%20response%20from%20the%20endpoint.%3C%2FP%3E%0A%3CP%3EThis%20means%20the%20PCIe%20link%20is%20stuck%20in%20the%20%3CSTRONG%3Epolling%20phase%3C%2FSTRONG%3E%2C%20likely%20due%20to%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEndpoint%20not%20responding%20(e.g.%2C%20Wi-Fi%20module%20not%20powered%20or%20reset%20properly)%2C%3C%2FLI%3E%0A%3CLI%3ESignal%20integrity%20issues%2C%3C%2FLI%3E%0A%3CLI%3EClock%20or%20reset%20timing%20problems.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E