This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MDIO controller locks up with Micrel KSZ8863

Other Parts Discussed in Thread: AM3505

I am using AM3505 with the davinci_mdio driver integrated with micrel's 3-port phy. One port is RMII to the cpu. The MDIO communication fails intermittently on some boards. My question is about an mdio ctrl lock up condition which occurs from time to time. I saw a comment in TI driver's code:

/*
* This timeout definition is a worst-case ultra defensive measure against
* unexpected controller lock ups. Ideally, we should never ever hit this
* scenario in practice.
*/
#define MDIO_TIMEOUT 100 /* msecs */

What can cause the controller to lock up and what should I be checking?

One more thing. Regarding the MDIO CLK speed. It is overwritten in board file by

static struct mdio_platform_data am3505_mdio_pdata = {
.bus_freq = AM35XX_MDIO_FREQUENCY,
};

which actually overwrites the DEF_OUT_FREQ in the davinci_mdio.c

It usually works but when last time I put AM35XX_MDIO_FREQUENCY to 200000 (200KHz) I've then measured 640KHz(??) on scope. Same effect is when I am commenting out the board setting for the .bus_freq.

The symptom related to all discussed above is my inability to configure the micrel chip via MDIO, reading and probably writing fail occasionally. It is quite an acute system issue.  

Would appreciate you sharing your experience over the MDIO controller "out-of-bounds" behavior.

Regards,

Yakir