From 0f8a0dd620b2fb5f9c852844ce5f445bb0bd6d52 Mon Sep 17 00:00:00 2001
From: Sam Shih <sam.shih@mediatek.com>
Date: Wed, 4 May 2022 10:27:43 +0800
Subject: [PATCH 5/5] mediatek: add mt7986a mmc support

Add mt7986a boot mmc support

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
---
 ...-mmc-mediatek-add-mt7986-mmc-support.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 target/linux/mediatek/patches-5.15/0704-mmc-mediatek-add-mt7986-mmc-support.patch

--- /dev/null
+++ b/target/linux/mediatek/patches-5.15/0704-mmc-mediatek-add-mt7986-mmc-support.patch
@@ -0,0 +1,31 @@
+diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
+index 1ac9201..a32349c 100644
+--- a/drivers/mmc/host/mtk-sd.c
++++ b/drivers/mmc/host/mtk-sd.c
+@@ -540,6 +540,18 @@ static const struct mtk_mmc_compatible mt7622_compat = {
+ 	.support_64g = false,
+ };
+ 
++static const struct mtk_mmc_compatible mt7986_compat = {
++    .clk_div_bits = 12,
++    .hs400_tune = false,
++    .pad_tune_reg = MSDC_PAD_TUNE0,
++    .async_fifo = true,
++    .data_tune = true,
++    .busy_check = true,
++    .stop_clk_fix = true,
++    .enhance_rx = true,
++    .support_64g = true,
++};
++
+ static const struct mtk_mmc_compatible mt8516_compat = {
+ 	.clk_div_bits = 12,
+ 	.recheck_sdio_irq = true,
+@@ -584,6 +596,7 @@ static const struct of_device_id msdc_of_ids[] = {
+ 	{ .compatible = "mediatek,mt2701-mmc", .data = &mt2701_compat},
+ 	{ .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat},
+ 	{ .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
++	{ .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat},
+ 	{ .compatible = "mediatek,mt8516-mmc", .data = &mt8516_compat},
+ 	{ .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat},
+ 	{ .compatible = "mediatek,mt6779-mmc", .data = &mt6779_compat},
