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.

Linux/AM5708: ICSS EMAC questions

Part Number: AM5708
Other Parts Discussed in Thread: TLK105L, TLK105

Tool/software: Linux

AM5708
Processor SDK Linux 4.02

I have some questions pertaining to the PRU EMAC driver:

  1. Does the PRU firmware touch the MDIO in any capacity, or is that purely managed by the Cortex A15 and Linux?
  2. How does the "link lost" alert get managed?  Is the PRU involved somewhere?
  3. Is there any kind of configuration that needs to be specified relating to the PHY? (PHY-specific data needed by the PRU?)

Thanks,
Brad

  • Hi Brad,

    In this regard the PRU EMAC works just like cpsw or other MAC drivers. There is a coupling or call back between the PHY driver and the MAC driver to manage events like bring the interface up/down and link lost type events. One example of how this works is say for example the link is lost, the phy driver will detect this on an MDIO polling operation with the PHY and then signal the MAC driver through a callback. The MAC driver will then tear down the interface. So to combine questions 1 and 2 the davinci_mdio driver running on the A15 will detect the link down and will call a function in the PRU ETH driver to shutdown the interface, this will involve sending commands to the firmware on the PRU to complete the operation.

    The MAC driver needs to know what the link speed the PHY has linked at so the clock speeds necessary to support the link speed can be set accordingly with regards to your 3rd question.

    Best Regards,
    Schuyler
  • Schuyler,

    Isn't "link loss" related to RXLINK (which is an ICSS pin)? Does the PRU generate an interrupt when it detects link loss?

    I'm a bit confused about how we're connecting RXLINK to the TLK105L on the AM571x IDK.  For ICSS1, the RXLINK pins connect to the TLK105L's pin 17 (LED_LINK).  For ICSS2 the RXLINK pins connect to the COL pin.  The AM571x IDK User Guide contains this related note:

    • The TLK105L contains a feature that must be enabled via software that provides rapid link status on the COL pin. Therefore, this pin is connected to the RXLINK input to the PRU-ICSS ports for this purpose.

    Why aren't we using the same topology for all the TLK105L's?

    Thanks,
    Brad

  • Brad,

    Talking with the developer previously the MDIO driver is what reports link loss. I can't speak for the TLK105 Linux driver as that support comes from the PHY team, meaning I don't know if the PHY driver supports the mode you are asking about. I will ask the firmware team though if the RX Link feature is supported in the firmware. I will also have to ask the EVM team why the difference in the TLK105 topology, though this may be related to the use of an LCD, if one is present then 2 of the 4 PRU ports are disabled.

    Best Regards,
    Schuyler
  • I've done some further research on this topic from a hardware perspective.  In general, if the COL pin is being utilized for RXACTIVE rather than as COL, then that means that half duplex operation cannot be supported.  That's probably not an issue for most applications as just about everything today is full duplex.  It would mean that really old hubs would not be usable (i.e. as opposed to a switch which would be full duplex).  Furthermore, in this scenario, the advertising should be setup such that only full duplex modes are advertised.

    I'd still like to understand from a software perspective whether link loss is strictly determined by polling of the MDIO interface or if the RXACTIVE signal is utilized.  There are other configurations that can be used with the PHY such as using one of the GPIO/LED signals to indicate link active.