Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b790b145 authored by Ziqi Chen's avatar Ziqi Chen
Browse files

phy: qcom-ufs-qmp-v3-660: increase the minimum time in hibernate



Some UFS devices violate T-HIBERN8_ENTER_TX time when moving Device
TX (Host RX) lane-1 from SLEEP to HIBERN8 at the end of burst.
M-PHY specification defines max value of 1000 ns for
T-HIBERN8_ENTER_TX but these devices drive DIF-N for 3432 ns. This can
cause the broken link situation after link starup.

This change fixes above issue by increasing host PHY's RX_MIN_HIBERN8_TIME
to 8us (we are giving some additional margin though device needs 3.432us).

Change-Id: If11d873534a025dca4bb9cea4ab3f76073001dc9
Signed-off-by: default avatarZiqi Chen <ziqichen@codeaurora.org>
parent 210bff95
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016,2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -155,6 +155,7 @@
#define UFS_PHY_RX_MIN_STALL_NOCONFIG_TIME_CAP	PHY_OFF(0xCC)
#define UFS_PHY_LINECFG_DISABLE			PHY_OFF(0x138)
#define UFS_PHY_RX_SYM_RESYNC_CTRL		PHY_OFF(0x13C)
#define UFS_PHY_RX_MIN_HIBERN8_TIME		PHY_OFF(0x140)
#define UFS_PHY_RX_SIGDET_CTRL2			PHY_OFF(0x148)
#define UFS_PHY_RX_PWM_GEAR_BAND		PHY_OFF(0x154)
#define UFS_PHY_PCS_READY_STATUS		PHY_OFF(0x168)
@@ -274,6 +275,7 @@ static struct ufs_qcom_phy_calibration phy_cal_table_rate_A_3_1_1[] = {
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_TX_SMALL_AMP_DRV_LVL, 0x02),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_RX_MIN_STALL_NOCONFIG_TIME_CAP, 0x28),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_RX_SYM_RESYNC_CTRL, 0x03),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_RX_MIN_HIBERN8_TIME, 0x9A), /* 8 us */
};

static struct ufs_qcom_phy_calibration phy_cal_table_rate_B[] = {