Skip to content

Commit ad6823e

Browse files
nitinrawat123Pradeep-pvk
authored andcommitted
FROMLIST: scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk
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. Link: https://lore.kernel.org/linux-scsi/20260531235011.1052706-2-nitin.rawat@oss.qualcomm.com/ Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com> Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
1 parent 404d47c commit ad6823e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

include/ufs/ufshcd.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,20 @@ enum ufshcd_quirks {
804804
* delay after enabling VCC to ensure it's stable.
805805
*/
806806
UFSHCD_QUIRK_VCC_ON_DELAY = 1 << 27,
807+
808+
/*
809+
* Some UFS devices keep drawing larger current after reset is
810+
* asserted until it is deasserted. Asserting device reset
811+
* during UFS power down causes the device firmware to wake up and
812+
* execute its reset routine, drawing current beyond the permissible
813+
* limit for low-power mode (LPM). This may trigger an OCP fault on
814+
* the regulator supplying power to UFS.
815+
*
816+
* Enable this quirk to skip asserting device reset during UFS power
817+
* down. This is handled only in shutdown; the device reset will be
818+
* asserted as part of the platform shutdown sequence.
819+
*/
820+
UFSHCD_QUIRK_SKIP_DEVICE_RESET = 1 << 28,
807821
};
808822

809823
enum ufshcd_caps {

0 commit comments

Comments
 (0)