Message ID | 1695218113-31198-2-git-send-email-quic_msarkar@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4415834vqi; Wed, 20 Sep 2023 13:47:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcKQopdNL/H0yrakidjzCHd12fDouYze2TXGQ3aRplRV3Bp4NQBt8UXHu6qE8RkEHezfah X-Received: by 2002:a17:90a:df06:b0:26d:2158:10ac with SMTP id gp6-20020a17090adf0600b0026d215810acmr3603294pjb.14.1695242876477; Wed, 20 Sep 2023 13:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695242876; cv=none; d=google.com; s=arc-20160816; b=CRIXh+0ioHI1hd4y3NkvV9DlfmQ6VZvWHlJ1Pdqk73koEh9dfAgVetYIVvjyuDgxuW sIUkUyuuJuto7FbDvO4Gp2clocC4K2lvw3WGyfO/9W2xKrxUdlsXKNXrTdJBAFERZZcS 9Mot7KJz9NlUxVGyvViDZrsh729FdZRcZPghOOVgm51k9Yj4JSjUc209f1JHr3rMsUFW 21gFLeOzmieU2trZCNb7rhaOJTOsA8OyzISwBaHU9wGgl6sgcf0HY2fNBKqu3uqBz/0y cXppN6u/lyHRB4+jYbvxdZcLNZOZuvL28NgJw2MFfxcTV+2hjJBBxyslGWqp992ZKjIk dWeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=szlrYCP/Y088fMt/CKKLhRpReT/g5wA7KhUarKQWpJ0=; fh=8/2vfUA7MWOES13nxpYPH5OUCdymynOzflmEVMN0z8c=; b=su2Ht06h4AbY4Nh05dsfDuostOqt/7zhpoufqJFxp64uqr1SWOnorGWDW6EYq/E5wt BeGfDqJhITUPIrgvVkv6jDi7AHHJRroDU5mRwnsIb7/qmNQCxK/p6kf1yy7TU6nnxARN XH454bNLnlzRNpqzDfm7xtA/g/T/C3EKFbGhSkU8lwYPo20NXFbQcKtX+Wl7P5rf6hve jv0UZnU4/Y+RzwxUeSqH+LRb3+VjsNCC6GmKSmB/Y9sm/TOoLVaimzH3/lImndwk782H vbk9tC+zLS1Rt8OwXzBNgzuEuluYBPtBm0/xj9wieWmRDa1wAuSA2Ofsvrlu0FoobiT5 41aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oyF8e9yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 67-20020a17090a09c900b0026b42961a4asi69358pjo.38.2023.09.20.13.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 13:47:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oyF8e9yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DE839809475E; Wed, 20 Sep 2023 06:57:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236560AbjITN5B (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Wed, 20 Sep 2023 09:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236024AbjITNzz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 20 Sep 2023 09:55:55 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F159B181; Wed, 20 Sep 2023 06:55:46 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38KCsUpn019752; Wed, 20 Sep 2023 13:55:25 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; s=qcppdkim1; bh=szlrYCP/Y088fMt/CKKLhRpReT/g5wA7KhUarKQWpJ0=; b=oyF8e9ydBpUG4Dx3+NSwBfy5dV2hGPv0mF18jurbjsYG8i7s1U7FGrk4Ug5of2M27+vk 72UkaCkQ0t7LGrEKarcMlH9iPDKje/miecVn8GtWlRQI0zHeagTQb26ovst1gh0syQbc Fl0NRU7531rxKgAhu74gJ+vOZwwQRTGnDAqe1qPPYmIbQF4xj47DSVez9TGa+EKANhjb hiz1irK6+qU05s6do/dduzbKWeb2Y4dRkLefiTcMFwnb3D7+8HQSCY8p6gyhThIuPdMO oW0lxisS/WAcx5/D9C90klodLr75KoKmvdoPWN7XoFH2WZAsOPc79gELt/9H1+jNEZWU tg== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t7sh3s3h6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 13:55:25 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 38KDtJfR008187; Wed, 20 Sep 2023 13:55:21 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 3t55ekk8nm-1; Wed, 20 Sep 2023 13:55:21 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38KDtL6p008196; Wed, 20 Sep 2023 13:55:21 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 38KDtLBh008195; Wed, 20 Sep 2023 13:55:21 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 9EC1B4070; Wed, 20 Sep 2023 19:25:20 +0530 (+0530) From: Mrinmay Sarkar <quic_msarkar@quicinc.com> To: agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, Mrinmay Sarkar <quic_msarkar@quicinc.com>, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, Vinod Koul <vkoul@kernel.org>, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-phy@lists.infradead.org Subject: [PATCH v1 1/5] dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC Date: Wed, 20 Sep 2023 19:25:08 +0530 Message-Id: <1695218113-31198-2-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1695218113-31198-1-git-send-email-quic_msarkar@quicinc.com> References: <1695218113-31198-1-git-send-email-quic_msarkar@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 3cXgrAgb97XpKgSnOv01UtdP3yaGUSZ5 X-Proofpoint-GUID: 3cXgrAgb97XpKgSnOv01UtdP3yaGUSZ5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_05,2023-09-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=947 spamscore=0 adultscore=0 mlxscore=0 phishscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309200114 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:57:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777590994399240966 X-GMAIL-MSGID: 1777590994399240966 |
Series |
arm64: qcom: sa8775p: add support for EP PCIe
|
|
Commit Message
Mrinmay Sarkar
Sept. 20, 2023, 1:55 p.m. UTC
Add devicetree bindings support for SA8775P SoC.
Define reg and interrupt per platform.
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
---
.../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 +++++++++++++++++----
1 file changed, 108 insertions(+), 22 deletions(-)
Comments
On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: > Add devicetree bindings support for SA8775P SoC. > Define reg and interrupt per platform. > > Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > --- > .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 +++++++++++++++++---- > 1 file changed, 108 insertions(+), 22 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > index a223ce0..e860e8f 100644 > --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > @@ -13,6 +13,7 @@ properties: > compatible: > oneOf: > - enum: > + - qcom,sa8775p-pcie-ep > - qcom,sdx55-pcie-ep > - qcom,sm8450-pcie-ep > - items: > @@ -20,29 +21,19 @@ properties: > - const: qcom,sdx55-pcie-ep > > reg: > - items: > - - description: Qualcomm-specific PARF configuration registers > - - description: DesignWare PCIe registers > - - description: External local bus interface registers > - - description: Address Translation Unit (ATU) registers > - - description: Memory region used to map remote RC address space > - - description: BAR memory region > + minItems: 6 > + maxItems: 7 > > reg-names: > - items: > - - const: parf > - - const: dbi > - - const: elbi > - - const: atu > - - const: addr_space > - - const: mmio > + minItems: 6 > + maxItems: 7 > > clocks: > - minItems: 7 > + minItems: 5 > maxItems: 8 > > clock-names: > - minItems: 7 > + minItems: 5 > maxItems: 8 > > qcom,perst-regs: > @@ -57,14 +48,12 @@ properties: > - description: Perst separation enable offset > > interrupts: > - items: > - - description: PCIe Global interrupt > - - description: PCIe Doorbell interrupt > + minItems: 2 > + maxItems: 3 > > interrupt-names: > - items: > - - const: global > - - const: doorbell > + minItems: 2 > + maxItems: 3 > > reset-gpios: > description: GPIO used as PERST# input signal > @@ -122,6 +111,51 @@ allOf: > compatible: > contains: > enum: > + - qcom,sa8775p-pcie-ep > + then: > + properties: > + reg: > + items: > + - description: Qualcomm-specific PARF configuration registers > + - description: DesignWare PCIe registers > + - description: External local bus interface registers > + - description: Address Translation Unit (ATU) registers > + - description: Memory region used to map remote RC address space > + - description: BAR memory region > + - description: DMA memory region It should be described as "DMA register space" or something, because this could be misinterpreted as memory region for doing DMA. - Mani
On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: > Add devicetree bindings support for SA8775P SoC. > Define reg and interrupt per platform. > > Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > --- > .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 +++++++++++++++++---- > 1 file changed, 108 insertions(+), 22 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > index a223ce0..e860e8f 100644 > --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > @@ -13,6 +13,7 @@ properties: > compatible: > oneOf: > - enum: > + - qcom,sa8775p-pcie-ep > - qcom,sdx55-pcie-ep > - qcom,sm8450-pcie-ep > - items: > @@ -20,29 +21,19 @@ properties: > - const: qcom,sdx55-pcie-ep > > reg: > - items: > - - description: Qualcomm-specific PARF configuration registers > - - description: DesignWare PCIe registers > - - description: External local bus interface registers > - - description: Address Translation Unit (ATU) registers > - - description: Memory region used to map remote RC address space > - - description: BAR memory region > + minItems: 6 > + maxItems: 7 > > reg-names: > - items: > - - const: parf > - - const: dbi > - - const: elbi > - - const: atu > - - const: addr_space > - - const: mmio > + minItems: 6 > + maxItems: 7 Don't move these into if/then schemas. Then we are duplicating the names, and there is no reason to keep them aligned for new compatibles. Rob
On 9/22/2023 12:08 AM, Rob Herring wrote: > On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: >> Add devicetree bindings support for SA8775P SoC. >> Define reg and interrupt per platform. >> >> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >> --- >> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 +++++++++++++++++---- >> 1 file changed, 108 insertions(+), 22 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >> index a223ce0..e860e8f 100644 >> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >> @@ -13,6 +13,7 @@ properties: >> compatible: >> oneOf: >> - enum: >> + - qcom,sa8775p-pcie-ep >> - qcom,sdx55-pcie-ep >> - qcom,sm8450-pcie-ep >> - items: >> @@ -20,29 +21,19 @@ properties: >> - const: qcom,sdx55-pcie-ep >> >> reg: >> - items: >> - - description: Qualcomm-specific PARF configuration registers >> - - description: DesignWare PCIe registers >> - - description: External local bus interface registers >> - - description: Address Translation Unit (ATU) registers >> - - description: Memory region used to map remote RC address space >> - - description: BAR memory region >> + minItems: 6 >> + maxItems: 7 >> >> reg-names: >> - items: >> - - const: parf >> - - const: dbi >> - - const: elbi >> - - const: atu >> - - const: addr_space >> - - const: mmio >> + minItems: 6 >> + maxItems: 7 > > Don't move these into if/then schemas. Then we are duplicating the > names, and there is no reason to keep them aligned for new compatibles. > > Rob Hi Rob, As we have one extra reg property (dma) required for sa8775p-pcie-ep, isn't it expected to be moved in if/then as per number of regs required. Anyways we would have duplication of some properties for new compatibles where the member numbers differs for a property. Are you suggesting to add the extra reg property (dma) in the existing reg and reg-names list, and add minItems/maxItems for all compatibles present in this file ? -Shazad
On 10/6/2023 4:24 PM, Shazad Hussain wrote: > > > On 9/22/2023 12:08 AM, Rob Herring wrote: >> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: >>> Add devicetree bindings support for SA8775P SoC. >>> Define reg and interrupt per platform. >>> >>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >>> --- >>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 >>> +++++++++++++++++---- >>> 1 file changed, 108 insertions(+), 22 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>> index a223ce0..e860e8f 100644 >>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>> @@ -13,6 +13,7 @@ properties: >>> compatible: >>> oneOf: >>> - enum: >>> + - qcom,sa8775p-pcie-ep >>> - qcom,sdx55-pcie-ep >>> - qcom,sm8450-pcie-ep >>> - items: >>> @@ -20,29 +21,19 @@ properties: >>> - const: qcom,sdx55-pcie-ep >>> reg: >>> - items: >>> - - description: Qualcomm-specific PARF configuration registers >>> - - description: DesignWare PCIe registers >>> - - description: External local bus interface registers >>> - - description: Address Translation Unit (ATU) registers >>> - - description: Memory region used to map remote RC address space >>> - - description: BAR memory region >>> + minItems: 6 >>> + maxItems: 7 >>> reg-names: >>> - items: >>> - - const: parf >>> - - const: dbi >>> - - const: elbi >>> - - const: atu >>> - - const: addr_space >>> - - const: mmio >>> + minItems: 6 >>> + maxItems: 7 >> >> Don't move these into if/then schemas. Then we are duplicating the >> names, and there is no reason to keep them aligned for new compatibles. >> >> Rob > > Hi Rob, > As we have one extra reg property (dma) required for sa8775p-pcie-ep, > isn't it expected to be moved in if/then as per number of regs > required. Anyways we would have duplication of some properties for new > compatibles where the member numbers differs for a property. > > Are you suggesting to add the extra reg property (dma) in the existing > reg and reg-names list, and add minItems/maxItems for all compatibles > present in this file ? > > -Shazad Here we have defined reg and interrupt per platform as clocks is defined. -Mrinmay
On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: > > > On 10/6/2023 4:24 PM, Shazad Hussain wrote: > > > > > > On 9/22/2023 12:08 AM, Rob Herring wrote: > >> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: > >>> Add devicetree bindings support for SA8775P SoC. > >>> Define reg and interrupt per platform. > >>> > >>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > >>> --- > >>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 > >>> +++++++++++++++++---- > >>> 1 file changed, 108 insertions(+), 22 deletions(-) > >>> > >>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>> index a223ce0..e860e8f 100644 > >>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>> @@ -13,6 +13,7 @@ properties: > >>> compatible: > >>> oneOf: > >>> - enum: > >>> + - qcom,sa8775p-pcie-ep > >>> - qcom,sdx55-pcie-ep > >>> - qcom,sm8450-pcie-ep > >>> - items: > >>> @@ -20,29 +21,19 @@ properties: > >>> - const: qcom,sdx55-pcie-ep > >>> reg: > >>> - items: > >>> - - description: Qualcomm-specific PARF configuration registers > >>> - - description: DesignWare PCIe registers > >>> - - description: External local bus interface registers > >>> - - description: Address Translation Unit (ATU) registers > >>> - - description: Memory region used to map remote RC address space > >>> - - description: BAR memory region > >>> + minItems: 6 > >>> + maxItems: 7 > >>> reg-names: > >>> - items: > >>> - - const: parf > >>> - - const: dbi > >>> - - const: elbi > >>> - - const: atu > >>> - - const: addr_space > >>> - - const: mmio > >>> + minItems: 6 > >>> + maxItems: 7 > >> > >> Don't move these into if/then schemas. Then we are duplicating the > >> names, and there is no reason to keep them aligned for new compatibles. > >> > >> Rob > > > > Hi Rob, > > As we have one extra reg property (dma) required for sa8775p-pcie-ep, > > isn't it expected to be moved in if/then as per number of regs > > required. Anyways we would have duplication of some properties for new > > compatibles where the member numbers differs for a property. > > > > Are you suggesting to add the extra reg property (dma) in the existing > > reg and reg-names list, and add minItems/maxItems for all compatibles > > present in this file ? This is what we have been doing in other cases: if the list is an extension of the current list, there is no need to duplicate it. One can use min/maxItems instead. > > > > -Shazad > > Here we have defined reg and interrupt per platform as clocks is defined. > > -Mrinmay >
On 10/11/2023 5:13 PM, Dmitry Baryshkov wrote: > On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: >> >> On 10/6/2023 4:24 PM, Shazad Hussain wrote: >>> >>> On 9/22/2023 12:08 AM, Rob Herring wrote: >>>> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: >>>>> Add devicetree bindings support for SA8775P SoC. >>>>> Define reg and interrupt per platform. >>>>> >>>>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >>>>> --- >>>>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 >>>>> +++++++++++++++++---- >>>>> 1 file changed, 108 insertions(+), 22 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>> index a223ce0..e860e8f 100644 >>>>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>> @@ -13,6 +13,7 @@ properties: >>>>> compatible: >>>>> oneOf: >>>>> - enum: >>>>> + - qcom,sa8775p-pcie-ep >>>>> - qcom,sdx55-pcie-ep >>>>> - qcom,sm8450-pcie-ep >>>>> - items: >>>>> @@ -20,29 +21,19 @@ properties: >>>>> - const: qcom,sdx55-pcie-ep >>>>> reg: >>>>> - items: >>>>> - - description: Qualcomm-specific PARF configuration registers >>>>> - - description: DesignWare PCIe registers >>>>> - - description: External local bus interface registers >>>>> - - description: Address Translation Unit (ATU) registers >>>>> - - description: Memory region used to map remote RC address space >>>>> - - description: BAR memory region >>>>> + minItems: 6 >>>>> + maxItems: 7 >>>>> reg-names: >>>>> - items: >>>>> - - const: parf >>>>> - - const: dbi >>>>> - - const: elbi >>>>> - - const: atu >>>>> - - const: addr_space >>>>> - - const: mmio >>>>> + minItems: 6 >>>>> + maxItems: 7 >>>> Don't move these into if/then schemas. Then we are duplicating the >>>> names, and there is no reason to keep them aligned for new compatibles. >>>> >>>> Rob >>> Hi Rob, >>> As we have one extra reg property (dma) required for sa8775p-pcie-ep, >>> isn't it expected to be moved in if/then as per number of regs >>> required. Anyways we would have duplication of some properties for new >>> compatibles where the member numbers differs for a property. >>> >>> Are you suggesting to add the extra reg property (dma) in the existing >>> reg and reg-names list, and add minItems/maxItems for all compatibles >>> present in this file ? > This is what we have been doing in other cases: if the list is an > extension of the current list, there is no need to duplicate it. One > can use min/maxItems instead. Hi Dmitry we have tried using min/maxItems rather than duplicating but somehow catch up with some warnings in dt_bindings check //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: pcie-ep@1c00000: reg: [[29360128, 12288], [1073741824, 3869], [1073745696, 200], [1073745920, 4096], [1073750016, 4096], [29372416, 12288]] is too short// // from schema $id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: pcie-ep@1c00000: reg-names: ['parf', 'dbi', 'elbi', 'atu', 'addr_space', 'mmio'] is too short// // from schema $id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: pcie-ep@1c00000: interrupts: [[0, 140, 4], [0, 145, 4]] is too short// // from schema $id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short// // from schema $id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// / //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short/ added the patch in attachment. --Mrinmay >>> -Shazad >> Here we have defined reg and interrupt per platform as clocks is defined. >> >> -Mrinmay >> > From 520653ae6996366942f21a8942b5d8ac33e30ee3 Mon Sep 17 00:00:00 2001 From: Mrinmay Sarkar <quic_msarkar@quicinc.com> Date: Fri, 13 Oct 2023 18:09:56 +0530 Subject: [PATCH] dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC Add devicetree bindings support for SA8775P SoC. Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> --- .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 73 ++++++++++++++++++- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml index a223ce029cab..00eef92685a2 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml @@ -13,9 +13,11 @@ properties: compatible: oneOf: - enum: + - qcom,sa8775p-pcie-ep - qcom,sdx55-pcie-ep - qcom,sm8450-pcie-ep - items: + - const: qcom,sa8775p-pcie-ep - const: qcom,sdx65-pcie-ep - const: qcom,sdx55-pcie-ep @@ -27,6 +29,7 @@ properties: - description: Address Translation Unit (ATU) registers - description: Memory region used to map remote RC address space - description: BAR memory region + - description: DMA register space reg-names: items: @@ -36,13 +39,14 @@ properties: - const: atu - const: addr_space - const: mmio + - const: dma clocks: - minItems: 7 + minItems: 5 maxItems: 8 clock-names: - minItems: 7 + minItems: 5 maxItems: 8 qcom,perst-regs: @@ -60,11 +64,13 @@ properties: items: - description: PCIe Global interrupt - description: PCIe Doorbell interrupt + - description: DMA interrupt interrupt-names: items: - const: global - const: doorbell + - const: dma reset-gpios: description: GPIO used as PERST# input signal @@ -125,7 +131,13 @@ allOf: - qcom,sdx55-pcie-ep then: properties: - clocks: + reg: + maxItems: 6 + minItems: 6 + reg-names: + maxItems: 6 + minItems: 6 + clocks: items: - description: PCIe Auxiliary clock - description: PCIe CFG AHB clock @@ -143,6 +155,12 @@ allOf: - const: slave_q2a - const: sleep - const: ref + interrupts: + maxItems: 2 + minItems: 2 + interrupt-names: + maxItems: 3 + minItems: 3 - if: properties: @@ -152,6 +170,13 @@ allOf: - qcom,sm8450-pcie-ep then: properties: + properties: + reg: + maxItems: 6 + minItems: 6 + reg-names: + maxItems: 6 + minItems: 6 clocks: items: - description: PCIe Auxiliary clock @@ -172,6 +197,48 @@ allOf: - const: ref - const: ddrss_sf_tbu - const: aggre_noc_axi + interrupts: + maxItems: 2 + minItems: 2 + interrupt-names: + maxItems: 3 + minItems: 3 + + - if: + properties: + compatible: + contains: + enum: + - qcom,sa8775p-pcie-ep + then: + properties: + properties: + reg: + maxItems: 7 + minItems: 7 + reg-names: + maxItems: 7 + minItems: 7 + clocks: + items: + - description: PCIe Auxiliary clock + - description: PCIe CFG AHB clock + - description: PCIe Master AXI clock + - description: PCIe Slave AXI clock + - description: PCIe Slave Q2A AXI clock + clock-names: + items: + - const: aux + - const: cfg + - const: bus_master + - const: bus_slave + - const: slave_q2a + interrupts: + maxItems: 3 + minItems: 3 + interrupt-names: + maxItems: 3 + minItems: 3 unevaluatedProperties: false
On Fri, 13 Oct 2023 at 15:55, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: > > > On 10/11/2023 5:13 PM, Dmitry Baryshkov wrote: > > On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: > >> > >> On 10/6/2023 4:24 PM, Shazad Hussain wrote: > >>> > >>> On 9/22/2023 12:08 AM, Rob Herring wrote: > >>>> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: > >>>>> Add devicetree bindings support for SA8775P SoC. > >>>>> Define reg and interrupt per platform. > >>>>> > >>>>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > >>>>> --- > >>>>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 > >>>>> +++++++++++++++++---- > >>>>> 1 file changed, 108 insertions(+), 22 deletions(-) > >>>>> > >>>>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> index a223ce0..e860e8f 100644 > >>>>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> @@ -13,6 +13,7 @@ properties: > >>>>> compatible: > >>>>> oneOf: > >>>>> - enum: > >>>>> + - qcom,sa8775p-pcie-ep > >>>>> - qcom,sdx55-pcie-ep > >>>>> - qcom,sm8450-pcie-ep > >>>>> - items: > >>>>> @@ -20,29 +21,19 @@ properties: > >>>>> - const: qcom,sdx55-pcie-ep > >>>>> reg: > >>>>> - items: > >>>>> - - description: Qualcomm-specific PARF configuration registers > >>>>> - - description: DesignWare PCIe registers > >>>>> - - description: External local bus interface registers > >>>>> - - description: Address Translation Unit (ATU) registers > >>>>> - - description: Memory region used to map remote RC address space > >>>>> - - description: BAR memory region > >>>>> + minItems: 6 > >>>>> + maxItems: 7 > >>>>> reg-names: > >>>>> - items: > >>>>> - - const: parf > >>>>> - - const: dbi > >>>>> - - const: elbi > >>>>> - - const: atu > >>>>> - - const: addr_space > >>>>> - - const: mmio > >>>>> + minItems: 6 > >>>>> + maxItems: 7 > >>>> Don't move these into if/then schemas. Then we are duplicating the > >>>> names, and there is no reason to keep them aligned for new compatibles. > >>>> > >>>> Rob > >>> Hi Rob, > >>> As we have one extra reg property (dma) required for sa8775p-pcie-ep, > >>> isn't it expected to be moved in if/then as per number of regs > >>> required. Anyways we would have duplication of some properties for new > >>> compatibles where the member numbers differs for a property. > >>> > >>> Are you suggesting to add the extra reg property (dma) in the existing > >>> reg and reg-names list, and add minItems/maxItems for all compatibles > >>> present in this file ? > > This is what we have been doing in other cases: if the list is an > > extension of the current list, there is no need to duplicate it. One > > can use min/maxItems instead. > Hi Dmitry > > we have tried using min/maxItems rather than duplicating but somehow > catch up with some warnings in dt_bindings check > > //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: reg: [[29360128, 12288], [1073741824, 3869], > [1073745696, 200], [1073745920, 4096], [1073750016, 4096], [29372416, > 12288]] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: reg-names: ['parf', 'dbi', 'elbi', 'atu', 'addr_space', > 'mmio'] is too short// > // from schema $id: missing min/maxItems for reg and reg-names > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupts: [[0, 140, 4], [0, 145, 4]] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// incorrect min/maxItems for interrupts. > //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short/ > > added the patch in attachment. > > --Mrinmay > > >>> -Shazad > >> Here we have defined reg and interrupt per platform as clocks is defined. > >> > >> -Mrinmay > >> > >
On 10/13/2023 10:08 PM, Dmitry Baryshkov wrote: > On Fri, 13 Oct 2023 at 15:55, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: >> >> On 10/11/2023 5:13 PM, Dmitry Baryshkov wrote: >>> On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: >>>> On 10/6/2023 4:24 PM, Shazad Hussain wrote: >>>>> On 9/22/2023 12:08 AM, Rob Herring wrote: >>>>>> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: >>>>>>> Add devicetree bindings support for SA8775P SoC. >>>>>>> Define reg and interrupt per platform. >>>>>>> >>>>>>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >>>>>>> --- >>>>>>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 >>>>>>> +++++++++++++++++---- >>>>>>> 1 file changed, 108 insertions(+), 22 deletions(-) >>>>>>> >>>>>>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>>>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>>>> index a223ce0..e860e8f 100644 >>>>>>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml >>>>>>> @@ -13,6 +13,7 @@ properties: >>>>>>> compatible: >>>>>>> oneOf: >>>>>>> - enum: >>>>>>> + - qcom,sa8775p-pcie-ep >>>>>>> - qcom,sdx55-pcie-ep >>>>>>> - qcom,sm8450-pcie-ep >>>>>>> - items: >>>>>>> @@ -20,29 +21,19 @@ properties: >>>>>>> - const: qcom,sdx55-pcie-ep >>>>>>> reg: >>>>>>> - items: >>>>>>> - - description: Qualcomm-specific PARF configuration registers >>>>>>> - - description: DesignWare PCIe registers >>>>>>> - - description: External local bus interface registers >>>>>>> - - description: Address Translation Unit (ATU) registers >>>>>>> - - description: Memory region used to map remote RC address space >>>>>>> - - description: BAR memory region >>>>>>> + minItems: 6 >>>>>>> + maxItems: 7 >>>>>>> reg-names: >>>>>>> - items: >>>>>>> - - const: parf >>>>>>> - - const: dbi >>>>>>> - - const: elbi >>>>>>> - - const: atu >>>>>>> - - const: addr_space >>>>>>> - - const: mmio >>>>>>> + minItems: 6 >>>>>>> + maxItems: 7 >>>>>> Don't move these into if/then schemas. Then we are duplicating the >>>>>> names, and there is no reason to keep them aligned for new compatibles. >>>>>> >>>>>> Rob >>>>> Hi Rob, >>>>> As we have one extra reg property (dma) required for sa8775p-pcie-ep, >>>>> isn't it expected to be moved in if/then as per number of regs >>>>> required. Anyways we would have duplication of some properties for new >>>>> compatibles where the member numbers differs for a property. >>>>> >>>>> Are you suggesting to add the extra reg property (dma) in the existing >>>>> reg and reg-names list, and add minItems/maxItems for all compatibles >>>>> present in this file ? >>> This is what we have been doing in other cases: if the list is an >>> extension of the current list, there is no need to duplicate it. One >>> can use min/maxItems instead. >> Hi Dmitry >> >> we have tried using min/maxItems rather than duplicating but somehow >> catch up with some warnings in dt_bindings check >> >> //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: >> pcie-ep@1c00000: reg: [[29360128, 12288], [1073741824, 3869], >> [1073745696, 200], [1073745920, 4096], [1073750016, 4096], [29372416, >> 12288]] is too short// >> // from schema $id: >> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// >> ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: >> pcie-ep@1c00000: reg-names: ['parf', 'dbi', 'elbi', 'atu', 'addr_space', >> 'mmio'] is too short// >> // from schema $id: > missing min/maxItems for reg and reg-names > >> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// >> ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: >> pcie-ep@1c00000: interrupts: [[0, 140, 4], [0, 145, 4]] is too short// >> // from schema $id: >> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// >> ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: >> pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short// >> // from schema $id: >> http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > incorrect min/maxItems for interrupts. I am getting the same warnings even after correcting the min/maxItems for interrupt. > -Mrinmay >> //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: >> pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short/ >> >> added the patch in attachment. >> >> --Mrinmay >> >>>>> -Shazad >>>> Here we have defined reg and interrupt per platform as clocks is defined. >>>> >>>> -Mrinmay >>>> > >
On Fri, 13 Oct 2023 at 15:55, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: > > > On 10/11/2023 5:13 PM, Dmitry Baryshkov wrote: > > On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar <quic_msarkar@quicinc.com> wrote: > >> > >> On 10/6/2023 4:24 PM, Shazad Hussain wrote: > >>> > >>> On 9/22/2023 12:08 AM, Rob Herring wrote: > >>>> On Wed, Sep 20, 2023 at 07:25:08PM +0530, Mrinmay Sarkar wrote: > >>>>> Add devicetree bindings support for SA8775P SoC. > >>>>> Define reg and interrupt per platform. > >>>>> > >>>>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > >>>>> --- > >>>>> .../devicetree/bindings/pci/qcom,pcie-ep.yaml | 130 > >>>>> +++++++++++++++++---- > >>>>> 1 file changed, 108 insertions(+), 22 deletions(-) > >>>>> > >>>>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> index a223ce0..e860e8f 100644 > >>>>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml > >>>>> @@ -13,6 +13,7 @@ properties: > >>>>> compatible: > >>>>> oneOf: > >>>>> - enum: > >>>>> + - qcom,sa8775p-pcie-ep > >>>>> - qcom,sdx55-pcie-ep > >>>>> - qcom,sm8450-pcie-ep > >>>>> - items: > >>>>> @@ -20,29 +21,19 @@ properties: > >>>>> - const: qcom,sdx55-pcie-ep > >>>>> reg: > >>>>> - items: > >>>>> - - description: Qualcomm-specific PARF configuration registers > >>>>> - - description: DesignWare PCIe registers > >>>>> - - description: External local bus interface registers > >>>>> - - description: Address Translation Unit (ATU) registers > >>>>> - - description: Memory region used to map remote RC address space > >>>>> - - description: BAR memory region > >>>>> + minItems: 6 > >>>>> + maxItems: 7 > >>>>> reg-names: > >>>>> - items: > >>>>> - - const: parf > >>>>> - - const: dbi > >>>>> - - const: elbi > >>>>> - - const: atu > >>>>> - - const: addr_space > >>>>> - - const: mmio > >>>>> + minItems: 6 > >>>>> + maxItems: 7 > >>>> Don't move these into if/then schemas. Then we are duplicating the > >>>> names, and there is no reason to keep them aligned for new compatibles. > >>>> > >>>> Rob > >>> Hi Rob, > >>> As we have one extra reg property (dma) required for sa8775p-pcie-ep, > >>> isn't it expected to be moved in if/then as per number of regs > >>> required. Anyways we would have duplication of some properties for new > >>> compatibles where the member numbers differs for a property. > >>> > >>> Are you suggesting to add the extra reg property (dma) in the existing > >>> reg and reg-names list, and add minItems/maxItems for all compatibles > >>> present in this file ? > > This is what we have been doing in other cases: if the list is an > > extension of the current list, there is no need to duplicate it. One > > can use min/maxItems instead. > Hi Dmitry > > we have tried using min/maxItems rather than duplicating but somehow > catch up with some warnings in dt_bindings check > > //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: reg: [[29360128, 12288], [1073741824, 3869], > [1073745696, 200], [1073745920, 4096], [1073750016, 4096], [29372416, > 12288]] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: reg-names: ['parf', 'dbi', 'elbi', 'atu', 'addr_space', > 'mmio'] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupts: [[0, 140, 4], [0, 145, 4]] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > ///local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short// > // from schema $id: > http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#// > / > > //local/mnt/workspace/Mrinmay/lemans/next-20230914/linux-next/out/Documentation/devicetree/bindings/pci/qcom,pcie-ep.example.dtb: > pcie-ep@1c00000: interrupt-names: ['global', 'doorbell'] is too short/ > > added the patch in attachment. Please, don't send patches as attachments. It is impossible to comment on it. So, few points I had to fix to make your patch to work: - Please, understand the difference between enum and items. You'd need to add your compat string to only one of them. Or to a new entry. But adding it to both entries is a definite mistake. - You have extended items for existing platforms (reg, reg-names, interrupts, interrupt-names). However you failed to add corresponding minItems, allowing existing platforms to use the list with less items in it. - You do not need to have maxItems:N, minItems:N with the same value. Please drop these minItems, it is the default. - You haven't reviewed the patch on your own. You have erroneously nested 'properties' clauses in two places. $ git diff --stat Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) Hope this helps.
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml index a223ce0..e860e8f 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml @@ -13,6 +13,7 @@ properties: compatible: oneOf: - enum: + - qcom,sa8775p-pcie-ep - qcom,sdx55-pcie-ep - qcom,sm8450-pcie-ep - items: @@ -20,29 +21,19 @@ properties: - const: qcom,sdx55-pcie-ep reg: - items: - - description: Qualcomm-specific PARF configuration registers - - description: DesignWare PCIe registers - - description: External local bus interface registers - - description: Address Translation Unit (ATU) registers - - description: Memory region used to map remote RC address space - - description: BAR memory region + minItems: 6 + maxItems: 7 reg-names: - items: - - const: parf - - const: dbi - - const: elbi - - const: atu - - const: addr_space - - const: mmio + minItems: 6 + maxItems: 7 clocks: - minItems: 7 + minItems: 5 maxItems: 8 clock-names: - minItems: 7 + minItems: 5 maxItems: 8 qcom,perst-regs: @@ -57,14 +48,12 @@ properties: - description: Perst separation enable offset interrupts: - items: - - description: PCIe Global interrupt - - description: PCIe Doorbell interrupt + minItems: 2 + maxItems: 3 interrupt-names: - items: - - const: global - - const: doorbell + minItems: 2 + maxItems: 3 reset-gpios: description: GPIO used as PERST# input signal @@ -122,6 +111,51 @@ allOf: compatible: contains: enum: + - qcom,sa8775p-pcie-ep + then: + properties: + reg: + items: + - description: Qualcomm-specific PARF configuration registers + - description: DesignWare PCIe registers + - description: External local bus interface registers + - description: Address Translation Unit (ATU) registers + - description: Memory region used to map remote RC address space + - description: BAR memory region + - description: DMA memory region + reg-names: + items: + - const: parf + - const: dbi + - const: elbi + - const: atu + - const: addr_space + - const: mmio + - const: dma + else: + properties: + reg: + items: + - description: Qualcomm-specific PARF configuration registers + - description: DesignWare PCIe registers + - description: External local bus interface registers + - description: Address Translation Unit (ATU) registers + - description: Memory region used to map remote RC address space + - description: BAR memory region + reg-names: + items: + - const: parf + - const: dbi + - const: elbi + - const: atu + - const: addr_space + - const: mmio + + - if: + properties: + compatible: + contains: + enum: - qcom,sdx55-pcie-ep then: properties: @@ -173,6 +207,58 @@ allOf: - const: ddrss_sf_tbu - const: aggre_noc_axi + - if: + properties: + compatible: + contains: + enum: + - qcom,sa8775-pcie-ep + then: + properties: + clocks: + items: + - description: PCIe Auxiliary clock + - description: PCIe CFG AHB clock + - description: PCIe Master AXI clock + - description: PCIe Slave AXI clock + - description: PCIe Slave Q2A AXI clock + clock-names: + items: + - const: aux + - const: cfg + - const: bus_master + - const: bus_slave + - const: slave_q2a + + - if: + properties: + compatible: + contains: + enum: + - qcom,sa8775p-pcie-ep + then: + properties: + interrupts: + items: + - description: PCIe Global interrupt + - description: PCIe Doorbell interrupt + - description: DMA interrupt + interrupt-names: + items: + - const: global + - const: doorbell + - const: dma + else: + properties: + interrupts: + items: + - description: PCIe Global interrupt + - description: PCIe Doorbell interrupt + interrupt-names: + items: + - const: global + - const: doorbell + unevaluatedProperties: false examples: