Jump to content
  • 0

ZYBO ethernet MDIO address at the REF Manual


der_hainz

Question

Posted

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: phy@1 {
                     compatible = "realtek,RTL8211E";
                     device_type = "ethernet-phy";
                     reg = <1>;
                };
        };

Where do I have to use the address 00001b?

Greetings

Heiner

2 answers to this question

Recommended Posts

Posted

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: phy@1 {
                     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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...