[U-Boot-Users] AT91SAM9260EK with KS8721 PHY

Sander Vermin sander at vermin.nl
Mon Apr 7 15:16:07 CEST 2008


Hello,

I'm trying to build a U-Boot from your git tree with the AT91 patches. 
My board is a custom board with a KS8721 instead of the DM9161 network 
PHY chip. This is the same chip as Olimex used on their development board.

Olimex build a U-Boot for their board, they did some code hacking on 
u-boot. As far as I know they did the following to get the ethernet up 
and running. [1] This is in the board/at91sam9260ek/dm9161a.c file

On the latest git version with the AT91 patches the ethernet driver is 
called macb??!!

Do you know how I can get this working? (as hack and in the future more 
clean)

Kind regards,

Sander Vermin

[1]
static unsigned int dm9161a_IsPhyConnected (AT91PS_EMAC p_mac)
{
    unsigned short Id1, Id2;

    at91_EmacEnableMDIO (p_mac);
    at91_EmacReadPhy (p_mac, SAM9260EK_PHY_ADDRESS, DM9161_PHYID1, &Id1);
    at91_EmacReadPhy (p_mac, SAM9260EK_PHY_ADDRESS, DM9161_PHYID2, &Id2);
    at91_EmacDisableMDIO (p_mac);
   
    /*printf(" Id1 0x%04x\n", Id1);
    printf(" Id1 0x%04x\n", Id2);*/
   

    if ((Id1 == (DM9161_PHYID1_OUI >> 6)) &&
        ((Id2 >> 10) == (DM9161_PHYID1_OUI & DM9161_LSB_MASK))) {
      printf("DM9161A PHY Detected\n\r");
      return TRUE;
    }
   
    if ((Id1 == MICREL_ID_1) && (Id2 == MICREL_ID_2)) {
        printf("KS8721 PHY Detected\n\r");
        return TRUE;
    }
   
    return FALSE;
}






More information about the U-Boot mailing list