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.

Ethernet 100% packet loss

Other Parts Discussed in Thread: DP83640

Hi,

I tried to use AM335x ethernet interface at 10Mbit/s.

My board have two DP83848 phy.

1-So i configured my kernel with the following options :

CONFIG_NETWORK_PHY_TIMESTAMPING=y

CONFIG_PPS=y

CONFIG_PTP_1588_CLOCK=y

CONFIG_DP83640_PHY=y

2- I modified file source linux-04.06.00.06/drivers/net/ethernet/ti/cpsw.c in function cpsw_set_phy_config

phy->supported &= ~(ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ADVERTISED_1000baseT_Half |\
SUPPORTED_Autoneg );

val = miibus->read(miibus, phy_addr, MII_BMCR);

val &= ~BMCR_ANENABLE;
val &= ~BMCR_ANRESTART ;
val |= BMCR_FULLDPLX ;
miibus->write(miibus, phy_addr, MII_BMCR, val);
tmp = miibus->read(miibus, phy_addr, MII_BMCR);

3- i add theses following in my board init source :

#define DP83640_PHY_ID 0x20005c90
#define DP83640_PHY_MASK 0xfffffff9

static int ctp_phy_fixup(struct phy_device *phydev)
{
phydev->supported |= (SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full);
phydev->supported &= ~(SUPPORTED_100baseT_Half |
SUPPORTED_100baseT_Full);
return 0;
}

phy_register_fixup_for_uid(DP83640_PHY_ID, DP83640_PHY_MASK,
ctp_phy_fixup));

4- During kernel boot sequence, DP83848  phy is detected :

[ 7.119280] master PTP_STS 0x0100
[ 7.122725] master PTP_ESTS 0x083e
[ 7.126884] slave PTP_STS 0x0100
[ 7.130524] slave PTP_ESTS 0x003f
[ 7.134556] slave offset 0 nanoseconds
[ 7.139695] davinci_mdio.0: probed
[ 7.143260] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver NatSemi DP83640
[ 7.151343] davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver NatSemi DP83640

5- Eth0 is configured in 10Mbit/s :

[   22.631868] PHY: 0:01 - Link is Up - 10/Full

Issue:

But when i tried to obtain an IP adress by dhcp, nothing appens

#dhclient eth0

[...]

PING 192.9.201.30 (192.9.201.30) 56(84) bytes of data.

--- 192.9.201.30 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

When i set an ip adress manuelly :

#ifconfig eth0 ipadress

I can't ping this Ipadress with a other computer.

The command ethtool give me theses informations:

# ethtool eth0
Settings for eth0:
Current message level: 0x00000000 (0)
Link detected: yes

Questions : Have you any suggestions about my issue? Does i need to add something ?

Best regards

  • The console message"[   22.631868] PHY: 0:01 - Link is Up - 10/Full" does not indicate MII or RMII is working.  This only indicates the PHY has liked with an attached device at 10Mbps full duplex and MDIO is working.

    You need to verify all MII/RMII signal connections, signal timing parameters, and AM335x pin multiplexing are valid for the expected mode of operation.

    Please provide more details related to PHY mode of operation and signal connections to AM335x.  For example, are you using MII or RMII mode?  If using RMII mode, who is sourcing the RMII reference clock?

    You need to read Advisory 1.0.16 in the AM335x silicon errata if using RMII mode with AM335x sourcing the RMII reference clock.

    Regards,
    Paul