SNLA450 July   2024 DP83822H , DP83822HF , DP83822I , DP83822IF , DP83826E , DP83826I , DP83848-EP , DP83848Q-Q1 , DP83867CR , DP83867CS , DP83867E , DP83867IR , DP83867IS , DP83TC812R-Q1 , DP83TC812S-Q1 , DP83TC813R-Q1 , DP83TC813S-Q1 , DP83TC814R-Q1 , DP83TC814S-Q1 , DP83TG720R-Q1 , DP83TG720S-Q1 , DP83TG721R-Q1 , DP83TG721S-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Texas Instruments Ethernet PHY Drivers
  5. 2Ethernet PHY Driver Overview
    1. 2.1 Exploring Linux Driver Types
      1. 2.1.1 U-Boot Driver
      2. 2.1.2 Kernel Driver
  6. 3Driver Integration
    1. 3.1 Linux Device Tree
    2. 3.2 Integrating Driver
  7. 4Common Terminal Commands
    1. 4.1 Initialization Commands
      1. 4.1.1 dmesg | grep -i mdio
      2. 4.1.2 ifconfig
    2. 4.2 Functional Commands
      1. 4.2.1 Phytool
      2. 4.2.2 Ethtool
      3. 4.2.3 Forced Master/Slave
    3. 4.3 Diagnostic Commands
      1. 4.3.1 SQI
      2. 4.3.2 TDR
      3. 4.3.3 Throughput Testing - Ping and iPerf
  8. 5Summary
  9. 6References

TDR

Time Domain Reflectometer (TDR) is a function that identifies a fault in the cable. Not all Ethernet PHYs have the TDR feature, be sure to check the PHY's data sheet to confirm. For TI's automotive single pair Ethernet (SPE) PHYs to correctly run TDR, the Master/Slave state of the PHY must be known.

When PHY is Master:

  • If cable is connected (good link)
    • PHY drops link, performs TDR, and regains link
  • If cable is disconnected or damaged
    • PHY performs TDR and outputs:
      • Fault Type
        • Open or Short
      • Distance of fault in meters
When PHY is Slave:
  • If cable is connected (good link)
    • Link partner (Master) needs to be forced silent (not transmitting any packets), otherwise TDR will fail
      • Cable can be disconnected from Master to run TDR as Slave
In the codeblock below, eth3 is initially linked up with a known good cable and configured as Master. TDR is run and completes as expected, with no fault detected. After TDR is completed, the cable is unplugged from the link partner, resulting in eth3: Link is Down. TDR is then run again.

TDR command: ethtool --cable-test ethx

root@j7-evm:~# ethtool --cable-test eth3        
am65-cpsw-nuss c000000.ethernet eth3: Link is Down       
PHY is set as Master.
Cable test started for device eth3.
Cable test completed for device eth3.
Pair A code OK
TDR HAS COMPLETED AND PASSED
root@j7-evm:~# No Fault Detected.                        
am65-cpsw-nuss c000000.ethernet eth3: Link is Up - 100Mbps/Full - flow control off
                                                        
am65-cpsw-nuss c000000.ethernet eth3: Link is Down       

root@j7-evm:~# ethtool --cable-test eth3                
PHY is set as Master.
Cable test started for device eth3.
Cable test completed for device eth3.
Pair A code Open Circuit
TDR HAS COMPLETED AND PASSED
Open Cable Detected
Length of Fault: 3 Meters
In the codeblock below, eth4 is initially linked up with a known good cable and configured as Slave. TDR is run and fails as expected. Next the cable is unplugged from the link partner, resulting in eth4: Link is Down. TDR is then run again.
root@j7-evm:~# ethtool --cable-test eth4
am65-cpsw-nuss c000000.ethernet eth4: Link is Down
PHY is set as Slave.
Cable test started for device eth4.
Cable test completed for device eth4.
TDR HAS FAILED
root@j7-evm:~# am65-cpsw-nuss c000000.ethernet eth4: Link is Up - 100Mbps/Full - flow control off

am65-cpsw-nuss c000000.ethernet eth4: Link is Down

root@j7-evm:~# ethtool --cable-test eth4
PHY is set as Slave.
Cable test started for device eth4.
Cable test completed for device eth4.
Open Circuit
TDR HAS COMPLETED AND PASSED
Open Cable Detected
Length of Fault: 3 Meters