Message ID | 20230126031424.14582-15-quic_wcheng@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp69667wrn; Wed, 25 Jan 2023 19:17:25 -0800 (PST) X-Google-Smtp-Source: AK7set+zXOEZUrRe+HmUiJu+hbHL6S5sMCZ4ZX7Mx+j/x0ZNpkl6NytcjV2E5gY/ZUbaHLIEcHLX X-Received: by 2002:a05:6a20:9f8e:b0:bb:ccef:f894 with SMTP id mm14-20020a056a209f8e00b000bbcceff894mr3977702pzb.38.1674703045529; Wed, 25 Jan 2023 19:17:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674703045; cv=none; d=google.com; s=arc-20160816; b=UUmD8uwMykIHaXZkaRrk72Iwmv6tUrMmmc+gde/UEkmMZgk2xz//EPlPDj5ArzmqPu OHwEEHEO4onSKfgGQupU2pvO8H26wIBXGYuP4O3STM4h8rsdXVYwrB1Umj2vTRzFgWg3 KNvwwRIRECtS1o9E+sbsiao7Ci4LR4m4wDKnkgFNpESuolHAK+IQ99LYB7LZaodtZRa2 oiRQiRStzsPcH7d/Nv1pYkTlDxpMCvXV5Fjo9hnYVF2eZdY79I2CelKnxSRr/FPFbDKW WgYIhEv/7fzEpLrX9B/2Gv+j8ckv/V6kiKD2Y846DS0JBhazpcQfKN/YQCRCAElnUMM9 AEOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PH3gtljA+8WTPQ8qZ6OJp1NsrMGDODJi5wV18FONxF4=; b=YTl1RWIEhdloJztC1nJu9syBoZIa3txM56FeL4zsD9wDPV7lD697Z1ooQzeYMnnMw+ KhN5p84WFwrtOHonVW8waJao9iucvwaYi6VaJkDU/dHjt0rDRKi4Sind4+idP0oW1wsY 7DJGszuHkuqKyYEZzdgmFXtGFUVhV9Eb+UBiR5ssD/Ee9vjn20X+udT7FoUIrMc0XqBx k+YPtIGV4jN+zGxmOm3WTV9IWmJd0XlkhTYc/hLqjdDdWvMV+OJlWWtzVWq0pCSg8TX2 /xK3jRZj7mfDHOF3OTAO9mSrM3+pBpEHQrKvB2b+4LkijtIqz0RK+dLTJYNS7sU2IstO 9GSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QNOT3ILF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o27-20020a63921b000000b004788c847617si7448585pgd.292.2023.01.25.19.17.13; Wed, 25 Jan 2023 19:17:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QNOT3ILF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235965AbjAZDQH (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Wed, 25 Jan 2023 22:16:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236278AbjAZDP7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Jan 2023 22:15:59 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BD816600F; Wed, 25 Jan 2023 19:15:30 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30Q3AOrC029160; Thu, 26 Jan 2023 03:14:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=PH3gtljA+8WTPQ8qZ6OJp1NsrMGDODJi5wV18FONxF4=; b=QNOT3ILFRta/QlJutJXLvo60iPm0SghufVXoQ5fGdekuaY8ZX1mfEhoVLOcXa9Cxce3l cK+nNhogdwKhntAJd7IPN3g1vuKs/40tgTLzquwTCxix0DdGg1AH6uRn//BmFmLlc58U plioxS1CjrceUq3Sw5YHSYeB8JdgfJXELWdbSMhND3RNU6TwRGPzJC2RtIS0k0idaBAM F6jnPQFlzuZDnnTQlGZgeQBKIP9RxxZ/B6ilbZ5sIaumhIDyz1V2MbQe3Ne6Oqw0zCxV O34G0De7OIVuqnTSJLfCMhM8JY0wED9a8i6bet8qXvocl6yt4BwYWKNYzL/2RP7/pQph iA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nb0qrsx78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Jan 2023 03:14:47 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30Q3EkhV031336 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Jan 2023 03:14:46 GMT Received: from hu-wcheng-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 25 Jan 2023 19:14:45 -0800 From: Wesley Cheng <quic_wcheng@quicinc.com> To: <srinivas.kandagatla@linaro.org>, <mathias.nyman@intel.com>, <perex@perex.cz>, <lgirdwood@gmail.com>, <andersson@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <gregkh@linuxfoundation.org>, <Thinh.Nguyen@synopsys.com>, <broonie@kernel.org>, <bgoswami@quicinc.com>, <tiwai@suse.com>, <robh+dt@kernel.org>, <agross@kernel.org> CC: <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>, <linux-usb@vger.kernel.org>, <quic_jackp@quicinc.com>, <quic_plai@quicinc.com>, Wesley Cheng <quic_wcheng@quicinc.com> Subject: [RFC PATCH v2 14/22] dt-bindings: usb: dwc3: Add snps,num-hc-interrupters definition Date: Wed, 25 Jan 2023 19:14:16 -0800 Message-ID: <20230126031424.14582-15-quic_wcheng@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230126031424.14582-1-quic_wcheng@quicinc.com> References: <20230126031424.14582-1-quic_wcheng@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hDAZbe1hPP_j9IKYfJbKnW_JHqqjuvNa X-Proofpoint-ORIG-GUID: hDAZbe1hPP_j9IKYfJbKnW_JHqqjuvNa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-25_14,2023-01-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=541 malwarescore=0 mlxscore=0 priorityscore=1501 spamscore=0 suspectscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301260028 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756053420625136613?= X-GMAIL-MSGID: =?utf-8?q?1756053420625136613?= |
Series |
Introduce QC USB SND audio offloading support
|
|
Commit Message
Wesley Cheng
Jan. 26, 2023, 3:14 a.m. UTC
Add a new definition for specifying how many XHCI secondary interrupters
can be allocated. XHCI in general can potentially support up to 1024
interrupters, which some uses may want to limit depending on how many
users utilize the interrupters.
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
Comments
On 26/01/2023 04:14, Wesley Cheng wrote: > Add a new definition for specifying how many XHCI secondary interrupters > can be allocated. XHCI in general can potentially support up to 1024 > interrupters, which some uses may want to limit depending on how many > users utilize the interrupters. I cannot find in the code any user of this. Your next patch stores it, but which other patch uses stored value? What I still don't get how is this exactly hardware property, not policy or driver choice. > > Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> > --- > Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > index 6d78048c4613..4faaec9655e0 100644 > --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml > @@ -349,6 +349,18 @@ properties: > items: > enum: [1, 4, 8, 16, 32, 64, 128, 256] > > + snps,num-hc-interrupters: > + description: > + Defines the maximum number of XHCI host controller interrupters that can > + be supported. The XHCI host controller has support to allocate multiple > + event rings, which can be assigned to different clients/users. The DWC3 > + controller has a maximum of 8 interrupters. If this is not defined then > + the value will be defaulted to 1. This parameter is used only when > + operating in host mode. > + $ref: /schemas/types.yaml#/definitions/uint8 > + minimum: 1 > + maximum: 8 default: 1 > + > port: > $ref: /schemas/graph.yaml#/properties/port > description: Best regards, Krzysztof
Hi Krzysztof, On 1/26/2023 4:01 AM, Krzysztof Kozlowski wrote: > On 26/01/2023 04:14, Wesley Cheng wrote: >> Add a new definition for specifying how many XHCI secondary interrupters >> can be allocated. XHCI in general can potentially support up to 1024 >> interrupters, which some uses may want to limit depending on how many >> users utilize the interrupters. > > I cannot find in the code any user of this. Your next patch stores it, > but which other patch uses stored value? > > What I still don't get how is this exactly hardware property, not policy > or driver choice. > Sorry I must have missed that patchset when rebasing over Mathias' xHCI changes. It was there previously in my initial submission where the property is carried over into xhci-plat from dwc3/host.c. So the xHC controller has a HCSPARAMs field that defines the number of interrupters it can support. It does potentially have the capability of having 1024 interrupters. Each interrupter has to have its own set of interrupt register sets, which depending on the vendor implementing it could limit the maximum. For example, as stated below, DWC3 only allows for 8 interrupters to be allocated. The purpose for this property is to allow the user/driver to not have to allocate memory for supporting 1024 event rings, if they are only going to utilize one. Likewise, if the user attempts to allocate more than what is supported by the HW, then Mathias' SW will cross check to ensure that isn't allowed. (by checking the HCSPARAMs against the DT property below) >> >> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> >> --- >> Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> index 6d78048c4613..4faaec9655e0 100644 >> --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml >> @@ -349,6 +349,18 @@ properties: >> items: >> enum: [1, 4, 8, 16, 32, 64, 128, 256] >> >> + snps,num-hc-interrupters: >> + description: >> + Defines the maximum number of XHCI host controller interrupters that can >> + be supported. The XHCI host controller has support to allocate multiple >> + event rings, which can be assigned to different clients/users. The DWC3 >> + controller has a maximum of 8 interrupters. If this is not defined then >> + the value will be defaulted to 1. This parameter is used only when >> + operating in host mode. >> + $ref: /schemas/types.yaml#/definitions/uint8 >> + minimum: 1 >> + maximum: 8 > > default: 1 > Got it. Thanks Wesley Cheng
diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 6d78048c4613..4faaec9655e0 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -349,6 +349,18 @@ properties: items: enum: [1, 4, 8, 16, 32, 64, 128, 256] + snps,num-hc-interrupters: + description: + Defines the maximum number of XHCI host controller interrupters that can + be supported. The XHCI host controller has support to allocate multiple + event rings, which can be assigned to different clients/users. The DWC3 + controller has a maximum of 8 interrupters. If this is not defined then + the value will be defaulted to 1. This parameter is used only when + operating in host mode. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 8 + port: $ref: /schemas/graph.yaml#/properties/port description: