Tool/software: Linux
Hi,
On a custom board with a AM5718, I have a Micron NAND device (MT29F32G08ABAAAWP) connected to the GPMC bus.
I don't need to boot on this NAND device but I have to setup a UBI filesystem on it for an application to save data.
The NAND device has the following properties:
- 4GiB capacity
- Page size is 8KiB
- Erase size is 1MiB (1024K)
- OOB size is 448
My device tree config (DTS) is as follows:
ti,nand-ecc-opt = "bch16";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
gpmc,device-width = <1>;
so I would like to use the hardware ELM feature of the Sitara to locate and correct ECC errors, meaning I'm using the nand_elm driver part.
When I boot the kernel I get the following message:
[ 8.936778] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x68
[ 8.942911] nand: Micron MT29F32G08ABAAAWP
[ 8.956753] nand: 4096 MiB, SLC, erase size: 1024 KiB, page size: 8192, OOB size: 448
[ 8.991076] using OMAP_ECC_BCH16_CODE_HW ECC scheme
[ 8.995781] omap-elm 48078000.elm: unsupported config ecc-step=16
[ 9.016878] omap2-nand: probe of 8000000.nand failed with error -22
My kernel is a 4.1.6 coming from the 02.00.00.00 TI SDK that I've ported on my custom board.
I have digged a bit into this issue and if I'm right it means the ONFI device protocol works well but the ELM driver cannot work with devices of pagesize > 4K.
So my questions are:
- is the Sitara's ELM engine able to handle NAND devices with pagesize=8K ?
- if yes, could you provide some patches to apply on the Linux OMAP NAND driver to deal with this hardware config ?
- if the hardware BCH16 support is not possible with my NAND device, can I get some patches to work with a software ECC management ?
Thanks for your help