ufs: ufs-qcom: add device quirk for Micron to avoid OCP

Before going into suspend, the host sends a SSU(SLEEP) command
to the device. Once the SSU(SLEEP) command completes, the Micron
still draws high power on the vccq for some time before going
into low power mode completely.
Add a delay before setting the vccq regulator source into
low power mode to account for the extra time the Micron needs
before it completely goes into sleep mode. As a result, avoid
over current protection (OCP) event from the pmic.

Change-Id: Ic35803fc9e07157cff2a637c003834dbf7846e44
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
This commit is contained in:
Bao D. Nguyen 2020-07-20 21:19:59 -07:00
commit 228eb8ba2c
2 changed files with 5 additions and 0 deletions

View file

@ -1619,6 +1619,9 @@ static int ufs_qcom_apply_dev_quirks(struct ufs_hba *hba)
if (hba->dev_info.wmanufacturerid == UFS_VENDOR_WDC)
hba->dev_quirks |= UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE;
if (hba->dev_info.wmanufacturerid == UFS_VENDOR_MICRON)
hba->dev_quirks |= UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM;
return err;
}

View file

@ -30,6 +30,8 @@
#define UFS_HW_VER_STEP_SHFT (0)
#define UFS_HW_VER_STEP_MASK (0xFFFF << UFS_HW_VER_STEP_SHFT)
#define UFS_VENDOR_MICRON 0x12C
/* vendor specific pre-defined parameters */
#define SLOW 1
#define FAST 2