Tool/software: Linux
Hi,
I have an issue about Ethernet on AM3358 Sitara soc, the interfaces ETH1 and ETH0 are setup as RMII and only eth1 is working correctly.
Here is the pinmuxing/device tree used :
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 */ AM33XX_IOPAD(0x864, (PIN_INPUT_PULLUP | MUX_MODE3)) /* gpmc_a9.rmii2_crs_dv */ AM33XX_IOPAD(0x908, (PIN_INPUT_PULLUP | MUX_MODE1)) /* mii1_col.rmii2_refclk */ AM33XX_IOPAD(0x86c, (PIN_INPUT_PULLUP | MUX_MODE3)) /* gpmc_a11.rmii2_rxd0 */ AM33XX_IOPAD(0x868, (PIN_INPUT_PULLUP | MUX_MODE3)) /* gpmc_a10.rmii2_rxd1 */ AM33XX_IOPAD(0x874, (PIN_INPUT_PULLUP | MUX_MODE3)) /* gpmc_wpn.rmii2_rxerr */ AM33XX_IOPAD(0x854, (PIN_OUTPUT_PULLDOWN | MUX_MODE3)) /* gpmc_a5.rmii2_txd0 */ AM33XX_IOPAD(0x850, (PIN_OUTPUT_PULLDOWN | MUX_MODE3)) /* gpmc_a4.rmii2_txd1 */ AM33XX_IOPAD(0x840, (PIN_OUTPUT_PULLDOWN | MUX_MODE3)) /* gpmc_a0.rmii2_txen */
davinci_mdio_default: pinmux_davinci_mdio_default { pinctrl-single,pins = < 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 */ >; };
&cpsw_emac0 { phy-handle = <ðphy0>; phy-mode = "rmii"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { phy-handle = <ðphy1>; phy-mode = "rmii"; dual_emac_res_vlan = <2>; }; &davinci_mdio { pinctrl-names = "default"; pinctrl-0 = <&davinci_mdio_default>; status = "okay"; ethphy0: ethernet-phy@0 { reg = <0>; }; ethphy1: ethernet-phy@1 { reg = <1>; }; }; &mac { pinctrl-names = "default"; pinctrl-0 = <&cpsw_default>; status = "okay"; dual_emac; }; &phy_sel { rmii-clock-ext; rmii2-crs-dv; /* use RMII_CRS_DV pinmux */ };
I am using ti-linux-4.14 version of the kernel.
I made sure that gpmc_a9 is configured as RMII_CRS_DV in sma2 register by setting BIT(0) => eth1 is worlking fine
My issue comes from eth0 interface where I cannot have a stable link, it keeps staying up and down :
[ 1586.161861] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1590.321567] cpsw 4a100000.ethernet eth0: Link is Down [ 1591.361876] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1596.561539] cpsw 4a100000.ethernet eth0: Link is Down [ 1597.601846] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1600.721530] cpsw 4a100000.ethernet eth0: Link is Down [ 1601.761850] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1604.881528] cpsw 4a100000.ethernet eth0: Link is Down [ 1605.921842] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1608.001533] cpsw 4a100000.ethernet eth0: Link is Down [ 1609.041878] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1611.121534] cpsw 4a100000.ethernet eth0: Link is Down [ 1612.161882] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1615.281525] cpsw 4a100000.ethernet eth0: Link is Down [ 1616.321915] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow control off [ 1620.481540] cpsw 4a100000.ethernet eth0: Link is Down
The hardware PHY LAN8710i is set according to this checklist :
Both interfaces are wired exactly the same way but I cannot get eth0 working.
Do you have an idea of where the issue is coming from ?
Thanks