Enable PHY on U-Boot
Follow the steps below to enable the new PHY on U-Boot.
- To enable your new PHY for the U-Boot, first you need to define the macro definition
in the board specific header file. The following code block provides an example of adding the YT8531 PHY in the VisionFive 2 header file include/configs/starfive-visionfive.h.h.
#define DWC_NET_PHYADDR
Note: Make sure the PHY address you defined in the header file is correct, otherwise, the system has to enumerate all the PHY address available. - Then you need to add the defined macro definition in the configuration file. The following image shows an example of adding the YT8531 PHY in the configuration file.
- Then you can add a new entry for PHY device initialization. The following image provides an example of adding the YT8531 PHY in the file drivers/net/phy/motorcomm.c.
- Then you need to define the driver structure. The following image provides an example of defining the data structure of the YT8531 PHY in the file drivers/net/phy/motorcomm.c.