From patchwork Wed Mar 31 09:05:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 12174787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F82EC433C1 for ; Wed, 31 Mar 2021 09:06:47 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D2CDA619BB for ; Wed, 31 Mar 2021 09:06:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2CDA619BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC: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=1RXt6ZuL6e4TZVZt0K9CFTz9y3lWoCNni+802Xp19sg=; b=HgR9oum0XF68oPTCWZcgqDC5Tx bBaHKposXlYR11JwXRO8VkwKkgTaE0HUPEodvmyXdW378m56ocyKX+PzSC8PQka5Iy8LBSumscOAx bJQM6UTxLjREDCPdjmVAVneh+hTGJ/8ezidaEDl5K1kIhcBrHiRXLEe+FxLi5U03ahNgDtbqJt7DR SQQVDFLCX7PnqqJo9N4RiAdDvuqCU+fJcMAOHJEfzm0SwH5hqmp6Th32fN5RItpBugXwH2xD5U4EP A5gmajGui7y3fAAt3tpJl64AHlPuCB/j8avOepCkWDqutQjpChqMHftRxjotncnGOIPyropWAh0D7 aqvO8d0w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRWo8-0063Zs-T2; Wed, 31 Mar 2021 09:06:37 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRWni-0063Ug-PB; Wed, 31 Mar 2021 09:06:12 +0000 X-UUID: e4943decfba244d29d1b7505bc3f4342-20210331 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=C7O5+uH7ouqCM8kobnjPQB+uFXvEt3ZCJTIHkkdkELI=; b=E6OoHxvpi/FZ+iAxAvmg9KLCj4Wklx0srl4l4lx7E2xV8fKTx+dn04ofbLUUII12uY/4BdFBTQbRLuN0DG20Ws/2zd4eXLaZJQM+V71OeqbRVUBiXoSOdvPS1ixXBvUfZY1Kqf4fJCqW34FDGOgtYQv+RKnGac2wrfzs+6/YLmc=; X-UUID: e4943decfba244d29d1b7505bc3f4342-20210331 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1715101198; Wed, 31 Mar 2021 02:05:59 -0700 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 02:05:57 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 17:05:55 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 31 Mar 2021 17:05:54 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Mathias Nyman CC: Chunfeng Yun , Rob Herring , Matthias Brugger , , , , , , Eddie Hung , "Nicolas Boichat" , Frank Wunderlich Subject: [PATCH v4 1/4] dt-bindings: usb: mtk-xhci: support property usb2-lpm-disable Date: Wed, 31 Mar 2021 17:05:50 +0800 Message-ID: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-TM-SNTS-SMTP: 9E92C9300DAE5D1DAC21325A41700E2A992D850885A163C5B2CD71D869D44E792000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210331_100611_298736_1E3BB8EA X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add support common property usb2-lpm-disable Acked-by: Rob Herring Signed-off-by: Chunfeng Yun --- v4: add acked-by Rob v3: remove redefinition of type and description suggested by Rob v2: no changes --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 45bf4ea00c9e..291749f49f35 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -104,6 +104,8 @@ properties: description: supports USB3.0 LPM type: boolean + usb2-lpm-disable: true + imod-interval-ns: description: Interrupt moderation interval value, it is 8 times as much as that From patchwork Wed Mar 31 09:05:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 12174785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0E26C433E0 for ; Wed, 31 Mar 2021 09:06:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 727EC619CA for ; Wed, 31 Mar 2021 09:06:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 727EC619CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bRAxzRuYaq8y5Kt42t1p3XwNddO2r0/hmLnO3XguWls=; b=pB/cRob1L/KJr6VzlZxaHJhMv TRGfFIDIuDnQQo6EmYvyzI+JyNzf2hoHj/6dS6VakTXsXCD2ZyzQiSArR4/mSuRrX6QZn6rmm1GsN W0m1k9pVGg5NNBrbFi4vYbeVwlQYXRchArc5p/HA3mS49BSvNiA2thknrWuP614fV1J+ESHh/cgNo LPo4HIMpp1JmS7Kr6yvNbaJX4Yhs0tfxgoDvJjNdc47MLjyLJO6Jy7kqCs3F7ggtev2o6Kl0zr7/e ihea615CWDdCE/CNfWnycxv23Ok2Beid2sdk7+hdRUc9iEFTwvguZTd/c0HxO+BWhg1WJW4Slkg8S h6TUVs+VQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRWnl-0063WZ-4Q; Wed, 31 Mar 2021 09:06:13 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRWnb-0063Ug-90; Wed, 31 Mar 2021 09:06:05 +0000 X-UUID: 8f3cebfdab4c42dd964641e3160ba398-20210331 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=wfxjMvgUcXk1ggU1hMecdWaMxF4+mnAP7/91CZSY7PA=; b=WCky8ojTjzDLg0QnjCGPTAyLqdie2EqkpXqwPfZ6wievtiIIse5aDf0FZpBVBhcSK8yha7YfRHBIT3U/xIdGO0mSEOE0iVtLa+C8AEQmLroJT7hdYNeN0UXNckD7n1Yy3Oa+x+mfWS6o0or9DYKsjGTrIK0X7hmMRLPH/u1lAVU=; X-UUID: 8f3cebfdab4c42dd964641e3160ba398-20210331 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2026219837; Wed, 31 Mar 2021 02:05:59 -0700 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 02:05:58 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 17:05:55 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 31 Mar 2021 17:05:54 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Mathias Nyman CC: Chunfeng Yun , Rob Herring , Matthias Brugger , , , , , , Eddie Hung , "Nicolas Boichat" , Frank Wunderlich Subject: [PATCH v4 2/4] dt-bindings: usb: mtk-xhci: remove redefinitions of usb3-lpm-capable Date: Wed, 31 Mar 2021 17:05:51 +0800 Message-ID: <1617181553-3503-2-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> References: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 1E5EE4607C045384FE7FFA8328CD21E61974EE9345F4E1D3800DBDBBBB0691402000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210331_100603_940097_D6C2ADD7 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The property usb3-lpm-capable is defined in usb-xhci.yaml which is already referenced in this file, so no need 'description' and 'type' anymore. Acked-by: Rob Herring Signed-off-by: Chunfeng Yun --- v4: add acked-by Rob v3: new patch --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 291749f49f35..69c3e7d0f9dd 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -100,9 +100,7 @@ properties: vbus-supply: description: Regulator of USB VBUS5v - usb3-lpm-capable: - description: supports USB3.0 LPM - type: boolean + usb3-lpm-capable: true usb2-lpm-disable: true From patchwork Wed Mar 31 09:05:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 12174783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 854E6C433C1 for ; Wed, 31 Mar 2021 09:06:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 26D7E619D8 for ; Wed, 31 Mar 2021 09:06:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26D7E619D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TdzBtZmFhqCIrRdonItGTGQzoOz3Jq+sI0pImVYdqf4=; b=TuNmoIX0uZ/VifpJgHrSKlrG+ +yY4LQGsblF1D0Q0ERXnsnL5E47DBVSwa0yDPlU4ng4xEHyjoFBW9jCeDgEs0GSdOzo3jWJCzsVHl tH9BE8r/B/MlTLVwCeJX1oUkbQUvzsiqj0g1T/kN/fpqrvmUVnTIp5SOtls6gqMA2CzrutAUcwLYz yMh/wNZuo50rmx8awJKfqMTy25S+CcsOQwlyjSKzw/0H+ua+20EdgseZX+2996x9exfVbkWDkusSc SkWif3+Vxxl1UuxxkdnNMg709tuOvbNS03KBfT1uac2JUrA29d7dRhBEbqVuOmiFuRdPLkXUh+rmc 0cAOlU/TA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRWnj-0063WK-NZ; Wed, 31 Mar 2021 09:06:11 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRWnb-0063Ul-Mu; Wed, 31 Mar 2021 09:06:05 +0000 X-UUID: 8db196b9e47b4ed49933a04dcba5a839-20210331 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=zv53P0fYxFXr0Iy65PD9D3KjOxH3nqZBCmu/qRaRFIc=; b=HEuZKtX6SLHsymqhAqTPFr5lkG2wxrKwtqk85h/5Hfn6MLURUbvtVoOVpFg3u2pJlnz948C//zoQ2U1p2vreMkiG8Fym4Uo0a89GZbElPwgycwC4tmuQFtZVLlSFh2REC8/xrG/DxnhUs9srxK2s9TX4uEIYn+PzBXzroEHVYmQ=; X-UUID: 8db196b9e47b4ed49933a04dcba5a839-20210331 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1105168117; Wed, 31 Mar 2021 02:05:59 -0700 Received: from MTKMBS06N1.mediatek.inc (172.21.101.129) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 02:05:58 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 17:05:57 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 31 Mar 2021 17:05:56 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Mathias Nyman CC: Chunfeng Yun , Rob Herring , Matthias Brugger , , , , , , Eddie Hung , "Nicolas Boichat" , Frank Wunderlich , stable Subject: [PATCH v4 3/4] usb: xhci-mtk: fix broken streams issue on 0.96 xHCI Date: Wed, 31 Mar 2021 17:05:52 +0800 Message-ID: <1617181553-3503-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> References: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210331_100604_353618_A2B9958D X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The MediaTek 0.96 xHCI controller on some platforms does not support bulk stream even HCCPARAMS says supporting, due to MaxPSASize is set a default value 1 by mistake, here use XHCI_BROKEN_STREAMS quirk to fix it. Fixes: 94a631d91ad3 ("usb: xhci-mtk: check hcc_params after adding primary hcd") Cc: stable Signed-off-by: Chunfeng Yun --- v4: cc stable suggested by Frank v2~3: no changes --- drivers/usb/host/xhci-mtk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index c1bc40289833..4e3d53cc24f4 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -411,6 +411,13 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_SPURIOUS_SUCCESS; if (mtk->lpm_support) xhci->quirks |= XHCI_LPM_SUPPORT; + + /* + * MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream, + * and it's 3 when support it. + */ + if (xhci->hci_version < 0x100 && HCC_MAX_PSA(xhci->hcc_params) == 4) + xhci->quirks |= XHCI_BROKEN_STREAMS; } /* called during probe() after chip reset completes */ @@ -572,7 +579,8 @@ static int xhci_mtk_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; - if (HCC_MAX_PSA(xhci->hcc_params) >= 4) + if (HCC_MAX_PSA(xhci->hcc_params) >= 4 && + !(xhci->quirks & XHCI_BROKEN_STREAMS)) xhci->shared_hcd->can_do_streams = 1; ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED); From patchwork Wed Mar 31 09:05:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 12174859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09E41C433E0 for ; Wed, 31 Mar 2021 09:16:54 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 7CA7F619CA for ; Wed, 31 Mar 2021 09:16:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CA7F619CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UNuVqDL6DW9XYbCdU46cgJOKB+XZp1VEAcZMx5D1BQw=; b=oGBaY7uJCOvnIzQ5++2wJtG9K sir0gAzPJCJN/2fqaVSl0iXZbtz4KZ7Viab5Eta4XTZMhegzGiTKBJubNSrDruO8XJqw62AZUayVi aEr+XeDXWy0Uk71oym6xwBYwpaTyCwv81iZqxBMzeQONlPLvEONumCf0ZWhkhkLoIIGadFjLCxEmn xyoPVuV0FgEKVvAmUV1/hDmvWcA885+DwfN1HKVDmemd/pfqFW+oYGb8t/H0uvlEKEfahOhcewhLl DfIlJLbAL62H8rcVnQIMGiMynQKJVTtaJdeGiD5L+SjvKv35Y/OXvt+CTSTeYMVwpWX5uDlBdfGcV 84Lpm8JzA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRWxj-0065cl-T6; Wed, 31 Mar 2021 09:16:32 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRWxI-0065Rq-Co; Wed, 31 Mar 2021 09:16:10 +0000 X-UUID: d169b0e407fb49ad954c772842d5403d-20210331 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=2feiirdRnqUyAfTrjfhQlyGHPt9JNyexvTJwSOj49xk=; b=ksGdqPTKxa7fi+V5aGmAVz+FlzI5qPi50EpMkxMlxGRb3Ds28kdzhz5JQMJHubOkhPK5BU1D3jGuj2MtgM3RqLKRetFEFmEEXMYF/tLw7LpDj0scEbpdvPzYK5cvr4+I7DFIpQ2ubDK6bPTRv5VQ5uLRyxQnvemoqQf1uQE814g=; X-UUID: d169b0e407fb49ad954c772842d5403d-20210331 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1905839781; Wed, 31 Mar 2021 02:16:01 -0700 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 02:05:59 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 31 Mar 2021 17:05:58 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 31 Mar 2021 17:05:57 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Mathias Nyman CC: Chunfeng Yun , Rob Herring , Matthias Brugger , , , , , , Eddie Hung , "Nicolas Boichat" , Frank Wunderlich Subject: [PATCH v4 4/4] usb: xhci-mtk: support quirk to disable usb2 lpm Date: Wed, 31 Mar 2021 17:05:53 +0800 Message-ID: <1617181553-3503-4-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> References: <1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: B57EE3D6F18A35C1C700F078C739C9F5959C11C1F138D343DBBABF876119E5082000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210331_101606_710192_8B5AA0BE X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The xHCI driver support usb2 HW LPM by default, here add support XHCI_HW_LPM_DISABLE quirk, then we can disable usb2 lpm when need it. Signed-off-by: Chunfeng Yun --- v2~4: no changes --- drivers/usb/host/xhci-mtk.c | 3 +++ drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 4e3d53cc24f4..744639d23fa8 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -411,6 +411,8 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_SPURIOUS_SUCCESS; if (mtk->lpm_support) xhci->quirks |= XHCI_LPM_SUPPORT; + if (mtk->u2_lpm_disable) + xhci->quirks |= XHCI_HW_LPM_DISABLE; /* * MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream, @@ -493,6 +495,7 @@ static int xhci_mtk_probe(struct platform_device *pdev) return ret; mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable"); + mtk->u2_lpm_disable = of_property_read_bool(node, "usb2-lpm-disable"); /* optional property, ignore the error if it does not exist */ of_property_read_u32(node, "mediatek,u3p-dis-msk", &mtk->u3p_dis_msk); diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h index 621ec1a85009..4ccd08e20a15 100644 --- a/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h @@ -149,6 +149,7 @@ struct xhci_hcd_mtk { struct phy **phys; int num_phys; bool lpm_support; + bool u2_lpm_disable; /* usb remote wakeup */ bool uwk_en; struct regmap *uwk;