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: How to enable CPSW9G in linux

Part Number: TDA4VM

Hello TI experts, I'm using SDK 8.6 and I'm trying to enable the ethernet interface on A72 cores running linux. The hardware is a proprietary card derived from the sk-tda4vm reference system with few modifications. One of these differences refers to the way the ethernet interface is physically connected and managed. On our card we connected the CPSW9G port 8 to an external phy via RGMII. The external PHY is a TI DP83867 device configured at the MDIO address 2. I know the hardware is working fine because from the mcu2_0 core I'm able cto configure and use the ethernet interface and communicate with an external PC. But I'm interested to have the ethernet on A72 as Native Ethernet (no need to share the interface between the different cores and use Virtual MAC and EthSwitch firmware). I'm facing issues and I was not able to have the interface working so far.

Can you confirm SDK 8.6 supports the capability to configure a port of CPSW9 as Native Ethernet on a72?

Kernel startup traces is showing the following error:

[ 1.113846] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
[ 1.156804] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 1.165228] davinci_mdio c000f00.mdio: phy[2]: device c000f00.mdio:02, driver TI DP83867
[ 1.173346] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
[ 1.186035] am65-cpsw-nuss c000000.ethernet: /bus@100000/ethernet@c000000/ethernet-ports/port@8 error retrieving port phy: -19

and no network interface is configured at all. It seems my port phy cannot be detected through cpsw9g port 8. What I'm missing or doing wrong in my configuration?

  • Hello,

    This ticket has been assigned to one of our experts. Please allow a time for them to respond as Monday and Tuesday are holidays.

    Thanks,

    Erick

  • Hi,

    Please refer to FAQ[How to move to Native Linux driver for CPSWnG] for bringing up CPSW9G In A72 with Native Linux Driver.

    Best Regards,
    Sudheer

  • I've enablde overlay and generated my dtbo. I'm getting this error:

    U-Boot 2021.01-00012-g16d1dea786-dirty (Oct 17 2023 - 13:17:55 +0000)

    SoC: J721E SR1.1 GP
    Model: Inxpect S.p.A. J721E SAURON A72
    DRAM: 2 GiB
    MMC: sdhci@4fb0000: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment

    In: serial@40a00000
    Out: serial@40a00000
    Err: serial@40a00000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    43 bytes read in 8 ms (4.9 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    19079680 bytes read in 791 ms (23 MiB/s)
    98979 bytes read in 11 ms (8.6 MiB/s)
    3121 bytes read in 7 ms (434.6 KiB/s)
    failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
    ERROR: Did not find a cmdline Flattened Device Tree
    Could not find a valid device tree

    When I execute the command manually Ighet this:

    => run get_overlay_mmc
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    3121 bytes read in 8 ms (380.9 KiB/s)
    failed on fdt_overlay_apply(): FDT_ERR_BADMAGIC
    base fdt does did not have a /__symbols__ node
    make sure you've compiled with -@

    What the problem could be?

  • Hi Sergio,

    Sudheer is out of office due to a TI regional holiday, and will follow-up once he is back in office later this week.

    regards

    Suman

  • Thanks Suman, in the meantime I realized that there was an error in my Device Tree. After correcting it I can bootstrap Linux properly. But still I haven't Th ethernet interface connected to CPSW9G port 8 eorking properly. I will collect additional information

  • Hello, the following is actually my DT overlay used to enable ethernet interface on CPSW9G port-8

    // SPDX-License-Identifier: GPL-2.0
    /**
    * DT Overlay for CPSW9G in RGMII mode using J7 GESI EXP BRD board with
    * J721E board.
    *
    * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
    */

    /dts-v1/;
    /plugin/;

    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include <dt-bindings/pinctrl/k3.h>

    / {
    fragment@102 {
    target-path = "/";
    __overlay__ {
    aliases {
    ethernet8 = "/bus@100000/ethernet@c000000/ethernet-ports/port@8";
    };
    };
    };
    };

    &cpsw0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&mdio_pins_default
    &eth_rst_pins_default
    &rgmii8_pins_default>;
    };

    &cpsw0_port1 {
    status = "disabled";
    };

    &cpsw0_port2 {
    status = "disabled";
    };

    &cpsw0_port3 {
    status = "disabled";
    };

    &cpsw0_port4 {
    status = "disabled";
    };

    &cpsw0_port5 {
    status = "disabled";
    };

    &cpsw0_port6 {
    status = "disabled";
    };

    &cpsw0_port7 {
    status = "disabled";
    };

    &cpsw0_port8 {
    phy-handle = <&cpsw9g_phy2>;
    phy-mode = "rgmii-rxid";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 8>;
    };

    &cpsw9g_mdio {
    bus_freq = <1000000>;
    #address-cells = <1>;
    #size-cells = <0>;

    cpsw9g_phy2: ethernet-phy@2 {
    reg = <2>;
    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
    ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    ti,min-output-impedance;
    reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
    };
    };

    &main_pmx0 {
    mdio_pins_default: mdio-pins-default {
    pinctrl-single,pins = <
    J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
    J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
    >;
    };

    rgmii8_pins_default: rgmii8-pins-default {
    pinctrl-single,pins = <
    J721E_IOPAD(0x58, PIN_INPUT, 8) /* (AE22) PRG1_PRU1_GPO0.RGMII8_RD0 */
    J721E_IOPAD(0x5c, PIN_INPUT, 8) /* (AG23) PRG1_PRU1_GPO1.RGMII8_RD1 */
    J721E_IOPAD(0x60, PIN_INPUT, 8) /* (AF23) PRG1_PRU1_GPO2.RGMII8_RD2 */
    J721E_IOPAD(0x64, PIN_INPUT, 8) /* (AD23) PRG1_PRU1_GPO3.RGMII8_RD3 */
    J721E_IOPAD(0x70, PIN_INPUT, 8) /* (AE23) PRG1_PRU1_GPO6.RGMII8_RXC */
    J721E_IOPAD(0x68, PIN_INPUT, 8) /* (AH24) PRG1_PRU1_GPO4.RGMII8_RX_CTL */
    J721E_IOPAD(0x84, PIN_OUTPUT, 8) /* (AJ25) PRG1_PRU1_GPO11.RGMII8_TD0 */
    J721E_IOPAD(0x88, PIN_OUTPUT, 8) /* (AH25) PRG1_PRU1_GPO12.RGMII8_TD1 */
    J721E_IOPAD(0x8c, PIN_OUTPUT, 8) /* (AG25) PRG1_PRU1_GPO13.RGMII8_TD2 */
    J721E_IOPAD(0x90, PIN_OUTPUT, 8) /* (AH26) PRG1_PRU1_GPO14.RGMII8_TD3 */
    J721E_IOPAD(0x98, PIN_OUTPUT, 8) /* (AJ26) PRG1_PRU1_GPO16.RGMII8_TXC */
    J721E_IOPAD(0x94, PIN_OUTPUT, 8) /* (AJ27) PRG1_PRU1_GPO15.RGMII8_TX_CTL */
    >;
    };

    eth_rst_pins_default: eth-rst-pins-default {
    pinctrl-single,pins = <
    J721E_IOPAD(0x44, PIN_OUTPUT, 7) /* (AE24) PRG1_PRU0_GPO16.GPIO0_17 */
    >;
    };
    };

    The linux OS starts correcly and eth0 network interface is properly created. Taking a look to the configuration it seems properly associated to the port-8 of the CPSW9G LAN switch. But the operational status is down and I cannot receive nor transmit anything

    These are the traces seen out of the console. The external PHY is up as reported by led we have on the card. What the probem could be?

    U-Boot SPL 2021.01-00011-gf11eafb042-dirty (Oct 17 2023 - 11:36:19 +0000)
    Model: Inxpect S.p.A. J721E SAURON A72
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.3--v08.06.03 (Chill Capybar')
    Trying to boot from MMC2


    U-Boot 2021.01-00012-g16d1dea786-dirty (Oct 23 2023 - 15:25:02 +0000)

    SoC: J721E SR1.1 GP
    Model: Inxpect S.p.A. J721E SAURON A72
    DRAM: 2 GiB
    MMC: sdhci@4fb0000: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment

    In: serial@40a00000
    Out: serial@40a00000
    Err: serial@40a00000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    68 bytes read in 7 ms (8.8 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    19079680 bytes read in 790 ms (23 MiB/s)
    99003 bytes read in 10 ms (9.4 MiB/s)
    3026 bytes read in 6 ms (492.2 KiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 000000008fee4000, end 000000008fffffff ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [ 0.000000] Linux version 5.10.162-dirty (inxpect@dad77c672a2e) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Tue Oct 17 12:35:40 UTC 2023
    [ 0.000000] Machine model: Inxpect S.p.A. J721E SAURON
    [ 0.000000] earlycon: ns16550a0 at MMIO32 0x0000000040a00000 (options '')
    [ 0.000000] printk: bootconsole [ns16550a0] enabled
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node 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 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 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 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 r5f-dma-memory@a2000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-memory@a2100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a3000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-memory@a3100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a4000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-memory@a4100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a5000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-dma-memory@a5000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a5100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node r5f-memory@a5100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a6000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node c66-dma-memory@a6000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node c66-memory@a6100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a7000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node c66-dma-memory@a7000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a7100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node c66-memory@a7100000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8000000, size 1 MiB
    [ 0.000000] OF: reserved mem: initialized node c71-dma-memory@a8000000, compatible id shared-dma-pool
    [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8100000, size 15 MiB
    [ 0.000000] OF: reserved mem: initialized node c71-memory@a8100000, compatible id shared-dma-pool
    [ 0.000000] Zone ranges:
    [ 0.000000] DMA [mem 0x0000000080000000-0x00000000ffffffff]
    [ 0.000000] DMA32 empty
    [ 0.000000] Normal empty
    [ 0.000000] Movable zone start for each node
    [ 0.000000] Early memory node ranges
    [ 0.000000] node 0: [mem 0x0000000080000000-0x000000009e7fffff]
    [ 0.000000] node 0: [mem 0x000000009e800000-0x00000000a8ffffff]
    [ 0.000000] node 0: [mem 0x00000000a9000000-0x00000000a9ffffff]
    [ 0.000000] node 0: [mem 0x00000000aa000000-0x00000000abbfffff]
    [ 0.000000] node 0: [mem 0x00000000abc00000-0x00000000ffffffff]
    [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [ 0.000000] cma: Reserved 512 MiB at 0x00000000dd000000
    [ 0.000000] psci: probing for conduit method from DT.
    [ 0.000000] psci: PSCIv1.1 detected in firmware.
    [ 0.000000] psci: Using standard PSCI v0.2 function IDs
    [ 0.000000] psci: Trusted OS migration not required
    [ 0.000000] psci: SMC Calling Convention v1.2
    [ 0.000000] percpu: Embedded 22 pages/cpu s50392 r8192 d31528 u90112
    [ 0.000000] Detected PIPT I-cache on CPU0
    [ 0.000000] CPU features: detected: GIC system register CPU interface
    [ 0.000000] CPU features: detected: EL2 vector hardening
    [ 0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
    [ 0.000000] CPU features: detected: Spectre-BHB
    [ 0.000000] CPU features: detected: ARM erratum 1742098
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
    [ 0.000000] Kernel command line: console=ttyS1,115200n8 earlycon=ns16550a,mmio32,0x40a00000 mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs) root=PARTUUID=cc2029f6-02 rw rootfstype=ext4 rootwait
    [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [ 0.000000] Memory: 1312788K/2097152K available (11200K kernel code, 1160K rwdata, 4300K rodata, 1856K init, 433K bss, 260076K reserved, 524288K cma-reserved)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [ 0.000000] rcu: Preemptible hierarchical RCU implementation.
    [ 0.000000] rcu: RCU event tracing is enabled.
    [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
    [ 0.000000] Trampoline variant of Tasks RCU enabled.
    [ 0.000000] Tracing variant of Tasks RCU enabled.
    [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [ 0.000000] GICv3: 960 SPIs implemented
    [ 0.000000] GICv3: 0 Extended SPIs implemented
    [ 0.000000] GICv3: Distributor has no Range Selector support
    [ 0.000000] GICv3: 16 PPIs implemented
    [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001900000
    [ 0.000000] ITS [mem 0x01820000-0x0182ffff]
    [ 0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [ 0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [ 0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [ 0.000000] ITS: using cache flushing for cmd queue
    [ 0.000000] GICv3: using LPI property table @0x0000000080030000
    [ 0.000000] GIC: using cache flushing for LPI property table
    [ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080040000
    [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [ 0.000001] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [ 0.008361] Console: colour dummy device 80x25
    [ 0.012914] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [ 0.023552] pid_max: default: 32768 minimum: 301
    [ 0.028295] LSM: Security Framework initializing
    [ 0.033030] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [ 0.040575] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [ 0.049358] rcu: Hierarchical SRCU implementation.
    [ 0.054397] Platform MSI: msi-controller@1820000 domain created
    [ 0.060589] PCI/MSI: /bus@100000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [ 0.069858] EFI services will not be available.
    [ 0.074560] smp: Bringing up secondary CPUs ...
    [ 0.102656] Detected PIPT I-cache on CPU1
    [ 0.102680] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
    [ 0.102692] GICv3: CPU1: using allocated LPI pending table @0x0000000080050000
    [ 0.102727] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
    [ 0.102777] smp: Brought up 1 node, 2 CPUs
    [ 0.132055] SMP: Total of 2 processors activated.
    [ 0.136844] CPU features: detected: 32-bit EL0 Support
    [ 0.142076] CPU features: detected: CRC32 instructions
    [ 0.156118] CPU: All CPU(s) started at EL2
    [ 0.160304] alternatives: patching kernel code
    [ 0.165320] devtmpfs: initialized
    [ 0.173641] KASLR disabled due to lack of seed
    [ 0.178269] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [ 0.188207] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    [ 0.201781] pinctrl core: initialized pinctrl subsystem
    [ 0.207415] DMI not present or invalid.
    [ 0.211647] NET: Registered protocol family 16
    [ 0.216979] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
    [ 0.224238] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [ 0.232211] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [ 0.240499] thermal_sys: Registered thermal governor 'step_wise'
    [ 0.240501] thermal_sys: Registered thermal governor 'power_allocator'
    [ 0.247018] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [ 0.260617] ASID allocator initialised with 65536 entries
    [ 0.278894] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
    [ 0.285733] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
    [ 0.292566] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
    [ 0.299400] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
    [ 0.306829] cryptd: max_cpu_qlen set to 1000
    [ 0.312792] k3-chipinfo 43000014.chipid: Family:J721E rev:SR2.0 JTAGID[0x1bb6402f] Detected
    [ 0.321557] vsys_3v3: supplied by vusb-main5v0
    [ 0.326511] iommu: Default domain type: Translated
    [ 0.331655] SCSI subsystem initialized
    [ 0.335688] mc: Linux media interface: v0.10
    [ 0.340053] videodev: Linux video capture interface: v2.00
    [ 0.345664] pps_core: LinuxPPS API ver. 1 registered
    [ 0.350719] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.360035] PTP clock support registered
    [ 0.364049] EDAC MC: Ver: 3.0.0
    [ 0.367764] FPGA manager framework
    [ 0.371270] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.377865] clocksource: Switched to clocksource arch_sys_counter
    [ 0.384167] VFS: Disk quotas dquot_6.6.0
    [ 0.388188] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [ 0.397728] NET: Registered protocol family 2
    [ 0.402345] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [ 0.410544] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
    [ 0.419260] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [ 0.427394] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
    [ 0.434995] TCP: Hash tables configured (established 16384 bind 16384)
    [ 0.441765] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [ 0.448625] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [ 0.455972] NET: Registered protocol family 1
    [ 0.460651] RPC: Registered named UNIX socket transport module.
    [ 0.466690] RPC: Registered udp transport module.
    [ 0.471498] RPC: Registered tcp transport module.
    [ 0.476293] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.482863] NET: Registered protocol family 44
    [ 0.487395] PCI: CLS 0 bytes, default 64
    [ 0.491733] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
    [ 0.501946] Initialise system trusted keyrings
    [ 0.506548] workingset: timestamp_bits=46 max_order=19 bucket_order=0
    [ 0.514661] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.520841] NFS: Registering the id_resolver key type
    [ 0.526060] Key type id_resolver registered
    [ 0.530326] Key type id_legacy registered
    [ 0.534439] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [ 0.541269] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [ 0.548887] 9p: Installing v9fs 9p2000 file system support
    [ 0.573915] Key type asymmetric registered
    [ 0.578090] Asymmetric key parser 'x509' registered
    [ 0.583076] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
    [ 0.590608] io scheduler mq-deadline registered
    [ 0.595223] io scheduler kyber registered
    [ 0.600645] pinctrl-single 4301c000.pinctrl: 94 pins, size 376
    [ 0.606802] pinctrl-single 11c000.pinctrl: 173 pins, size 692
    [ 0.615133] ti-pat 31010000.pat: Found PAT Rev 1.0 with 16384 pages
    [ 0.621546] debugfs: Directory '31010000.pat' with parent 'regmap' already present!
    [ 0.629528] ti-pat 31011000.pat: Found PAT Rev 1.0 with 16384 pages
    [ 0.635923] debugfs: Directory '31011000.pat' with parent 'regmap' already present!
    [ 0.643825] ti-pat 31012000.pat: Found PAT Rev 1.0 with 16384 pages
    [ 0.650218] debugfs: Directory '31012000.pat' with parent 'regmap' already present!
    [ 0.658129] ti-pat 31013000.pat: Found PAT Rev 1.0 with 2048 pages
    [ 0.664433] debugfs: Directory '31013000.pat' with parent 'regmap' already present!
    [ 0.672360] ti-pat 31014000.pat: Found PAT Rev 1.0 with 2048 pages
    [ 0.678666] debugfs: Directory '31014000.pat' with parent 'regmap' already present!
    [ 0.688120] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [ 0.696172] arm-smmu-v3 36600000.iommu: ias 48-bit, oas 48-bit (features 0x00001faf)
    [ 0.704330] arm-smmu-v3 36600000.iommu: allocated 65536 entries for cmdq
    [ 0.711418] arm-smmu-v3 36600000.iommu: allocated 32768 entries for evtq
    [ 0.719908] arm-smmu-v3 36600000.iommu: msi_domain absent - falling back to wired irqs
    [ 0.732512] brd: module loaded
    [ 0.738900] loop: module loaded
    [ 0.742537] megasas: 07.714.04.00-rc1
    [ 0.748001] tun: Universal TUN/TAP device driver, 1.6
    [ 0.753405] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [ 0.759791] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [ 0.765848] sky2: driver version 1.30
    [ 0.770117] VFIO - User Level meta-driver version: 0.3
    [ 0.775819] i2c /dev entries driver
    [ 0.780101] sdhci: Secure Digital Host Controller Interface driver
    [ 0.786407] sdhci: Copyright(c) Pierre Ossman
    [ 0.791004] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 0.797242] ledtrig-cpu: registered to indicate activity on CPUs
    [ 0.803527] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [ 0.810777] optee: probing for conduit method.
    [ 0.815328] optee: revision 3.20 (2d0762ee)
    [ 0.831739] optee: dynamic shared memory is enabled
    [ 0.883268] optee: initialized driver
    [ 0.887990] NET: Registered protocol family 17
    [ 0.892605] 9pnet: Installing 9P2000 support
    [ 0.896996] Key type dns_resolver registered
    [ 0.901440] Loading compiled-in X.509 certificates
    [ 0.912811] ti-sci 44083000.dmsc: ABI: 3.1 (firmware rev 0x0008 '8.6.3--v08.06.03 (Chill Capybar')
    [ 0.952163] omap_i2c 40b00000.i2c: bus 0 rev0.12 at 100 kHz
    [ 0.958264] omap_i2c 40b10000.i2c: bus 1 rev0.12 at 100 kHz
    [ 0.964297] omap_i2c 42120000.i2c: bus 2 rev0.12 at 100 kHz
    [ 0.970785] ti-sci-intr bus@100000:bus@28380000:interrupt-controller2: Interrupt Router 137 domain created
    [ 0.980728] ti-sci-intr bus@100000:interrupt-controller0: Interrupt Router 131 domain created
    [ 0.989509] ti-sci-intr bus@100000:main-navss:interrupt-controller1: Interrupt Router 213 domain created
    [ 0.999332] ti-sci-inta 33d00000.interrupt-controller: Interrupt Aggregator domain 209 created
    [ 1.011386] k3-ringacc 2b800000.ringacc: Ring Accelerator probed rings:286, gp-rings[96,20] sci-dev-id:235
    [ 1.021255] k3-ringacc 2b800000.ringacc: dma-ring-reset-quirk: disabled
    [ 1.027996] k3-ringacc 2b800000.ringacc: RA Proxy rev. 66346100, num_proxies:64
    [ 1.036966] k3-ringacc 3c000000.ringacc: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
    [ 1.047082] k3-ringacc 3c000000.ringacc: dma-ring-reset-quirk: disabled
    [ 1.053820] k3-ringacc 3c000000.ringacc: RA Proxy rev. 66346100, num_proxies:64
    [ 1.061749] printk: console [ttyS1] disabled
    [ 1.066133] 40a00000.serial: ttyS1 at MMIO 0x40a00000 (irq = 15, base_baud = 6000000) is a 8250
    [ 1.075029] printk: console [ttyS1] enabled
    [ 1.075029] printk: console [ttyS1] enabled
    [ 1.083457] printk: bootconsole [ns16550a0] disabled
    [ 1.083457] printk: bootconsole [ns16550a0] disabled
    [ 1.093965] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 25, base_baud = 3000000) is a 8250
    [ 1.102940] 2830000.serial: ttyS5 at MMIO 0x2830000 (irq = 26, base_baud = 3000000) is a 8250
    [ 1.115754] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.161869] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.170150] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [ 1.182924] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [ 1.189180] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [ 1.196298] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [ 1.202599] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [ 1.214277] am65-cpts 310d0000.cpts: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [ 1.325540] vdd_mmc1: supplied by vsys_3v3
    [ 1.330486] omap-mailbox 31f80000.mailbox: omap mailbox rev 0x66fc7100
    [ 1.337373] omap-mailbox 31f81000.mailbox: omap mailbox rev 0x66fc7100
    [ 1.344202] omap-mailbox 31f82000.mailbox: omap mailbox rev 0x66fc7100
    [ 1.351016] omap-mailbox 31f83000.mailbox: omap mailbox rev 0x66fc7100
    [ 1.357812] omap-mailbox 31f84000.mailbox: omap mailbox rev 0x66fc7100
    [ 1.364943] ti-udma 285c0000.dma-controller: Channels: 26 (tchan: 13, rchan: 13, gp-rflow: 8)
    [ 1.375480] ti-udma 31150000.dma-controller: Channels: 122 (tchan: 61, rchan: 61, gp-rflow: 16)
    [ 1.387069] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.429877] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.438158] am65-cpsw-nuss c000000.ethernet: initializing am65 cpsw nuss version 0x6BA01901, cpsw version 0x6BA80101 Ports: 9 quirks:00000000
    [ 1.450928] am65-cpsw-nuss c000000.ethernet: Use random MAC address
    [ 1.457184] am65-cpsw-nuss c000000.ethernet: initialized cpsw ale version 1.4
    [ 1.464302] am65-cpsw-nuss c000000.ethernet: ALE Table size 512
    [ 1.470573] am65-cpsw-nuss c000000.ethernet: CPTS ver 0x4e8a010a, freq:200000000, add_val:4 pps:0
    [ 1.482422] am65-cpsw-nuss c000000.ethernet: set new flow-id-base 140
    [ 1.490750] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.497499] mmc0: CQHCI version 5.10
    [ 1.533870] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.542478] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.585868] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.594159] debugfs: Directory 'pd:27' with parent 'pm_genpd' already present!
    [ 1.601442] debugfs: Directory 'pd:26' with parent 'pm_genpd' already present!
    [ 1.609780] debugfs: Directory 'pd:242' with parent 'pm_genpd' already present!
    [ 1.617115] debugfs: Directory 'pd:241' with parent 'pm_genpd' already present!
    [ 1.624419] debugfs: Directory 'pd:240' with parent 'pm_genpd' already present!
    [ 1.631728] debugfs: Directory 'pd:239' with parent 'pm_genpd' already present!
    [ 1.648890] ALSA device list:
    [ 1.651858] No soundcards found.
    [ 2.562498] mmc0: SDHCI controller on 4fb0000.mmc [4fb0000.mmc] using ADMA 64-bit
    [ 2.570621] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 2.613900] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 2.622176] Waiting for root device PARTUUID=cc2029f6-02...
    [ 2.645642] mmc0: new ultra high speed DDR50 SDHC card at address 59b4
    [ 2.652482] mmcblk0: mmc0:59b4 AF UD 14.9 GiB
    [ 2.657828] mmcblk0: p1 p2
    [ 2.661368] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 2.705867] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 2.731352] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 2.739471] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 2.747079] devtmpfs: mounted
    [ 2.750841] Freeing unused kernel memory: 1856K
    [ 2.761970] Run /sbin/init as init process
    INIT: version 2.96 booting
    [ 2.916690] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Tue May 2 15:56:01 UTC 2023
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    [ 3.020305] random: dd: uninitialized urandom read (512 bytes read)
    INIT: Entering runlevel: 5
    Configuring network interfaces... ifconfig: SIOCSIFFLAGS: No such device
    done.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done

  • Hi,

    Can you please confirm, have you added below nodes in device tree overlay. If not can you please add check once.

    &main_r5fss0_core0 {
    	firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };
    
    &cpsw9g_virt_mac {
    	status = "disabled";
    };


    Also, please share the "ifconfig" and information, along with "ethtool -S eth0" information.
    Also, provide the ALE Table dump using "switch-config --ndev eth0 -d".

    Best Regards,
    Sudheer

  • Hello Sudheer, thanks for the hints. Let me first clarify the boot sequence I've implemented and I need to support with my hardware. The primary boot in my case is SBL because I need to bootstrap R5F cores first in a safety way. So my actual boot sequence after POR is:

    RBL --> SBL --> ATF --> TEE --> SPL --> UBOOT --> Linux kernel

    All the cores, but a72, are loaded directly by the SBL. SBL in turn will launch ATF --> TEE --> SPL on A72, which will complete the bootstrap of linux via UBOOT

    Stated that, I was missing both the directives in DT you indicated. So I've added inside the overlay

    &main_r5fss0_core0 {
    firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };

    &cpsw9g_virt_mac {
    status = "disabled";
    };

    and in my base DT

    cpsw9g_virt_mac: main_r5fss_cpsw9g_virt_mac0 {
            compatible = "ti,j721e-cpsw-virt-mac";
            dma-coherent;
            ti,psil-base = <0x4a00>;
            ti,remote-name = "mpu_1_0_ethswitch-device-0";

            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",
                        "tx4", "tx5", "tx6", "tx7",
                        "rx";

            virt_emac_port {
                    ti,label = "virt-port";
                    /* local-mac-address = [0 0 0 0 0 0]; */
            };
    };

    But still the ethernet interface is not running. Question: why do I need the following in my DT?

    &main_r5fss0_core0 {
    firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };


    Below is the output of the commands you've asked

    ifconfig -a
    eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500  metric 1
            ether 22:f2:d3:1c:73:c9  txqueuelen 1000  (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

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536  metric 1
            inet 127.0.0.1  netmask 255.0.0.0
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 82  bytes 6220 (6.0 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 82  bytes 6220 (6.0 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    Cannot see here the RUNNING on eth0 network device so it seems interface is operational down

    ethtool -S eth0
    NIC statistics:
         p0_rx_good_frames: 0
         p0_rx_broadcast_frames: 0
         p0_rx_multicast_frames: 0
         p0_rx_crc_errors: 0
         p0_rx_oversized_frames: 0
         p0_rx_undersized_frames: 0
         p0_ale_drop: 0
         p0_ale_overrun_drop: 0
         p0_rx_octets: 0
         p0_tx_good_frames: 0
         p0_tx_broadcast_frames: 0
         p0_tx_multicast_frames: 0
         p0_tx_octets: 0
         p0_tx_64B_frames: 0
         p0_tx_65_to_127B_frames: 0
         p0_tx_128_to_255B_frames: 0
         p0_tx_256_to_511B_frames: 0
         p0_tx_512_to_1023B_frames: 0
         p0_tx_1024B_frames: 0
         p0_net_octets: 0
         p0_rx_bottom_fifo_drop: 0
         p0_rx_port_mask_drop: 0
         p0_rx_top_fifo_drop: 0
         p0_ale_rate_limit_drop: 0
         p0_ale_vid_ingress_drop: 0
         p0_ale_da_eq_sa_drop: 0
         p0_ale_block_drop: 0
         p0_ale_secure_drop: 0
         p0_ale_auth_drop: 0
         p0_ale_unknown_ucast: 0
         p0_ale_unknown_ucast_bytes: 0
         p0_ale_unknown_mcast: 0
         p0_ale_unknown_mcast_bytes: 0
         p0_ale_unknown_bcast: 0
         p0_ale_unknown_bcast_bytes: 0
         p0_ale_pol_match: 0
         p0_ale_pol_match_red: 0
         p0_ale_pol_match_yellow: 0
         p0_ale_mcast_sa_drop: 0
         p0_ale_dual_vlan_drop: 0
         p0_ale_len_err_drop: 0
         p0_ale_ip_next_hdr_drop: 0
         p0_ale_ipv4_frag_drop: 0
         p0_tx_mem_protect_err: 0
         p0_tx_pri0: 0
         p0_tx_pri1: 0
         p0_tx_pri2: 0
         p0_tx_pri3: 0
         p0_tx_pri4: 0
         p0_tx_pri5: 0
         p0_tx_pri6: 0
         p0_tx_pri7: 0
         p0_tx_pri0_bcnt: 0
         p0_tx_pri1_bcnt: 0
         p0_tx_pri2_bcnt: 0
         p0_tx_pri3_bcnt: 0
         p0_tx_pri4_bcnt: 0
         p0_tx_pri5_bcnt: 0
         p0_tx_pri6_bcnt: 0
         p0_tx_pri7_bcnt: 0
         p0_tx_pri0_drop: 0
         p0_tx_pri1_drop: 0
         p0_tx_pri2_drop: 0
         p0_tx_pri3_drop: 0
         p0_tx_pri4_drop: 0
         p0_tx_pri5_drop: 0
         p0_tx_pri6_drop: 0
         p0_tx_pri7_drop: 0
         p0_tx_pri0_drop_bcnt: 0
         p0_tx_pri1_drop_bcnt: 0
         p0_tx_pri2_drop_bcnt: 0
         p0_tx_pri3_drop_bcnt: 0
         p0_tx_pri4_drop_bcnt: 0
         p0_tx_pri5_drop_bcnt: 0
         p0_tx_pri6_drop_bcnt: 0
         p0_tx_pri7_drop_bcnt: 0
         rx_good_frames: 0
         rx_broadcast_frames: 0
         rx_multicast_frames: 0
         rx_pause_frames: 0
         rx_crc_errors: 0
         rx_align_code_errors: 0
         rx_oversized_frames: 0
         rx_jabber_frames: 0
         rx_undersized_frames: 0
         rx_fragments: 0
         ale_drop: 0
         ale_overrun_drop: 0
         rx_octets: 0
         tx_good_frames: 0
         tx_broadcast_frames: 0
         tx_multicast_frames: 0
         tx_pause_frames: 0
         tx_deferred_frames: 0
         tx_collision_frames: 0
         tx_single_coll_frames: 0
         tx_mult_coll_frames: 0
         tx_excessive_collisions: 0
         tx_late_collisions: 0
         rx_ipg_error: 0
         tx_carrier_sense_errors: 0
         tx_octets: 0
         tx_64B_frames: 0
         tx_65_to_127B_frames: 0
         tx_128_to_255B_frames: 0
         tx_256_to_511B_frames: 0
         tx_512_to_1023B_frames: 0
         tx_1024B_frames: 0
         net_octets: 0
         rx_bottom_fifo_drop: 0
         rx_port_mask_drop: 0
         rx_top_fifo_drop: 0
         ale_rate_limit_drop: 0
         ale_vid_ingress_drop: 0
         ale_da_eq_sa_drop: 0
         ale_block_drop: 0
         ale_secure_drop: 0
         ale_auth_drop: 0
         ale_unknown_ucast: 0
         ale_unknown_ucast_bytes: 0
         ale_unknown_mcast: 0
         ale_unknown_mcast_bytes: 0
         ale_unknown_bcast: 0
         ale_unknown_bcast_bytes: 0
         ale_pol_match: 0
         ale_pol_match_red: 0
         ale_pol_match_yellow: 0
         ale_mcast_sa_drop: 0
         ale_dual_vlan_drop: 0
         ale_len_err_drop: 0
         ale_ip_next_hdr_drop: 0
         ale_ipv4_frag_drop: 0
         iet_rx_assembly_err: 0
         iet_rx_assembly_ok: 0
         iet_rx_smd_err: 0
         iet_rx_frag: 0
         iet_tx_hold: 0
         iet_tx_frag: 0
         tx_mem_protect_err: 0
         tx_pri0: 0
         tx_pri1: 0
         tx_pri2: 0
         tx_pri3: 0
         tx_pri4: 0
         tx_pri5: 0
         tx_pri6: 0
         tx_pri7: 0
         tx_pri0_bcnt: 0
         tx_pri1_bcnt: 0
         tx_pri2_bcnt: 0
         tx_pri3_bcnt: 0
         tx_pri4_bcnt: 0
         tx_pri5_bcnt: 0
         tx_pri6_bcnt: 0
         tx_pri7_bcnt: 0
         tx_pri0_drop: 0
         tx_pri1_drop: 0
         tx_pri2_drop: 0
         tx_pri3_drop: 0
         tx_pri4_drop: 0
         tx_pri5_drop: 0
         tx_pri6_drop: 0
         tx_pri7_drop: 0
         tx_pri0_drop_bcnt: 0
         tx_pri1_drop_bcnt: 0
         tx_pri2_drop_bcnt: 0
         tx_pri3_drop_bcnt: 0
         tx_pri4_drop_bcnt: 0
         tx_pri5_drop_bcnt: 0
         tx_pri6_drop_bcnt: 0
         tx_pri7_drop_bcnt: 0

    switch-config --ndev eth0 -d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):

    Is the ALE table empty?

  • Hi,

    &cpsw9g_virt_mac {
    status = "disabled";
    };

    We are disabling VirtMAC node because you are using Native Linux driver for CPSW9G (not EthFw based application).

    Question: why do I need the following in my DT?

    &main_r5fss0_core0 {
    firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };

    If SBL loads firmware into MCU2_0 then you no need to have above change, Usually Linux loads the firmware in MCU2_0 with EthFw binary mapped by default.
    So, we are mapping different firmware as CPSW9G to be configured by Linux as Native Linux driver.

    Also, What is the firmware running in MCU2_0? It should not be EthFw if you want to Native Linux driver for CPSW9G.

    switch-config --ndev eth0 -d
    K3 cpsw dump version (1) len(11704)
    ALE table dump ents(512):

    ALE table should not be empty.

    Also, can you please check internal delay configured at PHY?

    Best Regards,
    Sudheer

  • hello Sudheer,

    SBL is loading ipc_rtos_echo_testb_freertos_mcu1_0_release on mcu1_0 and ipc_echo_test_freertos_mcu2_0_release on muc2_0.

    This is actually the configuration I have in DT for the PHY

    cpsw9g_phy2: ethernet-phy@2 {
            reg = <2>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
            ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
            reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
    };

     

    This is the configuration that is working when I manage the eth interface from the mcu2_0 core:

    static const Dp83867_Cfg gEnetCBEBoard_dp83867PhyCfg =
    {
    .txClkShiftEn = true,
    .rxClkShiftEn = true,
    .txDelayInPs = 3000U, /* 2.75 ns */
    .rxDelayInPs = 2000U, /* 2.50 ns */
    .txFifoDepth = 4U,
    .idleCntThresh = 4U, /* Improves short cable performance */
    .impedanceInMilliOhms = 35000, /* 35 ohms */
    .gpio0Mode = DP83867_GPIO0_LED3,
    .gpio1Mode = DP83867_GPIO1_COL, /* Unused */
    .ledMode =
    {
    DP83867_LED_LINKED, /* Unused */
    DP83867_LED_LINKED_100BTX,
    DP83867_LED_RXTXACT,
    DP83867_LED_LINKED_1000BT,
    },
    };

  • Hi,

    Is GPIO control for PHY reset is same in EthFw and Linux device tree?

    Also, what is the MAC Port configuration used in mcu2_0 core EthFw application?

    Best Regards,
    Sudheer

  • Hi Sudheer,
    I never used nor loaded EthFw so far. I was starting with eth mapped on CPSW9G port-8 managed by mcu2_0 with lwip TCP/IP stack (enet_lwip_example_freertos_mcu2_0_release sample code). The configuration of the MAC was the following

    static const EnetBoard_PortCfg gEnetCBEBoard_j721eEthPort[] =
    {
    { /* "MCU_ENET" */
    .enetType = ENET_CPSW_9G,
    .instId = 0U,
    .macPort = ENET_MAC_PORT_8,
    .mii = { ENET_MAC_LAYER_GMII, ENET_MAC_SUBLAYER_REDUCED },
    .phyCfg =
    {
    .phyAddr = 0U,
    .isStrapped = false,
    .skipExtendedCfg = false,
    .extendedCfg = &gEnetCBEBoard_dp83867PhyCfg,
    .extendedCfgSize = sizeof(gEnetCBEBoard_dp83867PhyCfg),
    },
    .sgmiiMode = ENET_MAC_SGMIIMODE_INVALID,
    .linkCfg = { ENET_SPEED_AUTO, ENET_DUPLEX_AUTO },
    .flags = ENETBOARD_J7XEVM_CPSW9G_MDIO_MUX,
    },
    };

    I don't remember why in this structure I has to set phyAddr to 0 but I'm sure the correct address for phy is 2. I can confirm the GPIO used in linux is the one physically connected to the phy rst 

  • Hi,

    Thank you for sharing the details.

    I don't remember why in this structure I has to set phyAddr to 0 but I'm sure the correct address for phy is 2

    If you are using PHY address 0 in lwip example test (which you confirmed Port-8 is working) then PHY address will be 0.

    Can you please configure PHY address 0 in Linux device tree file and check once.
    Also, it is not observed that Port Link up with PHY address 2, in above Kernel log.

    Best Regards,
    Sudheer

  • Hi Sudheer,
    I've applied the following Device Tree

    &cpsw0_port8 {
    phy-handle = <&cpsw9g_phy2>;
    phy-mode = "rgmii-rxid";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 8>;
    };

    &cpsw9g_mdio {
    bus_freq = <1000000>;
    #address-cells = <1>;
    #size-cells = <0>;

    cpsw9g_phy2: ethernet-phy@2 {
    reg = <2>;
    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
    ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    ti,min-output-impedance;
    reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
    };
    };

    ... and I got the folllowing error. It seems no device is seen at address 0.

    [ 1.090718] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 25, base_baud = 3000000) is a 8250
    [ 1.099702] 2830000.serial: ttyS5 at MMIO 0x2830000 (irq = 26, base_baud = 3000000) is a 8250
    [ 1.112465] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.156001] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.163885] mdio_bus c000f00.mdio: MDIO device at address 0 is missing.

    If I configure address 2 that error is not diaplayed but ethernet link is down

  • Sorry. This is the device tree I've applied

    &cpsw0_port8 {
    phy-handle = <&cpsw9g_phy0>;
    phy-mode = "rgmii-rxid";
    mac-address = [00 00 00 00 00 00];
    phys = <&cpsw0_phy_gmii_sel 8>;
    };

    &cpsw9g_mdio {
    bus_freq = <1000000>;
    #address-cells = <1>;
    #size-cells = <0>;

    cpsw9g_phy0: ethernet-phy@0 {
    reg = <0>;
    ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
    ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
    ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    ti,min-output-impedance;
    reset-gpios = <&main_gpio0 17 GPIO_ACTIVE_HIGH>;
    };
    };

    and it is producing the error: [    1.163885] mdio_bus c000f00.mdio: MDIO device at address 0 is missing.

  • Hi Sergio,

    Can you try put the "reset-gpios" properties in the cpsw9g_mdio node.

    From what I can see, MDIO is probed multiple times in your setup. Ideally, it should be probed only once. Also, it is not detecting any phy at address 2.

    Regards,
    Tanmay

  • Hi Tanmay, Great !! Now it is working. The PHY device it is properly detected at address <2>

    [ 1.390547] davinci_mdio c000f00.mdio: Configuring MDIO in manual mode
    [ 1.436901] davinci_mdio c000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [ 1.445347] davinci_mdio c000f00.mdio: phy[2]: device c000f00.mdio:02, driver TI DP83867

    .. and I can see just a single probe on the bus

    I can ping from ethernet my external PC. In the end, in order to have everything working fine, I had to remove the  "reset-gpios" properties. On my card the PHY is put out of the reeset directly by the hardware. It would be interesting in any case for me to understand what the correct configuration would be even though I do not really need to control that gpio at startup.

    I have another question. In order to have ethernet working properly on A72 as native (non virtual) interface, is it mandatory to have a software running on mcu2_0? Actually I have but when I started my experimentation the mcu2_0 was not loaded with any software.

    Thanks for the great support and for the patience.

  • Hi Sergio,

    I have another question. In order to have ethernet working properly on A72 as native (non virtual) interface, is it mandatory to have a software running on mcu2_0? Actually I have but when I started my experimentation the mcu2_0 was not loaded with any software.

    No, its not necessary to any software running on mcu2_0. We use the ipc echo example for demonstration purposes.

    Regards,
    Tanmay

  • Many thanks Tanmay for all the support. I consider closed this thread.

    Sergio