AnsweredAssumed Answered

fspi on ls1028a leads to kernel panic

Question asked by Yuvarajesh Valleru on Apr 7, 2020
Latest reply on Apr 16, 2020 by Yuvarajesh Valleru

Hi,

 

We am working on custom board based on LS1028A. I am trying to bringup fspi and dspi on our board. As there is no support for dspi I added a patch from here: [PATCH v2 1/2] dt-bindings: spi: Add fsl,ls1028a-dspi compatible. (dspi also not working in the kernel): i added device-tree configuration for fspi based on windbond w25q128jw.  Now it leads to kernel panic.Please find the error log and configurations below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error details:

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.140+gd39cc9ffcbe5 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP PREEMPT Tue Apr 7 16:28:01 UTC 2020
[ 0.000000] Boot CPU: AArch64 Processor [410fd083]
[ 0.000000] Machine model: IP01 Board
[ 0.000000] earlycon: uart8250 at MMIO 0x00000000021c0500 (options '')
[ 0.000000] bootconsole [uart8250] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 16 MiB at 0x00000000bac00000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000bbdfffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbbdcd580-0xbbdced3f]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bbdfffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] random: get_random_bytes called from start_kernel+0xa8/0x414 with crng_init=0
[ 0.000000] percpu: Embedded 25 pages/cpu s61720 r8192 d32488 u102400
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] Speculative Store Bypass Disable mitigation not required
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 241416
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: root=/dev/ram0 rw rootwait ip=192.168.0.125:192.168.0.214:192.168.0.214:{netmask}::off console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=10000000
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Memory: 868860K/980992K available (13884K kernel code, 1446K rwdata, 5504K rodata, 4224K init, 924K bss, 95748K reserved, 16384K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB)
[ 0.000000] .text : 0xffff17015e280000 - 0xffff17015f010000 ( 13888 KB)
[ 0.000000] .rodata : 0xffff17015f010000 - 0xffff17015f580000 ( 5568 KB)
[ 0.000000] .init : 0xffff17015f580000 - 0xffff17015f9a0000 ( 4224 KB)
[ 0.000000] .data : 0xffff17015f9a0000 - 0xffff17015fb09a00 ( 1447 KB)
[ 0.000000] .bss : 0xffff17015fb09a00 - 0xffff17015fbf0ce0 ( 925 KB)
[ 0.000000] fixed : 0xffff7dfffe7f9000 - 0xffff7dfffec00000 ( 4124 KB)
[ 0.000000] PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum)
[ 0.000000] 0xffff7f572d000000 - 0xffff7f572def8000 ( 14 MB actual)
[ 0.000000] memory : 0xffffd5cb40000000 - 0xffffd5cb7be00000 ( 958 MB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=2.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] ITS [mem 0x06020000-0x0603ffff]
[ 0.000000] ITS@0x0000000006020000: allocated 65536 Devices @b9480000 (flat, esz 8, psz 64K, shr 0)
[ 0.000000] ITS: using cache flushing for cmd queue
[ 0.000000] GIC: using LPI property table @0x00000000b9430000
[ 0.000000] ITS: Allocated 1792 chunks for LPIs
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000006040000
[ 0.000000] CPU0: using LPI pending table @0x00000000b9440000
[ 0.000000] GIC: using cache flushing for LPI property table
[ 0.000000] NO_HZ: Clearing 0 from nohz_full range for timekeeping
[ 0.000000] NO_HZ: Full dynticks CPUs: 1.
[ 0.000000] Note: kernel parameter 'rcu_nocbs=' contains nonexistent CPUs.
[ 0.000000] Offload RCU callbacks from CPUs: 1.
[ 0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c409fb33, max_idle_ns: 440795203156 ns
[ 0.000003] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 4398046511103ns
[ 0.008625] Console: colour dummy device 80x25
[ 0.013165] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[ 0.023657] pid_max: default: 32768 minimum: 301
[ 0.028422] Security Framework initialized
[ 0.033061] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.040600] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.047581] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.054382] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.094436] ASID allocator initialised with 32768 entries
[ 0.099973] Hierarchical SRCU implementation.
[ 0.124483] PCI/MSI: /interrupt-controller@6000000/gic-its@6020000 domain created
[ 0.132150] Platform MSI: /interrupt-controller@6000000/gic-its@6020000 domain created
[ 0.140239] fsl-mc MSI: /interrupt-controller@6000000/gic-its@6020000 domain created
[ 0.148612] EFI services will not be available.
[ 0.173222] smp: Bringing up secondary CPUs ...
[ 0.223554] Detected PIPT I-cache on CPU1
[ 0.223580] GICv3: CPU1: found redistributor 1 region 0:0x0000000006060000
[ 0.223640] CPU1: using LPI pending table @0x00000000b9720000
[ 0.223666] CPU1: Booted secondary processor [410fd083]
[ 0.223761] smp: Brought up 1 node, 2 CPUs
[ 0.250046] SMP: Total of 2 processors activated.
[ 0.254807] CPU features: detected feature: GIC system register CPU interface
[ 0.262039] CPU features: detected feature: 32-bit EL0 Support
[ 0.267942] CPU features: detected feature: Kernel page table isolation (KPTI)
[ 0.281762] CPU: All CPU(s) started at EL2
[ 0.285931] alternatives: patching kernel code
[ 0.291147] devtmpfs: initialized
[ 0.298803] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.308795] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 0.315330] xor: measuring software checksum speed
[ 0.420252] 8regs : 3388.800 MB/sec
[ 0.520272] 8regs_prefetch: 2969.200 MB/sec
[ 0.620311] 32regs : 3437.600 MB/sec
[ 0.720350] 32regs_prefetch: 3122.000 MB/sec
[ 0.725028] xor: using function: 32regs (3437.600 MB/sec)
[ 0.730495] pinctrl core: initialized pinctrl subsystem
[ 0.737652] DMI not present or invalid.
[ 0.741835] NET: Registered protocol family 16
[ 0.756382] cpuidle: using governor ladder
[ 0.760593] cpuidle: using governor menu
[ 0.765150] vdso: 2 pages (1 code @ ffff17015f017000, 1 data @ ffff17015f9a5000)
[ 0.772659] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.780394] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.786903] Serial: AMBA PL011 UART driver
[ 0.822120] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.990718] raid6: int64x1 gen() 489 MB/s
[ 1.160850] raid6: int64x1 xor() 459 MB/s
[ 1.330936] raid6: int64x2 gen() 675 MB/s
[ 1.500962] raid6: int64x2 xor() 654 MB/s
[ 1.671003] raid6: int64x4 gen() 1017 MB/s
[ 1.841068] raid6: int64x4 xor() 701 MB/s
[ 2.011151] raid6: int64x8 gen() 898 MB/s
[ 2.181243] raid6: int64x8 xor() 700 MB/s
[ 2.351319] raid6: neonx1 gen() 983 MB/s
[ 2.521384] raid6: neonx1 xor() 1086 MB/s
[ 2.691439] raid6: neonx2 gen() 1285 MB/s
[ 2.861502] raid6: neonx2 xor() 1378 MB/s
[ 3.031608] raid6: neonx4 gen() 1666 MB/s
[ 3.201639] raid6: neonx4 xor() 1484 MB/s
[ 3.371712] raid6: neonx8 gen() 1942 MB/s
[ 3.541782] raid6: neonx8 xor() 1654 MB/s
[ 3.546101] raid6: using algorithm neonx8 gen() 1942 MB/s
[ 3.551570] raid6: .... xor() 1654 MB/s, rmw enabled
[ 3.556593] raid6: using neon recovery algorithm
[ 3.561710] ACPI: Interpreter disabled.
[ 3.566816] vgaarb: loaded
[ 3.569779] SCSI subsystem initialized
[ 3.574333] usbcore: registered new interface driver usbfs
[ 3.579924] usbcore: registered new interface driver hub
[ 3.585369] usbcore: registered new device driver usb
[ 3.590855] imx-i2c 2000000.i2c: scl-gpios not found
[ 3.596118] pca953x 0-0020: 0-0020 supply vcc not found, using dummy regulator
[ 3.706475] pca953x 0-0021: 0-0021 supply vcc not found, using dummy regulator
[ 3.816696] i2c i2c-0: of_i2c: modalias failure on /soc/i2c@2000000/pcie-switch@6f
[ 3.824367] i2c i2c-0: Failed to create I2C device for /soc/i2c@2000000/pcie-switch@6f
[ 3.832407] i2c i2c-0: IMX I2C adapter registered
[ 3.837299] imx-i2c 2040000.i2c: scl-gpios not found
[ 3.842502] i2c i2c-1: IMX I2C adapter registered
[ 3.847699] pps_core: LinuxPPS API ver. 1 registered
[ 3.852751] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 3.862013] PTP clock support registered
[ 3.866141] EDAC MC: Ver: 3.0.0
[ 3.869688] dmi: Firmware registration failed.
[ 3.874369] No BMan portals available!
[ 3.878530] QMan: Allocated lookup table at ffff00000926d000, entry count 65537
[ 3.886217] No QMan portals available!
[ 3.890275] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[ 3.896961] Advanced Linux Sound Architecture Driver Initialized.
[ 3.906588] clocksource: Switched to clocksource arch_sys_counter
[ 3.912870] VFS: Disk quotas dquot_6.6.0
[ 3.916901] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 3.923965] pnp: PnP ACPI: disabled
[ 3.933303] NET: Registered protocol family 2
[ 3.938260] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 3.945483] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 3.952248] TCP: Hash tables configured (established 8192 bind 8192)
[ 3.958851] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 3.964871] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 3.971483] NET: Registered protocol family 1
[ 3.976149] RPC: Registered named UNIX socket transport module.
[ 3.982604] RPC: Registered udp transport module.
[ 3.987385] RPC: Registered tcp transport module.
[ 3.992146] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 3.998805] Trying to unpack rootfs image as initramfs...
[ 4.004617] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 4.116076] Freeing initrd memory: 52796K
[ 4.120595] kvm [1]: 8-bit VMID
[ 4.124769] kvm [1]: GICv3: no GICV resource entry
[ 4.129657] kvm [1]: disabling GICv2 emulation
[ 4.134172] kvm [1]: GIC system register CPU interface enabled
[ 4.140162] kvm [1]: vgic interrupt IRQ1
[ 4.144190] kvm [1]: Hyp mode initialized successfully
[ 4.152063] audit: initializing netlink subsys (disabled)
[ 4.157663] audit: type=2000 audit(4.099:1): state=initialized audit_enabled=0 res=1
[ 4.165571] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[ 4.172602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 4.178727] NFS: Registering the id_resolver key type
[ 4.183853] Key type id_resolver registered
[ 4.188103] Key type id_legacy registered
[ 4.192166] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 4.199068] fuse init (API version 7.26)
[ 4.203152] 9p: Installing v9fs 9p2000 file system support
[ 4.211271] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 4.218859] io scheduler noop registered
[ 4.222858] io scheduler cfq registered (default)
[ 4.227629] io scheduler mq-deadline registered
[ 4.232212] io scheduler kyber registered
[ 4.240808] OF: PCI: host bridge /soc/pcie@1f0000000 ranges:
[ 4.246555] OF: PCI: MEM 0x1f8000000..0x1f815ffff -> 0x00000000
[ 4.252793] OF: PCI: MEM 0x1f8160000..0x1f81cffff -> 0x00000000
[ 4.258980] OF: PCI: MEM 0x1f81d0000..0x1f81effff -> 0x00000000
[ 4.265155] OF: PCI: MEM 0x1f81f0000..0x1f820ffff -> 0x00000000
[ 4.271328] OF: PCI: MEM 0x1f8210000..0x1f822ffff -> 0x00000000
[ 4.277502] OF: PCI: MEM 0x1f8230000..0x1f824ffff -> 0x00000000
[ 4.283672] OF: PCI: MEM 0x1fc000000..0x1fc3fffff -> 0x00000000
[ 4.289899] pci-host-generic 1f0000000.pcie: ECAM at [mem 0x1f0000000-0x1f00fffff] for [bus 00]
[ 4.298816] pci-host-generic 1f0000000.pcie: PCI host bridge to bus 0000:00
[ 4.305869] pci_bus 0000:00: root bus resource [bus 00]
[ 4.311159] pci_bus 0000:00: root bus resource [mem 0x1f8000000-0x1f815ffff] (bus address [0x00000000-0x0015ffff])
[ 4.321645] pci_bus 0000:00: root bus resource [mem 0x1f8160000-0x1f81cffff pref] (bus address [0x00000000-0x0006ffff])
[ 4.332566] pci_bus 0000:00: root bus resource [mem 0x1f81d0000-0x1f81effff] (bus address [0x00000000-0x0001ffff])
[ 4.343050] pci_bus 0000:00: root bus resource [mem 0x1f81f0000-0x1f820ffff pref] (bus address [0x00000000-0x0001ffff])
[ 4.353970] pci_bus 0000:00: root bus resource [mem 0x1f8210000-0x1f822ffff] (bus address [0x00000000-0x0001ffff])
[ 4.364455] pci_bus 0000:00: root bus resource [mem 0x1f8230000-0x1f824ffff pref] (bus address [0x00000000-0x0001ffff])
[ 4.375375] pci_bus 0000:00: root bus resource [mem 0x1fc000000-0x1fc3fffff] (bus address [0x00000000-0x003fffff])
[ 4.385983] pci 0000:00:00.0: VF(n) BAR0 space: [mem 0x1f81d0000-0x1f81effff 64bit] (contains BAR0 for 2 VFs)
[ 4.396025] pci 0000:00:00.0: VF(n) BAR2 space: [mem 0x1f81f0000-0x1f820ffff 64bit pref] (contains BAR2 for 2 VFs)
[ 4.406764] pci 0000:00:00.1: VF(n) BAR0 space: [mem 0x1f8210000-0x1f822ffff 64bit] (contains BAR0 for 2 VFs)
[ 4.416805] pci 0000:00:00.1: VF(n) BAR2 space: [mem 0x1f8230000-0x1f824ffff 64bit pref] (contains BAR2 for 2 VFs)
[ 4.428524] /soc/pcie@1f0000000: Invalid msi-map translation - no match for rid 0xf8 on (null)
[ 4.438681] OF: PCI: host bridge /soc/pcie@3400000 ranges:
[ 4.444245] OF: PCI: IO 0x8000010000..0x800001ffff -> 0x00000000
[ 4.450596] OF: PCI: MEM 0x8040000000..0x807fffffff -> 0x40000000
[ 4.457080] layerscape-pcie 3400000.pcie: PCI host bridge to bus 0001:00
[ 4.463867] pci_bus 0001:00: root bus resource [bus 00-ff]
[ 4.469420] pci_bus 0001:00: root bus resource [io 0x0000-0xffff]
[ 4.475678] pci_bus 0001:00: root bus resource [mem 0x8040000000-0x807fffffff] (bus address [0x40000000-0x7fffffff])
[ 4.486679] pci 0001:00:00.0: BAR 6: assigned [mem 0x8040000000-0x80400007ff pref]
[ 4.494345] pci 0001:00:00.0: PCI bridge to [bus 01]
[ 4.499580] OF: PCI: host bridge /soc/pcie@3500000 ranges:
[ 4.505143] OF: PCI: IO 0x8800010000..0x880001ffff -> 0x00000000
[ 4.511493] OF: PCI: MEM 0x8840000000..0x887fffffff -> 0x40000000
[ 4.517959] layerscape-pcie 3500000.pcie: PCI host bridge to bus 0002:00
[ 4.524746] pci_bus 0002:00: root bus resource [bus 00-ff]
[ 4.530300] pci_bus 0002:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
[ 4.539374] pci_bus 0002:00: root bus resource [mem 0x8840000000-0x887fffffff] (bus address [0x40000000-0x7fffffff])
[ 4.560039] /soc/pcie@3500000: Invalid msi-map translation - no match for rid 0x302 on (null)
[ 4.570809] /soc/pcie@3500000: Invalid msi-map translation - no match for rid 0x303 on (null)
[ 4.581567] pci 0002:00:00.0: BAR 14: assigned [mem 0x8840000000-0x88400fffff]
[ 4.588881] pci 0002:00:00.0: BAR 13: assigned [io 0x10000-0x10fff]
[ 4.595315] pci 0002:00:00.0: BAR 6: assigned [mem 0x8840100000-0x88401007ff pref]
[ 4.602982] pci 0002:01:00.0: BAR 14: assigned [mem 0x8840000000-0x88400fffff]
[ 4.610297] pci 0002:01:00.0: BAR 13: assigned [io 0x10000-0x10fff]
[ 4.616732] pci 0002:02:01.0: BAR 14: assigned [mem 0x8840000000-0x88400fffff]
[ 4.624047] pci 0002:02:01.0: BAR 13: assigned [io 0x10000-0x10fff]
[ 4.630486] pci 0002:03:00.0: BAR 1: assigned [mem 0x8840000000-0x8840000fff]
[ 4.637731] pci 0002:03:00.0: BAR 5: assigned [mem 0x8840001000-0x8840001fff]
[ 4.644973] pci 0002:03:00.1: BAR 1: assigned [mem 0x8840002000-0x8840002fff]
[ 4.652216] pci 0002:03:00.1: BAR 5: assigned [mem 0x8840003000-0x8840003fff]
[ 4.659458] pci 0002:03:00.2: BAR 1: assigned [mem 0x8840004000-0x8840004fff]
[ 4.666703] pci 0002:03:00.2: BAR 5: assigned [mem 0x8840005000-0x8840005fff]
[ 4.673945] pci 0002:03:00.3: BAR 1: assigned [mem 0x8840006000-0x8840006fff]
[ 4.681189] pci 0002:03:00.3: BAR 5: assigned [mem 0x8840007000-0x8840007fff]
[ 4.688430] pci 0002:03:00.0: BAR 0: assigned [io 0x10000-0x10007]
[ 4.694795] pci 0002:03:00.1: BAR 0: assigned [io 0x10008-0x1000f]
[ 4.701157] pci 0002:03:00.2: BAR 0: assigned [io 0x10010-0x10017]
[ 4.707520] pci 0002:03:00.3: BAR 0: assigned [io 0x10018-0x1001f]
[ 4.713885] pci 0002:02:01.0: PCI bridge to [bus 03]
[ 4.718918] pci 0002:02:01.0: bridge window [io 0x10000-0x10fff]
[ 4.725286] pci 0002:02:01.0: bridge window [mem 0x8840000000-0x88400fffff]
[ 4.732559] pci 0002:02:02.0: PCI bridge to [bus 04]
[ 4.737656] pci 0002:02:03.0: PCI bridge to [bus 05]
[ 4.742754] pci 0002:01:00.0: PCI bridge to [bus 02-05]
[ 4.748049] pci 0002:01:00.0: bridge window [io 0x10000-0x10fff]
[ 4.754419] pci 0002:01:00.0: bridge window [mem 0x8840000000-0x88400fffff]
[ 4.761691] pci 0002:00:00.0: PCI bridge to [bus 01-05]
[ 4.766980] pci 0002:00:00.0: bridge window [io 0x10000-0x10fff]
[ 4.773324] pci 0002:00:00.0: bridge window [mem 0x8840000000-0x88400fffff]
[ 4.794416] Freescale LS2 console driver
[ 4.798588] fsl-ls2-console: device fsl_mc_console registered
[ 4.804522] fsl-ls2-console: device fsl_aiop_console registered
[ 4.814791] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 4.822488] /soc/pcie@3500000: Invalid iommu-map translation - no match for rid 0x302 on (null)
[ 4.832755] /soc/pcie@3500000: Invalid iommu-map translation - no match for rid 0x303 on (null)
[ 4.844252] console [ttyS0] disabled
[ 4.847948] 21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 14, base_baud = 12500000) is a 16550A
[ 4.857288] console [ttyS0] enabled
[ 4.857288] console [ttyS0] enabled
[ 4.864306] bootconsole [uart8250] disabled
[ 4.864306] bootconsole [uart8250] disabled
[ 4.873421] SuperH (H)SCI(F) driver initialized
[ 4.878401] msm_serial: driver initialized
[ 4.883765] arm-smmu 5000000.iommu: probing hardware configuration...
[ 4.890291] arm-smmu 5000000.iommu: SMMUv2 with:
[ 4.894924] arm-smmu 5000000.iommu: stage 1 translation
[ 4.900328] arm-smmu 5000000.iommu: stage 2 translation
[ 4.905656] arm-smmu 5000000.iommu: nested translation
[ 4.910923] arm-smmu 5000000.iommu: stream matching with 128 register groups
[ 4.918101] arm-smmu 5000000.iommu: 64 context banks (0 stage-2 only)
[ 4.924653] arm-smmu 5000000.iommu: Supported page sizes: 0x61311000
[ 4.931140] arm-smmu 5000000.iommu: Stage-1: 48-bit VA -> 48-bit IPA
[ 4.937623] arm-smmu 5000000.iommu: Stage-2: 48-bit IPA -> 48-bit PA
[ 4.951139] brd: module loaded
[ 4.958968] loop: module loaded
[ 4.962747] at24 0-0053: 256 byte 24c02 EEPROM, writable, 1 bytes/write
[ 5.338566] Bad mode in Error handler detected on CPU1, code 0xbf000002 -- SError
[ 5.346082] Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP
[ 5.352021] Modules linked in:
[ 5.355086] Process swapper/0 (pid: 1, stack limit = 0xffff000008030000)
[ 5.361813] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.140+gd39cc9ffcbe5 #1
[ 5.369147] Hardware name: IP01 Board (DT)
[ 5.373254] task: ffffd5cb7968ed40 task.stack: ffff000008030000
[ 5.379202] PC is at __memcpy_toio+0x4c/0x90
[ 5.383491] LR is at nxp_fspi_read+0xf0/0x160
[ 5.387860] pc : [<ffff17015e28b32c>] lr : [<ffff17015ea38d90>] pstate: 80000045
[ 5.395280] sp : ffff000008033800
[ 5.398602] x29: ffff000008033800 x28: ffffd5cb788d52e0
[ 5.403936] x27: ffff17015f9aa000 x26: ffffd5cb78cb8410
[ 5.409268] x25: 0000000000000000 x24: 0000000000000000
[ 5.414601] x23: 0000000000000000 x22: ffffd5cb62c62300
[ 5.419934] x21: 0000000000000000 x20: 0000000000000010
[ 5.425267] x19: ffffd5cb788d4040 x18: 000000000000000e
[ 5.430599] x17: 0000000000000007 x16: 0000000000000001
[ 5.435931] x15: 0000000000000019 x14: 0000000000000000
[ 5.441263] x13: 0000000000000000 x12: 0000000000000000
[ 5.446595] x11: 0000000000000000 x10: 0000000000000000
[ 5.451928] x9 : 0040000000000001 x8 : ffff00800ac00000
[ 5.457260] x7 : ffff00004ac00000 x6 : 0000000000000010
[ 5.462592] x5 : ffffd5cb62c62310 x4 : 0000000000000000
[ 5.467924] x3 : ffff00000ac00008 x2 : 0000000000000010
[ 5.473256] x1 : ffff00000ac00000 x0 : ffffd5cb62c62308
[ 5.478589] Call trace:
[ 5.481040] Exception stack(0xffff0000080336c0 to 0xffff000008033800)
[ 5.487503] 36c0: ffffd5cb62c62308 ffff00000ac00000 0000000000000010 ffff00000ac00008
[ 5.495362] 36e0: 0000000000000000 ffffd5cb62c62310 0000000000000010 ffff00004ac00000
[ 5.503221] 3700: ffff00800ac00000 0040000000000001 0000000000000000 0000000000000000
[ 5.511079] 3720: 0000000000000000 0000000000000000 0000000000000000 0000000000000019
[ 5.518938] 3740: 0000000000000001 0000000000000007 000000000000000e ffffd5cb788d4040
[ 5.526796] 3760: 0000000000000010 0000000000000000 ffffd5cb62c62300 0000000000000000
[ 5.534652] 3780: 0000000000000000 0000000000000000 ffffd5cb78cb8410 ffff17015f9aa000
[ 5.542511] 37a0: ffffd5cb788d52e0 ffff000008033800 ffff17015ea38d90 ffff000008033800
[ 5.550368] 37c0: ffff17015e28b32c 0000000080000045 0000000000000000 ffffd5cb62c62300
[ 5.558226] 37e0: ffffffffffffffff ffff17015e4022ec ffff000008033800 ffff17015e28b32c
[ 5.566087] [<ffff17015e28b32c>] __memcpy_toio+0x4c/0x90
[ 5.571418] [<ffff17015ea34544>] spi_nor_read_sfdp+0x5c/0xb8
[ 5.577098] [<ffff17015ea34b68>] spi_nor_read_sfdp_dma_unsafe+0x50/0x90
[ 5.583736] [<ffff17015ea34d88>] spi_nor_init_params+0x1e0/0x6a0
[ 5.589764] [<ffff17015ea35ef0>] spi_nor_scan+0xf8/0x948
[ 5.595095] [<ffff17015ea395ec>] nxp_fspi_probe+0x504/0x7c8
[ 5.600689] [<ffff17015e976d68>] platform_drv_probe+0x58/0xb8
[ 5.606455] [<ffff17015e974e78>] driver_probe_device+0x218/0x2d0
[ 5.612482] [<ffff17015e974fec>] __driver_attach+0xbc/0xc0
[ 5.617985] [<ffff17015e972e28>] bus_for_each_dev+0x68/0xd0
[ 5.623576] [<ffff17015e974788>] driver_attach+0x20/0x28
[ 5.628905] [<ffff17015e974280>] bus_add_driver+0x1b8/0x228
[ 5.634496] [<ffff17015e975a10>] driver_register+0x60/0xf8
[ 5.640002] [<ffff17015e976cb8>] __platform_driver_register+0x40/0x48
[ 5.646468] [<ffff17015f5c9ca8>] nxp_fspi_driver_init+0x18/0x20
[ 5.652408] [<ffff17015e283d24>] do_one_initcall+0x4c/0x158
[ 5.658001] [<ffff17015f580dc8>] kernel_init_freeable+0x188/0x22c
[ 5.664117] [<ffff17015eff2ee8>] kernel_init+0x10/0x108
[ 5.669359] [<ffff17015e285070>] ret_from_fork+0x10/0x18
[ 5.674690] Code: aa0103e3 927df0c6 910020c6 8b060005 (f8408464)
[ 5.680811] ---[ end trace 7a6c6a585521e650 ]---
[ 5.685471] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 5.685471]
[ 5.694639] SMP: stopping secondary CPUs
[ 5.698574] Kernel Offset: 0x170156200000 from 0xffff000008000000
[ 5.704688] CPU features: 0x1802008
[ 5.708184] Memory Limit: none
[ 5.711250] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 5.711250]

 

 

Here are some detailed info of configurations.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

defconfig:

# SPI
CONFIG_SPI=y
CONFIG_SPI_SPIDEV=y
CONFIG_MTD_SPI_NOR_BASE=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
CONFIG_SPI_NXP_FLEXSPI=y
CONFIG_SPI_FSL_QUADSPI=y

# MTD boot flash
CONFIG_MTD=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_W25X=y
CONFIG_MTD_PHYSMAP_OF=y

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

device-tree: dts file

 

&dspi0 {
      num-cs = <1>;
      bus-num = <0>;
      status = "okay";
};

 

// Flexspi bootflash
&fspi {
      num-cs = <1>;
      bus-num = <0>;
      status = "okay";

         w25q128jw: flash@0 {
               compatible = "winbond,w25q128jw", "jedec,spi-nor";
               #address-cells = <1>;
               #size-cells = <1>;
               m25p,fast-read;
               spi-max-frequency = <20000000>;
               reg = <0>;
      };
};

 

added patch([PATCH v2 1/2] dt-bindings: spi: Add fsl,ls1028a-dspi compatible ) context:

          dspi0: spi@2100000 {                compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";                #address-cells = <1>;                #size-cells = <0>;                reg = <0x0 0x2100000 0x0 0x10000>;                interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;                clock-names = "dspi";                clocks = <&clockgen 4 1>;                spi-num-chipselects = <4>;                little-endian;                status = "disabled";           };            dspi1: spi@2110000 {                compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";                #address-cells = <1>;                #size-cells = <0>;                reg = <0x0 0x2110000 0x0 0x10000>;                interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;                clock-names = "dspi";                clocks = <&clockgen 4 1>;                spi-num-chipselects = <4>;                little-endian;                status = "disabled";           };            dspi2: spi@2120000 {                compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi";                #address-cells = <1>;                #size-cells = <0>;                reg = <0x0 0x2120000 0x0 0x10000>;                interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;                clock-names = "dspi";                clocks = <&clockgen 4 1>;                spi-num-chipselects = <3>;                little-endian;                status = "disabled";           };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Driver support for spi-nor:

--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1182,6 +1182,11 @@
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
+ {
+ "w25q128jw", INFO(0xef8018, 0, 64 * 1024, 256,
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
+ },
{ "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Correct me if I am doing wrong.

 

Thank you

 

Regards,
Rajesh

Outcomes