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.

AM62A7: Am62A7: Enabling MDIO communication in u-boot for marvell 88q2110 PHY

Part Number: AM62A7

Hello TI,

we are trying to enable MDIO communication in u-boot and we have marvell 88q2110 PHY on our board, and this PHY supports clause 45 MDIO protocol.

we are able to communicate with marvell 88q2221m  PHY using fixed-link. 

To enable MDIO we had disabled the fixed link from dtsi and tried to find the PHY by mask using the API ,  phy_find_by_mask() , in phy_connect function.

when we debug through the code, we found that there are MDIO Manageable devices (MMD) which are maintained in an array of devad in get_phy_device_by_mask() function

int devad[] = {
        /* Clause-22 */
        MDIO_DEVAD_NONE,
        /* Clause-45 */
        MDIO_MMD_PMAPMD,
        MDIO_MMD_WIS,
        MDIO_MMD_PCS,
        MDIO_MMD_PHYXS,
        MDIO_MMD_VEND1,
    };

This devad is passed as parameter to get_phy_id API (get_phy_id(bus, addr, devad, &phy_id);)  which will try to fetch PHY ID using cpsw_mdio_read()

But for all the devad we are getting phy_id as zero.

we found that cpsw_mdio_read is taking devad (dev_addr as third parameter) but it is not used inside the function.

currently we are using uboot from linux 9.1 sdk.

Please tell me how to solve this problem. Related issues were mentioned in the previous E2E, saying that a thread needs to be closed. Which thread is it?