Other Parts Discussed in Thread: AM4372
Tool/software: Linux
Hi,
I am new to the forums, So do apologize if this is a repeat.
We have a custom board which was developed of am437x-gp-evm. We are facing an issue with the Ethernet, when I plug eth1 and eth0 both with saperate subnet, I am able to ping the IP address successfully. The moment eth1 is unplugged ping stops to eth0 too.
Following is the configuration in my dts file:
AM4372_IOPAD(0x910, PIN_INPUT | MUX_MODE1) /* mii1_rxer */
AM4372_IOPAD(0x90C, PIN_INPUT | MUX_MODE1) /* mii1_crs */
AM4372_IOPAD(0x944, PIN_INPUT | MUX_MODE0) /* rmii1_refclk */
AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rgmii1_txen */
AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rgmii1_txd1 */
AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rgmii1_txd0 */
AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rgmii1_rxd1 */
AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rgmii1_rxd0 */
/* Slave 2 */
AM4372_IOPAD(0x858, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */
AM4372_IOPAD(0x840, PIN_OUTPUT | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */
AM4372_IOPAD(0x854, PIN_OUTPUT | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */
AM4372_IOPAD(0x850, PIN_OUTPUT | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */
AM4372_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */
AM4372_IOPAD(0x848, PIN_OUTPUT | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */
AM4372_IOPAD(0x85c, PIN_INPUT | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */
AM4372_IOPAD(0x844, PIN_INPUT | MUX_MODE2) /* gpmc_a1.rgmii2_rtcl */
AM4372_IOPAD(0x86c, PIN_INPUT | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */
AM4372_IOPAD(0x868, PIN_INPUT | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */
AM4372_IOPAD(0x864, PIN_INPUT | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */
AM4372_IOPAD(0x860, PIN_INPUT | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
dual_emac=<1>;
status = "okay";
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>,<0>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>,<5>;
phy-mode = "rgmii";
dual_emac_res_vlan = <2>;
};
Linux Kernel Version: Linux version 4.14.79
Kernel log of PHY:
[ 1.206803] libphy: Fixed MDIO Bus: probed
[ 1.283487] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.291188] davinci_mdio 4a101000.mdio: detected phy mask ffffffde
[ 1.299354] libphy: 4a101000.mdio: probed
[ 1.303400] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 1.312669] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver Micrel KSZ9031 Gigabit PHY
[ 1.323288] cpsw 4a100000.ethernet: Detected MACID = f0:b5:d1:54:be:a0
[ 1.330122] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.336565] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.341859] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.349724] cpsw 4a100000.ethernet: cpsw: Detected MACID = f0:b5:d1:54:be:a2
ifconfig -a output:
eth0 Link encap:Ethernet HWaddr F0:B5:D1:54:BE:A0
inet addr:10.74.127.251 Bcast:10.74.127.255 Mask:255.255.255.192
inet6 addr: fe80::f2b5:d1ff:fe54:bea0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:128 errors:0 dropped:0 overruns:0 frame:0
TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8420 (8.2 KiB) TX bytes:24020 (23.4 KiB)
Interrupt:51
eth1 Link encap:Ethernet HWaddr F0:B5:D1:54:BE:A2
inet addr:10.74.125.55 Bcast:10.74.125.255 Mask:255.255.254.0
inet6 addr: fe80::f2b5:d1ff:fe54:bea2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10495 errors:0 dropped:54 overruns:0 frame:0
TX packets:651 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1070755 (1.0 MiB) TX bytes:61738 (60.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:320 errors:0 dropped:0 overruns:0 frame:0
TX packets:320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23680 (23.1 KiB) TX bytes:23680 (23.1 KiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 5
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
I read the http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User's_Guide#Dual_Standalone_EMAC_mode but still was not able to come to a conclusion. We want to have the both Ethernet ports eth0 and eth1 work independent of each other. Unpluging eth1 should not effect eth0.
Thank you for your response.