I am attempting to run two lan8710 phy chips with the cpsw in dual emac mode. I have them connected in RMII configuration, but only 1 is working. Port 2 is not coming up. The pinmux is good, I verified that with JTAG by probing the memory to check the muxmode for those pins. The gmii_sel register is good, I verified that the same way, port 1 and 2 are both 01 for RMII mode.
I am not sure if there is some additional software settings I need to change in the cpsw init function, or in the data structure that controls the cpsw settings. It's also possible that I might have gotten the hardware messed up. Here is the ethernet stuff from dmesg:
[ 1.021881] Initializing CPSW mode: 1
[ 1.025665] Probe mdio: c0541920, c047e61c
[ 1.030273] Probe cpgmac0: c05418b8, c047e650
[ 4.015441] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 4.021636] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 4.028625] davinci_mdio.0: probed
[ 4.032043] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
[ 4.231201] Detected MACID=0:18:31:e0:cd:d1
[ 4.236450] cpsw: Detected MACID = 00:18:31:e0:cd:d1
[ 4.254974] net eth0: CPSW phy found : id is : 0x7c0f1
[ 5.275878] IP-Config: Complete:
[ 5.279174] device=eth0, addr=192.168.1.11, mask=255.255.255.0, gw=192.168.1.1,
[ 5.286865] host=192.168.1.11, domain=, nis-domain=(none),
[ 5.292907] bootserver=192.168.1.143, rootserver=192.168.1.143, rootpath=
[ 9.246124] PHY: 0:00 - Link is Up - 100/Full
root@nicksboard:~
This line: davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
I think it comes from the omap_device_build() function, but I can't figure out how this thing works. Is there a setting to specify that there is a phy 0:00 on mdio0, or does the omap_device_build() function probe the mdio bus and find whatever is there? If the hardware was working, would the second phy, 0:02, be found automatically?