我现在用的是 imx6q + AR8033的千兆网卡方案。目前在android4.4中测试,一切都OK,但是在linux 3.14.52的内核中在千兆网络是,可以linkup上,并且可以识别到带宽是千兆。但是用udhcpc自动分配IP时一直获取不到IP,采用静态IP也是一直ping不通。我强制将网卡设置成百兆的也都没问题。请问下这个问题该怎么解决,有没有什么思路可以提供给我。谢谢了。
下面是PHY设置的参数
static int ar8031_phy_fixup(struct phy_device *dev)
{
u16 val;
/* Set RGMII IO voltage to 1.8V */
phy_write(dev, 0x1d, 0x1f);
phy_write(dev, 0x1e, 0x8);
/* disable phy AR8031 SmartEEE function. */
phy_write(dev, 0xd, 0x3);
phy_write(dev, 0xe, 0x805d);
phy_write(dev, 0xd, 0x4003);
val = phy_read(dev, 0xe);
val &= ~(0x1 << 8);
phy_write(dev, 0xe, val);
/* To enable AR8031 output a 125MHz clk from CLK_25M */
phy_write(dev, 0xd, 0x7);
phy_write(dev, 0xe, 0x8016);
phy_write(dev, 0xd, 0x4007);
val = phy_read(dev, 0xe);
val &= 0xffe3;
val |= 0x18;
phy_write(dev, 0xe, val);
/* introduce tx clock delay */
phy_write(dev, 0x1d, 0x5);
val = phy_read(dev, 0x1e);
val |= 0x0100;
phy_write(dev, 0x1e, val);
return 0;
}