forked from Minki/linux
phy: phy-mtk-tphy: set utmi 0 register in init() ops
No need repeat to clear utmi 0 register in ->power_on() and ->power_off(), just do it in ->init() Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220914060746.10004-6-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
3fbbb75c40
commit
1e77f026eb
@ -522,8 +522,8 @@ static void u2_phy_instance_init(struct mtk_tphy *tphy,
|
||||
/* switch to USB function, and enable usb pll */
|
||||
mtk_phy_clear_bits(com + U3P_U2PHYDTM0, P2C_FORCE_UART_EN | P2C_FORCE_SUSPENDM);
|
||||
|
||||
mtk_phy_update_bits(com + U3P_U2PHYDTM0, P2C_RG_XCVRSEL | P2C_RG_DATAIN,
|
||||
P2C_RG_XCVRSEL_VAL(1) | P2C_RG_DATAIN_VAL(0));
|
||||
mtk_phy_clear_bits(com + U3P_U2PHYDTM0,
|
||||
P2C_RG_XCVRSEL | P2C_RG_DATAIN | P2C_DTM0_PART_MASK);
|
||||
|
||||
mtk_phy_clear_bits(com + U3P_U2PHYDTM1, P2C_RG_UART_EN);
|
||||
|
||||
@ -565,9 +565,6 @@ static void u2_phy_instance_power_on(struct mtk_tphy *tphy,
|
||||
void __iomem *com = u2_banks->com;
|
||||
u32 index = instance->index;
|
||||
|
||||
mtk_phy_clear_bits(com + U3P_U2PHYDTM0,
|
||||
P2C_RG_XCVRSEL | P2C_RG_DATAIN | P2C_DTM0_PART_MASK);
|
||||
|
||||
/* OTG Enable */
|
||||
mtk_phy_set_bits(com + U3P_USBPHYACR6, PA6_RG_U2_OTG_VBUSCMP_EN);
|
||||
|
||||
@ -590,8 +587,6 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
|
||||
void __iomem *com = u2_banks->com;
|
||||
u32 index = instance->index;
|
||||
|
||||
mtk_phy_clear_bits(com + U3P_U2PHYDTM0, P2C_RG_XCVRSEL | P2C_RG_DATAIN);
|
||||
|
||||
/* OTG Disable */
|
||||
mtk_phy_clear_bits(com + U3P_USBPHYACR6, PA6_RG_U2_OTG_VBUSCMP_EN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user