AnsweredAssumed Answered

i.MX6UL ENET1 (with LAN8720A PHY) working in Uboot but not in Linux

Question asked by Matthew Starr on Apr 13, 2016
Latest reply on Nov 14, 2017 by lvmh

I have a custom board where I am using a single Ethernet connection on ENET1 (fec1 in Linux).  I am able to ping and transfer a file using TFTP in Uboot, but I am unable to ping or see any activity once in Linux.  I have checked that my IOMUX configuration is identical between Uboot and Linux. I can setup a MAC address in Uboot or through the .dts file, but neither seem to help in Linux.  I have verified using an oscilloscope that I am getting a 50MHz clock coming out of ENET1_TX_CLK on the i.MX6UL.  I am able to use mii-diag and ethtool to probe settings of the interface and PHY successfully. I see no change in the received or transmitted packets count when I run ifconfig after attempting to send the board messages from a PC or from trying to send from the board to the PC.


As a side note I have Wi-Fi working on this same board in Linux so networking in general is working.


Additionally the schematic layout is almost identical to an i.MX53 using the same LAN8720A PHY, except that the i.MX53 used an external source for the 50MHz clock and in the this board the clock is generated by the i.MX6UL.


I have tested using the following versions of software with the same results:

U-boot: 2015.04 tags:  rel_imx_3.14.38_6ul_ga, rel_imx_3.14.52_1.1.0_ga, and rel_imx_4.1.15_1.1.0_ga

Linux tags:  rel_imx_3.14.38_6ul_ga, rel_imx_3.14.52_1.1.0_ga, and rel_imx_4.1.15_1.1.0_ga


Here is the output at Linux boot related to Ethernet:

[    3.197605] libphy: fec_enet_mii_bus: probed

[    3.214882] fec 2188000.ethernet eth0: registered PHC device 0

[    4.813571] fec 2188000.ethernet eth0: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1)

[    4.850884] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[    7.891111] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

[    7.899009] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


After attempting to use the eth0 interface with no success and then bringing down the interface, I get the following message:

[   70.000719] fec 2188000.ethernet eth0: Graceful transmit stop did not complete!


Here is my Linux .dts file related contents:

&fec1 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_enet1>;

        phy-mode = "rmii";

        phy-handle = <&ethphy>;

        local-mac-address = [00 04 9F 01 1B B9];

        phy-reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;

        phy-reset-duration = <1>;

        phy-supply = <&sw2_reg>;

        status = "okay";

        mdio {

                #address-cells = <1>;

                #size-cells = <0>;

                ethphy: ethernet-phy@0 {

                        compatible = "ethernet-phy-ieee802.3-c22";

                        reg = <0>;

                        interrupt-parent = <&gpio1>;

                        interrupts = <19 8>;

                        max-speed = <100>;





pinctrl_enet1: enet1grp {

        fsl,pins = <

                MX6UL_PAD_UART1_CTS_B__GPIO1_IO18       0x0b0b0 /* MPU_ETH_RESET */

                MX6UL_PAD_UART1_RTS_B__GPIO1_IO19       0x0b0b0 /* MPU_ETH_INT */

                MX6UL_PAD_GPIO1_IO07__ENET1_MDC         0x1b0a9 /* ENET_MDC */

                MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b8a9 /* ENET_MDIO */

                MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0a9 /* FEC_CRS_DV */

                MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER      0x1b0a9 /* FEC_RX_ER */

                MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0a9 /* FEC_RXD0 */

                MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0a9 /* FEC_RXD1 */

                MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0a9 /* FEC_TX_EN */

                MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x000a9 /* FEC_TXD0 */

                MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x000a9 /* FEC_TXD1 */

                MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x010a9 /* FEC_TXCLK */




Here is the output from mii-diag:

Using the default interface 'eth0'.

Basic registers of MII PHY #0:  3100 782d 0007 c0f1 05e1 cde1 000b ffff.

The autonegotiated capability is 01e0.

The autonegotiated media type is 100baseTx-FD.

Basic mode control register 0x3100: Auto-negotiation enabled.

You have link beat, and everything is working OK.

Your link partner advertised cde1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.

   End of basic transceiver information.


Here is the output from ethtool:

Settings for eth0:

Supported ports: [ TP MII ]

Supported link modes:   10baseT/Half 10baseT/Full

                        100baseT/Half 100baseT/Full

Supported pause frame use: Symmetric

Supports auto-negotiation: Yes

Advertised link modes:  10baseT/Half 10baseT/Full

                        100baseT/Half 100baseT/Full

Advertised pause frame use: Symmetric

Advertised auto-negotiation: Yes

Link partner advertised link modes:  10baseT/Half 10baseT/Full

                                     100baseT/Half 100baseT/Full

Link partner advertised pause frame use: Symmetric Receive-only

Link partner advertised auto-negotiation: Yes

Speed: 100Mb/s

Duplex: Full

Port: MII


Transceiver: external

Auto-negotiation: on

Supports Wake-on: g

Wake-on: d

Link detected: yes


Here is the output of ifconfig after trying to send packets to and send package from the board:

eth0      Link encap:Ethernet  HWaddr DE:AD:BE:EF:DE:AD 

          inet addr:  Bcast:  Mask:

          inet6 addr: fe80::dcad:beff:feef:dead/64 Scope:Link


          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Anyone have any suggestions on what might be wrong or what next to check to get Ethernet working in Linux on the i.MX6UL?