Received: by 2002:a05:622a:a038:b0:405:55f2:b071 with SMTP id jt56csp2315484qtb; Tue, 25 Jul 2023 11:38:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtTXirWxnfRzLwhZSaCnOuDoHpSfise2CdwzQ7QLbRLQn8UeNRLd3CPVrRjiA1STdl8k/h X-Received: by 2002:a05:6358:c16:b0:132:fcf6:f311 with SMTP id f22-20020a0563580c1600b00132fcf6f311mr12479446rwj.0.1690310312761; Tue, 25 Jul 2023 11:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690310312; cv=none; d=google.com; s=arc-20160816; b=SyYAKYCPLtWSarREQlkD4NcWSM3xNPS6ExcnYodd3JMzxf5BnEtXcR49Ntl94tBh/A LRK/7tcbiVuKCYrir0Y32XM7WGdZEv3U4D/OIDQLA4sfPi0U4IlDN7m6nD+apXPVAhh4 XS6kxIkjiaqORZbITvYGR2VswyPsIpDlpi+1F0pHVtHxUvnSwj5TOK6Jjm99mw9sPEwg paAqIFFDAi+YUdbBeh0bACeiclAuTMFq6aFGC5fgQDheA+lk3pGzX4bz1tZHmvjgvN1j 3So1jmdOzwSoISGm7ddjE67g0Fm67VJYwpdtceMYU2Vr9aUOSsQR2I3eCRYZIqik5kt2 udbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ht71+ytnrpXSHx2moGem4zAvWEqI+p9KhmtDtZeMjAg=; fh=Ms5JdL92yzUJnYhbc5GUj2trH8hul5GahCsEfrwUoKc=; b=GVecICIh5KZGvnNqApXD6FlKB8uE8izqE7CiSC+N8utxBbMjtZLqtP/ObpgN/jWfdh DHBy7ZE2lSV6h5CZk5KrVWdzM8MpNIyoCLNwBuZFletn9DpJyXAW1T2oBDUdlCnLiSpw 9//OZKLb76K469I63m74iUtLydxF2yC/Q/H5j7ciyiEgxmPIXN9oqbnTmqIHVO6HSV5d ceaEOVuC++e7M9FHZH1o7+aE5ogjRVrmSHyobXvcwzh79ye398grMqXsfQwaWhwXlu1g 9uX/hOX9BevPrFzbdgG+UwXMNUlY4PmHmoeRiz2fG/EC1Oc2slyXTl3XxlO2mU0Rf43z Ttxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YarrbDZj; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a637204000000b005600a533c7dsi11268469pgc.161.2023.07.25.11.38.19; Tue, 25 Jul 2023 11:38:32 -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=@redhat.com header.s=mimecast20190719 header.b=YarrbDZj; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbjGYRwl (ORCPT + 99 others); Tue, 25 Jul 2023 13:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjGYRwk (ORCPT ); Tue, 25 Jul 2023 13:52:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A41E2115 for ; Tue, 25 Jul 2023 10:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690307507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ht71+ytnrpXSHx2moGem4zAvWEqI+p9KhmtDtZeMjAg=; b=YarrbDZjrAnB1oc5u0x0YNImnV4vkV3Etu+yGGiJJQWCOOd67SNLlUIb0D1Zcr66Di18g+ 9nYq5hYbv6vnu0GdNRSRbOwQR2sL9q7DnGZJ3N+5F7UU+6jE4u9J24n130JR5Q/qIr8WsY met8KaskBW7oC534mTnTX9QJw4gQ98c= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-397-lANvnhS5Mcy70XWD1vNeHA-1; Tue, 25 Jul 2023 13:51:46 -0400 X-MC-Unique: lANvnhS5Mcy70XWD1vNeHA-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-403a4cdbfa2so66522501cf.3 for ; Tue, 25 Jul 2023 10:51:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690307505; x=1690912305; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ht71+ytnrpXSHx2moGem4zAvWEqI+p9KhmtDtZeMjAg=; b=bNGXO370TB+FxB/FPOMBcdqT0I9eh7BCHGWvEx6+vahMHa6Pm2iWHTN4TTRwDrGeOu QOcu0glfTW6LoLYq/I/yM+H8bfQepHI4WZzq8mFfLFyCo6K8fecbtyE2uKKKMPWnqWOE AFxpb19Iz3UpRTIc0ag8SrfpHszu3cy/4HiO77+EikK2JB0xJxrgc8TxrfriS5bky3s1 O9PBx4S8ykNzWbGbOiOSZJKRd/1mAIwlSwbaK6T6w+x942ErkNQbRN+xKaqFzejN+xIg kvslSNbvoMoJzjZ1flAtj+KBqAHOkHhS1gaYlQnF/krvp/suzHZSkINptVtEgpNZVHuy 7dOQ== X-Gm-Message-State: ABy/qLaCU6+QmEwyLGgh8nKdIzdwaaJoWK4E9UxxfmjjMhlHDCpIQRk/ KEGLCpoJjW5OPFNqC7gQ1XZR+th4+Ps+dnnNasHwX9HKNI+MRujEsmRAPJ583Vzwscfys+/0WTG eXpIsrL1zKvUXIFLd6Pt/JfbgXqQ4+7KJ X-Received: by 2002:a05:622a:1488:b0:403:cd14:8f with SMTP id t8-20020a05622a148800b00403cd14008fmr3326844qtx.57.1690307505558; Tue, 25 Jul 2023 10:51:45 -0700 (PDT) X-Received: by 2002:a05:622a:1488:b0:403:cd14:8f with SMTP id t8-20020a05622a148800b00403cd14008fmr3326816qtx.57.1690307505290; Tue, 25 Jul 2023 10:51:45 -0700 (PDT) Received: from fedora ([2600:1700:1ff0:d0e0::17]) by smtp.gmail.com with ESMTPSA id ff20-20020a05622a4d9400b00403f1a7be90sm4221230qtb.88.2023.07.25.10.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 10:51:44 -0700 (PDT) Date: Tue, 25 Jul 2023 12:51:42 -0500 From: Andrew Halaney To: Mrinmay Sarkar Cc: Krzysztof Kozlowski , agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org, quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, dmitry.baryshkov@linaro.org, Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Vinod Koul , Kishon Vijay Abraham I , 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: Re: [PATCH v2 2/6] dt-bindings: phy: qcom,qmp: Add sa8775p QMP PCIe PHY Message-ID: References: <1689311319-22054-1-git-send-email-quic_msarkar@quicinc.com> <1689311319-22054-3-git-send-email-quic_msarkar@quicinc.com> <132e9514-7eb9-8915-6130-5bf656c1aaac@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > --- > > > .../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