Message ID | 1689311319-22054-3-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:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2286758vqm; Thu, 13 Jul 2023 22:31:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmx2X64723JEpx/7ztyl1eOInIN6ROYGGrWI+ckvZrgL/QdjAGXRJMCW7sHARrTdQhcng+ X-Received: by 2002:a17:906:64d5:b0:993:d7c1:7fd2 with SMTP id p21-20020a17090664d500b00993d7c17fd2mr3339179ejn.14.1689312669618; Thu, 13 Jul 2023 22:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689312669; cv=none; d=google.com; s=arc-20160816; b=c63Iry10QVGXNhbHkZkqyDArI1skWemsiDYqejaKXeaNrjjBfoNy5UPqRvvhyUwCk/ FLwuUslpWg8EzXc0JPXogSp+L+Tx/Y9jHyQi1Y4/Sd4MCaqMngzIMMAaBQ8oKb/noO9J n8LYLW0TxXYcn0kIchXRQSoyMofK0gRkykpIrx7ScjsmC7tEi9p6YNcUpwGDovLc0iEn cewOP2S5meUMBEyQlq3/0ruUqAbo1aQClxJ8zXA8ua/drdTnpW45OmJjU3wdfAIn2S88 CaSX4r36TZmnMu0YU4kBk3rP3CxyQ1SO9Xz4y0449tT1CQeqkWp3uzwvWUOmdSxrXtWF E9xQ== 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=cmH6+VfuPO1XWBA9yr4flAkYMy57XkVlfIG48ZScJLo=; fh=1PlPhL2iqZbkg6vrFcwyXzOFJk75/Sstg8kx1Kza+RM=; b=wFABHbbylJIh5MerHXDWkWDWg526sxoDV0Znp4amkrQUS3mXBM8GaqbztfoSq5ZM0e yBl+eckJlRiiarBhGiKOo7omrrmroZmGnU9oFwkeR7YYhkFxybNSOtclQYZTByN8I21v xYxQHbQvKligCagowAMs51OFXLBsl+h7aGOpEJpAaN26rsk05GCIguKQVDu1ro3Gq7Re Eufhx5zV0JXCEAFq7jt0Qmo0/5wHpm32L01Av6f6wdrRZtUgEsZa8EJkLCIBqblRIEEU l+FhLtMP6UIJd2I4SAjih164wyXYEY0rgCcgMKDSH/6+AjP+9Y1n1h+edRyTsCCAFcrG T8DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IDyUy2X8; 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 m7-20020a170906234700b0098df03ffa69si1910345eja.421.2023.07.13.22.30.44; Thu, 13 Jul 2023 22:31:09 -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=IDyUy2X8; 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 S234413AbjGNFJV (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Fri, 14 Jul 2023 01:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234867AbjGNFJP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Jul 2023 01:09:15 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7064C2D78; Thu, 13 Jul 2023 22:09:09 -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 36E3pOwS008610; Fri, 14 Jul 2023 05:08:53 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=cmH6+VfuPO1XWBA9yr4flAkYMy57XkVlfIG48ZScJLo=; b=IDyUy2X8Xh+kJ/Su/V3Ug0fTDdJ3I3ElbNbtoyFbaA9dPNBa/8ZufZAFDxlHWBmnlFOY ySzfi4D8qczQIZ2cuzswBP3moxY2V0hai0kM3NEG9xwt40zXOXINWMEHcP6oD+hwgBn9 RSPs71YsE48wyaO3JALw5CnmuSAddAnVGEHZtXCLUzQC/DqHkp4jKZWt+QqSWaKlyDCs 7g7463H2mZbnuInN+UKMpi1YYewak1K6sAuAc3ZcISCian3HRWfUGeV6tZGkglwqEIs0 w9PZhZG5igbNYP+cDHl9Oc2J6ery0ehxLT0HcpPXbS1LJuFpqVmLDyE8GLZUEzMy8vgA ng== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rtptxgw0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jul 2023 05:08:53 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 36E58olq001133; Fri, 14 Jul 2023 05:08:50 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3rq0vm576y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Jul 2023 05:08:50 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36E58nci001126; Fri, 14 Jul 2023 05:08:49 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 36E58ngZ001124; Fri, 14 Jul 2023 05:08:49 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id C37A0333B; Fri, 14 Jul 2023 10:38:48 +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, dmitry.baryshkov@linaro.org, Mrinmay Sarkar <quic_msarkar@quicinc.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>, Bjorn Helgaas <bhelgaas@google.com>, Vinod Koul <vkoul@kernel.org>, Kishon Vijay Abraham I <kishon@kernel.org>, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH v2 2/6] dt-bindings: phy: qcom,qmp: Add sa8775p QMP PCIe PHY Date: Fri, 14 Jul 2023 10:38:34 +0530 Message-Id: <1689311319-22054-3-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1689311319-22054-1-git-send-email-quic_msarkar@quicinc.com> References: <1689311319-22054-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-GUID: 9bHwhS5TqlhvKvLWSIK9xsZyQ35tLOxe X-Proofpoint-ORIG-GUID: 9bHwhS5TqlhvKvLWSIK9xsZyQ35tLOxe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-14_02,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 impostorscore=0 bulkscore=0 mlxscore=0 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307140046 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1771372721422386274 X-GMAIL-MSGID: 1771372721422386274 |
Series |
arm64: qcom: sa8775p: add support for PCIe
|
|
Commit Message
Mrinmay Sarkar
July 14, 2023, 5:08 a.m. UTC
Add devicetree YAML binding for Qualcomm QMP PCIe PHY
for SA8775p platform.
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
---
.../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Comments
On 14/07/2023 07:08, Mrinmay Sarkar wrote: > Add devicetree YAML binding for Qualcomm QMP PCIe PHY > for SA8775p platform. > > Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > --- > .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > index a0407fc..ca55ed9 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > @@ -16,6 +16,8 @@ description: > properties: > compatible: > enum: > + - qcom,sa8775p-qmp-gen4x2-pcie-phy > + - qcom,sa8775p-qmp-gen4x4-pcie-phy > - qcom,sc8280xp-qmp-gen3x1-pcie-phy > - qcom,sc8280xp-qmp-gen3x2-pcie-phy > - qcom,sc8280xp-qmp-gen3x4-pcie-phy > @@ -30,7 +32,7 @@ properties: > > clocks: > minItems: 5 > - maxItems: 6 > + maxItems: 7 > > clock-names: > minItems: 5 > @@ -41,6 +43,7 @@ properties: > - const: rchng > - const: pipe > - const: pipediv2 > + - const: phy_aux > > power-domains: > maxItems: 1 > @@ -141,6 +144,20 @@ allOf: > compatible: > contains: > enum: > + - qcom,sa8775p-qmp-gen4x2-pcie-phy > + - qcom,sa8775p-qmp-gen4x4-pcie-phy > + then: > + properties: > + clocks: > + minItems: 7 > + clock-names: > + minItems: 7 > + > + - if: > + properties: > + compatible: > + contains: > + enum: This probably works but is not obvious and easy to read. You have here if:then:else: block, so else applies to your variant. Change all these if clauses for clocks into separate clauses per matching variant (if:then: ... if:then:... if:then:...) Best regards, Krzysztof
On 7/17/2023 12:55 PM, Krzysztof Kozlowski wrote: > On 14/07/2023 07:08, Mrinmay Sarkar wrote: >> Add devicetree YAML binding for Qualcomm QMP PCIe PHY >> for SA8775p platform. >> >> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >> --- >> .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 19 ++++++++++++++++++- >> 1 file changed, 18 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> index a0407fc..ca55ed9 100644 >> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >> @@ -16,6 +16,8 @@ description: >> properties: >> compatible: >> enum: >> + - qcom,sa8775p-qmp-gen4x2-pcie-phy >> + - qcom,sa8775p-qmp-gen4x4-pcie-phy >> - qcom,sc8280xp-qmp-gen3x1-pcie-phy >> - qcom,sc8280xp-qmp-gen3x2-pcie-phy >> - qcom,sc8280xp-qmp-gen3x4-pcie-phy >> @@ -30,7 +32,7 @@ properties: >> >> clocks: >> minItems: 5 >> - maxItems: 6 >> + maxItems: 7 >> >> clock-names: >> minItems: 5 >> @@ -41,6 +43,7 @@ properties: >> - const: rchng >> - const: pipe >> - const: pipediv2 >> + - const: phy_aux >> >> power-domains: >> maxItems: 1 >> @@ -141,6 +144,20 @@ allOf: >> compatible: >> contains: >> enum: >> + - qcom,sa8775p-qmp-gen4x2-pcie-phy >> + - qcom,sa8775p-qmp-gen4x4-pcie-phy >> + then: >> + properties: >> + clocks: >> + minItems: 7 >> + clock-names: >> + minItems: 7 >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: > This probably works but is not obvious and easy to read. You have here > if:then:else: block, so else applies to your variant. Change all these > if clauses for clocks into separate clauses per matching variant > (if:then: ... if:then:... if:then:...) > > Best regards, > Krzysztof My Bad here, This patch already applied we will take care this in next patch set. Thanks, Mrinmay >
On Fri, Jul 21, 2023 at 04:33:20PM +0530, Mrinmay Sarkar wrote: > > On 7/17/2023 12:55 PM, Krzysztof Kozlowski wrote: > > On 14/07/2023 07:08, Mrinmay Sarkar wrote: > > > Add devicetree YAML binding for Qualcomm QMP PCIe PHY > > > for SA8775p platform. > > > > > > Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> > > > --- > > > .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 19 ++++++++++++++++++- > > > 1 file changed, 18 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > index a0407fc..ca55ed9 100644 > > > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > > > @@ -16,6 +16,8 @@ description: > > > properties: > > > compatible: > > > enum: > > > + - qcom,sa8775p-qmp-gen4x2-pcie-phy > > > + - qcom,sa8775p-qmp-gen4x4-pcie-phy > > > - qcom,sc8280xp-qmp-gen3x1-pcie-phy > > > - qcom,sc8280xp-qmp-gen3x2-pcie-phy > > > - qcom,sc8280xp-qmp-gen3x4-pcie-phy > > > @@ -30,7 +32,7 @@ properties: > > > clocks: > > > minItems: 5 > > > - maxItems: 6 > > > + maxItems: 7 > > > clock-names: > > > minItems: 5 > > > @@ -41,6 +43,7 @@ properties: > > > - const: rchng > > > - const: pipe > > > - const: pipediv2 > > > + - const: phy_aux > > > power-domains: > > > maxItems: 1 > > > @@ -141,6 +144,20 @@ allOf: > > > compatible: > > > contains: > > > enum: > > > + - qcom,sa8775p-qmp-gen4x2-pcie-phy > > > + - qcom,sa8775p-qmp-gen4x4-pcie-phy > > > + then: > > > + properties: > > > + clocks: > > > + minItems: 7 > > > + clock-names: > > > + minItems: 7 > > > + > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + enum: > > This probably works but is not obvious and easy to read. You have here > > if:then:else: block, so else applies to your variant. Change all these > > if clauses for clocks into separate clauses per matching variant > > (if:then: ... if:then:... if:then:...) As far as I can tell, this actually doesn't work :( > > > > Best regards, > > Krzysztof > > My Bad here, This patch already applied we will take care this in next patch > set. > > Thanks, > Mrinmay > Mrinmay, do you plan on spinning what Krzysztof suggested? I grabbed linux-next today and ran into this (looks like clocks, clock-names in binding is broken and looks like we're either missing the required power-domain in the dts or it isn't actually required): (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % git diff (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 DT_SCHEMA_FILES=phy/qcom,sc8280xp-qmp-pcie-phy.yaml qcom/sa8775p-ride.dtb UPD include/config/kernel.release LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json /home/ahalaney/git/linux-next/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml: ignoring, error parsing file DTC_CHK arch/arm64/boot/dts/qcom/sa8775p-ride.dtb /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: 'power-domains' is a required property from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: clocks: [[31, 66], [31, 68], [31, 94], [31, 72], [31, 74], [31, 77], [31, 70]] is too long from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: clock-names: ['aux', 'cfg_ahb', 'ref', 'rchng', 'pipe', 'pipediv2', 'phy_aux'] is too long from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: 'power-domains' is a required property from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: clocks: [[31, 80], [31, 82], [31, 94], [31, 86], [31, 88], [31, 91], [31, 84]] is too long from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: clock-names: ['aux', 'cfg_ahb', 'ref', 'rchng', 'pipe', 'pipediv2', 'phy_aux'] is too long from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 7.65s user 0.52s system 99% cpu 8.231 total (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % # Total hack just to show our issues in current binding (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % git diff diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index ca55ed9d74ac..5476cf2422da 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml @@ -87,7 +87,6 @@ required: - reg - clocks - clock-names - - power-domains - resets - reset-names - vdda-phy-supply @@ -132,12 +131,6 @@ allOf: maxItems: 5 clock-names: maxItems: 5 - else: - properties: - clocks: - minItems: 6 - clock-names: - minItems: 6 - if: properties: (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 DT_SCHEMA_FILES=phy/qcom,sc8280xp-qmp-pcie-phy.yaml qcom/sa8775p-ride.dtb UPD include/config/kernel.release LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json /home/ahalaney/git/linux-next/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml: ignoring, error parsing file DTC_CHK arch/arm64/boot/dts/qcom/sa8775p-ride.dtb ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 7.58s user 0.87s system 98% cpu 8.618 total (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % Thanks, Andrew
On 7/25/2023 11:21 PM, Andrew Halaney wrote: > On Fri, Jul 21, 2023 at 04:33:20PM +0530, Mrinmay Sarkar wrote: >> On 7/17/2023 12:55 PM, Krzysztof Kozlowski wrote: >>> On 14/07/2023 07:08, Mrinmay Sarkar wrote: >>>> Add devicetree YAML binding for Qualcomm QMP PCIe PHY >>>> for SA8775p platform. >>>> >>>> Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> >>>> --- >>>> .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 19 ++++++++++++++++++- >>>> 1 file changed, 18 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> index a0407fc..ca55ed9 100644 >>>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml >>>> @@ -16,6 +16,8 @@ description: >>>> properties: >>>> compatible: >>>> enum: >>>> + - qcom,sa8775p-qmp-gen4x2-pcie-phy >>>> + - qcom,sa8775p-qmp-gen4x4-pcie-phy >>>> - qcom,sc8280xp-qmp-gen3x1-pcie-phy >>>> - qcom,sc8280xp-qmp-gen3x2-pcie-phy >>>> - qcom,sc8280xp-qmp-gen3x4-pcie-phy >>>> @@ -30,7 +32,7 @@ properties: >>>> clocks: >>>> minItems: 5 >>>> - maxItems: 6 >>>> + maxItems: 7 >>>> clock-names: >>>> minItems: 5 >>>> @@ -41,6 +43,7 @@ properties: >>>> - const: rchng >>>> - const: pipe >>>> - const: pipediv2 >>>> + - const: phy_aux >>>> power-domains: >>>> maxItems: 1 >>>> @@ -141,6 +144,20 @@ allOf: >>>> compatible: >>>> contains: >>>> enum: >>>> + - qcom,sa8775p-qmp-gen4x2-pcie-phy >>>> + - qcom,sa8775p-qmp-gen4x4-pcie-phy >>>> + then: >>>> + properties: >>>> + clocks: >>>> + minItems: 7 >>>> + clock-names: >>>> + minItems: 7 >>>> + >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + enum: >>> This probably works but is not obvious and easy to read. You have here >>> if:then:else: block, so else applies to your variant. Change all these >>> if clauses for clocks into separate clauses per matching variant >>> (if:then: ... if:then:... if:then:...) > As far as I can tell, this actually doesn't work :( > >>> Best regards, >>> Krzysztof >> My Bad here, This patch already applied we will take care this in next patch >> set. >> >> Thanks, >> Mrinmay >> > Mrinmay, do you plan on spinning what Krzysztof suggested? I grabbed > linux-next today and ran into this (looks like clocks, clock-names in > binding is broken and looks like we're either missing the required > power-domain in the dts or it isn't actually required): > > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % git diff > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 DT_SCHEMA_FILES=phy/qcom,sc8280xp-qmp-pcie-phy.yaml qcom/sa8775p-ride.dtb > UPD include/config/kernel.release > LINT Documentation/devicetree/bindings > CHKDT Documentation/devicetree/bindings/processed-schema.json > SCHEMA Documentation/devicetree/bindings/processed-schema.json > /home/ahalaney/git/linux-next/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml: ignoring, error parsing file > DTC_CHK arch/arm64/boot/dts/qcom/sa8775p-ride.dtb > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: 'power-domains' is a required property > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: clocks: [[31, 66], [31, 68], [31, 94], [31, 72], [31, 74], [31, 77], [31, 70]] is too long > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c04000: clock-names: ['aux', 'cfg_ahb', 'ref', 'rchng', 'pipe', 'pipediv2', 'phy_aux'] is too long > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: 'power-domains' is a required property > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: clocks: [[31, 80], [31, 82], [31, 94], [31, 86], [31, 88], [31, 91], [31, 84]] is too long > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > /home/ahalaney/git/linux-next/arch/arm64/boot/dts/qcom/sa8775p-ride.dtb: phy@1c14000: clock-names: ['aux', 'cfg_ahb', 'ref', 'rchng', 'pipe', 'pipediv2', 'phy_aux'] is too long > from schema $id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 7.65s user 0.52s system 99% cpu 8.231 total > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % # Total hack just to show our issues in current binding > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % git diff > diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > index ca55ed9d74ac..5476cf2422da 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml > @@ -87,7 +87,6 @@ required: > - reg > - clocks > - clock-names > - - power-domains > - resets > - reset-names > - vdda-phy-supply > @@ -132,12 +131,6 @@ allOf: > maxItems: 5 > clock-names: > maxItems: 5 > - else: > - properties: > - clocks: > - minItems: 6 > - clock-names: > - minItems: 6 > > - if: > properties: > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 DT_SCHEMA_FILES=phy/qcom,sc8280xp-qmp-pcie-phy.yaml qcom/sa8775p-ride.dtb > UPD include/config/kernel.release > LINT Documentation/devicetree/bindings > CHKDT Documentation/devicetree/bindings/processed-schema.json > SCHEMA Documentation/devicetree/bindings/processed-schema.json > /home/ahalaney/git/linux-next/Documentation/devicetree/bindings/power/qcom,kpss-acc-v2.yaml: ignoring, error parsing file > DTC_CHK arch/arm64/boot/dts/qcom/sa8775p-ride.dtb > ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CHECK_DTBS=1 7.58s user 0.87s system 98% cpu 8.618 total > (dtb-checker) ahalaney@fedora ~/git/linux-next (git)-[tags/next-20230724] % > > > Thanks, > Andrew Hi Andrew, Yes, as I mentioned earlier we have plan to send the fixes for this. Thanks, Mrinmay
diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index a0407fc..ca55ed9 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml @@ -16,6 +16,8 @@ description: properties: compatible: enum: + - qcom,sa8775p-qmp-gen4x2-pcie-phy + - qcom,sa8775p-qmp-gen4x4-pcie-phy - qcom,sc8280xp-qmp-gen3x1-pcie-phy - qcom,sc8280xp-qmp-gen3x2-pcie-phy - qcom,sc8280xp-qmp-gen3x4-pcie-phy @@ -30,7 +32,7 @@ properties: clocks: minItems: 5 - maxItems: 6 + maxItems: 7 clock-names: minItems: 5 @@ -41,6 +43,7 @@ properties: - const: rchng - const: pipe - const: pipediv2 + - const: phy_aux power-domains: maxItems: 1 @@ -141,6 +144,20 @@ allOf: compatible: contains: enum: + - qcom,sa8775p-qmp-gen4x2-pcie-phy + - qcom,sa8775p-qmp-gen4x4-pcie-phy + then: + properties: + clocks: + minItems: 7 + clock-names: + minItems: 7 + + - if: + properties: + compatible: + contains: + enum: - qcom,sm8550-qmp-gen4x2-pcie-phy then: properties: