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: PHY link down with DP83867

Part Number: TDA4VM

Tool/software:

Dear TI

We made a new board based on TDA4VM board. And the connections between Ethernet device are like below.

|  CPSW5G        port 1       | -- RGMII -- | TI PHY(DP83867)    |

|                          port 2       | -- RGMII -- | TI PHY(DP83867)    |

|                          port 3       | -- RGMII -- | Marvell 8 port switch(88E6390 |

I'm using ti-processor-sdk-linux-j7200-evm-09_02_00_04, and the default manual mode setting of davinci MDIO is true.

When I tried to access registers of 88E6390, it returned all 0xFF.

So I changed manual mode to false and succeeded to read registers of 88E6390.

But it sometimes displayed below console log.

[ 424.996967] am65-cpsw-nuss c000000.ethernet eth0: Link is Down
[ 426.021393] am65-cpsw-nuss c000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

In our board, eth0 is port 1 which is connected with DP83867.

When I added debug code at int genphy_update_link(struct phy_device *phydev) function in phy_device.c, it sometimes read strange value from DP83867.

** read MII_BMCR instead of MII_BMSR

---------------------------------------------------------------------------------------------

[ 107.844410] ### genphy_update_link : 0x1140
[ 107.849906] am65-cpsw-nuss c000000.ethernet eth0: Link is Down

----------------------------------------------------------------------------------------------

** can not read valid register.

----------------------------------------------------------------------------------------------

[ 214.084127] ### genphy_update_link : 0x0
[ 214.089385] am65-cpsw-nuss c000000.ethernet eth0: Link is Down

----------------------------------------------------------------------------------------------

And it read valid register value(0x0x796d) next time and report Link up.

Could you give some advice how to debug this issue ?

FYI, this problem does not happen when I set manual mode to true. But 88E6390 is not accessible in setting manual mode to true.

BR

Jace

  • Hi,

    FYI, this problem does not happen when I set manual mode to true. But 88E6390 is not accessible in setting manual mode to true.

    Due to MDIO HW errata i2329, you need to use MDIO in Manual Mode.

    Does Marvell switch (88E6390) supports MDIO interface? If so, what is MDIO frequency expected for this.

    As MDIO enabled Manual Mode using mdio bit-bang driver in Linux kernel for MDIO operations, the MDIO frequency will be very low and is based on delays bit-bang driver.

    Best Regards,
    Sudheer

  • hi Sudheer

    Marvell switch (88E6390) supports MDIO interface.

    In manual mode, PHY(DP83867) works correctly and the MDIO frequency is like below

    And Switch(88e6390) does not work and the MDIO frequency is like below

    BR

    Jace

  • Hi,

    From Marvel Spec. it seem it required minimum 20MHz clock for MDC.

    Please check with Marvel whether it can supports Lower frequency or not?

    When I added debug code at int genphy_update_link(struct phy_device *phydev) function in phy_device.c, it sometimes read strange value from DP83867.

    ** read MII_BMCR instead of MII_BMSR

    ---------------------------------------------------------------------------------------------

    [ 107.844410] ### genphy_update_link : 0x1140
    [ 107.849906] am65-cpsw-nuss c000000.ethernet eth0: Link is Down

    ----------------------------------------------------------------------------------------------

    ** can not read valid register.

    ----------------------------------------------------------------------------------------------

    [ 214.084127] ### genphy_update_link : 0x0
    [ 214.089385] am65-cpsw-nuss c000000.ethernet eth0: Link is Down

    ----------------------------------------------------------------------------------------------

    And it read valid register value(0x0x796d) next time and report Link up.

    Could you give some advice how to debug this issue ?

    It could be due to HW Errata, It can corrupt the MDIO data.
    So, by default we recommend to use in Manual Mode.

    Best Regards,
    Sudheer