Part Number: AM5728
Hello,
We have a few questions regarding the operation of the MDIO interface in Sitara AM5728 CPU. We have the CPU MDIO interface connected to a
Marvel switch SMI interface.
In order to stress test the MDIO interface, we are sending read/write accesess, with preamble enabled, to an switch chipset,
into the device ID and the scratch pad registers (one 16bit register where we are writing an incremental pattern and
read back for verification). These tests are done on our own port of Debian Linux, but, maybe we could have a look at TI SDK
driver code, to verify the implementation. Please provide some pointers.
After roughly 70 cycles (74 in the case of this particular test) successful accesses, our Software driver reports that bad data
was received (0xFFFF, which would mean no response from the switch). However, with an external debugger on the SMI bus,
we are seeing that the switch responded correctly with the 0x004B expected data, but the driver missed the “good” data from
the useraccess0 register, and, instead, read the data from the next Phy transaction, which went to an undefined phy, which
would explain the 0xFFFF data. The next Phy transaction was initiated automatically by the Phy polling unit.
The question would be: what mechanisms are in place so that the software driver would be able to corelate data read back
from the useraccess0 register with a specific Phyadd/Regadd combination where the data actually came from?
Or, to formulate it in a different way, what would be the best method of synchronizing a CPU register read access
to useraccessx registers with the actual SMI transactions so that, with a high probability of success, I can guarantee that
the data that I read back from useraccessx is actually coming from my initiated read access, and not from some subsequent
Phy accesses which are automatically initiated by the Phy polling state machines.
Thank you,
Petru
