So I have updated C6474 EVM's UDP echo client sample application to run on our custom platform. (We are using a Broadcom PHY, not a Marvell switch like on the EVM.)
We are operating over copper in SGMII mode, and the issue I have is between the DSP and the PHY. (The PHY and the outside world have no problems connecting at any speed, be it 100 Mbps or 1 Gbps.)
Here's the rub. No matter what configuration bits I set, the DSP will only talk to the PHY in 1 Gbps mode, even if I explicitly try to force 100 Mbps. In addition, it will only sync if I enable auto-negotiation (in the DSP's SGMII register). If I disable auto-negotiation, regardless of what speed I try to force, I can't get a sync, i.e., it receives no packets from the PHY. Now, with auto-negotiation having to be enabled, my solution to "force" settings is to also update the capability advertising settings. But even if I tell it to only advertise 100 Mbps, it still connects at 1 Gbps. (Note: for good measure, I explicitly set the speed to 100 Mbps, but according to the PHY's datasheet, those settings, I think, are ignored if auto-negotiation is enabled. I could be wrong.)
Probably for the same reasons, regardless of what settings I use, I cannot connect to any 100 Mbps devices... period. It's 1 Gbps or nothing.
And by "settings,' over the last three weeks, I am talking probably every possible combination of bits among the PHY, EMAC, MDIO, and SGMII register settings. With that in mind, I also realize it is probably impossible for anyone to blindly know what is wrong on my system. So generically, and from the DSP's perspective only (I have a good handle on all the PHY's registers I think), what changes need to be made to switch between 1 Gbps operation to 100 Mbps operation?
Asked another way, Section 2.1.2 of the EMAC-MDIO (spruag08a) states that "[t]he SGMII protocol also allows for dynamic switching between 10/100/1000 Mbps modes." How do I set it up to do that?