Hi,大家好
我的SDK版本是ti-processor-sdk-linux-am335x-evm-04.00.00.04
LAN8710 MII改RMII接口, uboot已调通,可以ping和使用tftp下载,现在调试kernel,修改如下:
1、引脚复用
cpsw_default: cpsw_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x90c, (PIN_INPUT_PULLUP | MUX_MODE1)) /* mii1_crs.rmii1_crs_dv */
AM33XX_IOPAD(0x944, (PIN_INPUT_PULLUP | MUX_MODE0)) /* rmii1_refclk.rmii1_refclk */
AM33XX_IOPAD(0x940, (PIN_INPUT_PULLUP | MUX_MODE1)) /* mii1_rxd0.rmii1_rxd0 */
AM33XX_IOPAD(0x93c, (PIN_INPUT_PULLUP | MUX_MODE1)) /* mii1_rxd1.rmii1_rxd1 */
AM33XX_IOPAD(0x910, (PIN_INPUT_PULLUP | MUX_MODE1)) /* mii1_rxerr.rmii1_rxerr */
AM33XX_IOPAD(0x928, (PIN_OUTPUT_PULLDOWN | MUX_MODE1)) /* mii1_txd0.rmii1_txd0 */
AM33XX_IOPAD(0x924, (PIN_OUTPUT_PULLDOWN | MUX_MODE1)) /* mii1_txd1.rmii1_txd1 */
AM33XX_IOPAD(0x914, (PIN_OUTPUT_PULLDOWN | MUX_MODE1)) /* mii1_txen.rmii1_txen */
>;
};
davinci_mdio_default: davinci_mdio_default {
pinctrl-single,pins = <
/* MDIO */
AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
>;
};
2、rmii模式
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
};
phy_sel: cpsw-phy-sel@44e10650 {
compatible = "ti,am3352-cpsw-phy-sel";
reg= <0x44e10650 0x5>;
reg-names = "gmii-sel";
rmii-clock-ext;
};
kernel启动部分log如下:
[ 0.955041] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 0.961437] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 0.968838] libphy: 4a101000.mdio: probed
[ 0.973043] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 0.983282] <><><><><><><>priv->rmii_clock_external:1
[ 0.988869] cpsw 4a100000.ethernet: Detected MACID = 04:a3:16:f0:4b:18
静态设置IP无法ping通,使用dhcp无法获取ip地址,网口指示灯已亮有闪烁,请帮忙看看是什么原因
wolf war:
eth0Link encap:EthernetHWaddr 04:A3:16:F0:4B:18UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1RX packets:0 errors:0 dropped:0 overruns:0 frame:0TX packets:184 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B)TX bytes:48094 (46.9 KiB)Interrupt:173
从该信息上看,TX是正常的,RX错误
Shine:
回复 wolf war:
感谢分享解决方法!