Hello, we are developing a custom platform with a main TDA4 SoC.
Processor SDK version: ti-processor-sdk-linux-j7-evm-08_06_01_02
On our platform we have connected several Marvell 88E1512 Ethernet PHY to Ethernet switch CPSW0 on main domain.
We encountered the following problem: CPSW0 is unable to ping to the external network.
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
dts:
mdio_pins_default: mdio-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
>;
};
rgmii3_pins_default: rgmii3-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0xb0, PIN_INPUT, 4) /* (AF28) PRG0_PRU0_GPO0.RGMII3_RD0 */
J721E_IOPAD(0xb4, PIN_INPUT, 4) /* (AE28) PRG0_PRU0_GPO1.RGMII3_RD1 */
J721E_IOPAD(0xb8, PIN_INPUT, 4) /* (AE27) PRG0_PRU0_GPO2.RGMII3_RD2 */
J721E_IOPAD(0xbc, PIN_INPUT, 4) /* (AD26) PRG0_PRU0_GPO3.RGMII3_RD3 */
J721E_IOPAD(0xc8, PIN_INPUT, 4) /* (AE26) PRG0_PRU0_GPO6.RGMII3_RXC */
J721E_IOPAD(0xc0, PIN_INPUT, 4) /* (AD25) PRG0_PRU0_GPO4.RGMII3_RX_CTL */
J721E_IOPAD(0xdc, PIN_OUTPUT, 4) /* (AJ28) PRG0_PRU0_GPO11.RGMII3_TD0 */
J721E_IOPAD(0xe0, PIN_OUTPUT, 4) /* (AH27) PRG0_PRU0_GPO12.RGMII3_TD1 */
J721E_IOPAD(0xe4, PIN_OUTPUT, 4) /* (AH29) PRG0_PRU0_GPO13.RGMII3_TD2 */
J721E_IOPAD(0xe8, PIN_OUTPUT, 4) /* (AG28) PRG0_PRU0_GPO14.RGMII3_TD3 */
J721E_IOPAD(0xf0, PIN_OUTPUT, 4) /* (AH28) PRG0_PRU0_GPO16.RGMII3_TXC */
J721E_IOPAD(0xec, PIN_OUTPUT, 4) /* (AG27) PRG0_PRU0_GPO15.RGMII3_TX_CTL */
>;
};
&cpsw0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins_default
&rgmii3_pins_default>;
};
&cpsw0_port1 {
phy-handle = <&cpsw9g_phy0>;
phy-mode = "rgmii-rxid";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 1>;
};
&cpsw0_port2 {
phy-handle = <&cpsw9g_phy1>;
phy-mode = "rgmii-rxid";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 2>;
};
&cpsw0_port3 {
status = "disabled";
};
&cpsw0_port4 {
status = "disabled";
};
&cpsw0_port5 {
status = "disabled";
};
&cpsw0_port6 {
status = "disabled";
};
&cpsw0_port7 {
status = "disabled";
};
&cpsw0_port8 {
status = "disabled";
};
&cpsw9g_mdio {
bus_freq = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
cpsw9g_phy0: ethernet-phy@0 {
reg = <0>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,min-output-impedance;
};
cpsw9g_phy1: ethernet-phy@1 {
reg = <1>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,min-output-impedance;
};
};
&cpsw9g_virt_mac {
status = "disabled";
};
Boot Log:
~# dmesg | grep mdio
[ 1.771713] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
[ 1.821697] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 1.836679] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
[ 1.908006] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
[ 1.957696] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 1.972807] mdio_bus c000f00.mdio: MDIO device at address 1 is missing.
[ 1.979408] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510
[ 2.706869] davinci_mdio 46000f00.mdio: Configuring MDIO in manual mode
[ 2.757701] davinci_mdio 46000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 2.772630] davinci_mdio 46000f00.mdio: phy[1]: device 46000f00.mdio:01, driver Marvell 88E1510
[ 2.857831] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
[ 2.905695] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 2.920836] mdio_bus c000f00.mdio: MDIO device at address 1 is missing.
[ 2.927438] davinci_mdio c000f00.mdio: phy[0]: device c000f00.mdio:00, driver Marvell 88E1510
~# dmesg | grep ethernet
[ 1.850529] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
[ 1.863391] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[ 1.870597] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[ 1.876912] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
[ 1.993080] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
[ 2.005846] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 2.012160] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 2.018431] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[ 2.025550] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[ 2.031878] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
[ 2.786479] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA00101, cpsw version 0x6BA80100 Ports: 2 quirks:00000000
[ 2.799337] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[ 2.806542] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[ 2.812819] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010a, freq:500000000, add_val:1 pps:0
[ 2.823190] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
[ 2.941111] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
[ 2.953874] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 2.960187] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 2.966455] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[ 2.973573] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[ 2.979874] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
[ 2.991379] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 140
[ 13.911248] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [Marvell 88E1510] (irq=POLL)
[ 13.949749] am65-cpsw-nuss c000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
[ 13.993459] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:01] driver [Marvell 88E1510] (irq=POLL)
[ 14.006013] am65-cpsw-nuss c000000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[ 14.018410] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[ 14.062528] am65-cpsw-nuss 46000000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
~# ifconfig
eth0 Link encap:Ethernet HWaddr 24:76:25:a5:4d:1f
inet addr:192.168.17.188 Bcast:192.168.17.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23246 errors:0 dropped:0 overruns:0 frame:0
TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1672083 (1.5 MiB) TX bytes:11081 (10.8 KiB)
eth1 Link encap:Ethernet HWaddr 1a:5e:a4:4d:53:cb
inet addr:192.168.17.199 Bcast:192.168.17.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:226 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:25255 (24.6 KiB)
ipsec0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 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:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:640 errors:0 dropped:0 overruns:0 frame:0
TX packets:640 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:43575 (42.5 KiB) TX bytes:43575 (42.5 KiB)
ethtool eth1
Settings for eth1:
Supported ports: [ TP MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
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: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Current message level: 0x000020f7 (8439)
drv probe link ifdown ifup rx_err tx_err hw
Link detected: yes
~# ping -I eth1 192.168.17.188
PING 192.168.17.188 (192.168.17.188) from 192.168.17.199 eth1: 56(84) bytes of data.
From 192.168.17.199 icmp_seq=1 Destination Host Unreachable
From 192.168.17.199 icmp_seq=5 Destination Host Unreachable
From 192.168.17.199 icmp_seq=8 Destination Host Unreachable