AnsweredAssumed Answered

i.MX6ULL using both ethernet ports, but ENET1 won't work

Question asked by Christoph Niedermaier on Aug 9, 2018
Latest reply on Oct 16, 2018 by Christoph Niedermaier

I'm using a customized board based on the iMX6ULL 14x14 evk board.

My board uses 2x SMSC 8710A phys.

NXP Linux Kernel 4.1.15

ENET1: link up is shown, didn't get a IP address

ENET2: link up is shown, got IP address

 

Device Tree:

&fec1 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_enet1>;

        phy-mode = "rmii";

        phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;

        phy-reset-post-delay = <10>;

        phy-handle = <&ethphy0>;

        status = "okay";

};

 

&fec2 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_enet2>;

        phy-mode = "rmii";

        phy-reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;

        phy-reset-post-delay = <10>;

        phy-handle = <&ethphy1>;

        status = "okay";

 

        mdio {

                #address-cells = <1>;

                #size-cells = <0>;

 

                ethphy0: ethernet-phy@0 {

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

                        reg = <0>;

                        clocks = <&clks IMX6UL_CLK_ENET_REF>;

                        clock-names = "rmii-ref";

                        max-speed = <100>;

                        status = "okay";

                };

 

                ethphy1: ethernet-phy@1 {

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

                        reg = <1>;

                        clocks = <&clks IMX6UL_CLK_ENET2_REF>;

                        clock-names = "rmii-ref";

                        max-speed = <100>;

                        status = "okay";

                };

        };

};

...

pinctrl_enet1: enet1grp {

        fsl,pins = <

                MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN            0x1b0b0

                MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER            0x1b0b0

                MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00   0x1b0b0

                MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01   0x1b0b0

                MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN              0x1b0b0

                MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00    0x1b0b0

                MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01    0x1b0b0

                MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1     0x4001b031

                /* SMSC PHY Reset */

                MX6UL_PAD_LCD_DATA18__GPIO3_IO23                     0xb0

        >;

};

 

pinctrl_enet2: enet2grp {

        fsl,pins = <

                MX6UL_PAD_GPIO1_IO07__ENET2_MDC                  0x1b0b0

                MX6UL_PAD_GPIO1_IO06__ENET2_MDIO                 0x1b0b0

                MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN          0x1b0b0

                MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER          0x1b0b0

                MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0

                MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0

                MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN            0x1b0b0

                MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00  0x1b0b0

                MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01  0x1b0b0

                MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2   0x4001b031

                /* SMSC PHY Reset */

                MX6UL_PAD_LCD_DATA19__GPIO3_IO24                   0xb0

        >;

};

 

After plugin both cable kernel shows the following (eth0 == ENET2, eth1 == ENET1):

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

fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

 

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

fec 2188000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

It seems that both phy MDIO communications are OK...

 

 

ifconfig (eth0 == ENET2, eth1 == ENET1):

eth0      Link encap:Ethernet  HWaddr 54:10:ec:3e:0c:3a 

          inet addr:10.64.31.115  Bcast:10.64.31.255  Mask:255.255.255.0

          inet6 addr: fe80::5610:ecff:fe3e:c3a/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:3176 (3.1 KiB)  TX bytes:1222 (1.1 KiB)

 

eth1      Link encap:Ethernet  HWaddr 54:10:ec:3e:13:ae 

          inet6 addr: fe80::5610:ecff:fe3e:13ae/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          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)

On ENET1 no packets neither received nor transmitted...

 

After unplugging ENET1 the kernel shows the following message:

fec 2188000.ethernet eth1: Graceful transmit stop did not complete!
fec 2188000.ethernet eth1: Link is Down

 

I have no Idea what is going wrong...

Could anybody help me?

Outcomes