2023-05-26 16:50:15 +00:00
|
|
|
From e84e2430ee0e483842b4ff013ae8a6e7e2fa2734 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Weijie Gao <weijie.gao@mediatek.com>
|
|
|
|
Date: Wed, 1 Apr 2020 02:07:58 +0800
|
|
|
|
Subject: [PATCH 1/2] mtd: rawnand: add driver support for MT7621 nand
|
|
|
|
flash controller
|
|
|
|
|
|
|
|
This patch adds NAND flash controller driver for MediaTek MT7621 SoC.
|
|
|
|
|
|
|
|
The NAND flash controller is similar with controllers described in
|
|
|
|
mtk_nand.c, except that the controller from MT7621 doesn't support DMA
|
|
|
|
transmission, and some registers' offset and fields are different.
|
|
|
|
|
|
|
|
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
|
|
|
|
---
|
|
|
|
drivers/mtd/nand/raw/Kconfig | 8 +
|
|
|
|
drivers/mtd/nand/raw/Makefile | 1 +
|
|
|
|
drivers/mtd/nand/raw/mt7621_nand.c | 1348 ++++++++++++++++++++++++++++++++++++
|
|
|
|
3 files changed, 1357 insertions(+)
|
|
|
|
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.c
|
|
|
|
|
|
|
|
--- a/drivers/mtd/nand/raw/Kconfig
|
|
|
|
+++ b/drivers/mtd/nand/raw/Kconfig
|
2024-08-03 15:44:35 +00:00
|
|
|
@@ -337,6 +337,14 @@ config MTD_NAND_QCOM
|
2023-05-26 16:50:15 +00:00
|
|
|
Enables support for NAND flash chips on SoCs containing the EBI2 NAND
|
|
|
|
controller. This controller is found on IPQ806x SoC.
|
|
|
|
|
|
|
|
+config MTD_NAND_MT7621
|
|
|
|
+ tristate "MT7621 NAND controller"
|
|
|
|
+ depends on SOC_MT7621 || COMPILE_TEST
|
|
|
|
+ depends on HAS_IOMEM
|
|
|
|
+ help
|
|
|
|
+ Enables support for NAND controller on MT7621 SoC.
|
|
|
|
+ This driver uses PIO mode for data transmission instead of DMA mode.
|
|
|
|
+
|
|
|
|
config MTD_NAND_MTK
|
|
|
|
tristate "MTK NAND controller"
|
2023-05-26 18:07:15 +00:00
|
|
|
depends on MTD_NAND_ECC_MEDIATEK
|
2023-05-26 16:50:15 +00:00
|
|
|
--- a/drivers/mtd/nand/raw/Makefile
|
|
|
|
+++ b/drivers/mtd/nand/raw/Makefile
|
2024-03-14 22:27:46 +00:00
|
|
|
@@ -46,6 +46,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_n
|
2023-05-26 16:50:15 +00:00
|
|
|
obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
|
|
|
|
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
|
|
|
|
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
|
|
|
|
+obj-$(CONFIG_MTD_NAND_MT7621) += mt7621_nand.o
|
2023-05-26 18:07:15 +00:00
|
|
|
obj-$(CONFIG_MTD_NAND_MTK) += mtk_nand.o
|
2023-05-26 16:50:15 +00:00
|
|
|
obj-$(CONFIG_MTD_NAND_MXIC) += mxic_nand.o
|
|
|
|
obj-$(CONFIG_MTD_NAND_TEGRA) += tegra_nand.o
|