Hi there,
I am trying to bring up the ethernet port on a custom board with OMAPL138 ARM processor and Micrel KSZ8081RNB1A PHY. The PHY address lines are connected to ground (Hence I am usnig 0 as phy address). I am using the following sequence to program the MDIO link
1) Set the enable bit in MDIO_CONTROL
2) Set the Clock Div bits in MDIO_CONTROL(value I am using is 50)
3)Wait for delay (I am initializing a variable to 0xFFF and waiting till it counts down to 0)
4)Read the Alive status register (at offset 0x8 from MDIO BASEADDRESS). Alive address is constantly 0 which means that the PHY link is not up
I am also trying to read from the PHY_ID registers to see if the read is successful
1) I check if the GO bit in the MDIO_USERACCESS0 reg is low
2) Set the phy address, phy register address, GO bit and clear the write enable bit in the USERACCESS0 register
3) Wait for a delay(I am initializing a variable to 0xFFF and waiting till it counts down to 0)
4) Wait for GO bit to be cleared which indicates that MDIO state machine has acknowledged the GO bit.
After this, when I check the ACK in the USERACCESS0 (which indicates that PHY has acknowledged the read) it indicates a 0.
Could you please let me know if I am missing something in the sequence ?
Additionally, I tried all possible PHY ADDR combinations (0-7). Still I dont seem to get a successful read/write.
Thank you