楼主你好,默认的是使用RGMII (AR8031 1000M bit Ethernet phy) ,你提到的
#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
mx6_rgmii_rework(dev->name, info->phy_addr);
是在u-boot-2009.08/board/freescale/mx6q_sabresd/mx6q_sabresd.c有定义,如下所示:
int mx6_rgmii_rework(char *devname, int phy_addr) ----------------------------主要是从 AR8031 输出一个125MHz的CLK给i.mx6使用
{
unsigned short val;
/* To enable AR8031 ouput a 125MHz clk from CLK_25M */
phy_write(devname, phy_addr, 0xd, 0x7);
phy_write(devname, phy_addr, 0xe, 0x8016);
phy_write(devname, phy_addr, 0xd, 0x4007);
phy_read(devname, phy_addr, 0xe, &val);
val &= 0xffe3;
val |= 0x18;
phy_write(devname, phy_addr, 0xe, val);
/* introduce tx clock delay */
phy_write(devname, phy_addr, 0x1d, 0x5);
phy_read(devname, phy_addr, 0x1e, &val);
val |= 0x0100;
phy_write(devname, phy_addr, 0x1e, val);
return 0;
}
|