IMX6Q RMII interface with KSZ8895RQXCA ping error

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

IMX6Q RMII interface with KSZ8895RQXCA ping error

Jump to solution
857 Views
linwangzhao
Contributor II

IMX6Q通过RMII接口与以太网交换机芯片KSZ8895RQXCA相连,设备树中关于网络的配置如下:

&fec {
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_enet>;
      phy-mode = "rmii";
      phy-reset-gpios = <&gpio1 18 0>;
      fsl,magic-packet;
      status = "okay";
      fixed-link {
         speed = <100>;
         full-duplex;
         pause;
      };
};

pinctrl_enet: enetgrp {
fsl,pins = <
MX6QDL_PAD_ENET_MDIO__ENET_MDIO            0x1b0b0
MX6QDL_PAD_ENET_MDC__ENET_MDC              0x1b0b0
MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN        0x1b0b0
MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0     0x1b018
MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1      0x1b018
MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER        0x1b0b0
MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0     0x1b018
MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1     0x1b018
MX6QDL_PAD_GPIO_16__ENET_REF_CLK             0x4001b0a8
MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN     0x1b0b0
>;
};

目前:imx6q(192.168.1.4)无法ping通同一网段内的我的电脑(192.168.1.2),我的电脑也无法ping通imx6q。通过示波器可以看到imx6q上的TX0/TX1/RX0/RX1都有信号,而且MX6QDL_PAD_GPIO_16__ENET_REF_CLK上有50Mhz的信号。在我的电脑端使用Wireshark抓包工具可以看到imx6q发送的数据包,而且此时我的电脑也响应了该数据包,但是imx6q端没有接收到数据包,也可能是接收的是错误的数据包。

1、使用imx6q(192.168.1.4)ping我的电脑(192.168.1.2)的信息如下:

      root@imx6qsabresd:~# ping 192.168.1.2
      PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
      From 192.168.1.4 icmp_seq=1 Destination Host Unreachable
      From 192.168.1.4 icmp_seq=2 Destination Host Unreachable
      From 192.168.1.4 icmp_seq=3 Destination Host Unreachable
      From 192.168.1.4 icmp_seq=4 Destination Host Unreachable

2、使用 ifconfig eth0命令查看的信息如下:

      root@imx6qsabresd:~# ifconfig eth0
      eth0 Link encap:Ethernet HWaddr 32:34:46:78:9a:dc
      inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
      inet6 addr: fe80::3034:46ff:fe78:9adc/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:0 errors:2562 dropped:0 overruns:0 frame:2562
      TX packets:573 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:0 (0.0 B) TX bytes:311879 (304.5 KiB)

Labels (1)
0 Kudos
Reply
1 Solution
641 Views
linwangzhao
Contributor II

问题已解决,MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER引脚需要接下拉电阻。

View solution in original post

0 Kudos
Reply
1 Reply
642 Views
linwangzhao
Contributor II

问题已解决,MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER引脚需要接下拉电阻。

0 Kudos
Reply