AnsweredAssumed Answered

Using RMII(SMSC LAN8720A) on i.MX6solo

Question asked by Jay Kim on Aug 26, 2013
Latest reply on Jul 4, 2016 by Mo sadri

Hello,

 

We use SMSC's LAN8720A as RMII PHY on i.MX6solo and currently having problem with

send & receiving packets(Checking at U-boot).

 

U-Boot > ping 192.168.100.1

eth_halt: wait for stop regs

eth_halt: done

Trying FEC

fec_tbd_init

Using FEC device

fec_send: status 0x8c00 index 0 ret -22

fec_recv: ievent 0x0

fec_recv: status 0x8000

fec_recv: stop

fec_recv: ievent 0x0

fec_recv: status 0x8000

fec_recv: stop

...


First of all, normally which cause "eth_halt: wait for stop regs" at the beginning?

By looking at code, fec_send function stuck at below two points and return error codes,

while (--timeout) {
   if (!(readl(&fec->eth->x_des_active) & FEC_X_DES_ACTIVE_TDAR))
   break;

    }

 

if (readw(&fec->tbd_base[fec->tbd_index].status) & FEC_TBD_READY)
   ret = -EINVAL;


Here's our IOMUX configuration and schematics

Needs help for fix this problem step by step.

 

iomux_v3_cfg_t const enet_pads[] = {

    MX6_PAD_ENET_MDC__ENET_MDC           | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_MDIO__ENET_MDIO            | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_RXD0__ENET_RDATA_0       | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_RXD1__ENET_RDATA_1      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_CRS_DV__ENET_RX_EN      | MUX_PAD_CTRL(ENET_PAD_CTRL),

//    MX6_PAD_ENET_RX_ER__ENET_RX_ER      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_RX_ER__GPIO_1_24      | MUX_PAD_CTRL(NO_PAD_CTRL),

    /* FEC Intterupt */

    MX6_PAD_ENET_REF_CLK__GPIO_1_23      | MUX_PAD_CTRL(NO_PAD_CTRL),

    MX6_PAD_ENET_TXD0__ENET_TDATA_0      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_TXD1__ENET_TDATA_1      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    MX6_PAD_ENET_TX_EN__ENET_TX_EN      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    /* clock from anatop */

    MX6_PAD_GPIO_16__ENET_ANATOP_ETHERNET_REF_OUT      | MUX_PAD_CTRL(ENET_PAD_CTRL),

    /* LAN8720A PHY Reset */

    MX6_PAD_RGMII_TXC__GPIO_6_19      | MUX_PAD_CTRL(NO_PAD_CTRL),

};

 

sch.jpg

Thanks in advance,

Jay

Outcomes