cpsw/atphy network drivers
Matt Dooner
dclscratch at gmail.com
Fri Mar 6 12:45:25 UTC 2015
Hello,
I am having some trouble configurating the network driver on a TI
T335x-based CoM system
(http://www.compulab.co.il/products/computer-on-modules/cm-t335/). It
uses the "the AM335x integrated Ethernet MAC coupled with the AR8033
RGMII Ethernet PHY from Atheros". U-Boot is able to find the device as
expected:
CM-T335w # mii device
MII devices: 'cpsw'
Current device: 'cpsw'
CM-T335w # mdio list
cpsw:
0 - AR8031/AR8033 <--> cpsw
CM-T335w # dhcp
link up on port 0, speed 100, half duplex
BOOTP broadcast 1
DHCP client bound to address 10.1.192.67
CM-T335w # ping 8.8.8.8
link up on port 0, speed 100, half duplex
Using cpsw device
host 8.8.8.8 is alive
And devinfo(8) reports the correct modules being loaded:
root at beaglebone:~ # devinfo
nexus0
ofwbus0
simplebus0
aintc0
ti_scm0
am335x_prcm0
am335x_dmtimer0
ti_adc0
gpio0
gpioc0
gpiobus0
uart0
ti_edma30
sdhci_ti0
mmc0
mmcsd0
cpsw0
miibus0
atphy0
...
The interface does not appear to be sending or receiving any traffic
over the physical interface, and does not report receiving any packets
at all. I have enabled debug mode on the cpsw driver:
root at beaglebone:~ # ifconfig cpsw0 debug
root at beaglebone:~ # ifconfig cpsw0 up
09:54:45 cpsw_ioctl SIOCSIFFLAGS: UP but not RUNNING; starting up
09:54:45 cpsw_init_locked
root at beaglebone:~ # dhclient cpsw0
09:54:56 cpsw_ifmedia_sts
09:54:56 cpsw_ioctl SIOCSIFFLAGS: UP & RUNNING (changed=0x0)
09:54:56 cpsw_init
09:54:56 cpsw_init_locked
DHCPDISCOVER on cpsw0 to 255.255.255.255 port 67 interval 5
09:54:56 cpsw_tx_enqueue Queueing TX packet: 1 segments + 0 pad bytes
09:54:57 cpsw_tx_dequeue TX removing completed packet
...
A DHCP address is never negotiated.
root at beaglebone:~ # ifconfig
cpsw0: flags=8847<UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST> metric
0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 1c:ba:8c:ed:40:99
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
09:58:57 cpsw_ifmedia_sts
09:58:57 cpsw_ifmedia_sts
09:58:57 cpsw_ifmedia_sts
media: Ethernet autoselect (100baseTX <half-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
When connected to another computer running Wireshark no frames are
recorded as having been transmitted over the interface. The cpsw
driver never reports receiving any packets, even when I use a tool
like Ostinato to craft frames addressed to the MAC of the NIC on the
board.
The network interface works perfectly in Debian Linux:
root at cm-debian:~# ethtool eth2
Settings for eth2:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: external
Auto-negotiation: on
Current message level: 0x00000000 (0)
Link detected: yes
root at cm-debian:~# ethtool -i eth2
driver: TI CPSW Driver v1.0
version: 1.0
firmware-version:
bus-info: cpsw
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
Can anyone reccomend some next steps for debugging this network
interface in FreeBSD? I seem to have exhausted the options I've found
in the handbook, man pages, and google searches.
It is more relevant for freebsd-embedded, but if anyone is curious my
freebsd-crochet board config is forked at
https://github.com/MattDooner/crochet-freebsd/ and u-boot changes
against 2014.04 at https://github.com/MattDooner/u-boot
Cheers,
Matt
More information about the freebsd-net
mailing list