This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x & lan8710 & RMII ping 不通

我用的是beaglebone black的uboot

1)Program GMII_SEL in control module with 0x5 for RMII Interface

2)Pinmux configuration to support rmii interface

3)Phy ID setting in Platform data(由PHY的硬件电路决定,通过在PHY_ID的三个管脚上下拉来决定)

----------以上3点都设置好了,依然ping不通

Pinmux如下

static struct module_pin_mux rmii1_pin_mux[] = {
{OFFSET(mii1_crs), MODE(1) | RXACTIVE}, /* RMII1_CRS */
{OFFSET(mii1_rxerr), MODE(1) | RXACTIVE}, /* RMII1_RXERR */
{OFFSET(mii1_txen), MODE(1)}, /* RMII1_TXEN */
{OFFSET(mii1_txd1), MODE(1)}, /* RMII1_TXD1 */
{OFFSET(mii1_txd0), MODE(1)}, /* RMII1_TXD0 */
{OFFSET(mii1_rxd1), MODE(1) | RXACTIVE}, /* RMII1_RXD1 */
{OFFSET(mii1_rxd0), MODE(1) | RXACTIVE}, /* RMII1_RXD0 */
{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
{OFFSET(mdio_clk), MODE(0) | PULLUP_EN}, /* MDIO_CLK */
{OFFSET(rmii1_refclk), MODE(0) | RXACTIVE}, /* RMII1_REFCLK */
{-1},
};

writel(RMII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
PHY_INTERFACE_MODE_RMII;

我的启动信息如下

U-Boot SPL 2014.10-dirty (Dec 13 2014 - 16:08:44)
rmii1_pin_mux
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2014.10-dirty (Dec 13 2014 - 16:08:44)

Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net: getenv(ethaddr) = <NULL>
<ethaddr> not set. Validating first E-fuse MAC
getenv(eth1addr) = <NULL>
&cdev->miisel = 000000f0
&cdev->miisel = 00000005
cpsw, usb_ether
Hit any key to stop autoboot: 0
U-Boot# setenv ipaddr 192.168.1.10 setenv serverip 192.168.1.5 setenv gatewayip 192.168.1.1
U-Boot# ping 192.168.1.5
cpsw Waiting for PHY auto negotiation to complete.. done
link up on port 0, speed 100, full duplex
Using cpsw device
ping failed; host 192.168.1.5 is not alive

如果上述3点没有配置好,应该会打印cpsw Waiting for PHY auto negotiation to complete.. timeout

另外,我确定我的板子硬件是好的,烧别的程序网络正常。