[PATCH V1 0/2] scsi: ufs: ufs-qcom: Fix OCP issue during powerdown

From: Nitin Rawat

Date: Sun May 31 2026 - 19:52:03 EST


This series addresses an OCP (Over Current Protection) fault observed
on Micron UFS parts during UFS power down (PC=3).

Background
==========
According to the UFS specification, the power-off sequence includes
sending an SSU command with Power_Condition=3, followed by asserting
RST_N low (hardware reset), turning off REF_CLK, and then disabling
the power rails (VCC, VCCQ/VCCQ2).

When RST_N is asserted, the UFS device firmware wakes up and executes
its internal reset routine. This routine initializes multiple hardware
blocks and causing the device to draw a large curreny during this time.


A previous fix [1] addressed the resulting OCP issue by adding a 10ms
delay after asserting HWRST. The delay allows the reset routine to
complete while the power rails remain active and in high-power mode,
before the regulator framework transitions the rail to LPM (Low Power
Mode) after the UFS driver disables it.

Problem
==========
The 10ms delay fix is insufficient for Micron UFS parts. Unlike
other vendors whose reset routine completes within ~10ms, Micron parts
continue to draw current beyond the LPM threshold for a longer duration
after reset is asserted - specifically until the reset line is deasserted
(RST_N goes high). No fixed delay can reliably cover this window since
there is currently no mechanism for the host to query whether the device
reset routine has completed.

Solution
==========
Introduce a new host quirk UFSHCD_QUIRK_SKIP_DEVICE_RESET to skip
asserting device reset during UFS power down for Micron parts .
For all other vendors, the existing behavior (assert reset + 10ms delay)
is preserved. The device reset will be asserted as part of the
platform shutdown sequence.

[1] commit 5127be409c6c ("scsi: ufs: ufs-qcom: Fix UFS OCP issue during
UFS power down (PC=3)")

Nitin Rawat (2):
scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk

drivers/ufs/host/ufs-qcom.c | 27 ++++++++++++++++++++++++---
include/ufs/ufshcd.h | 14 ++++++++++++++
2 files changed, 38 insertions(+), 3 deletions(-)

--
2.34.1