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: Using TDA4's CPSW9G, connecting to phy chip, link fails.

Part Number: TDA4VM

Tool/software:

HI:
I apologize for needing your help in answering my question.
We need to use the CPSW9G of TDA4 on the linux side of the A72 to connect to the phy chip, the connection mode is SGMII mode, the connection configuration is as follows:


serdes0-lane0: rtl9010-1 (sgmii)
serdes0-lane1: rtl9010-2 (sgmii)
serdes0-lane0: rtl9010-3 (sgmii)


We refer to the file ti/k3-j721e-quad-port-eth-exp.dtbo and modify our own device tree file, after system startup, the phy driver can match the phy device, but the link fails, reporting error: am65-cpsw-nuss c000000.ethernet eth1. validation of sgmii with support 00000000,00000000,000062c0 and advertisement 00000000,00000000,000022c0 failed: -EINVAL

The following is the system startup log, and please help to analyze the cause of this error

Thank you very much!

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[2022-04-28 17:42:38.730115] [A72 ] [KERNEL ] [INF] [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
[2022-04-28 17:42:38.730195] [A72 ] [KERNEL ] [INF] [ 0.000000] Linux version 6.1.46+ (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.38.20220708) #1 SMP PREEMPT Mon Aug 26 10:50:11 UTC 2024
[2022-04-28 17:42:38.730214] [A72 ] [KERNEL ] [INF] [ 0.000000] Machine model: Texas Instruments J721e EVM
[2022-04-28 17:42:38.730222] [A72 ] [KERNEL ] [INF] [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[2022-04-28 17:42:38.730229] [A72 ] [KERNEL ] [INF] [ 0.000000] printk: bootconsole [ns16550a0] enabled
[2022-04-28 17:42:38.730235] [A72 ] [KERNEL ] [INF] [ 0.000000] efi: UEFI not found.
[2022-04-28 17:42:38.730241] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created CMA memory pool at 0x00000008e0000000, size 512 MiB
[2022-04-28 17:42:38.730248] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[2022-04-28 17:42:38.730255] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[2022-04-28 17:42:38.730262] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a0000000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730269] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[2022-04-28 17:42:38.730275] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a0100000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730283] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[2022-04-28 17:42:38.730290] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a1000000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730296] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
[2022-04-28 17:42:38.730303] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a1100000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730310] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
[2022-04-28 17:42:38.730317] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a2000000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730324] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 31 MiB
[2022-04-28 17:42:38.730331] [A72 ] [KERNEL ] [INF] [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a2100000, compatible id shared-dma-pool
[2022-04-28 17:42:38.730338] [A72 ] [KERNEL ] [INF] [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Siddharth

    I have updated serdes0,running “ifconfig -a” still don`t have any eth port:

    This is kernel boot log:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Starting kernel ...
    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [ 0.000000] Linux version 6.1.46+ (jiwei.xu@334ebc848f07) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 11.3.Rel1) 11.3.1 20220712, GNU ld (Arm GNU Toolchain 11.3.Rel1) 2.38.20220708) #18 SMP PREEMPT Sat Aug 31 00:21:11 CST 2024
    [ 0.000000] Machine model: Texas Instruments J721e EVM
    [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [ 0.000000] printk: bootconsole [ns16550a0] enabled
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] Reserved memory: created CMA memory pool at 0x00000008e0000000, size 512 MiB
    [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a0000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a0100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a1000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a1100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a2000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 31 MiB
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    There are still some errors about serdes  in the kernel's  boot logs:

  • Could you share the device-tree files?
    I don't see the error that you are referring to, with the device-tree changes I referred to earlier, on the J721E-EVM.
    Also, the value of 0x0500E000 on the J721E-EVM in my local setup is:
    0x00002435

  • Could you share the device-tree files?

    I'm sorry that due to our computer limitations, i can't upload "dts" or "dtsi" files directly, so I'll have to change the file extension to “txt” to share it with you!

    "invo-k3-j721e-vision-apps.dtsi" is the device-tree file of  our board

    invo-k3-j721e-vision-apps.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    // SPDX-License-Identifier: GPL-2.0
    /*
    * vision-apps: device-tree overlay
    *
    * Copyright (C) 2019 - 2021 Texas Instruments Incorporated - http://www.ti.com/
    */
    #include "invo-k3-j721e-rtos-memory-map.dtsi"
    #include "devicetree.dtsi"
    #include <dt-bindings/mux/ti-serdes.h>
    #include <dt-bindings/phy/phy.h>
    #include <dt-bindings/phy/phy-cadence.h>
    #include "k3-pinctrl.h"
    #include <dt-bindings/gpio/gpio.h>
    &{/} {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2185.k3-j721e-common-proc-board.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    // SPDX-License-Identifier: GPL-2.0
    /*
    * Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com/
    */
    /dts-v1/;
    #include "k3-j721e-som-p0.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include <dt-bindings/phy/phy-cadence.h>
    / {
    compatible = "ti,j721e-evm", "ti,j721e";
    model = "Texas Instruments J721e EVM";
    chosen {
    stdout-path = "serial2:115200n8";
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Siddharth,

    this is the hardware connection diagram:

    P2 phy_addr:2

    p0 phy_addr:3

    p1 phy_addr:1

  • Hi,

    CPSW configuration is not available in above device tree files, if it was overlay you need to add it to  "name_overlays".

    Also, can you please check if ETHFW is enabled in MCU2_0 or not. share below log.

    # cat /sys/kernel/debug/remoteproc/remoteproc*/trace0

    If you observing vision apps log like below.. You need to run below command.
    # sh /opt/vision_apps/vision_apps_init.sh


    If ETHFW log is observed from MCU2_0 then you need to disable ETHFW from Vision Apps and rebuild the vision-apps and use updated binaries.

    If not using Vision Apps, then change the softlink of "j7200-main-r5f0_0-fw".

    Also, refer to FAQ to [how to move to Native Linux Driver for J7 device.

    Best Regards,
    Sudheer

  • Hi,

    CPSW configuration is not available in above device tree files, if it was overlay you need to add it to  "name_overlays".

    CPSW configuration is realized in "k3-j721e-main.dtsi",we referenced this device tree file.

    k3-j721e-main.dtsi:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    cpsw0: ethernet@c000000 {
    compatible = "ti,j721e-cpswxg-nuss";
    #address-cells = <2>;
    #size-cells = <2>;
    reg = <0x0 0xc000000 0x0 0x200000>;
    reg-names = "cpsw_nuss";
    ranges = <0x0 0x0 0x0 0x0c000000 0x0 0x200000>;
    clocks = <&k3_clks 19 89>;
    clock-names = "fck";
    power-domains = <&k3_pds 19 TI_SCI_PD_EXCLUSIVE>;
    dmas = <&main_udmap 0xca00>,
    <&main_udmap 0xca01>,
    <&main_udmap 0xca02>,
    <&main_udmap 0xca03>,
    <&main_udmap 0xca04>,
    <&main_udmap 0xca05>,
    <&main_udmap 0xca06>,
    <&main_udmap 0xca07>,
    <&main_udmap 0x4a00>;
    dma-names = "tx0", "tx1", "tx2", "tx3",
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Also, can you please check if ETHFW is enabled in MCU2_0 or not. share below log.

    I have disabled  ETHFW in Vision App,and the below log is empty:

    If you observing vision apps log like below.. You need to run below command.
    # sh /opt/vision_apps/vision_apps_init.sh

    During debugging, I disabled the MCU2_0 firmware by changing the name of “j721e-main-r5f0_0-fw” in "/lib/firmware/".

    this is 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@Linux:~# sh /opt/vision_apps/vision_apps_init.sh
    root@Linux:~# [C6x_1 ] 11.075936 s: CIO: Init ... Done !!!
    [C6x_1 ] 11.075964 s: ### CPU Frequency = 1350000000 Hz
    [C6x_1 ] 11.075975 s: CPU is running FreeRTOS
    [C6x_1 ] 11.075984 s: APP: Init ... !!!
    [C6x_1 ] 11.075993 s: SCICLIENT: Init ... !!!
    [C6x_1 ] 11.076167 s: SCICLIENT: DMSC FW version [9.1.2--v09.01.02 (Kool Koala)]
    [C6x_1 ] 11.076184 s: SCICLIENT: DMSC FW revision 0x9
    [C6x_1 ] 11.076194 s: SCICLIENT: DMSC FW ABI revision 3.1
    [C6x_1 ] 11.076205 s: SCICLIENT: Init ... Done !!!
    [C6x_1 ] 11.076215 s: UDMA: Init ... !!!
    [C6x_1 ] 11.077513 s: UDMA: Init ... Done !!!
    [C6x_1 ] 11.077537 s: MEM: Init ... !!!
    [C6x_1 ] 11.077552 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ cf000000 of size 16777216 bytes !!!
    [C6x_1 ] 11.077573 s: MEM: Init ... Done !!!
    [C6x_1 ] 11.077583 s: IPC: Init ... !!!
    [C6x_1 ] 11.077607 s: IPC: 6 CPUs participating in IPC !!!
    [C6x_1 ] 11.077625 s: IPC: Waiting for HLOS to be ready ... !!!
    [C6x_1 ] 11.082483 s: IPC: HLOS is ready !!!
    [C6x_1 ] 11.085869 s: IPC: Init ... Done !!!
    [C6x_1 ] 11.085897 s: APP: Syncing with 5 CPUs ... !!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Doredla,

    The current problem we are experiencing is that if we add the phy_name attributes “mac”, “serdes” to the cpsw_port node in dts file, all eth network interfaces fail to be generated。

    And print the following error in the kernel's boot log:

    When we didn`t add the phy_name attributes “mac”, “serdes” to the cpsw_port node in dts file, All eth ports can be generated normally, and the status of phy is “link up”. but I can't ping other devices, and the status of CPSW and serdes registers are not normal.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    7.061044] am65-cpsw-nuss c000000.ethernet eth2: PHY [c000f00.mdio:01] driver [Realtek RTL9010] (irq=POLL)
    [ 7.081304] am65-cpsw-nuss c000000.ethernet eth2: configuring for phy/sgmii link mode
    [ 7.081322] hub 1-0:1.0: USB hub found
    [ 7.100640] hub 1-0:1.0: 1 port detected
    [ 7.105512] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 7.115290] hub 2-0:1.0: USB hub found
    [ 7.119637] hub 2-0:1.0: 1 port detected
    [ 7.616664] am65-cpsw-nuss c000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
    [ 7.625128] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    root@Linux:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 62:FF:9A:04:20:C4
    inet addr:192.168.2.20 Bcast:192.168.255.255 Mask:255.255.0.0
    inet6 addr: fe80::60ff:9aff:fe04:20c4/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:2030 (1.9 KiB)

    eth1 Link encap:Ethernet HWaddr DE:A4:94:48:54: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)

    eth2 Link encap:Ethernet HWaddr 82:73:FC:9F:65:4C
    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:4 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:364 (364.0 B) TX bytes:364 (364.0 B)

    root@Linux:~# ping 192.168.2.25
    PING 192.168.2.25 (192.168.2.25): 56 data bytes
    ^C
    --- 192.168.2.25 ping statistics ---
    4 packets transmitted, 0 packets received, 100% packet loss

    root@Linux:/data# ./j7_devmem2_cpsw9g_check_status.sh
    Platform: J7 TDA4VM
    Command: k3conf
    Command: k3conf
    MDIO_ALIVE_REG (0x0c000f08) = 0x0
    MDIO_LINK_REG (0x0c000f0c) = 0x0
    please input your port: 1-8 1
    CTRLMMR_ENET 1 CTRL (0x00104044) = 0x3
    PORT_MODE_SEL : 3h SGMII
    RGMII_ID_MODE : 0h Internal Transmit Desaly
    CPSW SS RGMII 1 STATUS (0x0c000030) = 0x0
    FULLDUPLEX : 0h Half duplex
    SPEED : 0h 10Mbps
    LINK : 0h Links is down
    CPSW_SS_STATUS_SGMII_LINK_REG (0x0c000078) = 0x0
    SGMII1_LINK : 0h No
    CPSW_SS_SGMII_CONTROL_REG_j (0x0c000110) = 0x0
    TEST_PATTERN_EN : 0h operation
    MASTER : 0h Slave Mode
    LOOPBACK : 0h Not in internal loopback mode
    MR_NP_LOADED : 0h --------
    FAST_LINK_TIMER : 0h link timer 10ms in FIBER mode and 1.6ms in SGMII mode
    MA_AN_RESTART : 0h Write 1h and tehn 0h to this bit caused the auto negotiation
    MR_AN_ENABLE : 0h wirte 1 to this bit enbales the auto negotiation progess
    CPSW_SS_SGMII_STATUS_REG_j (0x0c000114) = 0x0
    LINK : 0h link is not up

  • Hi,

    Can you add phy-names as below and check once.
    "phy-names = "portmode", "serdes-phy";"

    Best Regards,
    Sudheer

  • Hi

    I have added "phy-names = "portmode", "serdes-phy";" and checked again,

    but I still can't ping other devices, and the status of CPSW and serdes registers are not normal.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@Linux:~# ifconfig -a
    eth0 Link encap:Ethernet HWaddr 3E:A8:83:AC:A0:33
    inet addr:192.168.2.20 Bcast:192.168.255.255 Mask:255.255.0.0
    inet6 addr: fe80::3ca8:83ff:feac:a033/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:1414 (1.3 KiB)
    eth1 Link encap:Ethernet HWaddr 12:04:2D:49:D7:87
    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)
    eth2 Link encap:Ethernet HWaddr 66:22:05:27:47:44
    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

  • HI,

    From SGMII status register & SerDes Registers it seems like SERDES PLL is not locked.

    Please refer to below info for enabling SGMII on Sierra 2L SerDes, and check whether all changes are taken care or not.

    1. Update the SGMII support from Sierra SerDes.

    7462.0001-phy-cadence-Sierra-Add-Single-link-SGMII-PHY-configu.patch

    2. U-Boot is configuring the SerDes in PCIe + QSGMII configuration.
    Due to this, since the SerDes has already been configured in U-Boot, the Linux SerDes driver will not configure the SerDes for the desired SGMII mode.

    When building U-Boot (u-boot.img), please ensure that the following configs are disabled:

    Fullscreen
    1
    2
    CONFIG_PHY_CADENCE_SIERRA=n
    CONFIG_PHY_J721E_WIZ=n
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    In order to ensure that U-Boot is not configuring the SerDes.

    3. Additionally, with the SDK, the Sierra driver which configures the SerDes supports "PCIe + SGMII" multilink configuration only. Therefore, with the default SDK, please modify the existing SerDes node to below.

    a) for 2 SGMII Ports:

    The serdes0 device-tree node has to be modified to:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    &serdes0 {
    serdes0_sgmii_link: phy@0 {
    reg = <0>;
    cdns,num-lanes = <2>;
    #phy-cells = <0>;
    cdns,phy-type = <PHY_TYPE_SGMII>;
    resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>;
    };
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Also, the serdes_ln_ctrl device-tree node has to be modified to:
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    &serdes_ln_ctrl {
    idle-states = <J721E_SERDES0_LANE0_QSGMII_LANE1>, <J721E_SERDES0_LANE1_QSGMII_LANE2>, /*<J721E_SERDES0_LANE1_QSGMII_LANE2>, */
    <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    <J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
    <MUX_IDLE_AS_IS>, <J721E_SERDES3_LANE1_USB3_0>,
    <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
    <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And finally, the cpsw device-tree nodes have to be modified to

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    &cpsw0_port1 {
    phy-handle = <&port1_phy>;
    phy-mode = "sgmii";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 1>, <&serdes0_sgmii_link>;
    phy-names = "portmode", "serdes-phy";
    };
    &cpsw0_port2 {
    phy-handle = <&port2_phy>;
    phy-mode = "sgmii";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 2>;
    phy-names = "portmode";
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    In above only CPSW Port 1's device-tree node points to the SerDes and requests both lanes of the SerDes to be configured in SGMII mode, on behalf of CPSW Port 2 as well.
    Above "port1_phy" & "port2_phy" should be PHY nodes under "cpsw9g_mdio" node corresponding to MAC Port-1 & MAC Port-2.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thank you for your reply.

    1. Update the SGMII support from Sierra SerDes.

    I have updated this driver file, this is the code source:

    phy-cadence-sierra.c

    In uboot, these two configurations have been disabled:

    The device tree file has been modified exactly as you suggested!

    But the problem remains unsolved.

    this is kernel boot log And problem status:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot SPL 2023.04 (Sep 03 2024 - 01:53:56 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from nowhere... OK
    Starting ATF on ARM64 core...
    NOTICE: BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE: BL31: Built : 09:34:15, Aug 24 2023
    I/TC:
    I/TC: OP-TEE version: 4.0.0 (gcc version 11.4.0 (GCC)) #1 Fri Oct 20 18:29:31 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@Linux:~# ifconfig
    eth0 Link encap:Ethernet HWaddr 52:E3:16:DF:55:57
    inet addr:192.168.2.20 Bcast:192.168.255.255 Mask:255.255.0.0
    inet6 addr: fe80::50e3:16ff:fedf:5557/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:1344 (1.3 KiB)
    eth1 Link encap:Ethernet HWaddr DA:57:32:FB:2C:02
    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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    Can you please confirm are below enabled at Linux defconfig.
    CONFIG_PHY_CADENCE_SIERRA
    CONFIG_PHY_J721E_WIZ

    Also, can you please share the device tree files of j721e (main.dtsi, common.dts, overlays of vision)

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Can you please confirm are below enabled at Linux defconfig.

    I have enabled these configurations in Linux defconfig:

    I've shared our device tree file with you in tarball format。

    devicetree.tar

  • Hi,

    Device tree looks fine, I think SerDes is not configured in your case.

    Can you please add few prints in SerDes files, and check whether prints are coming or not?

    Best Regards,
    Sudheer

1 2