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

Commit 8c9cd719 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

phy: qcom-ufs-qmp-v3: 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: I55cb0b718e2e429c0378d842d85a02ace44bf2ce
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent bde539ed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@
#define UFS_PHY_TX_SMALL_AMP_DRV_LVL		PHY_OFF(0x34)
#define UFS_PHY_LINECFG_DISABLE			PHY_OFF(0x130)
#define UFS_PHY_RX_SYM_RESYNC_CTRL		PHY_OFF(0x134)
#define UFS_PHY_RX_MIN_HIBERN8_TIME		PHY_OFF(0x138)
#define UFS_PHY_RX_SIGDET_CTRL1			PHY_OFF(0x13C)
#define UFS_PHY_RX_SIGDET_CTRL2			PHY_OFF(0x140)
#define UFS_PHY_RX_PWM_GEAR_BAND		PHY_OFF(0x14C)
@@ -264,6 +265,7 @@ static struct ufs_qcom_phy_calibration phy_cal_table_rate_A_3_0_0[] = {
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_TX_LARGE_AMP_DRV_LVL, 0x0A),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_TX_SMALL_AMP_DRV_LVL, 0x02),
	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_A_3_1_0[] = {
@@ -343,6 +345,7 @@ static struct ufs_qcom_phy_calibration phy_cal_table_rate_A_3_1_0[] = {
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_RX_SYM_RESYNC_CTRL, 0x03),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_TX_MID_TERM_CTRL1, 0x43),
	UFS_QCOM_PHY_CAL_ENTRY(UFS_PHY_RX_SIGDET_CTRL1, 0x0F),
	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[] = {