Hynix H27U4G8F2EDA-BC support (no oob scheme defined for oobsize 0)

I'm working on porting a set of IPQ4019 devices, Linksys WHW03 (V1 and V2), and recently a user reported a new variant of V2 with a different NAND chip, Hynix H27U4G8F2EDA-BC, which causes it not boot.

Original device V2 variant have Macronix MX30LF4G18AC, which works out of the box.

NAND chip Hynix H27U4G8F2EDA-BC seems to be successfully detected as per the boot log:

[    1.207777] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.208628] nand: Hynix H27U4G8F2EDA-BC
[    1.215274] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128

but when following with nand_scan_with_ids, when calling to nand_scan_tail, NAND information, OOB, seems not to be available and it fails.

[    1.218859] ------------[ cut here ]------------
[    1.226461] WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/raw/nand_base.c:5579 nand_scan_with_ids+0x1790/0x1794
[    1.231318] No oob scheme defined for oobsize 0
[    1.241102] Modules linked in:
[    1.245345] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.158 #0
[    1.248469] Hardware name: Generic DT based system
[    1.254652] [<c030e524>] (unwind_backtrace) from [<c030afa8>] (show_stack+0x10/0x14)
[    1.259249] [<c030afa8>] (show_stack) from [<c08559e4>] (dump_stack+0x94/0xa8)
[    1.267145] [<c08559e4>] (dump_stack) from [<c032142c>] (__warn+0xbc/0xd8)
[    1.274172] [<c032142c>] (__warn) from [<c03214cc>] (warn_slowpath_fmt+0x84/0x94)
[    1.281034] [<c03214cc>] (warn_slowpath_fmt) from [<c065b74c>] (nand_scan_with_ids+0x1790/0x1794)
[    1.288590] [<c065b74c>] (nand_scan_with_ids) from [<c06620f0>] (qcom_nandc_probe+0x518/0x93c)
[    1.297443] [<c06620f0>] (qcom_nandc_probe) from [<c0629684>] (platform_drv_probe+0x34/0x70)
[    1.305949] [<c0629684>] (platform_drv_probe) from [<c0627d00>] (really_probe+0x1f0/0x358)
[    1.314541] [<c0627d00>] (really_probe) from [<c0628250>] (device_driver_attach+0x58/0x60)
[    1.322610] [<c0628250>] (device_driver_attach) from [<c06282b0>] (__driver_attach+0x58/0xcc)
[    1.330860] [<c06282b0>] (__driver_attach) from [<c0626244>] (bus_for_each_dev+0x68/0x8c)
[    1.339453] [<c0626244>] (bus_for_each_dev) from [<c06271c8>] (bus_add_driver+0x1c8/0x1d8)
[    1.347612] [<c06271c8>] (bus_add_driver) from [<c0628838>] (driver_register+0x74/0x108)
[    1.355775] [<c0628838>] (driver_register) from [<c0302764>] (do_one_initcall+0x84/0x1d8)
[    1.364023] [<c0302764>] (do_one_initcall) from [<c0b00fdc>] (kernel_init_freeable+0x1d4/0x27c)
[    1.372095] [<c0b00fdc>] (kernel_init_freeable) from [<c086b824>] (kernel_init+0x8/0x114)
[    1.380600] [<c086b824>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[    1.388926] Exception stack(0xdf43bfb0 to 0xdf43bff8)
[    1.396389] bfa0:                                     00000000 00000000 00000000 00000000
[    1.401517] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.409674] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.417870] ---[ end trace cabfcaf5b12c40f2 ]---
[    1.424276] 8<--- cut here ---

Any ideas how to trace/workaround this issue?

Note: Hynix naming scheme suggests a 4Gb SLC x8 chip, but it is detected as a 512Mb SLC.

Full boot log:

(IPQ40xx) # bootm
 Booting kernel from FIT Image at 81000000 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-5.4.158
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x810000e4
     Data Size:    8448440 Bytes = 8.1 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   89aed924
     Hash algo:    sha1
     Hash value:   3aea7cf0a97eab315d611a7effdc7c00c92d3049
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 81000000
   Using 'config@1' configuration
   Trying 'fdt@1' FDT blob subimage
     Description:  ARM OpenWrt linksys_whw03v2 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8180ebd8
     Data Size:    18796 Bytes = 18.4 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   bbf510f6
     Hash algo:    sha1
     Hash value:   ffecdc42d85bd6e230810c40846c188c6535b37a
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8180ebd8
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 86fe8000, end 86fef96b ... OK
Andrew: mtdparts="mtdparts=nand0:1024K@0x0(0:SBL1),1024K@0x100000(0:MIBIB),1024K@0x200000(0:QSEE),512K@0x300000(0:CDT),2M@0x380000(0:APPSBL),512K@0x580000(0:ART),512K@0x600000(u_env),256K@0x680000(s_env),256K@0x6c0000(devinfo),161M@0x700000(kernel),155M@0xd00000(rootfs),161M@0xa800000(alt_kernel),155M@0xae00000(alt_rootfs),2M@0x14900000(sysdiag),181M@0x14b00000(syscfg),"
Device nand2 not found!
Using machid 0x8010006 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.158 (acalvo@runtoo) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16271+37-cb9ca24a60)) #0 SMP Wed Dec 8 22:52:35 2021
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Linksys WHW03 V2 (Velop)
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu s30092 r8192 d23156 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129408
[    0.000000] Kernel command line:  root=/dev/ubiblock0_0 rootfstype=squashfs ro
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 489840K/522240K available (5572K kernel code, 185K rwdata, 1468K rodata, 18432K init, 232K bss, 32400K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2f0/0x49c with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[    0.000007] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000022] Switching to timer-based delay loop, resolution 20ns
[    0.000246] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000264] pid_max: default: 32768 minimum: 301
[    0.000465] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000481] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001480] CPU: Testing write buffer coherency: ok
[    0.002514] Setting up static identity map for 0x80300000 - 0x80300060
[    0.002652] rcu: Hierarchical SRCU implementation.
[    0.003093] smp: Bringing up secondary CPUs ...
[    0.006181] smp: Brought up 1 node, 4 CPUs
[    0.006199] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.006207] CPU: All CPU(s) started in SVC mode.
[    0.011071] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.011240] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011265] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.011460] pinctrl core: initialized pinctrl subsystem
[    0.012474] NET: Registered protocol family 16
[    0.012790] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.014003] cpuidle: using governor ladder
[    0.014091] cpuidle: using governor menu
[    0.034831] cryptd: max_cpu_qlen set to 1000
[    0.038154] usbcore: registered new interface driver usbfs
[    0.038221] usbcore: registered new interface driver hub
[    0.038277] usbcore: registered new device driver usb
[    0.038325] pps_core: LinuxPPS API ver. 1 registered
[    0.038334] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.038361] PTP clock support registered
[    0.039088] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.040224] clocksource: Switched to clocksource arch_sys_counter
[    0.041022] thermal_sys: Registered thermal governor 'step_wise'
[    0.041316] NET: Registered protocol family 2
[    0.041494] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.042230] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.042274] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.042335] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.042425] TCP: Hash tables configured (established 4096 bind 4096)
[    0.042539] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042578] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042846] NET: Registered protocol family 1
[    0.042888] PCI: CLS 0 bytes, default 64
[    0.221174] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.226695] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.226711] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.276023] qcom-pcie 40000000.pci: host bridge /soc/pci@40000000 ranges:
[    0.276077] qcom-pcie 40000000.pci:    IO 0x40200000..0x402fffff -> 0x40200000
[    0.276107] qcom-pcie 40000000.pci:   MEM 0x40300000..0x40ffffff -> 0x40300000
[    0.551794] qcom-pcie 40000000.pci: Link up
[    0.551949] qcom-pcie 40000000.pci: PCI host bridge to bus 0000:00
[    0.551973] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.551992] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0x40200000-0x402fffff])
[    0.552006] pci_bus 0000:00: root bus resource [mem 0x40300000-0x40ffffff]
[    0.552050] pci 0000:00:00.0: [17cb:1001] type 01 class 0x060400
[    0.552090] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
[    0.552166] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.553785] PCI: bus0: Fast back to back transfers disabled
[    0.554024] pci 0000:01:00.0: [168c:0056] type 00 class 0x028000
[    0.554238] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.554952] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.556708] PCI: bus1: Fast back to back transfers disabled
[    0.556758] pci 0000:00:00.0: BAR 8: assigned [mem 0x40400000-0x405fffff]
[    0.556778] pci 0000:00:00.0: BAR 0: assigned [mem 0x40300000-0x40300fff]
[    0.556799] pci 0000:01:00.0: BAR 0: assigned [mem 0x40400000-0x405fffff 64bit]
[    0.556877] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.556894] pci 0000:00:00.0:   bridge window [mem 0x40400000-0x405fffff]
[    0.559722] pcieport 0000:00:00.0: AER: enabled with IRQ 97
[    0.561568] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.561587] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.562887] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.562983] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.563068] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.563152] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.563488] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.564054] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.564109] msm_serial 78af000.serial: uartclk = 1843200
[    0.564162] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 27, base_baud = 115200) is a MSM
[    0.564190] msm_serial: console setup on port #0
[    1.192681] printk: console [ttyMSM0] enabled
[    1.197602] msm_serial: driver initialized
[    1.206584] loop: module loaded
[    1.207777] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.208628] nand: Hynix H27U4G8F2EDA-BC
[    1.215274] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    1.218859] ------------[ cut here ]------------
[    1.226461] WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/raw/nand_base.c:5579 nand_scan_with_ids+0x1790/0x1794
[    1.231318] No oob scheme defined for oobsize 0
[    1.241102] Modules linked in:
[    1.245345] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.158 #0
[    1.248469] Hardware name: Generic DT based system
[    1.254652] [<c030e524>] (unwind_backtrace) from [<c030afa8>] (show_stack+0x10/0x14)
[    1.259249] [<c030afa8>] (show_stack) from [<c08559e4>] (dump_stack+0x94/0xa8)
[    1.267145] [<c08559e4>] (dump_stack) from [<c032142c>] (__warn+0xbc/0xd8)
[    1.274172] [<c032142c>] (__warn) from [<c03214cc>] (warn_slowpath_fmt+0x84/0x94)
[    1.281034] [<c03214cc>] (warn_slowpath_fmt) from [<c065b74c>] (nand_scan_with_ids+0x1790/0x1794)
[    1.288590] [<c065b74c>] (nand_scan_with_ids) from [<c06620f0>] (qcom_nandc_probe+0x518/0x93c)
[    1.297443] [<c06620f0>] (qcom_nandc_probe) from [<c0629684>] (platform_drv_probe+0x34/0x70)
[    1.305949] [<c0629684>] (platform_drv_probe) from [<c0627d00>] (really_probe+0x1f0/0x358)
[    1.314541] [<c0627d00>] (really_probe) from [<c0628250>] (device_driver_attach+0x58/0x60)
[    1.322610] [<c0628250>] (device_driver_attach) from [<c06282b0>] (__driver_attach+0x58/0xcc)
[    1.330860] [<c06282b0>] (__driver_attach) from [<c0626244>] (bus_for_each_dev+0x68/0x8c)
[    1.339453] [<c0626244>] (bus_for_each_dev) from [<c06271c8>] (bus_add_driver+0x1c8/0x1d8)
[    1.347612] [<c06271c8>] (bus_add_driver) from [<c0628838>] (driver_register+0x74/0x108)
[    1.355775] [<c0628838>] (driver_register) from [<c0302764>] (do_one_initcall+0x84/0x1d8)
[    1.364023] [<c0302764>] (do_one_initcall) from [<c0b00fdc>] (kernel_init_freeable+0x1d4/0x27c)
[    1.372095] [<c0b00fdc>] (kernel_init_freeable) from [<c086b824>] (kernel_init+0x8/0x114)
[    1.380600] [<c086b824>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[    1.388926] Exception stack(0xdf43bfb0 to 0xdf43bff8)
[    1.396389] bfa0:                                     00000000 00000000 00000000 00000000
[    1.401517] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.409674] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.417870] ---[ end trace cabfcaf5b12c40f2 ]---
[    1.424276] 8<--- cut here ---
[    1.429107] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[    1.431981] pgd = (ptrval)
[    1.440214] [00000008] *pgd=00000000
[    1.442742] Internal error: Oops: 5 [#1] SMP ARM
[    1.446470] Modules linked in:
[    1.451073] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.4.158 #0
[    1.453938] Hardware name: Generic DT based system
[    1.461495] PC is at devres_remove+0x34/0xb4
[    1.466089] LR is at devres_remove+0x78/0xb4
[    1.470515] pc : [<c062a9c8>]    lr : [<c062aa0c>]    psr: 00000093
[    1.474769] sp : df43bde8  ip : 00000000  fp : 20000013
[    1.480757] r10: df581cf8  r9 : c062aa78  r8 : c062b74c
[    1.485968] r7 : df416840  r6 : df581cfc  r5 : df581c10  r4 : 00000000
[    1.491178] r3 : 00000000  r2 : df416840  r1 : df416840  r0 : df581c10
[    1.497779] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.504288] Control: 10c5387d  Table: 8020406a  DAC: 00000051
[    1.511489] Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
[    1.517306] Stack: (0xdf43bde8 to 0xdf43c000)
[    1.523384] bde0:                   df416840 ffffffea dd89c580 dfb752f0 df581c00 df5834c0
[    1.527645] be00: dd89c598 df416840 c090e4f4 c062b2a4 ffffffea c062b3e0 ffffffea c06623c4
[    1.535806] be20: 00000000 00000000 dd934720 df581c10 dfb750c4 c096f4f0 c06644ac df581c10
[    1.543967] be40: c1d223ac df581c10 c1d223ac c1d632bc 00000000 00000000 c1d223ac 00000000
[    1.552127] be60: dfffce00 c0629684 c1d632c4 df581c10 c1d632bc c0627d00 df581c10 00000000
[    1.560284] be80: c1d223ac 00000000 00000000 c0b2d834 00000007 c0628250 00000000 c1d223ac
[    1.568446] bea0: df581c10 c06282b0 df581c10 c1d223ac c0628258 c0626244 df409d58 df501e34
[    1.576603] bec0: c1d223ac dd8a0980 c1d20598 c06271c8 c096f5b4 00000000 c1d223ac c1d223ac
[    1.584766] bee0: c1d2f014 ffffe000 c0b17414 c0628838 c1d04e48 c1d2f014 ffffe000 c0302764
[    1.592923] bf00: dfffce2b 00000000 c09e022c 00000000 dfffce2b c033cdc4 00000000 c09840a0
[    1.601086] bf20: 00000006 00000006 c0911bf8 00000000 c091bd84 c0911c6c dfffce2b 00000000
[    1.609242] bf40: 00000000 00000006 c0b004a8 992c6a7e c0b383d0 c0b004a8 c1d2f028 c1d2f010
[    1.617405] bf60: c0b2d854 c0b00fdc 00000006 00000006 00000000 c0b004a8 00000000 00000072
[    1.625562] bf80: 00000000 00000000 c086b81c 00000000 00000000 00000000 00000000 00000000
[    1.633724] bfa0: 00000000 c086b824 00000000 c03010e8 00000000 00000000 00000000 00000000
[    1.641880] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.650043] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    1.658208] [<c062a9c8>] (devres_remove) from [<c062b2a4>] (devres_destroy+0x8/0x24)
[    1.666361] [<c062b2a4>] (devres_destroy) from [<c062b3e0>] (devm_kfree+0x3c/0x60)
[    1.674170] [<c062b3e0>] (devm_kfree) from [<c06623c4>] (qcom_nandc_probe+0x7ec/0x93c)
[    1.681554] [<c06623c4>] (qcom_nandc_probe) from [<c0629684>] (platform_drv_probe+0x34/0x70)
[    1.689453] [<c0629684>] (platform_drv_probe) from [<c0627d00>] (really_probe+0x1f0/0x358)
[    1.698044] [<c0627d00>] (really_probe) from [<c0628250>] (device_driver_attach+0x58/0x60)
[    1.706120] [<c0628250>] (device_driver_attach) from [<c06282b0>] (__driver_attach+0x58/0xcc)
[    1.714364] [<c06282b0>] (__driver_attach) from [<c0626244>] (bus_for_each_dev+0x68/0x8c)
[    1.722958] [<c0626244>] (bus_for_each_dev) from [<c06271c8>] (bus_add_driver+0x1c8/0x1d8)
[    1.731116] [<c06271c8>] (bus_add_driver) from [<c0628838>] (driver_register+0x74/0x108)
[    1.739280] [<c0628838>] (driver_register) from [<c0302764>] (do_one_initcall+0x84/0x1d8)
[    1.747527] [<c0302764>] (do_one_initcall) from [<c0b00fdc>] (kernel_init_freeable+0x1d4/0x27c)
[    1.755598] [<c0b00fdc>] (kernel_init_freeable) from [<c086b824>] (kernel_init+0x8/0x114)
[    1.764104] [<c086b824>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[    1.772428] Exception stack(0xdf43bfb0 to 0xdf43bff8)
[    1.779894] bfa0:                                     00000000 00000000 00000000 00000000
[    1.785023] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.793183] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.801342] Code: e28560ec e1560004 e1a0b000 0a000008 (e5943008)
[    1.807761] ---[ end trace cabfcaf5b12c40f3 ]---
[    1.814007] Kernel panic - not syncing: Fatal exception
[    1.818704] CPU2: stopping
[    1.823644] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D W         5.4.158 #0
[    1.826421] Hardware name: Generic DT based system
[    1.833982] [<c030e524>] (unwind_backtrace) from [<c030afa8>] (show_stack+0x10/0x14)
[    1.838586] [<c030afa8>] (show_stack) from [<c08559e4>] (dump_stack+0x94/0xa8)
[    1.846484] [<c08559e4>] (dump_stack) from [<c030d7d8>] (handle_IPI+0x164/0x19c)
[    1.853519] [<c030d7d8>] (handle_IPI) from [<c05afb70>] (gic_handle_irq+0x8c/0x90)
[    1.861068] [<c05afb70>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    1.868437] Exception stack(0xdf473f60 to 0xdf473fa8)
[    1.875991] 3f60: 00000000 00000078 dfb54234 c0313c40 ffffe000 c1d04e68 c1d04ea8 00000004
[    1.881033] 3f80: 00000000 c1c8dde8 c1d0df40 00000000 c1d04e78 df473fb0 c03083c0 c03083c4
[    1.889185] 3fa0: 60000013 ffffffff
[    1.897346] [<c0301a8c>] (__irq_svc) from [<c03083c4>] (arch_cpu_idle+0x38/0x3c)
[    1.900653] [<c03083c4>] (arch_cpu_idle) from [<c0349e00>] (do_idle+0x1e4/0x21c)
[    1.908289] [<c0349e00>] (do_idle) from [<c034a0c8>] (cpu_startup_entry+0x18/0x1c)
[    1.915665] [<c034a0c8>] (cpu_startup_entry) from [<803024ac>] (0x803024ac)
[    1.923039] CPU3: stopping
[    1.929891] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D W         5.4.158 #0
[    1.932671] Hardware name: Generic DT based system
[    1.940233] [<c030e524>] (unwind_backtrace) from [<c030afa8>] (show_stack+0x10/0x14)
[    1.944835] [<c030afa8>] (show_stack) from [<c08559e4>] (dump_stack+0x94/0xa8)
[    1.952732] [<c08559e4>] (dump_stack) from [<c030d7d8>] (handle_IPI+0x164/0x19c)
[    1.959764] [<c030d7d8>] (handle_IPI) from [<c05afb70>] (gic_handle_irq+0x8c/0x90)
[    1.967315] [<c05afb70>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    1.974687] Exception stack(0xdf475f60 to 0xdf475fa8)
[    1.982243] 5f60: 00000000 000002b8 dfb63234 c0313c40 ffffe000 c1d04e68 c1d04ea8 00000008
[    1.987280] 5f80: 00000000 c1c8dde8 c1d0df40 00000000 c1d04e78 df475fb0 c03083c0 c03083c4
[    1.995436] 5fa0: 60000013 ffffffff
[    2.003595] [<c0301a8c>] (__irq_svc) from [<c03083c4>] (arch_cpu_idle+0x38/0x3c)
[    2.006898] [<c03083c4>] (arch_cpu_idle) from [<c0349e00>] (do_idle+0x1e4/0x21c)
[    2.014536] [<c0349e00>] (do_idle) from [<c034a0c8>] (cpu_startup_entry+0x18/0x1c)
[    2.021916] [<c034a0c8>] (cpu_startup_entry) from [<803024ac>] (0x803024ac)
[    2.029289] CPU1: stopping
[    2.036143] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D W         5.4.158 #0
[    2.038921] Hardware name: Generic DT based system
[    2.046483] [<c030e524>] (unwind_backtrace) from [<c030afa8>] (show_stack+0x10/0x14)
[    2.051086] [<c030afa8>] (show_stack) from [<c08559e4>] (dump_stack+0x94/0xa8)
[    2.058985] [<c08559e4>] (dump_stack) from [<c030d7d8>] (handle_IPI+0x164/0x19c)
[    2.066015] [<c030d7d8>] (handle_IPI) from [<c05afb70>] (gic_handle_irq+0x8c/0x90)
[    2.073567] [<c05afb70>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    2.080937] Exception stack(0xdf471f60 to 0xdf471fa8)
[    2.088490] 1f60: 00000000 000001d0 dfb45234 c0313c40 ffffe000 c1d04e68 c1d04ea8 00000002
[    2.093532] 1f80: 00000000 c1c8dde8 c1d0df40 00000000 c1d04f10 df471fb0 c03083c0 c03083c4
[    2.101684] 1fa0: 60000013 ffffffff
[    2.109845] [<c0301a8c>] (__irq_svc) from [<c03083c4>] (arch_cpu_idle+0x38/0x3c)
[    2.113152] [<c03083c4>] (arch_cpu_idle) from [<c0349e00>] (do_idle+0x1e4/0x21c)
[    2.120787] [<c0349e00>] (do_idle) from [<c034a0c8>] (cpu_startup_entry+0x18/0x1c)
[    2.128163] [<c034a0c8>] (cpu_startup_entry) from [<803024ac>] (0x803024ac)
[    2.135544] Rebooting in 1 seconds..
[    4.142553] Reboot failed -- System halted

Ported DTS.

Original DTS.

4Gb is equal to 512MB as the capacity is usually marked in Gigabits and not Gigabytes.

Wow, thanks Robert, completely missed that...

Can anyone point me to how I should debug this? Should it be reported to Bugzilla / Mailing list? It's unlikely that I will fix it but it's worth a shot.

Please do something cause flipy has apparently went off the grid or something hasn’t said anything for a month

Hello wbeep.

I am not "off the grid", I just have other duties and come back with this issue whenever I can.

Back to the problem, I do not have a device to test which makes things more difficult, but I am still exploring the NAND code to add triggers/debuggers to pass to @Nico1320 to test, but there is no ETA defined.

Regards,

What if I let you borrow my device. I don’t know how to set it up so I can trust you or if you are legally required to return it at some point but I do want it back at some point if I were to lend it to you for your development purposes.