Hi
You can disable the internal PHY if you don't want to use it (default is disabled).
Depending on the external PHY that you are using you may need to connect the full MII interface or you may be able to work in 7 bit reduced MII mode.
The corresponding port bits then have to be configured for MII peripheral use rather than their defaul GPIO mode.
The rest of the details are probably more PHY specific than M5223X specific:
- normally the MII lines are easy to connect since they use more or less the same names (eg. MII_RXCLK - RCLK, etc)
- The external PHY can either be connected to the Reset line of the M5223X or a port so that a reset can easily be commanded - sometimes this is a good idea because most PHYs read in their configuration at reset from shared pins and if a pull-up or pull-down doesn't suit the M5223X can control a reset and also the pin states to guaranty the correct setting.
- If you want an interrupt from the external PHY you will have to use an IRQ line (the internal PHY has a dedicated interrupt of course).
- Depending on whether you want to use default PHY settings you will have to ensure that you can communicate with it - PHY address is usually set by pull-up/downs on the chip. It may be necessary to do some extra configuration of the external PHY via the MDC (included in the MII connections) depending on the device and its function
I haven't used an external PHY with the M5223X but I don't expect there to be anything else to consider. I have used an external PHY on the M9S12NE64 (the little brother of the M5223X) - connecting a power line modem via MII and it was very straight forward. It was simply necessary to not enable the internal PHY and the rest worked identically (the external PHY did however has its own automatic configuration so this simplified).
Regards
Mark Butcher