From: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
To: mani@kernel.org, James.Bottomley@HansenPartnership.com,
alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Subject: [PATCH V1 0/2] scsi: ufs: ufs-qcom: Fix OCP issue during powerdown
Date: Mon, 1 Jun 2026 05:20:09 +0530 [thread overview]
Message-ID: <20260531235011.1052706-1-nitin.rawat@oss.qualcomm.com> (raw)
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
next reply other threads:[~2026-05-31 23:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 23:50 Nitin Rawat [this message]
2026-05-31 23:50 ` [PATCH V1 1/2] scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk Nitin Rawat
2026-06-08 9:33 ` Konrad Dybcio
2026-05-31 23:50 ` [PATCH V1 2/2] scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk Nitin Rawat
2026-06-01 16:17 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260531235011.1052706-1-nitin.rawat@oss.qualcomm.com \
--to=nitin.rawat@oss.qualcomm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®