Re: [PATCH V1 1/2] scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk

From: Konrad Dybcio

Date: Mon Jun 08 2026 - 05:37:31 EST


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@xxxxxxxxxxxxxxxx>
> ---
> 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
>
>