From patchwork Tue Oct 26 18:19:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12585483 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 06491C433EF for ; Tue, 26 Oct 2021 18:20:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5C8A60C4B for ; Tue, 26 Oct 2021 18:20:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238261AbhJZSWg (ORCPT ); Tue, 26 Oct 2021 14:22:36 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:7943 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238276AbhJZSWV (ORCPT ); Tue, 26 Oct 2021 14:22:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635272398; x=1666808398; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=8JrbYpYbFU64eysqYwTOFk2xE5lTANukcxG7H69jd/c=; b=F7bgnZ735+2sziYtP2Qu4mvgG225OzdqfAS78B8UoN+GfodqPQqmykuB 9uA+hjMhaIpfIrmNdt4/iqgisnmNYkokSIjugOvcvw2mTUAVozJ9liPVj bj8Ja375R4MUsWcKDVLE0oQb42aFZv9JwmSPXlK+30OY3gAWhbObxnnV1 E=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 26 Oct 2021 11:19:57 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 11:19:56 -0700 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; Tue, 26 Oct 2021 11:19:51 -0700 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 1/3] dt-bindings: usb: usb-xhci: Add bindings for usb-skip-phy-init property Date: Tue, 26 Oct 2021 23:49:30 +0530 Message-ID: <1635272372-9982-2-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> References: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Adding bindings for usb-skip-phy-init property. 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..69a757b 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 initiazation is managed by controller + type: boolean + imod-interval-ns: description: Interrupt moderation interval default: 5000 From patchwork Tue Oct 26 18:19:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12585485 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 9308CC433FE for ; Tue, 26 Oct 2021 18:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BD2760C4B for ; Tue, 26 Oct 2021 18:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236619AbhJZSWh (ORCPT ); Tue, 26 Oct 2021 14:22:37 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:19746 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236622AbhJZSW0 (ORCPT ); Tue, 26 Oct 2021 14:22:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635272402; x=1666808402; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=9F6ndHarAVUhGg1jtbfIy+tm1Iuqe+qhI3p206Exjg8=; b=rhGdRAYvwHC2e7A9NkTTETFazpbopVU95PbWBa4v/2mXVsE+1xKDkY7n adOWJjKHcrgTUNqV1sj1KUzIXEXGkZqwrTQfYPplyD5wvVyxiUomF2Cjs J2qzQY8fGJD8F4qanozw/ove4ElHZsZlyWUbWrGzq3q+gI0fF0dp2WhY/ A=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 26 Oct 2021 11:20:02 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 11:20:02 -0700 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; Tue, 26 Oct 2021 11:19:56 -0700 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 2/3] usb: host: xhci-plat: Add device property to set XHCI_SKIP_PHY_INIT quirk Date: Tue, 26 Oct 2021 23:49:31 +0530 Message-ID: <1635272372-9982-3-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> References: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add device property usb-skip-phy-init to check and set XHCI_SKIP_PHY_INIT quirk. 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 Tue Oct 26 18:19:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12585487 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 14589C4332F for ; Tue, 26 Oct 2021 18:20:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED91A60C4B for ; Tue, 26 Oct 2021 18:20:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238230AbhJZSWl (ORCPT ); Tue, 26 Oct 2021 14:22:41 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:4099 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238234AbhJZSWc (ORCPT ); Tue, 26 Oct 2021 14:22:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635272409; x=1666808409; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=mhhYrAjFPGfm8WNwzjHo/FoEXIypsRhip7lIMeUEaXI=; b=tKG+aKxPJT8Vm8eUTRTq0CVyogQBqbJT8xuPGDAvIeOe1JxcqZ8mE3wA w4Ah/U7Kdzj0Us0sKY6fJe2qSF3ZauyKO7I/t+NCXtUpZlQXLgRQ1T49d N/BW+/ZB85PG4/4JZm0PVjOZfG5nw/PI/XBY9VhsvEmLDUJv7UdFGgpRn 0=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 26 Oct 2021 11:20:08 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 11:20:07 -0700 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; Tue, 26 Oct 2021 11:20:01 -0700 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 3/3] usb: dwc: host: Set the property usb-skip-phy-init Date: Tue, 26 Oct 2021 23:49:32 +0530 Message-ID: <1635272372-9982-4-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> References: <1635272372-9982-1-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org dwc3 manages PHY by own DRD driver, so skip the management by HCD core. During runtime suspend phy was not getting suspend because runtime_usage value is 2. Signed-off-by: Sandeep Maheswaram --- drivers/usb/dwc3/host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f29a264..5144513 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -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) {