i.MX 6UltraLite and external clock for ENET

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX 6UltraLite and external clock for ENET

1,952 Views
afros
Contributor I

Hi,

I'm trying to bring up the Enet1 subsystem of custom board. We use LAN8720 phy chip which should provided reference clock. From electrical point of view it seems that we have everything all right: 25MHz signal from external oscillator connected to LAN8720 and 50MHz signal on the output connected to ENET1_TX_CLK pad.

I'm working with uboot-imx v2015.04_3.14.38_6ul_ga code and basing on IMX6UL EVK, I made following modifications:

1) Set correct CONFIG_DEF_ENET_DEV to 0x0

2) Set CONFIG_FEC_MXC_PHYADDR to 0x0

3) Set ENET1_CLK_SEL bit in IOMUXC_GPR_GPR1

4) Clear ENET1_TX_CLK_DIR bit in IOMUXC_GPR_GPR1

5) Use MX6_PAD_ENET1_TX_CLK_ENET1_TX_CLK mux instead of MX6_PAD_ENET1_TX_CLK_ENET1_REF_CLK1

After those steps I'm able to read PHY registers via MDIO, but I'm not able to send/receive packets via RMII (timeout on fec_send() and empty buffer in fec_recv()). I was checking all relevant registers and they look ok, so probably I missed something.

Did you try to use external clock for Enet subsystem on this CPU? Cloud you please give me some advice what can be wrong?

Thank you in advance for your engagement.

Labels (2)
0 Kudos
7 Replies

1,246 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Piotr Piwko,

The i.MX6UL EVK uses a different PHY so some adjustments have to be made software wise in order for the new PHY to work correctly. Have you made these adjustments or which driver are you using?

Regards,

0 Kudos

1,246 Views
afros
Contributor I

Hi,

Yes, I changed the phy driver to SMSC which basically uses genphy_* callbacks. Do you think about some specific adjustments?

Thanks for the interest.

0 Kudos

1,246 Views
ispsubb
Contributor II

Do you get the answer ?

I have the same problem .

0 Kudos

1,246 Views
afros
Contributor I

In our case it was the HW problem - we had a bad PHY reset connection.

Did you try to perform PHY software reset at the beginning of ENET initialization?

0 Kudos

1,246 Views
ispsubb
Contributor II

I try to sw reset !

int board_phy_config()

val = phy_read(phydev, MDIO_DEVAD_NONE, 0x00);

  phy_write(phydev, MDIO_DEVAD_NONE,0x0, (val |(1 << 15)));

  for(i = 0; i < 20; i++)

  {

        udelay(5000);

        udelay(5000);

        udelay(5000);

        udelay(5000);

  }

  val = phy_read(phydev, MDIO_DEVAD_NONE, 0x00);

  if (val & (1 << 11))

  {    

        phy_write(phydev, MDIO_DEVAD_NONE, 0x00, (val & ~(1 << 11)));

  }

0 Kudos

1,246 Views
afros
Contributor I

How do you have the HW Reset made? Could you drive PHY Reset pin manually in code?

We connected PHY Reset pin to some GPIO and manually set its value. That solves our problem.

0 Kudos

1,246 Views
ispsubb
Contributor II

thanks , i think the reset pin is right , we can measure the gpio reset pin

0 Kudos