Skip to content

RFC mtd: nand: spi: Add CASN page support

Sky Huang linux-arm-kernel linux-mediatek linux-mtd lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mtd: nand: Create param.c to do CRC check and bitwise majority for Parameter & CASN pagedrivers/mtd/nand/Makefile drivers/mtd/nand/param.c drivers/mtd/nand/raw/nand_onfi.c +1 more+76 -411 reply
2/4include: mtd: Add CASN page definition and related structs.include/linux/mtd/casn.h+191 -01 reply
3/4include: mtd: spinand: Add CASN page related macros and flags.include/linux/mtd/spinand.h+98 -21 reply
4/4mtd: nand: spi: Add CASN page supportdrivers/mtd/nand/spi/core.c+729 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH nand/next 0/4] mtd: nand: spi: Add CASN page support

From: "Sky Huang" <[email protected]>

Hi, this is Qi-Ze Huang(Sky Huang) from MediaTek. On our router platforms chips, we have to quality lots of SPI-NAND devices and are eager for a standard so that we don't need to maintain trivial flash ID table anymore. I also noticed a talk in 2019 Embedded Linux Conference, Memory Technology Devices: what's new, which mentioned "ONFI for SPI-NANDs? Maybe, maybe not".

So earlier this year, I proposed a bold idea, CASN page (Common Attributes for SPI-NAND). I worked together with top 3 SPI-NAND market share flash vendors and other vendors to integrate CASN page on their SPI-NAND devices including but not limited to:
[ESMT]
F50L1G41LB
F50L2G41KA

[Etron]
EM73C044VCF-H
EM73D044VCO-H
EM73E044VCE-H
EM73F044VCA-H

[GigaDevice]
GD5F1GM7UE
GD5F1GQ5UEYIG
GD5F2GM7UE
GD5F2GQ5UEYIG
GD5F4GM8UE
GD5F4GQ6UEYIG

[Macronix (MXIC)]
MX35LF1GE4ABZ4IG

[Winbond]
W25N01GV
W25N01KV
W25N02KV
W25N04KV

A document of CASN is hosted on github(https://github.com/mtk-openwrt/ doc/blob/main/CASN%20Page%20Introduction.pdf) So I'll try to keep it simple here.

With CASN page, we don't need to maintain SPI-NAND flash ID table anymore. Currently, it's integrated in 3.3V SPI-NANDs of small density and it's not JEDEC standard yet. But it should be able to handle 1.8V and can be easily integrated by flash vendors.

I believe this idea and implementation have room for improvement. Hope to hear you open source community's comments soon.

---
Sky Huang (4):
mtd: nand: Create param.c to do CRC check and bitwise majority for
Parameter & CASN page
include: mtd: Add CASN page definition and related structs.
include: mtd: spinand: Add CASN page related macros and flags.
mtd: nand: spi: Add CASN page support

 drivers/mtd/nand/Makefile        |   2 +-
 drivers/mtd/nand/param.c         |  52 +++
 drivers/mtd/nand/raw/nand_onfi.c |  43 +-
 drivers/mtd/nand/spi/core.c      | 741 ++++++++++++++++++++++++++++++-
 include/linux/mtd/casn.h         | 191 ++++++++
 include/linux/mtd/param.h        |  20 +
 include/linux/mtd/spinand.h      | 100 ++++-
 7 files changed, 1094 insertions(+), 55 deletions(-)
 create mode 100644 drivers/mtd/nand/param.c
 create mode 100644 include/linux/mtd/casn.h
 create mode 100644 include/linux/mtd/param.h
Signature · 1 line
2.45.2