FEC controller TDAR bit not cleared (Uboot)

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

FEC controller TDAR bit not cleared (Uboot)

671 Views
Decastro
Contributor I

Hi togehter,

I encountered an issue when enabling the KSZ9893 switch in U-Boot (IMX6dl). After a cold reset and entering U-Boot, the TDAR bit is never cleared by the FEC after it has been set to “1” to indicate that there is data to be transmitted.

However, if the system first boots into Linux and then re-enters U-Boot via a warm reset (using reboot), the issue does not occur.

I compared all FEC and KSZ9893 registers between cold reset and warm reset scenarios and found them to be identical. I also compared the clock and PLL configurations in both cases (including ANALOG_PLL_528, ANALOG_PFD_528, CBCMR, CBCD R, and CCGR1), and they are exactly the same.

Is it possible that some initialization or configuration step performed during the warm reset path is missing during the cold reset, which could result in the TDAR bit not being cleared in the cold reset case?

Thanks a lot in advance

0 Kudos
Reply
3 Replies

261 Views
Decastro
Contributor I

I finally figured out that there were two problems I needed to fix: 1. RGMII uses GPIO_16 (RGMII_TX_CTL) as a clock source, so I had to configure it in the device tree (DT). 2. IOMUXC_GPR1 was not configured in mx6dlsabresd.c.
The problem is now solved. Thank you for your help and the issue can be closed

0 Kudos
Reply

559 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Decastro 

Working on your problem and will give you the feedback ASAP.

Which version of the BSP code are you using? 

B.R

0 Kudos
Reply

311 Views
Decastro
Contributor I

Hi,
the BSP i am using is 6.12-walnascar, Distro fsl-imx-xwayland, uboot version lf_v2025.04. 

thank you for the response.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2301416%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFEC%20controller%20TDAR%20bit%20not%20cleared%20(Uboot)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2301416%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20togehter%2C%3C%2FP%3E%3CP%3EI%20encountered%20an%20issue%20when%20enabling%20the%20KSZ9893%20switch%20in%20U-Boot%20(IMX6dl).%20After%20a%20cold%20reset%20and%20entering%20U-Boot%2C%20the%20TDAR%20bit%20is%20never%20cleared%20by%20the%20FEC%20after%20it%20has%20been%20set%20to%20%E2%80%9C1%E2%80%9D%20to%20indicate%20that%20there%20is%20data%20to%20be%20transmitted.%3C%2FP%3E%3CP%3EHowever%2C%20if%20the%20system%20first%20boots%20into%20Linux%20and%20then%20re-enters%20U-Boot%20via%20a%20warm%20reset%20(using%20reboot)%2C%20the%20issue%20does%20not%20occur.%3C%2FP%3E%3CP%3EI%20compared%20all%20FEC%20and%20KSZ9893%20registers%20between%20cold%20reset%20and%20warm%20reset%20scenarios%20and%20found%20them%20to%20be%20identical.%20I%20also%20compared%20the%20clock%20and%20PLL%20configurations%20in%20both%20cases%20(including%20ANALOG_PLL_528%2C%20ANALOG_PFD_528%2C%20CBCMR%2C%20CBCD%20R%2C%20and%20CCGR1)%2C%20and%20they%20are%20exactly%20the%20same.%3C%2FP%3E%3CP%3EIs%20it%20possible%20that%20some%20initialization%20or%20configuration%20step%20performed%20during%20the%20warm%20reset%20path%20is%20missing%20during%20the%20cold%20reset%2C%20which%20could%20result%20in%20the%20TDAR%20bit%20not%20being%20cleared%20in%20the%20cold%20reset%20case%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20a%20lot%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2325272%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FEC%20controller%20TDAR%20bit%20not%20cleared%20(Uboot)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2325272%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F258749%22%20target%3D%22_blank%22%3E%40Decastro%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWorking%20on%20your%20problem%20and%20will%20give%20you%20the%20feedback%20ASAP.%3C%2FP%3E%0A%3CP%3EWhich%20version%20of%20the%20BSP%20code%20are%20you%20using%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EB.R%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2354121%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FEC%20controller%20TDAR%20bit%20not%20cleared%20(Uboot)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2354121%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3Ethe%20BSP%20i%20am%20using%20is%26nbsp%3B6.12-walnascar%2C%26nbsp%3BDistro%20fsl-imx-xwayland%2C%20uboot%26nbsp%3Bversion%20lf_v2025.04.%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20the%20response.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2354536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FEC%20controller%20TDAR%20bit%20not%20cleared%20(Uboot)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2354536%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20finally%20figured%20out%20that%20there%20were%20two%20problems%20I%20needed%20to%20fix%3A%201.%20RGMII%20uses%20GPIO_16%20(RGMII_TX_CTL)%20as%20a%20clock%20source%2C%20so%20I%20had%20to%20configure%20it%20in%20the%20device%20tree%20(DT).%202.%20IOMUXC_GPR1%20was%20not%20configured%20in%20mx6dlsabresd.c.%3CBR%20%2F%3EThe%20problem%20is%20now%20solved.%20Thank%20you%20for%20your%20help%20and%20the%20issue%20can%20be%20closed%3C%2FP%3E%3C%2FLINGO-BODY%3E