From patchwork Fri Oct 5 16:58:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 148262 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp692053lji; Fri, 5 Oct 2018 10:01:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV63dJKNQ2sT/7URuPPtcIxR2cfAFRqUjAGpDHsD3dqD4Swn7EFXTN1nqNLc7DPxX0rbr5Wno X-Received: by 2002:a63:8e43:: with SMTP id k64-v6mr10738712pge.75.1538758908698; Fri, 05 Oct 2018 10:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538758908; cv=none; d=google.com; s=arc-20160816; b=Doyh43yUAzuomxgSRXOkfJM1Rm2fRJQRnC+Xppys3zEJ/YoN7wOvjmq76jeB/uag1S b/i3kQUMrHWAPg/dKabjDUrikrJBfDXuP4ObHROmSJJZqbD45uW45GOmBY0Ihf25gHuX GfrTRrdMpY7l+IVwHP2Dj1ziAO55ZT/LsuKaQPlY8mWZxHyY2oFOsPx10gpNyKAKXVMB WfTQsIRtPgIvLKlBLwhbnP/p1qYGvqqMKP0Nab3LYQlGURDiyhJ+mp7zCkaJMD8UoK6r hARQl7rY2zA7VSelymfx0EQlPnnTx6zlmFcaZQ/bIeTcDTkakltMCavJZZzXZ3OOhscF G61Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=PPgzQVjusYgNqChRktE3KOIpcteqC2FE8uYi4ggIVGg=; b=yCduzfNgquJ3OhNLdRci+8dOPJ+4emm81fUYty11b2Ypcul70DQBMOhLxmv4J9iI8w qbjzHcb6o1BRM2UKR1lhEeOLR7VkXoj5PfeGC7nWx49ZG3jNlhOYP+2q6MweyIFyhK8j l1du475qMmzFK5L/iQP2A7e7KQ45MOP323Fqk4QUw8N+g32pXjq5XJ06WySsZDGMNjqy 7fnOuGhipHSKSldseqs7ST2cWbC48rzVU76Pkb3U4Cl14WVuIj7lMdeAU4DFRTp12/TZ 8c5ojsj6Ctgdx2QYCHUUyRaO+FiN3Q0309wHm2gpuMvbCxhpkM5mCRsSUz1tBe9Ty58W H9Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24-v6si8887417pls.211.2018.10.05.10.01.47; Fri, 05 Oct 2018 10:01:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729615AbeJFABU (ORCPT + 32 others); Fri, 5 Oct 2018 20:01:20 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41316 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729189AbeJEX6o (ORCPT ); Fri, 5 Oct 2018 19:58:44 -0400 Received: by mail-ot1-f65.google.com with SMTP id e18-v6so13356691oti.8; Fri, 05 Oct 2018 09:59:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PPgzQVjusYgNqChRktE3KOIpcteqC2FE8uYi4ggIVGg=; b=Inbw1RD1tKoTvxe0H0mgW9lbv1BrscJ0IacNTwSoxABAegM86T2DJbaBRqxo0QGcWF GnK8EyQho/6v1crGjHQjxF7pJ0zyHB5/B8n6ZaZfiurRz5phjn8HEAOfgB0PLSiWNyh4 J/EJs3Xx4y1Ha5agpxejSwq6LPI6MVlIeRpBvo38ycKP1DUAHGJbVbYqneX90EdjMJoX 0GFfT+PlYhKjbNYKDKkDi2u2gT4jZB6fPJyAYpC+TtgxiV3XWu+c1aGLOzrM3Aq0Rh68 C2dfs3z+XuybL1gkJ4AzU0MpXnxYUCLEWygbhb38lWUBzUrleiNb7uxHCUYpWBGIeYcC PBSQ== X-Gm-Message-State: ABuFfohlSlsCnD35gVwqQbfYwgfalgqDYeaQeMcrH75N507zUH9V96F7 Fdt85LfZBU4l8SUb3omESsTdeXrbfA== X-Received: by 2002:a9d:1723:: with SMTP id i35mr7447888ota.223.1538758749111; Fri, 05 Oct 2018 09:59:09 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u63-v6sm2904328ota.75.2018.10.05.09.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 09:59:08 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Cc: Grant Likely , Kumar Gala , Frank Rowand , Mark Rutland , Linus Walleij , Olof Johansson , Arnd Bergmann , Mark Brown , Tom Rini , Pantelis Antoniou , Geert Uytterhoeven , Jonathan Cameron , Bjorn Andersson , Will Deacon Subject: [PATCH 13/36] dt-bindings: arm: Convert PMU binding to json-schema Date: Fri, 5 Oct 2018 11:58:25 -0500 Message-Id: <20181005165848.3474-14-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181005165848.3474-1-robh@kernel.org> References: <20181005165848.3474-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert ARM PMU binding to DT schema format using json-schema. Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/arm/pmu.txt | 70 -------------- .../devicetree/bindings/arm/pmu.yaml | 96 +++++++++++++++++++ 2 files changed, 96 insertions(+), 70 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/pmu.txt create mode 100644 Documentation/devicetree/bindings/arm/pmu.yaml -- 2.17.1 diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt deleted file mode 100644 index 13611a8199bb..000000000000 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ /dev/null @@ -1,70 +0,0 @@ -* ARM Performance Monitor Units - -ARM cores often have a PMU for counting cpu and cache events like cache misses -and hits. The interface to the PMU is part of the ARM ARM. The ARM PMU -representation in the device tree should be done as under:- - -Required properties: - -- compatible : should be one of - "apm,potenza-pmu" - "arm,armv8-pmuv3" - "arm,cortex-a73-pmu" - "arm,cortex-a72-pmu" - "arm,cortex-a57-pmu" - "arm,cortex-a53-pmu" - "arm,cortex-a35-pmu" - "arm,cortex-a17-pmu" - "arm,cortex-a15-pmu" - "arm,cortex-a12-pmu" - "arm,cortex-a9-pmu" - "arm,cortex-a8-pmu" - "arm,cortex-a7-pmu" - "arm,cortex-a5-pmu" - "arm,arm11mpcore-pmu" - "arm,arm1176-pmu" - "arm,arm1136-pmu" - "brcm,vulcan-pmu" - "cavium,thunder-pmu" - "qcom,scorpion-pmu" - "qcom,scorpion-mp-pmu" - "qcom,krait-pmu" -- interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu - interrupt (PPI) then 1 interrupt should be specified. - -Optional properties: - -- interrupt-affinity : When using SPIs, specifies a list of phandles to CPU - nodes corresponding directly to the affinity of - the SPIs listed in the interrupts property. - - When using a PPI, specifies a list of phandles to CPU - nodes corresponding to the set of CPUs which have - a PMU of this type signalling the PPI listed in the - interrupts property, unless this is already specified - by the PPI interrupt specifier itself (in which case - the interrupt-affinity property shouldn't be present). - - This property should be present when there is more than - a single SPI. - - -- qcom,no-pc-write : Indicates that this PMU doesn't support the 0xc and 0xd - events. - -- secure-reg-access : Indicates that the ARMv7 Secure Debug Enable Register - (SDER) is accessible. This will cause the driver to do - any setup required that is only possible in ARMv7 secure - state. If not present the ARMv7 SDER will not be touched, - which means the PMU may fail to operate unless external - code (bootloader or security monitor) has performed the - appropriate initialisation. Note that this property is - not valid for non-ARMv7 CPUs or ARMv7 CPUs booting Linux - in Non-secure state. - -Example: - -pmu { - compatible = "arm,cortex-a9-pmu"; - interrupts = <100 101>; -}; diff --git a/Documentation/devicetree/bindings/arm/pmu.yaml b/Documentation/devicetree/bindings/arm/pmu.yaml new file mode 100644 index 000000000000..0dbb9e0566af --- /dev/null +++ b/Documentation/devicetree/bindings/arm/pmu.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: None +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/arm/pmu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM Performance Monitor Units + +maintainers: + - Mark Rutland + - Will Deacon +description: |+ + ARM cores often have a PMU for counting cpu and cache events like cache misses + and hits. The interface to the PMU is part of the ARM ARM. The ARM PMU + representation in the device tree should be done as under:- + +properties: + compatible: + items: + - enum: + - apm,potenza-pmu + - arm,armv8-pmuv3 + - arm,cortex-a73-pmu + - arm,cortex-a72-pmu + - arm,cortex-a57-pmu + - arm,cortex-a53-pmu + - arm,cortex-a35-pmu + - arm,cortex-a17-pmu + - arm,cortex-a15-pmu + - arm,cortex-a12-pmu + - arm,cortex-a9-pmu + - arm,cortex-a8-pmu + - arm,cortex-a7-pmu + - arm,cortex-a5-pmu + - arm,arm11mpcore-pmu + - arm,arm1176-pmu + - arm,arm1136-pmu + - brcm,vulcan-pmu + - cavium,thunder-pmu + - qcom,scorpion-pmu + - qcom,scorpion-mp-pmu + - qcom,krait-pmu + interrupts: + oneOf: + - maxItems: 1 + - minItems: 2 + maxItems: 8 + description: 1 interrupt per core. + + interrupts-extended: + $ref: '#/properties/interrupts' + + interrupt-affinity: + description: + When using SPIs, specifies a list of phandles to CPU + nodes corresponding directly to the affinity of + the SPIs listed in the interrupts property. + + When using a PPI, specifies a list of phandles to CPU + nodes corresponding to the set of CPUs which have + a PMU of this type signalling the PPI listed in the + interrupts property, unless this is already specified + by the PPI interrupt specifier itself (in which case + the interrupt-affinity property shouldn't be present). + + This property should be present when there is more than + a single SPI. + + qcom,no-pc-write: + type: boolean + description: + Indicates that this PMU doesn't support the 0xc and 0xd events. + + secure-reg-access: + type: boolean + description: + Indicates that the ARMv7 Secure Debug Enable Register + (SDER) is accessible. This will cause the driver to do + any setup required that is only possible in ARMv7 secure + state. If not present the ARMv7 SDER will not be touched, + which means the PMU may fail to operate unless external + code (bootloader or security monitor) has performed the + appropriate initialisation. Note that this property is + not valid for non-ARMv7 CPUs or ARMv7 CPUs booting Linux + in Non-secure state. + +required: + - compatible + +oneOf: + - required: + - interrupts + - required: + - interrupts-extended + +...