AnsweredAssumed Answered

Kernel Oops with i.MX6Q

Question asked by Mach Lee on Jun 21, 2017

I have kernel oops issue with i.MX6Q with LAN8720 (SMSC PHY), SSM2604 (Analog Device Audio Codec)

* Kernel Version is  imx_4.1.15_2.0.0_ga  from git://git.freescale.com/imx/linux-imx.git

* The ethernet phy interface is RMII.

   So I modified arch/arm/mach-imx/clk-imx6q.c like this.

diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index ad0897a..808213f 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -898,7 +898,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
}

/*Set enet_ref clock to 125M to supply for RGMII tx_clk */
- clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], 125000000);
+ //clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], 125000000);
+
+ clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], 50000000);

#ifdef CONFIG_MX6_VPU_352M
/*

And modified imx6qdl.dtsi is like below.

diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 522d017..53291fe 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1026,9 +1026,14 @@
fec: ethernet@02188000 {
compatible = "fsl,imx6q-fec";
reg = <0x02188000 0x4000>;
+ /*
interrupts-extended =
<&gpc 0 118 IRQ_TYPE_LEVEL_HIGH>,
<&gpc 0 119 IRQ_TYPE_LEVEL_HIGH>;
+ */
+ interrupts-extended = <0 74 IRQ_TYPE_LEVEL_HIGH>,
+ <0 75 IRQ_TYPE_LEVEL_HIGH>;
+
clocks = <&clks IMX6QDL_CLK_ENET>,
<&clks IMX6QDL_CLK_ENET>,
<&clks IMX6QDL_CLK_ENET_REF>;

 

I cannot figure out the problems.

But u-boot works fine. I also ported the u-boot in a similar way like the kernel.

May I ask any kind of hints, please..?

Thank you.

 

And this is kernel boot logs built for MFG tools

 

U-Boot 2016.01-dirty (Jun 22 2017 - 02:17:01 +0900)

CPU: Freescale i.MX6Q rev1.5 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 34C
Reset cause: POR
Board: MX6Q-Einsys
I2C: ready
DRAM: 1 GiB
PMIC: PFUZE100 ID=0x10
MMC: FSL_SDHC: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: FEC [PRIME]
Warning: FEC (eth0) using random MAC address - ca:75:03:a2:87:68

Hit any key to stop autoboot: 0
Kernel image @ 0x10800000 [ 0x000000 - 0x508620 ]
## Loading init Ramdisk from Legacy Image at 12c00000 ...
Image Name: fsl-image-mfgtool-initramfs-imx6
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 8591032 Bytes = 8.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 18000000
Booting using the fdt blob at 0x18000000
Loading Ramdisk to 4ed1b000, end 4f54c6b8 ... OK
Loading Device Tree to 4ed0e000, end 4ed1aab2 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15+ (mach@sip) (gcc version 5.4.1 20170404 (Linaro GCC 5.4-2017.05) ) #1 SMP PREEMPT Thu Jun 22 01:03:18 KST 2017
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 Quad Einsys Board
Reserved memory: created CMA memory pool at 0x3a000000, size 320 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @bf709000 s16768 r8192 d24192 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: console=ttymxc0,115200 rdinit=/linuxrc
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: 692756K/1048576K available (6482K kernel code, 242K rwdata, 2196K rodata, 384K init, 413K bss, 28140K reserved, 327680K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
lowmem : 0x80000000 - 0xc0000000 (1024 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.text : 0x80008000 - 0x80881cdc (8680 kB)
.init : 0x80882000 - 0x808e2000 ( 384 kB)
.data : 0x808e2000 - 0x8091e980 ( 243 kB)
.bss : 0x80921000 - 0x80988634 ( 414 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.
Additional per-CPU info printed with stalls.
NR_IRQS:16 nr_irqs:16 16
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 16 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 16 ways, 1024 kB
L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76470001
mxc_clocksource_init 3000000
Switching to timer-based delay loop, resolution 333ns
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
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 0x10008280 - 0x100082f0
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (24.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
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
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
CPU identified as i.MX6Q, silicon rev 1.5
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
mxs-dma 110000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA
i2c i2c-2: IMX I2C adapter registered
i2c i2c-2: can't use DMA
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
imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource mxc_timer1
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.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 8392K (bed1b000 - bf54d000)
CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 1024 (order: 4, 65536 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
mxc_sdc_fb fb@0: NO mxc display driver found!
mxc_sdc_fb fb@1: NO mxc display driver found!
mxc_sdc_fb fb@2: NO mxc display driver found!
mxc_sdc_fb fb@3: NO mxc display driver found!
imx-sdma 20ec000.sdma: no iram assigned, using external mem
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
pfuze100-regulator 1-0008: Full layer: 2, Metal layer: 1
pfuze100-regulator 1-0008: FAB: 0, FIN: 0
pfuze100-regulator 1-0008: pfuze100 found.
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 25, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 292, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
[drm] Initialized drm 1.1.0 20060810
[drm] Initialized vivante 1.0.0 20120216 on minor 0
brd: module loaded
loop: module loaded
spi_imx 2008000.ecspi: probed
2188000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
mousedev: PS/2 mouse device common for all mice
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
imx2-wdt 20c0000.wdog: use WDOG_B to reboot.
imx2-wdt 20c0000.wdog: timeout 60 sec (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@0219c000: voltage-ranges unspecified
sdhci-esdhc-imx 219c000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
mmc3: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
mxc_vpu 2040000.vpu_fsl: VPU initialized
mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 01:06:15 UTC (3975)
VGEN3: disabling
VGEN2: disabling
VGEN1: disabling
SWBST: disabling
SW4: disabling
hdmi-5v-supply: disabling
ssm2604-supply: disabling
usb_h1_vbus: disabling
usb_otg_vbus: disabling
ALSA device list:
No soundcards found.
Freeing unused kernel memory: 384K (80882000 - 808e2000)
Unable to handle kernel paging request at virtual address 3ee51000
pgd = a8590000
[3ee51000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 3 PID: 64 Comm: linuxrc Not tainted 4.1.15+ #1
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
task: a80df6c0 ti: a8580000 task.ti: a8580000
PC is at __mod_zone_page_state+0x70/0xcc
LR is at __mod_zone_page_state+0x68/0xcc
pc : [<800c7248>] lr : [<800c7240>] psr: 20000193
sp : a8581d00 ip : 8091db4c fp : 60000113
r10: bf76e020 r9 : 00000003 r8 : 808e418c
r7 : 8091dbcc r6 : 808e24e4 r5 : 00000000 r4 : 808e24bc
r3 : 808e24e4 r2 : 3ee51000 r1 : 807dbeb0 r0 : 800c7248
Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 3859004a DAC: 00000015
Process linuxrc (pid: 64, stack limit = 0xa8580210)
Stack: (0xa8581d00 to 0xa8582000)
1d00: bf76e020 8091db44 00000000 00000001 8091d7c0 800bbf84 00000000 8091d7c0
1d20: 0000000b 000004c0 8091d7c0 bf72e9d0 bf76e020 800bc950 000000c0 bf72e9a0
1d40: 800bbeb4 00000000 00000fcc bf76e0a0 808dd9a0 3ee51000 bf72e9a0 a8581e20
1d60: 00031000 000d5000 808e44d4 800bcc9c bf76e0a0 00030000 bf76e0a0 00000000
1d80: a8581e20 800bcd00 a85640c0 00030000 bf76e0a0 800d15ec 10b8559f a84f98f0
1da0: a8584000 00000000 bfc61c9c a85561c0 000d5000 a8580000 a8584000 000d4fff
1dc0: 000004c0 ffffffe0 00000000 00000000 8091e600 a84f98f0 ffffffff a8581e20
1de0: 00000000 00000000 a8509000 a8588000 00000001 800d2568 00000000 a85561c0
1e00: a84f98f0 a85561c0 a8581e48 a80dfac8 a85561c0 800d845c 00000001 8062ff8c
1e20: a85561c0 00000001 00000000 00000000 ffffffff 00000000 00000100 00000020
1e40: 00000400 a859b000 20000113 a859a000 00000000 00000000 a85561c0 00000000
1e60: a8582000 a80dfac8 a85561c0 00000000 a8582000 80035c08 a85561c0 a80df6c0
1e80: a8582000 800f3414 a8599000 a859a0c0 a8597034 a8597000 a8509000 a8597034
1ea0: a8581eb8 a8598000 a8599000 a859a000 00000001 80132f6c a8509000 00000080
1ec0: a859a0c0 00000000 00000001 a8509000 ffffe000 a8581efc a8580000 00000005
1ee0: 00000000 800f22ac 00000017 a8581efc 00000000 7effff88 00000000 01370e80
1f00: bff41160 bf50bf88 00000006 a8509000 808f364c fffffff8 8096f858 00000001
1f20: 808f3abc 00000001 807a4834 800f2cd0 00000000 a80df6c0 00000040 013710f0
1f40: a8530000 a8509000 00000000 ffffe000 00000001 800f3ea8 a8582038 00000000
1f60: 00000000 a80df930 00000000 013702b0 013710f0 000e971c 0000000b 8000f644
1f80: a8580000 00000000 00000000 800f4260 00000000 00000000 76fa4694 01370f28
1fa0: 01370e60 8000f4c0 01370f28 01370e60 01370e60 013702b0 013710f0 000eab9c
1fc0: 01370f28 01370e60 000e971c 0000000b 013710f0 01370e60 01370e80 00000000
mmc3: MAN_BKOPS_EN bit is not set
1fe0: 76eba520 7ec25a84 0003c658 76eba52c 60070010 01370e60 eaf7bffb 7effffef
[<800c7248>] (__mod_zone_page_state) from [<800bbf84>] (__activate_page+0xd0/0x110)
mmc3: new DDR MMC card at address 0001
mmcblk3: mmc3:0001 MMC04G 3.60 GiB
mmcblk3boot0: mmc3:0001 MMC04G partition 1 16.0 MiB
mmcblk3boot1: mmc3:0001 MMC04G partition 2 16.0 MiB
mmcblk3rpmb: mmc3:0001 MMC04G partition 3 128 KiB
[<800bbf84>] (__activate_page) from [<800bc950>] (pagevec_lru_move_fn+0x8c/0xe8)
[<800bc950>] (pagevec_lru_move_fn) from [<800bcc9c>] (activate_page+0xd0/0xf4)
[<800bcc9c>] (activate_page) from [<800bcd00>] (mark_page_accessed+0x40/0x11c)
[<800bcd00>] (mark_page_accessed) from [<800d15ec>] (unmap_single_vma+0x46c/0x5a8)
[<800d15ec>] (unmap_single_vma) from [<800d2568>] (unmap_vmas+0x54/0x68)
[<800d2568>] (unmap_vmas) from [<800d845c>] (exit_mmap+0xd8/0x1d8)
[<800d845c>] (exit_mmap) from [<80035c08>] (mmput+0x44/0xf8)
[<80035c08>] (mmput) from [<800f3414>] (flush_old_exec+0x45c/0x5cc)
[<800f3414>] (flush_old_exec) from [<80132f6c>] (load_elf_binary+0x284/0x10bc)
[<80132f6c>] (load_elf_binary) from [<800f2cd0>] (search_binary_handler+0x80/0x1b4)
[<800f2cd0>] (search_binary_handler) from [<800f3ea8>] (do_execveat_common+0x4b4/0x5e0)
[<800f3ea8>] (do_execveat_common) from [<800f4260>] (SyS_execve+0x30/0x38)
[<800f4260>] (SyS_execve) from [<8000f4c0>] (ret_fast_syscall+0x0/0x3c)
Code: e59f005c eb07c165 e1a03006 ee1d2f90 (e7c35002)
---[ end trace 40d7db0c02e3f137 ]---
note: linuxrc[64] exited with preempt_count 3
random: nonblocking pool is initialized

Original Attachment has been moved to: imx6q_mfg_defconfig.zip

Original Attachment has been moved to: Schematics.zip

Original Attachment has been moved to: iMX6Q_dts.zip

Outcomes