mtd: nand: NFC drivers for RK3308, RK2928 and others
authorYifeng Zhao <yifeng.zhao@rock-chips.com>
Mon, 7 Jun 2021 08:40:29 +0000 (16:40 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 18 Jun 2021 06:37:20 +0000 (14:37 +0800)
commitb12dc5d6fa766b26f567a1f569d4a7effef3b49f
tree68554e8b05841cd6feb8d5a2c199c20cf1991472
parent7da079d54d1d39ecfc571701e8deff4e692eb893
mtd: nand: NFC drivers for RK3308, RK2928 and others

This driver supports Rockchip NFC (NAND Flash Controller) found on
RK3308, RK2928, RKPX30, RV1108 and other SOCs. The driver has been
tested using 8-bit NAND interface on the ARM based RK3308 platform.

Support Rockchip SoCs and NFC versions:
- PX30 and RK3326(NFCv900).
ECC: 16/40/60/70 bits/1KB.
CLOCK: ahb and nfc.
- RK3308 and RV1108(NFCv800).
ECC: 16 bits/1KB.
CLOCK: ahb and nfc.
- RK3036 and RK3128(NFCv622).
ECC: 16/24/40/60 bits/1KB.
CLOCK: ahb and nfc.
- RK3066, RK3188 and RK2928(NFCv600).
ECC: 16/24/40/60 bits/1KB.
CLOCK: ahb.

Supported features:
- Read full page data by DMA.
- Support HW ECC(one step is 1KB).
- Support 2 - 32K page size.
- Support 8 CS(depend on SoCs)

Limitations:
- No support for the ecc step size is 512.
- Untested on some SoCs.
- No support for subpages.
- No support for the builtin randomizer.
- The original bad block mask is not supported. It is recommended to
  use  the BBT(bad block table).

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/mtd/nand/raw/Kconfig
drivers/mtd/nand/raw/Makefile
drivers/mtd/nand/raw/rockchip_nfc.c [new file with mode: 0644]