status register value always reads 0x0000 in eth_mcux_phy_setup #23221
Labels
area: Ethernet
bug
The issue is a bug, or the PR is fixing a bug
platform: NXP
NXP
priority: medium
Medium impact/importance bug
Describe the bug
In
drivers/ethernet/eth_mcux.c:eth_mcux_phy_setup
ENET_ReadSMIData
is called right after callingENET_StartSMIRead
without waiting for the MII interrupt, which leads to the value of the status variable to always be0x0000
.The correct sequence is documented in the i.MX RT1060 reference manual in chapter 41.7.17.4.
I've hacked the
eth_mcux_phy_setup
function to poll the EIR register until the MII interrupt bit is set before reading the status register and it works (i.e. the content of the status register is correctly retrieved).Expected behavior
Status register value is correctly retrieved.
Impact
Calling
eth_mcux_phy_setup
has no effect.Environment (please complete the following information):
Additional context
This problem occurs on a custom board equipped with the IMXRT1062 MCU but should occur as well with the MIMXRT1060-EVK.
The text was updated successfully, but these errors were encountered: