Re: [PATCH v4 08/12] scsi: ufs: ufs-qcom: Fixup PAM-4 TX L0_L1_L2_L3 adaptation pattern length
From: Bean Huo
Date: Mon Mar 23 2026 - 05:40:19 EST
On Fri, 2026-03-20 at 20:10 -0700, Can Guo wrote:
> If HS-G6 Power Mode change handshake is successful and outbound data Lanes
> are expected to transmit ADAPT, M-TX Lanes shall be configured as
>
> if (Adapt Type == REFRESH)
> TX_HS_ADAPT_LENGTH_L0_L1_L2_L3 = PA_PeerRxHsG6AdaptRefreshL0L1L2L3.
> else if (Adapt Type == INITIAL)
> TX_HS_ADAPT_LENGTH_L0_L1_L2_L3 = PA_PeerRxHsG6AdaptInitialL0L1L2L3.
>
> On some platforms, the ADAPT_L0_L1_L2_L3 duration on Host TX Lanes is only
> a half of theoretical ADAPT_L0_L1_L2_L3 duration TADAPT_L0_L1_L2_L3 (in
> PAM-4 UI) calculated from TX_HS_ADAPT_LENGTH_L0_L1_L2_L3.
>
> For such platforms, the workaround is to double the ADAPT_L0_L1_L2_L3
> duration by uplifting TX_HS_ADAPT_LENGTH_L0_L1_L2_L3. UniPro initializes
> TX_HS_ADAPT_LENGTH_L0_L1_L2_L3 during HS-G6 Power Mode change handshake,
> it would be too late for SW to update TX_HS_ADAPT_LENGTH_L0_L1_L2_L3 post
> HS-G6 Power Mode change. Update PA_PeerRxHsG6AdaptRefreshL0L1L2L3 and
> PA_PeerRxHsG6AdaptInitialL0L1L2L3 post Link Startup and before HS-G6
> Power Mode change, so that the UniPro would use the updated value during
> HS-G6 Power Mode change handshake.
>
> Signed-off-by: Can Guo <can.guo@xxxxxxxxxxxxxxxx>
Please add my reviewed tag for this patch:
Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>