Re: [PATCH V2 1/2] ufs: ufs-qcom: Restore HS/LS link startup mode for Qualcomm UFS controller v6.2+
From: Mukesh Ojha
Date: Wed Aug 26 2026 - 04:43:21 EST
On Tue, Aug 25, 2026 at 08:22:02PM +0530, Nitin Rawat wrote:
> The link startup mode (HS LSS - high-speed link startup, or LS LSS -
> low-speed link startup) is decided in the boot stage based on the
> bootconfig GPIO. This selection is carried forward through the secondary
> stage bootloaders and finally to HLOS via the spare configuration
> register (REG_UFS_DEBUG_SPARE_CFG).
>
> On Qualcomm UFS controller v6.2 and later, bit 31 in the spare
> configuration register indicates the high-speed link startup mode
> selection, as per the Hardware Programming Guide (HPG).
>
> The spare register value is read during host driver initialization but
> gets cleared after UFS reset. Preserve the spare register value during
> initialization and restore it during link startup to maintain the
> bootloader-configured link startup mode.
>
> Signed-off-by: Nitin Rawat <nitin.rawat@xxxxxxxxxxxxxxxx>
Tested-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
-Mukesh