Message ID | 20221222092355.74586-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp223131wrn; Thu, 22 Dec 2022 01:25:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjjncwsFov4+H1i2+vlexo/5oMpGIuJr5Zv7df0k/BP3/QHROPurGZR9b7tfUlQmpSrdB6 X-Received: by 2002:a17:906:ca10:b0:7c0:a4ae:c542 with SMTP id jt16-20020a170906ca1000b007c0a4aec542mr3719242ejb.39.1671701129279; Thu, 22 Dec 2022 01:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671701129; cv=none; d=google.com; s=arc-20160816; b=dV1YTtMbPtWdCWwa2Od8F2PrZAKVD+e+LjcFV6DkEBQrVWbgEUpRX6ev2sGnGHgiIt GpUTccLwTj9cV1rYE/Lom7kKmuQMQBsDQo2EnZYmt/EsEJQyMj97QbYCU40XSdTNndMA O+qlAthlQ3DjAWQkTrmk8gZzRBg16vmjmctIDCtteza6jlApPV69b8JjPNwWPzW9rRWG sesVnurDzaShYloRiHNbVOePoQIsGdI8eL04kNmkLXehqAjQMZlkyok3Iz7SE8WwWpie ZUHEChICrAeO9kJ1RBBobs+g1gDkkwXL4xwwlvlFsS/YIvIH0/fO1DzeHJex9IvKS/R2 wNPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=68vQHDAyfLGGKwktfUmbOivt9MYU5nkUryP23gTK9rc=; b=d0lwq5uzChhGnGZ37vVcRJr0zLoAhf7tJ8jCmMW/fj0Rbxo+YDHTfZ4ojXlxn5imUE 6w4dt04r9Hpc/5ai4c++X/CB2g3fXDf3V2LZvypHmStFOpmpABOCMxpSbUjf+b7Zvkz5 rYT5xizmF+PzurLQNduqjoq/w4ZdEW9JpxBviFq1pYwGkldJMtLiyuhlp9AMxi2pDv1m DcrrVTqVY2yDaeM+ZWTkkMW7PypOFrnkzpSDgXO6aId6c7v+y2LK0ccd8oMxd9oyZC3c 6WA8bzEk71yQXVF4XMkhIWVrTMGtajSCYxZaxavPBLY2wAJMJ7SgmeG20J5YPhExe041 HDoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kip7m14X; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf23-20020a1709077f1700b0078db5170767si108986ejc.18.2022.12.22.01.25.03; Thu, 22 Dec 2022 01:25:29 -0800 (PST) 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=@linaro.org header.s=google header.b=Kip7m14X; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235202AbiLVJYe (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Thu, 22 Dec 2022 04:24:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235191AbiLVJYc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 22 Dec 2022 04:24:32 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37056E0BE for <linux-kernel@vger.kernel.org>; Thu, 22 Dec 2022 01:24:31 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id p36so1815037lfa.12 for <linux-kernel@vger.kernel.org>; Thu, 22 Dec 2022 01:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=68vQHDAyfLGGKwktfUmbOivt9MYU5nkUryP23gTK9rc=; b=Kip7m14Xx/tarhFOdy0J023i0JBfWs63+4+z8MBWphGmFJuVzcG2VvN8GOJda5dMTq 7PlAP4gg67X7bhNNylVt/nUYE2COvdoNgidOoxIMVVZCljcEVk2F0f7qTMSNZGSl+1WI XeUtodjxd9xDRpqogO5b6pvoTGQbw8UZD1osYWJ7bjCPl6gg5YdaDOIJ2WfNH0UoMXCb agWbFKevRVcIQ4SlXRFXWjacmIgLqmjluQ1i4lVWLVe5bvu3vwAT53AlvQ1aLIkcaubX qZ7Mlmni4RDfYhwGUBPZ33lOVMQEvSkCXs3gauwe7QtJTI27jH1kPe6f3gSoWaEDWDXL C0zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=68vQHDAyfLGGKwktfUmbOivt9MYU5nkUryP23gTK9rc=; b=pA5hsgc9a7HxBgjFErGHyOeXQ3tmTzYNors7Lw7xRfDpfHPlDnIqPSPkaKGuKY60bL luoDbk8jPjgvru1pR1b+kCdAmA8i8M3gccBh9KYOKZpJ7kytfUxsmbgsNY94rBBKIgm6 GIccLv3e52Qx14EJsGoZ1KsucINgqtm7nymcJ4n2ozVSva9h0rBRsSL8s+CVfI9UOE9F oZ6I12t9YBqA8sTPCJihzb2RzfVkjbdrkNrcqp43XeryaVcwaMJqolMiv6GNGYR1zUHy Xpx6KA0FHeiGlQSXVP19X1B+D/mDLV/DOT3CmGwIySh03mNMJcfndGW3rDzkc7jp0Wf6 oarg== X-Gm-Message-State: AFqh2kpIJOMu+hDa9MAFx2AQkkpnvRzNY8cCbUaATs1Ql0sr9tFbATPi gMVP6C7apVrNCX0xkKF8JKH7zg== X-Received: by 2002:ac2:4bcc:0:b0:4b6:fae9:c9b7 with SMTP id o12-20020ac24bcc000000b004b6fae9c9b7mr1425029lfq.7.1671701069434; Thu, 22 Dec 2022 01:24:29 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id i40-20020a0565123e2800b004b0b131453csm10724lfv.49.2022.12.22.01.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Dec 2022 01:24:28 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Joerg Roedel <joro@8bytes.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Marijn Suijten <marijn.suijten@somainline.org>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Konrad Dybcio <konrad.dybcio@linaro.org> Subject: [PATCH] dt-bindings: arm-smmu: disallow clocks when not used Date: Thu, 22 Dec 2022 10:23:55 +0100 Message-Id: <20221222092355.74586-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752905683753154041?= X-GMAIL-MSGID: =?utf-8?q?1752905683753154041?= |
Series |
dt-bindings: arm-smmu: disallow clocks when not used
|
|
Commit Message
Krzysztof Kozlowski
Dec. 22, 2022, 9:23 a.m. UTC
Disallow clocks for variants other than:
1. SMMUs with platform-specific compatibles which list explicit clocks
and clock-names,
2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a
variable clocks on different implementations.
This requires such variants with platform-specific compatible, to
explicitly list the clocks or omit them, making the binding more
constraint.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
---
.../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
Comments
Is this missing a cc to linux-arm-msm? On 2022-12-22 10:23:55, Krzysztof Kozlowski wrote: > Disallow clocks for variants other than: > 1. SMMUs with platform-specific compatibles which list explicit clocks > and clock-names, > 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > variable clocks on different implementations. > > This requires such variants with platform-specific compatible, to > explicitly list the clocks or omit them, making the binding more > constraint. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> But... > --- > > Cc: Marijn Suijten <marijn.suijten@somainline.org> > Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > Cc: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > .../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > index 895ec8418465..0d88395e43ad 100644 > --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > @@ -367,6 +367,34 @@ allOf: > - description: interface clock required to access smmu's registers > through the TCU's programming interface. > > + # Disallow clocks for all other platforms with specific compatibles > + - if: > + properties: > + compatible: > + contains: > + enum: > + - cavium,smmu-v2 > + - marvell,ap806-smmu-500 > + - nvidia,smmu-500 > + - qcom,qcm2290-smmu-500 > + - qcom,qdu1000-smmu-500 > + - qcom,sc7180-smmu-500 Hmm, sc7280 has two SMMUs. The one for Adreno has clocks and a PD, the one for APPS has neither. Same story on sm8[12]50. Aren't those going to trip up the other `if` that requires clocks in both scenarios? Note that the Adreno SMMUs have (or will get when we/Konrad submit support for it) the "qcom,adreno-smmu" compatible to distinguish them. - Marijn > + - qcom,sc8180x-smmu-500 > + - qcom,sc8280xp-smmu-500 > + - qcom,sdm670-smmu-500 > + - qcom,sdm845-smmu-500 > + - qcom,sdx55-smmu-500 > + - qcom,sdx65-smmu-500 > + - qcom,sm6115-smmu-500 > + - qcom,sm6350-smmu-500 > + - qcom,sm6375-smmu-500 > + - qcom,sm8350-smmu-500 > + - qcom,sm8450-smmu-500 > + then: > + properties: > + clock-names: false > + clocks: false > + > - if: > properties: > compatible: > -- > 2.34.1 >
On 22/12/2022 11:16, Marijn Suijten wrote: > Is this missing a cc to linux-arm-msm? No, it is not (or maybe but then fix MAINTAINERS). The policy is to use get_maintainers.pl to CC people. > > On 2022-12-22 10:23:55, Krzysztof Kozlowski wrote: >> Disallow clocks for variants other than: >> 1. SMMUs with platform-specific compatibles which list explicit clocks >> and clock-names, >> 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a >> variable clocks on different implementations. >> >> This requires such variants with platform-specific compatible, to >> explicitly list the clocks or omit them, making the binding more >> constraint. >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> > > But... > >> --- >> >> Cc: Marijn Suijten <marijn.suijten@somainline.org> >> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >> Cc: Konrad Dybcio <konrad.dybcio@linaro.org> >> --- >> .../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++ >> 1 file changed, 28 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >> index 895ec8418465..0d88395e43ad 100644 >> --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >> @@ -367,6 +367,34 @@ allOf: >> - description: interface clock required to access smmu's registers >> through the TCU's programming interface. >> >> + # Disallow clocks for all other platforms with specific compatibles >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - cavium,smmu-v2 >> + - marvell,ap806-smmu-500 >> + - nvidia,smmu-500 >> + - qcom,qcm2290-smmu-500 >> + - qcom,qdu1000-smmu-500 >> + - qcom,sc7180-smmu-500 > > Hmm, sc7280 has two SMMUs. The one for Adreno has clocks and a PD, the sc7280 is not here, so what is the mistake you see? > one for APPS has neither. Same story on sm8[12]50. Aren't those going > to trip up the other `if` that requires clocks in both scenarios? They are not here either, so what is the error? > > Note that the Adreno SMMUs have (or will get when we/Konrad submit > support for it) the "qcom,adreno-smmu" compatible to distinguish them. > > - Marijn > Best regards, Krzysztof
On 2022-12-22 11:36:16, Krzysztof Kozlowski wrote: > On 22/12/2022 11:16, Marijn Suijten wrote: > > Is this missing a cc to linux-arm-msm? > > No, it is not (or maybe but then fix MAINTAINERS). The policy is to use > get_maintainers.pl to CC people. Yes, that is the question: is it in MANTAINERS and if not, why not? > > On 2022-12-22 10:23:55, Krzysztof Kozlowski wrote: > >> Disallow clocks for variants other than: > >> 1. SMMUs with platform-specific compatibles which list explicit clocks > >> and clock-names, > >> 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > >> variable clocks on different implementations. > >> > >> This requires such variants with platform-specific compatible, to > >> explicitly list the clocks or omit them, making the binding more > >> constraint. > >> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > > > Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> > > > > But... > > > >> --- > >> > >> Cc: Marijn Suijten <marijn.suijten@somainline.org> > >> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > >> Cc: Konrad Dybcio <konrad.dybcio@linaro.org> > >> --- > >> .../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++ > >> 1 file changed, 28 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > >> index 895ec8418465..0d88395e43ad 100644 > >> --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > >> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > >> @@ -367,6 +367,34 @@ allOf: > >> - description: interface clock required to access smmu's registers > >> through the TCU's programming interface. > >> > >> + # Disallow clocks for all other platforms with specific compatibles > >> + - if: > >> + properties: > >> + compatible: > >> + contains: > >> + enum: > >> + - cavium,smmu-v2 > >> + - marvell,ap806-smmu-500 > >> + - nvidia,smmu-500 > >> + - qcom,qcm2290-smmu-500 > >> + - qcom,qdu1000-smmu-500 > >> + - qcom,sc7180-smmu-500 > > > > Hmm, sc7280 has two SMMUs. The one for Adreno has clocks and a PD, the > > sc7280 is not here, so what is the mistake you see? sc7280 has two IOMMU nodes. One with clocks (should not be in this list), the other doesn't have clocks (should be in this list). How do you want to address that? > > one for APPS has neither. Same story on sm8[12]50. Aren't those going > > to trip up the other `if` that requires clocks in both scenarios? > > They are not here either, so what is the error? Ditto. > > Note that the Adreno SMMUs have (or will get when we/Konrad submit > > support for it) the "qcom,adreno-smmu" compatible to distinguish them. - Marijn
On 22/12/2022 14:33, Marijn Suijten wrote: > On 2022-12-22 11:36:16, Krzysztof Kozlowski wrote: >> On 22/12/2022 11:16, Marijn Suijten wrote: >>> Is this missing a cc to linux-arm-msm? >> >> No, it is not (or maybe but then fix MAINTAINERS). The policy is to use >> get_maintainers.pl to CC people. > > Yes, that is the question: is it in MANTAINERS and if not, why not? You can check by yourself if it is there. Why not? I don't know. Could be that no one ever added it there. > >>> On 2022-12-22 10:23:55, Krzysztof Kozlowski wrote: >>>> Disallow clocks for variants other than: >>>> 1. SMMUs with platform-specific compatibles which list explicit clocks >>>> and clock-names, >>>> 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a >>>> variable clocks on different implementations. >>>> >>>> This requires such variants with platform-specific compatible, to >>>> explicitly list the clocks or omit them, making the binding more >>>> constraint. >>>> >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>> >>> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> >>> >>> But... >>> >>>> --- >>>> >>>> Cc: Marijn Suijten <marijn.suijten@somainline.org> >>>> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >>>> Cc: Konrad Dybcio <konrad.dybcio@linaro.org> >>>> --- >>>> .../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++ >>>> 1 file changed, 28 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>>> index 895ec8418465..0d88395e43ad 100644 >>>> --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>>> +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml >>>> @@ -367,6 +367,34 @@ allOf: >>>> - description: interface clock required to access smmu's registers >>>> through the TCU's programming interface. >>>> >>>> + # Disallow clocks for all other platforms with specific compatibles >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + enum: >>>> + - cavium,smmu-v2 >>>> + - marvell,ap806-smmu-500 >>>> + - nvidia,smmu-500 >>>> + - qcom,qcm2290-smmu-500 >>>> + - qcom,qdu1000-smmu-500 >>>> + - qcom,sc7180-smmu-500 >>> >>> Hmm, sc7280 has two SMMUs. The one for Adreno has clocks and a PD, the >> >> sc7280 is not here, so what is the mistake you see? > > sc7280 has two IOMMU nodes. One with clocks (should not be in this > list), the other doesn't have clocks (should be in this list). > > How do you want to address that? No, because it is the same compatible. Best regards, Krzysztof
On 2022-12-22 15:03:20, Krzysztof Kozlowski wrote: > On 22/12/2022 14:33, Marijn Suijten wrote: > > On 2022-12-22 11:36:16, Krzysztof Kozlowski wrote: > >> On 22/12/2022 11:16, Marijn Suijten wrote: > >>> Is this missing a cc to linux-arm-msm? > >> > >> No, it is not (or maybe but then fix MAINTAINERS). The policy is to use > >> get_maintainers.pl to CC people. > > > > Yes, that is the question: is it in MANTAINERS and if not, why not? > > You can check by yourself if it is there. It's not there. > Why not? I don't know. Could be that no one ever added it there. Let's leave it like that then :) <snip> > > sc7280 has two IOMMU nodes. One with clocks (should not be in this > > list), the other doesn't have clocks (should be in this list). > > > > How do you want to address that? > > No, because it is the same compatible. That is the point. We can tell them apart based on the presence of "qcom,adreno-smmu" though. But if it is not spitting out any errors right now, let's not bother. - Marijn
On Thu, 22 Dec 2022 10:23:55 +0100, Krzysztof Kozlowski wrote: > Disallow clocks for variants other than: > 1. SMMUs with platform-specific compatibles which list explicit clocks > and clock-names, > 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > variable clocks on different implementations. > > This requires such variants with platform-specific compatible, to > explicitly list the clocks or omit them, making the binding more > constraint. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > Cc: Marijn Suijten <marijn.suijten@somainline.org> > Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > Cc: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > .../devicetree/bindings/iommu/arm,smmu.yaml | 28 +++++++++++++++++++ > 1 file changed, 28 insertions(+) > Acked-by: Rob Herring <robh@kernel.org>
On 22/12/2022 10:23, Krzysztof Kozlowski wrote: > Disallow clocks for variants other than: > 1. SMMUs with platform-specific compatibles which list explicit clocks > and clock-names, > 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > variable clocks on different implementations. > > This requires such variants with platform-specific compatible, to > explicitly list the clocks or omit them, making the binding more > constraint. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- Will, Robin, Joerg, Anyone willing to pick up this patch? Best regards, Krzysztof
On Thu, Jan 12, 2023 at 02:53:20PM +0100, Krzysztof Kozlowski wrote: > On 22/12/2022 10:23, Krzysztof Kozlowski wrote: > > Disallow clocks for variants other than: > > 1. SMMUs with platform-specific compatibles which list explicit clocks > > and clock-names, > > 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > > variable clocks on different implementations. > > > > This requires such variants with platform-specific compatible, to > > explicitly list the clocks or omit them, making the binding more > > constraint. > > > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > > > --- > > Will, Robin, Joerg, > > Anyone willing to pick up this patch? Sure, I'll do an SMMU bindings pass shortly for 6.3 Will
On Thu, 22 Dec 2022 10:23:55 +0100, Krzysztof Kozlowski wrote: > Disallow clocks for variants other than: > 1. SMMUs with platform-specific compatibles which list explicit clocks > and clock-names, > 2. SMMUs using only generic compatibles, e.g. arm,mmu-500, which have a > variable clocks on different implementations. > > This requires such variants with platform-specific compatible, to > explicitly list the clocks or omit them, making the binding more > constraint. > > [...] Applied to will (for-joerg/arm-smmu/bindings), thanks! [1/1] dt-bindings: arm-smmu: disallow clocks when not used https://git.kernel.org/will/c/3a3f20bae0ce Cheers,
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index 895ec8418465..0d88395e43ad 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml @@ -367,6 +367,34 @@ allOf: - description: interface clock required to access smmu's registers through the TCU's programming interface. + # Disallow clocks for all other platforms with specific compatibles + - if: + properties: + compatible: + contains: + enum: + - cavium,smmu-v2 + - marvell,ap806-smmu-500 + - nvidia,smmu-500 + - qcom,qcm2290-smmu-500 + - qcom,qdu1000-smmu-500 + - qcom,sc7180-smmu-500 + - qcom,sc8180x-smmu-500 + - qcom,sc8280xp-smmu-500 + - qcom,sdm670-smmu-500 + - qcom,sdm845-smmu-500 + - qcom,sdx55-smmu-500 + - qcom,sdx65-smmu-500 + - qcom,sm6115-smmu-500 + - qcom,sm6350-smmu-500 + - qcom,sm6375-smmu-500 + - qcom,sm8350-smmu-500 + - qcom,sm8450-smmu-500 + then: + properties: + clock-names: false + clocks: false + - if: properties: compatible: