Enable NAND flash on-die ECC with sam-ba
I am writing a BSP and application software for a board based on the SAMA5D27-D1G SiP and we are using a 512 MiB NAND Flash from Micron (MT29F4G08ABAFAWP). This flash memory has on-die support for calculating ECC with 8 bit correction capability. It is fairly easy to add or enable support for this in at91bootstrap, U-Boot and the Linux kernel, but my problem is that the SAM-BA NAND flash applet for the SAMA5D2 does not seem to have this option, so when writing to the flash with sam-ba, the ECC bits in the OOB area are never written. Thus, I cannot enable this feature when booting because then the ECC calculation becomes wrong compared to the (not) stored bits.
Is there any other version of the NAND flash applet that has support enabling on-die ECC? How else can I solve the problem?