AnsweredAssumed Answered

AR8031 phy loss packet on i.MX6Q

Question asked by Yanfa Li on Aug 20, 2017
Latest reply on Aug 24, 2017 by Yanfa Li

Hi,

   I am using a custom i.MX6Q  board. Linux kernel is download from Freescale git, and linux kernel version is rel_imx_4.1.15_2.0.0_ga_linux. The phy on  i.MX6Q  board is AR8031 which works auto negotiatioan, 100M Full duplex mode. When I using ping comand to test network, AR8031 phy loss packet occured. I don't know what has happened.

   The pins configuration of network in devicetree file is as follow.

      pinctrl_enet: enetgrp {
         fsl,pins = <
            MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
            MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
            MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
            MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
            MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
            MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
            MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
            MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
            MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
            MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
            MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
            MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
            MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
            MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
            MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
            MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
        >;
      };

      fec: ethernet@02188000 {
         compatible = "fsl,imx6q-fec";
         reg = <0x02188000 0x4000>;
         interrupts-extended =
         <&gpc 0 118 IRQ_TYPE_LEVEL_HIGH>,
         <&gpc 0 119 IRQ_TYPE_LEVEL_HIGH>;
         clocks = <&clks IMX6QDL_CLK_ENET>,
         <&clks IMX6QDL_CLK_ENET>,
         <&clks IMX6QDL_CLK_ENET_REF>;
         clock-names = "ipg", "ahb", "ptp";
         stop-mode = <&gpr 0x34 27>;
         fsl,wakeup_irq = <0>;
         status = "disabled";
      };

      &fec {
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_enet>;
         phy-mode = "rgmii";
         phy-reset-gpios = <&gpio1 25 0>;
         fsl,magic-packet;
         status = "okay";
        };

   The diagram of i.MX6Q board is as follow.

               

            

 

   Boot linux and the kernel print message is as follow.

      [ 3.934969] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY       (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
      [ 3.974538] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
      [ 6.944930] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
      [ 6.952785] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

      Please press Enter to activate this console.

 

   Packet loss is as follow.

      

 

Can someone help me?

   

Outcomes