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.

PROCESSOR-SDK-AM69A: CPSW Driver Dependencies

Part Number: PROCESSOR-SDK-AM69A

Tool/software:

Hi TI, I am trying to port the CPSW driver to work in Uboot. Specifically am69-cpsw-nuss from Linux. I was wondering what other drivers I need to get it working? Looks like k3-udma and k3-navss-ringacc. Please advise if there is a better way to get this working.

Thanks,
Emily

  • Hello Emily,

    CPSW2G driver is already part of the U-Boot and it works. driver/net/ti/am65-cpsw-nuss.c

    This is enabled for tftp and any other network related applications on U-Boot. Is this something you are looking for?

    - Keerthy

  • Related to this thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1340590/tda4vm-enable-cpsw0-main-domain-ethernet-switch-with-sgmii-interface-in-u-boot

    In Linux we have SGMII port 5 configured as a mac-to-mac fixed link and it is working. We need the SGMII Interface on SERDES2 in Uboot.

    Emily

  • Reminder of this issue. These are the errors I am getting in Uboot

    drivers/soc/ti/k3-navss-ringacc.c:1022- k3-navss-ringacc ringacc@3c000000: Ring Accelerator probed rings:1024, gp-rings[878,128] sci-dev-id:315
    drivers/soc/ti/k3-navss-ringacc.c:1027- k3-navss-ringacc ringacc@3c000000: dma-ring-reset-quirk: disabled
    drivers/dma/ti/k3-udma.c:2607- udma: ti-udma dma-controller@31150000: No configuration for psi-l thread 0xca00
    drivers/dma/ti/k3-udma.c:2607- udma: ti-udma dma-controller@31150000: No configuration for psi-l thread 0x4a00
    drivers/dma/ti/k3-udma.c:766- udma: ti-udma dma-controller@31150000: chan0: already have 0 pair allocated
    drivers/dma/ti/k3-udma.c:2383- udma: ti-udma dma-controller@31150000: alloc dma res failed -16
    drivers/net/ti/am65-cpsw-nuss.c:354- am65_cpsw_nuss_port ethernet@c000000port@5: RX dma get failed -22
    drivers/net/ti/am65-cpsw-nuss.c:474- am65_cpsw_nuss_port ethernet@c000000port@5: am65_cpsw_start end error

  • Hi Emily,

    What is the configuration you want to have for main CPSW in u-boot? Which port will have what connection mode? If its RGMII, it won;t be an issue. If it has SGMII as well, I will need to check feasibility from u-boot.

    Regards,
    Tanmay

  •  Hi Tanmay, we need a SGMII mac-to-mac fixed link on port 5 SERDES2 in U-boot.

    Emily

  • Hi Emily,

    Please see the attached thread for enabling main CPSW in u-boot : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1266033/dra829v-enable-cpsw0-main-domain-ethernet-switch-in-u-boot?pifragment-323307=1#4831658

    For SGMII, you will only have to modify the serdes configuration. Use "PHY_TYPE_SGMII" instead of "PHY_TYPE_QSGMII" and change the for the serdes you are using.

    Regards,
    Tanmay

  • Thank you Tanmay,

    I am really close! I applied patches for J784s4, and I can ping the host. I have included the U-boot log and SGMII and SERDES2 registers. 

    But I do not get a response when I try to ping the other way around from the host side. 

    U-Boot 2023.04-g16818160 (Jun 27 2024 - 05:47:49 +0000)
    
    SoC:   J784S4 SR1.0 GP
    Model: Texas Instruments J784S4 EVM
    DRAM:  2 GiB
    Core:  92 devices, 31 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0
    Loading Environment from nowhere... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    drivers/net/ti/am65-cpsw-nuss.c:899- am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA03102 cpsw_ver: 0x6BA82902 ale_ver: 0x00290105 Ports:8 mdio_freq:1000000
    Net:   am65_cpsw_nuss_port ethernet@c000000port@5: old gmii_sel: 00000003
    am65_cpsw_nuss_port ethernet@c000000port@5: gmii_sel PHY mode: 3, new gmii_sel: 00000003
    
    Warning: ethernet@c000000port@5 (eth0) using random MAC address - e2:cb:6c:7f:2f:04
    eth0: ethernet@c000000port@5
    => md 0x0c000514
    0c000514: 00000039 00009801 00000000 00000000  1...............
    0c000524: 00000000 00000000 00000000 00000000  ................
    0c000534: 00000000 00000000 00000000 00000000  ................
    0c000544: 00000000 00000ee0 00000000 00000000  ................
    => md 0x05020408
    05020408: 18100000 a2800000 00000000 00000000  ................
    05020418: 00000000 00000000 00000000 00000000  ................
    05020428: 00000000 00000000 00000000 00000000  ................
    05020438: 00000000 00000000 00000000 00000000  ................
    => setenv ipaddr 169.254.41.41
    => setenv netmask 255.255.0.0
    => ping 169.254.245.147
    drivers/soc/ti/k3-navss-ringacc.c:1022- k3-navss-ringacc ringacc@3c000000: Ring Accelerator probed rings:1024, gp-rings[878,128] sci-dev-id:315
    drivers/soc/ti/k3-navss-ringacc.c:1027- k3-navss-ringacc ringacc@3c000000: dma-ring-reset-quirk: disabled
    ti-udma dma-controller@31150000: Channels: 16 (tchan: 8, rchan: 8, gp-rflow: 24)
    drivers/net/ti/am65-cpsw-nuss.c:401- am65_cpsw_nuss_port ethernet@c000000port@5: K3 CPSW: rflow_id_base: 0
    link up on port 5, speed 1000, full duplex
    Using ethernet@c000000port@5 device
    host 169.254.245.147 is alive
    


    Emily  

  • Hi Emily,

    For u-boot, the packet reception is not interrupt based. So unless you are actively receiving a packet, u-boot will not respond to the ping from host side.

    I don't know a way to actively listen for packets all the time in u-boot as well. You can try doing a tftp test with a file to verify data transfer.

    You interface is all correctly configured now.

    Regards,
    Tanmay

  • I tested tftp and it is working. Thank you so much for your help!

    Emily