Use Petalinux 2017.1 to generate Zynq 7020 Linux Mirrors
Problem phenomenon:
1. Uboot Ethernet PHY rtl8211e works fine, but Linux cannot be found after startup eth0
2. Linux system startup prompt: MACB e000b000.ethernet:01 no PHY found
Possible causes of the problem:
Cadence MACB Linux Driver is not compiled into the kernel.
Workaround: Configure the kernel to Cadence MACB Linux Driver
Position:
-> Device Drivers
-> Network Device Support (netdevices [=y])
->ethernet Driver Support (Ethernet [=y])
->cadence devices (net_cadence [=y])
Note: The ZYNQ series Chip does not support Cadence Macb/gem extended buffer descriptor option. To enable this item will appear: "MACB e000b000.ethernet ETH0:DMA bus error:hresp not OK" error.
The ethernet@e000b000 configuration in the device tree file is incorrect.
Workaround: Open//project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
in which to join
&GEM0 {
compatible = "Cdns,gem";
Xlnx,ptp-enet-clock = <0x6750918>;
Phy-handle = <&phy0>;
Phy-mode = "Rgmii-id";
Mdio {
#address-cells = <0x1>;
#size-cells = <0x0>;
phy0:phy@1 {
compatible = "marvell,88e1510";//"realtek,rtl8211e";
Device_type = "Ethernet-phy";
reg = <0x1>;
};
};
Note: The actual use of Ethernet PHY is rtl8211e but
compatible = "realtek,rtl8211e" When Linux does not recognize PHY, instead
compatible = "marvell,88e1510"; print warning on post kernel reboot [firmware Warn]:/amba/ethernet@e000b000/mdio/phy@1:whitelisted Compatible string. Please remove, but at this point the PHY works correctly.
The ultimate Solution:
The device tree file
&GEM0 {
compatible = "Cdns,gem";
Xlnx,ptp-enet-clock = <0x6750918>;
Phy-handle = <ðernet-phy>;
Phy-mode = "Rgmii-id";
ethernet-phy:phy@1 {
compatible = "ethernet-phy-id001c.c915";
Device_type = "Ethernet-phy";
reg = <0x1>;
};
};
If you know the PHY ID, you can use ETHERNET-PHY-IDAAAA.BBBB to match the driver.
Reference Document: Http://elixir.free-electrons.com/linux/v4.9/source/Documentation/devicetree/bindings/net/phy.txt
Linux Device tree binding information View address:
Http://elixir.free-electrons.com/linux/v4.9/source/Documentation/devicetree