[meta-xilinx] Help with ethernet0 device tree node

Edward Wingate edwingate8 at gmail.com
Thu Jul 28 16:04:07 PDT 2016


My eth0 interface can only run at 1Gbps.  If I plug into a 100 Mbps
switch or use ethtool to set the link speed, it looks like it
succeeded:
    xemacps e000b000.ps7-ethernet: link down
    xemacps e000b000.ps7-ethernet: Set clk to 25000000 Hz
    xemacps e000b000.ps7-ethernet: link up (100/FULL)

But I can no longer communicate on the network.  Setting the link
speed back to 1Gbps fixes things.

I currently have this in my device tree for eth0:

 ps7_ethernet_0: ps7-ethernet at e000b000 {
            phy-handle = <&phy0>;
            phy-mode = "rgmii-id";
            compatible = "xlnx,ps7-ethernet-1.00.a";
            clock-names = "ref_clk", "aper_clk";
            clocks = <&clkc 13>, <&clkc 30>;
            xlnx,enet-slcr-1000mbps-div0 = <0xa>;
            xlnx,enet-slcr-1000mbps-div1 = <0x1>;
            xlnx,enet-slcr-100mbps-div0 = <0xa>;
            xlnx,enet-slcr-100mbps-div1 = <0x5>;
            xlnx,enet-slcr-10mbps-div0 = <0xa>;
            xlnx,enet-slcr-10mbps-div1 = <0x32>;
            xlnx,ptp-enet-clock = <111111115>;
            mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                phy0: phy at 0 {
                    compatible = "marvell,88e1510";
                    device_type = "ethernet-phy";
                    reg = <0>;
                } ;
            };
} ;

I got the ethernet0 device tree node from here (plus bits from
elsewhere that I have come across to try and get this to work):
http://www.wiki.xilinx.com/Zynq+Emacps+Linux+Driver

My ENET0 clock comes from the iopll.  My clock tree currently looks like this:

  ps_clk                                   3            3    33333333
        0 0
     iopll_int                             1            1   999999990
        0 0
        iopll                             11           11   999999990
        0 0
           gem0_mux                        1            1   999999990
        0 0
              gem0_div0                    1            1   999999990
        0 0
                 gem0_div1                 1            1   124999999
        0 0
                    gem0_emio_mux           1            1   124999999
         0 0
                       gem0                1            1   124999999
        0 0

When I set the link speed to 100Mbps, the clock rate column for gem0
does not change from 125MHz. I think I do not have the clock set up
correctly for eth0.

Can anyone see what's missing or wrong?

Thank you for any help.



More information about the meta-xilinx mailing list