i.MX28 custom board ethernet link toggling up and down


Pavithra R
 

Hi Team,

We are using a Custom imx28-evk based board with the latest iMX yocto images (Zeus) ported into it. Linux version 5.4.20-fslc+g18d5e274c780.

 The problem is when the board boots up we keep on getting prints from Ethernet driver like this:-

Configuring network interfaces... [   15.759903] SMSC LAN8710/LAN8720 800f0000.ethernet-1:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=800f0000.ethernet-1:00, irq=POLL)
udhcpc: started, v1.31.0
udhcpc: sending discover
[   17.871399] fec 800f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   18.940173] fec 800f0000.ethernet eth0: Link is Down
udhcpc: sending discover
[   19.949639] fec 800f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   21.019241] fec 800f0000.ethernet eth0: Link is Down
[   22.029599] fec 800f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
udhcpc: sending discover
[   23.099242] fec 800f0000.ethernet eth0: Link is Down
[   24.109620] fec 800f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   25.180685] fec 800f0000.ethernet eth0: Link is Down

Board never gets assigned any IP. This prints goes on forever. Ethernet works fine in bootloader. We are able to do TFTP from u-boot.

Also in the kernel everything works fine with static ip configuration with a PC.

There are no errors in packet reception. output of ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:00:00:00:00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:66 (66.0 B)  TX bytes:5130 (5.0 KiB)
We have seen that exact issue listed in a forum https://patchwork.ozlabs.org/project/netdev/patch/20151127120919.66f2bfda@.../
But this was a five year old post and seems like the mentioned patch is not relevant at all.
Our device tree contents are
<arch/arm/boot/dts/imx28.dtsi>
                mac0: ethernet@800f0000 {
                        compatible = "fsl,imx28-fec";
                        reg = <0x800f0000 0x4000>;
                        interrupts = <101>;
                        clocks = <&clks 57>, <&clks 57>, <&clks 64>;
                        clock-names = "ipg", "ahb", "enet_out";
                        status = "disabled";
                };
<arch/arm/boot/dts/imx28-evk.dts>
                mac0: ethernet@800f0000 {
                        phy-mode = "rmii";
                        pinctrl-names = "default";
                        pinctrl-0 = <&mac0_pins_a>;
                        phy-supply = <&reg_fec_3v3>;
                        phy-reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
                        phy-reset-duration = <1000>;
                        status = "okay";
                };
Note: when we manually set the link speed to 10mbps using ethtool, Ethernet works fine.This issue occurs with 100mbps speed and it seems to have some issue with autonegotiation.
Please consider this issue in priority and help to resolve this issue at the earliest.

Regards,


Pavithra R
Hardware Engineer
Gadgeon Smart Systems
m:+91-94965-18808 (India)
w:www.gadgeon.com
www.delpheon.io  
 www.linkedin.com/in/hariprasad-vnair


Join {meta-freescale@lists.yoctoproject.org to automatically receive all group messages.