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.

AM335x GMII Ethernet PHY

Hi,

i plan to design a custom board by using AM335x interface with Ethernet PHY device through GMII interface. For hardware side, i use the AM335x EVM schematic as reference to connect AM335x with Ethernet PHY.

for firmware side,

can i just use the AM335x EVM sdk provided firmware to make the system work ?

or i have to write a new firmware code to configure the GMII ?

Thanks in advance,

Keldy 

  • The Ethernet MAC/Switch implemented in the AM335x device supports GMII mode, but the AM335x design does not pin out 9 of the 24 GMII signals. This was done to reduce the total number of package terminals. Therefore, the AM335x device does not support GMII mode. MII mode is supported with the remaining GMII signals.

    The only 1000 Mbps mode supported by AM335x is RGMII.

    The AM335 EVM uses a RGMII Ethernet PHY.  A software change should not be required for this interface if you use the same PHY.

    Most Ethernet PHYs use a common set of MDIO registers defined by the IEEE specification, but they may also implement device specific registers.  Software changes may be required if the driver uses device specific registers.

    Regards,
    Paul

  • Hi Paul,

    Thanks for the reply.

    unfortunely i'm not gonna to use the same PHY.

    i'm using linux platform for development, in AM335x EVM sdk, which C-program file is use to configure the PHY and require to change? 

    Thanks.

  • Keldy

    If the phy that you are using already has a linux phy driver or if it is of IEEE standard, then there are no changes from the driver side. Otherwise you need to write a phy driver with the help of phy vendor.

    You can look in the following for CPSW, CPDMA and MDIO drivers

    • drivers/net/ethernet/ti/cpsw.c
    • drivers/net/ethernet/ti/cpsw_ale.c
    • drivers/net/ethernet/ti/davinci_cpdma.c
    • drivers/net/ethernet/ti/davinci_mdio.c

    For phy support please look under the following folder

    • drivers/net/phy/*

    with regards

    Mugunthan V N

  • Hi,

    Thanks for the reply.

    i'm using a IEEE 802.3 compliant ethernet transceiver, from your reply that mean no changes needed from the driver code.

    do i need to change the device ID and physical address of the PHY in driver code?

    Thanks and Regards

    Keldy 

  • Keldy

    Yes, you need to update the phy addressin the platfom data in the following location

    • arch/arm/mach-omap2/devices.c:am33xx_cpsw_slaves
    • .phy_id         = "0:00"

    Also look for which slave you are using in your designa dn update the phy address to that slave data.

    with regards

    Mugunthan V N

  • Hi,

    my phy_id is 0x221610, how i convert to "0:00" format ?

    for your info, my phy_addr is 0x01.

    Thanks and Regards

    Keldy

  • Keldy

    Phy_id is not required, it will be read from the phy itself. Please update the phy_addr in that structure.

    Also make sure updating the phy addr to the proper slave which you have connected phy in hardware.

    with regards

    Mugunthan V N

  • Hi,

    How to know which slave i need to update my phy addr?

    any example?

    PHY that i'm using:

    micrel ksz9021RL

    phy addr = 0x01

    device id = 221610

    Thanks and Regards

    Keldy

  • Keldy

    Please go through the Schematics of your design to check which slave your phy is connected to.

    Your can look for whether rgmii0_txdX/rgmii1_txdX and can conclude to which slave phy is connected to.

    with regards

    Mugunthan V N