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.

TDA4VM: ETHFW: PHY is Not Alive

Part Number: TDA4VM

Hi ,

We have implement three phys in our customed board (sdk 7.3), only phy 1 is alive,

so that only phy1 can bind the PHY driver; but we have check the register below

, the value of CPSW_MDIO_ALIVE_REG is 7, So only phy 1 is alive is not reasonable.

and we have try to use mdio clause 45 to read the register 0x01 to check the alive status, the original code is in pdk_jacinto_07_03_00_29\packages\ti\drv\enet\src\phy\enetphy.c

bool EnetPhy_isAlive(EnetPhy_Handle hPhy)
{
    EnetPhy_MdioHandle hMdio = hPhy->hMdio;
    uint32_t phyGroup = hPhy->group;
    uint32_t phyAddr = hPhy->addr;
    bool isAlive = false;
    uint16_t val = 0U;
    int32_t status;

    /* Get PHY alive status */
    if (hMdio->isAlive != NULL)
    {
        /* Get alive status from MDIO driver (i.e. hardware assisted) */
        status = hMdio->isAlive(phyAddr, &isAlive, hPhy->mdioArgs);
        ENETTRACE_ERR_IF(status != ENETPHY_SOK,
                         "PHY %u: Failed to get alive status: %d\n", phyAddr, status);
    }
    else
    {
        /* Alternatively, read BMSR - PHY is alive if transaction is successful */
        status = hMdio->readC22(phyGroup, phyAddr, PHY_BMSR, &val, hPhy->mdioArgs);
        ENETTRACE_ERR_IF(status != ENETPHY_SOK,
                         "PHY %u: Failed to read reg %u: %d\n", phyAddr, PHY_BMSR, status);
        if (status == ENETPHY_SOK)
        {
            isAlive = true;
        }
    }

    return isAlive;
}
but it failed as
and we try to accesses this PHY's clause 45 registers through clause 22. However I observe with the scope that as soon as they activate the MDIO, mac scans it permanently, looking for available PHYs by reading register #1 of all possible addresses
This makes their debugging more difficult, plus this seems to cause issues with their PHY. Is there a way to prevent this behavior? and can MDIO CLAUSE 45 can be applied in sdk 7.3?