介绍
TI J721E SOC 千兆以太网交换子系统(SPDW NUSS)有两个端口,提供设备以太网通讯。支持MII接口的简化千兆独立媒体接口the Reduced Gigabit Media Independent Interface(RGMII),Reduced Media Independent Interface(RMII),和物理层physical layer device(PHY)管理数据输入输出管理。
TI J721E SOC 有集成了两个千兆以太网交换机子系统在MCU域被叫做MCU——CPSW0和一个外部以太网端口(port 1)可选择RGMII和RMII接口和一个内部集成的可编程可通讯接口(CPPI)端口为Host Part 0 。CPPI数据包流接口支持8路TX通道和一路可通过TI J721E NAVSS 统一DMA外设根复合(UDMA-P)控制器操作。
驱动遵循标准linux网络接口体系和支持以下特征:
- 10/100/1000Mbps操作模式
- 自协商。
- linux的NAPI 支持
- VLAN过滤器
- 以太工具
- CPTS/PTP 依照 802.1AS-2011 (TSN)
- EST/TAS 卸载依据802.1Q-2018 (TSN)
- IET/优先级 卸载依照802.1Q-2018 (TSN)
- 运输和存储 提高 时间敏感流(FQTSS)依照802.1Q-2018 参考之前的CBS or 802.1 Qav
驱动配置
SDK默认配置,自定义编译确保下面的配置使能。
CONFIG_TI_DAVINCI_MDIO
CONFIG_TI_CPSW_ALE
CONFIG_TI_AM65_CPSW_NUSS
CONFIG_TI_AM65_CPTS
CONFIG_TI_AM65_CPSW_TAS
CONFIG_PHY_TI_GMII_SEL
设备树绑定
参考下述文章
cpsw绑定
和k3-am654-cpts
MAC模式
启动接口
网络接口能自动配置依赖于root文件系统或者手动配置。配置如下
ip addr add 192.168.1.1/24 dev eth0
ip link set dev eth0 up
< or >
ifconfig eth0 <ip> netmask <mask> up
ethtool -i driver 获取驱动信息
MCU_CPSW0 接口能通过ethtool -i driver命令识别。提供一些支持特征的信息。
root@j7-evm:~# ethtool -i eth0
driver: am65-cpsw-nuss
version: 5.10.120-g95b90aa828
firmware-version:
expansion-rom-version:
bus-info: 46000000.ethernet
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
ethtool driver 显示关于设备/连接的标准信息
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
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
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
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: slave
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: ubgs
Wake-on: d
SecureOn password: 00:00:00:00:00:00
Current message level: 0x000020f7 (8439)
drv probe link ifdown ifup rx_err tx_err hw
Link detected: yes
ethtool -k eth0 RX校验和取消
驱动默认使能RX的校验和卸载。能够通过ethtool -k 命令取消
ethtool -k eth0
Features for eth0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [fixed]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
tx-gso-list: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: on
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]
通过ethtool -K rx-checksum on|off
VLAN配置
VLAN能增加/删除 通过ip 或者 config 程序。