Issues attaching mtd2 on imx6 with Linux-4.9.88

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issues attaching mtd2 on imx6 with Linux-4.9.88

Jump to solution
1,497 Views
tgl
Contributor III

I am upgrading from an older 3.x kernel and trying to use that device tree on a custom board based on imx6, new kernel is Linux-4.9.88

I have tried to add the properties that 'should' fix this (fsl,legacy-bch-geometry; fsl,use-minimum-ecc), but it does not work, I get the same errors. The device is flashed using mfgtool and I'm using Uboot 2009, I do not want to upgrade u-boot because I have this old device tree so I do not know if it will work... 

Device tree node for nand:

gpmi-nand@00112000 {
compatible = "fsl,imx6q-gpmi-nand";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x112000 0x2000 0x114000 0x2000>;
reg-names = "gpmi-nand", "bch";
interrupts = <0x0 0xf 0x4>;
interrupt-names = "bch";
clocks = <0x2 0x98 0x2 0x99 0x2 0x97 0x2 0x96 0x2 0x95>;
clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch", "gpmi_bch_apb", "per1_bch";
dmas = <0x3 0x0>;
dma-names = "rx-tx";
status = "okay";
pinctrl-names = "default";
pinctrl-0;
gpmikeepclocked = <0x1>;
gpmisequentialread = <0x1>;
gpmicachedread = <0x1>;
gpmisubpageread = <0x1>;
gpmimetadatasize = <0x1>;
#nand-on-flash-bbt;
fsl,legacy-bch-geometry;
#fsl,use-minimum-ecc;

partition@0 {
label = "nand.bootloader";
reg = <0x0 0x1000000>;
};

partition@1 {
label = "nand.reserved";
reg = <0x1000000 0x1000000>;
};

partition@2 {
label = "nand.rootfs";
reg = <0x2000000 0x3e000000>;
};
};

Boot log

 

U-Boot 2009.08 (M
r 07 2019 - 08:05:03)
CPU: Freescale i.MX6 family TO3.0 at 792 MHz
Thermal sensor with ratio = 195
Temperature: 25 C, calibration data 0x5cf51a7d
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 66000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 264000000Hz
emi_slow clock: 132000000Hz
ddr clock : 528000000Hz
usdhc1 clock : 198000000Hz
usdhc2 clock : 198000000Hz
usdhc3 clock : 198000000Hz
usdhc4 clock : 198000000Hz
nfc clock : 11000000Hz
Board: CUSTOM CES_COREBOARD revision 3.0:[ POR ]
Boot Device: NOR
DRAM: 2 GB
NAND: GPMI NAND driver: M=1
ONFI param page 0 valid
ONFI flash detected
Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron MT29F8G08ABACAWP), page size: 4096, OOB size: 224
1024 MiB
MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_ESDHC: 2
*** Warning - bad CRC or NAND, using default environment
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key to stop autoboot: 3
Loading from MT29F8G08ABACAWP, offset 0x1000000
Image Name: Linux-4.9.88
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3428747 Bytes = 3.3 MB
Load Address: 10008000
Entry Point: 10008000
## Booting kernel from Legacy Image at 10800000 ...
Image Name: Linux-4.9.88
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3428747 Bytes = 3.3 MB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.88 (ces@181396a26123) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) ) #3 SMP PREEMPT Wed Dec 15 10:29:03 UTC 2021
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: Custom CES Board
[ 0.000000] Ignoring RAM at 0x80000000-0x90000000
[ 0.000000] Consider using a HIGHMEM enabled kernel.
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] No IRAM/OCRAM memory allocated for suspend/resume code. Please ensure device tree has an entry for fsl,lpm-sram.
[ 0.000000] percpu: Embedded 13 pages/cpu @ef1a9000 s21324 r8192 d23732 u53248
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 455168
[ 0.000000] Kernel command line: console=ttymxc1,115200 video=mxcfb0:dev=ldb,LDB-LGD,if=RGB24,fbpix=RGB32 ldb=di0 ubi.mtd=2 root=ubi0:udcu rootfstype=ubifs rootwait rw
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Memory: 1810028K/1835008K available (5120K kernel code, 224K rwdata, 1320K rodata, 1024K init, 273K bss, 24980K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0x80000000 - 0xf0000000 (1792 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x80600000 (6112 kB)
[ 0.000000] .init : 0x80800000 - 0x80900000 (1024 kB)
[ 0.000000] .data : 0x80900000 - 0x809380e0 ( 225 kB)
[ 0.000000] .bss : 0x809380e0 - 0x8097c5c8 ( 274 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at arch/arm/mach-imx/gpc.c:614 imx_gpc_check_dt+0x4c/0x80
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.88 #3
[ 0.000000] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 0.000000] [<8010d4ec>] (unwind_backtrace) from [<8010a4a0>] (show_stack+0x10/0x14)
[ 0.000000] [<8010a4a0>] (show_stack) from [<80327fe0>] (dump_stack+0x70/0x8c)
[ 0.000000] [<80327fe0>] (dump_stack) from [<8011ec5c>] (__warn+0xd8/0xf8)
[ 0.000000] [<8011ec5c>] (__warn) from [<8011ed20>] (warn_slowpath_null+0x1c/0x24)
[ 0.000000] [<8011ed20>] (warn_slowpath_null) from [<80808314>] (imx_gpc_check_dt+0x4c/0x80)
[ 0.000000] [<80808314>] (imx_gpc_check_dt) from [<80808adc>] (imx6q_init_irq+0x8/0x28)
[ 0.000000] [<80808adc>] (imx6q_init_irq) from [<80802670>] (init_IRQ+0x70/0x80)
[ 0.000000] [<80802670>] (init_IRQ) from [<80800a9c>] (start_kernel+0x1ec/0x37c)
[ 0.000000] [<80800a9c>] (start_kernel) from [<1000807c>] (0x1000807c)
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Outdated DT detected, suspend/resume will NOT work
[ 0.000000] L2C-310 errata 752271 769419 enabled
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[ 0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[ 0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[ 0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76070001
[ 0.000000] Switching to timer-based delay loop, resolution 15ns
[ 0.000007] sched_clock: 32 bits at 66MHz, resolution 15ns, wraps every 32537631224ns
[ 0.000024] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 28958491609 ns
[ 0.001306] Calibrating delay loop (skipped), value calculated using timer frequency.. 132.00 BogoMIPS (lpj=660000)
[ 0.001324] pid_max: default: 32768 minimum: 301
[ 0.001430] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.001444] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.002158] CPU: Testing write buffer coherency: ok
[ 0.002479] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002537] Setting up static identity map for 0x10100000 - 0x10100058
[ 0.169789] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.239778] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.309783] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.309884] Brought up 4 CPUs
[ 0.309909] SMP: Total of 4 processors activated (528.00 BogoMIPS).
[ 0.309918] CPU: All CPU(s) started in SVC mode.
[ 0.310843] devtmpfs: initialized
[ 0.319486] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.320010] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.320033] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.320204] pinctrl core: initialized pinctrl subsystem
[ 0.321534] NET: Registered protocol family 16
[ 0.322508] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.324395] CPU identified as i.MX6Q, silicon rev 1.5
[ 0.350640] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.350656] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.351441] imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[ 0.406375] mxs-dma 110000.dma-apbh: initialized
[ 0.409415] usbcore: registered new interface driver usbfs
[ 0.409607] usbcore: registered new interface driver hub
[ 0.409773] usbcore: registered new device driver usb
[ 0.411113] i2c i2c-0: IMX I2C adapter registered
[ 0.411135] i2c i2c-0: can't use DMA, using PIO instead.
[ 0.411414] pps_core: LinuxPPS API ver. 1 registered
[ 0.411426] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.411519] PTP clock support registered
[ 0.439592] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[ 0.469592] imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[ 0.470708] Advanced Linux Sound Architecture Driver Initialized.
[ 0.472535] clocksource: Switched to clocksource mxc_timer1
[ 0.472643] VFS: Disk quotas dquot_6.6.0
[ 0.472716] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.475221] NET: Registered protocol family 2
[ 0.475899] TCP established hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.476106] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.476358] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.476432] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.476510] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.476725] NET: Registered protocol family 1
[ 0.477123] RPC: Registered named UNIX socket transport module.
[ 0.477134] RPC: Registered udp transport module.
[ 0.477143] RPC: Registered tcp transport module.
[ 0.477152] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.477713] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[ 0.478585] Bus freq driver module loaded
[ 0.481236] Initialise system trusted keyrings
[ 0.481541] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[ 0.496454] Key type asymmetric registered
[ 0.496469] Asymmetric key parser 'x509' registered
[ 0.496497] io scheduler noop registered
[ 0.496507] io scheduler deadline registered
[ 0.496770] io scheduler cfq registered (default)
[ 0.498812] mxc_sdc_fb fb@0: registered mxc display driver ldb
[ 0.536356] mxc_sdc_fb fb@1: registered mxc display driver ldb
[ 0.546752] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[ 0.547022] imx-sdma 20ec000.sdma: loaded firmware 3.3
[ 0.553278] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 24, base_baud = 5000000) is a IMX
[ 0.554049] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 67, base_baud = 5000000) is a IMX
[ 1.308783] console [ttymxc1] enabled
[ 1.321364] random: fast init done
[ 1.325276] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xd3
[ 1.331638] nand: Micron MT29F8G08ABACAWP
[ 1.335679] nand: 1024 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224
[ 1.343969] gpmi-nand 112000.gpmi-nand: enable the asynchronous EDO mode 5
[ 1.350868] Scanning device for bad blocks
[ 1.716925] 3 ofpart partitions found on MTD device gpmi-nand
[ 1.722706] Creating 3 MTD partitions on "gpmi-nand":
[ 1.727769] 0x000000000000-0x000001000000 : "nand.bootloader"
[ 1.735156] 0x000001000000-0x000002000000 : "nand.reserved"
[ 1.742260] 0x000002000000-0x000040000000 : "nand.rootfs"
[ 1.756003] gpmi-nand 112000.gpmi-nand: driver registered.
[ 1.762629] libphy: Fixed MDIO Bus: probed
[ 1.768096] vcan: Virtual CAN interface driver
[ 1.772585] CAN device driver interface
[ 1.776626] 2090000.can supply xceiver not found, using dummy regulator
[ 1.784329] flexcan 2090000.can: device registered (reg_base=f09a8000, irq=34)
[ 1.791631] 2094000.can supply xceiver not found, using dummy regulator
[ 1.799211] flexcan 2094000.can: device registered (reg_base=f09c4000, irq=35)
[ 1.807894] snvs_rtc 20cc034.snvs-rtc-lp: snvs rtc: you use old dts file, please update it
[ 1.816795] snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
[ 1.825257] i2c /dev entries driver
[ 1.830209] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=1)
[ 1.836800] sdhci: Secure Digital Host Controller Interface driver
[ 1.843015] sdhci: Copyright(c) Pierre Ossman
[ 1.847378] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.912605] mmc0: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[ 1.926513] mxc_vpu 2040000.vpu: VPU initialized
[ 1.931788] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
[ 1.940033] caam 2100000.caam: can't identify CAAM ipg clk: -2
[ 1.945978] caam: probe of 2100000.caam failed with error -2
[ 1.955031] caam-snvs 20cc000.caam-snvs: can't identify all tamper alarm configuration
[ 1.963016] caam-snvs: probe of 20cc000.caam-snvs failed with error -22
[ 1.971417] fsl-asrc 2034000.asrc: failed to get mem clock
[ 1.977048] fsl-asrc: probe of 2034000.asrc failed with error -2
[ 1.984097] fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW
[ 1.996693] NET: Registered protocol family 17
[ 2.001161] can: controller area network core (rev 20120528 abi 9)
[ 2.007461] NET: Registered protocol family 29
[ 2.011937] can: raw protocol (rev 20120528)
[ 2.016248] can: broadcast manager protocol (rev 20161123 t)
[ 2.021922] can: netlink gateway (rev 20130117) max_hops=1
[ 2.032741] Loading compiled-in X.509 certificates
[ 2.050707] ubi0: default fastmap pool size: 195
[ 2.055384] ubi0: default fastmap WL pool size: 97
[ 2.060184] ubi0: attaching mtd2
[ 2.064281] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.075634] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.086966] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
[ 2.098347] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
[ 2.108328] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 4.9.88 #3
[ 2.115473] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.122035] [<8010d4ec>] (unwind_backtrace) from [<8010a4a0>] (show_stack+0x10/0x14)
[ 2.129802] [<8010a4a0>] (show_stack) from [<80327fe0>] (dump_stack+0x70/0x8c)
[ 2.137043] [<80327fe0>] (dump_stack) from [<803de1e0>] (ubi_io_read+0x1e8/0x2a8)
[ 2.144542] [<803de1e0>] (ubi_io_read) from [<803de4bc>] (ubi_io_read_ec_hdr+0x68/0x1d0)
[ 2.152647] [<803de4bc>] (ubi_io_read_ec_hdr) from [<803e2e54>] (scan_peb+0x64/0x664)
[ 2.160492] [<803e2e54>] (scan_peb) from [<803e4170>] (ubi_attach+0x178/0x37c)
[ 2.167727] [<803e4170>] (ubi_attach) from [<803d9100>] (ubi_attach_mtd_dev+0x79c/0xc38)
[ 2.175834] [<803d9100>] (ubi_attach_mtd_dev) from [<80820628>] (ubi_init+0x1e0/0x254)
[ 2.183764] [<80820628>] (ubi_init) from [<80101808>] (do_one_initcall+0x134/0x15c)
[ 2.191437] [<80101808>] (do_one_initcall) from [<80800e34>] (kernel_init_freeable+0x208/0x254)
[ 2.200151] [<80800e34>] (kernel_init_freeable) from [<80582340>] (kernel_init+0x8/0x108)
[ 2.208344] [<80582340>] (kernel_init) from [<80106cf0>] (ret_from_fork+0x14/0x24)
[ 2.216567] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
[ 2.227954] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
[ 2.239328] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
[ 2.250709] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes
[ 2.260660] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 4.9.88 #3
[ 2.267801] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.274352] [<8010d4ec>] (unwind_backtrace) from [<8010a4a0>] (show_stack+0x10/0x14)
[ 2.282113] [<8010a4a0>] (show_stack) from [<80327fe0>] (dump_stack+0x70/0x8c)
[ 2.289349] [<80327fe0>] (dump_stack) from [<803de1e0>] (ubi_io_read+0x1e8/0x2a8)
[ 2.296843] [<803de1e0>] (ubi_io_read) from [<803de4bc>] (ubi_io_read_ec_hdr+0x68/0x1d0)
[ 2.304945] [<803de4bc>] (ubi_io_read_ec_hdr) from [<803e2e54>] (scan_peb+0x64/0x664)
[ 2.312790] [<803e2e54>] (scan_peb) from [<803e4170>] (ubi_attach+0x178/0x37c)
[ 2.320025] [<803e4170>] (ubi_attach) from [<803d9100>] (ubi_attach_mtd_dev+0x79c/0xc38)
[ 2.328127] [<803d9100>] (ubi_attach_mtd_dev) from [<80820628>] (ubi_init+0x1e0/0x254)
[ 2.336054] [<80820628>] (ubi_init) from [<80101808>] (do_one_initcall+0x134/0x15c)
[ 2.343723] [<80101808>] (do_one_initcall) from [<80800e34>] (kernel_init_freeable+0x208/0x254)
[ 2.352433] [<80800e34>] (kernel_init_freeable) from [<80582340>] (kernel_init+0x8/0x108)
[ 2.360623] [<80582340>] (kernel_init) from [<80106cf0>] (ret_from_fork+0x14/0x24)
[ 2.368802] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2:0, read only 64 bytes, retry
[ 2.380180] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2:0, read only 64 bytes, retry
[ 2.391554] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2:0, read only 64 bytes, retry
[ 2.402931] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2:0, read 64 bytes
[ 2.412880] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 4.9.88 #3
[ 2.420021] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.426570] [<8010d4ec>] (unwind_backtrace) from [<8010a4a0>] (show_stack+0x10/0x14)
[ 2.434329] [<8010a4a0>] (show_stack) from [<80327fe0>] (dump_stack+0x70/0x8c)
[ 2.441566] [<80327fe0>] (dump_stack) from [<803de1e0>] (ubi_io_read+0x1e8/0x2a8)
[ 2.449061] [<803de1e0>] (ubi_io_read) from [<803de4bc>] (ubi_io_read_ec_hdr+0x68/0x1d0)
[ 2.457164] [<803de4bc>] (ubi_io_read_ec_hdr) from [<803e2e54>] (scan_peb+0x64/0x664)
[ 2.465006] [<803e2e54>] (scan_peb) from [<803e4170>] (ubi_attach+0x178/0x37c)
[ 2.472239] [<803e4170>] (ubi_attach) from [<803d9100>] (ubi_attach_mtd_dev+0x79c/0xc38)
[ 2.480341] [<803d9100>] (ubi_attach_mtd_dev) from [<80820628>] (ubi_init+0x1e0/0x254)
[ 2.488269] [<80820628>] (ubi_init) from [<80101808>] (do_one_initcall+0x134/0x15c)
[ 2.495938] [<80101808>] (do_one_initcall) from [<80800e34>] (kernel_init_freeable+0x208/0x254)
[ 2.504648] [<80800e34>] (kernel_init_freeable) from [<80582340>] (kernel_init+0x8/0x108)
[ 2.512838] [<80582340>] (kernel_init) from [<80106cf0>] (ret_from_fork+0x14/0x24)
[ 2.521002] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 3:0, read only 64 bytes, retry
[ 2.532379] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 3:0, read only 64 bytes, retry
[ 2.543755] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 3:0, read only 64 bytes, retry
[ 2.555126] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 3:0, read 64 bytes
[ 2.565075] CPU: 2 PID: 1 Comm: swapper/0 Tainted: G W 4.9.88 #3
[ 2.572215] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.578765] [<8010d4ec>] (unwind_backtrace) from [<8010a4a0>] (show_stack+0x10/0x14)
[ 2.586526] [<8010a4a0>] (show_stack) from [<80327fe0>] (dump_stack+0x70/0x8c)
[ 2.593762] [<80327fe0>] (dump_stack) from [<803de1e0>] (ubi_io_read+0x1e8/0x2a8)
[ 2.601257] [<803de1e0>] (ubi_io_read) from [<803de4bc>] (ubi_io_read_ec_hdr+0x68/0x1d0)
[ 2.609360] [<803de4bc>] (ubi_io_read_ec_hdr) from [<803e2e54>] (scan_peb+0x64/0x664)
[ 2.617203] [<803e2e54>] (scan_peb) from [<803e4170>] (ubi_attach+0x178/0x37c)
[ 2.624436] [<803e4170>] (ubi_attach) from [<803d9100>] (ubi_attach_mtd_dev+0x79c/0xc38)
[ 2.632537] [<803d9100>] (ubi_attach_mtd_dev) from [<80820628>] (ubi_init+0x1e0/0x254)
[ 2.640465] [<80820628>] (ubi_init) from [<80101808>] (do_one_initcall+0x134/0x15c)
[ 2.648134] [<80101808>] (do_one_initcall) from [<80800e34>] (kernel_init_freeable+0x208/0x254)
[ 2.656845] [<80800e34>] (kernel_init_freeable) from [<80582340>] (kernel_init+0x8/0x108)
[ 2.665034] [<80582340>] (kernel_init) from [<80106cf0>] (ret_from_fork+0x14/0x24)
[ 2.673206] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 4:0, read only 64 bytes, retry

0 Kudos
1 Solution
1,372 Views
tgl
Contributor III

 

@igorpadykov in the end it was related to the fact that the ubi was formatted using 3.0.35, for some reason the gpmi-nand drivers are not compatible, practically you need to flash the board with a 4.x kernel in order for it to be able to read the nand, in my case the file system was flashed with the old kernel as i'm having some issues with the new mfgtool (udc is not detected).

 

View solution in original post

0 Kudos
8 Replies
1,490 Views
igorpadykov
NXP Employee
NXP Employee

Hi GEORGE

 

unfortunately linux kernel 4.19.112 is not officially supported by nxp, may be recommended

to try nxp linux releases from source.codeaurora.org/external/imx/linux-imx repository
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=lf-5.10.y

Documentation

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

Issues with L4.19.112 may be posted on meta-fsl-arm mailing list:.
https://lists.yoctoproject.org/g/meta-freescale

 

Best regards
igor

0 Kudos
1,480 Views
tgl
Contributor III

@igorpadykov I edited my post, I am experiencing the same issue with 4.14.98 from your official branch, I am also experiencing the same issue with 4.9.x so its something unrelated to the version I think but to settings or something that has changed in the nand driver

Tags (1)
0 Kudos
1,472 Views
igorpadykov
NXP Employee
NXP Employee

starting from L4.14 MLC nands are not supported as described on  https://lore.kernel.org/lkml/20180303104554.5958-1-richard@nod.at/

 

Best regards
igor

0 Kudos
1,466 Views
tgl
Contributor III

@igorpadykov edited again, its happening as well with Linux-4.9.88

0 Kudos
1,445 Views
igorpadykov
NXP Employee
NXP Employee

could you please provide dts file used for test.

 

Best regards
igor

0 Kudos
1,440 Views
tgl
Contributor III

Hi,

Attached. Its decompiled from a binary, I do not have the source.

In the gpmi-nand@00112000 node I changed various things in order to try and get it to work (added, removed nand-on-flash-bbt; fsl,legacy-bch-geometry; fsl,use-minimum-ecc;

Partitions are correct as I can boot this with 3.0.35 using the same partitions. Note that the rootfs (mtd2) on the board is flashed using the old mfgtool:

 

<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd2 0 0">Erasing rootfs partition</CMD>
	<CMD state="Updater" type="push" body="$ ubiformat /dev/mtd2"/>
	<CMD state="Updater" type="push" body="$ ubiattach /dev/ubi_ctrl -m 2">Attaching UBI partition</CMD>
	<CMD state="Updater" type="push" body="$ ubimkvol /dev/ubi0 -N udcu -s 536870912"/>
	<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mtd2"/>
	<CMD state="Updater" type="push" body="$ mount -t ubifs ubi0:udcu /mnt/mtd2"/>
	<CMD state="Updater" type="push" body="pipe tar -x -C /mnt/mtd2" file="new/rootfs.tar">Sending and writting rootfs</CMD>
	<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
	<CMD state="Updater" type="push" body="$ umount /mnt/mtd2">Unmounting rootfs partition</CMD>

 

 

Best regards,

0 Kudos
1,433 Views
igorpadykov
NXP Employee
NXP Employee

this dts and seems other sources are not from nxp official linux releases, please try

official nxp linux releases from source.codeaurora.org/external/imx/linux-imx repository

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm/boot/dts/imx6dl-sabreauto-gpmi-we...
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.9.88_2.0.0_ga

Documentation

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

Issues with non-nxp releases may be posted on meta-fsl-arm mailing list:.
https://lists.yoctoproject.org/g/meta-freescale

 

Best regards
igor

0 Kudos
1,373 Views
tgl
Contributor III

 

@igorpadykov in the end it was related to the fact that the ubi was formatted using 3.0.35, for some reason the gpmi-nand drivers are not compatible, practically you need to flash the board with a 4.x kernel in order for it to be able to read the nand, in my case the file system was flashed with the old kernel as i'm having some issues with the new mfgtool (udc is not detected).

 

0 Kudos