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.

PHYTC-3P-PHYCORE-AM335X: Kernel 5.10 Ethernet Phy Clock Selection

Part Number: PHYTC-3P-PHYCORE-AM335X

In Kernel 4.x, there was a DTS option to configure the RMII to use an external clock:

&phy_sel {
rmii-clock-ext;
};

In Kernel 5.10, that has been deprecated, and replaced by phy-gmii-sel:

dt-bindings: net: ti: deprecate cpsw-phy-sel bindings
The cpsw-phy-sel driver was replaced with new PHY driver phy-gmii-sel, so deprecate cpsw-phy-sel bindings.

The rmii-clock-ext does not seem to be an option in the phy-gmii-sel driver.

How can we be certain that the external clock is enabled? My understanding is that the internal clock has too much jitter.

On 50% of our boot ups, we noticed that we have an extremely slow connection speed on eth0. If we perform an ifconfig eth0 down; ifconfig eth0 up sequence, the connection recovers and is fast again.

We used ethtool and wire shark to discover that when the connection is slow, we had many CRC errors. When we restart the link, then the CRC errors go away, and the speed is fine.

On several posts with a similar issue, their solution was to enable the external rmii clock. However, with Linux 5.10, we are not sure how to enable it, or check if it is, with the new driver.

Related Posts:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/808525/linux-am4378-ethernet-ping-issue

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/802339/am3351-rx-crc-errors-and-align-code-errors-with-ksz8081rnaia-rmii

  • I looked into the driver, and found that it does set the bit to use the external clock. 

    Also, our issue only occurs when the AM335x is plugged into a TP-LINK branded unmanaged switch, or TP-LINK branded router. I am not sure why that occurs, but the issue is not present on other switches / routers we tested.

    So, I am closing this issue as it appears to be caused by TP-LINK and not the AM335x.