mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Nitin Rawat <nitin.rawat@oss.qualcomm.com>,
	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
Subject: Re: [PATCH V1 1/2] scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
Date: Mon, 8 Jun 2026 11:33:02 +0200	[thread overview]
Message-ID: <c7036b15-853b-445c-87ae-f9ff06ede326@oss.qualcomm.com> (raw)
In-Reply-To: <20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com>

On 6/1/26 1:50 AM, Nitin Rawat wrote:
> Add a new host quirk UFSHCD_QUIRK_SKIP_DEVICE_RESET to allow host
> controller drivers to skip asserting device reset during UFS power
> down.
> 
> 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.
> If the power rail transitions to LPM (Low Power Mode) while the device
> is still drawing this elevated current, it may trigger an
> OCP (Over Current Protection) fault in the regulator.
> 
> For some UFS devices (e.g., Micron), the elevated current draw persists
> until the reset line is deasserted, making a fixed delay insufficient
> to prevent OCP. This quirk allows such devices to skip device reset
> during UFS power down. The device reset will instead be asserted as
> part of the platform shutdown sequence.
> 
> Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
> ---
>  include/ufs/ufshcd.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
> index 3eaae082329c..18d634499ce5 100644
> --- a/include/ufs/ufshcd.h
> +++ b/include/ufs/ufshcd.h
> @@ -813,6 +813,20 @@ enum ufshcd_quirks {
>  	 * allowed by M-PHY spec ver 6.0.
>  	 */
>  	UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3	= 1 << 28,
> +
> +	/*
> +	 * Some UFS devices keep drawing larger current after reset is
> +	 * asserted until it is deasserted. Asserting device reset
> +	 * during UFS power down causes the device firmware to wake up and
> +	 * execute its reset routine, drawing current beyond the permissible
> +	 * limit for low-power mode (LPM). This may trigger an OCP fault on

Is that UFS-LPM, or Qualcomm-regulator-LPM?

Konrad


> +	 * the regulator supplying power to UFS.
> +	 *
> +	 * Enable this quirk to skip asserting device reset during UFS power
> +	 * down. This is handled only in shutdown; the device reset will be
> +	 * asserted as part of the platform shutdown sequence.
> +	 */
> +	UFSHCD_QUIRK_SKIP_DEVICE_RESET			= 1 << 29,
>  };
> 
>  enum ufshcd_caps {
> --
> 2.34.1
> 
> 

  reply	other threads:[~2026-06-08  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31 23:50 [PATCH V1 0/2] scsi: ufs: ufs-qcom: Fix OCP issue during powerdown Nitin Rawat
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 [this message]
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=c7036b15-853b-445c-87ae-f9ff06ede326@oss.qualcomm.com \
    --to=konrad.dybcio@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 \
    --cc=nitin.rawat@oss.qualcomm.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®