Dear TI,
We made a new board with J7200(DRA821U), and use sdk "ti-processor-sdk-linux-j7200-evm-09_02_00_05".
The board have three ethernet ports, one mcu_cpsw, and two ports on Main CPSW.
For now, mcu_cpsw already work normal, but main cpsw ports not work, we used mofiled the dtso file "k3-j7200-evm-quad-port-eth-exp.dtso" as below, which already disabled unused port3 and port4
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mux/ti-serdes.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-pinctrl.h"
&{/} {
aliases {
ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1";
ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2";
//ethernet3 = "/bus@100000/ethernet@c000000/ethernet-ports/port@3";
//ethernet4 = "/bus@100000/ethernet@c000000/ethernet-ports/port@4";
};
};
&cpsw0 {
status = "okay";
};
&cpsw0_port1 {
status = "okay";
phy-handle = <&cpsw5g_phy0>;
phy-mode = "qsgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 1>;
};
&cpsw0_port2 {
status = "okay";
phy-handle = <&cpsw5g_phy1>;
phy-mode = "qsgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 2>;
};
&cpsw0_port3 {
status = "disabled";
phy-handle = <&cpsw5g_phy2>;
phy-mode = "qsgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 3>;
};
&cpsw0_port4 {
status = "disabled";
phy-handle = <&cpsw5g_phy3>;
phy-mode = "qsgmii";
mac-address = [00 00 00 00 00 00];
phys = <&cpsw0_phy_gmii_sel 4>;
};
&cpsw5g_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio0_pins_default>;
//reset-gpios = <&exp2 17 GPIO_ACTIVE_LOW>;
//reset-post-delay-us = <120000>;
#address-cells = <1>;
#size-cells = <0>;
cpsw5g_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>;
};
cpsw5g_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>;
};
cpsw5g_phy2: ethernet-phy@18 {
reg = <18>;
};
cpsw5g_phy3: ethernet-phy@19 {
reg = <19>;
};
};
/*
&exp2 {
qsgmii-line-hog {
gpio-hog;
gpios = <16 GPIO_ACTIVE_HIGH>;
output-low;
line-name = "qsgmii-pwrdn-line";
};
};
*/
&main_pmx0 {
mdio0_pins_default: mdio0-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x00a8, PIN_OUTPUT, 5) /* (W19) UART8_TXD.MDIO0_MDC */
J721E_IOPAD(0x00a4, PIN_INPUT, 5) /* (W14) UART8_RXD.MDIO0_MDIO */
>;
};
};
and we can see the eth0(mcu_cpsw) and eth1, eth2 on main cpsw by ifconfig command.
root@j7200-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr 58:A1:5F:BE:63:2B
UP BROADCAST MULTICAST MTU:1500 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)
eth1 Link encap:Ethernet HWaddr 2E:5A:03:A5:9C:F0
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2c5a:3ff:fea5:9cf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:11261 (10.9 KiB)
eth2 Link encap:Ethernet HWaddr 8E:D0:AF:A7:9F:41
UP BROADCAST MULTICAST MTU:1500 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)
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:192 errors:0 dropped:0 overruns:0 frame:0
TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18456 (18.0 KiB) TX bytes:18456 (18.0 KiB)
however, after set ip for eth1 or eth2, it ping failed, and print lots of logs as below.
[ 1977.825539] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:1404352 dql_avail:-39 free_desc:505
[ 1982.945537] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:1409472 dql_avail:-39 free_desc:505
[ 1988.065539] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:1414592 dql_avail:-39 free_desc:505
[ 1994.209536] am65-cpsw-nuss c000000.ethernet eth1: txq:0 DRV_XOFF:0 tmo:1420736 dql_avail:-39 free_desc:505
I have tried to change "phy-mode" to "rgmii", "rgmii-rxid", "rgmii-id", but not work.
attach the dmesg log on boot as below.
root@j7200-evm:~# dmesg |grep ether
[ 0.954049] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[ 0.954145] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[ 0.954148] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[ 0.954583] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1
[ 0.993237] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 5 quirks:00000000
[ 0.993322] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 0.993379] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 0.993388] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[ 0.993391] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[ 0.993696] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0
[ 1.062112] am65-cpsw-nuss 46000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 2 quirks:00000000
[ 1.062206] am65-cpsw-nuss 46000000.ethernet: initialized cpsw ale version 1.4
[ 1.062209] am65-cpsw-nuss 46000000.ethernet: ALE Table size 64
[ 1.062596] am65-cpsw-nuss 46000000.ethernet: CPTS ver 0x4e8a010b, freq:500000000, add_val:1 pps:1
[ 1.089015] am65-cpsw-nuss 46000000.ethernet: set new flow-id-base 48
[ 1.130501] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA02102, cpsw version 0x6BA82102 Ports: 5 quirks:00000000
[ 1.130613] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 1.130670] am65-cpsw-nuss c000000.ethernet: Use random MAC address
[ 1.130679] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
[ 1.130682] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
[ 1.130979] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010b, freq:200000000, add_val:4 pps:0
[ 1.157241] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 60
[ 4.680095] am65-cpsw-nuss c000000.ethernet: PSI-L request err -22
[ 4.742143] am65-cpsw-nuss c000000.ethernet eth2: PHY [c000f00.mdio:01] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[ 4.742157] am65-cpsw-nuss c000000.ethernet eth2: configuring for phy/qsgmii link mode
[ 4.821078] am65-cpsw-nuss c000000.ethernet eth1: PHY [c000f00.mdio:00] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[ 4.821092] am65-cpsw-nuss c000000.ethernet eth1: configuring for phy/qsgmii link mode
[ 4.903243] am65-cpsw-nuss 46000000.ethernet eth0: PHY [46000f00.mdio:02] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[ 4.903257] am65-cpsw-nuss 46000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
[ 8.930592] am65-cpsw-nuss c000000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
we can see the error message "[ 4.680095] am65-cpsw-nuss c000000.ethernet: PSI-L request err -22" , but don't know why.
For this issue, how can I check next?
BR
guangtao