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.

TDA4VM: Does cpsw9G module support rmii phy?

Part Number: TDA4VM

Dear experts

I ported 100 megabit rmii phy tja1101 on SDK 08_04_00.

Based on gesi module, port4 of cpsw was changed to rmii and all other ports were closed.  

Pinmux of port4 was also changed to rmii.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static Enet_MacPort gEthAppPorts[] =
{
#if defined(SOC_J721E)
/* On J721E EVM to use all 8 ports simultaneously, we use below configuration
RGMII Ports - 1,3,4,8. QSGMII ports - 2,5,6,7
/*ENET_MAC_PORT_1, [> RGMII <]*/
/*ENET_MAC_PORT_3, [> RGMII <]*/
ENET_MAC_PORT_4, /* RGMII */
/*ENET_MAC_PORT_8, [> RGMII <]*/
#if defined(ENABLE_QSGMII_PORTS)
ENET_MAC_PORT_2, /* QSGMII main */
ENET_MAC_PORT_5, /* QSGMII sub */
ENET_MAC_PORT_6, /* QSGMII sub */
ENET_MAC_PORT_7, /* QSGMII sub */
#endif
#elif defined(SOC_J784S4)
ENET_MAC_PORT_1, /* QSGMII main */
ENET_MAC_PORT_3, /* QSGMII sub */
ENET_MAC_PORT_4, /* QSGMII sub */
ENET_MAC_PORT_5, /* QSGMII sub */
#endif
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
static EthFw_VirtPortCfg gEthApp_virtPortCfg[] =
{
{
.remoteCoreId = IPC_MPU1_0,
.portId = ETHREMOTECFG_SWITCH_PORT_0,
},
{
.remoteCoreId = IPC_MPU1_0,
.portId = ETHREMOTECFG_MAC_PORT_4,
},
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pdk_jacinto_08_04_00_21/packages/ti/board/src/j721e_evm/board_ethernet_config.c
Board_STATUS Board_ethConfigCpsw9g(void)
{
Board_STATUS status = BOARD_SOK;
uint8_t portNum;
/* On J721E EVM to use all 8 ports simultaneously, we use below configuration
RGMII Ports - 1,3,4,8. QSGMII ports - 2 (main),5,6,7 (sub)*/
/* Configures the CPSW9G RGMII ports */
for(portNum=0; portNum < BOARD_CPSW9G_PORT_MAX; portNum++)
{
if ( 0U == portNum ||
2U == portNum ||
3U == portNum ||
7U == portNum )
{
status = Board_cpsw9gEthConfig(portNum, RMII);
}
.....
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

1. The cpsw9g module is initialized properly.
You can see it in the log
Host MAC address: 70:ff:76:1d:92:c3
[LWIPIF_LWIP] Enet LLD netif initialized successfully
[LWIPIF_LWIP_IC] Interface started successfully
[LWIPIF_LWIP_IC] NETIF INIT SUCCESS
[LWIPIF_LWIP_IC] Interface started successfully
[20230103_17:28:20.647][MCU2_0] 13.737601 s: [LWIPIF_LWIP_IC] NETIF INIT SUCCESS

2. The phy register 23 value is 0xbce4. The 15th bit equals 1. That means it's already linked.
the register 15 value is 0x0080,according to the datasheeet of phy TJA1101,it means PHY can work in mode 100Base-T1. So I configured commonLinkCaps in enetphy.c as ENETPHY_LINK_CAP_FD100; This avoids the "no support caps found".


But it is strange that the board cannot ping pc, and the network node is generated. Could please help analyze it, thanks.

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    log:
    [20230103_09:51:59.354]root@j7-evm:~# /opt/vx_app_arm_remote_log.out
    [20230103_09:51:59.857][MCU2_0] 2.347294 s: CIO: Init ... Done !!!
    [20230103_09:51:59.860][MCU2_0] 2.347370 s: ### CPU Frequency = 1000000000 Hz
    [20230103_09:51:59.869][MCU2_0] 2.347412 s: APP: Init ... !!!
    [20230103_09:51:59.872][MCU2_0] 2.347440 s: SCICLIENT: Init ... !!!
    [20230103_09:51:59.880][MCU2_0] 2.347748 s: SCICLIENT: DMSC FW version [8.4.1--v08.04.01 (Jolly Jellyfi]
    [20230103_09:51:59.882][MCU2_0] 2.347799 s: SCICLIENT: DMSC FW revision 0x8
    [20230103_09:51:59.891][MCU2_0] 2.347835 s: SCICLIENT: DMSC FW ABI revision 3.1
    [20230103_09:51:59.893][MCU2_0] 2.347872 s: SCICLIENT: Init ... Done !!!
    [20230103_09:51:59.906][MCU2_0] 2.347899 s: UDMA: Init ... !!!
    [20230103_09:51:59.909][MCU2_0] 2.349502 s: UDMA: Init ... Done !!!
    [20230103_09:51:59.911][MCU2_0] 2.349574 s: MEM: Init ... !!!
    [20230103_09:51:59.914][MCU2_0] 2.349624 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ d9000000 of size 16777216 bytes !!!
    [20230103_09:51:59.924][MCU2_0] 2.349705 s: MEM: Created heap (L3_MEM, id=1, flags=0x00000000) @ 3600000 of size 262144 bytes !!!
    [20230103_09:51:59.935][MCU2_0] 2.349768 s: MEM: Init ... Done !!!
    [20230103_09:51:59.937][MCU2_0] 2.349795 s: IPC: Init ... !!!
    [20230103_09:51:59.949][MCU2_0] 2.349860 s: IPC: 6 CPUs participating in IPC !!!
    [20230103_09:51:59.951][MCU2_0] 2.349909 s: IPC: Waiting for HLOS to be ready ... !!!
    [20230103_09:51:59.953][MCU2_0] 14.816109 s: IPC: HLOS is ready !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • I searched the forum and saw that some people said to use this script to see the status of cpsw port. The following is my information, hoping to help

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# cat sh
    #!/bin/bash
    # change the value of port variable for the MAC port which you are facing issue on
    port=4
    oport=$(( $port + $port ))
    offset="0x$oport""00"
    var=$(( 16#$(devmem2 0x0c03A034 | tail -n1 -c9) ))
    echo "PORT0 good Tx frames = $var"
    var=$(( 16#$(devmem2 $( printf "0x%X\n" $(( 0x0c03a034 + $offset )) ) | tail -n1 -c9) ))
    echo "PORT$port good Tx frames = $var"
    var=$(( 16#$(devmem2 $( printf "0x%X\n" $(( 0x0c03a000 + $offset )) ) | tail -n1 -c9) ))
    echo "PORT$port good Rx frames = $var"
    var=$(( 16#$(devmem2 0x0c03A000 | tail -n1 -c9) ))
    echo "PORT0 good Rx frames = $var"
    var=$(( 16#$(devmem2 0x0c03A028 | tail -n1 -c9) ))
    echo "PORT0 ALE drop frames = $var"
    var=$(( 16#$(devmem2 $( printf "0x%X\n" $(( 0x0c03a028 + $offset )) ) | tail -n1 -c9) ))
    echo "PORT$port ALE drop frames = $var"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    root@j7-evm:~# ./sh
    PORT0 good Tx frames = 7736
    PORT4 good Tx frames = 0
    PORT4 good Rx frames = 7736
    PORT0 good Rx frames = 4134
    PORT0 ALE drop frames = 4118
    PORT4 ALE drop frames = 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Ling, 

    Can you pls follow the  https://www.ti.com/lit/an/sprad07/sprad07.pdf : 3.3 MAC2MAC Debug session first and check your setting? Thanks. 

    Regards,

    Fredy Zhang

  • hi Fredy,

    Regarding the document you provided, I have verified the register value of cpsw as follows:

    Fullscreen
    1
    2
    3
    4
    root@j7-evm:~/debug_gels# devmem2 0x00104050 w
    /dev/mem opened.
    Memory mapped at address 0xffff8b06e000.
    Read at address 0x00104050 (0xffff8b06e050): 0x00000001
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    This indicates that port4 has been configured as rmii.

    I don't see the CPSW_SS_RGMII1_STATUS_REG register in the tda4vm documentation.The pinmux of port4 are also set to rmii

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~/debug_gels# devmem2 0x0011c100
    /dev/mem opened.
    Memory mapped at address 0xffff9eb22000.
    Read at address 0x0011C100 (0xffff9eb22100): 0x00050005
    root@j7-evm:~/debug_gels# devmem2 0x0011c104
    /dev/mem opened.
    Memory mapped at address 0xffff8a7d8000.
    Read at address 0x0011C104 (0xffff8a7d8104): 0x00050005
    root@j7-evm:~/debug_gels# devmem2 0x0011c108
    /dev/mem opened.
    Memory mapped at address 0xffffb101e000.
    Read at address 0x0011C108 (0xffffb101e108): 0x00050005
    root@j7-evm:~/debug_gels# devmem2 0x0011c10c
    /dev/mem opened.
    Memory mapped at address 0xffff88623000.
    Read at address 0x0011C10C (0xffff8862310c): 0x00050005
    root@j7-evm:~/debug_gels# devmem2 0x0011c110
    /dev/mem opened.
    Memory mapped at address 0xffff95246000.
    Read at address 0x0011C110 (0xffff95246110): 0x00010005
    root@j7-evm:~/debug_gels# devmem2 0x0011c118
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    These also seem to have been configured successfully, but cannot ping to PC.

  • Can you provide the patch mentioned in the document?
    I think this is mac to phy, not mac to mac. 

    Please help to analyze it, Thanks

  • Hi,

    For pin muxing, What about RMII_REF_CLK at PADCONFIG43? Are you using external ref clock or routing the internal ref clock?

    Can you provide the dump for ALE entries. You can get the dump by running "ethtool -t eth1" command. You will see the dump in the ethfw logs.

    Regards,
    Tanmay

  • Hi Tanmay,

    I have set pin:PRG1_MDIO0_MDC  as RMII_REF_CLK according to the schematic.

    Fullscreen
    1
    2
    3
    4
    {
    PIN_PRG1_MDIO0_MDC, PIN_MODE(5) \
    ((PIN_PULL_DISABLE) & (~PIN_PULL_IRECTION & ~PIN_INPUT_ENABLE))
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    The log for Ethtool -t eth1 

    Fullscreen
    1
    2
    3
    4
    5
    6
    root@j7-evm:~# ethtool -t eth1
    The test result is PASS
    The test extra info:
    RPMSG Ping test 0
    RPMSG Read reg 0
    RPMSG Dump stat 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    the all log run on linux /opt/vx_app_arm_remote_log.out

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# /opt/vx_app_arm_remote_log.out
    [MCU2_0] 61367 s: 19: Address: 333300010003, Member:001 Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0] 1133.361421 s: RAW:[4 100033
    [MCU2_0] 1133.361462 s: 33 00010003]
    [MCU2_0] 1133.361531 s: 20: Address: 01005e0000fb, Member:001 Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0] 1133.361585 s: RAW:[4 100001
    [MCU2_0] 1133.361626 s: 00 5e0000fb]
    [MCU2_0] 1133.361695 s: 21: Address: 01005e0000fc, Member:001 Su=0 FWDSTLVL=0 IGNMBITS=0
    [MCU2_0] 1133.361748 s: RAW:[4 100001
    [MCU2_0] 1133.361790 s: 00 5e0000fc]
    [MCU2_0] 1133.363235 s:
    [MCU2_0] 1133.363270 s: 1002 Free Entries
    [MCU2_0] 1133.363309 s:
    [MCU2_0] 1133.363353 s: 0: POLICER_DST_MAC,ALE Index: 9
    [MCU2_0] 1133.363396 s: 0: POLICER_ETHERTYPE,ALE Index: 11
    [MCU2_0] 1133.363436 s: 0: POLICER_THREAD,THREAD ID:4
    [MCU2_0] 1133.363489 s: 0: POLICER_STATS: Hit: 1, RedHit: 0, YellowHit: 0
    [MCU2_0] 1133.363537 s: 1: POLICER_DST_MAC,ALE Index: 12
    [MCU2_0] 1133.363576 s: 1: POLICER_THREAD,THREAD ID:0
    [MCU2_0] 1133.363623 s: 1: POLICER_STATS: Hit: 0, RedHit: 0, YellowHit: 0
    [MCU2_0] 1133.363671 s: 2: POLICER_DST_MAC,ALE Index: 15
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    the ping log to 192.168.1.2 which is the pc host

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 metric 1
    inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
    ether 02:42:06:b6:a3:ad txqueuelen 0 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
    inet 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::72ff:76ff:fe1d:92c1 prefixlen 64 scopeid 0x20<link>
    ether 70:ff:76:1d:92:c1 txqueuelen 1000 (Ethernet)
    RX packets 579 bytes 54544 (53.2 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 84 bytes 14438 (14.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 metric 1
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Ling,

    Can you please capture packets at PC side by opening the Wireshark and see if any packets sent from CPSW9g.
    Also share the Wireshark log with us.

    Best Regards,
    Sudheer

  • hi  Doredla

    The following is my log when I ping the tda4 board with ip address 192.168.1.3.

    When I ping the pc from the tda4 board, the pc wireshark has no log and no packet is received.

    Thanks

  • Hi Ling,

    Can you please confirm "RMII_REF_CLK" pinmux configuration at PADCONFIG43? Are you using external ref clock or routing the internal ref clock?

    Also can you share log for following sequence.

    1. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"
    2. Run ping from A72 to PC using below command
      1. #ping <PC IP> -c 10
    3. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"
    4. Run ping from PC to A72 using below command
      1. #ping <A72 IP> -c 10
    5. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"

    Please collect tcpdump logs during above sequence, from both PC and A72 using below command.
    #tcpdump -i  <interface> -xx

    Best Regards,
    Sudheer

  • HI Doredla

     yes,I used  external ref clock,

    THis is my "RMII_REF_CLK" pinmux configuration.

      

    Fullscreen
    1
    2
    3
    4
    root@j7-evm:~# devmem2 0x0011c0ac
    /dev/mem opened.
    Memory mapped at address 0xffff90a6c000.
    Read at address 0x0011C0AC (0xffff90a6c0ac): 0x00050005
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    1.Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"

    Fullscreen
    1
    2
    3
    4
    5
    6
    root@j7-evm:~# ethtool -t eth1
    The test result is PASS
    The test extra info:
    RPMSG Ping test 0
    RPMSG Read reg 0
    RPMSG Dump stat 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2.Run ping from A72 to PC using below command

    #ping <PC IP> -c 10

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    root@j7-evm:~# ifconfig eth1 192.168.1.3
    root@j7-evm:~# ping 192.168.1.2
    PING 192.168.1.2 (192.168.1.2): 56 data bytes
    ^C
    --- 192.168.1.2 ping statistics ---
    13 packets transmitted, 0 packets received, 100% packet loss
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# /opt/vx_app_arm_remote_log.out
    [MCU2_0] 15588.688913 s: CIO: Init ... Done !!!
    [MCU2_0] 15588.689001 s: ### CPU Frequency = 1000000000 Hz
    [MCU2_0] 15588.689046 s: APP: Init ... !!!
    [MCU2_0] 15588.689074 s: SCICLIENT: Init ... !!!
    [MCU2_0] 15588.689355 s: SCICLIENT: DMSC FW version [8.4.1--v08.04.01 (Jolly Jellyfi]
    [MCU2_0] 15588.689413 s: SCICLIENT: DMSC FW revision 0x8
    [MCU2_0] 15588.689450 s: SCICLIENT: DMSC FW ABI revision 3.1
    [MCU2_0] 15588.689487 s: SCICLIENT: Init ... Done !!!
    [MCU2_0] 15588.689516 s: UDMA: Init ... !!!
    [MCU2_0] 15588.690984 s: UDMA: Init ... Done !!!
    [MCU2_0] 15588.691062 s: MEM: Init ... !!!
    [MCU2_0] 15588.691111 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ d9000000 of size 16777216 bytes !!!
    [MCU2_0] 15588.691192 s: MEM: Created heap (L3_MEM, id=1, flags=0x00000000) @ 3600000 of size 262144 bytes !!!
    [MCU2_0] 15588.691256 s: MEM: Init ... Done !!!
    [MCU2_0] 15588.691282 s: IPC: Init ... !!!
    [MCU2_0] 15588.691347 s: IPC: 6 CPUs participating in IPC !!!
    [MCU2_0] 15588.691400 s: IPC: Waiting for HLOS to be ready ... !!!
    [MCU2_0] 15601.485555 s: IPC: HLOS is ready !!!
    [MCU2_0] 15601.501634 s: IPC: Init ... Done !!!
    [MCU2_0] 15601.501713 s: APP: Syncing with 5 CPUs ... !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    3.Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"

    Fullscreen
    1
    2
    3
    4
    5
    6
    root@j7-evm:~# ethtool -t eth1
    The test result is PASS
    The test extra info:
    RPMSG Ping test 0
    RPMSG Read reg 0
    RPMSG Dump stat 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# /opt/vx_app_arm_remote_log.out
    [MCU2_0] Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:192.168.1.3
    [MCU2_0] 320.372720 s:
    [MCU2_0] SNo. IP Address MAC Address
    [MCU2_0] 320.372765 s: ------ ------------- -----------------
    [MCU2_0] 320.372805 s: 1 192.168.1.3 70:ff:76:1d:92:c1
    [MCU2_0] 320.374398 s: Function:CpswProxyServer_filterAddMacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fc, vlanId:0, FlowIdx:172, FlowIdOffset:0
    [MCU2_0] 320.376468 s: Function:CpswProxyServer_filterAddMacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fb, vlanId:0, FlowIdx:172, FlowIdOffset:0
    [MCU2_0] 384.444576 s: Function:CpswProxyServer_regrdHandlerCb,HostId:0, RegAddr:c000000
    [MCU2_0] 384.444890 s: Function:CpswProxyServer_regrdHandlerCb,HostId:0, RegAddr:c020000
    [MCU2_0] 384.445128 s: Function:CpswProxyServer_clientNotifyHandlerCb,HostId:0,Handle:38acb7e6,CoreKey:a39890a4,NotifyId:RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_DUMPSTATS,NotifyLen
    [MCU2_0] 384.445262 s:
    [MCU2_0] 384.445338 s: 0: Vlanid: 012c, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445402 s: RAW:[0 212c1f
    [MCU2_0] 384.445447 s: f1 ff0001ff]
    [MCU2_0] 384.445578 s: 1: Vlanid: 0190, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445650 s: RAW:[0 21901f
    [MCU2_0] 384.445697 s: f1 ff0001ff]
    [MCU2_0] 384.445761 s: 2: Vlanid: 0191, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445819 s: RAW:[0 21911f
    [MCU2_0] 384.445861 s: f1 ff0001ff]
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    4.Run ping from PC to A72 using below command

    #ping <A72 IP> -c 10

    5.Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"

    Fullscreen
    1
    2
    3
    4
    5
    6
    root@j7-evm:~# ethtool -t eth1
    The test result is PASS
    The test extra info:
    RPMSG Ping test 0
    RPMSG Read reg 0
    RPMSG Dump stat 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# /opt/vx_app_arm_remote_log.out
    [MCU2_0] Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:192.168.1.3
    [MCU2_0] 320.372720 s:
    [MCU2_0] SNo. IP Address MAC Address
    [MCU2_0] 320.372765 s: ------ ------------- -----------------
    [MCU2_0] 320.372805 s: 1 192.168.1.3 70:ff:76:1d:92:c1
    [MCU2_0] 320.374398 s: Function:CpswProxyServer_filterAddMacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fc, vlanId:0, FlowIdx:172, FlowIdOffset:0
    [MCU2_0] 320.376468 s: Function:CpswProxyServer_filterAddMacHandlerCb,HostId:0,Handle:a39890a4,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fb, vlanId:0, FlowIdx:172, FlowIdOffset:0
    [MCU2_0] 384.444576 s: Function:CpswProxyServer_regrdHandlerCb,HostId:0, RegAddr:c000000
    [MCU2_0] 384.444890 s: Function:CpswProxyServer_regrdHandlerCb,HostId:0, RegAddr:c020000
    [MCU2_0] 384.445128 s: Function:CpswProxyServer_clientNotifyHandlerCb,HostId:0,Handle:38acb7e6,CoreKey:a39890a4,NotifyId:RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_DUMPSTATS,NotifyLen
    [MCU2_0] 384.445262 s:
    [MCU2_0] 384.445338 s: 0: Vlanid: 012c, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445402 s: RAW:[0 212c1f
    [MCU2_0] 384.445447 s: f1 ff0001ff]
    [MCU2_0] 384.445578 s: 1: Vlanid: 0190, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445650 s: RAW:[0 21901f
    [MCU2_0] 384.445697 s: f1 ff0001ff]
    [MCU2_0] 384.445761 s: 2: Vlanid: 0191, UTagged: 1ff, Mult: 1ff, UMult: 0, Member: 1ff
    [MCU2_0] 384.445819 s: RAW:[0 21911f
    [MCU2_0] 384.445861 s: f1 ff0001ff]
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    6. Please collect tcpdump logs during above sequence, from both PC and A72 using below command.
    #tcpdump -i  <interface> -xx

    I used pc ping A72, the follow is the picture and the log

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j7-evm:~# tcpdump -i eth1 -xx
    [ 707.880418] device eth1 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
    09:18:29.555451 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 70:ff:76:1d:92:c1 (oui Unknown), length 288
    0x0000: ffff ffff ffff 70ff 761d 92c1 0800 45c0
    0x0010: 013c 0000 0000 4011 78f2 0000 0000 ffff
    0x0020: ffff 0044 0043 0128 26a3 0101 0600 baf8
    0x0030: c39c 02c1 0000 0000 0000 0000 0000 0000
    0x0040: 0000 0000 0000 70ff 761d 92c1 0000 0000
    0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
    0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
    0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
    0x0080: 0000 0000 0000 0000 0000 0000 0000 0000
    0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
    0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I used A72 to ping pc.  The pc did not receive packet.

  • I made some other changes to the print above,
    1. According to the tja manual, when bit2 of register 0x1 of phy is equal to 1, it is considered as phy link. so  I set linked  in enetphy.c function enetPhy_linkWaitState, 

    (The phy register 23 value is 0xbce4. The 15th bit equals 1. That also means it's already linked.)

    2.I annotated ''#define ENET_CFG_CPSW_SGMII     (ENET_ON) "   in  filse:  pdk_jacinto_08_04_00_21/packages/ti/drv/enet/enet_cfg.h

    Otherwise it  would  reported this log:
    [MCU2_0] 14.221606 s: Cpsw_isPortLinkUp: Port 4: Layer 1 doesn't support link status

     

    Thank you very much for taking the time to answer my questions. Thank you

  • Hi Ling,

    Could you please share the changes made in Ethfw for review of changes.

    Best Regards,
    Sudheer

  • ok, ethfw.diff is all the differences associated with ethfw

    All.diff is all changes.

    Please check and thank you for your support.

    Currently, only one tja1101  is opened. It's address is 6 and connect to cpsw9g port 4.

    Thanks.

    ethfw.diff
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff --git a/psdkra/ethfw/ethfw/src/ethfw.c b/psdkra/ethfw/ethfw/src/ethfw.c
    old mode 100644
    new mode 100755
    index 72888d4a9..85222b987
    --- a/psdkra/ethfw/ethfw/src/ethfw.c
    +++ b/psdkra/ethfw/ethfw/src/ethfw.c
    @@ -359,6 +359,7 @@ static void EthFw_initAleCfg(CpswAle_Cfg *aleCfg)
    aleCfg->agingCfg.agingPeriodInMs = 1000;
    aleCfg->nwSecCfg.vid0ModeEn = FALSE;
    aleCfg->vlanCfg.aleVlanAwareMode = TRUE;
    + /*aleCfg->vlanCfg.aleVlanAwareMode = FALSE;*/
    aleCfg->vlanCfg.cpswVlanAwareMode = FALSE;
    aleCfg->vlanCfg.unknownUnregMcastFloodMask = 0U;
    aleCfg->vlanCfg.unknownRegMcastFloodMask = 0U;
    @@ -1195,7 +1196,12 @@ static void EthFw_initLinkArgs(EnetPer_PortLinkCfg *linkArgs,
    EnetMacPort_Interface *mii = &linkArgs->mii;
    uint32_t i;
    int32_t status;
    -
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This is a schematic of phy connecting to soc.

      

  • Hi Lin,

    We have verified the logs shared and seems like ALE drops at Host port.

    Also, can you please confirm have you updated Linux dtbs for mac only port-4. As you are mapping port-4 to mpu1_0 as MAC only port.

    If Linux dtbs (from Linux SDK) not updated, can you please update as follows.

    1. Download Linux SDK, and open"k3-j721e-common-proc-board.dts" file.
    2. Comment out "cpsw9g_virt_mac: main_r5fss_cpsw9g_virt_mac0" structure as you are not mapping any switch port to mpu1_0.
    3. Modify mac device number in "cpsw9g_virt_maconly: main-r5fss-cpsw9g-virt-mac1" structure and save the dtbs file. As you are mapping port-4 to mpu1_0 as mac only port.
      -  ti,remote-name = "mpu_1_0_ethmac-device-1";
      + ti,remote-name = "mpu_1_0_ethmac-device-4";
    4. After saving build dtbs using below command from $ <LSDK>/ (Linux SDK path)
    5. After building the dtbs, copy "k3-j721e-common-proc-board.dtb" to boot partition of SD card.

    Can you please check after modifying above, if still issue exist please collect logs as follows and share with us.

    1. Ifconfig information of both A72 & PC. 
    2. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"
    3. Run ping from A72 to PC using below command
      1. #ping <PC IP> -c 10
    4. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"
    5. Run ping from PC to A72 using below command
      1. #ping <A72 IP> -c 10
    6. Collect statistics using "ethtool -t " and "/opt/vx_app_arm_remote_log.out"

    Please collect tcpdump logs during above sequence, from both PC and A72 using below command.
    #tcpdump -i  <interface> -xx

    Best Regards,

    Sudheer

  • Thank you for your professional reply. I can ping to the host after trying. I really appreciate your help.

    In addition, could you guide me where did the ALE drops packets in the log?

    And how to configure ale? Can it be shut down?

    Thank you again for your help and advice. 

  • Hi Ling,

    Thanks for the confirmation of issue resolved.

    >> In addition, could you guide me where did the ALE drops packets in the log?
    We have port specific statistics as below. where I observed all rx packets were drop at Host Port of CPSW.
    [MCU2_0] 384.451891 s: rxGoodFrames = 68
    [MCU2_0] 384.452581 s: portMaskDrop = 68


    >> And how to configure ale? 
    We have Enet IOCTL support for configuration of ALE from Ethfw.
    Please refer to below FAQ for ALE configuration examples.
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1011237/faq-tda4vm-how-to-configure-cpsw-5g-9g-ale

    >> Can it be shut down?
    you can bypass ALE by setting below from "CPSW_ALE_CONTROL" Register.


    Best Regards,
    Sudheer