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.

RTOS/AM5726: ENETPHY_FindingState: Timed Out looking for a Phy

Part Number: AM5726

Tool/software: TI-RTOS

Hi,

Our board has only one phy, connected to rmii #1.

I get message "ENETPHY_FindingState: Timed Out looking for a Phy".

from soc/am572x/emac_soc.c

/* EMAC configuration structure */
CSL_PUBLIC_CONST EMAC_Cfg EMAC_config[EMAC_NUM_MAX_MAC_PORTS] =
{
{
&EMAC_FxnTable_v4,
NULL,
&EMACInitCfg[0]
},
{
&EMAC_FxnTable_v4,
NULL,
&EMACInitCfg[0]
}
};

How do we tell to BSP that we have only 1 PHY?

Thanks

Rasty

  • Hi Rasty,

    The AM572x has two GMAC ports, in your case you only has PHY on the second RGMII and you want to skip the first one without break the EMAC driver code. We did this before. You can do is:

    Keep this:

    CSL_PUBLIC_CONST EMAC_Cfg EMAC_config[EMAC_NUM_MAX_MAC_PORTS] =

    {

    {

    &EMAC_FxnTable_v4,

    NULL,

    &EMACInitCfg[0]

    },

    {

    &EMAC_FxnTable_v4,

    NULL,

    &EMACInitCfg[0]

    }

    };

    As both pointing to EMACInitCfg[0]:

    EMAC_HwAttrs_V4 EMACInitCfg[1] =
    {
    {
    SOC_CPSW_SS_REGS,
    SOC_CPSW_MDIO_REGS,
    SOC_CPSW_WR_REGS,
    SOC_CPSW_ALE_REGS,
    SOC_CPSW_CPDMA_REGS,
    SOC_CPSW_CPPI_RAM_REGS,
    SOC_CPSW_PORT_0_REGS,
    SOC_CPSW_STAT_REGS,
    GMAC_SW_IRQ_RX_PULSE_INT_NUM,
    0,
    GMAC_SW_IRQ_TX_PULSE_INT_NUM,
    0,
    EMAC_CPSW_CONFIG_MODEFLG_GIGABIT| EMAC_CPSW_CONFIG_MODEFLG_FULLDUPLEX,
    2,
    EMAC_RX_ISR_PER_MSEC_DEFAULT,
    {
    {
    SOC_CPSW_PORT_1_REGS,
    SOC_CPSW_SLIVER_1_REGS,
    0U, =========> change this to EMAC_CPSW_NO_PHY_ADDR
    },
    {
    SOC_CPSW_PORT_2_REGS,
    SOC_CPSW_SLIVER_2_REGS,
    1U,
    }
    }
    }
    };

    Regards, Eric

  • Hi Eric,
    Thanks for the answer.
    Why do you cancel 1st port and keep 2nd?
    What if PHY is is 0 ?

    Thanks
    Rasty
  • Rasty,

    I am not sure if I understood your board correctly. "Our board has only one phy, connected to rmii #1.". I interpreted this as you don't have any PHY on the RMII0, but you have a PHY on RMII1.

    So I cancelled the first port but keep the second port. The way to cancel the first port is to change EMACInitCfg[0] as I suggested earlier. If you put 0 there, it will be treated as a valid PHY presence there and code try to find it and train it, then stuck.

    Regards, Eric
  • Hi

    Got it.

    On our schematic it starts from 1

    Idea is clear will check as soon as I get to the office.

    Best regards

    Rasty

  • Hi,
    Issue us resolved.
    Thank you very much.