This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omap l138 interfaced with Broadcom switch 5325Fusing MII

Other Parts Discussed in Thread: OMAP-L138

HI Everyone

 

I am using a Broadcom Ethernet switch 5325F with OMAP-L138 on a custom board. The switch has both MDC/MDIO interface and SPI for configuration. I have connected both MDC/MDIO and SPI to the OMAP. Now I am trying to access the switch using MDIO.  Now on powering up the MDIO->ALIVE register is not set and it is showing "error connecting to phy"  . Can anyone plz help me out?

Regards

Ayusman

  • Ayusman,

    I can't seem to find the datasheet for that switch so it's tough to figure out what might be going wrong.  Here are some things to consider or try:

    1. Sometimes the PHY needs to be configured in one mode or another so its MDIO may not be enabled
    2. The MDIO interface may require an external pull resistor
    3. The clock speed may need to be investigated or slowed down
    4. The MDIO on L138 is only clause 22 compliant and many newer PHYs require clause 45 to reach extended registers so SPI may be a better option

    -Tommy

  • Tommy

    I am able to get acknowledgement from the Broadcom switch. Through the MDIO and MDC interface MDIO Register ALIVE is detecting the PHYs in the Broadcom switch.In total there are 4 of them.So the MDIO interfaces  are working properly.I want to ask that can we access all the PHYs through that same interface? I actually tried to read the link status register and it is working properly but somehow I was not able to write into control registers. I had read somewhere that OMAP can be connected with only 1 PHY. Is this the reason that MDIO interface will not work and we have to use SPI? Also my switch is Clause 22 compliant.

     

    Regards

    Ayusman

  • Ayusman,

    You should be able to manage multiple PHYs using the MDIO interface as long as the PHYs are configured with different addresses.

    The EMAC interface is meant to be a point-to-point interface so in a typical configuration, you can only connect the EMAC interface to one PHY.

    -Tommy

  • Tommy

    I am able to detect all the phy and the corresponding bits are set in ALIVE register of MDIO. But LINK register is not set . This happens even after I have made a physical loopback at the O/P of PHY.Is this beacuse of EMAC or PHY. I am able to write and read into PHY regs but I could not get any link pulses on the Transmit line.

     

    Regards

    Ayusman

  • Ayusman,

    The EMAC user guide has the following description for the MDIO LINK bits:

    EMAC UG said:

    MDIO Link state bits. This register is updated after a read of the generic status register of a PHY. The is set if the PHY with the corresponding address has link and the PHY acknowledges the read transaction. The bit is reset if the PHY indicates it does not have link or fails to acknowledge the read transaction. Writes to the register have no effect.

    This tells me that the bits in the LINK register are pass-through of the PHY's MDIO status register value.  Assuming that the MDIO-to-PHY connection is working properly, the LINK value is not set because the PHY does not detect a LINK.  Please refer to the PHY documentation to see why it interprets the LINK status as down.

    -Tommy

  • Tommy

    Thanks a lot.The probolem got solved . It seems the Broadcom switch had said to use some termination registers but they didnot work properly.On removing them I got traffic thorugh.

     

    Regards

    Ayusman