Message ID | 20230514054917.21318-2-quic_kriskura@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6142858vqo; Sat, 13 May 2023 23:20:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4jXViQDzijkhfoJMsQBjuXRYnA3F0C70kujMP8f6Ig5rg/ngRLujXHyyQbzDqjkwp3VGyl X-Received: by 2002:a05:6a20:8424:b0:104:923b:4d05 with SMTP id c36-20020a056a20842400b00104923b4d05mr530772pzd.14.1684045236729; Sat, 13 May 2023 23:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684045236; cv=none; d=google.com; s=arc-20160816; b=PVLgdxFNSMiKDwCAYRb6PAoivCy6qqdzQ2qlmid3ULB2ZpzBsnngeYzIUniffbk30p Q+B4o7DwIwnIOuBohVTjRBUD42KEJ/qvIE7CMVi7Pc0eIbGiwxXvRG8yzy+Z5PBx3CO+ 6Wo5sr3AzuOg9CTR1imLA3ufhDycPCKy77NHf5cieXX9rGMaeftOZCgEPdEIq+RQ+hd6 938DwV1Zw/5skdG/H1Y5aOMaeF/pNBAX3miDxM2lHaWs0g5AwastDu1A9vByVZiV2XBK MbBI2oM2Ut+BUwh9aD+IHYyZ6Y7IvUQOOyNOrEa1kv+c7vi7jN71589/7ItA/lRMH+Nw qBYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KZrNBUTB+H7s4knWrpzivGYnL+xD6smc1B1bchmNDSE=; b=jn5p1W7DzQECsRltS1FwP0Aqj2eH5byGtuGEBYOqMiyywq+TKBLX9c4UuvEcVzdxTL vYpse9LQE1jWIXAWDOGlnG6t0/mm2yaqphwa4Oua9Ti72Yvn7RIHKnzEa3Nf+huzEut5 5IECCoK7uvfAzpGJWevmRhKABSVRYd++U7DFbwnpJbFh7jt+YNNLNjlDcRnCZT4TIP+i lEerTqrTRqBOCA0FHNuGmk0CniAWg6S3ZBRml9+HY/0zYUz3278DUzHIBbr9jlMzMzIX LKIGx6BofzEpNh0+3qbA0jBZtal7JObuFkFe+RwRY/yc4N1TepnH9XlEXF+UblN6MYSz tV/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CCwHBntQ; 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 j190-20020a638bc7000000b00528519a4371si12974412pge.516.2023.05.13.23.20.23; Sat, 13 May 2023 23:20:36 -0700 (PDT) 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=CCwHBntQ; 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 S232904AbjENFty (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Sun, 14 May 2023 01:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjENFtt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 14 May 2023 01:49:49 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB5AD1FDE; Sat, 13 May 2023 22:49:48 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34E5h2BO014875; Sun, 14 May 2023 05:49:40 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-transfer-encoding : content-type; s=qcppdkim1; bh=KZrNBUTB+H7s4knWrpzivGYnL+xD6smc1B1bchmNDSE=; b=CCwHBntQKDR3pbPDUiTlDPOAKjk28ES+/SmzSnczmS0DQD3FrsywqbdHuFl+ctxd2IOZ 4i0omRO7oNb6qDjk3/uBS0N0fjBPXdxur6uillU2dS193YFFzQ+RigWbjmjq4CKZPTzG /acjWfLgx8lKvDk9NUm84d5Vlw0N0NZsr4bDOrZKiAMZomaY6bwzQA4CE0mbeJirvxj7 w5ulJSLqrnyPf4USEWEHN/VyOpugB2RdpgGUB08bAg0q0Y/FJNGqtu2t2mWFCw5lq4NZ R5ALTNBAyeYyN6MUJVMW5ZeejQ9RQJDSUhCuXXA316jDL2Px2XHIfbXNKAEQnCjB/Eg6 Yg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qhywuhmmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 14 May 2023 05:49:40 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34E5ndxc028496 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 14 May 2023 05:49:39 GMT Received: from hu-kriskura-hyd.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.986.42; Sat, 13 May 2023 22:49:33 -0700 From: Krishna Kurapati <quic_kriskura@quicinc.com> To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Philipp Zabel <p.zabel@pengutronix.de>, "Andy Gross" <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, "Konrad Dybcio" <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Felipe Balbi <balbi@kernel.org> CC: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>, <quic_pkondeti@quicinc.com>, <quic_ppratap@quicinc.com>, <quic_wcheng@quicinc.com>, <quic_jackp@quicinc.com>, <quic_harshq@quicinc.com>, <ahalaney@redhat.com>, Krishna Kurapati <quic_kriskura@quicinc.com> Subject: [PATCH v8 1/9] dt-bindings: usb: qcom,dwc3: Add bindings for SC8280 Multiport Date: Sun, 14 May 2023 11:19:09 +0530 Message-ID: <20230514054917.21318-2-quic_kriskura@quicinc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230514054917.21318-1-quic_kriskura@quicinc.com> References: <20230514054917.21318-1-quic_kriskura@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: HJfvMvbz0AQcRV42HGJf2jVbu0CJqGnY X-Proofpoint-GUID: HJfvMvbz0AQcRV42HGJf2jVbu0CJqGnY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-14_03,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 phishscore=0 malwarescore=0 mlxlogscore=848 impostorscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305140050 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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?1765849417727565186?= X-GMAIL-MSGID: =?utf-8?q?1765849417727565186?= |
Series |
Add multiport support for DWC3 controllers
|
|
Commit Message
Krishna Kurapati
May 14, 2023, 5:49 a.m. UTC
Add the compatible string for SC8280 Multiport USB controller from
Qualcomm.
There are 4 power event irq interrupts supported by this controller
(one for each port of multiport). Added all the 4 as non-optional
interrupts for SC8280XP-MP
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
---
.../devicetree/bindings/usb/qcom,dwc3.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
Comments
On 14/05/2023 07:49, Krishna Kurapati wrote: > Add the compatible string for SC8280 Multiport USB controller from > Qualcomm. > > There are 4 power event irq interrupts supported by this controller > (one for each port of multiport). Added all the 4 as non-optional > interrupts for SC8280XP-MP > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Sun, May 14, 2023 at 11:19:09AM +0530, Krishna Kurapati wrote: > Add the compatible string for SC8280 Multiport USB controller from > Qualcomm. > > There are 4 power event irq interrupts supported by this controller > (one for each port of multiport). Added all the 4 as non-optional > interrupts for SC8280XP-MP > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > .../devicetree/bindings/usb/qcom,dwc3.yaml | 22 +++++++++++++++++++ > 1 file changed, 22 insertions(+) > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,sc8280xp-dwc3-mp > + then: > + properties: > + interrupts: > + maxItems: 7 > + interrupt-names: > + items: > + - const: dp_hs_phy_irq > + - const: dm_hs_phy_irq > + - const: ss_phy_irq I assume that these are only for the first port, and that you need to define these interrupts also for ports 2-4. > + - const: pwr_event_1 > + - const: pwr_event_2 > + - const: pwr_event_3 > + - const: pwr_event_4 > + > additionalProperties: false > > examples: Johan
On 5/16/2023 4:29 PM, Johan Hovold wrote: > On Sun, May 14, 2023 at 11:19:09AM +0530, Krishna Kurapati wrote: >> Add the compatible string for SC8280 Multiport USB controller from >> Qualcomm. >> >> There are 4 power event irq interrupts supported by this controller >> (one for each port of multiport). Added all the 4 as non-optional >> interrupts for SC8280XP-MP >> >> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> >> --- >> .../devicetree/bindings/usb/qcom,dwc3.yaml | 22 +++++++++++++++++++ >> 1 file changed, 22 insertions(+) > >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - qcom,sc8280xp-dwc3-mp >> + then: >> + properties: >> + interrupts: >> + maxItems: 7 >> + interrupt-names: >> + items: >> + - const: dp_hs_phy_irq >> + - const: dm_hs_phy_irq >> + - const: ss_phy_irq > > I assume that these are only for the first port, and that you need to > define these interrupts also for ports 2-4. > Hi Johan, I wanted to add them when wakeup-source is enabled but since you mentioned that these must be added now and driver support can be added later, I will make a patch separately for this in v9. Hi Krzysztof, Can I use the following notation for the new interrupts ? dp_hs_port2_irq dm_hs_port2_irq dp_hs_port3_irq dm_hs_port3_irq dp_hs_port4_irq dm_hs_port4_irq That way the interrupt names for first port will be same as ones for single port. Wanted to clarify this before I make a formal patch. Regards, Krishna,
On Wed, May 17, 2023 at 04:40:11PM +0530, Krishna Kurapati PSSNV wrote: > On 5/16/2023 4:29 PM, Johan Hovold wrote: > > On Sun, May 14, 2023 at 11:19:09AM +0530, Krishna Kurapati wrote: > >> + interrupts: > >> + maxItems: 7 > >> + interrupt-names: > >> + items: > >> + - const: dp_hs_phy_irq > >> + - const: dm_hs_phy_irq > >> + - const: ss_phy_irq > > > > I assume that these are only for the first port, and that you need to > > define these interrupts also for ports 2-4. > I wanted to add them when wakeup-source is enabled but since you > mentioned that these must be added now and driver support can be added > later, I will make a patch separately for this in v9. > Can I use the following notation for the new interrupts ? > > dp_hs_port2_irq > dm_hs_port2_irq > dp_hs_port3_irq > dm_hs_port3_irq > dp_hs_port4_irq > dm_hs_port4_irq > > > That way the interrupt names for first port will be same as ones for > single port. For consistency, I'd say: use the same scheme also for port1. Perhaps "port" is unnecessary too. And since these are getting new names, you can drop the redundant "_irq" suffix as you did for the power-event lines. For example: pwr_event_1 dp_hs_phy_1 dm_hs_phy_1 ss_phy_1 ... > Wanted to clarify this before I make a formal patch. Note that I have some more comments on the remaining patches in the series that you may want to wait for before posting v9. Johan
On 5/17/2023 5:14 PM, Johan Hovold wrote: > On Wed, May 17, 2023 at 04:40:11PM +0530, Krishna Kurapati PSSNV wrote: >> On 5/16/2023 4:29 PM, Johan Hovold wrote: >>> On Sun, May 14, 2023 at 11:19:09AM +0530, Krishna Kurapati wrote: > >>>> + interrupts: >>>> + maxItems: 7 >>>> + interrupt-names: >>>> + items: >>>> + - const: dp_hs_phy_irq >>>> + - const: dm_hs_phy_irq >>>> + - const: ss_phy_irq >>> >>> I assume that these are only for the first port, and that you need to >>> define these interrupts also for ports 2-4. > >> I wanted to add them when wakeup-source is enabled but since you >> mentioned that these must be added now and driver support can be added >> later, I will make a patch separately for this in v9. > >> Can I use the following notation for the new interrupts ? >> >> dp_hs_port2_irq >> dm_hs_port2_irq >> dp_hs_port3_irq >> dm_hs_port3_irq >> dp_hs_port4_irq >> dm_hs_port4_irq >> >> >> That way the interrupt names for first port will be same as ones for >> single port. > > For consistency, I'd say: use the same scheme also for port1. Perhaps > "port" is unnecessary too. > > And since these are getting new names, you can drop the redundant "_irq" > suffix as you did for the power-event lines. > Hi Johan, The reason I wanted to mark it as dp_hs_portX_irq is to keep code changes to driver simple. The existing code to read current IRQ's can stay as it. Only need to add changes for reading IRQ's of new ports. > For example: > > pwr_event_1 > dp_hs_phy_1 > dm_hs_phy_1 > ss_phy_1 > ... > >> Wanted to clarify this before I make a formal patch. > > Note that I have some more comments on the remaining patches in the > series that you may want to wait for before posting v9. > > Johan Sure, Will wait till end of week for all comments and push v9 next week. Regards, Krishna,
On Wed, May 17, 2023 at 05:49:13PM +0530, Krishna Kurapati PSSNV wrote: > On 5/17/2023 5:14 PM, Johan Hovold wrote: > > On Wed, May 17, 2023 at 04:40:11PM +0530, Krishna Kurapati PSSNV wrote: > >> On 5/16/2023 4:29 PM, Johan Hovold wrote: > >>> On Sun, May 14, 2023 at 11:19:09AM +0530, Krishna Kurapati wrote: > > > >>>> + interrupts: > >>>> + maxItems: 7 > >>>> + interrupt-names: > >>>> + items: > >>>> + - const: dp_hs_phy_irq > >>>> + - const: dm_hs_phy_irq > >>>> + - const: ss_phy_irq > >>> > >>> I assume that these are only for the first port, and that you need to > >>> define these interrupts also for ports 2-4. > > > >> I wanted to add them when wakeup-source is enabled but since you > >> mentioned that these must be added now and driver support can be added > >> later, I will make a patch separately for this in v9. > > > >> Can I use the following notation for the new interrupts ? > >> > >> dp_hs_port2_irq > >> dm_hs_port2_irq > >> dp_hs_port3_irq > >> dm_hs_port3_irq > >> dp_hs_port4_irq > >> dm_hs_port4_irq > >> > >> > >> That way the interrupt names for first port will be same as ones for > >> single port. > > > > For consistency, I'd say: use the same scheme also for port1. Perhaps > > "port" is unnecessary too. > > > > And since these are getting new names, you can drop the redundant "_irq" > > suffix as you did for the power-event lines. > The reason I wanted to mark it as dp_hs_portX_irq is to keep code > changes to driver simple. The existing code to read current IRQ's can > stay as it. Only need to add changes for reading IRQ's of new ports. I understand why you want to do it this way, but again, the devicetree binding is supposed to be hardware description that is independent from any particular implementation. This is also why I said that it may be preferable/easier to just implement wakeup for MP from the start. > > For example: > > > > pwr_event_1 > > dp_hs_phy_1 > > dm_hs_phy_1 > > ss_phy_1 > > ... Johan
diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml index d84281926f10..35a895e90001 100644 --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml @@ -26,6 +26,7 @@ properties: - qcom,sc7180-dwc3 - qcom,sc7280-dwc3 - qcom,sc8280xp-dwc3 + - qcom,sc8280xp-dwc3-mp - qcom,sdm660-dwc3 - qcom,sdm670-dwc3 - qcom,sdm845-dwc3 @@ -262,6 +263,7 @@ allOf: contains: enum: - qcom,sc8280xp-dwc3 + - qcom,sc8280xp-dwc3-mp then: properties: clocks: @@ -455,6 +457,26 @@ allOf: - const: dm_hs_phy_irq - const: ss_phy_irq + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-dwc3-mp + then: + properties: + interrupts: + maxItems: 7 + interrupt-names: + items: + - const: dp_hs_phy_irq + - const: dm_hs_phy_irq + - const: ss_phy_irq + - const: pwr_event_1 + - const: pwr_event_2 + - const: pwr_event_3 + - const: pwr_event_4 + additionalProperties: false examples: