UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ingdb
Observer
839 Views
Registered: ‎09-20-2011

kernel crash on XC7Z015 custom board with DP83867 PHY

Jump to solution

Hello everyone,

 

We're designing a custom board with a XC7Z015 and a DP83867 from TI as PHY.

We're using the petalinux workflow.

The kernel is booted from U-Boot over TFT.

=> Ethernet is working in U-Boot but the kernel is crashing when initialising Ethernet.

 

 

 

I adjusted the device tree to use the dp83867 (system-user.dtsi)

&gem0 {
  local-mac-address = [00 0a 35 00 c0 12];
  phy-handle = <&phy0>;
  phy-mode = "rgmii-id";      
  mdio {
   status = "okay";
   #address-cells = <1>;
   #size-cells = <0>;
   phy0: phy@0 {    
    compatible = "ethernet-phy-ieee802.3-c22";
    ti,rx-internal-delay = <0x8>; 
    ti,tx-internal-delay = <0xa>; 
    ti,fifo-depth = <0x01>;
    device_type = "ethernet-phy";
    ti,dp83867-rxctrl-strap-quirk;
    status = "okay";
    reg = <0>;
   } ;
  } ; 
};

When starting the kernel I always get a kernel Oop:

 

eth0: ethernet@e000b000
Hit any key to stop autoboot:  4  3  2  1  0 
Using ethernet@e000b000 device
TFTP from server 192.168.1.29; our IP address is 192.168.1.191
Filename 'image.ub'.
Load address: 0x10000000
Loading: *#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##############################
	 7.1 MiB/s
done
Bytes transferred = 9971572 (982774 hex)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x100000f4
     Data Size:    3940959 Bytes = 3.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   7a1c3de2c0dd3b2d1d316e186291e03563bd2739
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'ramdisk@1' ramdisk subimage
     Description:  petalinux-user-image
     Type:         RAMDisk Image
     Compression:  gzip compressed
     Data Start:   0x103c5cec
     Data Size:    6014201 Bytes = 5.7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   ca154cd4f2cce427d0c9053826f0d42637a5b346
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x103c2454
     Data Size:    14294 Bytes = 14 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   7bf845e8230479bb4e402576a0080cb4254e23a6
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x103c2454
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 07a43000, end 07fff4f9 ... OK
   Loading Device Tree to 07a3c000, end 07a427d5 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0

Linux version 4.14.0-xilinx (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Thu Aug 30 14:42:24 CEST 2018

CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

OF: fdt: Machine model: xlnx,zynq-7000

bootconsole [earlycon0] enabled

Memory policy: Data cache writealloc

cma: Reserved 16 MiB at 0x3f000000

On node 0 totalpages: 262144

free_area_init_node: node 0, pgdat c0a3b300, node_mem_map ef7f7000

  Normal zone: 1536 pages used for memmap

  Normal zone: 0 pages reserved

  Normal zone: 196608 pages, LIFO batch:31

  HighMem zone: 65536 pages, LIFO batch:15

percpu: Embedded 16 pages/cpu @ef7ce000 s34764 r8192 d22580 u65536

pcpu-alloc: s34764 r8192 d22580 u65536 alloc=16*4096

pcpu-alloc: [0] 0 [0] 1 

Built 1 zonelists, mobility grouping on.  Total pages: 260608

Kernel command line: console=ttyPS0,115200 earlyprintk

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 1007008K/1048576K available (6144K kernel code, 239K rwdata, 1564K rodata, 1024K init, 153K bss, 25184K reserved, 16384K cma-reserved, 245760K highmem)

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)

    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)

    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

    modules : 0xbf000000 - 0xbfe00000   (  14 MB)

      .text : 0xc0008000 - 0xc0700000   (7136 kB)

      .init : 0xc0900000 - 0xc0a00000   (1024 kB)

      .data : 0xc0a00000 - 0xc0a3bf00   ( 240 kB)

       .bss : 0xc0a3bf00 - 0xc0a625c4   ( 154 kB)

Preemptible hierarchical RCU implementation.

	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

	Tasks RCU enabled.

RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2

NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16

efuse mapped to f0801000

slcr mapped to f0803000

L2C: platform modifies aux control register: 0x72360000 -> 0x72760000

L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000

L2C-310 erratum 769419 enabled

L2C-310 enabling early BRESP for Cortex-A9

L2C-310 full line of zeros enabled for Cortex-A9

L2C-310 ID prefetch enabled, offset 1 lines

L2C-310 dynamic clock gating enabled, standby mode enabled

L2C-310 cache controller enabled, 8 ways, 512 kB

L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001

zynq_clock_init: clkc starts at f0803100

Zynq clock init

sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns

clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns

Switching to timer-based delay loop, resolution 3ns

clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns

timer #0 at f080b000, irq=17

Console: colour dummy device 80x30

Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)

Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)

CPU: Testing write buffer coherency: ok

CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

Setting up static identity map for 0x100000 - 0x100060

Hierarchical SRCU implementation.

smp: Bringing up secondary CPUs ...

CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

smp: Brought up 1 node, 2 CPUs

SMP: Total of 2 processors activated (1333.33 BogoMIPS).

CPU: All CPU(s) started in SVC mode.

devtmpfs: initialized

random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

futex hash table entries: 512 (order: 3, 32768 bytes)

pinctrl core: initialized pinctrl subsystem

random: fast init done

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

cpuidle: using governor menu

hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

hw-breakpoint: maximum watchpoint size is 4 bytes.

zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000

zynq-pinctrl 700.pinctrl: zynq pinctrl initialized

e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 27, base_baud = 6249999) is a xuartps
`\AC\CBk׋\AB\D2+W/\AA*LW\90Y\B7X\B1\B6ed
console [ttyPS0] enabled

bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled

vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5876K
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
m25p80 spi0.0: found n25q256a, expected n25q512a
m25p80 spi0.0: n25q256a (32768 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000002000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
macb e000b000.ethernet: Cadence caps 0xa0000009
libphy: MACB_mii_bus: probed
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx #1
Hardware name: Xilinx Zynq Platform
task: ef03f840 task.stack: ef040000
PC is at mdiobus_read.part.4+0x0/0x4
LR is at mdiobus_unregister+0x20/0x80
pc : [<c040bb1c>]    lr : [<c040b660>]    psr: 20000013
sp : ef041e00  ip : 00000000  fp : ffffffed
r10: ef2784c0  r9 : ef111610  r8 : 00000000
r7 : ef7f42f0  r6 : 00000000  r5 : ef27b000  r4 : c7e1b400
r3 : 00000003  r2 : 00000000  r1 : 2eea0000  r0 : 00000023
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xef040210)
Stack: (0xef041e00 to 0xef042000)
1e00: ef278000 ef27b000 00000000 ef7f42f0 00000000 c0417618 ffffffff ef041e54
1e20: c081dd9d c0227ed4 ef7f42f0 ef7f4760 c04153a8 00000001 00000001 00000002
1e40: c7e183c8 c7e14200 c7e14180 c7e14100 00000000 00000000 00000001 00000001
1e60: 00000000 c0416d30 ef111610 c0a1e568 00000000 c0a1e568 00000000 00000000
1e80: 00000000 c03b1914 ef111610 c0a562d4 c0a562d8 c03b0458 ef111610 ef111644
1ea0: c0a1e568 c0a18bb0 00000000 c093cde4 c093383c c03b0598 00000000 c0a1e568
1ec0: c03b051c c03aeca8 ef075f58 ef10ebb4 c0a1e568 c7e15400 00000000 c03afad0
1ee0: c081513d c081513e 00000000 c0a1e568 c0a3bf00 c0933834 c091aecc c03b0d1c
1f00: ffffe000 c0a3bf00 c0933834 c0101a54 c081d840 efffcdd6 c0886600 00000000
1f20: 00000000 c0132df4 00000000 c0885670 000000cf 00000006 00000006 c088669c
1f40: 000000ce c088669c efffcdd6 00000000 c093383c 00000007 00000007 c0a3bf00
1f60: c0933834 000000cf c0a3bf00 c093383c 00000000 c0900da4 00000006 00000006
1f80: 00000000 c090059c 00000000 c0643054 00000000 00000000 00000000 00000000
1fa0: 00000000 c064305c 00000000 c01070f0 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff 00000000
[<c040bb1c>] (mdiobus_read.part.4) from [<c040b660>] (mdiobus_unregister+0x20/0x80)
[<c040b660>] (mdiobus_unregister) from [<c0417618>] (macb_probe+0x8e8/0xb74)
[<c0417618>] (macb_probe) from [<c03b1914>] (platform_drv_probe+0x50/0x9c)
[<c03b1914>] (platform_drv_probe) from [<c03b0458>] (driver_probe_device+0x1ec/0x2b0)
[<c03b0458>] (driver_probe_device) from [<c03b0598>] (__driver_attach+0x7c/0xa8)
[<c03b0598>] (__driver_attach) from [<c03aeca8>] (bus_for_each_dev+0x7c/0x8c)
[<c03aeca8>] (bus_for_each_dev) from [<c03afad0>] (bus_add_driver+0x16c/0x1d4)
[<c03afad0>] (bus_add_driver) from [<c03b0d1c>] (driver_register+0xa0/0xe0)
[<c03b0d1c>] (driver_register) from [<c0101a54>] (do_one_initcall+0xfc/0x11c)
[<c0101a54>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x188/0x1c8)
[<c0900da4>] (kernel_init_freeable) from [<c064305c>] (kernel_init+0x8/0x108)
[<c064305c>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
Code: e8bd4010 eafe8ea2 c0a1c5e0 c0742f94 (e7f001f2) 
---[ end trace 3e8b35fe5223be97 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D         4.14.0-xilinx #1
Hardware name: Xilinx Zynq Platform
[<c010e894>] (unwind_backtrace) from [<c010aad0>] (show_stack+0x10/0x14)
[<c010aad0>] (show_stack) from [<c0632548>] (dump_stack+0x80/0xa0)
[<c0632548>] (dump_stack) from [<c010cff8>] (ipi_cpu_stop+0x3c/0x70)
[<c010cff8>] (ipi_cpu_stop) from [<c010d818>] (handle_IPI+0x64/0x84)
[<c010d818>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x84/0x90)
[<c0101420>] (gic_handle_irq) from [<c010b50c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0a01f48 to 0xc0a01f90)
1f40:                   00000001 00000000 00000000 c0116880 00000000 00000000
1f60: ffffe000 c0a03c68 c0a03cb4 c0933a30 00000000 00000000 2ee90000 c0a01f98
1f80: c0107afc c0107aec 60000113 ffffffff
[<c010b50c>] (__irq_svc) from [<c0107aec>] (arch_cpu_idle+0x1c/0x38)
[<c0107aec>] (arch_cpu_idle) from [<c0149438>] (do_idle+0xf8/0x1a8)
[<c0149438>] (do_idle) from [<c0149620>] (cpu_startup_entry+0x18/0x1c)
[<c0149620>] (cpu_startup_entry) from [<c0900bbc>] (start_kernel+0x304/0x364)
[<c0900bbc>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

I guess its a device tree issue but I am a little lost here. Any idea is very appreciated.

 

best regards

Matthias

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer ingdb
Observer
780 Views
Registered: ‎09-20-2011

Re: kernel crash on XC7Z015 custom board with DP83867 PHY

Jump to solution

found the bug, the phy register in the devictree was wrong 

0 Kudos
1 Reply
Highlighted
Observer ingdb
Observer
781 Views
Registered: ‎09-20-2011

Re: kernel crash on XC7Z015 custom board with DP83867 PHY

Jump to solution

found the bug, the phy register in the devictree was wrong 

0 Kudos