[v2,1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
Message ID | 20231215073431.8512-1-chunfeng.yun@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9102140dys; Thu, 14 Dec 2023 23:35:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDJMQB67DZb+nwp0ePoOuSrS+BUEOBBhLrk070DMDNb86+SQKkX6AKVoNESPc6po9OvQDU X-Received: by 2002:a05:6122:73a:b0:49a:a773:fe80 with SMTP id 58-20020a056122073a00b0049aa773fe80mr8589235vki.2.1702625757173; Thu, 14 Dec 2023 23:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702625757; cv=none; d=google.com; s=arc-20160816; b=q8TGiSomLY+40NaID8zsWZej2kb+vm2iyy2D+tbSE9h9toCHGdWLxXTAPe9Fmh0sFA t7IOse5n/qQ743KjUrH3wFbC6tb+eGr5vywwI4o2AYHwHxSa6VYlomXdbOnRc5hBRt6x dJ3OsK3jejJjM6mFGhkH6pz58giMJ/QisGrqmvXOO1vzs4xi4iDSv6itwNo4v6NxK6i8 qG9iygKD5VMcv2UvUNvuh5ZF50nqMqeoAd/YhTbx3yBitRlFHt4vAHMvIV3FQS9wmGAp 3X68g2CZKtbKB55maw009KtqFlbkWgI+PyBqqL9fe6uBpv9DVbhZhxMM/3AATJmD6/xE Poiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=sgVg6aQB6ADjvAD7vazIF0MWZPp4XjDd6V5th7rkY/s=; fh=HxF1W7VwHUvgXvMVc4IHnyjrwTObCOjGSFchfOl/xxY=; b=NuH2kOLRy5h5GSOERblY31nkmTUFMlGtVgsQUelc8vCH8rmVrX7MTj0S0f/QQYzfY0 VUcMWuWmwMuPVcVOrViFAkcm8PfPCxkdQlYbcsGTBYRmq5npex9emYJ5sNpgMIFuvG3p FZpUWWvMFh8Yrh6z05vjT62a5JEzSATEbrlm/3tiq84QpX9XriWRZ2zuNNlnmaIMFUDh rZspu0LQ5Vo44y75/eTeeboLrgEVM+uW7SPYcXKjb5JcTh2J1n1fApcB/ZLbOvzCfjnm IyfQd2GGtCndyHT2TkJCC/3Z8WncFCojtuv8npJ8/dSamWmlx/roglMQXJ/+bf/Uo6vn svcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mcbxVFEl; spf=pass (google.com: domain of linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r6-20020ac87ee6000000b0042585815311si6212428qtc.596.2023.12.14.23.35.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 23:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mcbxVFEl; spf=pass (google.com: domain of linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-527-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E290F1C21A63 for <ouuuleilei@gmail.com>; Fri, 15 Dec 2023 07:35:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66FD115EA2; Fri, 15 Dec 2023 07:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="mcbxVFEl" X-Original-To: linux-kernel@vger.kernel.org Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60F69101C4; Fri, 15 Dec 2023 07:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 64d4f9169b1c11eea5db2bebc7c28f94-20231215 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=sgVg6aQB6ADjvAD7vazIF0MWZPp4XjDd6V5th7rkY/s=; b=mcbxVFEle/HZiONS8c4OOaJ3xo3rTasBSWEADqRLQ9cwLCFm7cEo9/cwoC9x2O82aHU2ii9MFfPu4bcdeYnbM3aBDw1+ZyP6G39OjEMdl3L8SdhpRbkRmZKQM4AyiT+4Nv7UeqZl9Jh3pIRNUZQtwNhnrEyQ+S7Z29MQkjm1r2E=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:19cb1b43-6f18-4145-854e-37a0cd09b0aa,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:13fd35bd-2ac7-4da2-9f94-677a477649d9,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR: NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: 64d4f9169b1c11eea5db2bebc7c28f94-20231215 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from <chunfeng.yun@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1997620974; Fri, 15 Dec 2023 15:34:34 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 15 Dec 2023 15:34:33 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 15 Dec 2023 15:34:32 +0800 From: Chunfeng Yun <chunfeng.yun@mediatek.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> CC: Chunfeng Yun <chunfeng.yun@mediatek.com>, Conor Dooley <conor+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, "Mathias Nyman" <mathias.nyman@intel.com>, <linux-usb@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Macpaul Lin <macpaul.lin@mediatek.com>, Eddie Hung <eddie.hung@mediatek.com> Subject: [PATCH v2 1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue Date: Fri, 15 Dec 2023 15:34:29 +0800 Message-ID: <20231215073431.8512-1-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--5.470500-8.000000 X-TMASE-MatchedRID: G4NbPPbBCbo28LK855iUisp9Bgr5ONKhXxT5cg8K/td+YesuCgkiXKLs GdYIe0oEWB8Rur00SOpx/Hv6BudnAqB/4ZSHyd2lsyNb+yeIRApRnscLnNAC7Htd2pOTSxFkaUX s6FguVy2ByM1EGDQjGHSSJ37AbZpnpHn0l5P4rnWp4G6k2AuBh1pq//Jp4zBuDzgndGCfGZmYpu G7kpoKR74vrFmOaS1EoJY+2TrDFLUdpD3DKTh+QJ4CIKY/Hg3AGdQnQSTrKGPEQdG7H66TyH4gK q42LRYk9i+qV8IgR2aLrnhVcSfOHHEiKywBj7DCoO85Cxn7YZh+3BndfXUhXQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.470500-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: F48212FB97BEA4D638A53857B615E951372AC33B38A6187C2EBE1A5D097E70492000:8 X-MTK: N X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785147550205916050 X-GMAIL-MSGID: 1785332505472353112 |
Series |
[v2,1/3] dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
|
|
Commit Message
Chunfeng Yun (云春峰)
Dec. 15, 2023, 7:34 a.m. UTC
For Gen1 isoc-in endpoint on controller before about SSUSB IPM v1.6.0, it
still send out unexpected ACK after receiving a short packet in burst
transfer, this will cause an exception on connected device, specially for
a 4k camera.
Add a quirk property "rx-fifo-depth" to work around this hardware issue,
prefer to use 2;
The side-effect is that may cause performance drop about 10%, including
bulk transfer.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth'
---
.../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
Comments
On 15/12/2023 08:34, Chunfeng Yun wrote: > For Gen1 isoc-in endpoint on controller before about SSUSB IPM v1.6.0, it > still send out unexpected ACK after receiving a short packet in burst > transfer, this will cause an exception on connected device, specially for > a 4k camera. > Add a quirk property "rx-fifo-depth" to work around this hardware issue, > prefer to use 2; > The side-effect is that may cause performance drop about 10%, including > bulk transfer. > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > --- > v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth' > --- > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > index e9644e333d78..e44a71acb5c0 100644 > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > @@ -124,6 +124,18 @@ properties: > defined in the xHCI spec on MTK's controller. > default: 5000 > > + rx-fifo-depth: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + It is a quirk used to work around Gen1 isoc-in endpoint transfer issue > + that still send out unexpected ACK after device finish the burst transfer > + with a short packet and cause an exception, specially on a 4K camera > + device, it happens on controller before about IPM v1.6.0; the side-effect > + is that may cause performance drop about 10%, include bulk transfer, > + prefer to use 2 here. What is the meaning of 0-3? bytes? words? > + minimum: 0 > + maximum: 3 Best regards, Krzysztof
On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 15/12/2023 08:34, Chunfeng Yun wrote: > > For Gen1 isoc-in endpoint on controller before about SSUSB IPM > v1.6.0, it > > still send out unexpected ACK after receiving a short packet in > burst > > transfer, this will cause an exception on connected device, > specially for > > a 4k camera. > > Add a quirk property "rx-fifo-depth" to work around this hardware > issue, > > prefer to use 2; > > The side-effect is that may cause performance drop about 10%, > including > > bulk transfer. > > > > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > > --- > > v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth' > > --- > > .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 > ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml > > index e9644e333d78..e44a71acb5c0 100644 > > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml > > @@ -124,6 +124,18 @@ properties: > > defined in the xHCI spec on MTK's controller. > > default: 5000 > > > > + rx-fifo-depth: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + It is a quirk used to work around Gen1 isoc-in endpoint > transfer issue > > + that still send out unexpected ACK after device finish the > burst transfer > > + with a short packet and cause an exception, specially on a > 4K camera > > + device, it happens on controller before about IPM v1.6.0; > the side-effect > > + is that may cause performance drop about 10%, include bulk > transfer, > > + prefer to use 2 here. > > What is the meaning of 0-3? bytes? words? 0 - 1K bytes; 3 - 4K bytes; I will add this in description > > > + minimum: 0 > > + maximum: 3 > > > Best regards, > Krzysztof > >
On 20/12/2023 03:05, Chunfeng Yun (云春峰) wrote: > On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote: >> >> External email : Please do not click links or open attachments until >> you have verified the sender or the content. >> On 15/12/2023 08:34, Chunfeng Yun wrote: >>> For Gen1 isoc-in endpoint on controller before about SSUSB IPM >> v1.6.0, it >>> still send out unexpected ACK after receiving a short packet in >> burst >>> transfer, this will cause an exception on connected device, >> specially for >>> a 4k camera. >>> Add a quirk property "rx-fifo-depth" to work around this hardware >> issue, >>> prefer to use 2; >>> The side-effect is that may cause performance drop about 10%, >> including >>> bulk transfer. >>> >>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> >>> --- >>> v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth' >>> --- >>> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 >> ++++++++++++ >>> 1 file changed, 12 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk- >> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- >> xhci.yaml >>> index e9644e333d78..e44a71acb5c0 100644 >>> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml >>> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml >>> @@ -124,6 +124,18 @@ properties: >>> defined in the xHCI spec on MTK's controller. >>> default: 5000 >>> >>> + rx-fifo-depth: >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + description: >>> + It is a quirk used to work around Gen1 isoc-in endpoint >> transfer issue >>> + that still send out unexpected ACK after device finish the >> burst transfer >>> + with a short packet and cause an exception, specially on a >> 4K camera >>> + device, it happens on controller before about IPM v1.6.0; >> the side-effect >>> + is that may cause performance drop about 10%, include bulk >> transfer, >>> + prefer to use 2 here. >> >> What is the meaning of 0-3? bytes? words? > 0 - 1K bytes; > 3 - 4K bytes; > I will add this in description No, don't add. Just use correct values. 0 means 0 words or bytes. Not 1000 bytes. Best regards, Krzysztof
On Wed, 2023-12-20 at 08:25 +0100, Krzysztof Kozlowski wrote: > > External email : Please do not click links or open attachments until > you have verified the sender or the content. > On 20/12/2023 03:05, Chunfeng Yun (云春峰) wrote: > > On Fri, 2023-12-15 at 08:36 +0100, Krzysztof Kozlowski wrote: > >> > >> External email : Please do not click links or open attachments > until > >> you have verified the sender or the content. > >> On 15/12/2023 08:34, Chunfeng Yun wrote: > >>> For Gen1 isoc-in endpoint on controller before about SSUSB IPM > >> v1.6.0, it > >>> still send out unexpected ACK after receiving a short packet in > >> burst > >>> transfer, this will cause an exception on connected device, > >> specially for > >>> a 4k camera. > >>> Add a quirk property "rx-fifo-depth" to work around this hardware > >> issue, > >>> prefer to use 2; > >>> The side-effect is that may cause performance drop about 10%, > >> including > >>> bulk transfer. > >>> > >>> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> > >>> --- > >>> v2: change 'mediatek,rxfifo-depth' to 'rx-fifo-depth' > >>> --- > >>> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 12 > >> ++++++++++++ > >>> 1 file changed, 12 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk- > >> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- > >> xhci.yaml > >>> index e9644e333d78..e44a71acb5c0 100644 > >>> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml > >>> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk- > xhci.yaml > >>> @@ -124,6 +124,18 @@ properties: > >>> defined in the xHCI spec on MTK's controller. > >>> default: 5000 > >>> > >>> + rx-fifo-depth: > >>> + $ref: /schemas/types.yaml#/definitions/uint32 > >>> + description: > >>> + It is a quirk used to work around Gen1 isoc-in endpoint > >> transfer issue > >>> + that still send out unexpected ACK after device finish the > >> burst transfer > >>> + with a short packet and cause an exception, specially on a > >> 4K camera > >>> + device, it happens on controller before about IPM v1.6.0; > >> the side-effect > >>> + is that may cause performance drop about 10%, include bulk > >> transfer, > >>> + prefer to use 2 here. > >> > >> What is the meaning of 0-3? bytes? words? > > 0 - 1K bytes; > > 3 - 4K bytes; > > I will add this in description > > No, don't add. Just use correct values. 0 means 0 words or bytes. Not > 1000 bytes. Ok, I'll modify it; Thanks > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index e9644e333d78..e44a71acb5c0 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -124,6 +124,18 @@ properties: defined in the xHCI spec on MTK's controller. default: 5000 + rx-fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + It is a quirk used to work around Gen1 isoc-in endpoint transfer issue + that still send out unexpected ACK after device finish the burst transfer + with a short packet and cause an exception, specially on a 4K camera + device, it happens on controller before about IPM v1.6.0; the side-effect + is that may cause performance drop about 10%, include bulk transfer, + prefer to use 2 here. + minimum: 0 + maximum: 3 + # the following properties are only used for case 1 wakeup-source: description: enable USB remote wakeup, see power/wakeup-source.txt