Forum Discussion
Altera_Forum
Honored Contributor
14 years agothat's very interesting DAIXIWEN,
I do almost the same things in my code but, in this code:alt_32 marvell_cfg_rgmii(np_tse_mac *pmac) {
alt_u16 dat = IORD(&pmac->mdio1.reg1b, 0);
dat &= 0xfff0;
tse_dprintf(5, "MARVELL : Mode changed to RGMII/Modified MII to Copper mode\n");
IOWR(&pmac->mdio1.reg1b, 0, dat | 0xb);
tse_dprintf(5, "MARVELL : Enable RGMII Timing Control\n");
dat = IORD(&pmac->mdio1.reg14, 0);
dat &= ~0x82;
dat |= 0x82;
IOWR(&pmac->mdio1.reg14, 0, dat);
tse_dprintf(5, "MARVELL : PHY reset\n");
dat = IORD(&pmac->mdio1.CONTROL, 0); IOWR(&pmac->mdio1.CONTROL, 0, dat | PCS_CTL_sw_reset);
return 1; } there's something not clear to me, what is mdiox.reg14? I'm pretty sure it intended to be the "Extended PHY Specific Control Register" at address 20(decimal) but if you look at the chapter5 of the TSE UG in the section "PCS configuration register space" you find a different register located at 0x14(word offset) that's "if_Mode" register