linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: khilman@baylibre.com, kishon@ti.com, martin.blumenstingl@googlemail.com
Cc: linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Neil Armstrong <narmstrong@baylibre.com>
Subject: [PATCH 1/5] phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode
Date: Wed,  9 Sep 2020 18:04:05 +0200	[thread overview]
Message-ID: <20200909160409.8678-2-narmstrong@baylibre.com> (raw)
In-Reply-To: <20200909160409.8678-1-narmstrong@baylibre.com>

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>
---
 drivers/phy/amlogic/phy-meson-gxl-usb2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
index 43ec9bf24abf..6e862ea60d8f 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:
-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-09 16:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 16:04 [PATCH 0/5] usb: dwc-meson-g12a: Add support for USB on S400 board Neil Armstrong
2020-09-09 16:04 ` Neil Armstrong [this message]
2020-09-15 19:53   ` [PATCH 1/5] phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode Martin Blumenstingl
2020-09-09 16:04 ` [PATCH 2/5] dt-bindings: usb: amlogic, meson-g12a-usb-ctrl: add the Amlogic AXG Families USB Glue Bindings Neil Armstrong
2020-09-15 17:32   ` Rob Herring
2020-09-15 19:56   ` [PATCH 2/5] dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: " Martin Blumenstingl
2020-09-09 16:04 ` [PATCH 3/5] usb: dwc-meson-g12a: Add support for USB on AXG SoCs Neil Armstrong
2020-09-15 19:59   ` Martin Blumenstingl
2020-09-16  7:11     ` Neil Armstrong
2020-09-09 16:04 ` [PATCH 4/5] arm64: dts: meson-axg: add USB nodes Neil Armstrong
2020-09-15 20:04   ` Martin Blumenstingl
2020-09-16  7:10     ` Neil Armstrong
2020-09-09 16:04 ` [PATCH 5/5] arm64: dts: meson-axg-s400: enable USB OTG Neil Armstrong
2020-09-15 20:05   ` Martin Blumenstingl
2020-09-16  7:09     ` Neil Armstrong
2020-09-14 17:57 ` [PATCH 0/5] usb: dwc-meson-g12a: Add support for USB on S400 board Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200909160409.8678-2-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).