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.

66AK2E05: 66AK2E05: How to Configure gbe interfaces as switch.

Part Number: 66AK2E05

Hello,

I am trying to configure Keystone TI Common Platform Ethernet Switch (CPSW). I am using EVMK2E Development Board with the default kernel - device tree.

Following instructions found at https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW.html i managed to build a new kernel with enabled TI CPSW SWITCH SUPPORT and 802.1Q VLAN Support.

Load address: 0x88000000
Loading: ######
done
Bytes transferred = 27071 (69bf hex)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fff0000, end 8ffffe48 ... OK
   Loading Device Tree to 8ffe6000, end 8ffef9be ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.94+ (ide@tmssrv) (gcc version 8.4.0 (Buildroot 2020.11.1)) #1 S
MP PREEMPT Mon Dec 5 16:34:44 EET 2022
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Texas Instruments Keystone 2 Edison EVM
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Switching physical address space to 0x800000000
[    0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, size 8 MiB
[    0.000000] OF: reserved mem: initialized node dsp-common-memory@81f800000, compatible id shar
ed-dma-pool
[    0.000000] cma: Reserved 16 MiB at 0x000000087ec00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0xa4/0x4a0 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s32588 r8192 d20660 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 982016
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 mtdparts=spi0.0:1m(u-boot-s
pl)ro,-(misc) rootfstype=nfs root=/dev/nfs rw nfsroot=/srv/nfsCCM,v3,tcp,rsize=4096,wsize=4096 ip
=10.10.10.171:10.10.10.196:10.10.10.1:255.255.255.0:k2e-evm-2:eth0:off:10.10.10.1 nfsrootdebug
[    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] log_buf_len min size: 16384 bytes
[    0.000000] log_buf_len: 32768 bytes
[    0.000000] early log buf free: 14268(87%)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 3860992K/3932160K available (8192K kernel code, 448K rwdata, 2348K rodata,
 2048K init, 197K bss, 46592K reserved, 24576K cma-reserved, 3391488K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 449 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 198 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 233.33MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x6ba0ac50b7, ma
x_idle_ns: 881590427583 ns
[    0.000003] sched_clock: 56 bits at 233MHz, resolution 4ns, wraps every 4398046511102ns
[    0.000012] Switching to timer-based delay loop, resolution 4ns
[    0.000125] keystone timer clock @233333333 Hz
[    0.000248] Console: colour dummy device 80x30
[    0.000270] Calibrating delay loop (skipped), value calculated using timer frequency.. 466.66 
BogoMIPS (lpj=2333333)
[    0.000280] pid_max: default: 4096 minimum: 301
[    0.000357] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000366] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000687] CPU: Testing write buffer coherency: ok
[    0.000707] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system 
vulnerable
[    0.000867] /cpus/cpu@0 missing clock-frequency property
[    0.000884] /cpus/cpu@1 missing clock-frequency property
[    0.000901] /cpus/cpu@2 missing clock-frequency property
[    0.000918] /cpus/cpu@3 missing clock-frequency property
[    0.000926] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060025] Setting up static identity map for 0x80200000 - 0x80200138
[    0.080025] rcu: Hierarchical SRCU implementation.
[    0.120059] smp: Bringing up secondary CPUs ...
[    0.204334] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.204340] CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system 
vulnerable
[    0.284412] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.284417] CPU2: Spectre v2: firmware did not set auxiliary control register IBE bit, system 
vulnerable
[    0.364487] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.364492] CPU3: Spectre v2: firmware did not set auxiliary control register IBE bit, system 
vulnerable
[    0.364608] smp: Brought up 1 node, 4 CPUs
[    0.364617] SMP: Total of 4 processors activated (1866.66 BogoMIPS).
[    0.364623] CPU: All CPU(s) started in HYP mode.
[    0.364629] CPU: Virtualization extensions available.
[    0.364976] devtmpfs: initialized
[    0.368273] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.368531] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191126
04462750000 ns
[    0.368542] futex hash table entries: 16 (order: -2, 1024 bytes)
[    0.368840] pinctrl core: initialized pinctrl subsystem
[    0.369218] NET: Registered protocol family 16
[    0.369922] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.370938] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.370946] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.386615] vgaarb: loaded
[    0.386860] SCSI subsystem initialized
[    0.387192] usbcore: registered new interface driver usbfs
[    0.387263] usbcore: registered new interface driver hub
[    0.387345] usbcore: registered new device driver usb
[    0.389414] clocksource: Switched to clocksource arch_sys_counter
[    0.426861] NET: Registered protocol family 2
[    0.427196] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.427215] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.427242] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.427290] TCP: Hash tables configured (established 4096 bind 4096)
[    0.427343] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.427359] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.427451] NET: Registered protocol family 1
[    0.427695] RPC: Registered named UNIX socket transport module.
[    0.427702] RPC: Registered udp transport module.
[    0.427708] RPC: Registered tcp transport module.
[    0.427714] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.427821] Unpacking initramfs...
[    0.431208] Freeing initrd memory: 64K
[    0.431419] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    0.431631] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    0.432163] platform alarmtimer: set dma_pfn_offset00780000
[    0.433360] workingset: timestamp_bits=30 max_order=20 bucket_order=0
[    0.440516] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.440674] ntfs: driver 2.1.32 [Flags: R/O].
[    0.440973] jffs2: version 2.2. (NAND) ?? 2001-2006 Red Hat, Inc.
[    0.443480] NET: Registered protocol family 38
[    0.443516] bounce: pool size: 64 pages
[    0.443578] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.443587] io scheduler noop registered
[    0.443593] io scheduler deadline registered
[    0.443614] io scheduler cfq registered (default)
[    0.443621] io scheduler mq-deadline registered
[    0.443627] io scheduler kyber registered
[    0.443866] keystone_irq 26202a0.keystone_irq: irqchip registered, nr_irqs 28
[    0.445615] keystone-pcie 21020000.pcie: host bridge /soc@0/pcie@21020000 ranges:
[    0.445641] keystone-pcie 21020000.pcie:    IO 0x60000000..0x600fffff -> 0x00000000
[    0.445656] keystone-pcie 21020000.pcie:   MEM 0x60100000..0x6fffffff -> 0x60100000
[    1.439421] keystone-pcie 21020000.pcie: Phy link never came up
[    1.439540] keystone-pcie 21020000.pcie: PCI host bridge to bus 0000:00
[    1.439551] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.439559] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    1.439567] pci_bus 0000:00: root bus resource [mem 0x60100000-0x6fffffff]
[    1.440884] PCI: bus0: Fast back to back transfers disabled
[    1.442022] PCI: bus1: Fast back to back transfers enabled
[    1.442050] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.442975] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 0, number of queues 8
192
[    1.443080] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 0, num of queue
s 8192, reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_pus
h (ptrval), reg_pop (ptrval)
[    1.443200] keystone-navigator-qmss soc@0:qmss@2a40000: firmware file ks2_qmss_pdsp_acc48.bin 
downloaded for PDSP
[    1.445406] keystone-navigator-dma soc@0:knav_dmas@0: DMA dma_gbe registered 149 logical chann
els, flows 128, tx chans: 21, rx chans: 91
[    1.493732] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.493786] platform serial8250: set dma_pfn_offset00780000
[    1.495298] console [ttyS0] disabled
[    1.495338] 2530c00.serial: ttyS0 at MMIO 0x2530c00 (irq = 27, base_baud = 14583333) is a TI D
A8xx/66AK2x
[    2.359484] console [ttyS0] enabled
[    2.363635] 2531000.serial: ttyS1 at MMIO 0x2531000 (irq = 28, base_baud = 14583333) is a TI D
A8xx/66AK2x
[    2.379107] loop: module loaded
[    2.383141] at24 0-0050: 131072 byte 24c1024 EEPROM, writable, 1 bytes/write
[    2.391302] spi_davinci 21000400.spi: DMA is not supported (-19)
[    2.398034] m25p80 spi0.0: n25q128a11 (16384 Kbytes)
[    2.403031] 2 cmdlinepart partitions found on MTD device spi0.0
[    2.408962] Creating 2 MTD partitions on "spi0.0":
[    2.413776] 0x000000000000-0x000000100000 : "u-boot-spl"
[    2.419808] 0x000000100000-0x000001000000 : "misc"
[    2.425223] spi_davinci 21000400.spi: Controller at 0x(ptrval)
[    2.431284] spi_davinci 21000600.spi: DMA is not supported (-19)
[    2.437565] spi_davinci 21000600.spi: Controller at 0x(ptrval)
[    2.443627] spi_davinci 21000800.spi: DMA is not supported (-19)
[    2.449922] spi_davinci 21000800.spi: Controller at 0x(ptrval)
[    2.455985] platform Fixed MDIO bus.0: set dma_pfn_offset00780000
[    2.462264] libphy: Fixed MDIO Bus: probed
[    2.519426] davinci_mdio 24200f00.mdio: davinci mdio revision 1.7, bus freq 2500000
[    2.527100] libphy: 24200f00.mdio: probed
[    2.532491] davinci_mdio 24200f00.mdio: phy[0]: device 24200f00.mdio:00, driver Marvell 88E151
0
[    2.541226] davinci_mdio 24200f00.mdio: phy[1]: device 24200f00.mdio:01, driver Marvell 88E151
0
[    5.562972] netcp-1.0 2620110.netcp: initialized cpsw ale version 1.4
[    5.569438] netcp-1.0 2620110.netcp: ALE Table size 8192
[    5.575655] netcp-1.0 2620110.netcp: module(netcp-xgbe) not used for device
[    5.582745] keystone-usbphy 2620738.usb_phy: 2620738.usb_phy supply vcc not found, using dummy
 regulator
[    5.592298] keystone-usbphy 2620738.usb_phy: Linked as a consumer to regulator.0
[    5.599838] keystone-usbphy 2620750.usb_phy: 2620750.usb_phy supply vcc not found, using dummy
 regulator
[    5.609373] keystone-usbphy 2620750.usb_phy: Linked as a consumer to regulator.0
[    5.617660] dwc3 2690000.dwc3: Failed to get clk 'ref': -2
[    5.623368] platform xhci-hcd.0.auto: set dma_pfn_offset00780000
[    5.629914] dwc3 25010000.dwc3: Failed to get clk 'ref': -2
[    5.635527] dwc3 25010000.dwc3: Configuration mismatch. dr_mode forced to host
[    5.642865] platform xhci-hcd.1.auto: set dma_pfn_offset00780000
[    5.649910] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.655535] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    5.663397] xhci-hcd xhci-hcd.0.auto: hcc params 0x0298f06d hci version 0x100 quirks 0x0000000
002010010
[    5.672833] xhci-hcd xhci-hcd.0.auto: irq 35, io mem 0x02690000
[    5.679005] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    5.687302] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.694551] usb usb1: Product: xHCI Host Controller
[    5.699447] usb usb1: Manufacturer: Linux 4.19.94+ xhci-hcd
[    5.705029] usb usb1: SerialNumber: xhci-hcd.0.auto
[    5.710261] hub 1-0:1.0: USB hub found
[    5.714035] hub 1-0:1.0: 1 port detected
[    5.718227] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.723862] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    5.731553] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    5.738136] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.746334] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    5.754628] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.761876] usb usb2: Product: xHCI Host Controller
[    5.766763] usb usb2: Manufacturer: Linux 4.19.94+ xhci-hcd
[    5.772355] usb usb2: SerialNumber: xhci-hcd.0.auto
[    5.777559] hub 2-0:1.0: USB hub found
[    5.781351] hub 2-0:1.0: 1 port detected
[    5.785623] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.791258] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    5.799099] xhci-hcd xhci-hcd.1.auto: hcc params 0x0298f06d hci version 0x100 quirks 0x0000000
002010010
[    5.808534] xhci-hcd xhci-hcd.1.auto: irq 69, io mem 0x25010000
[    5.814699] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    5.823064] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.830315] usb usb3: Product: xHCI Host Controller
[    5.835201] usb usb3: Manufacturer: Linux 4.19.94+ xhci-hcd
[    5.840795] usb usb3: SerialNumber: xhci-hcd.1.auto
[    5.846005] hub 3-0:1.0: USB hub found
[    5.849791] hub 3-0:1.0: 1 port detected
[    5.853974] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.859600] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    5.867278] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    5.873873] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.882075] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    5.890442] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.897680] usb usb4: Product: xHCI Host Controller
[    5.902578] usb usb4: Manufacturer: Linux 4.19.94+ xhci-hcd
[    5.908161] usb usb4: SerialNumber: xhci-hcd.1.auto
[    5.913373] hub 4-0:1.0: USB hub found
[    5.917146] hub 4-0:1.0: 1 port detected
[    5.921537] usbcore: registered new interface driver usb-storage
[    5.927711] i2c /dev entries driver
[    5.932298] davinci-wdt 22f0080.wdt: heartbeat 60 sec
[    5.938086] sdhci: Secure Digital Host Controller Interface driver
[    5.944292] sdhci: Copyright(c) Pierre Ossman
[    5.948792] sdhci-pltfm: SDHCI platform and OF driver helper
[    5.954763] ledtrig-cpu: registered to indicate activity on CPUs
[    5.961435] usbcore: registered new interface driver usbhid
[    5.967018] usbhid: USB HID core driver
[    5.971670] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
[    5.978038] nand: Micron MT29F4G08ABBDAH4
[    5.982066] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.989934] Bad block table found at page 262080, version 0x01
[    5.996236] Bad block table found at page 262016, version 0x01
[    6.002375] 3 fixed-partitions partitions found on MTD device 30000000.nand
[    6.009350] Creating 3 MTD partitions on "30000000.nand":
[    6.014774] 0x000000000000-0x000000100000 : "u-boot"
[    6.020399] 0x000000100000-0x000000180000 : "params"
[    6.025957] 0x000000180000-0x000020000000 : "ubifs"
[    6.034677] davinci_nand 30000000.nand: controller rev. 2.5
[    6.040567] platform oprofile-perf.0: set dma_pfn_offset00780000
[    6.046903] oprofile: using timer interrupt.
[    6.051809] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    6.057655] gre: GRE over IPv4 demultiplexor driver
[    6.062555] ip_gre: GRE over IPv4 tunneling driver
[    6.068470] ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
[    6.074904] Initializing XFRM netlink socket
[    6.079417] (NULL net_device): Link is Down
[    6.083609] (NULL net_device): Link is Down
[    6.087797] (NULL net_device): Link is Down
[    6.091994] (NULL net_device): Link is Down
[    6.096183] (NULL net_device): Link is Down
[    6.100380] (NULL net_device): Link is Down
[    6.105112] NET: Registered protocol family 10
[    6.110451] Segment Routing with IPv6
[    6.114174] NET: Registered protocol family 17
[    6.118634] NET: Registered protocol family 15
[    6.123099] 8021q: 802.1Q VLAN Support v1.8
[    6.127322] sctp: Hash tables configured (bind 512/512)
[    6.132886] Registering SWP/SWPB emulation handler
[    6.262006] netcp-1.0 2620110.netcp eth0: Link is Down
[    6.283144] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.289003] 8021q: adding VLAN 0 to HW filter on device eth0
[    8.490471] netcp-1.0 2620110.netcp eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    8.509431] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.549472] IP-Config: Complete:
[    8.552707]      device=eth0, hwaddr=b4:99:4c:09:60:58, ipaddr=10.10.10.171, mask=255.255.255.
0, gw=10.10.10.1
[    8.562770]      host=k2e-evm-2, domain=, nis-domain=(none)
[    8.568354]      bootserver=10.10.10.196, rootserver=10.10.10.196, rootpath=
[    8.568356]      nameserver0=10.10.10.1
[    8.607514] VFS: Mounted root (nfs filesystem) on device 0:14.
[    8.614003] devtmpfs: mounted
[    8.617918] Freeing unused kernel memory: 2048K
[    8.622573] Run /sbin/init as init process
[    8.640641] random: fast init done
Starting rsyslogd: OK
Running sysctl: OK
Populating /dev using udev: done
Initializing random number generator: OK
Saving random seed: OK
Starting rngd: OK
Starting system message bus: done
Starting NetworkManager ... done.
Starting dropbear sshd: OK
Starting DHCP server: FAIL
Starting domain name daemon: OK


CCM READY!

When i try to enable interrup pacing using ethtool i get the following error:

eth0      Link encap:Ethernet  HWaddr B4:99:4C:09:60:58  
          inet addr:10.10.10.171  Bcast:10.10.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21241 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16892 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26824035 (25.5 MiB)  TX bytes:2207426 (2.1 MiB)

eth125    Link encap:Ethernet  HWaddr 02:18:31:7E:3E:00  
          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
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:58 (58.0 B)  TX bytes:58 (58.0 B)

root@ccm:~# ./ethtool -C eth0 rx-usecs 50
Cannot get device coalesce settings: Operation not supported

I also face a problem with the Switch Config Commands example tool.

Scanning dependencies of target cpsw-ioctl
[100%] Building C object cpsw-ioctl/CMakeFiles/cpsw-ioctl.dir/src/cpsw-ioctl.c.o
cpsw-ioctl/src/cpsw-ioctl.c: In function ‘main’:
cpsw-ioctl/src/cpsw-ioctl.c:73:23: error: ‘SIOCSWITCHCONFIG’ undeclared (first use in this function); did you mean ‘TIOCSERCONFIG’?
     if (ioctl(sockfd, SIOCSWITCHCONFIG, &ifr) < 0) {
                       ^~~~~~~~~~~~~~~~
                       TIOCSERCONFIG
cpsw-ioctl/src/cpsw-ioctl.c:73:23: note: each undeclared identifier is reported only once for each function it appears in

  1. Is the enabling of TI CPSW SWITCH SUPPORT and 802.1Q VLAN Support in menuconfig enough or i need to do more in order to enable the SWITCH?
  2. Do i need to change the default device tree? is there any example i could use ?
  3. Is there any switch config commands tool that i could use ?

If you need any further information please let me know.

Yours sincerely,

Konstantinos.

  • Konstantinos,

    Rajarajan is working on your query.

    He will give his suggestion as early as possible.

    Thanks for your patience.

    Regards

    Shankari G

  • Hi Konstantinos,

    Thanks for your patience,

    When i try to enable interrup pacing using ethtool i get the following error:

    "Interrupt pacing" is not implemented by default. The implementation in Linux CPSW driver can be taken as reference “drivers/net/ethernet/ti/cpsw.c”.  Note that Interrupt pacing is not directly supported for CPSW interrupts due to the Silicon errata “Advisory 1.0.9”, on Page 15.0513.sprz360i.pdf

    The default config of K2E looks like this, "${SDK Folder}/board-support/linux-4.19.94-{COMMITID}/arch/arm/config/tisdk_k2e-evm_defconfig"

    CONFIG_TI_CPSW_ALE=y

    However, We can add CPSW configs,

    CONFIG_TI_CPSW_PHY_SEL=y
    CONFIG_TI_CPSW_ALE=y
    CONFIG_TI_CPSW=y

    and give the following commands

    //export the compiler path
    export PATH=<sdk path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    
    //copy def config to .config file
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_k2e-evm_defconfig
    
    //compile using .config file into zImage
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
    
    

    Once zImage is loaded, give the following command to verify the CPSW configs are included in the driver.

    zcat /proc/config.gz | grep CPSW

    Only then, "ethtool" can call "cpsw_set_coalesce()" in "${SDK Folder}/board-support/linux-4.19.94-{COMMITID}/drivers/net/ethernet/ti/cpsw.c".

    I don't think "Interrupt Pacing" will be disabled by the NIC of K2E. I will try these steps in parallel and update. Please do these changes and provide your feedback.

    Thanks,

    Rajarajan U

  • Hi Rajarajan,

    I followed your recommendations and now all "CONFIG_TI_CPSW_..." are indeed added.

    I triedzcat /proc/config.gz | grep CPSW

    and got:

    CONFIG_TI_CPSW_PHY_SEL=y
    CONFIG_TI_CPSW_ALE=y
    CONFIG_TI_CPSW=y

     

    Unfortunately ethtool still does not work.

    Is there something i am missing ?? 

    Thank you,

    Konstantinos Ilias.

  • Hi Konstantinos,

    Will check with my EVM and provide an update.

    Thanks

    Rajarajan U

  • Mr Rajarajan, do you have any update ? 

  • Hi Konstantinos,

    I am held up with another task, I will resume to looking into this after 2-3 days.

    Thanks,

    Rajarajan U

  • Mr Rajarajan,

    I also face an issue with the ioctl part of the configuration.

    I managed to compile it and make it work, but i get Operation not supported whenever i try ioctl(sockfd, SIOCSWITCHCONFIG, &ifr); command 

    Do you have any comments about this also, do you need further information ? 

    I added the code below.

    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <string.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <arpa/inet.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #include <sys/ioctl.h>
    #include <net/if.h>
    
    #include <stdio.h>
    #include <asm/sockios.h>
    #include <net/if.h>
    #include <string.h>
    #include <linux/sockios.h>
    #include <errno.h>
    
    #include "net_switch_config.h"
    
    
    
    int main(void)
    {
        struct net_switch_config cmd_struct;
        struct ifreq ifr;
        int sockfd;
        int16_t retVal =-100;
    
        strncpy(ifr.ifr_name, "eth0", IFNAMSIZ);
    
        ifr.ifr_data = (char*)&cmd_struct;
    
        if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
            printf("[IDE:]Can't open the socket\n");
            return -1;
        }
        else{
            printf("[IDE:]socket openeed sucesfully \n");
        }
    
        memset(&cmd_struct, 0, sizeof(struct net_switch_config));
    
        //...//initialise cmd_struct with switch commands
    
        cmd_struct.cmd = CONFIG_SWITCH_GET_PORT_CONFIG;
    
        ifr.ifr_data = (char*)&cmd_struct;
    
        retVal = ioctl(sockfd, SIOCSWITCHCONFIG, &ifr);
    
        if (retVal < 0) {
            printf("Command CONFIG_SWITCH_GET_PORT_CONFIG port =0 failed\n");
    
            perror("retVal");
    
            close(sockfd);
    
            return -1;
        }
        else{
            printf("Command CONFIG_SWITCH_GET_PORT_CONFIG port =0 Succeeded\n");
        }
    
        printf("command success\n");
        close(sockfd);
        return 0;
    }
    
    

    i am looking forward for your reply.

  • Hi Konstantinos,

    I will look into the "ioctl" operation and get back to you.

    Thanks,

    Rajarajan U

  • Hi Konstantinos,

    I believe that might be a bug in Kernel and it was reported in the following git page:

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/?h=ti-linux-5.10.y&id=91ea70eb3334d9d5b2c9ea13b274bbeb5bc678f9&context=3&ignorews=0&dt=0

    The fix has been included in the ti-Linux kernel 5.10 and the kernel version which comes with the SDK Linux is "4.19.94". Do try this version of the kernel and provide your update.

    I managed to compile it and make it work, but i get Operation not supported whenever i try ioctl(sockfd, SIOCSWITCHCONFIG, &ifr); command 

    I believe due to the kernel issue, "ioctl" could not allow the device to control the ethernet port.

    Thanks,

    Rajarajan U

  • Mr Rajarajan,

    Thanks for your reply, i already did a test backporting some files from kernel 5.10 to 4.19 but it did not fix my issue, i will try with kernel 5.10 and give you a feedback. 

    My biggest issue right now is about the device tree. 

    I did not find any examples for configuring netcp as switch using device tree.

    keystone-k2e-netcp.dtsi

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Device Tree Source for Keystone 2 Edison Netcp driver
     *
     * Copyright (C) 2015-2017 Texas Instruments Incorporated - http://www.ti.com/
     */
    
    qmss: qmss@2a40000 {
    	compatible = "ti,keystone-navigator-qmss";
    	dma-coherent;
    	#address-cells = <1>;
    	#size-cells = <1>;
    	clocks = <&chipclk13>;
    	ranges;
    	queue-range	= <0 0x2000>;
    	linkram0	= <0x100000 0x4000>;
    	linkram1	= <0 0x10000>;
    
    	qmgrs {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges;
    		qmgr0 {
    			managed-queues = <0 0x2000>;
    			reg = <0x2a40000 0x20000>,
    			      <0x2a06000 0x400>,
    			      <0x2a02000 0x1000>,
    			      <0x2a03000 0x1000>,
    			      <0x23a80000 0x20000>,
    			      <0x2a80000 0x20000>;
    			reg-names = "peek", "status", "config",
    				    "region", "push", "pop";
    		};
    	};
    	queue-pools {
    		qpend {
    			qpend-0 {
    				qrange = <658 8>;
    				interrupts =<0 40 0xf04 0 41 0xf04 0 42 0xf04
    					     0 43 0xf04 0 44 0xf04 0 45 0xf04
    					     0 46 0xf04 0 47 0xf04>;
    			};
    			qpend-1 {
    				qrange = <528 16>;
    				interrupts = <0 48 0xf04 0 49 0xf04 0 50 0xf04
    					      0 51 0xf04 0 52 0xf04 0 53 0xf04
    					      0 54 0xf04 0 55 0xf04 0 56 0xf04
    					      0 57 0xf04 0 58 0xf04 0 59 0xf04
    					      0 60 0xf04 0 61 0xf04 0 62 0xf04
    					      0 63 0xf04>;
    				qalloc-by-id;
    			};
    			qpend-2 {
    				qrange = <544 16>;
    				interrupts = <0 64 0xf04 0 65 0xf04 0 66 0xf04
    					      0 59 0xf04 0 68 0xf04 0 69 0xf04
    					      0 70 0xf04 0 71 0xf04 0 72 0xf04
    					      0 73 0xf04 0 74 0xf04 0 75 0xf04
    					      0 76 0xf04 0 77 0xf04 0 78 0xf04
    					      0 79 0xf04>;
    			};
    		};
    		general-purpose {
    			gp-0 {
    				qrange = <4000 64>;
    			};
    			netcp-tx {
    				qrange = <896 128>;
    				qalloc-by-id;
    			};
    		};
    		accumulator {
    			acc-low-0 {
    				qrange = <480 32>;
    				accumulator = <0 47 16 2 50>;
    				interrupts = <0 226 0xf01>;
    				multi-queue;
    				qalloc-by-id;
    			};
    		};
    	};
    
    	descriptor-regions {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges;
    		region-12 {
    			id = <12>;
    			region-spec = <8192 128>;	/* num_desc desc_size */
    			link-index = <0x4000>;
    		};
    	};
    
    	pdsps {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges;
    		pdsp0@2a10000 {
    			reg = <0x2a10000 0x1000    /*iram */
    			       0x2a0f000 0x100     /*reg*/
    			       0x2a0c000 0x3c8	   /*intd */
    			       0x2a20000 0x4000>;  /*cmd*/
    			id = <0>;
    		};
    	};
    }; /* qmss */
    
    knav_dmas: knav_dmas@0 {
    	compatible = "ti,keystone-navigator-dma";
    	clocks = <&papllclk>;
    	#address-cells = <1>;
    	#size-cells = <1>;
    	ranges;
    	ti,navigator-cloud-address = <0x23a80000 0x23a90000
    				 0x23a80000 0x23a90000>;
    
    	dma_gbe: dma_gbe@0 {
    		reg = <0x24186000 0x100>,
    			  <0x24187000 0x2a0>,
    			  <0x24188000 0xb60>,
    			  <0x24186100 0x80>,
    			  <0x24189000 0x1000>;
    		reg-names = "global", "txchan", "rxchan",
    				"txsched", "rxflow";
    		ti,enable-all;
    	};
    };
    
    gbe_subsys: subsys@24200000 {
    	compatible = "syscon";
    	reg = <0x24200000 0x100>;
    };
    
    gbe_serdes0: phy@232a000 {
    	compatible		= "ti,keystone-serdes-gbe";
    	reg			= <0x0232a000 0x2000>;
    	status			= "disabled";
    	link-rate-kbps		= <1250000>;
    	num-lanes		= <4>;
    	#address-cells	= <1>;
    	#size-cells	= <0>;
    
    	serdes0_lane0: lane@0 {
    		#phy-cells	= <0>;
    		reg		= <0>;
    		status		= "ok";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes0_lane1: lane@1 {
    		#phy-cells	= <0>;
    		reg		= <1>;
    		status		= "ok";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes0_lane2: lane@2 {
    		#phy-cells	= <0>;
    		reg		= <2>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes0_lane3: lane@3 {
    		#phy-cells	= <0>;
    		reg		= <3>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    };
    
    gbe_serdes1: phy@2324000 {
    	compatible		= "ti,keystone-serdes-gbe";
    	reg			= <0x02324000 0x2000>;
    	status			= "disabled";
    	link-rate-kbps		= <1250000>;
    	num-lanes		= <4>;
    	#address-cells	= <1>;
    	#size-cells	= <0>;
    
    	serdes1_lane0: lane@0 {
    		#phy-cells	= <0>;
    		reg		= <0>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes1_lane1: lane@1 {
    		#phy-cells	= <0>;
    		reg		= <1>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes1_lane2: lane@2 {
    		#phy-cells	= <0>;
    		reg		= <2>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    	serdes1_lane3: lane@3 {
    		#phy-cells	= <0>;
    		reg		= <3>;
    		status		= "disabled";
    		control-rate	= <2>;
    		rx-start	= <7 5>;
    		rx-force	= <1 1>;
    		tx-coeff	= <0 0 0 12 4>;
    	};
    };
    
    netcp: netcp@24000000 {
    	reg = <0x2620110 0x8>;
    	reg-names = "efuse";
    	compatible = "ti,cpsw", "ti,netcp-1.0";
    	#address-cells = <1>;
    	#size-cells = <1>;
    
    	/* NetCP address range */
    	ranges = <0 0x24000000 0x1000000>;
    
    	clocks = <&clkpa>, <&clkcpgmac>, <&chipclk12>;
    	/*clock-names = "pa_clk", "ethss_clk", "cpts";*/
    	clock-names = "fck", "ethss_clk", "cpts";
    
    	dma-coherent;
    
    	ti,navigator-dmas = <&dma_gbe 0>,
    			<&dma_gbe 8>,
    			<&dma_gbe 0>;
    	ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
    
    	slaves = <2>;
    	active_slave = <0>;
    	cpdma_channels = <8>;
    	ale_entries = <1024>;	
    	mac_control = <0x20>;
    	bd_ram_size = <0x2000>;
    
    	netcp-devices {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges;
    		gbe@200000 { /* ETHSS */
    			label = "netcp-gbe";
    			/*compatible = "ti,netcp-gbe-9", "ti,cpsw";*/
    			compatible = "ti,netcp-xgbe";
    			syscon-subsys = <&gbe_subsys>;
    			reg = <0x200100 0x800>, <0x220000 0x20000>;
    			tx-queue = <896>;
    			tx-channel = "nettx";
    
    			interfaces {
    				gbe0: interface-0 {
    					phys		= <&serdes0_lane0>;
    					slave-port	= <0>;
    					link-interface	= <1>;
    					phy-handle	= <&ethphy0>;
    				};
    				gbe1: interface-1 {
    					phys		= <&serdes0_lane1>;
    					slave-port	= <1>;
    					link-interface	= <1>;
    					phy-handle	= <&ethphy1>;
    				};
    			};
    
    			secondary-slave-ports {
    				port-2 {
    					phys = <&serdes0_lane2>;
    					slave-port = <2>;
    					link-interface	= <2>;
    				};
    				port-3 {
    					phys = <&serdes0_lane3>;
    					slave-port = <3>;
    					link-interface	= <2>;
    				};
    				port-4 {
    					phys = <&serdes1_lane0>;
    					slave-port = <4>;
    					link-interface	= <2>;
    				};
    				port-5 {
    					phys = <&serdes1_lane1>;
    					slave-port = <5>;
    					link-interface	= <2>;
    				};
    				port-6 {
    					phys = <&serdes1_lane2>;
    					slave-port = <6>;
    					link-interface	= <2>;
    				};
    				port-7 {
    					phys = <&serdes1_lane3>;
    					slave-port = <7>;
    					link-interface	= <2>;
    				};
    			};
    		};
    	};
    
    	netcp-interfaces {
    		interface-0 {
    			rx-channel = "netrx0";
    			rx-pool = <1024 12>;
    			tx-pool = <1024 12>;
    			rx-queue-depth = <128 128 0 0>;
    			rx-buffer-size = <1518 4096 0 0>;
    			rx-queue = <528>;
    			tx-completion-queue = <530>;
    			efuse-mac = <1>;
    			netcp-gbe = <&gbe0>;
    
    		};
    		interface-1 {
    			rx-channel = "netrx1";
    			rx-pool = <1024 12>;
    			tx-pool = <1024 12>;
    			rx-queue-depth = <128 128 0 0>;
    			rx-buffer-size = <1518 4096 0 0>;
    			rx-queue = <529>;
    			tx-completion-queue = <531>;
    			efuse-mac = <0>;
    			local-mac-address = [02 18 31 7e 3e 00];
    			netcp-gbe = <&gbe1>;
    		};
    	};
    };
    
    sa_subsys: subsys@24080000 {
    	#address-cells = <1>;
    	#size-cells = <1>;
    	compatible = "simple-bus";
    	ranges = <0 0x24080000 0x40000>;
    
    	sa_config: subsys@0 {
    		compatible = "syscon";
    		reg = <0x0 0x100>;
    	};
    
    	rng@24000 {
    		compatible = "ti,keystone-rng";
    		reg = <0x24000 0x1000>;
    		ti,syscon-sa-cfg = <&sa_config>;
    		clocks = <&clksa>;
    		clock-names = "fck";
    	};
    };
    
    

    kernel log

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 19 2020 - 06:29:23 +0000)
    Trying to boot from SPI
    
    
    U-Boot 2019.01-g333c3e72d3 (Apr 19 2020 - 06:29:23 +0000)
    
    CPU: 66AK2Ex SR1.0
    Model: Texas Instruments Keystone 2 Edison EVM
    DRAM:  DDR3A Speed will be configured for 1600 Operation.
    Detected SO-DIMM [18KSF51272HZ-1G6K2]
    DDR3 speed 1600
    DRAM: 4 GiB
    
    Clear entire DDR3 memory to enable ECC
    2 GiB
    NAND:  512 MiB
    Loading Environment from NAND... OK
    Net:   eth0: netcp@24000000
    Warning: netcp@slave-1 (eth1) using random MAC address - 5a:91:34:bb:df:83
    , eth1: netcp@slave-1
    Warning: netcp@slave-2 (eth2) using random MAC address - 92:41:d8:ec:c1:81
    , eth2: netcp@slave-2
    Warning: netcp@slave-3 (eth3) using random MAC address - 3e:06:ee:16:60:ba
    , eth3: netcp@slave-3
    Warning: netcp@slave-4 (eth4) using random MAC address - 7e:d5:42:83:ab:59
    , eth4: netcp@slave-4
    Warning: netcp@slave-5 (eth5) using random MAC address - 5e:9e:59:0f:b2:09
    , eth5: netcp@slave-5
    Warning: netcp@slave-6 (eth6) using random MAC address - 9e:46:9c:22:20:07
    , eth6: netcp@slave-6
    Warning: netcp@slave-7 (eth7) using random MAC address - fe:0f:05:a8:23:74
    , eth7: netcp@slave-7
    Hit any key to stop autoboot:  0 
    
    netcp@24000000 Waiting for SGMII auto negotiation to complete. done
    Using netcp@24000000 device
    File transfer via NFS from server 10.10.10.196; our IP address is 10.10.10.171
    Filename '/srv/nfsCCM/boot/skern-k2e.bin'.
    Load address: 0x87000000
    Loading: #######
    done
    Bytes transferred = 32832 (8040 hex)
    K2_BM_15.07-53-ge1f885ab6dc5 SoC:k2e built:12:42:37, Jul  2 2020
                                                                    
    ## installed monitor @ 0xc1f0000, freq [233333333], status 203358208
    
    netcp@24000000 Waiting for SGMII auto negotiation to complete. done
    Using netcp@24000000 device
    File transfer via NFS from server 10.10.10.196; our IP address is 10.10.10.171
    Filename '/srv/nfsCCM/boot/zImage'.
    Load address: 0x82000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ########################################################
    done
    Bytes transferred = 4612608 (466200 hex)
    
    netcp@24000000 Waiting for SGMII auto negotiation to complete. done
    Using netcp@24000000 device
    File transfer via NFS from server 10.10.10.196; our IP address is 10.10.10.171
    Filename '/srv/nfsCCM/boot/k2-fw-initrd.cpio.gz'.
    Load address: 0x88080000
    Loading: #############
    done
    Bytes transferred = 65096 (fe48 hex)
    
    netcp@24000000 Waiting for SGMII auto negotiation to complete. done
    Using netcp@24000000 device
    File transfer via NFS from server 10.10.10.196; our IP address is 10.10.10.171
    Filename '/srv/nfsCCM/boot/keystone-k2e-evm.dtb'.
    Load address: 0x88000000
    Loading: ######
    done
    Bytes transferred = 27242 (6a6a hex)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Ramdisk to 8fff0000, end 8ffffe48 ... OK
       Loading Device Tree to 8ffe6000, end 8ffefa69 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94+ (ide@tmssrv) (gcc version 8.4.0 (Buildroot 2020.11.1)) #1 SMP PRE
    EMPT Wed Feb 1 14:44:27 EET 2023
    [    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: Texas Instruments Keystone 2 Edison EVM
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] Switching physical address space to 0x800000000
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, size 8 MiB
    [    0.000000] OF: reserved mem: initialized node dsp-common-memory@81f800000, compatible id shared-dma
    -pool
    [    0.000000] cma: Reserved 24 MiB at 0x000000087e400000
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: Using PSCI v0.1 Function IDs from DT
    [    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
    [    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 981888
    [    0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 mtdparts=spi0.0:1m(u-boot-spl)ro,
    -(misc) rootfstype=nfs root=/dev/nfs rw nfsroot=/srv/nfsCCM,v3,tcp,rsize=4096,wsize=4096 ip=10.10.10.17
    1:10.10.10.196:10.10.10.1:255.255.255.0:k2e-evm-2:eth0:off:10.10.10.1 nfsrootdebug
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 3846996K/3932160K available (10240K kernel code, 324K rwdata, 3000K rodata, 2048
    K init, 267K bss, 52396K reserved, 32768K cma-reserved, 3383296K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (12256 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 325 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 268 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] arch_timer: cp15 timer(s) running at 233.33MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x6ba0ac50b7, max_idle
    _ns: 881590427583 ns
    [    0.000004] sched_clock: 56 bits at 233MHz, resolution 4ns, wraps every 4398046511102ns
    [    0.000013] Switching to timer-based delay loop, resolution 4ns
    [    0.000145] keystone timer clock @233333333 Hz
    [    0.000277] Console: colour dummy device 80x30
    [    0.000314] Calibrating delay loop (skipped), value calculated using timer frequency.. 466.66 BogoMI
    PS (lpj=2333333)
    [    0.000324] pid_max: default: 32768 minimum: 301
    [    0.000418] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000427] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000891] CPU: Testing write buffer coherency: ok
    [    0.000914] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulner
    able
    [    0.001106] /cpus/cpu@0 missing clock-frequency property
    [    0.001127] /cpus/cpu@1 missing clock-frequency property
    [    0.001146] /cpus/cpu@2 missing clock-frequency property
    [    0.001166] /cpus/cpu@3 missing clock-frequency property
    [    0.001175] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.060033] Setting up static identity map for 0x80200000 - 0x80200138
    [    0.080038] rcu: Hierarchical SRCU implementation.
    [    0.100179] EFI services will not be available.
    [    0.120079] smp: Bringing up secondary CPUs ...
    [    0.204371] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.204376] CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulner
    able
    [    0.284465] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
    [    0.284470] CPU2: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulner
    able
    [    0.364564] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
    [    0.364569] CPU3: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulner
    able
    [    0.364698] smp: Brought up 1 node, 4 CPUs
    [    0.364708] SMP: Total of 4 processors activated (1866.66 BogoMIPS).
    [    0.364715] CPU: All CPU(s) started in HYP mode.
    [    0.364721] CPU: Virtualization extensions available.
    [    0.365142] devtmpfs: initialized
    [    0.369253] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.369459] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191126044627
    50000 ns
    [    0.369473] futex hash table entries: 1024 (order: 4, 65536 bytes)
    [    0.369937] pinctrl core: initialized pinctrl subsystem
    [    0.370286] DMI not present or invalid.
    [    0.370507] NET: Registered protocol family 16
    [    0.371352] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.372032] cpuidle: using governor ladder
    [    0.372060] cpuidle: using governor menu
    [    0.372189] No ATAGs?
    [    0.372274] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.372284] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.386703] SCSI subsystem initialized
    [    0.387597] media: Linux media interface: v0.10
    [    0.387629] videodev: Linux video capture interface: v2.00
    [    0.387681] pps_core: LinuxPPS API ver. 1 registered
    [    0.387688] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.387704] PTP clock support registered
    [    0.387726] EDAC MC: Ver: 3.0.0
    [    0.388370] Advanced Linux Sound Architecture Driver Initialized.
    [    0.388952] clocksource: Switched to clocksource arch_sys_counter
    [    0.394623] NET: Registered protocol family 2
    [    0.394998] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [    0.395019] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.395047] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.395095] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.395151] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [    0.395168] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [    0.395307] NET: Registered protocol family 1
    [    0.395595] RPC: Registered named UNIX socket transport module.
    [    0.395603] RPC: Registered udp transport module.
    [    0.395609] RPC: Registered tcp transport module.
    [    0.395615] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.395744] Trying to unpack rootfs image as initramfs...
    [    0.399367] Freeing initrd memory: 64K
    [    0.399591] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    0.399822] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.400178] platform alarmtimer: set dma_pfn_offset00780000
    [    0.400657] Initialise system trusted keyrings
    [    0.400756] workingset: timestamp_bits=14 max_order=20 bucket_order=6
    [    0.404681] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.405034] NFS: Registering the id_resolver key type
    [    0.405049] Key type id_resolver registered
    [    0.405055] Key type id_legacy registered
    [    0.405083] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.406336] Key type asymmetric registered
    [    0.406345] Asymmetric key parser 'x509' registered
    [    0.406378] bounce: pool size: 64 pages
    [    0.406402] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.406409] io scheduler noop registered
    [    0.406416] io scheduler deadline registered
    [    0.406493] io scheduler cfq registered (default)
    [    0.406501] io scheduler mq-deadline registered
    [    0.406508] io scheduler kyber registered
    [    0.406780] keystone_irq 26202a0.keystone_irq: irqchip registered, nr_irqs 28
    [    0.407296] ti,keystone-serdes 2326000.phy: init fw ks2_pcie_serdes.bin: version 3.3.0.2c
    [    0.408024] ti,keystone-serdes 232a000.phy: init fw ks2_gbe_serdes.bin: version 3.3.0.2c
    [    0.410521] keystone-pcie 21020000.pcie: host bridge /soc@0/pcie@21020000 ranges:
    [    0.410547] keystone-pcie 21020000.pcie:    IO 0x60000000..0x600fffff -> 0x00000000
    [    0.410565] keystone-pcie 21020000.pcie:   MEM 0x60100000..0x6fffffff -> 0x60100000
    [    0.511079] keystone-pcie 21020000.pcie: Link up
    [    0.511175] keystone-pcie 21020000.pcie: PCI host bridge to bus 0000:00
    [    0.511185] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    0.511194] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
    [    0.511202] pci_bus 0000:00: root bus resource [mem 0x60100000-0x6fffffff]
    [    0.512615] PCI: bus0: Fast back to back transfers disabled
    [    0.512857] pci 0000:01:00.0: Enabling fixed DMA alias to 00.1
    [    0.540164] PCI: bus1: Fast back to back transfers disabled
    [    0.540195] pci 0000:00:00.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
    [    0.540206] pci 0000:00:00.0: BAR 9: assigned [mem 0x60200000-0x602fffff pref]
    [    0.540214] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
    [    0.540226] pci 0000:01:00.0: BAR 6: assigned [mem 0x60200000-0x6020ffff pref]
    [    0.540235] pci 0000:01:00.0: BAR 5: assigned [mem 0x60100000-0x601001ff]
    [    0.540247] pci 0000:01:00.0: BAR 4: assigned [io  0x1000-0x100f]
    [    0.540258] pci 0000:01:00.0: BAR 0: assigned [io  0x1010-0x1017]
    [    0.540270] pci 0000:01:00.0: BAR 2: assigned [io  0x1018-0x101f]
    [    0.540282] pci 0000:01:00.0: BAR 1: assigned [io  0x1020-0x1023]
    [    0.540293] pci 0000:01:00.0: BAR 3: assigned [io  0x1024-0x1027]
    [    0.540305] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
    [    0.540313] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
    [    0.540322] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff]
    [    0.540331] pci 0000:00:00.0:   bridge window [mem 0x60200000-0x602fffff pref]
    [    0.540443] pcieport 0000:00:00.0: limiting MRRS to 256
    [    0.540598] pcieport 0000:00:00.0: Signaling PME with IRQ 80
    [    0.540712] pcieport 0000:00:00.0: AER enabled with IRQ 80
    [    0.541695] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 0, number of queues 8192
    [    0.541812] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 0, num of queues 8192
    , reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_push (ptrval), 
    reg_pop (ptrval)
    [    0.541950] keystone-navigator-qmss soc@0:qmss@2a40000: firmware file ks2_qmss_pdsp_acc48.bin downlo
    aded for PDSP
    [    0.544384] keystone-navigator-dma soc@0:knav_dmas@0: DMA dma_gbe registered 149 logical channels, f
    lows 128, tx chans: 21, rx chans: 91
    [    0.578252] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.578305] platform serial8250: set dma_pfn_offset00780000
    [    0.580873] console [ttyS0] disabled
    [    0.580916] 2530c00.serial: ttyS0 at MMIO 0x2530c00 (irq = 27, base_baud = 14583333) is a TI DA8xx/6
    6AK2x
    [    1.619469] console [ttyS0] enabled
    [    1.623653] 2531000.serial: ttyS1 at MMIO 0x2531000 (irq = 28, base_baud = 14583333) is a TI DA8xx/6
    6AK2x
    [    1.642070] brd: module loaded
    [    1.650750] loop: module loaded
    [    1.655439] spi_davinci 21000400.spi: DMA is not supported (-19)
    [    1.662167] m25p80 spi0.0: n25q128a11 (16384 Kbytes)
    [    1.667148] 2 cmdlinepart partitions found on MTD device spi0.0
    [    1.673098] Creating 2 MTD partitions on "spi0.0":
    [    1.677902] 0x000000000000-0x000000100000 : "u-boot-spl"
    [    1.683787] 0x000000100000-0x000001000000 : "misc"
    [    1.689134] spi_davinci 21000400.spi: Controller at 0x(ptrval)
    [    1.695214] spi_davinci 21000600.spi: DMA is not supported (-19)
    [    1.701522] spi_davinci 21000600.spi: Controller at 0x(ptrval)
    [    1.707609] spi_davinci 21000800.spi: DMA is not supported (-19)
    [    1.713910] spi_davinci 21000800.spi: Controller at 0x(ptrval)
    [    1.720007] platform Fixed MDIO bus.0: set dma_pfn_offset00780000
    [    1.726263] libphy: Fixed MDIO Bus: probed
    [    1.788976] davinci_mdio 24200f00.mdio: davinci mdio revision 1.7, bus freq 2500000
    [    1.796650] libphy: 24200f00.mdio: probed
    [    1.802329] davinci_mdio 24200f00.mdio: phy[0]: device 24200f00.mdio:00, driver Marvell 88E1510
    [    1.811066] davinci_mdio 24200f00.mdio: phy[1]: device 24200f00.mdio:01, driver Marvell 88E1510
    [    1.820085] cpsw 2620110.netcp: Random MACID = 32:fd:6d:f8:03:56
    [    1.826125] cpsw 2620110.netcp: invalid resource
    [    1.830795] cpsw: probe of 2620110.netcp failed with error -22
    [    1.837037] netcp-1.0 2620110.netcp: initialized cpsw ale version 1.4
    [    1.843507] netcp-1.0 2620110.netcp: ALE Table size 8192
    [    1.848848] netcp-1.0 2620110.netcp: cpts: overflow check period 300 (jiffies)
    [    1.856109] netcp-1.0 2620110.netcp: CPTS: ref_clk_freq:700000000 calc_mult:3067833783 calc_shift:31
     error:0 nsec/sec
    [    1.867420] netcp-1.0 2620110.netcp: module(netcp-xgbe) not used for device
    [    1.874657] i2c /dev entries driver
    [    1.880065] sdhci: Secure Digital Host Controller Interface driver
    [    1.886257] sdhci: Copyright(c) Pierre Ossman
    [    1.890823] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.896988] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.904486] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
    [    1.910871] nand: Micron MT29F4G08ABBDAH4
    [    1.914888] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    [    1.922752] Bad block table found at page 262080, version 0x01
    [    1.929068] Bad block table found at page 262016, version 0x01
    [    1.935206] 3 fixed-partitions partitions found on MTD device 30000000.nand
    [    1.942196] Creating 3 MTD partitions on "30000000.nand":
    [    1.947607] 0x000000000000-0x000000100000 : "u-boot"
    [    1.953169] 0x000000100000-0x000000180000 : "params"
    [    1.958674] 0x000000180000-0x000020000000 : "ubifs"
    [    1.967226] davinci_nand 30000000.nand: controller rev. 2.5
    [    1.973286] platform snd-soc-dummy: set dma_pfn_offset00780000
    [    1.979971] NET: Registered protocol family 10
    [    1.985140] Segment Routing with IPv6
    [    1.988850] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.995168] NET: Registered protocol family 17
    [    1.999731] Key type dns_resolver registered
    [    2.004149] Registering SWP/SWPB emulation handler
    [    2.009318] Loading compiled-in X.509 certificates
    [    2.017429] hctosys: unable to open rtc device (rtc0)
    [    2.141549] netcp-1.0 2620110.netcp eth0: Link is Down
    [    2.162898] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    4.330043] netcp-1.0 2620110.netcp eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [    4.348982] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [    4.389033] IP-Config: Complete:
    [    4.392269]      device=eth0, hwaddr=b4:99:4c:09:60:58, ipaddr=10.10.10.171, mask=255.255.255.0, gw=
    10.10.10.1
    [    4.402310]      host=k2e-evm-2, domain=, nis-domain=(none)
    [    4.407895]      bootserver=10.10.10.196, rootserver=10.10.10.196, rootpath=
    [    4.407897]      nameserver0=10.10.10.1
    [    4.428106] ALSA device list:
    [    4.431093]   No soundcards found.
    [    4.456229] VFS: Mounted root (nfs filesystem) on device 0:14.
    [    4.462811] devtmpfs: mounted
    [    4.466737] Freeing unused kernel memory: 2048K
    [    4.471410] Run /sbin/init as init process
    [    4.489223] random: fast init done
    Starting rsyslogd: OK
    Running sysctl: OK
    Populating /dev using udev: done
    Initializing random number generator: OK
    Saving random seed: OK
    Starting rngd: OK
    Starting system message bus: done
    Starting network: ip: RTNETLINK answers: File exists
    FAIL
    Starting NetworkManager ... done.
    Starting dropbear sshd: OK
    Starting cron ... done.
    atd: created missing .SEQ file (atjobs will be lost on reboot)
    Starting atd: OK
    eth125
    ip: RTNETLINK answers: Operation not supported
    ip: RTNETLINK answers: Operation not supported
    ip: can't find device 'brLAN'
    ip: SIOCGIFFLAGS: No such device
    ip: SIOCGIFFLAGS: No such device
    ip: can't find device 'brLAN'
    Starting mosquitto: OK
    Starting DHCP server: FAIL
    Starting HPA's tftpd: done
    
    CCM READY!
    ccm.tmn1.lan login: 

    Is my netcp device tree correct? 

    Why do i get

    cpsw: 2620110.netcp invalid resource

    cpsw: probe of 2620110.netcp failed with error -22

    Thank you.

    Konstantinos

  • Hi Konstantinos,

    Will analyze your Device tree and post my response.

    Thanks,

    Rajarajan U

  • Hi Konstantinos,

    I believe you have been working on Linux, There is a CPPI working example project developed on the TI-RTOS kernel, which uses the same configuration as the CPSW driver.

    To verify the configuration kindly look into the code for reference.

    CPSW configuration is located in the file: ti\pdk_k2e_4_0_16\packages\ti\drv\cppi\device\k2e\src

    TI-RTOS SDK Link

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1040858/faq-66ak2e05-how-to-generate-the-ccs-pdk-examples-for-k2e

    I am working on the Netcp driver configuration. I will provide a response ASAP.

    Thanks

    Rajarajan U

  • Mr Rajarajan,

    I am aware of this document, this is the first document that i started on. 

    On the other hand on the tisdk linux kerneI, i found  “./Documentation/devicetree/bindings/net/keystone-netcp.txt” that describes the port binding procedure.

     

    I tried to configure the device tree following those instructions (changing the registers for k2e), but I did not manage to achieve port binding in the evaluation board.

     

    My goal is to configure all 8 ports of k2e netcp as an unmanaged switch.

     

    And my questions are:

    • How should I modify the device tree?  
    • Do I need any further configuration (except of the device tree)?
    • Do I need ethtool or some other tool in user space? 

     

    Could you provide me with some help about it ?

    Yours sincerely,

    Konstantinos.

  • Hi Konstantinos,

    I know little about the device tree but had intimated the kernel experts.

    Kindly look into the reference device tree for the netcp.

    https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/refs/heads/akpm-base/Documentation/devicetree/bindings/net/keystone-netcp.txt

    Thanks,

    Rajarajan U

  • Hi Rajaran,

    I am the FAE for Konstantinos. I was wondering if you were able to ask around in the team if we have any knowledge regarding the device tree?

    Kind regards,

    Daniel

  • Hi all, 

    I managed to make it work almost as a normal switch.

    The Steps:

    1) In the menuconfig i added the CPSW related and 802... modules.

    2) The device tree i used is like the one in

    documentation “./Documentation/devicetree/bindings/net/keystone-netcp.txt” .

    3) Then i run the following commands.

    1. echo "port0_unicast_flood=1" > /sys/class/net/eth0/device/ale_control
    2. echo "bypass=0" > /sys/class/net/eth0/device/ale_control
    3. echo "no_port_vlan=1" > /sys/class/net/eth0/device/ale_control

    The current situation:

    +-------------------------------+			|-----------------------|
    |	K2e EVM                     |  			|Server					|
    |								|	   |----|ip 10.10.10.191		|
    |		 |----------------------|      |    |mask 255.255.255.0		|
    |		 |	eth0				| 	   |	|-----------------------|
    |		 |	ip 10.10.10.171		|------+      
    |		 |	mask 255.255.255.0	| 	
    |		 |----------------------|   
    |		                  		|   
    |		 |----------------------| 			|-----------------------|
    |		 |	eth1				|   		|laptop					|
    |		 | 						|-----------|ip 10.10.10.200		|
    |		 |----------------------|   		|mask 255.255.255.0		|
    +-------------------------------+			|-----------------------|

    • Server(10.10.10.191) Pings Laptop(10.10.10.200) and Laptop Pings Server
    • Server(10.10.10.191) Pings K2eEVM(10.10.10.171) and K2eEVM pings Server
    • K2eEVM(10.10.10.171) can NOT ping Laptop(10.10.10.200) and Laptop can NOT ping K2eEVM  

    How should i resolve this issue ??

    Do i need to echo something more into ale_control ?

    If you need any further information please let me know.

    Yours sincerely,

    Konstantinos