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.

TDA4VH: Enabling MDIO communication in u-boot for marvell 88q2221m PHY

Hello TI,

we are trying to enable MDIO communication in u-boot and we have marvell 88q2221m 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 8.5 sdk.

Query: 

  1. can you please check the API's which we are using is correct, and if they are wrong can you guide which API's we need to use to enable clause 45 MDIO communication.
  2. Is clause 45 protocol is supported in TI delivered u-boot in 8.5 sdk.
  3. To map our new PHY in u-boot, is there any how to documentation available from TI.

 

Please find the attached screenshot for reference.