This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am437x: can't use both ethernet ports in dual emac mode

I'm trying to use dual emac mode on our am437x based board. Both ports are functional: if I configure U-Boot to use the first port, then this port works as expected (can bring up nfs, can ping and so on), but then the other port can't do anything. It detects a link, but no communication seems to be going through. If I configure U-Boot to use the 2nd port, then the roles reverse: the 2nd port works as expected, while the 1st port can't do anything.


My kernel is based on v3.19 mainline.

root@cm-debian:~# dmesg | grep eth
[    2.808538] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
[    2.818339] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Atheros 8031 ethernet
[    2.829120] cpsw 4a100000.ethernet: Detected MACID = 00:01:c0:18:5e:94
[    2.836901] cpsw 4a100000.ethernet: cpsw: Detected MACID = 00:01:c0:18:a2:d6
[    2.857258] net eth0: initializing cpsw version 1.15 (0)
[    2.936200] net eth0: phy found : id is : 0x4dd074
[    2.943965] 8021q: adding VLAN 0 to HW filter on device eth0
[    2.950301] net eth1: initializing cpsw version 1.15 (0)
[    3.036361] net eth1: phy found : id is : 0x4dd074
[    3.043468] 8021q: adding VLAN 0 to HW filter on device eth1
[    6.936570] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.036602] cpsw 4a100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.129564]      device=eth0, hwaddr=00:01:c0:18:5e:94, ipaddr=192.168.44.137, mask=255.255.0.0, gw=192.168.0.110
[   12.517594] cpsw 4a100000.ethernet eth26: renamed from eth1
[   12.583760] systemd-udevd[139]: renamed network interface eth1 to eth26

root@cm-debian:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:01:c0:18:5e:94  
          inet addr:192.168.44.137  Bcast:192.168.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45545 errors:0 dropped:13 overruns:0 frame:0
          TX packets:21470 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:51660076 (49.2 MiB)  TX bytes:3485768 (3.3 MiB)
          Interrupt:233

eth26     Link encap:Ethernet  HWaddr 00:01:c0:18:a2:d6  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:92 (92.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:78 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6112 (5.9 KiB)  TX bytes:6112 (5.9 KiB)

root@cm-debian:~# ifconfig eth26 up
[   86.634048] net eth26: initializing cpsw version 1.15 (0)
[   86.716200] net eth26: phy found : id is : 0x4dd074
[   86.723246] 8021q: adding VLAN 0 to HW filter on device eth26
[   90.716573] cpsw 4a100000.ethernet eth26: Link is Up - 1Gbps/Full - flow control rx/tx

root@cm-debian:~# dhclient eth26 <---- <never succeeds>

I have the following kernel options turned on:

[*]   Texas Instruments (TI) devices
-*-     TI DaVinci MDIO Support
-*-     TI DaVinci CPDMA Support
-*-     TI CPSW Switch Phy sel Support
<*>     TI CPSW Switch Support

<*>     MAC-VLAN support

What am I missing? How can I get both of them to work simultaneously?