DRA821U: Main CPSW RGMII not work issue

Part Number: DRA821U

Tool/software:

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

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/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";
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and we can see the eth0(mcu_cpsw) and eth1, eth2 on main cpsw by ifconfig command.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

however, after set ip for eth1 or eth2, it ping failed, and print lots of logs as below.

Fullscreen
1
2
3
4
[ 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have tried to change "phy-mode" to "rgmii", "rgmii-rxid", "rgmii-id", but not work.

attach the dmesg log on boot as below.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

  • Hi, 

    Can you please provide the changes made? 

    If you need RGMII connection, you need to set the phy-mode as "rgmii" relevant as per delay requirements. 

    Best Regards, 

    Sudheer

  • Yes, we need RGMII connection, and I tried set the phy-mode to "rgmii", but still not work, about the "delay requirements", how can I set it?

  • BTW, about the changes, you can see below dts "k3-j7200-common-proc-board.dts" and above "k3-j7200-evm-quad-port-eth-exp.dtso" mentioned it the questions.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    // SPDX-License-Identifier: GPL-2.0
    /*
    * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/
    */
    /dts-v1/;
    #include "k3-j7200-som-p0.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include <dt-bindings/mux/ti-serdes.h>
    #include <dt-bindings/phy/phy.h>
    / {
    compatible = "ti,j7200-evm", "ti,j7200";
    model = "[XIVI]Texas Instruments J7200 EVM";
    chosen {
    stdout-path = "serial2:115200n8";
    bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I just disabled some unused devices, such as mcan*, serdes, pcie*.

  • Hi,

    BTW, about the changes, you can see below dts "k3-j7200-common-proc-board.dts" and above "k3-j7200-evm-quad-port-eth-exp.dtso" mentioned it the questions.

    You need to configure the CPSW Ports in RGMII Mode.
    Also, need to enable Pins for RGMII functionality, refer to "mcu_cpsw_pins_default" from "k3-j7200-common-proc-board.dts" file where CPSW2G pins configured in RGMII Mode.

    Yes, we need RGMII connection, and I tried set the phy-mode to "rgmii", but still not work, about the "delay requirements", how can I set it?

    Please refer to FAQ for RGMII delay related configuration information.
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1319345/faq-tda4vm-how-to-configure-rgmii-clock-delay-on-j7-devices

    Best Regards,
    Sudheer

  • I have tried to enable Pins for RGMII functionality as below which named "k3-j7200-evm-gesi-proc-board.dtso", and removed unused "serdes", but still not work, it still showing the error message "[    4.766169] am65-cpsw-nuss c000000.ethernet: [XIVI-RX]PSI-L request err -22".

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /dts-v1/;
    /plugin/;
    #include <dt-bindings/gpio/gpio.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";
    pinctrl-names = "default";
    pinctrl-0 = <&rgmii1_pins_default
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    please help check this dtso, is everything ok? 

    Attach the sch for eth1 of main cpsw.

  • Hi,

    please help check this dtso, is everything ok? 

    device tree configuration looks file.

    it still showing the error message "[    4.766169] am65-cpsw-nuss c000000.ethernet: [XIVI-RX]PSI-L request err -22".

    Can you confirm, ETHFW is not loaded on MCU2_0 core? It can happen only when CPSW5G is controlled/configured by other core.

    Best Regards,
    Sudheer

  • How can I check if ETHFW is loaded on MCU2_0 core or not?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot 2023.04-ti-g196fdae4ccbd (Mar 24 2025 - 13:27:07 +0800)
    SoC: J7200 SR2.0 GP
    Model: [XIVI]Texas Instruments K3 J7200 SoC
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -19
    Board: J721EX-PM1-SOM rev E2
    DRAM: 2 GiB (effective 4 GiB)
    Core: 79 devices, 32 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC: mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from nowhere... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -19
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Above uboot log shows cannot find "/lib/firmware/j7200-mcu-r5f0_1-fw" and "/lib/firmware/j7200-main-r5f0_1-fw", is that means ethfw not loaded yet?

    And below dmesgs shows the remoteproc not load firmware "j7200-mcu-r5f0_1-fw", "j7200-main-r5f0_1-fw".

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    root@j7200-evm:~# dmesg |grep -i remoteproc
    [ 3.523017] remoteproc remoteproc0: 41000000.r5f is available
    [ 3.523056] remoteproc remoteproc0: attaching to 41000000.r5f
    [ 3.556297] remoteproc remoteproc0: remote processor 41000000.r5f is now attached
    [ 3.558290] platform 41400000.r5f: configured R5F for remoteproc mode
    [ 3.563978] remoteproc remoteproc1: 41400000.r5f is available
    [ 3.566790] remoteproc remoteproc1: Direct firmware load for j7200-mcu-r5f0_1-fw failed with error -2
    [ 3.566806] remoteproc remoteproc1: powering up 41400000.r5f
    [ 3.566824] remoteproc remoteproc1: Direct firmware load for j7200-mcu-r5f0_1-fw failed with error -2
    [ 3.566828] remoteproc remoteproc1: request_firmware failed: -2
    [ 5.605529] remoteproc remoteproc2: 5c00000.r5f is available
    [ 5.605567] remoteproc remoteproc2: attaching to 5c00000.r5f
    [ 5.609371] remoteproc remoteproc2: remote processor 5c00000.r5f is now attached
    [ 5.611684] platform 5d00000.r5f: configured R5F for remoteproc mode
    [ 5.612449] remoteproc remoteproc3: 5d00000.r5f is available
    [ 5.612563] remoteproc remoteproc3: Direct firmware load for j7200-main-r5f0_1-fw failed with error -2
    [ 5.612570] remoteproc remoteproc3: powering up 5d00000.r5f
    [ 5.612583] remoteproc remoteproc3: Direct firmware load for j7200-main-r5f0_1-fw failed with error -2
    [ 5.612587] remoteproc remoteproc3: request_firmware failed: -2
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Thanks for your mentions, I tried remove the default fw in "/lib/firmware/j8200-main-r5f0_0.fw" , then it work fine.

    But I still curious about what the use of ethfw, seems it's not necessary?

  • Hi, 

    CPSW5G can be controlled by A72 With HLOS like Linux where only A72 can receive and send the data from /through cpsw. 

    We have another application named ETHFW server controlling CPSW5G and remote clients (Linux/RTOS/Autosar) can also receive and send the data from/to cpsw. 

    As per your use-case one will choose which application has to runn for CPSW5G. 

    Best Regards, 

    Sudheer

  • I see, so if I don't need remote process, then I just need to remove all ETHFW files, am I right?

  • Hi,

    I see, so if I don't need remote process, then I just need to remove all ETHFW files, am I right?

    Yes, If you don't want sharing CPSW with remote clients then you have to disable ETHFW application mapping to MCU2_0 core.

    Best Regards,
    Sudheer