I am trying to use the ethernet PHY which comes with my Digilent Nexus 4 DDR, a Microchip LAN8720A (datasheet). I wrote a controller which lets me read and write values to the smi registers using the mdio and mdc signals. Now I need to be able to tell if I am running in 10 Mbps or 100 Mbps mode. Also whether I am in full or half duplex mode. It looks like register 1 (BASIC STATUS REGISTER) would contain this information. However, this register has bits 14-11 enabled. These bits accoring to my spec mean...
14 - 100BASE-TX Full Duplex
13 - 100BASE-TX Half Duplex
12 - 10BASE-T Full Duplex
11 - 10BASE-T Half Duplex
I suppose this is telling me what the phy can do, and not the speed of the current link established by the auto negotiation. There is also the auto negotiation advertisement register (reg 4) which has multiple modes enabled, and the link partner ability register (reg 5). This two shows all four modes being lit up.
How can I tell what speed / duplex mode my link is? Do I have to infer it by picking the intersection of the highest ability from the link partner ability register and auto negotiation advertisement register?