Hi,
I was using rb951ui-2hnd since 2016 and have flashed with openwrt hundreds of devices. Recently I have received unit with unuspported nand (see image attached).
The error from the dmesg
was as follows:
[ 4.285397] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xf1
[ 4.291967] nand: ESMT NAND 128MiB 3,3V 8-bit
[ 4.296502] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 32
[ 4.304367] ------------[ cut here ]------------
[ 4.309164] WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/nand_base.c:4716 nand_scan_tail+0x294/0xcf0
[ 4.318431] No oob scheme defined for oobsize 32
[ 4.323196] Modules linked in:
[ 4.326376] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.193 #0
[ 4.332489] Stack : 80550000 80507a6c 00000000 00000000 804da7cc 87c29c34 87c242dc 8052f947
[ 4.341148] 804d68b4 00000001 807d37d0 0000126c 80449440 807d0000 87c29be8 628c6ff4
[ 4.349810] 00000000 00000000 807d0000 000014d0 00000000 00000000 00000007 00000000
[ 4.358464] 0000004b f3ee8b72 0000004a 00000000 00000000 00000009 00000000 804f7b58
[ 4.367121] 802cacd4 0000126c 80449440 a7d81000 00000002 8029bd84 00000000 807d0000
[ 4.375775] ...
[ 4.378308] Call Trace:
[ 4.380849] [<8006c9fc>] show_stack+0x58/0x100
[ 4.385465] [<800871b0>] __warn+0xe4/0x13c
[ 4.389696] [<80087238>] warn_slowpath_fmt+0x30/0x3c
[ 4.394840] [<802cacd4>] nand_scan_tail+0x294/0xcf0
[ 4.399891] [<802d127c>] ar934x_nfc_probe+0x6c4/0x898
[ 4.405148] [<802abb14>] platform_drv_probe+0x2c/0x70
[ 4.410367] [<802aa040>] really_probe+0x138/0x2a8
[ 4.415249] [<802aa254>] __driver_attach+0xa4/0xdc
[ 4.420204] [<802a8274>] bus_for_each_dev+0x5c/0xbc
[ 4.425263] [<802a95ac>] bus_add_driver+0xf4/0x214
[ 4.430213] [<802aaad0>] driver_register+0xac/0xfc
[ 4.435184] [<80060a50>] do_one_initcall+0xd0/0x1a0
[ 4.440244] [<80552d38>] kernel_init_freeable+0x150/0x210
[ 4.445838] [<8043ed40>] kernel_init+0x10/0x104
[ 4.450538] [<800674b8>] ret_from_kernel_thread+0x14/0x1c
[ 4.456143] ---[ end trace 09368123881aea93 ]---
[ 4.460924] ar934x-nfc ar934x-nfc: scan tail failed, err:-22
[ 4.466820] ar934x-nfc: probe of ar934x-nfc failed with error -22
I have found the documentation for the nand chip:
https://www.gigadevice.com/flash-memory/gd9fu1g8f3a/
And it seems that the OOB size is not recognised (in doc it is 64, it was recognised as 32).
I have then tries adding the device definition to the drivers/mtd/nand/nand_ids.c
(values filled by me based on the doc linked above - may contain errors):
{
.name = "GD9FU1G8F3A 1G 3.3V 8-bit",
{{
.mfr_id = 0xc8,
.dev_id = 0xf1
}},
.pagesize = SZ_2K,
.chipsize = 128,
.erasesize = SZ_128K,
.options = 0,
.id_len = 2,
.oobsize = 64,
.ecc.strength_ds = 4,
.ecc.step_ds = 512
},
Then the error changed to:
[ 4.292721] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xf1
[ 4.299330] nand: GigaDevice GD9FU1G8F3A 1G 3.3V 8-bit
[ 4.304655] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 4.318541] nand: WARNING: ar934x-nfc: the ECC used on your system is too weak compared to the one required by the NAND chip
[ 4.330136] Scanning device for bad blocks
[ 4.337188] Bad eraseblock 53 at 0x0000006a0000
[ 4.342803] Bad eraseblock 71 at 0x0000008e0000
[ 4.347765] Bad eraseblock 76 at 0x000000980000
[ 4.353946] Bad eraseblock 105 at 0x000000d20000
[ 4.428708] Creating 3 MTD partitions on "ar934x-nfc":
[ 4.434040] 0x000000000000-0x000000040000 : "booter"
[ 4.463026] 0x000000040000-0x000000400000 : "kernel"
[ 4.492007] 0x000000400000-0x000008000000 : "ubi"
Can you help me in supporting this hardware?