diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2022-09-14 08:07:43 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-09-20 08:29:05 +0200 |
commit | 8da71ebad8455cde05bb6c148c84f3954b788497 (patch) | |
tree | b52580ed8e693fc1413453afb33e766843ef9ef3 /drivers/phy/mediatek/phy-mtk-tphy.c | |
parent | phy: phy-mtk-tphy: add property to set pre-emphasis (diff) | |
download | linux-8da71ebad8455cde05bb6c148c84f3954b788497.tar.xz linux-8da71ebad8455cde05bb6c148c84f3954b788497.zip |
phy: phy-mtk-tphy: disable hardware efuse when set INTR
INTR's value is able autoload from hardware efuse by default, when
software tries to update its value, should disable hardware efuse
firstly.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220914060746.10004-4-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/phy/mediatek/phy-mtk-tphy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 986fde0f63a0..7f40b8b052bd 100644 --- a/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c @@ -874,9 +874,14 @@ static void u2_phy_props_set(struct mtk_tphy *tphy, mtk_phy_update_bits(com + U3P_USBPHYACR1, PA1_RG_TERM_SEL, PA1_RG_TERM_SEL_VAL(instance->eye_term)); - if (instance->intr) + if (instance->intr) { + if (u2_banks->misc) + mtk_phy_set_bits(u2_banks->misc + U3P_MISC_REG1, + MR1_EFUSE_AUTO_LOAD_DIS); + mtk_phy_update_bits(com + U3P_USBPHYACR1, PA1_RG_INTR_CAL, PA1_RG_INTR_CAL_VAL(instance->intr)); + } if (instance->discth) mtk_phy_update_bits(com + U3P_USBPHYACR6, PA6_RG_U2_DISCTH, |