linux-stable/drivers/mtd/nand
Brian Norris 60c6738245 mtd: nand: detect OOB size for Toshiba 24nm raw SLC
Toshiba NAND datasheets have not been very forthcoming on OOB size
information; they do not provide any bitfields in the ID string for
spare area. In their 24nm technology flash, however, Toshiba migrated
their NAND to have 32 bytes spare per 512 bytes of page area (up from
the traditional 16 bytes), as they now require 8-bit ECC or higher.

I have discussed this issue directly with Toshiba representatives, and
they acknowledge this problem. They recommend detecting these flash
based on their technology node as follows:

  For 24nm Toshiba SLC raw NAND (not BENAND -- Built-in Ecc NAND), there
  are 32 bytes of spare area for every 512 bytes of in-band data area.

We can implement this rule with the following snippet of a device ID
decode table, which applies to all their 43nm, 32nm, and 24nm SLC NAND
(this table is not fully in the NAND datasheets, but it was provided
directly by Toshiba representatives):

  - ID byte 5, bit[7]:
          1    -> BENAND
          0    -> raw SLC

  - ID byte 6, bits[2:0]:
          100b -> 43nm
          101b -> 32nm
          110b -> 24nm
          111b -> Reserved

I'm also working with Toshiba on including this bitfield description for
their 5th and 6th ID bytes in their public data sheets.

I will provide the 8-byte ID strings from the two 24nm Toshiba samples I
have; their first 6 bytes match the documentation I received from
Toshiba:

  24nm SLC 1Gbit TC58NVG0S3HTA00
  0x98 0xf1 0x80 0x15 0x72 0x16 0x08 0x00

  24nm SLC 2Gbit TC58NVG1S3HTA00
  0x98 0xda 0x90 0x15 0x76 0x16 0x08 0x00

I have also tested for regressions with:

  43nm SLC 4Gbit TC58NVG2S3ETA00
  0x98 0xdc 0x90 0x15 0x76 0x14 0x03 0x10

  32nm SLC 8Gbit TC58NVG3SOFA00
  0x98 0xd3 0x90 0x26 0x76 0x15 0x02 0x08

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2013-08-05 21:05:10 +01:00
..
bcm47xxnflash Fairly unexciting MTD merge for 3.9: 2013-03-02 16:33:54 -08:00
gpmi-nand mtd: gpmi-nand: don't use devm_pinctrl_get_select_default() in probe 2013-08-05 21:01:20 +01:00
alauda.c mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN 2012-05-13 23:14:23 -05:00
ams-delta.c mtd: nand: ams-delta: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:30 +01:00
atmel_nand.c mtd: atmel_nand: fix pmecc selction for ecc requirement typo 2013-08-05 21:03:06 +01:00
atmel_nand_ecc.h mtd: at91: atmel_nand: add Programmable Multibit ECC controller support 2012-07-06 18:23:25 +01:00
au1550nd.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
bf5xx_nand.c mtd: nand: bf5xx_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:38 +01:00
cafe_nand.c mtd: nand: subpage write support for hardware based ECC schemes 2013-04-05 13:22:59 +01:00
cmx270_nand.c mtd: kill MTD_NAND_VERIFY_WRITE 2012-09-29 15:00:46 +01:00
cs553x_nand.c mtd cs553x_nand: Initialise ecc.strength before nand_scan() 2012-12-03 16:36:34 +02:00
davinci_nand.c mtd: nand: davinci: use devm_ioremap_resource() 2013-08-05 20:49:10 +01:00
denali.c mtd: denali: split the generic driver and PCI layer 2012-11-15 15:37:46 +02:00
denali.h mtd: denali: add a DT driver 2012-11-15 15:37:46 +02:00
denali_dt.c mtd: denali_dt: Remove redundant use of of_match_ptr 2013-04-05 14:04:34 +01:00
denali_pci.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
diskonchip.c mtd: diskonchip: remove unused entries in Kconfig 2013-08-05 21:01:55 +01:00
docg4.c mtd: nand: docg4: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:42 +01:00
fsl_elbc_nand.c mtd: remove use of __devinit 2012-11-22 12:07:03 +02:00
fsl_ifc_nand.c mtd: fsl_ifc_nand: set NAND_NO_SUBPAGE_WRITE 2013-08-05 19:09:39 +01:00
fsl_upm.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
fsmc_nand.c mtd: nand: fsmc_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:57 +01:00
gpio.c mtd: nand-gpio: Add missing "owner" field in platform_driver struct 2013-08-05 20:46:21 +01:00
jz4740_nand.c mtd: nand: jz4740_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:05 +01:00
Kconfig mtd: nand-gpio: Unneeded dependency on ARM removed 2013-08-05 20:46:06 +01:00
lpc32xx_mlc.c mtd: nand: lpc32xx: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:06 +01:00
lpc32xx_slc.c mtd: nand: lpc32xx: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:06 +01:00
Makefile mtd: remove the h1910 NAND driver 2013-04-05 13:15:17 +01:00
mpc5121_nfc.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
mxc_nand.c mtd: nand: mxc_nand: Remove unneeded check for platform_get_resource() 2013-08-05 21:01:17 +01:00
nand_base.c mtd: nand: detect OOB size for Toshiba 24nm raw SLC 2013-08-05 21:05:10 +01:00
nand_bbt.c mtd: nand: remove AG-AND support 2013-04-05 12:00:50 +01:00
nand_bch.c mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
nand_ecc.c mtd: nane: print source of error message 2013-02-04 09:27:19 +02:00
nand_ids.c mtd: nand_ids: use size macros 2013-04-05 13:22:06 +01:00
nandsim.c mtd: nand: remove few tiny page NAND bits 2013-04-05 12:03:16 +01:00
ndfc.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
nuc900_nand.c mtd: nand: nuc900_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:09 +01:00
omap2.c mtd: nand: omap2: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:13 +01:00
orion_nand.c mtd: nand: orion_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:14 +01:00
pasemi_nand.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
plat_nand.c mtd: nand: plat_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:16 +01:00
pxa3xx_nand.c mtd: nand: pxa3xx_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:17 +01:00
r852.c mtd: r852: add CONFIG_PM_SLEEP to suspend/resume functions 2013-08-05 19:00:12 +01:00
r852.h
s3c2410.c mtd: nand: s3c2410: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:19 +01:00
sh_flctl.c mtd: sh_flctl: Use of_match_ptr() macro 2013-04-05 13:20:14 +01:00
sharpsl.c mtd: nand: sharpsl: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:21 +01:00
sm_common.c mtd: nand_ids: use size macros 2013-04-05 13:22:06 +01:00
sm_common.h
socrates_nand.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
tmio_nand.c mtd: kill MTD_NAND_VERIFY_WRITE 2012-09-29 15:00:46 +01:00
txx9ndfmc.c mtd: nand: txx9ndfmc: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:22 +01:00
xway_nand.c mtd: lantiq: Add NAND support on Lantiq XWAY SoC. 2012-09-29 15:05:18 +01:00