Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1082210rdg; Fri, 13 Oct 2023 09:38:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFITOxB5Nig07lGaP6R/hXvv6WYzerXTmOE7N8W0yrHz8wNEwxl0zR8RAeOXc7LRl/Gr7ok X-Received: by 2002:a17:902:7207:b0:1c1:dbd6:9bf6 with SMTP id ba7-20020a170902720700b001c1dbd69bf6mr24522183plb.41.1697215123060; Fri, 13 Oct 2023 09:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697215123; cv=none; d=google.com; s=arc-20160816; b=bj5MVBSHmdWMMjlkgQuFAZ3wbOpDy45CkYnGz6J5tnLzZBLETTJOcQHcZ26Oqoy8wN 0b1oNncsLFrwbrWNd642lyshzAFIEvw1TvsaiqwbCIaW3X+KEnRjmErK7wk/YZWkFupO tEJ59IbSM91Yoi11k8F19O4tflcyk2kCWtgGjRON8t8JxEFpOwGVY4xCScnIIZ2vWcah nsRLWqSgPOzDKfV2PkkR/2GujoaYIC5qLddS86cZ0ba4JPysAxPd3bbce6QxtOVJrqD/ L6BvDs5jqzz8ghmYnHszhawVs964+3tpgOP7gFB8ouuxlDRKEMBld3+bnHslltEZ/id5 EHaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=y62C42hqOldBla5nOPJaFzuEZ48dSgIXLJ1wjt3nmfg=; fh=eAscqywYjqgpJTAvnU7irgk56EnVDBWPRqoUF5p/0uU=; b=XB4Uwu75QhR8BjXCn8fxc3Bqn6SJ2migdDMCJ1E+s+pDoxgRfwDociTp4GmPf9y6KG 6aVpTV6K8EBYjBeCRV0jFf12RjsbUzLNYOMkj6g9iXxnHZvPGrpey0eDqSwi/8IioeBo 3jbRhwe7xyfm8eSA/Z5Bc80dbDElbbatYzs6Q+1A2x5okK9gyimHu7+O5/UiUxgMDVGU lMGceS/CIHeDZr1kkeBOGfvGZjkTBWi7CgeRoMprczar/OfYJt1x07BsirVvQDVyYGGm khvo5kCuNGDp11+BUrzsu2NiI8qKag4hLSxTZud28sF+gpjJ5I6KQF5BwbOpDUkN0QfF mTpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hiX5qt8O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j1-20020a170902da8100b001c6069b659csi5148649plx.384.2023.10.13.09.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hiX5qt8O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B42D982B8DA2; Fri, 13 Oct 2023 09:38:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230328AbjJMQia (ORCPT + 99 others); Fri, 13 Oct 2023 12:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjJMQi3 (ORCPT ); Fri, 13 Oct 2023 12:38:29 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC9DBB for ; Fri, 13 Oct 2023 09:38:26 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-5a7a7e9357eso27791007b3.0 for ; Fri, 13 Oct 2023 09:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697215105; x=1697819905; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=y62C42hqOldBla5nOPJaFzuEZ48dSgIXLJ1wjt3nmfg=; b=hiX5qt8Om7aIOlXShaWA/uFgbGLsgrOrS0YgTXtH4uupp/JMUbRTFPlZsoc6uTeK9y 2SUp6Wh9R2OJB97TR7w34YO2q+FNUhJhoh9SQ4/hw9o2GyXY4WNtkZJrWlPdGgtTv4zG mRiIJ2H5iA/3QSkifXk55KaHR4+6TjdXUQImyKnrIoO6psCfHR6k9O2V6uyE+erFydbs t4ps4GnHjxwSlR2yJ0jRYpQ6QwtTIWG12VcTLmTdwzAOMuHMrSHNcYj3ywTPf1df4nJ3 QFraTwARMRfNTF6mo5jBeADVpuZJq5474UKhGwEJEsY3Zn+IabZIc+BvFCnKnBKKBOi2 2Kbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697215105; x=1697819905; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=y62C42hqOldBla5nOPJaFzuEZ48dSgIXLJ1wjt3nmfg=; b=stHYPAU4Y60gWZ3HXxDZb4ZbgQT8VNDGupTThctAIcTO6LEwPdqWscUZTIb/kcuSrr W9yHy3Hn81ocDbCxhY/8XN3uETMJ2rcvcloeFScLETWcuIG4uNkBZhcKfyGsZpUN8SZ5 EHKmI9bH+B8bTeLkE10UA9PeXvSOe3DHBjB+5osryAKrLxcKjDEUhPKMsiWvvWhTgXo1 U7dMwnjYhsL3145PuEFtuXybKvmn3Qth9JdTuucyorL6G8xu1t9/VOHQQgA0+2/z4zpf Kf3L/pH6U9y2UCC82MrHnwPEQA0WL+nMWLBAECzL06+gwFOeNpNynUfPAt67FBbd/vQu Y19g== X-Gm-Message-State: AOJu0YwXWDhnO0zhwF5sLxCF9fNopksBaHgWyQHhXtDJ72wqyouWwBF/ uOpj6y5Rt/U7rdz2Xwksbru7F1nOjd53BzPkzUeMZQ== X-Received: by 2002:a0d:eb0e:0:b0:5a8:1654:4b6f with SMTP id u14-20020a0deb0e000000b005a816544b6fmr3585459ywe.17.1697215105287; Fri, 13 Oct 2023 09:38:25 -0700 (PDT) MIME-Version: 1.0 References: <1695218113-31198-1-git-send-email-quic_msarkar@quicinc.com> <1695218113-31198-2-git-send-email-quic_msarkar@quicinc.com> <20230921183850.GA762694-robh@kernel.org> <28bf111f-b965-4d38-884b-bc3a0b68a6cc@quicinc.com> <8effa7e5-a223-081b-75b8-7b94400d42e6@quicinc.com> <31e6aab6-73f9-a421-9dfa-292d9d0e9649@quicinc.com> In-Reply-To: <31e6aab6-73f9-a421-9dfa-292d9d0e9649@quicinc.com> From: Dmitry Baryshkov Date: Fri, 13 Oct 2023 19:38:13 +0300 Message-ID: Subject: Re: [PATCH v1 1/5] dt-bindings: PCI: qcom-ep: Add support for SA8775P SoC To: Mrinmay Sarkar Cc: Shazad Hussain , Rob Herring , agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Vinod Koul , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:38:39 -0700 (PDT) On Fri, 13 Oct 2023 at 15:55, Mrinmay Sarkar wrote: > > > On 10/11/2023 5:13 PM, Dmitry Baryshkov wrote: > > On Wed, 11 Oct 2023 at 14:14, Mrinmay Sarkar 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 > >>>>> --- > >>>>> .../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 > >> > > -- With best wishes Dmitry