Skip to content

Commit 91ddf6f

Browse files
juhosgvinodkoul
authored andcommitted
phy: marvell: mvebu-a3700-utmi: fix incorrect USB2_PHY_CTRL register access
The mvebu_a3700_utmi_phy_power_off() function tries to modify the USB2_PHY_CTRL register by using the IO address of the PHY IP block along with the readl/writel IO accessors. However, the register exist in the USB miscellaneous register space, and as such it must be accessed via regmap like it is done in the mvebu_a3700_utmi_phy_power_on() function. Change the code to use regmap_update_bits() for modífying the register to fix this. Fixes: cc8b7a0 ("phy: add A3700 UTMI PHY driver") Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://patch.msgid.link/20260321-a3700-utmi-fix-usb2_phy_ctrl-access-v1-1-6005ff4b5058@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 519a228 commit 91ddf6f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/phy/marvell/phy-mvebu-a3700-utmi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,8 @@ static int mvebu_a3700_utmi_phy_power_off(struct phy *phy)
168168
u32 reg;
169169

170170
/* Disable PHY pull-up and enable USB2 suspend */
171-
reg = readl(utmi->regs + USB2_PHY_CTRL(usb32));
172-
reg &= ~(RB_USB2PHY_PU | RB_USB2PHY_SUSPM(usb32));
173-
writel(reg, utmi->regs + USB2_PHY_CTRL(usb32));
171+
regmap_update_bits(utmi->usb_misc, USB2_PHY_CTRL(usb32),
172+
RB_USB2PHY_PU | RB_USB2PHY_SUSPM(usb32), 0);
174173

175174
/* Power down OTG module */
176175
if (usb32) {

0 commit comments

Comments
 (0)