Hi,
We are using AM335x and DP83848. We port the u-boot from evm BSP. Now the problem is net interface doesn't work.
I ran "tftp 81000000 MLO" from u-boot command line. there was always timeout and retry. I found there was no ARP packet sent out.
What we have done:
change the pinmux, use beagle bone pin-mux. we have only 1 phy work with 100M.
change the MII_SEL register to 0x5. We use RMII.
change cpsw_data.gigabit_en = 0;
After this steps, I can't think out what else I should do. but the net interface kept not working. No ARP came out.
Then I noticed this structure:
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
};
I wonder what a CPSW_slave is? what is its slave_reg_ofs? what's the phy_id stand for? I once thought maybe slave_reg_ofs need modify, but I don't know what it is, and I don't know what value it should be if it need change. Where this 0x208 and this 0x308 come from?
I find a topic when I was in despair. It says swap the phy_id value overcome the problem:
static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 1,
},
{
.slave_reg_ofs = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 0,
},
};
I tried and to my surprise. the link is established. ARP sent and tftp work but a bit slowly. I'll try to use external ref_clock tomorrow.
Is there any one can explain all the questions above? Thanks in advance.
Best regards,
Lihua