AR# 76328

|

2020.x Versal ACAP, Zynq UltraScale+ MPSoC: Device Tree Generator generates incorrect phy-mode for 1000BaseX PHY type in AXI Ethernet design

Description

In the 2020.x release version of the Device Tree Generator (DTG), it incorrectly generates the phy-mode for the 1000BaseX PHY type in an AXI Ethernet design.

This does not impact driver probe functionality as the driver uses the phy-type property.

		axi_eth_0: ethernet@80000000 {
axistream-connected = <&axi_eth_0_dma>;
axistream-control-connected = <&axi_eth_0_dma>;
clock-frequency = <100000000>;
clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk";
clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>, <&misc_clk_0>;
compatible = "xlnx,axi-ethernet-7.2", "xlnx,axi-ethernet-1.00.a";
device_type = "network";
interrupt-names = "interrupt";
interrupt-parent = <&gic>;
interrupts = <0 91 4>;
local-mac-address = [00 0a 35 00 00 00];
phy-handle = <&phy2>;
phy-mode = "sgmii";
reg = <0x0 0x80000000 0x0 0x40000>;
xlnx = <0x0>;
xlnx,axiliteclkrate = <0x0>;
xlnx,axisclkrate = <0x0>;
xlnx,clockselection = <0x0>;
xlnx,enableasyncsgmii = <0x0>;
xlnx,gt-type = <0x0>;
xlnx,gtinex = <0x0>;
xlnx,gtlocation = <0x0>;
xlnx,gtrefclksrc = <0x0>;
xlnx,include-dre ;
xlnx,instantiatebitslice0 = <0x0>;
xlnx,phy-type = <0x5>;
xlnx,phyaddr = <0x2>;
xlnx,phyrst-board-interface-dummy-port = <0x0>;
xlnx,rable = <0x0>;
xlnx,rxcsum = <0x2>;
xlnx,rxlane0-placement = <0x0>;
xlnx,rxlane1-placement = <0x0>;
xlnx,rxmem = <0x8000>;
xlnx,rxnibblebitslice0used = <0x0>;
xlnx,tx-in-upper-nibble = <0x1>;
xlnx,txcsum = <0x2>;
xlnx,txlane0-placement = <0x0>;
xlnx,txlane1-placement = <0x0>;
axi_eth_0_mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
phy2: phy@2 {
device_type = "ethernet-phy";
reg = <2>;
};
};
};

Solution

This is a known issue in the 2020.x release of the DTG for an AXI Ethernet IP design.

To fix this issue, you will need to apply the attached patch.

For the 2020.1 release you need to apply 0001-axi_etherenet-Update-the-phy-mode-property-for-kc705.patch from the attached Zip file before applying 0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch

Root Cause:

In an AXI Ethernet IP design, the DTG has incorrect logic for a 1000BaseX PHY type.

PetaLinux:

The patch should be applied to <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/device-tree_%.bbappend recipes.

Note:

For information on how to apply a patch to recipes in PetaLinux, please refer to (UG1144) o https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842475/PetaLinux+Yocto+Tips

1) Copy the attached patch from the Attachments section to the device-tree directory as shown below.

If these directory and recipes do not exist then manually create <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files/

1.a) 2020.1 release

$ mkdir -p <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Update-the-phy-mode-property-for-kc705.patch <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files

1.b) 2020.2 release

$ mkdir -p <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/files

2) Modify the device-tree.bbappend file with the below content using a text editor:

$ vim <plnx-proj-root>/project-spec/meta-user/recipes-bsp/device-tree/device-tree.bbappend

2.a) 2020.1 release

# device-tree.bbappend content
# Note: system-user.dtsi is autogenerated from PetaLinux tool.
SRC_URI += " \
file://system-user.dtsi \
file://0001-axi_etherenet-Update-the-phy-mode-property-for-kc705.patch \
file://0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:

2.b) 2020.2 release

# device-tree.bbappend content
# Note: system-user.dtsi is autogenerated from petalinux tool.
SRC_URI += " \
file://system-user.dtsi \
file://0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:

3) Clean the device-tree sstate cache and rebuild the device-tree recipes:

$ petalinux-build -c device-tree -x cleansstate
$ petalinux-build -c device-tree

Yocto:

The patch should be applied to <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/device-tree.bbappend recipes

1) Copy the attached patch from the Attachments section to the device-tree directory as shown below.

If these directory and recipes do not exist then manually create <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files

1.a) 2020.1 release

$ mkdir -p <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Update-the-phy-mode-property-for-kc705.patch <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files

1.b) 2020.2 release

$ mkdir -p <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files
$ cp 0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/files

2) Modify the device-tree.bbappend file with the below content using a text editor:

$ vim <yocto-proj-root>/sources/meta-xilinx-tools/recipes-bsp/device-tree/device-tree.bbappend

2.a) 2020.1 release

# device-tree.bbappend content
SRC_URI_append = " \
file://0001-axi_etherenet-Update-the-phy-mode-property-for-kc705.patch \
file://0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

2.b) 2020.2 release

# device-tree.bbappend content
SRC_URI_append = " \
file://0001-axi_etherenet-Fix-logic-for-phy-mode-property.patch \
"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

3) Clean the device-tree sstate cache and rebuild the device-tree recipes:

$ bitbake device-tree -c cleansstate
$ bitbake device-tree

Attachments

Associated Attachments

Name File Size File Type
AR-76328-patches.zip 3 KB ZIP
AR# 76328
Date 04/13/2021
Status Active
Type Known Issues
Devices
Tools
IP
Boards & Kits
People Also Viewed