Hi,
I have a problem in the initialization of the Ethernet on a custom board based on C6678 and Marvel PHY.. During the initialization I have to insert long delay between subsystems initialization and anyway at the end the CPSW_CONTROL_REG and SGMII MR_ADV_ABILITY_REG seems to lost the correct initialization value. If I reinit only these two registers, the ETH start working.
Exactly the same SW works well on the C6678 EVM (but without the PHY init and with the parameters setup in accordance with the SGMII and Core clock frequency).
I cannot exclude at 100% a SW bug, but since on the EVM everything works, the is something I can check in our board design to investigate the problem? Maybe clocks, power supply...
The initialization steps are:
1. Configure the PHY (but on the EVM)
2. Configure SERDES
3. Configure SGMII ports
4. Configure the CPSW (ports enable, mac addresses)
5. Configure the ALE (enabled but bypass)
6. Configure the MACs (full duplex, giga, MTU)
7. HOTFIX: wait a bit and then check for "hot fix".
On the EVM:
- no delay required between steps
- HOT fix not required
On the custom board:
- delay required (5000 cycles @ 1GHz)
- HOT fix REQUIRED
On the custom board in debug, both step by step or breaking between step:
-delay not required
- HOT fix not always required
The HOTFIX procedure is simple:
1. verify the CPSW_CONTROL_REG.port 0 == enabled. If it is not not enable it.
2. if SGMII MR_ADV_ABILITY_REG == 0 then fix it with the correct value (the same used in the configuration step 3).
I already tried to play a bit with initialization order, but nothing changes. Also on the custom board I tried to skip PHY initialization. In this case the cable communication is not possible, but the loop-back tests are applicable and without the hotfix fails.
As test, I tried all level of loop-back:
- PKTDMA (PA)
- SGMII
- MAC
- PHY
They fail (except for the DMA) without the fix (while works always on the EVM),
This the POST SW from TI (modified in accordance with the board clocks), also the PKTDMA PA loop-back fail and I was not able to fix it.
That's why, to investigate the problem, I rewrite from scratch the initialization code (bypassing the PA PDSP and routing directly the RX channels to the PKTDMA)