mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: arm-smmu: disallow clocks when not used
@ 2022-12-22  9:23 Krzysztof Kozlowski
  2022-12-22 10:16 ` Marijn Suijten
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-22  9:23 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, linux-arm-kernel, iommu, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski, Marijn Suijten, Dmitry Baryshkov, Konrad Dybcio

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(+)

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:
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-20  4:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22  9:23 [PATCH] dt-bindings: arm-smmu: disallow clocks when not used Krzysztof Kozlowski
2022-12-22 10:16 ` Marijn Suijten
2022-12-22 10:36   ` Krzysztof Kozlowski
2022-12-22 13:33     ` Marijn Suijten
2022-12-22 14:03       ` Krzysztof Kozlowski
2022-12-22 14:47         ` Marijn Suijten
2023-01-04  0:20 ` Rob Herring
2023-01-12 13:53 ` Krzysztof Kozlowski
2023-01-13  9:50   ` Will Deacon
2023-01-19 19:08 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®