summaryrefslogtreecommitdiff
path: root/drivers/ufs/host/ufs-mediatek.h
diff options
context:
space:
mode:
authorPeter Wang <peter.wang@mediatek.com>2024-03-15 11:34:42 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2024-03-26 04:01:11 +0300
commit1c5e7221bb67d7702532ada40461b7824a6dab07 (patch)
tree9646ecc8574762bffe0a51f33e22a872cc0da65c /drivers/ufs/host/ufs-mediatek.h
parent4cece764965020c22cff7665b18a012006359095 (diff)
downloadlinux-1c5e7221bb67d7702532ada40461b7824a6dab07.tar.xz
scsi: ufs: mediatek: Fix vsx/vccqx control logic
VSX (the upper layer of VCCQ/VCCQ2) should: 1. Always set to hpm mode if ufs device is active. 2. Enter lpm mode only if ufs device is not active. VCCQX should: 1. Keep hpm mode if vccq and vccq2 not set in dts. 2. Keep hpm mode if vcc not set in dts keep vcc always on. 3. Keep hpm if broken vcc keep vcc always on and not allow vccq lpm. 4. Except upper case, can enter lpm mode if ufs device is not active. Acked-by: Chun-Hung Wu <Chun-Hung.Wu@mediatek.com> Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20240315083448.7185-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/host/ufs-mediatek.h')
-rw-r--r--drivers/ufs/host/ufs-mediatek.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ufs/host/ufs-mediatek.h b/drivers/ufs/host/ufs-mediatek.h
index fb53882f42ca..1670e2f6ce09 100644
--- a/drivers/ufs/host/ufs-mediatek.h
+++ b/drivers/ufs/host/ufs-mediatek.h
@@ -135,6 +135,12 @@ enum ufs_mtk_host_caps {
UFS_MTK_CAP_VA09_PWR_CTRL = 1 << 1,
UFS_MTK_CAP_DISABLE_AH8 = 1 << 2,
UFS_MTK_CAP_BROKEN_VCC = 1 << 3,
+
+ /*
+ * Override UFS_MTK_CAP_BROKEN_VCC's behavior to
+ * allow vccqx upstream to enter LPM
+ */
+ UFS_MTK_CAP_ALLOW_VCCQX_LPM = 1 << 5,
UFS_MTK_CAP_PMC_VIA_FASTAUTO = 1 << 6,
};