From patchwork Fri Nov 20 15:38:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 11921151 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A86C697 for ; Fri, 20 Nov 2020 15:39:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA3DB22252 for ; Fri, 20 Nov 2020 15:39:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XPqC05VR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="idKg8a9h" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA3DB22252 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=m9c22QMTMcOgBuLIaZj21ja5K5lHkExuASNM7B/Bro4=; b=XPqC05VRZO4KdOux9mbu7YFa17 P0bbqPT5yY9MSZrXCQ12No5ytnOpNpFyh/VYO2TlHH5dS7RrUlD0efCtBYOIoEsyrcrj45DURfaZW +AQRsXAyQbqMASKt4eMbZs2cUMjuXPzzZy9k4/sefxqfmxOrlZ+mIqHsviIRWk5/WNXXlRGxfWNaZ dMD5qnq9ufxoNKmrJB/3TOLov4MmXgl0Yd5HInxLYEj14i3RKkAQyB2bpT4Fc2Z0UR+h65AYGsYWR d5kiIAygLW7o0OsosngObHZO0Y7mDjeUvllD0IL4ei1bY9cqkyqFJr8r4S6yUivgfbbPpfme8bNzo BAm6ESxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg8V8-0001km-V0; Fri, 20 Nov 2020 15:39:06 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg8V3-0001iq-Dc for linux-amlogic@lists.infradead.org; Fri, 20 Nov 2020 15:39:02 +0000 Received: by mail-wr1-x444.google.com with SMTP id l1so10432822wrb.9 for ; Fri, 20 Nov 2020 07:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jt0xR/XFtpMRIuj7oLrfJvxFoX3/OcrnceaJeMN2qXk=; b=idKg8a9h4DmuA2CHSqlnfdiwPyTJyJUDzreNBsk55cXRvx1yJnTndM8bscb0OIT6bp eCH1w6RGo0XyGZ0FKyuVu1JhmkvMSnVLXNoT2s8Exk+pZa/+8I5jHAo91Pj8T2hmJ8ef x6/jcY/Z6Hc6Sm/sJxK1fC5QZG0NkR7tt7M9eBaAKNUc3lV2FYbdbZVibfgghtVI5lqZ n3sz/aQoD17JwtdAlfGkBRNgdQx6N8mLro3LpoynVFPAPLGNf7D4rCzHNtbloPj946JK /Gxj04J8xYC7A4fI8uoIGWGW8gRbYNVsx2SQeFFZh1LGij4oif34QiNWKwm3Lhu4KaQl jUZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jt0xR/XFtpMRIuj7oLrfJvxFoX3/OcrnceaJeMN2qXk=; b=Lz91Edz4SvmfpwwYpvWd1aMFtnu7SV8/TRyZc8XysYkDH1VWV7XrZew6TafiGG6ROV Wx7JQPibFitXlGT/Szr1PSl9tltX4MXrIXjnRNMYCKknxp5X0p41Qht9kYHZdYyRI3qD G8LmpIV0suwkIUUYl+OO+MG3Pn8c97vMgC4NX0pe1gkC2hjHNghjzHjepA71GLt3BQYe g+sJ3y2u2tdeCVKLpTBj+bsKNJEIkWglhoX77ZuDZiALE8uWo6IBoqzX7TLiU2vHPri0 W5yCNJDjHqcl3+GTBo2JPFO8Y7P+HXnZEENc9aBfURgN1Sevre0YuWYqEM3usHAVpfCY on4w== X-Gm-Message-State: AOAM530mEGFx8WdUFeNNsLTzNIQ0b+7Eelz+3MInZOXufHOEaf6WfNhX vdxFt7LWX/+EaXOOcJUXlCs4Y5SDQCZjZzRE X-Google-Smtp-Source: ABdhPJzmjSiKUSGQWJXOUnb98ph3ukVEonWNRpVs1Gssn89XGBVl/IvBKBKU2+ysbbvZvrO0wLuWHg== X-Received: by 2002:adf:a54d:: with SMTP id j13mr17709111wrb.132.1605886740225; Fri, 20 Nov 2020 07:39:00 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:2ec0:82b0:419f:dca4:d17a:66a7]) by smtp.gmail.com with ESMTPSA id b14sm5189845wrs.46.2020.11.20.07.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 07:38:59 -0800 (PST) From: Neil Armstrong To: vkoul@kernel.org, kishon@ti.com Subject: [PATCH v3] phy: amlogic: phy-meson-gxl-usb2: keep ID pull-up even in Host mode Date: Fri, 20 Nov 2020 16:38:55 +0100 Message-Id: <20201120153855.3920757-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_103901_518144_932745AC X-CRM114-Status: GOOD ( 12.63 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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 Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl --- 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 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: