From patchwork Mon Nov 8 06:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12607907 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6782BC433EF for ; Mon, 8 Nov 2021 06:42:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D74061350 for ; Mon, 8 Nov 2021 06:42:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237057AbhKHGpA (ORCPT ); Mon, 8 Nov 2021 01:45:00 -0500 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:47907 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237052AbhKHGo7 (ORCPT ); Mon, 8 Nov 2021 01:44:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1636353735; x=1667889735; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=atAaLcNi8LQwDpGmuQ1HkXYw/QZJ0xMo9WdOs01AvDY=; b=QfL2GuUv4jvTwNYzZkIdZz1gFS8xKf/m4HrOVrTKeVtGwx4gkV5NJBkR XOU4DFTKdfqK85vypQns/X5sXGuvhFHhyxisaylInrxNAUi6kW04guEgX qpeF7E8lfzYx9KDf57pyz5LnwykG0awAxOsvBDZZos8QKTE3Li0dMgVXO k=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 07 Nov 2021 22:42:15 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2021 22:42:14 -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.7; Sun, 7 Nov 2021 22:42:14 -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.7; Sun, 7 Nov 2021 22:42:09 -0800 From: Sandeep Maheswaram To: Rob Herring , Andy Gross , "Bjorn Andersson" , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman CC: , , , , , , Sandeep Maheswaram Subject: [PATCH v2 1/3] dt-bindings: usb: usb-xhci: Add bindings for usb-skip-phy-init property Date: Mon, 8 Nov 2021 12:11:48 +0530 Message-ID: <1636353710-25582-2-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1636353710-25582-1-git-send-email-quic_c_sanm@quicinc.com> References: <1636353710-25582-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-arm-msm@vger.kernel.org Adding bindings for usb-skip-phy-init property. 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. Some controllers like DWC3 and CDNS3 manage phy in their core drivers. This property can be set to avoid phy initialization in HCD core. Signed-off-by: Sandeep Maheswaram --- Documentation/devicetree/bindings/usb/usb-xhci.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.yaml b/Documentation/devicetree/bindings/usb/usb-xhci.yaml index 965f87f..a64d29f 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/usb-xhci.yaml @@ -25,6 +25,10 @@ properties: description: Set if the controller has broken port disable mechanism type: boolean + usb-skip-phy-init: + description: Set if the phy initialization is managed by controller + type: boolean + imod-interval-ns: description: Interrupt moderation interval default: 5000 From patchwork Mon Nov 8 06:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12607909 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FC74C433F5 for ; Mon, 8 Nov 2021 06:42:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3498860240 for ; Mon, 8 Nov 2021 06:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236490AbhKHGpE (ORCPT ); Mon, 8 Nov 2021 01:45:04 -0500 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:63003 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236926AbhKHGpE (ORCPT ); Mon, 8 Nov 2021 01:45:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1636353740; x=1667889740; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=kE+jQT2uSxbRTXOky+C5w92kV18PmrL+1gvvXh+CNl0=; b=Huk3n8Nf4pYNCydsf6lF75OX2egTgPM1d2y8PhksFNZHEh1cOzZac0MB K/go79YVFsRCXiM6rhHKjdynLtGlasYJK9lgviAcWEsdeFK3cEbaiVSFT DSeje1pIiFkQiYkzpo5R/Z4rtvr6vX3cWYQwKgvCE7gVkaIchWj/eW3dC I=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 07 Nov 2021 22:42:20 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2021 22:42:19 -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.7; Sun, 7 Nov 2021 22:42:19 -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.7; Sun, 7 Nov 2021 22:42:14 -0800 From: Sandeep Maheswaram To: Rob Herring , Andy Gross , "Bjorn Andersson" , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman CC: , , , , , , Sandeep Maheswaram Subject: [PATCH v2 2/3] usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT quirk Date: Mon, 8 Nov 2021 12:11:49 +0530 Message-ID: <1636353710-25582-3-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1636353710-25582-1-git-send-email-quic_c_sanm@quicinc.com> References: <1636353710-25582-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-arm-msm@vger.kernel.org Add device property usb-skip-phy-init to check and set XHCI_SKIP_PHY_INIT quirk. 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. Some controllers like DWC3 and CDNS3 manage phy in their core drivers. This property can be set 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..2a45f89 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -323,6 +323,9 @@ static int xhci_plat_probe(struct platform_device *pdev) if (device_property_read_bool(tmpdev, "quirk-broken-port-ped")) xhci->quirks |= XHCI_BROKEN_PORT_PED; + if (device_property_read_bool(tmpdev, "usb-skip-phy-init")) + xhci->quirks |= XHCI_SKIP_PHY_INIT; + device_property_read_u32(tmpdev, "imod-interval-ns", &xhci->imod_interval); } From patchwork Mon Nov 8 06:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12607911 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F43AC433EF for ; Mon, 8 Nov 2021 06:42:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A74C6113A for ; Mon, 8 Nov 2021 06:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235622AbhKHGpM (ORCPT ); Mon, 8 Nov 2021 01:45:12 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:6266 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237180AbhKHGpJ (ORCPT ); Mon, 8 Nov 2021 01:45:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1636353746; x=1667889746; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=NY60+9RbJmuSbzCyMdFlgec8Bnna6jLnovIzVcr/yCs=; b=l2CE3RS7sEqJJT+IZVmxWHpvtwr7rnRy2imEhOJR4twgxVwc3M5R7eBA WNVV47n4Dy+oT8KDCOaF3n6PQh/YTDFHnBizvY0VrpLrLKzXlBqSdwa+v xtEM7115ey8daci5/Zch1OZ1iqwlFd7V/zLM4zlPgrYEbZn4S16VPgH11 w=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 07 Nov 2021 22:42:26 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2021 22:42:25 -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.7; Sun, 7 Nov 2021 22:42:25 -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.7; Sun, 7 Nov 2021 22:42:19 -0800 From: Sandeep Maheswaram To: Rob Herring , Andy Gross , "Bjorn Andersson" , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman CC: , , , , , , Sandeep Maheswaram Subject: [PATCH v2 3/3] usb: dwc3: host: Set the property usb-skip-phy-init Date: Mon, 8 Nov 2021 12:11:50 +0530 Message-ID: <1636353710-25582-4-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1636353710-25582-1-git-send-email-quic_c_sanm@quicinc.com> References: <1636353710-25582-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-arm-msm@vger.kernel.org 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. Some controllers like DWC3 and CDNS3 manage phy in their core drivers. This property can be set to avoid phy initialization in HCD core. Signed-off-by: Sandeep Maheswaram --- v2: Changed subject prefix from dwc to dwc3. Increased props array size. drivers/usb/dwc3/host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f29a264..ece7912 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -44,7 +44,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc) int dwc3_host_init(struct dwc3 *dwc) { - struct property_entry props[4]; + struct property_entry props[5]; struct platform_device *xhci; int ret, irq; struct resource *res; @@ -107,6 +107,8 @@ int dwc3_host_init(struct dwc3 *dwc) if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A)) props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped"); + props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb-skip-phy-init"); + if (prop_idx) { ret = device_create_managed_software_node(&xhci->dev, props, NULL); if (ret) {