[En-Nut-Discussion] Patch needed for Olimex Board AT91SAM7-EX256

Marc Wetzel mwse at gmx.de
Mon Nov 27 11:02:48 CET 2006

Thank you Uwe...

your hints were greatly appreciated (regarding the NEG PHY_PowerDown Bit)

Furthermore, the following changes were needed, to get it up and running:

I applied the following patch to EmacReset()

/* PHY ID */
#define MII_DM9161_ID_H     0x0181
#define MII_DM9161_ID_L     0xb8a0

#define MII_AM79C875_ID_H   0x0022
#define MII_AM79C875_ID_L   0x5540	

#define MII_MICREL_ID_H     0x0022
#define MII_MICREL_ID_L     0x1610

     /* For some unknown reason it seems to be required to read the ID 
registers first. */
     // Check for DM PHY (as used on the ATMEL EK)
     if (phy_inw(NIC_PHY_ID1) != MII_DM9161_ID_H ||
        (phy_inw(NIC_PHY_ID2) & 0xFFF0) != MII_DM9161_ID_L) {
     // Check for MICREL PHY (as used on the Olimex SAM7-EX256)   	
         if (phy_inw(NIC_PHY_ID1) != MII_MICREL_ID_H ||
	   (phy_inw(NIC_PHY_ID2) & 0xFFF0) != MII_MICREL_ID_L) {
            outr(EMAC_NCR, inr(EMAC_NCR) & ~EMAC_MPE);
            return -1;

The Olimex board uses another PHY (MICREL) I just patched enough, to get 
it up and running.

Maybe this ID selection should also happen in the configurator, so 
developers using a different kind of PHY have a chance to think about it :-)

Best regards

More information about the En-Nut-Discussion mailing list