phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode
authorAnand Moon <linux.amoon@gmail.com>
Tue, 17 Aug 2021 04:15:39 +0000 (09:45 +0530)
committerVinod Koul <vkoul@kernel.org>
Tue, 17 Aug 2021 10:30:44 +0000 (16:00 +0530)
Power off the PHY by putting it into reset mode.

Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Link: https://lore.kernel.org/r/20210817041548.1276-6-linux.amoon@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/amlogic/phy-meson8b-usb2.c

index 03c061dd5f0ded625717041c8593196dad5617e8..2aad45c55494b4ae44451157e95375b9f8b0f3cb 100644 (file)
@@ -219,6 +219,10 @@ static int phy_meson8b_usb2_power_off(struct phy *phy)
        clk_disable_unprepare(priv->clk_usb);
        clk_disable_unprepare(priv->clk_usb_general);
 
+       /* power off the PHY by putting it into reset mode */
+       regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET,
+                          REG_CTRL_POWER_ON_RESET);
+
        return 0;
 }