[PATCH v1 08/10] ufs: host: mediatek: Fix UniPro setting for MT6989
peter.wang at mediatek.com
peter.wang at mediatek.com
Mon Aug 11 06:11:24 PDT 2025
From: Peter Wang <peter.wang at mediatek.com>
This patch sets the UniPro attribute 0xD09E[4] bit to enable the
1144 functions specifically for the MT6989 platform. This
adjustment ensures proper functionality and compatibility
with the MT6989 hardware.
Signed-off-by: Peter Wang <peter.wang at mediatek.com>
---
drivers/ufs/host/ufs-mediatek.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index d9f582e3e72b..6db75683bbe8 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1475,6 +1475,7 @@ static int ufs_mtk_pre_link(struct ufs_hba *hba)
{
int ret;
u32 tmp;
+ struct ufs_mtk_host *host = ufshcd_get_variant(hba);
ufs_mtk_get_controller_version(hba);
@@ -1500,6 +1501,16 @@ static int ufs_mtk_pre_link(struct ufs_hba *hba)
ret = ufshcd_dme_set(hba, UIC_ARG_MIB(VS_SAVEPOWERCONTROL), tmp);
+ /* Enable the 1144 functions setting */
+ if (host->ip_ver == IP_VER_MT6989) {
+ ret = ufshcd_dme_get(hba, UIC_ARG_MIB(VS_DEBUGOMC), &tmp);
+ if (ret)
+ return ret;
+
+ tmp |= 0x10;
+ ret = ufshcd_dme_set(hba, UIC_ARG_MIB(VS_DEBUGOMC), tmp);
+ }
+
return ret;
}
static void ufs_mtk_post_link(struct ufs_hba *hba)
--
2.45.2
More information about the Linux-mediatek
mailing list