This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
I am working with a design which uses two external Ethernet interfaces using IPv6 global unique IP addresses on the AM3354 processor. Looking through the various posts and TI's processors.wiki.ti.com using dual EMACs (http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User's_Guide#Dual_Standalone_EMAC_mode ), I have come up with the following device tree entries:
&cpsw_emac0 {
mdio = <&davinci_mdio>;
phy_id = <1>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
};
&cpsw_emac1 {
mdio = <&davinci_mdio>;
phy_id = <9>;
phy-mode = "rmii";
dual_emac_res_vlan = <2>;
};
/* Set both Sitara RMII interfaces to use the external clock */
&phy_sel {
rmii-clock-ext;
};
&mac {
slaves = <2>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
dual_emac = <1>;
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
};
This configuration works, and I get two ethernet interfaces showing up in Linux (see below with addresses cleared for privacy). I can ping each interface successfully.
<MAC0> and <MAC1> are the MACs read from the fused addresses in the Sitara part.
<link_local1> and <link_local2> are unique
<static global uniuqe1> and <static global uniuqe2> are defined by me and on the same subnet
# ifconfig
eth0 Link encap:Ethernet HWaddr <MAC0>
inet6 addr: <link_local1>/64 Scope:Link
inet6 addr: <static global uniuqe1> Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9230 errors:0 dropped:0 overruns:0 frame:0
TX packets:17385 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:980934 (957.9 KiB) TX bytes:2276748 (2.1 MiB)
Interrupt:56
eth1 Link encap:Ethernet HWaddr <MAC1>
inet6 addr: <link_local2> Scope:Link
inet6 addr: <static global uniuqe2> Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13117 errors:0 dropped:0 overruns:0 frame:0
TX packets:16902 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1367799 (1.3 MiB) TX bytes:2237094 (2.1 MiB)
I am also running the patch found here: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/426405?AM3352-Using-emac1-0x4A100300-as-default-and-only-ETH0-device-in-linux.
However, when I physically remove the cable attached to eth0, my pings to eth1 stall or stop completely, but I don’t see the same behavior when I unplug eth1, eth0 continues to respond. I can't find any setting / function in the cpsw.c driver which would account for this behavior.
Any help would be greatly appreciated.
Thx,
Scott