To set up the PHY, you write the address of the PHY into EPHYCTL1 (might as well just make this 0), then setup the EPHYCTL0 for what you want, (if you're not using autoneg. both the 100 and 10 PLL's need to be on). You then need a delay until you can write the MII. The following seems to work:
//DELAY, Delay start-up
for (myctr=200000; myctr >0; myctr--)
{
}
There should be a mii.c and mii.h in your project if you're using the coldfire stationary. The last thing I set up in my main.c is the MII. I call the fec_mii_init and fec_mii_blk_init and then I perform a fec_mii_write. I just write to the control register (register 0).
/********************************************************************/
/* Enable the MII interface and print MII registers
/********************************************************************/
fec_mii_init(SYSTEM_CLOCK);
/********************************************************************/
/* Clear MII block count registers and check that they are all clear.
/********************************************************************/
fec_mii_blk_init(); // intialize counter to zero
/********************************************************************/
/* Set up the Phy for 100 baseT, full duplex
/********************************************************************/
mii_test = fec_mii_write(0,0,0x2100);
if(mii_test != 1) sendtext("\r\n******MII write failed******\r\n");
else sendtext("\r\n******MII write OK******\r\n");
On the fec side of things all I change is the following in fec_reset in fec.c:
/* Setup transmitter */
MCF_FEC_TCR = MCF_FEC_TCR_FDEN; //full duplex
I think this works, I just don't know how to prove if its really operating in full duplex.