您的位置:首页 > 其它

macb e000b000.ethernet :01 no PHY found 问题的解决方法

2017-09-18 10:09 483 查看
使用petalinux 2017.1 生成zynq 7020 的Linux镜像

问题现象:

1. uBoot 中Ethernet PHY rtl8211e 工作正常,但是Linux 启动后无法找到eth0

2. Linux系统启动时提示:macb e000b000.ethernet :01 no PHY found

问题可能的原因:

Cadence Macb Linux Driver 没有编译到内核中。

解决方法:配置内核使能Cadence Macb Linux Driver

位置:

-> Device Drivers

-> Network device support (NETDEVICES [=y])

->Ethernet driver support (ETHERNET [=y])

->Cadence devices (NET_CADENCE [=y])



备注: zynq 系列芯片不支持Cadence MACB/GEM extended buffer descriptor 选项。使能该项后会出现:“macb e000b000.ethernet eth0: DMA bus error: HRESP not OK” 错误。

设备树文件中ethernet@e000b000 的配置有误。

解决方法:

打开//project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

在其中加入

&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>;
};
};


};

备注:实际使用的Ethernet PHY为RTL8211E 但是

compatible = “realtek,RTL8211E”;时Linux 不能识别到PHY,改为

compatible = “marvell,88e1510”;后内核启时会打印警告“[Firmware Warn]: /amba/ethernet@e000b000/mdio/phy@1:Whitelisted compatible string. Please remove”,但此时PHY可以正常工作。



最终的解决办法:

将设备树文件

&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>;
};


};

如果已知PHY的ID则可以用ethernet-phy-idaaaa.bbbb 去匹配驱动。

参考文档:http://elixir.free-electrons.com/linux/v4.9/source/Documentation/devicetree/bindings/net/phy.txt

Linux设备树绑定信息查看地址:

http://elixir.free-electrons.com/linux/v4.9/source/Documentation/devicetree
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: