From patchwork Wed Dec 1 06:15:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 520481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0678C433F5 for ; Wed, 1 Dec 2021 06:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346882AbhLAGTc (ORCPT ); Wed, 1 Dec 2021 01:19:32 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:33698 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346866AbhLAGTb (ORCPT ); Wed, 1 Dec 2021 01:19:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1638339371; x=1669875371; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=0td12hIHGPIEFYS082kAUKPfRUhsg9mYr4FJVS5nTsE=; b=V3N9ohBlLrd5tFU4JICMZ3nIV8rQQ9w582cQ7kg4Dfywm4C+EueHDKZ8 YKquyjisudqqVtmJStiG363eWxVvz7z1aX09eOhvJ76I13QAKdTe4A8bO 1F/qWykIbbPTA/0NgIcQWamS0+zaKt1MH0rML3/Ga2yS9cb+Kl8zdbbMc A=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 30 Nov 2021 22:16:10 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 22:16:10 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 30 Nov 2021 22:16:10 -0800 Received: from c-sanm-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 30 Nov 2021 22:16:06 -0800 From: Sandeep Maheswaram To: Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Mathias Nyman CC: , , , , , Sandeep Maheswaram Subject: [PATCH v3] usb: host: xhci-plat: Set XHCI_SKIP_PHY_INIT quirk for DWC3 controller Date: Wed, 1 Dec 2021 11:45:38 +0530 Message-ID: <1638339338-6731-2-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1638339338-6731-1-git-send-email-quic_c_sanm@quicinc.com> References: <1638339338-6731-1-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Set XHCI_SKIP_PHY_INIT quirk to avoid phy initialization twice. Runtime suspend of phy drivers was failing from DWC3 driver as runtime usage value is 2 because the phy is initialized from DWC3 core and HCD core. DWC3 manages phy in their core drivers. Set this quirk to avoid phy initialization in HCD core. Signed-off-by: Sandeep Maheswaram --- drivers/usb/host/xhci-plat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index c1edcc9..9bbd939 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -327,6 +327,9 @@ static int xhci_plat_probe(struct platform_device *pdev) &xhci->imod_interval); } + if (of_device_is_compatible(pdev->dev.parent->of_node, "snps,dwc3")) + xhci->quirks |= XHCI_SKIP_PHY_INIT; + hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); if (IS_ERR(hcd->usb_phy)) { ret = PTR_ERR(hcd->usb_phy);