现象描述:TCI6487采用SGMII口与Marvel 88e1111相连,SGMII回环成功,但是就是发不出数据。
问题描述:1)怀疑是物理层初始化的问题,88e1111的寄存器需要做什么配置?(我现在只配置寄存器0的值为0x8140,参照C6474EVM)
2)88e1111硬件配置是否正确?(cfg0-6分别为001,100,111,011,100,000,参照c6678EVM)
3)是否与SGMII的初始化有关?(SGMII的初始化参照c6474EVM)
Allen35065:
你检查一下MDIO口的状态?
yuanwen dong:
你好,我猜你有C6487的Demo板卡上的代码,然后想porting到C6474的demo板卡上。 C6487和C6474是几乎一样的芯片,但是两款Demo板卡在PHY芯片的连接上略有不同。我已经帮客户做过类似的porting工作。
下面供你免费参考:
/////////////////////////////////////////////////////////////////////////////////
SgmiiCfg.txConfig = 0x00000e23; /*SERDES specific config (0x00081021) *//* NO autoneg. */
SgmiiCfg.modeOfOperation = SGMII_MODE_OF_OPERATION_WITHOUT_AN;
if (SGMII_config(&SgmiiCfg) != 0) {
…………..
}
/* Configure PHY port 6 SERDES –> Faraday 1 at 1000mpbs, full duplex */ MDIO_phyRegWrite(0x0e, 0, 0x8140); /* Force internal switch –> port 6 SERDES to 1000MBPS, full Duplex */ MDIO_phyRegWrite(0x16, 0x1, 0x043e); /* Force 1000mps at copper PHY, disable auto-negotiate*/ MDIO_phyRegWrite(0x01, 0, 0x8140);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
Br
william.dong@enea.com
lantian xv:
回复 yuanwen dong:
非常感谢你的回复!
我现在是想把spectrum digital inc的C6474EVM的代码移植到自己开发的TCI6487上,由于采样phy芯片为88e1111,与c6474EVM采样的88e6122有很大的不同,是不是只要修改phy_init()里的代码就行了?
void phy_init(){ /* —————————————————————- * * * * Init PHY / MDIO * * * * —————————————————————- */ MDIO_CONTROL = 0x4000001f; // Enable MII interface
// Turn PPU off to make copper PHY visible at SMI address 0x01 phy_setReg(27, 4, 0x0081);
// Configure Marvell 88E6122 PHY phy_setReg(0xe, 26, 0x47); // Set PHY port 6 SERDES to 0.7V swing phy_setReg(0xd, 26, 0x47); // Set PHY port 5 SERDES to 0.7V swing phy_setReg(0x0e, 0, 0x8140); // Configure PHY port 6 SERDES –> Faraday 1 at 1000mpbs, full duplex phy_setReg(0x0d, 0, 0x8140); // Configure PHY port 5 SERDES –> Faraday 2 at 1000mbps, full duplex phy_setReg(0x15, 0x1, 0x043e); // Force internal switch –> port 5 SERDES to 1000MPBS, full Duplex phy_setReg(0x16, 0x1, 0x043e); // Force internal switch –> port 6 SERDES to 1000MBPS, full Duplex
// Force 1000mps at copper PHY, disable auto-negotiate// phy_setReg(1, 0, 0x8140); // 0x8140 = 1000mbps
// Force 100mps at copper PHY, disable auto-negotiate phy_setReg(1, 0, 0xa100); // 0xa100 = 100mbps
// Wait for link establishment phy_wait( 4000000 );}
C6474EVM上两片分别接5port和6port,上面设置的物理地址怎么这么多,不是应该只有两个?88e1111的物理地址是通过外部引脚配的,是固定的,如何去写这部分的代码?
非常期盼你的回复