/********************************************************************
* 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. 你真的会用javascript?

    偶然在csdn看到几个js的小题,考察的都是很基础的知识,拿来分享一下1. 1 2 3 4 if (!("a" in window)) { var a = 1; } alert(a ...

  2. LeetCode: Max Consecutive Ones

    这题最关键的是处理最开始连续1和最后连续1的方式,想到list一般在最前面加个node的处理方式,在最前面和最后面加0即可以很好地处理了 public class Solution { public ...

  3. MySQL行级锁和表级锁

    锁定用于确保事务完整性和数据库一致性. 锁定可以防止用户读取其他用户正在更改的数据,并防止多个用户同时更改相同的数据. 如果不使用锁定,数据库中的数据可能在逻辑上变得不正确,而针对这些数据进行查询可能 ...

  4. 微信小程序快速开发

    微信小程序快速开发 一.注册小程序账号,下载IDE 1.官网注册https://mp.weixin.qq.com/,并下载IDE. 2.官方文档一向都是最好的学习资料. 注意:1)注册账号之后会有一个 ...

  5. jQuery带动画的弹出对话框

    在线演示 本地下载

  6. windows10下Python如何设置环境变量

    1.右击“我的电脑”,选择“属性”, 2.选择“高级系统设置”, 3.选择“环境变量”, 4.在“系统变量”中选中“Path”,再点“新建”.(Python.Scripts两个目录都要加,只加Pyth ...

  7. 探测web服务质量方法

  8. Spring积累

    <tx:annotation-driven/>  (Spring的XML配置里两大Bean的声明之一) 那我们是否就可以在程序中所有被spring管理的类(@Controller.@Ser ...

  9. Effective C++ 条款06:若不想使用编译器自动生成的函数,就该明确拒绝

    规则一 将成员函数声明为private而且故意不实现他们 class HomeForSale { public: ... private: ... HomeForSale(const HomeForS ...

  10. python学习(一)——python与人工智能

    最近在朋友圈转起了一张图.抱着试一试的心态,我肝了些课程.都是与python相关的.     课程一:你不知道的python         讲师:王玉杰  (混沌巡洋舰联合创始人 & web ...