Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp33767lfe; Fri, 15 Apr 2022 18:07:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzx9jM18z3lD48jRqj/Ed75xeIcDX0yWsL8UJ8/GN9szXIJN2Jqz0i9U9Q4kEhI0Kt2Yg8 X-Received: by 2002:a63:314c:0:b0:39d:aeef:52a2 with SMTP id x73-20020a63314c000000b0039daeef52a2mr1260422pgx.232.1650071226597; Fri, 15 Apr 2022 18:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650071226; cv=none; d=google.com; s=arc-20160816; b=Jf4mEsGFqYI7EBeK99WefpkcotiqxSpq7H8M41XEsbI2fhC9Hw+HgZLBO7xpApa3BY EB3ccjmjVwJoC2XlUH8KeaJcD+bJWb3np9JIXhpN8GNEMfLXFysJgzqzZcCgN25hneMp M4Ygzu5boijOrq1lvjgK4W3ptC7Q7LiOTCG7aIzK8L81g+itXsnP+EVduSewbeCM6P+J 31KkiiDJilGJe3srT33hNvqlXIbme+klS1LV901g0jY6HNda8vIaKkQJM9aPG4ye8S5i crqXMuCk/euYYnGd4F+RKqyPHJG5RmaLhOg3x4gbchfMNCL1X7yIOttBWJL8dFCqz4JC L0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=2cyAbw+mxipdsb5EEU66tvRgQBKhpd5IuKusyVkj874=; b=p8O7x/u4J27uzibDh1b/Ng/L8L0SaR/5GR29t/XvTszHDDV1dEN/BhZ0UUmbVYbckH bC7LIaZXxdtKI9OeJ87yCpyLJVLaoHOi10VrbsNWsaJdX2TaLW2OyB03HAvyoz+Ncmsw V0QCeT0XejdZS9dSFAqi3l8YwST1eYBhkmGjiFUJEPDJJe7F+SO3hvH1E9eFMIQS+XiH G/04+N8iBhBQHyrEh7/pbhW6EYpIGkoD+fDX+4Q+TLTBJM6jg3MwAg4EL8LPQj0zAM8w 0fMXg55XLkdJ/DFjAZ6oNO6cRWLI9XpYqSq5hy9YR/vjKhzQUOsKYSiQMch5kIkyiaZV PgvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (expired) header.i=@sholland.org; dkim=neutral (expired) header.i=@messagingengine.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d4-20020a170902aa8400b00156c64bfa47si1908400plr.608.2022.04.15.18.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:07:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=neutral (expired) header.i=@sholland.org; dkim=neutral (expired) header.i=@messagingengine.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C6A0AD9EB8; Fri, 15 Apr 2022 17:47:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239734AbiDNDZz (ORCPT + 99 others); Wed, 13 Apr 2022 23:25:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239704AbiDNDZb (ORCPT ); Wed, 13 Apr 2022 23:25:31 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C8EF41611 for ; Wed, 13 Apr 2022 20:23:08 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8E1A05C059D; Wed, 13 Apr 2022 23:23:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 13 Apr 2022 23:23:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1649906587; x=1649992987; bh=2c yAbw+mxipdsb5EEU66tvRgQBKhpd5IuKusyVkj874=; b=XhA3LcPh3lLoixI8By KPeESI1K8CIRU6LzaxuhxxpdHsCg1mlkij18LLftHN/jxp/7L4IwaavHbQ4fXOJx J7LJd5hJ6CgrZwb4AMQRaYY4oQzm28H0pfVxLWU3XKhCfWb2BKyPHkMn7S6iHGO+ CDniwfwMOSUd+NPd8vxYqomYatgRkx36sVDAqFwoC/TMlLH/t5E0w3oY/IovybNa thTPsYmprGhG77OubEhQe456t/WDboT1Blmy1dUSAtCFjLRTRMthN2Q1hKc3rkkR t2bPY+SC+mmGbmP5YFmPOwSkaXqe8fpULT8XIpES6nwG/J1Ce7+oVLcfNEUitnbM WcSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1649906587; x=1649992987; bh=2cyAbw+mxipdsb5EEU66tvRgQBKhpd5IuKu syVkj874=; b=wxBVsRHPd5Jv5jy5SiqA2q32lXcafNFvG0H1ZkO8lk8lFc+yPXP WhR8kRwzrndJyLKkZmz65vz857eZexMxWe1G5TxYa5jeVUlUlKMt9tixJrNP3BCe FBwYfP2Rozt7VJjLiRB4Pw8jcgYgNX9KPL7gUBOkUnsYa2G3UczROmSOCYRSAbkK Gy+6RotiHwzRKK28oOVuLnTMkXkgZCBJoiOlwECdMg44fn1iReU11qrToGtGD7AW GoOSht/AUTmV9IbJwUzQk/CpukqLX5Aqs3SclkcJvWrdITlNblmufsf6Gfup/ThD 2F+akDUvB1rqHUbQNJWc8351A1czdb4vwvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelvddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Apr 2022 23:23:06 -0400 (EDT) From: Samuel Holland To: Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner Cc: Peter Geis , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 5/6] phy: rockchip-inno-usb2: Handle bvalid falling Date: Wed, 13 Apr 2022 22:22:56 -0500 Message-Id: <20220414032258.40984-6-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220414032258.40984-1-samuel@sholland.org> References: <20220414032258.40984-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some SoCs have a bvalid falling interrupt, in addition to bvalid rising. This interrupt can detect OTG cable plugout immediately, so it can avoid the delay until the next scheduled work. Signed-off-by: Samuel Holland --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index c694517496f8..2b29f5dd8873 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1345,9 +1345,9 @@ static const struct rockchip_usb2phy_cfg rk3308_phy_cfgs[] = { .port_cfgs = { [USB2PHY_PORT_OTG] = { .phy_sus = { 0x0100, 8, 0, 0, 0x1d1 }, - .bvalid_det_en = { 0x3020, 2, 2, 0, 1 }, - .bvalid_det_st = { 0x3024, 2, 2, 0, 1 }, - .bvalid_det_clr = { 0x3028, 2, 2, 0, 1 }, + .bvalid_det_en = { 0x3020, 3, 2, 0, 3 }, + .bvalid_det_st = { 0x3024, 3, 2, 0, 3 }, + .bvalid_det_clr = { 0x3028, 3, 2, 0, 3 }, .ls_det_en = { 0x3020, 0, 0, 0, 1 }, .ls_det_st = { 0x3024, 0, 0, 0, 1 }, .ls_det_clr = { 0x3028, 0, 0, 0, 1 }, @@ -1388,9 +1388,9 @@ static const struct rockchip_usb2phy_cfg rk3328_phy_cfgs[] = { .port_cfgs = { [USB2PHY_PORT_OTG] = { .phy_sus = { 0x0100, 15, 0, 0, 0x1d1 }, - .bvalid_det_en = { 0x0110, 2, 2, 0, 1 }, - .bvalid_det_st = { 0x0114, 2, 2, 0, 1 }, - .bvalid_det_clr = { 0x0118, 2, 2, 0, 1 }, + .bvalid_det_en = { 0x0110, 3, 2, 0, 3 }, + .bvalid_det_st = { 0x0114, 3, 2, 0, 3 }, + .bvalid_det_clr = { 0x0118, 3, 2, 0, 3 }, .ls_det_en = { 0x0110, 0, 0, 0, 1 }, .ls_det_st = { 0x0114, 0, 0, 0, 1 }, .ls_det_clr = { 0x0118, 0, 0, 0, 1 }, @@ -1512,9 +1512,9 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = { .port_cfgs = { [USB2PHY_PORT_OTG] = { .phy_sus = { 0x0000, 8, 0, 0, 0x1d1 }, - .bvalid_det_en = { 0x0080, 2, 2, 0, 1 }, - .bvalid_det_st = { 0x0084, 2, 2, 0, 1 }, - .bvalid_det_clr = { 0x0088, 2, 2, 0, 1 }, + .bvalid_det_en = { 0x0080, 3, 2, 0, 3 }, + .bvalid_det_st = { 0x0084, 3, 2, 0, 3 }, + .bvalid_det_clr = { 0x0088, 3, 2, 0, 3 }, .utmi_avalid = { 0x00c0, 10, 10, 0, 1 }, .utmi_bvalid = { 0x00c0, 9, 9, 0, 1 }, }, -- 2.35.1