/********************************************************************
* I.MX6 网卡能收不能发
* 说明:
* MAC控制器到PHY之间的阻抗差异。
*
* 2017-4-28 深圳 龙华樟坑村 曾剑锋
*******************************************************************/ 一、参考文档:
. Understanding MII Transceiver Status Info
ftp://ftp.psu.ac.th/pub/scyld/mii-status.html
. 关于以太网PAUSE的一点研究
http://www.latelee.org/programming-under-linux/ethernet-pause-frame-study.html 二、U-Boot设定:
setenv bootargs console=ttymxc0, init=/init video=mxcfb0:dev=ldb,bpp= video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=256M androidboot.console=ttymxc0 consoleblank= androidboot.hardware=freescale cma=384M androidboot.selinux=disabled; saveenv; reset; 三、网络设定:
. 设定ip:
ifconfig eth0 10.10.10.10 netmask 255.255.255.0
. 主板抓包工具:
tcpdump -i eth0 host 10.10.10.10 &
tcpdump -vv -i eth0 host 10.10.10.10 & 四、ethtool工具:
. Android 5.1
root@sabresd_6dq:/ # ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 100baseT/Half
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Half
Port: MII
PHYAD:
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
root@sabresd_6dq:/ # mtp_open
libphy: .ethernet: - Link is Down
libphy: .ethernet: - Link is Up - /Full
root@sabresd_6dq:/ # ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD:
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Link detected: yes
root@sabresd_6dq:/ # . Android 4.2
root@android:/data # ./ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD:
Transceiver: external
Auto-negotiation: on
Link detected: yes
root@android:/data # PHY: : - Link is Down
PHY: : - Link is Up - /Half root@android:/data # ./ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: MII
PHYAD:
Transceiver: external
Auto-negotiation: on
Link detected: yes 五、AR8031寄存器值:
address 0x0 = 0x1000 .
address 0x1 = 0x796d .
address 0x2 = 0x4d .
address 0x3 = 0xd074 .
address 0x4 = 0x15e1 .
address 0x5 = 0xcde1 .
address 0x6 = 0xd .
address 0x7 = 0x2001 .
address 0x8 = 0x0 .
address 0x9 = 0x300 .
address 0xa = 0x3801 .
address 0xb = 0x0 .
address 0xc = 0x0 .
address 0xf = 0xa000 .
address 0x10 = 0x862 .
address 0x11 = 0xbc5c .
address 0x12 = 0x0 .
address 0x13 = 0x0 .
address 0x14 = 0x82c .
address 0x15 = 0x0 .
address 0x16 = 0x4e8 .
address 0x17 = 0x0 .
address 0x18 = 0x3200 .
address 0x19 = 0x3000 .
address 0x1a = 0x0 .
address 0x1b = 0x63e .
address 0x1c = 0x0 .
address 0x1f = 0x8100 . 六、引脚重新配置:
#define MX6DL_ENET_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
#define PAD_CTL_PKE (1 << 12) 1 0000 0000 0000
#define PAD_CTL_PUE (1 << 13) 10 0000 0000 0000
#define PAD_CTL_PUS_100K_UP (2 << 14) 1000 0000 0000 0000
#define PAD_CTL_SPEED_MED (2 << 6) 1000 0000
#define PAD_CTL_DSE_40ohm (6 << 3) 11 0000
#define PAD_CTL_HYS (1 << 8) 1 0000 0000 b1b0 #define MX6DL_ENET_REF_CLK_PAD_CTRL (PAD_CTL_PUE | \
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
#define PAD_CTL_PUE (1 << 13) 10 0000 0000 0000
#define PAD_CTL_PUS_100K_UP (2 << 14) 1000 0000 0000 0000
#define PAD_CTL_SPEED_MED (2 << 6) 1000 0000
#define PAD_CTL_DSE_40ohm (6 << 3) 11 0000
#define PAD_CTL_HYS (1 << 8) 1 0000 0000

I.MX6 网卡能收不能发的更多相关文章

  1. 基于XC7Z100+AD9361的双收双发无线电射频板卡

    一.板卡概述 板卡基于Xilinx公司的SoC架构(ARM+FPGA)的ZYNQ7100芯片和ADI公司高集成度的捷变射频收发器AD9361,实现频谱范围70MHz~6GHz,模拟带宽200KHz~5 ...

  2. QQ聊天机器人for PHP版 (登录,收、发消息)

    <?php include "http_no_cookie.class.php"; class qq { public $sid; public $http; public ...

  3. stm8 单线串口能收不能发

    原因是把连接的TX和RX短接了,其实在TX和RX间要串一个电阻,然后让stm8的单线TX接到RX.

  4. 代码学习-Linux内核网卡收包过程(NAPI)【转】

    转自:https://blog.csdn.net/crazycoder8848/article/details/46333761 版权声明:本文没有任何版权限制,任何人可以以任何方式使用本文. htt ...

  5. 26.Linux-网卡驱动介绍以及制作虚拟网卡驱动(详解)

    1.描述 网卡的驱动其实很简单,它还是与硬件相关,主要是负责收发网络的数据包,它将上层协议传递下来的数据包以特定的媒介访问控制方式进行发送, 并将接收到的数据包传递给上层协议. 网卡设备与字符设备和块 ...

  6. 网卡phy9161A

    硬件1. 网口网口使用4根信号线:两根发送,两根接收.一对信号线中一根承载0——+2.5V信号电压,而另一根负载的电压是0——-2.5V,因此可产生一个5Vpp的信号差.RJ45中有用的就是4根信号线 ...

  7. Linux网卡驱动程序对ethtool的支持和实现

    Linux 的一个显著特点就是其强大的网络功能,Linux 几乎支持所有的网络协议,并在这些协议基础上提供了丰富的应用.对 Linux 网络管理的重要性不言而喻,这些管理依赖于网络工具,比如最常用的 ...

  8. Linux网卡驱动框架及制作虚拟网卡

    1.概述 网卡驱动与硬件相关,主要负责收发网络的数据包,将上层协议传递下来的数据包以特定的媒介访问控制方式进行发送,并将接收到的数据包传递给上层协议. 网卡设备与字符设备,块设备不同,网络设备驱动程序 ...

  9. Linux网卡驱动分析

    以太网(Ethernet)是一种计算机局域网组网技术,基于IEEE 802.3标准,它规定了包括物理层的连线.电信号和介质访问层协议. Ethernet接口的实质是MAC通过MII总线控制PHY的过程 ...

随机推荐

  1. Asp.Net MVC4+EF6 Code First 权限管理系统 源码下载

    这个权限管理系统是基于在@TZHSWEET 的权限管理系统之上做的修改.@TZHSWEET 那个是DB first. 这个是Code First.源码下载:http://download.csdn.n ...

  2. jQuery获取URL的GET参数值

    // jQuery url get parameters function [获取URL的GET参数值] // <code> // var GET = $.urlGet(); //获取UR ...

  3. 文件操作工具类: 文件/目录的创建、删除、移动、复制、zip压缩与解压.

    FileOperationUtils.java package com.xnl.utils; import java.io.BufferedInputStream; import java.io.Bu ...

  4. Timer in C#

    https://docs.microsoft.com/en-us/dotnet/api/system.timers.timer?view=netframework-4.7.2 Be aware tha ...

  5. orecle常用函数

    Oracle SQL 提供了用于执行特定操作的专用函数.这些函数大大增强了 SQL 语言的功能.函数可以接受零个或者多个输入参数,并返回一个输出结果. oracle 数据库中主要使用两种类型的函数 1 ...

  6. Buildbot初探

    什么是Buildbot Buildbot是一个持续集成和自动化测试框架,我在毕业刚进VMware不久的一个和以色列人合作的项目中接触到Buildbot,当时我真的恨死它了...经常随意的提交了一些代码 ...

  7. struts2——文件下载自定义文件名,包括中文

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  8. 为什么Kubernetes不使用libnetwork

    Kubernetes 在 1.0 版本之前就已经有了最初的网络插件.与此同时 Docker 也引入了 libnetwork 和 Container Network Model (CNM).现在 Doc ...

  9. 分步引导中,Js操作Cookie,实现判断用户是否第一次登陆网站

    上一篇介绍了分布引导插件IntroJs的使用,本篇介绍通过Js操作cookie的方法. 分步引导的功能只适合与第一次登陆网站的新用户,不能每次登陆都提示分布引导,那么如何判断用户是否第一次登录网站呢? ...

  10. Spring3: 在Bean定义中使用EL-表达式语言

    5.4.1  xml风格的配置 SpEL支持在Bean定义时注入,默认使用“#{SpEL表达式}”表示,其中“#root”根对象默认可以认为是ApplicationContext,只有Applicat ...