From patchwork Tue Nov 16 11:35:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12692756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B30EC433F5 for ; Tue, 16 Nov 2021 11:54:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E75ED611C3 for ; Tue, 16 Nov 2021 11:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E75ED611C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/SRDcHb4hbRGhmv+jpSdQivuK4Cs8yL8NglT/9Pu/qQ=; b=B/3Ox+FskGVeID XRsz5SlFhqJ0JnsqQO0yJW7NPcpt7WvwOqcL75UchAPfIljXV+iGl12GZqd4Uft4DdHm0UdBM1Oyy 8yEmnqglHZJBkdWJOXEOyGAD7ohf5eK4R8MiL/fwMQMBkNbhs83ScSeWayWEe0ld/zgOUJvHrxqV1 Ve3FfrflFFO7bsOUMWdOOcVYgPxwHsaggu0sFR5frtxLXoBSjpYyRVGFPnIZBn4t4Z5EBP1HE30PT lfIY2pPr1hfP3E4/ZhlBb1BzUCsGcTv8F/OwDYXxQWXCM2OvAjBCPt+B4n0zsNkgGr1jeUe7P0Kk1 nT0zjEXFc6Q7Kz33FM0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx1M-001Yzw-5O; Tue, 16 Nov 2021 11:53:04 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx0a-001YXI-4a for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:52:18 +0000 Received: by mail-wr1-x434.google.com with SMTP id c4so36922333wrd.9 for ; Tue, 16 Nov 2021 03:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uzf6TNNMxMPnOfXBHYbEbeDQIC8p4g1MVfRgzs5DDGs=; b=oKTFvd4w68oBu2CeuPt31sqqYIjNp9IAcQ7NcI6owvfCJYmX6gfLEBtIhuxK/esVRG BUShtrErXbhwl0N3F5y1vzNLm8bzBGb+qUKBYDEpXGohxzSNg3Z+1ik+QjFpZ2Ive+7Y kgILxurA4lyt2wId8zgdPW/qvoKrKIFLn5tRCbu//hAodJmEkp94+YympfrF6+0t4Xzw 2akgbzEimSjJ6cV8zz8hv69AsEEIHbwCEU4ppcPOb6d4aA8Z/zADjAaH4fLri2kIu3HX IPBhXSMMEuDHKaUD4FYqxNWA0TpqElOmD8f+W1waO92gvbgXhHBAIRcTvWuGJHetCN+3 hnAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uzf6TNNMxMPnOfXBHYbEbeDQIC8p4g1MVfRgzs5DDGs=; b=ZCDltymwdpFPkgnAKS5EhT5daTtm7m8HulVK+nk5sOFxtyZEp2a5w40rN4c+VXj/WV 31LhRlvo0m4GNjL7tQUG/t9XV6PO4GviGBS1NhcVQ1RtEHzK+zKiXM8il2MxTVbReiUa TSju7/VNo5uxr8IJs6a27iHUDj7pSAkbUBEPB39Y7ROVqYOTut/gHF3zQaAA3WSF5gi3 j3f1UfBjVKx06yvW3ChYpplPZ36B1u0ZgEcTkaJao4CQn6soICwMUFRtGwjL/lxci3pw yh4Zy+beNgohxXXsecm/IXubmX3tUxnruVJiyyjFJaFZk7sKTzGe9bmE49XuXEA/6qxJ +Qwg== X-Gm-Message-State: AOAM532Ls+MCjpPWShU0dPnmEYQOekh706QowgJ1N428LNzG7VLVho37 UwMPiFP9IW0/hGEqglnfJfnusw== X-Google-Smtp-Source: ABdhPJzIvcIdlgIhMAdlJboo29rVKBN0AAQX8dR01v87R/BtaSGuwYHNT8+GzAGQsOFuKHHGbQ/WSA== X-Received: by 2002:a5d:6d07:: with SMTP id e7mr8159934wrq.311.1637063534170; Tue, 16 Nov 2021 03:52:14 -0800 (PST) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id b6sm2232846wmq.45.2021.11.16.03.52.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 03:52:13 -0800 (PST) From: Jean-Philippe Brucker To: robh+dt@kernel.org Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, mark.rutland@arm.com, jkchen@linux.alibaba.com, leo.yan@linaro.org, uchida.jun@socionext.com, Jean-Philippe Brucker Subject: [PATCH 1/2] dt-bindings: Add Arm SMMUv3 PMCG binding Date: Tue, 16 Nov 2021 11:35:36 +0000 Message-Id: <20211116113536.69758-2-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211116113536.69758-1-jean-philippe@linaro.org> References: <20211116113536.69758-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_035216_234590_5CFEE933 X-CRM114-Status: GOOD ( 13.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add binding for the Arm SMMUv3 PMU. Each node represents a PMCG, and is placed as a sibling node of the SMMU. Although the PMCGs registers may be within the SMMU MMIO region, they are separate devices, and there can be multiple PMCG devices for each SMMU (for example one for the TCU and one for each TBU). Signed-off-by: Jean-Philippe Brucker --- .../bindings/iommu/arm,smmu-v3-pmcg.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml new file mode 100644 index 000000000000..a893e071fdb4 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3-pmcg.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/arm,smmu-v3-pmcg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Arm SMMUv3 Performance Monitor Counter Group + +maintainers: + - Will Deacon + - Robin Murphy + +description: |+ + An SMMUv3 may have several Performance Monitor Counter Group (PMCG). + They are standalone performance monitoring units that support both + architected and IMPLEMENTATION DEFINED event counters. + +properties: + $nodename: + pattern: "^pmu@[0-9a-f]*" + compatible: + oneOf: + - items: + - enum: + - hisilicon,smmu-v3-pmcg-hip08 + - const: arm,smmu-v3-pmcg + - const: arm,smmu-v3-pmcg + + reg: + description: | + Base addresses of the PMCG registers. Either a single address for Page 0 + or an additional address for Page 1, where some registers can be + relocated with SMMU_PMCG_CFGR.RELOC_CTRS. + minItems: 1 + maxItems: 2 + + interrupts: + maxItems: 1 + + msi-parent: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - |+ + #include + #include + + pmu@2b420000 { + compatible = "arm,smmu-v3-pmcg"; + reg = <0 0x2b420000 0 0x1000>, + <0 0x2b430000 0 0x1000>; + interrupts = ; + msi-parent = <&its 0xff0000>; + }; + + pmu@2b440000 { + compatible = "arm,smmu-v3-pmcg"; + reg = <0 0x2b440000 0 0x1000>, + <0 0x2b450000 0 0x1000>; + interrupts = ; + msi-parent = <&its 0xff0000>; + };