AR# 69132

2017.1-2018.3 Zynq UltraScale+ MPSoC: Linux MACB MDIO support for single MAC managing multiple PHYs

Description

How can I enable MDIO support for a single MAC managing multiple PHYs?

Solution

You will need to download and apply the patch attached to this answer record with the same release version as the software you are using.

The patch should be applied to <plnx-proj-root>/project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend

  • The 2017.3 patches can be used for the 2017.4 release.
  • The 2018.2 patch can be used for the 2018.1 release.
  • A patch for 2018.3 has now been added
Example device-tree:
 
 

    mdio {
        compatible = "cdns,macb-mdio";
        reg = <0x0 0xff0b0000 0x0 0x1000>;
        clocks = <&clk125>, <&clk125>, <&clk125>;
        clock-names = "pclk", "hclk", "tx_clk";
        ethernet_phya: ethernet-phy@a {
            reg = <0xA>;
        };
        ethernet_phyb: ethernet-phy@b {
            reg = <0xB>;
        };
        ethernet_phyc: ethernet-phy@c {
            reg = <0xC>;
        };
        ethernet_phyd: ethernet-phy@d {
            reg = <0xD>;
        };
    };

    Eth0: ethernet@ff0b0000 {
    ....
    phy-handle = <& ethernet_phya>;
    }

    Eth1: ethernet@ff0c0000 {
    ....
    phy-handle = <& ethernet_phyb>;
    }

    Eth2: ethernet@ff0d0000 {
    ....
    phy-handle = <& ethernet_phyc>;
    }

    Eth3: ethernet@ff0e0000 {
    ....
    phy-handle = <& ethernet_phyd>;
    }

As a reference, an example MACB device tree snippet can be found on GitHub:

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/macb.txt

Note: To apply a patch to recipes, please refer to (UG1144) or http://www.wiki.xilinx.com/PetaLinux+Yocto+Tips

Attachments

Associated Attachments

Linked Answer Records

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
72064 Zynq UltraScale+ MPSoC GEM: 2018.3 Linux, ping failed when IP addresses are in the same subnet N/A N/A
AR# 69132
Date 03/13/2020
Status Active
Type Known Issues
Devices
Tools More Less
Boards & Kits