Skip to contentSkip to conversation

scsi: ufs: exynos: fsd: Gate ref_clk and put UFS device in reset on suspend

PATCH Applied Bharat Uppal 3 participants 3 messages Aug 21, 2025 – Aug 31, 2025 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20250821053938epcas5p290f78790250d8cb09df2f35e45624359@epcas5p2.samsung.com

#1 lore raw

PATCH 1/1 scsi: ufs: exynos: fsd: Gate ref_clk and put UFS device in reset on suspend

On FSD platform, gating the reference clock (ref_clk) and putting the UFS device in reset by asserting the reset signal during UFS suspend, improves the power savings and ensures the PHY is fully turned off.

These operations are added as FSD specific suspend hook to avoid unintended side effects on other SoCs supported by this driver.

---
 drivers/ufs/host/ufs-exynos.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/ufs/host/ufs-exynos.c +8 -0
index 3e545af536e5..4d0f7d6b84fe 100644
@@ -1896,6 +1896,13 @@ static int fsd_ufs_pre_pwr_change(struct exynos_ufs *ufs,
 	return 0;
 }
 
+static int fsd_ufs_suspend(struct exynos_ufs *ufs)
+{
+	exynos_ufs_gate_clks(ufs);
+	hci_writel(ufs, 0, HCI_GPIO_OUT);
+	return 0;
+}
+
 static inline u32 get_mclk_period_unipro_18(struct exynos_ufs *ufs)
 {
 	return (16 * 1000 * 1000000UL / ufs->mclk_rate);
@@ -2162,6 +2169,7 @@ static const struct exynos_ufs_drv_data fsd_ufs_drvs = {
 	.pre_link               = fsd_ufs_pre_link,
 	.post_link              = fsd_ufs_post_link,
 	.pre_pwr_change         = fsd_ufs_pre_pwr_change,
+	.suspend                = fsd_ufs_suspend,
 };
 
 static const struct exynos_ufs_drv_data gs101_ufs_drvs = {
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#2 lore raw
Quoted 6 lines · Bharat Uppal

On FSD platform, gating the reference clock (ref_clk) and putting the UFS device in reset by asserting the reset signal during UFS suspend, improves the power savings and ensures the PHY is fully turned off.

These operations are added as FSD specific suspend hook to avoid unintended side effects on other SoCs supported by this driver.

#3 lore raw
In reply to Bharat Uppal

Bharat,

Quoted 3 lines

On FSD platform, gating the reference clock (ref_clk) and putting the UFS device in reset by asserting the reset signal during UFS suspend, improves the power savings and ensures the PHY is fully turned off.

Applied to 6.18/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen