Hello,
We're having a tiny issue here, when using two physical phys, with two different mdio addresses (0 & 3). I know 0 is a broadcast address in mdio, but luckily this broadcast behavior can be disabled in the phy, so they are actually seen as 2 different phys.
The problem I have is that I can actually use only one of the phys. When I use the following struct:
static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, .phy_addr = 3, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 0, }, }; static struct cpsw_platform_data cpsw_data = { .mdio_base = CPSW_MDIO_BASE, .cpsw_base = CPSW_BASE, .mdio_div = 0xff, .channels = 8, .cpdma_reg_ofs = 0x800, .slaves = 2, .slave_data = cpsw_slaves, .ale_reg_ofs = 0xd00, .ale_entries = 1024, .host_port_reg_ofs = 0x108, .hw_stats_reg_ofs = 0x900, .bd_ram_ofs = 0x2000, .mac_control = (1 << 5), .control = cpsw_control, .host_port_num = 0, .version = CPSW_CTRL_VERSION_2, };
I can use the phy with ID 0. However, when I change the slave struct to:
static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, .phy_addr = 0, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, .phy_addr = 3, }, };
I can use the phy with address 3. So, strangely enough it's never the first, always the second address that can be used, which doesn't really make sense, does it?
Also, when I can connect with my dhcp server, I receive a message that both my phys are connected (while this is untrue, as I only connected one network cable).
I can manually read out registers with the MDIO command in u-boot, there I can see the different values for each phy. I can also read out that one PHY has a link, while the other has not. This leads me to believe that this works correctly.
My question:
- What did I do wrong?
- Did I do something wrong? Or is this a am335x CPSW "feature"?
- Does anyone else have a working set-up with 2 phy's, if so, care to share it? (I currently use two micrel KSZ8091RNA)
Kind regards,
Arend