Linux-mtd Archive on
 help / Atom feed
From: Jeff Kletsky <>
To: "" <>
Subject: nand: Proper definition of "extra" OOB regions? (4x interleaved, then one bulk user)
Date: Thu, 13 Jun 2019 12:32:53 -0700
Message-ID: <> (raw)


I've been trying to track down the proper way to express the Paragon
SPI NAND's OOB "user" data segments, but am not clear how upper
layers interpret the combination of `` and the
overall OOB size, typically set through the `NAND_MEMORG` macro.

Rather than churn Patchwork and those that donate their time and
energy follow, review, and manage patches, would it be possible to
confirm that the last 64 bytes of this chip's user OOB, which
is not contiguous with any other user areas, should (or should not)
be defined in `.free` as a fifth section?


In the case of the Paragon chips, there is a total of 128 bytes of OOB,
split into a 4-byte BBM reservation, four repeats of 15-byte sections
with "factory" and "user" areas interleaved, then the remaining 64 bytes
available as a user area, not contiguous with other user areas[1].

0x800 -- 4 bytes BBM

0x804 -- 2 bytes user
0x806 -- 13 bytes factory ECC

0x813 -- 2 bytes user
0x815 -- 13 bytes factory ECC

0x822 -- 2 bytes user
0x824 -- 13 bytes factory ECC

0x831 -- 2 bytes user
0x833 -- 13 bytes factory ECC

0x840 -- 64 bytes user      <== this is the subject of the question

Clearly, the 4 regions of interleaved OOB data needs to be described
in both `.ecc` and `.free`. What isn't completely clear to me is the
remaining 64-byte area.

Is that the OOB area is defined as 128 bytes and that only 64 bytes
have been reserved sufficient, or should those 64 bytes, which
are not contiguous with any of the other "user" segments be a fifth
section in defining `.free`?

That the driver "works" without defining a fifth region in a specific,
UBI-based application doesn't assure me that it will work properly
in all applications with all upper-layer consumers.

Examining supported chips with similar OOB layouts with multiple
sections then an "additional" area, such as the GigaDevice GD5FxGQ4xA,
was not terribly insightful. The GD5F1GQ4UAY datasheet[2] marks the
upper 64-byte region as "reserved", in contrast to "User meta data"
and it is not described in the current `gigadevice.c`[3]. As such,
it isn't convincing evidence that it was omitted as "not required",
because it was marked "reserved", or perhaps for some other reason.

As a side note, the datasheet also marks the first byte of each region
as "reserved", which is not reflected in the current `gigadevice.c`,
which includes it in the free region for sections 1-3.



     pg. 36

     pg. 33


Linux MTD discussion mailing list

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 19:32 Jeff Kletsky [this message]
     [not found] ` <>
2019-06-14  2:54   ` Jeff Kletsky

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mtd Archive on

Archives are clonable:
	git clone --mirror linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ \
	public-inbox-index linux-mtd

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox