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.

AM3351: Rx CRC Errors and Align/Code Errors with KSZ8081RNAIA (RMII)

Part Number: AM3351
Other Parts Discussed in Thread: AM3352

This is a custom board using AM3351 (ZCE package).  We are not booting from ethernet (booting from MMC1).

The PHY we are using is the KSZ8081RNAIA with RMII.  We use the same PHY on a different board with the exact same connectivity and similar PCB trace lengths.  That board uses a Kinetis K64 and has no issues.

We are seeing (on wireshark) many TCP retransmissions and, as a result, slow performance.  But, all "works".  We are getting CRC and Align/Code errors as shown in ethtool below.  I've read the KSZ8081RNAIA might have issues with AM335x.  Please advise if this setup will work?  And if you have any suggestions on how to "fix"...  I believe our PCB is pretty clean and has had a lot of thought put into the trace lengths.  We have other boards using different processors and different PHYs and haven't had this issue previously...

Here are answers to your triage checklist:

root@board:~# uname -a
Linux board-4767f10f 4.14.40-g4796173fc5 #58 PREEMPT Thu May 16 08:40:35 EDT 2019 armv7l GNU/Linux

We are using the TI SDK Linux Kernel (linux-4.14.40+gitAUTOINC+4796173fc5-g4796173fc5)

We are using the base Arago filesystem with some additions.

This is a custom board.  Here is the relevant device tree info:

cpsw_default: cpsw_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1) /* rmii1_txd0 Pin L18 */
AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1) /* rmii1_txd1 Pin M18 */
AM33XX_IOPAD(0x914, PIN_OUTPUT | MUX_MODE1) /* rmii1_txen Pin K17 */
AM33XX_IOPAD(0x90C, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE1) /* rmii1_crs_dv Pin K17 */
AM33XX_IOPAD(0x940, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE1) /* rmii1_rxd0 */
AM33XX_IOPAD(0x93c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE1) /* rmii1_rxd1 */
AM33XX_IOPAD(0x910, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE1) /* rmii1_rxerr */
AM33XX_IOPAD(0x944, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* rmii1_refclk */
>;
};

cpsw_sleep: cpsw_sleep {
pinctrl-single,pins = <
AM33XX_IOPAD(0x928, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x924, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x914, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x90C, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x940, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x93c, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x910, PIN_INPUT | MUX_MODE7)
AM33XX_IOPAD(0x944, PIN_INPUT | MUX_MODE7)
>;
};

davinci_mdio_default: davinci_mdio_default {
pinctrl-single,pins = <
/* MDIO */
AM33XX_IOPAD(0x948, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
AM33XX_IOPAD(0x94c, PIN_OUTPUT | MUX_MODE0) /* mdio_clk.mdio_clk */
>;
};

davinci_mdio_sleep: davinci_mdio_sleep {
pinctrl-single,pins = <
/* MDIO reset value */
AM33XX_IOPAD(0x948, PIN_INPUT| MUX_MODE7)
AM33XX_IOPAD(0x94c, PIN_INPUT| MUX_MODE7)
>;
};

&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
};

&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};

&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
};

&cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
status = "disabled";
};

Here is the console log:

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.40-g4796173fc5 (smcmillan@ubuntu-0516) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #58 PREEMPT Thu May 16 08:40:35 EDT 2019
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: TI AM335x Board
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x82800000
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] free_area_init_node: node 0, pgdat c0d4d6f4, node_mem_map c7ec1000
[ 0.000000] Normal zone: 288 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon)
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,115200n8 root=PARTUUID=ee4fe1d5-03 rw rootfstype=f2fs rootwait rootwait
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 67468K/131072K available (8192K kernel code, 319K rwdata, 2448K rodata, 1024K init, 274K bss, 14452K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0900000 (9184 kB)
.init : 0xc0c00000 - 0xc0d00000 (1024 kB)
.data : 0xc0d00000 - 0xc0d4ff88 ( 320 kB)
.bss : 0xc0d4ff88 - 0xc0d948e4 ( 275 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, 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] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000028] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000080] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000107] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000501] timer_probe: no matching timers found
[ 0.000938] Console: colour dummy device 80x30
[ 0.001036] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
[ 0.067727] pid_max: default: 32768 minimum: 301
[ 0.068160] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.068199] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.069849] CPU: Testing write buffer coherency: ok
[ 0.071251] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.071589] Hierarchical SRCU implementation.
[ 0.072388] EFI services will not be available.
[ 0.075741] devtmpfs: initialized
[ 0.094388] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
[ 0.095306] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.095935] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.095985] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.103342] pinctrl core: initialized pinctrl subsystem
[ 0.104813] DMI not present or invalid.
[ 0.105678] NET: Registered protocol family 16
[ 0.111027] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.142160] omap_hwmod: debugss: _wait_target_disable failed
[ 0.146396] omap_hwmod: d_can0: _wait_target_ready failed: -16
[ 0.146422] omap_hwmod: d_can0: cannot be enabled for reset (3)
[ 0.149772] omap_hwmod: d_can1: _wait_target_ready failed: -16
[ 0.149796] omap_hwmod: d_can1: cannot be enabled for reset (3)
[ 0.209890] cpuidle: using governor ladder
[ 0.209976] cpuidle: using governor menu
[ 0.220241] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
[ 0.220469] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
[ 0.220594] OMAP GPIO hardware version 0.1
[ 0.222273] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
[ 0.222464] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
[ 0.224131] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
[ 0.224339] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
[ 0.225906] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
[ 0.226124] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
[ 0.242536] No ATAGs?
[ 0.242570] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.275030] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.281340] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[ 0.281623] media: Linux media interface: v0.10
[ 0.281729] Linux video capture interface: v2.00
[ 0.281997] pps_core: LinuxPPS API ver. 1 registered
[ 0.282021] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.282082] PTP clock support registered
[ 0.282367] dmi: Firmware registration failed.
[ 0.283137] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.283794] Advanced Linux Sound Architecture Driver Initialized.
[ 0.286202] clocksource: Switched to clocksource timer1
[ 0.306936] NET: Registered protocol family 2
[ 0.308550] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.308615] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.308664] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.308872] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.308928] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.309265] NET: Registered protocol family 1
[ 0.310127] RPC: Registered named UNIX socket transport module.
[ 0.310163] RPC: Registered udp transport module.
[ 0.310182] RPC: Registered tcp transport module.
[ 0.310201] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.310232] PCI: CLS 0 bytes, default 64
[ 0.311955] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[ 0.312202] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.315422] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 0.326797] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.328404] NFS: Registering the id_resolver key type
[ 0.328494] Key type id_resolver registered
[ 0.328517] Key type id_legacy registered
[ 0.328618] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.334424] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.334470] io scheduler noop registered
[ 0.334492] io scheduler deadline registered
[ 0.335033] io scheduler cfq registered (default)
[ 0.335064] io scheduler mq-deadline registered
[ 0.335085] io scheduler kyber registered
[ 0.338311] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.465561] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 0.472441] console [ttyS0] disabled
[ 0.472622] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[ 1.097503] console [ttyS0] enabled
[ 1.104526] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 1.136044] brd: module loaded
[ 1.155022] loop: module loaded
[ 1.164993] spi_omap2_mcspi: DMA requested (rx0, 41, 0).
[ 1.170569] spi_omap2_mcspi: DMA requested (tx0, 40, 0).
[ 1.193023] spi spi0.0: spi_omap2_mcspi_slave: DMA RX requested (rx0, 17).
[ 1.200136] spi spi0.0: setup: wl 8, speed 32000000, sample CPHA edge, clk no CPOL
[ 1.207837] spi-omap2-mcspi-slave: Enabling slave dma (0)
[ 1.215972] mdio_bus fixed-0: GPIO lookup for consumer reset
[ 1.215998] mdio_bus fixed-0: using lookup tables for GPIO lookup
[ 1.216018] mdio_bus fixed-0: lookup for GPIO reset failed
[ 1.216071] libphy: Fixed MDIO Bus: probed
[ 1.241198] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset
[ 1.241224] mdio_bus 4a101000.mdio: using lookup tables for GPIO lookup
[ 1.241243] mdio_bus 4a101000.mdio: lookup for GPIO reset failed
[ 1.296364] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.304097] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 1.312280] libphy: 4a101000.mdio: probed
[ 1.316576] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ8081 or KSZ8091
[ 1.327957] cpsw 4a100000.ethernet: Detected MACID = 34:03:de:6d:22:3a
[ 1.334752] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.341434] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.346899] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.357633] i2c /dev entries driver
[ 1.361914] IR NEC protocol handler initialized
[ 1.366591] IR RC5(x/sz) protocol handler initialized
[ 1.371684] IR RC6 protocol handler initialized
[ 1.376287] IR JVC protocol handler initialized
[ 1.380852] IR Sony protocol handler initialized
[ 1.385499] IR SANYO protocol handler initialized
[ 1.390270] IR Sharp protocol handler initialized
[ 1.395007] IR MCE Keyboard/mouse protocol handler initialized
[ 1.400909] IR XMP protocol handler initialized
[ 1.408810] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.416726] sdhci: Secure Digital Host Controller Interface driver
[ 1.422960] sdhci: Copyright(c) Pierre Ossman
[ 1.428429] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[ 1.428452] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.428492] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
[ 1.428517] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
[ 1.428535] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.428556] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
[ 1.428579] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[ 1.428594] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.428616] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[ 1.428638] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[ 1.428654] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.428670] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[ 1.430133] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.437362] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.452763] NET: Registered protocol family 10
[ 1.460293] Segment Routing with IPv6
[ 1.464182] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.471915] NET: Registered protocol family 17
[ 1.477121] Key type dns_resolver registered
[ 1.481923] omap_voltage_late_init: Voltage driver support not added
[ 1.556853] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
[ 1.564374] core: _opp_supported_by_regulators: OPP minuV: 1078000 maxuV: 1122000, not supported by regulator
[ 1.574616] cpu cpu0: _opp_add: OPP not supported by regulators (300000000)
[ 1.583589] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[ 1.583614] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.583656] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
[ 1.583681] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
[ 1.583699] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.583719] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
[ 1.583744] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[ 1.583760] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.583782] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
[ 1.583803] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
[ 1.583820] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.583836] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
[ 1.637481] hctosys: unable to open rtc device (rtc0)
[ 1.643481] ALSA device list:
[ 1.646768] No soundcards found.
[ 1.654708] Waiting for root device PARTUUID=ee4fe1d5-03...
[ 1.676222] random: fast init done
[ 1.703804] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.713966] mmc0: new high speed SDHC card at address 1234
[ 1.720633] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[ 1.727546] mmcblk0: p1 p2 p3
[ 1.795795] F2FS-fs (mmcblk0p3): Mounted with checkpoint version = 59803777
[ 1.803173] VFS: Mounted root (f2fs filesystem) on device 179:3.
[ 1.811944] devtmpfs: mounted
[ 1.819953] Freeing unused kernel memory: 1024K
[ 2.191340] systemd[1]: System time before build time, advancing clock.
[ 2.283587] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN default-hierarchy=hybrid)
[ 2.306049] systemd[1]: Detected architecture arm.
[ 2.348477] systemd[1]: Set hostname to <board-4767f10f>.
[ 3.332258] systemd[1]: Configuration file /etc/systemd/system/linux_mcu.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[ 3.349383] systemd[1]: /etc/systemd/system/linux_mcu.service:4: Unknown lvalue 'Type' in section 'Unit'
[ 3.622544] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.630680] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 3.666787] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.674258] systemd[1]: Listening on Journal Socket (/dev/log).
[ 3.706798] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.714214] systemd[1]: Listening on Journal Socket.
[ 3.747863] systemd[1]: Listening on udev Control Socket.
[ 3.802565] systemd[1]: Listening on Process Core Dump Socket.
[ 4.272617] cryptodev: loading out-of-tree module taints kernel.
[ 4.317237] cryptodev: driver 1.9 loaded.
[ 5.628942] systemd-journald[62]: Received request to flush runtime journal from PID 1
[ 10.540696] ti_am335x_tscadc: exports duplicate symbol am335x_tsc_se_adc_done (owned by kernel)
[ 10.702613] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 10.787923] omap_rtc 44e3e000.rtc: already running
[ 10.836592] omap_rtc 44e3e000.rtc: char device (253:0)
[ 10.836995] omap_rtc 44e3e000.rtc: registered as rtc0
[ 10.921472] ti_am335x_tscadc: exports duplicate symbol am335x_tsc_se_adc_done (owned by kernel)
[ 11.213049] ti_am335x_tscadc: exports duplicate symbol am335x_tsc_se_adc_done (owned by kernel)
[ 11.629065] ti_am335x_tscadc: exports duplicate symbol am335x_tsc_se_adc_done (owned by kernel)
[ 13.184483] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[ 13.430576] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[ 13.496525] omap-aes 53500000.aes: will run requests pump with realtime priority
[ 13.674877] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 13.738995] remoteproc remoteproc0: wkup_m3 is available
[ 13.943344] remoteproc remoteproc0: powering up wkup_m3
[ 13.989248] PM: Cannot get wkup_m3_ipc handle
[ 14.135567] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224628
[ 14.283665] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
[ 14.406401] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 16.521055] net eth0: initializing cpsw version 1.12 (0)
[ 16.768039] Micrel KSZ8081 or KSZ8091 4a101000.mdio:00: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[ 16.966768] libphy: PHY not found
[ 17.021156] net eth0: phy "" not found on slave 1, err -19
[ 17.286621] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 20.088184] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 20.190571] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 20.932332] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 20.964744] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 35.032380] random: crng init done
[ 35.035863] random: 7 urandom warning(s) missed due to ratelimiting

ethtool eth0

Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)

ethtool -S eth0

NIC statistics:
Good Rx Frames: 5310
Broadcast Rx Frames: 319
Multicast Rx Frames: 1720
Pause Rx Frames: 0
Rx CRC Errors: 205
Rx Align/Code Errors: 127
Oversize Rx Frames: 0
Rx Jabbers: 0
Undersize (Short) Rx Frames: 0
Rx Fragments: 18
Rx Octets: 2752360
Good Tx Frames: 9403
Broadcast Tx Frames: 3
Multicast Tx Frames: 139
Pause Tx Frames: 0
Deferred Tx Frames: 0
Collisions: 0
Single Collision Tx Frames: 0
Multiple Collision Tx Frames: 0
Excessive Collisions: 0
Late Collisions: 0
Tx Underrun: 0
Carrier Sense Errors: 0
Tx Octets: 3326302
Rx + Tx 64 Octet Frames: 1146
Rx + Tx 65-127 Octet Frames: 3414
Rx + Tx 128-255 Octet Frames: 6017
Rx + Tx 256-511 Octet Frames: 686
Rx + Tx 512-1023 Octet Frames: 193
Rx + Tx 1024-Up Octet Frames: 3589
Net Octets: 6305704
Rx Start of Frame Overruns: 0
Rx Middle of Frame Overruns: 0
Rx DMA Overruns: 0
Rx DMA chan 0: head_enqueue: 1
Rx DMA chan 0: tail_enqueue: 4493
Rx DMA chan 0: pad_enqueue: 0
Rx DMA chan 0: misqueued: 0
Rx DMA chan 0: desc_alloc_fail: 0
Rx DMA chan 0: pad_alloc_fail: 0
Rx DMA chan 0: runt_receive_buf: 0
Rx DMA chan 0: runt_transmit_bu: 0
Rx DMA chan 0: empty_dequeue: 0
Rx DMA chan 0: busy_dequeue: 3985
Rx DMA chan 0: good_dequeue: 4366
Rx DMA chan 0: requeue: 0
Rx DMA chan 0: teardown_dequeue: 0
Tx DMA chan 0: head_enqueue: 9389
Tx DMA chan 0: tail_enqueue: 14
Tx DMA chan 0: pad_enqueue: 0
Tx DMA chan 0: misqueued: 14
Tx DMA chan 0: desc_alloc_fail: 0
Tx DMA chan 0: pad_alloc_fail: 0
Tx DMA chan 0: runt_receive_buf: 0
Tx DMA chan 0: runt_transmit_bu: 119
Tx DMA chan 0: empty_dequeue: 9389
Tx DMA chan 0: busy_dequeue: 0
Tx DMA chan 0: good_dequeue: 9403
Tx DMA chan 0: requeue: 0
Tx DMA chan 0: teardown_dequeue: 0

ifconfig eth0

eth0 Link encap:Ethernet HWaddr 34:03:DE:6D:22:3A
inet addr:192.168.0.114 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::3603:deff:fe6d:223a%3068917144/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4393 errors:0 dropped:470 overruns:0 frame:0
TX packets:9406 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2414343 (2.3 MiB) TX bytes:3288882 (3.1 MiB)
Interrupt:45

  • Hi Scott,
    Please provide your trace lengths for the RMII bus. Please ensure that you include all signals.

    This PHY supports RMII REFCLK CLOCK_OUT mode. Are you using this mode or are you using an external, shared, 50MHz RMII REFCLK? If the former, please provide the PHY -> MAC REFCLK trace length. If the latter, please provide both the clock source -> PHY and clock source -> MAC trace lengths.
  • We are using the clock from the PHY and not a shared external clock.

    Here are the signal traces:

    First column: Name
    Second column: Routed Length (mil) PHY to term resistor
    Third column: Routed Length (mil) Term resistor to AM3351
    Fourth column: Total Routed Length (mil)

    RMII1_CRS_DV 88.305 699.477 787.782
    RMII1_MDC 884.253 99.729 983.982
    RMII1_MDIO 930.404 149.415 1079.819
    RMII1_REFCLK 90.55 693.246 783.796
    RMII1_RXD0 71.574 848.577 920.151
    RMII1_RXD1 110.268 870.642 980.91
    RMII1_RXER 90.548 655.98 746.528
    RMII1_TXD0 746.808 124.354 871.162
    RMII1_TXD1 750.443 123.701 874.144
    RMII1_TXEN 707.443 158.613 866.056


    thanks,
    Scott
  • Thanks Scott.

    Timing for your board is pretty tight, but assuming the REFCLK is clean, it shouldn't be an issue.

    Can you try limiting the interface to 10Mb and re-run your test? Please post results here.
  • I had tried that previously with pretty similar results. I just did it again and below. is ethtool -S eth0

    When you say "clean", I assume that means the +/- 300 ps jitter on the KSZ8081RNAIA is ok here. Is that correct?

    NIC statistics:
    Good Rx Frames: 3521
    Broadcast Rx Frames: 71
    Multicast Rx Frames: 342
    Pause Rx Frames: 0
    Rx CRC Errors: 59
    Rx Align/Code Errors: 58
    Oversize Rx Frames: 0
    Rx Jabbers: 0
    Undersize (Short) Rx Frames: 0
    Rx Fragments: 49
    Rx Octets: 2342480
    Good Tx Frames: 9168
    Broadcast Tx Frames: 8
    Multicast Tx Frames: 122
    Pause Tx Frames: 0
    Deferred Tx Frames: 0
    Collisions: 0
    Single Collision Tx Frames: 0
    Multiple Collision Tx Frames: 0
    Excessive Collisions: 0
    Late Collisions: 0
    Tx Underrun: 0
    Carrier Sense Errors: 0
    Tx Octets: 3270556
    Rx + Tx 64 Octet Frames: 661
    Rx + Tx 65-127 Octet Frames: 2850
    Rx + Tx 128-255 Octet Frames: 5609
    Rx + Tx 256-511 Octet Frames: 197
    Rx + Tx 512-1023 Octet Frames: 30
    Rx + Tx 1024-Up Octet Frames: 3459
    Net Octets: 5699985
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan 0: head_enqueue: 1
    Rx DMA chan 0: tail_enqueue: 3484
    Rx DMA chan 0: pad_enqueue: 0
    Rx DMA chan 0: misqueued: 0
    Rx DMA chan 0: desc_alloc_fail: 0
    Rx DMA chan 0: pad_alloc_fail: 0
    Rx DMA chan 0: runt_receive_buf: 0
    Rx DMA chan 0: runt_transmit_bu: 0
    Rx DMA chan 0: empty_dequeue: 0
    Rx DMA chan 0: busy_dequeue: 3241
    Rx DMA chan 0: good_dequeue: 3357
    Rx DMA chan 0: requeue: 0
    Rx DMA chan 0: teardown_dequeue: 0
    Tx DMA chan 0: head_enqueue: 9161
    Tx DMA chan 0: tail_enqueue: 7
    Tx DMA chan 0: pad_enqueue: 0
    Tx DMA chan 0: misqueued: 7
    Tx DMA chan 0: desc_alloc_fail: 0
    Tx DMA chan 0: pad_alloc_fail: 0
    Tx DMA chan 0: runt_receive_buf: 0
    Tx DMA chan 0: runt_transmit_bu: 56
    Tx DMA chan 0: empty_dequeue: 9161
    Tx DMA chan 0: busy_dequeue: 0
    Tx DMA chan 0: good_dequeue: 9168
    Tx DMA chan 0: requeue: 0
    Tx DMA chan 0: teardown_dequeue: 0
  • Scott,
    I wasn't aware the jitter on the Micrel PHY was this high. It really cuts into (already tight) timing margins for RMII as a bus.

    A relatively easy test would be to insert a 6" blue wire into the REFCLK signal path. This will add ~ 960ps of delay to the clock which helps balance the PHY's setup and hold margins.
  • If that jitter is a concern that might lead to failed setup times, we'd rather go in for a solution that would work on our next board spin.  We are planning to replace the 25 MHz oscillator used for the PHY with a 50 MHz oscillator (SiTIME SIT8008BI-12-33E-50.000000G) that has much better jitter.  And using that to drive the REFCLK as well on the AM335x.

    Hopefully that will fix the issue.  Thanks.

  • Scott,
    I'll always recommend the external 50MHz oscillator option. The external oscillators typically perform better than integrated versions and the bus timing requirements are easier to meet.

    Please ensure you re-run your RMII timing analysis prior to committing the new design to PCB. As I mentioned earlier...RMII is tight.
  • We put in an external oscillator (the one I stated earlier in this thread). We have pretty much exactly the same results.

    Is your concern about tight timing related to the TX and not the RX? As I look at the output delay of the KSZ8081 its between 7 and 13 ns which I think would be fine for the stated AM335x setup and hold times of 4 and 2 ns.

    It does seem the delay time of the AM335x TXD can be pretty low (between 2 and 13 ns) that might cause an issue. But nothing in what I'm seeing says this issue is on the TXD side, but on the RXD side (all the CRC errors, for example).

    The trace lengths are identical to previously with the exception of the reference clock. There is an additional 230 mils of blue wire added to that length. And there is 72.259 mils from the reference clock to the XI input on the PHY.

    Please advise... Thanks.
  • Hi Scott,
    So I'm clear...the CLK -> MAC REFLCK length is 1013mils and the CLK -> PHY REFCLK length is 72mils?
  • Yes, thanks.

    However, I didn't realize Linux would default the RMII to use the internal clock. And it appears the main issue we are seeing was that I didn't include "rmii-clock-ext;" in the phy_sel component of the device tree. After setting that, I get close to 95 Mbps using iperf on the receive side and around 68 Mbps on the transmit side. And thats with a board using the low jitter reference clock and getting the same results with a board using the reference clock from the Micrel PHY.

    In your experience, are those transmit numbers normal on the am3351?

    Thanks for your help and sorry about the misdirect and not understanding the external clock was being set incorrectly.
  • Never mind about the transmit. I killed one of our processes that was taking about 7-10% of cpu and I'm able to get in the 95 Mbps range for transmit as well...

    thanks,
    Scott