Page 2 of 2

Re: Ethernet PHY hardware interrupt

Posted: Sun Nov 24, 2013 4:29 pm
by rubenswerk
The KSZ8031 has a strapping option for enabling auto negotiation.
The state of a pin is samples when reset pin is released. According to the data sheet, this pin has an internal pullup, leading to a activation of auto negotiation by default.

When I read the control register I can see that in some power cycles the auto negotiation bit is not set, leading to 10bmps mode.
I tried external pullup resistors, but the problem remains!

The MAC driver always does a read-modify-write when changing the control register. The only exception is when setting the reset bit all other bits are 0, but this should be ok. In all other cases, the auto negotiation bit (which should be there) is not cleared. I don't understand why the PHY does not activate auto negotiation sometimes...

A workaround for my problem is to manually configure 100mbps by setting the speed select bit in control register manually, right after waiting for the PHY reset to be finished in mac_lld.c

But I would prefer a clean solution. I tried to manually set the auto negotiation enable bit, and also the auto negotiation restart bit, but in that case, ethernet is dead. The link LED is on, but no ping reply.
Anybody who has experience with KSZ8031?
Thanks!