Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp231805rwj; Thu, 22 Dec 2022 02:02:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXv2Fv55lNQQoUpBleiGpkUn1Fw3vmdzUfo7fm42Yye5/EGxHFI96Zyzb9CDsp+uIvI7pUjJ X-Received: by 2002:a17:906:3f97:b0:83f:41a2:a68b with SMTP id b23-20020a1709063f9700b0083f41a2a68bmr3418343ejj.30.1671703348848; Thu, 22 Dec 2022 02:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671703348; cv=none; d=google.com; s=arc-20160816; b=DD0QLfx58q0rkk5DJxLuaDX3+RN06OCapHVDSB/K4hgL7k3A90imPK4Pf+cQwbUkqX 8RbD/ZIana0JZ2qMgLGLn+8P73OEC+cuBG6BWwlbP4BjycuhNX/iHKzi56ADiC7PMrwg TbGufoZrxdBBNdLT9uGya1YptUIZxP4DkY/FNzk8bFjwcCiV1YzZqSsoPg75NVWbUe7v RK17FwrDav+ljm+Mj4M1vEi/fEPl5QRhBX/E2GrzHwGZJCwm4vXDKC3179TsvqCRrmM+ OBYobAnL106lkX0VaIaq9v00u878RbLwjtnKbvQzENBYUNGdx5OkcVXpC0460JYDmiTU b8wg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xe2-20020a170907318200b007c14affc530si148648ejb.315.2022.12.22.02.02.13; Thu, 22 Dec 2022 02:02:28 -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 + 67 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 ); 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 ; Thu, 22 Dec 2022 01:24:31 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id p36so1815037lfa.12 for ; 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 To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Marijn Suijten , Dmitry Baryshkov , Konrad Dybcio 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Cc: Marijn Suijten Cc: Dmitry Baryshkov Cc: Konrad Dybcio --- .../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