scsi: ufs: qcom: Power down UFS during system suspend on Milos
Subsystems (3)
PATCH 1/1 scsi: ufs: qcom: Power down UFS during system suspend on Milos
On Milos the UFS PHY GDSC is turned off on every system suspend and the PHY loses its register state, so exiting hibern8 on resume fails:
ufshcd-qcom 1d84000.ufshc: pwr ctrl cmd 0x18 with (MIBattribute 0x0, mode 0x0) failed, host upmcrs:0x5 ufshcd-qcom 1d84000.ufshc: ufshcd_uic_hibern8_exit: hibern8 exit failed. ret = 5 ufshcd-qcom 1d84000.ufshc: __ufshcd_wl_resume: hibern8 exit failed 5
Set no_phy_retention so the controller and device are powered down during system suspend and the link is brought up again on resume.
--- drivers/ufs/host/ufs-qcom.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/ufs/host/ufs-qcom.c +5 -0
@@ -3033,6 +3033,10 @@ static void ufs_qcom_remove(struct platform_device *pdev)platform_device_msi_free_irqs_all (hba->dev); } +static const struct ufs_qcom_drvdata ufs_qcom_milos_drvdata = { + .no_phy_retention = true, +}; +static const struct ufs_qcom_drvdata ufs_qcom_sm8550_drvdata = { .quirks =UFSHCD_QUIRK_BROKEN_LSDBS_CAP , .no_phy_retention = true,
@@ -3044,6 +3048,7 @@ static const struct ufs_qcom_drvdata ufs_qcom_sa8255p_drvdata = {static const struct of_device_id ufs_qcom_of_match[]__maybe_unused = { { .compatible ="qcom,ufshc" }, + { .compatible ="qcom,milos-ufshc" , .data = &ufs_qcom_milos_drvdata }, { .compatible ="qcom,sm8550-ufshc" , .data = &ufs_qcom_sm8550_drvdata }, { .compatible ="qcom,sm8650-ufshc" , .data = &ufs_qcom_sm8550_drvdata }, { .compatible ="qcom,sa8255p-ufshc" , .data = &ufs_qcom_sa8255p_drvdata },
---
base-commit: bf1ee2bd5c2da8992f33c8950ef194aaff74ed6c
change-id: 20261005-milos-ufs-suspend-7dd7439543a6
Best regards,
Signature · 1 line
Alexander Koskovich <[email protected]>
Quoted 9 lines · Alexander Koskovich
On Milos the UFS PHY GDSC is turned off on every system suspend and the PHY loses its register state, so exiting hibern8 on resume fails:
ufshcd-qcom 1d84000.ufshc: pwr ctrl cmd
0x18with (MIBattribute0x0, mode0x0) failed, host upmcrs:0x5 ufshcd-qcom 1d84000.ufshc:ufshcd_uic_hibern8_exit: hibern8 exit failed. ret = 5 ufshcd-qcom 1d84000.ufshc:__ufshcd_wl_resume: hibern8 exit failed 5Set
no_phy_retentionso the controller and device are powered down during system suspend and the link is brought up again on resume.
On the Fairphone (Gen. 6) which is also milos using 7.3/scsi-fixes (469fa055664b) 3 of 3 s2idle resumes fail hibern8 exit with the quoted lines above.
With the patch 5 s2idle and 10 deep suspend/resume cycles: no hibern8 exit failure ufshcd_wl_resume 32-35 ms each, a 4 MiB fsync write succeeds after every resume.
Alexander,
Quoted 2 lines
On Milos the UFS PHY GDSC is turned off on every system suspend and the PHY loses its register state, so exiting hibern8 on resume fails:
Applied to 7.4/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Quoted 8 lines · Alexander Koskovich
On Milos the UFS PHY GDSC is turned off on every system suspend and the PHY loses its register state, so exiting hibern8 on resume fails:
ufshcd-qcom 1d84000.ufshc: pwr ctrl cmd
0x18with (MIBattribute0x0, mode0x0) failed, host upmcrs:0x5 ufshcd-qcom 1d84000.ufshc:ufshcd_uic_hibern8_exit: hibern8 exit failed. ret = 5 ufshcd-qcom 1d84000.ufshc:__ufshcd_wl_resume: hibern8 exit failed 5[...]
Applied to 7.4/scsi-queue, thanks!
[1/1] scsi: ufs: qcom: Power down UFS during system suspend on Milos
https://git.kernel.org/mkp/scsi/c/fb2a238f15f0
Signature · 1 line
Martin K. Petersen