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.

Linux/TCI6630K2L: Ethernet not working (failed to initialize SERDES)

Part Number: TCI6630K2L

Tool/software: Linux

Hi All!

We have a custom board with TCI6630K2L and Marvell 88E1512 PHY connected to SGMII0.

Linux is loaded from UBI partition on SPI NOR flash. UBIFS layout is as follows (board name is k10sv):

/boot/zImage

/boot/keystone-k10sv.dtb

/boot/k2-fw-initrd.cpio.gz

/boot/skern-k2l.bin

I'm able to use Ethernet port in U-Boot and ping PC host at 1Gbps (according to ethtool).

keystone-k10sv.dtb holds custom device tree based on k2l-evm. Especially - I've disabled gbe1 and ethphy1 in board's dts.

The main problem is that Ethernet does not work under Linux.

Here is full boot log:

U-Boot SPL 2018.01-00459-gfa8e4577e7-dirty (Jan 01 2019 - 19:28:31)
Trying to boot from SPI


U-Boot 2018.01-00459-gfa8e4577e7-dirty (Jan 01 2019 - 19:28:31 +0300)

CPU: 66AK2Lx SR1.0
Model: k10sv board
I2C:   ready
DRAM:  DRAM: 2 GiB

Clear entire DDR3 memory to enable ECC
2 GiB
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Net:
Warning: netcp@26000000 using MAC address from ROM
eth0: netcp@26000000Could not get PHY for ethernet-mdio: addr 1

Warning: netcp@slave-1 (eth1) using random MAC address - 66:fc:4b:b4:7e:98
, eth1: netcp@slave-1
Warning: netcp@slave-2 (eth2) using random MAC address - 06:b5:d2:3e:7d:eb
, eth2: netcp@slave-2
Warning: netcp@slave-3 (eth3) using random MAC address - c6:6d:17:13:ef:e5
, eth3: netcp@slave-3
Hit any key to stop autoboot:  0
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
ubi0: attaching mtd2
ubi0: scanning is finished
ubi0: attached mtd2 (name "mtd=3", size 15 MiB)
ubi0: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
ubi0: min./max. I/O unit sizes: 1/256, sub-page size 1
ubi0: VID header offset: 64 (aligned 64), data offset: 128
ubi0: good PEBs: 240, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1910823204
ubi0: available PEBs: 0, total reserved PEBs: 240, PEBs reserved for bad PEB handling: 0
Loading file '/boot/skern-k2l.bin' to addr 0x87000000...
Done
K2_BM_15.07-53-ge1f885a SoC:k2l built:03:07:15, Oct  6 2018

## installed monitor @ 0xc1f8000, freq [200000000], status 203390976
Loading file '/boot/zImage' to addr 0x82000000...
Done
Loading file '/boot/k2-fw-initrd.cpio.gz' to addr 0x88080000...
Done
Loading file '/boot/keystone-k10sv.dtb' to addr 0x88000000...
Done
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8ffef000, end 8ffff162 ... OK
   Loading Device Tree to 8ffe3000, end 8ffee2a0 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.67-gd315a9bb00 (ghost@ghost-desktop) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #17 SMP PREEMPT Tue Jan 1 23:09:56 MSK 2019
[    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: Kontur-NIIRS k10sv processing module
[    0.000000] bootconsole [earlycon0] enabled
[    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 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] percpu: Embedded 15 pages/cpu @de5bb000 s29964 r8192 d23284 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 359296
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 earlyprintk rootfstype=ubifs mtdparts=spi0.0:64k(u-boot-spl)ro,896k(u-boot-img)ro,64k(u-boot-env),-(ubifs) root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    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: 1384932K/1441792K available (6144K kernel code, 149K rwdata, 1340K rodata, 2048K init, 235K bss, 24092K reserved, 32768K cma-reserved, 892928K 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 : 0xc0008000 - 0xc0800000   (8160 kB)
[    0.000000]       .init : 0xc0a00000 - 0xc0c00000   (2048 kB)
[    0.000000]       .data : 0xc0c00000 - 0xc0c25540   ( 150 kB)
[    0.000000]        .bss : 0xc0c27000 - 0xc0c61fe4   ( 236 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] 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] of_psc_clk_init: error registering clk clkpcie1
[    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.000004] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[    0.008174] Switching to timer-based delay loop, resolution 5ns
[    0.014393] keystone timer clock @200000000 Hz
[    0.019169] Console: colour dummy device 80x30
[    0.023756] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.034486] pid_max: default: 32768 minimum: 301
[    0.039320] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.046098] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.053735] CPU: Testing write buffer coherency: ok
[    0.058964] /cpus/cpu@0 missing clock-frequency property
[    0.064430] /cpus/cpu@1 missing clock-frequency property
[    0.069897] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.109971] Setting up static identity map for 0x80200000 - 0x80200138
[    0.116731] Hierarchical SRCU implementation.
[    0.161279] smp: Bringing up secondary CPUs ...
[    0.212699] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.212810] smp: Brought up 1 node, 2 CPUs
[    0.222843] SMP: Total of 2 processors activated (800.00 BogoMIPS).
[    0.229256] CPU: All CPU(s) started in HYP mode.
[    0.234011] CPU: Virtualization extensions available.
[    0.239563] devtmpfs: initialized
[    0.248232] random: get_random_u32 called from bucket_table_alloc+0x108/0x230 with crng_init=0
[    0.257172] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.265119] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.275151] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.282034] pinctrl core: initialized pinctrl subsystem
[    0.287632] NET: Registered protocol family 16
[    0.292954] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.300681] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.308851] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.330066] EDAC MC: Ver: 3.0.0
[    0.333916] clocksource: Switched to clocksource arch_sys_counter
[    0.345970] NET: Registered protocol family 2
[    0.350890] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.358157] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.364834] TCP: Hash tables configured (established 4096 bind 4096)
[    0.371392] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.377412] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.383962] NET: Registered protocol family 1
[    0.388610] Trying to unpack rootfs image as initramfs...
[    0.398188] Freeing initrd memory: 68K
[    0.402257] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    0.409752] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    0.418637] platform alarmtimer: set dma_pfn_offset00780000
[    0.424923] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    0.434574] ntfs: driver 2.1.32 [Flags: R/O].
[    0.440315] bounce: pool size: 64 pages
[    0.444356] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.451911] io scheduler noop registered
[    0.455974] io scheduler deadline registered
[    0.460493] io scheduler cfq registered (default)
[    0.465348] io scheduler mq-deadline registered
[    0.470007] io scheduler kyber registered
[    0.474416] keystone_irq soc:keystone_irq@26202a0: irqchip registered, nr_irqs 28
[    0.482558] ti,keystone-serdes 232a000.phy: init fw ks2_gbe_serdes.bin: version 3.3.0.2c
[    0.493878] registered dspmem misc device
[    0.498164] keystone-navigator-qmss soc:qmss@2a40000: qmgr start queue 0, number of queues 8192
[    0.507171] keystone-navigator-qmss soc:qmss@2a40000: added qmgr start queue 0, num of queues 8192, reg_peek e0940000, reg_status e0925000, reg_config e0927000, reg_region e0929000, reg_push e0980000, reg_pop e09c0000
[    0.526922] keystone-navigator-qmss soc:qmss@2a40000: firmware file ks2_qmss_pdsp_acc48.bin downloaded for PDSP
[    0.539345] keystone-navigator-dma soc:knav_dmas@0: DMA dma_gbe registered 149 logical channels, flows 128, tx chans: 21, rx chans: 91
[    0.552254] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.558828] platform serial8250: set dma_pfn_offset00780000
[    0.565375] console [ttyS0] disabled
[    0.569102] 2530c00.serial: ttyS0 at MMIO 0x2530c00 (irq = 26, base_baud = 12500000) is a TI DA8xx/66AK2x
[    0.578907] console [ttyS0] enabled
[    0.578907] console [ttyS0] enabled
[    0.586022] bootconsole [earlycon0] disabled
[    0.586022] bootconsole [earlycon0] disabled
[    0.608060] brd: module loaded
[    0.612369] loop: module loaded
[    0.615962] spi_davinci 21000400.spi: DMA is not supported (-19)
[    0.622506] m25p80 spi0.0: s25fl128s (16384 Kbytes)
[    0.627434] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.633374] Creating 4 MTD partitions on "spi0.0":
[    0.638201] 0x000000000000-0x000000010000 : "u-boot-spl"
[    0.644161] 0x000000010000-0x0000000f0000 : "u-boot-img"
[    0.650027] 0x0000000f0000-0x000000100000 : "u-boot-env"
[    0.655916] 0x000000100000-0x000001000000 : "ubifs"
[    0.661365] spi_davinci 21000400.spi: Controller at 0xe097d400
[    0.667487] spi_davinci 21000600.spi: DMA is not supported (-19)
[    0.673794] spi_davinci 21000600.spi: Controller at 0xe09a1600
[    0.679875] platform Fixed MDIO bus.0: set dma_pfn_offset00780000
[    0.686120] libphy: Fixed MDIO Bus: probed
[    0.743944] davinci_mdio 26200f00.mdio: davinci mdio revision 1.7, bus freq 2500000
[    0.751630] libphy: 26200f00.mdio: probed
[    0.756405] davinci_mdio 26200f00.mdio: phy[0]: device 26200f00.mdio:00, driver Marvell 88E1510
[    1.273918] ti,keystone-serdes 232a000.phy: init_lane_rx wait sd valid FAILED -110
[    3.293397] serdes PLL not locked
[    5.819916] serdes PLL not locked
[    6.334395] netcp-1.0 2620110.netcp: initialized cpsw ale version 1.4
[    6.340860] netcp-1.0 2620110.netcp: ALE Table size 1024
[    6.346952] netcp-1.0 2620110.netcp: module(netcp-xgbe) not used for device
[    6.355021] EDAC MC0: Giving out device to module ti-emif-edac controller ti,emif-keystone: DEV 21010000.emif (INTERRUPT)
[    6.368066] keystone-rproc 10800000.dsp: assigned reserved memory node dsp-common-memory@81f800000
[    6.377129] remoteproc remoteproc0: 10800000.dsp is available
[    6.384689] keystone-rproc 11800000.dsp: assigned reserved memory node dsp-common-memory@81f800000
[    6.393734] remoteproc remoteproc1: 11800000.dsp is available
[    6.401239] keystone-rproc 12800000.dsp: assigned reserved memory node dsp-common-memory@81f800000
[    6.410298] remoteproc remoteproc2: 12800000.dsp is available
[    6.417800] keystone-rproc 13800000.dsp: assigned reserved memory node dsp-common-memory@81f800000
[    6.426860] remoteproc remoteproc3: 13800000.dsp is available
[    6.433235] NET: Registered protocol family 17
[    6.437725] NET: Registered protocol family 44
[    6.442258] Registering SWP/SWPB emulation handler
[    6.450330] ubi0: attaching mtd3
[    6.454728] random: fast init done
[    6.512698] random: crng init done
[    6.598178] ubi0: scanning is finished
[    6.764304] ubi0: attached mtd3 (name "ubifs", size 15 MiB)
[    6.769899] ubi0: PEB size: 65536 bytes (64 KiB), LEB size: 65408 bytes
[    6.776557] ubi0: min./max. I/O unit sizes: 1/256, sub-page size 1
[    6.782759] ubi0: VID header offset: 64 (aligned 64), data offset: 128
[    6.789323] ubi0: good PEBs: 240, bad PEBs: 0, corrupted PEBs: 0
[    6.795362] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    6.802611] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1910823204
[    6.811790] ubi0: available PEBs: 0, total reserved PEBs: 240, PEBs reserved for bad PEB handling: 0
[    6.820985] ubi0: background thread "ubi_bgt0d" started, PID 42
[    6.841740] UBIFS: parse sync
[    6.854503] (NULL net_device): Link is Down
[    6.858701] (NULL net_device): Link is Down
[    6.863090] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 43
[    7.853498] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    7.860943] UBIFS (ubi0:0): LEB size: 65408 bytes (63 KiB), min./max. I/O unit sizes: 8 bytes/256 bytes
[    7.870387] UBIFS (ubi0:0): FS size: 14782208 bytes (14 MiB, 226 LEBs), journal size 2158464 bytes (2 MiB, 33 LEBs)
[    7.880947] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    7.886815] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID A925CC02-07D2-4D01-81DA-9661F5B09EEC, small LPT model
[    7.902027] VFS: Mounted root (ubifs filesystem) on device 0:14.
[    7.911222] devtmpfs: mounted
[    7.915281] Freeing unused kernel memory: 2048K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
Starting sshd: OK

Welcome to k10sv
k10sv login:

ifconfig gives two ethernet ports eth0 and eth1. Trying to configure eth0 with static IP results in kernel panic.

What can be wrong with this setup?

Yurii

  • A little update. I've disable unused netcp ports and interfaces in dts file:

    /delete-node/ &gbe1;
    
    &netcp {
            netcp-devices {
                    gbe@200000 {
                            /delete-node/secondary-slave-ports;
                    };
            };
            netcp-interfaces {
                    /delete-node/interface-1;
            };
    };
    

    and now there are no serdes-related errors in the log.

    ifconfig works as expected and link is coming up correctly. But ping does not work.

    I see these messages in kernel log:

    [   77.333808] net eth0: transmit timed out tx descs(1022)
    [   77.339075] net eth0: out of TX desc
    [   87.173808] net eth0: transmit timed out tx descs(1021)
    [   87.179152] net eth0: out of TX desc
    [   97.173807] net eth0: transmit timed out tx descs(1020)
    [   97.179212] net eth0: out of TX desc

    Calling 'ifconfig eth0 down' results in exception:

    [  630.159558] net eth0: Lost (-1014) Tx descs
    [  630.163762] net eth0: Lost Rx (-1020) descriptors
    [  630.168587] ------------[ cut here ]------------
    [  630.173231] WARNING: CPU: 1 PID: 99 at drivers/soc/ti/knav_qmss_queue.c:724 knav_pool_destroy.part.3+0xf0/0xf4
    [  630.183346] Modules linked in:
    [  630.186470] CPU: 1 PID: 99 Comm: ifconfig Tainted: G        W       4.14.67-gd315a9bb00 #17
    [  630.194852] Hardware name: Keystone
    [  630.198350] Backtrace:
    [  630.200811] [<c020b390>] (dump_backtrace) from [<c020b674>] (show_stack+0x18/0x1c)
    [  630.208410]  r7:00000009 r6:60040013 r5:00000000 r4:c0c22c20
    [  630.214093] [<c020b65c>] (show_stack) from [<c0601808>] (dump_stack+0x90/0xa4)
    [  630.221345] [<c0601778>] (dump_stack) from [<c021d36c>] (__warn+0xec/0x104)
    [  630.228333]  r7:00000009 r6:c0903e24 r5:00000000 r4:00000000
    [  630.234013] [<c021d280>] (__warn) from [<c021d43c>] (warn_slowpath_null+0x28/0x30)
    [  630.241611]  r9:00000000 r8:dec54508 r7:dec542a0 r6:dec542a0 r5:00000000 r4:ddd50090
    [  630.249386] [<c021d414>] (warn_slowpath_null) from [<c0488aa0>] (knav_pool_destroy.part.3+0xf0/0xf4)
    [  630.258557] [<c04889b0>] (knav_pool_destroy.part.3) from [<c0488ac8>] (knav_pool_destroy+0x24/0x28)
    [  630.267637]  r5:00000400 r4:dec544c0
    [  630.271229] [<c0488aa4>] (knav_pool_destroy) from [<c0512ee0>] (netcp_free_navigator_resources+0x1f8/0x2f4)
    [  630.281011] [<c0512ce8>] (netcp_free_navigator_resources) from [<c0513168>] (netcp_ndo_stop+0x18c/0x1bc)
    [  630.290528]  r10:ddc8210c r9:00000000 r8:c090eaec r7:dec542a0 r6:dec544c0 r5:00000400
    [  630.298384]  r4:dec54000
    ...

    Yurii

  • Another observation. In file arch/arm/boot/dts/keystone-k2e-netcp.dtsi we can find this piece of code:

    netcp: netcp@24000000 {
            reg = <0x2620110 0x8>;
            reg-names = "efuse";
            compatible = "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";
            dma-coherent;
    
            ti,navigator-dmas = <&dma_gbe 0>,
                            <&dma_gbe 8>,
                            <&dma_gbe 0>;
            ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
    

    I am confused with ti,navigator-dmas property. Is it ok to assign same channel 0 to netrx0 and nettx?

  • Hi All!

    I've finally got ethernet port working on custom board. If anyone is interested, there were two main problems:

    1. I've disabled Network QoS in kernel configuration (that was the source of "out of TX desc" errors and kernel crashes). Enabling QoS/Netfilter fixed this issue.

    2. The second problem is that default K2L device tree does not support PCIe interfaces. Moreover, gbe_serdes1 node is aliased with pcie0_phy node. So you can not get PCIe working without deleting gbe_serdes1 completely. To solve this I've copied keystone-k2l.dtsi and keystone-k2l-netcp.dtsi to separate files and removed unused devices (especially - SGMII ports 2 and 3). After this no errors are displayed in the log at all. End even PCIe link was establishes successfully, saving this forum from another useless thread.

    Yurii