I'm still battling trying to get the CPSW code to interface with the 88e6131. I have done everything suggested previously yet I'm still not able to get cpsw to talk over gmii to marvel switch. We're using EMAC[1] (only). I have done the following:
- made the changes to cpsw to allow only emac1, as described here: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/211761/839179.aspx#839179 (thank you chaitanya godavarthi)
- enabled the PLL path through PCIE and SATA. I can confirm that there's a 125Mhz clock coming out of the AM3874's GMII
- double and triple checked the PINCNTL register values
- the mdio bus is working and can see the 88e6131. My setup for the dsa device has dsa_chip_data.port_names { "port0", "port1", "port2", "cpu" }; Where port0 goes out to an RJ45 to the outside world. The DSA driver code sees the "phy"s on ports0 through port2, but obviously does not on "cpu". But it seems the CPSW code needs a phy to work correctly. During init, I can see that when the phy's are discovered, there are calls to get_phy_device and then phy_device_create on the 3 phy's that are discovered over mdio. The info on those phys are {{addr=0, phy_id=0x1410cb1, name="0:00:00"}, {addr=1, phy_id=0x1410cb1, name="0:00:01"}, {addr=2, phy_id=0x1410cb1, name="0:00:02"}}. If in cpsw_slaves[0] (the only one) I set the .phy_id to "0:00:00" it doesn't work either. I think that's the wrong approach anyhow as the cpsw should be talking to what "would be" phy "0:00:03" over gmii.
- the GMII_SEL register is clear
- If i run "ifconfig -a" i see "eth0", "lo", "port0", "port1" and "port2". If I manually "up" the eth0 interface, I can then "up" the portN interfaces as well. Once the portN's are up, I can see status messages when I plug and unplug cables into the ports. The steps are 1) `ifconfig eth0 10.20.0.31 up` 2) `route add default gw 10.20.0.2 eth0` 3) `ifconfig port0 up`. If i try to "ping" something outside, I get a kernel dump that includes messages like "transmit queue timed out".. obviously because the cpsw code isn't aware there's something on the other end? because it didn't find a phy?