Skip to content

spi: add support for Mediatek SPI-NAND controller

Chuanhong Guo linux-arm-kernel linux-devicetree linux-mediatek linux-mtd linux-spi lkml 7 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 8 repliesApplied
  2. v55 patches 1 replySuperseded
  3. v45 patches 6 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v35 patches9 repliesSuperseded
v25 patches6 repliesSuperseded
v1 posting 2/24 patches1 replySuperseded
v1 posting 1/24 patches4 repliesSuperseded

Changes in v6 from the cover letter

add missing nfi mode register configuration in probe fix an off-by-one bug in mtk_snand_mac_io

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/5mtd: nand: make mtk_ecc.c a separated moduledrivers/mtd/nand/Kconfig drivers/mtd/nand/Makefile drivers/mtd/nand/ecc-mtk.c +4 more+12 -40 replies
2/5spi: add driver for MTK SPI NAND Flash Interfacedrivers/spi/Kconfig drivers/spi/Makefile drivers/spi/spi-mtk-snfi.c+1481 -00 replies
3/5mtd: nand: mtk-ecc: also parse nand-ecc-engine if availabledrivers/mtd/nand/ecc-mtk.c+4 -10 replies
4/5spi: dt-bindings: add binding doc for spi-mtk-snfiDocumentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml+88 -00 replies
5/5arm64: dts: mediatek: add mtk-snfi for mt7622arch/arm64/boot/dts/mediatek/mt7622.dtsi+12 -01 reply

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchDaniel GolleKrzysztof Kozlowski
1/5
2/5T-b
3/5
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/5] spi: add support for Mediatek SPI-NAND controller

Mediatek has an extended version of their NAND Flash Interface which has a SPI-NAND mode. In this mode, the controller can perform 1-bit spi-mem ops for up-to 0xa0 bytes and typical SPI-NAND single, dual and quad IO page cache ops with 2-byte address. Additionally, the page cache ops can be performed with ECC and auto data formatting using the ECC engine of the controller.

This patchset implements support of this mode as a separated SPI-MEM driver with pipelined ECC engine.

Changes since v1:
add a blank line between properties in dt binding doc

 rename ecc-engine to nand-ecc-engine for the generic properties

fix warnings/errors from the CI

Changes since v2:
use streamed DMA api to avoid an extra memory copy during read make ECC engine config a per-nand context
take user-requested ECC strength into account

Change since v3:
fix a missed ecc-engine rename in doc from v1

Changes since v4:
fix typo: piplined -> pipelined
fix missing OOB write in snfi driver print page format with dev_dbg instead replace uint*_t copied from vendor driver with u*

Changes since v5:
add missing nfi mode register configuration in probe fix an off-by-one bug in mtk_snand_mac_io

Chuanhong Guo (5):
mtd: nand: make mtk_ecc.c a separated module
spi: add driver for MTK SPI NAND Flash Interface
mtd: nand: mtk-ecc: also parse nand-ecc-engine if available
spi: dt-bindings: add binding doc for spi-mtk-snfi
arm64: dts: mediatek: add mtk-snfi for mt7622

 .../bindings/spi/mediatek,spi-mtk-snfi.yaml   |   88 +
 arch/arm64/boot/dts/mediatek/mt7622.dtsi      |   12 +
 drivers/mtd/nand/Kconfig                      |    7 +
 drivers/mtd/nand/Makefile                     |    1 +
 drivers/mtd/nand/{raw/mtk_ecc.c => ecc-mtk.c} |    8 +-
 drivers/mtd/nand/raw/Kconfig                  |    1 +
 drivers/mtd/nand/raw/Makefile                 |    2 +-
 drivers/mtd/nand/raw/mtk_nand.c               |    2 +-
 drivers/spi/Kconfig                           |   10 +
 drivers/spi/Makefile                          |    1 +
 drivers/spi/spi-mtk-snfi.c                    | 1470 +++++++++++++++++
 .../linux/mtd/nand-ecc-mtk.h                  |    0
 12 files changed, 1597 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/mediatek,spi-mtk-snfi.yaml
 rename drivers/mtd/nand/{raw/mtk_ecc.c => ecc-mtk.c} (98%)
 create mode 100644 drivers/spi/spi-mtk-snfi.c
 rename drivers/mtd/nand/raw/mtk_ecc.h => include/linux/mtd/nand-ecc-mtk.h (100%)
Signature · 1 line
2.35.1