[PATCH 0/4] mtd: spinand: Add continuous read mode support

Zhengxun zhengxunli.mxic at gmail.com
Thu Oct 7 23:57:55 PDT 2021


This series add support continuous read mode for SPI NAND.

The Macronix SPI NAND supports conventional read mode and continuous
read modes. If the configuration register bit “CONT” = 0, the device
is in conventional read mode. The page read operation and page read
cache Random/ sequential operation is supported in the conventional
read mode. If the configuration register bit “CONT” = 1, the device
is in continuous read mode and only continuous read operation is
supported. During the continuous read mode, the page read cache
related commands are not supported. (Page Cache Sequential (31h),
Page Read Cache Random (30h) and Page Read Cache End (3Fh)).

The continuous read operation including: firstly, starting with the 
page read command and the 1 st page data will be read into the cache
after the read latency tRD_CONT1. Secondly, Issuing the Read From
Cache commands (03h/0Bh/3Bh/6Bh/BBh/EBh) to read out the data from
cache continuously. The cache is divided into two halves, while one 
half of the cache is outputting the data, the other half will be
loaded for the new data; therefore, the host can read out the data
continuously from page to page. Multiple of Read From Cache commands
can be issued in one continuous read operation, each Read From Cache
command is required to read multiple 4-byte data exactly; otherwise,
the data output will be out of sequence from one Read From Cache
command to another Read From Cache command. After all the data is
read out, the host should issue Exit Continuous Read Command (63h)
to terminate this continuous read operation.

The data output for each page will always start from byte 0 and a
full page data (2KB) should be read out for each page. If the host
just wants to read out partial page data, Exit Continuous Read
Command (63h) should be issued to terminate the current continuous
read operation.

Zhengxun (4):
  mtd: spinand: Add support continuous read mode
  mtd: spinand: Add continuous read exit command
  mtd: spinand: Add support continuous read operation
  mtd: spinand: macronix: Add support for Macronix MX31LF2GE4BC SPI NAND
    flash

 drivers/mtd/nand/spi/core.c     | 65 +++++++++++++++++++++++++++++++++++------
 drivers/mtd/nand/spi/macronix.c | 11 +++++++
 include/linux/mtd/spinand.h     | 10 +++++++
 3 files changed, 77 insertions(+), 9 deletions(-)

-- 
2.7.4




More information about the linux-mtd mailing list