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.

AM5726: AM5726

Part Number: AM5726

Hi,

The board uses TI AM 5726 and the GMAC associated MDIO channel connected to an Ethernet's switch MDIO/SMI. There is no PHY on this MDIO / SMI bus. The switch has a very large register address space and implements an indirect register addressing with addresses 0-7 reserved for this purpose.

MDIO / SMI register address 0 and 1 are the 32 bit pointer for the write operation, register address 2 and 3 are the 32 bit data to write,  register address 4 and 5 are the 32 bit address to read from, and register address 6 and 7 are the 32 bit data read registers. An operation (read/write) status register is located at register address 0x1F .

The switch is mapped at MDIO/SMI PHY address 0.

Is there a method to stop the MDIO scanning and still be able to issue read/write transactions to access the switch?

If scanning can't be stopped, is there a method to limit the address range where this automatic scanning occurs ? (to prevent interference with switch operation)

Which PHY register is the MDIO scanning ?

Thank you

  • Ioan,

    You will want to configure the CPSW to set the PHY number to NO_PHY in the emac_soc.c file

    You need to also make sure CPRGMII is in "forced" mode of operation (it should be) by checking EXT_EN bit of the SL_MACCONTROL register to be set to 0.

    From the TRM:
    24.11.4.8.7.3.4 Forced Mode of Operation
    The CPRGMII is operating in the forced mode of operation when the EXT_EN bit of the SL_MACCONTROL register is set to 0. In the forced mode of operation, the in-band data is ignored if present. The link status is forced high, and the duplexity and speed are determined from the SL_MACCONTROL[0] FULLDUPLEX and [7] GIG bits. If GIG = 1, then operation is gigabit mode. If the GIG is 0, the operation is 100 Mbps mode.


    Below is the configuration in <pdk>/packages/ti/drv/emac/soc/am572x/emac_soc.c to update the PHY ID for both ports to EMAC_CPSW_NO_PHY_ADDR (0xFFFFFFFF) in EMACInitCfg[1]

    >>>

    EMAC_RX_ISR_PER_MSEC_DEFAULT,
    {
      {
        CSL_MPU_IPORT_REGS,
        CSL_MPU_ISL1_REGS,
        EMAC_CPSW_NO_PHY_ADDR,
      },
      {
        CSL_MPU_IPORT_REGS,
        CSL_MPU_ISL2_REGS,
        EMAC_CPSW_NO_PHY_ADDR,
      }
    }

    <<<

    Best regards,

    Dave