PHY Register dump over JTAG

In this article we shall use a script that will allow the user to read the PHY management registers over the JTAG. This can be useful for board bring up where uboot is not possible.

The script was tested on a ZCU102, and cross referenced against the u-boot mii dump utility for sanity purposes.

To use the script, download the file below:

HDF File

User will need to open the TCL and update line 73 to point to their HDF file.


Then, Launch XSCT and source the TCL command:

source TCL
source jtag_phy.tcl

The script will automatically create the FSBL, and PMUFW (if not detected). The script will then search for the PHY Addr and return the address if found. The script will return -1 if not.

This script assumes the user is using GEM3 for the PHY. So, if this is not the case in your design then open the TCL and make the modifications in the init_man_port proc, and the phy_read proc.

For help here, see the Zynq MP Register Reference guide.

Once the script is run, and the PHY Addr is successfully found, the use can use the phy_read command to read the PHY registers. For example:

As a sanity check, I compared these results against the uboot utility:

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy