• 0

ZYBO ethernet MDIO address at the REF Manual


Go to solution Solved by sbobrowicz,

Question

Hello,

I'm having a question about the address of the ZYBO ethernet phy on the mdio bus. The REF Manual says:

Although the default power-up configuration of the PHY might be enough in most applications, the MDIO bus is
available for management. The RTL8211E-VL is assigned address 00001b. With simple register read and write
commands, status information can be read out or configuration changed. The Realtek PHY follows industry-
standard register map for basic configuration.

What does that mean for the device tree? I've got the ethernet PHY working with the following device tree configuration:

        enet-reset = <&gpio0 0 0>;
        phy-mode = "rgmii-id";
        phy-handle = <&phy0>;
        status = "okay";
        xlnx,eth-mode = <0x1>;
        xlnx,has-mdio = <0x1>;
        xlnx,ptp-enet-clock = <0x6750918>;
        ps7_ethernet_0_mdio: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: [email protected] {
                     compatible = "realtek,RTL8211E";
                     device_type = "ethernet-phy";
                     reg = <1>;
                };
        };

Where do I have to use the address 00001b?

Greetings

Heiner

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution

Your devicetree already specifies the MDIO address. I've highlighted in red below where this is done.

        enet-reset = <&gpio0 0 0>;
        phy-mode = "rgmii-id";
        phy-handle = <&phy0>;
        status = "okay";
        xlnx,eth-mode = <0x1>;
        xlnx,has-mdio = <0x1>;
        xlnx,ptp-enet-clock = <0x6750918>;
        ps7_ethernet_0_mdio: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: [email protected] {
                     compatible = "realtek,RTL8211E";
                     device_type = "ethernet-phy";
                     reg = <1>;
                };
        };

 the value of reg is used to specify the address of something on a bus.

Edit: Just realized where I think the confusion came from... the address is written in the reference manual as 00001b, which is meant to be interpreted as 00001 binary. This is a bit of a mistake, because it could also be interpreted as 0x1b (hex). I will change the reference manual to clear this up.

Edited by sbobrowicz
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now