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

Integrating Driver

This section describes how to add a driver (newDriver.c, where newDriver is an Ethernet PHY) to an SDK on a linux system that is either missing the driver or using an outdated version.

In the SDK, find the Linux kernel directory (LKD). An example file path looks like:

SDK_Install_Directory/board-support/TI-linux-kernel/

TI-Linux-kernel is the LKD in this example. From here, you can navigate to:

LKD/drivers/net/phy/
Copy newDriver.c into this directory. Within this same directory are Makefile and Kconfig , both files need to be edited for newDriver.c to be built.

Edit Makefile

Add the following line to the Makefile. Note the assignment is newDriver.o and not newDriver.c

obj-$(CONFIG_newDriver_PHY)    += newDriver.o

Edit Kconfig

Add the following lines to the Kconfig,

config newDriver PHY
    tristate "<Insert Company name> newDriver PHY"
    --help--
        Supports the newDriver PHY.
After both the Makefile and Kconfig files have been edited, return to the LKD. From here, go to:
LKD/arch/arm64/configs
Note: If your processor is 32 bit instead of 64 bit, go into the 'arm' folder instead of 'arm64'.

Here you can find a defconfig file, add the following line:

CONFIG_newDriver_PHY = y
The naming convention, CONFIG_newDriver_PHY, needs to match what was set in the Makefile.

From here, you can return to the SDK install directory and run the make command on the terminal.

Note: Not all kernel's can be built by running make, consult your SDK's documentation for correct procedure to build kernel, u-boot, and dtb files.