summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/mtk_nand.c
diff options
context:
space:
mode:
authorRogerCC Lin <rogercc.lin@mediatek.com>2017-11-30 22:10:45 +0800
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-12-14 13:34:22 +0100
commit98dea8d71931460c189e5001b0faf2180a42db42 (patch)
treedf9cd36f4f2919aefcad7c0ce807e51a5bf00aa9 /drivers/mtd/nand/mtk_nand.c
parentb45ee5501ede9a369e9bc20edca508193b848d25 (diff)
mtd: nand: mtk: Support MT7622 NAND flash controller.
Add tables to support MT7622 NAND flash controller. Signed-off-by: RogerCC Lin <rogercc.lin@mediatek.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/mtk_nand.c')
-rw-r--r--drivers/mtd/nand/mtk_nand.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index b9946ae58616..6977da3a26aa 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -174,6 +174,10 @@ static const u8 spare_size_mt2712[] = {
74
};
+static const u8 spare_size_mt7622[] = {
+ 16, 26, 27, 28
+};
+
static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand)
{
return container_of(nand, struct mtk_nfc_nand_chip, nand);
@@ -1400,6 +1404,15 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
.max_sector_size = 1024,
};
+static const struct mtk_nfc_caps mtk_nfc_caps_mt7622 = {
+ .spare_size = spare_size_mt7622,
+ .num_spare_size = 4,
+ .pageformat_spare_shift = 4,
+ .nfi_clk_div = 1,
+ .max_sector = 8,
+ .max_sector_size = 512,
+};
+
static const struct of_device_id mtk_nfc_id_table[] = {
{
.compatible = "mediatek,mt2701-nfc",
@@ -1407,6 +1420,9 @@ static const struct of_device_id mtk_nfc_id_table[] = {
}, {
.compatible = "mediatek,mt2712-nfc",
.data = &mtk_nfc_caps_mt2712,
+ }, {
+ .compatible = "mediatek,mt7622-nfc",
+ .data = &mtk_nfc_caps_mt7622,
},
{}
};