aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/amlogic
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2020-11-20 16:38:55 +0100
committerVinod Koul <vkoul@kernel.org>2020-11-30 16:31:03 +0530
commit122586d62206c68e061f0329443ff65985e1aae5 (patch)
tree80da0e0f842198909d35b6903fa10a218b0231fd /drivers/phy/amlogic
parentphy: amlogic: meson-axg-mipi-pcie-analog: replace DSI_LANE definitions with BIT() macro (diff)
downloadlinux-dev-122586d62206c68e061f0329443ff65985e1aae5.tar.xz
linux-dev-122586d62206c68e061f0329443ff65985e1aae5.zip
phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode
In order to keep OTG ID detection even when in Host mode, the ID line of the PHY (if the current phy is an OTG one) pull-up should be kept enable in both modes. This fixes OTG switch on GXL, GXM & AXG platforms, otherwise once switched to Host, the ID detection doesn't work anymore to switch back to Device. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20201120153855.3920757-1-narmstrong@baylibre.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/amlogic')
-rw-r--r--drivers/phy/amlogic/phy-meson-gxl-usb2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
index 875afb2672c7..2b3c0d730f20 100644
--- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
@@ -158,7 +158,8 @@ static int phy_meson_gxl_usb2_set_mode(struct phy *phy,
U2P_R0_DM_PULLDOWN);
regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_DP_PULLDOWN,
U2P_R0_DP_PULLDOWN);
- regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_ID_PULLUP, 0);
+ regmap_update_bits(priv->regmap, U2P_R0, U2P_R0_ID_PULLUP,
+ U2P_R0_ID_PULLUP);
break;
case PHY_MODE_USB_DEVICE: