Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4372, TPS65218
We are in process of bringing up the ethernet peripheral on our custom board. Both the interfaces work properly and link (both eth0 & eth1) comes up/down appropriately and ping doesn’t work from PC->device or device->PC. Please find below log snippets and ethtool output. Could you please help us with pointers?
Board: Custom board based on AM437X.
TISDK: ti-processor-sdk-linux-am437x-evm-06.03.00.106
Linux: linux-4.19.94
PHY : Microchip LAN8740AI-EN-TR & LAN8740AI
PC to device connection:
We manually connect to Eth0 and Eth1 of the board one at a time. Board’s ethernet interfaces (Eth0 and Eth1) detects the link when we connect the ethernet cable to them. We have configured usb-ethernet adapter on PC with 169.254.1.60 (while testing ETH0) & 192.168.100.55 (while testing ETH1). Target Ip address are statically assigned via “/etc/networks/interface” file on the board. Below are the actual IP & subnet details being used on the board.
ETH0 is configure to “IP - 169.254.1.1; Subnet – 255.255.0.0”
ETH1 is configure to “IP - 192.168.100.100; Subnet – 255.255.255.0”
We have tested that the usb-to-ethernet convertor and ethernet cable and its working fine. We validated it by connecting to working board.
Log snippet:
[ 1.234284] mdio_bus fixed-0: GPIO lookup for consumer reset
[ 1.234297] mdio_bus fixed-0: using lookup tables for GPIO lookup
[ 1.234306] mdio_bus fixed-0: No GPIO consumer reset found
[ 1.255561] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset
[ 1.255573] mdio_bus 4a101000.mdio: using device tree for GPIO lookup
[ 1.255602] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp@44000000/ethernet@4a100000/mdio@4a101000[0]'
[ 1.255623] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp@44000000/ethernet@4a100000/mdio@4a101000[0]'
[ 1.255635] mdio_bus 4a101000.mdio: using lookup tables for GPIO lookup
[ 1.255645] mdio_bus 4a101000.mdio: No GPIO consumer reset found
[ 1.311668] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.319377] davinci_mdio 4a101000.mdio: detected phy mask fffffffc
[ 1.327738] libphy: 4a101000.mdio: probed
[ 1.331896] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8740
[ 1.340381] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver SMSC LAN8740
[ 1.350163] cpsw 4a100000.ethernet: Detected MACID = 14:42:fc:94:c1:a6
[ 1.357003] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.363470] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.368766] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.377012] cpsw 4a100000.ethernet: cpsw: Detected MACID = 14:42:fc:94:c1:a8
[ 1.711255] cpuidle: enable-method property 'ti,am4372' found operations
[ 7.012316] net eth0: initializing cpsw version 1.15 (0)
[ 7.183015] SMSC LAN8740 4a101000.mdio:00: attached PHY driver [SMSC LAN8740] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[ 7.330352] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.412438] net eth1: initializing cpsw version 1.15 (0)
[ 7.593078] SMSC LAN8740 4a101000.mdio:01: attached PHY driver [SMSC LAN8740] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
[ 7.704019] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 9.362642] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 9.381710] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 11.358940] device eth0 entered promiscuous mode
Link status:
root@Node1442fc94c1a6:~# [ 2342.962518] cpsw 4a100000.ethernet eth0: Link is Down
[ 2346.962505] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
root@Node1442fc94c1a6:~#
root@Node1442fc94c1a6:~#
root@Node1442fc94c1a6:~# [ 2355.122283] cpsw 4a100000.ethernet eth0: Link is Down
[ 2356.802511] cpsw 4a100000.ethernet eth1: Link is Up - 100Mbps/Full - flow control off
[ 2356.810465] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 2363.922284] cpsw 4a100000.ethernet eth1: Link is Down
[ 2365.042502] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
ETHTool output:
root@Node1442fc94c1a6:~# ./ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
root@Node1442fc94c1a6:~#
root@Node1442fc94c1a6:~# ./ethtool -S eth0
NIC statistics:
Good Rx Frames: 0
Broadcast Rx Frames: 0
Multicast Rx Frames: 0
Pause Rx Frames: 0
Rx CRC Errors: 0
Rx Align/Code Errors: 0
Oversize Rx Frames: 0
Rx Jabbers: 0
Undersize (Short) Rx Frames: 0
Rx Fragments: 0
Rx Octets: 0
Good Tx Frames: 13
Broadcast Tx Frames: 0
Multicast Tx Frames: 13
Pause Tx Frames: 0
Deferred Tx Frames: 0
Collisions: 0
Single Collision Tx Frames: 0
Multiple Collision Tx Frames: 0
Excessive Collisions: 0
Late Collisions: 0
Tx Underrun: 0
Carrier Sense Errors: 0
Tx Octets: 1514
Rx + Tx 64 Octet Frames: 0
Rx + Tx 65-127 Octet Frames: 8
Rx + Tx 128-255 Octet Frames: 5
Rx + Tx 256-511 Octet Frames: 0
Rx + Tx 512-1023 Octet Frames: 0
Rx + Tx 1024-Up Octet Frames: 0
Net Octets: 1514
Rx Start of Frame Overruns: 0
Rx Middle of Frame Overruns: 0
Rx DMA Overruns: 0
Rx DMA chan 0: head_enqueue: 1
Rx DMA chan 0: tail_enqueue: 127
Rx DMA chan 0: pad_enqueue: 0
Rx DMA chan 0: misqueued: 0
Rx DMA chan 0: desc_alloc_fail: 0
Rx DMA chan 0: pad_alloc_fail: 0
Rx DMA chan 0: runt_receive_buf: 0
Rx DMA chan 0: runt_transmit_bu: 0
Rx DMA chan 0: empty_dequeue: 0
Rx DMA chan 0: busy_dequeue: 0
Rx DMA chan 0: good_dequeue: 0
Rx DMA chan 0: requeue: 0
Rx DMA chan 0: teardown_dequeue: 0
Tx DMA chan 0: head_enqueue: 13
Tx DMA chan 0: tail_enqueue: 0
Tx DMA chan 0: pad_enqueue: 0
Tx DMA chan 0: misqueued: 0
Tx DMA chan 0: desc_alloc_fail: 0
Tx DMA chan 0: pad_alloc_fail: 0
Tx DMA chan 0: runt_receive_buf: 0
Tx DMA chan 0: runt_transmit_bu: 0
Tx DMA chan 0: empty_dequeue: 13
Tx DMA chan 0: busy_dequeue: 0
Tx DMA chan 0: good_dequeue: 13
Tx DMA chan 0: requeue: 0
Tx DMA chan 0: teardown_dequeue: 0
DTS nodes:
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default0>, <&cpsw_default1>;
pinctrl-1 = <&cpsw_sleep0>, <&cpsw_sleep1>;
dual_emac;
status = "okay";
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
dual_emac_res_vlan = <2>;
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
};





