From patchwork Tue Mar 18 11:28:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Pieralisi X-Patchwork-Id: 26484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 175AD203C3 for ; Tue, 18 Mar 2014 11:30:25 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf16662681pdb.5 for ; Tue, 18 Mar 2014 04:30:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=jYa8ErKykM0vm3ljN3LHzM+DY8KM0ZQqokxr9ZsCBKE=; b=bI2v+MhpOl90SKheIfb1P5Ea7ckygvLw04Xb3ptSvoZn2EcpPjGcHdAZnflAehof7m LVJd1KC2/R8fHXOZA72Cqqy8SNpqWll15d6ZySPUKZDoc7crPE4ctj7wwpnPpG2wjcBv lADgw5CB1FpuBOOCPWWiG8GIF2yDIAr8MWIiMG08YtSYA9rbIX1IySJSIUYVp791D0JE 0F7o+qdYNOwQKszYd5Nv0PM44p29CiR8oQKrt2UD1MS5xhbsDTcsaBrOGRbd3Ih3kCL+ tNGVy6n277oKwLXF9ohaBT3rJ0F6GXLeAu6c0U5PvIvVb7G8TQwhs3ZJbYCCjxz4iYuH +KdQ== X-Gm-Message-State: ALoCoQnXsKHywphtKTg/gV8QlKTHe/XJDiQYg5fYsO8bWU34oskJnSVmKGpEvV5BxR9us+wv/kkm X-Received: by 10.66.66.196 with SMTP id h4mr11093392pat.22.1395142225354; Tue, 18 Mar 2014 04:30:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.113 with SMTP id p104ls2107868qga.41.gmail; Tue, 18 Mar 2014 04:30:25 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr25053445vec.14.1395142225161; Tue, 18 Mar 2014 04:30:25 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id uq6si6372727vcb.0.2014.03.18.04.30.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Mar 2014 04:30:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so6670252veb.5 for ; Tue, 18 Mar 2014 04:30:25 -0700 (PDT) X-Received: by 10.52.250.236 with SMTP id zf12mr20952184vdc.9.1395142224857; Tue, 18 Mar 2014 04:30:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp197618vck; Tue, 18 Mar 2014 04:30:24 -0700 (PDT) X-Received: by 10.194.188.41 with SMTP id fx9mr1235849wjc.56.1395142223795; Tue, 18 Mar 2014 04:30:23 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id vd5si11936894wjc.77.2014.03.18.04.30.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Mar 2014 04:30:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPsCF-0001Lf-JN; Tue, 18 Mar 2014 11:28:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPsC5-00073n-B4; Tue, 18 Mar 2014 11:28:29 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPsBg-00070h-Pk for linux-arm-kernel@lists.infradead.org; Tue, 18 Mar 2014 11:28:06 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 18 Mar 2014 11:27:43 +0000 Received: from red-moon.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 18 Mar 2014 11:27:52 +0000 From: Lorenzo Pieralisi To: devicetree@vger.kernel.org Subject: [PATCH RFC v5 2/3] Documentation: arm: add cache DT bindings Date: Tue, 18 Mar 2014 11:28:51 +0000 Message-Id: <1395142132-20788-3-git-send-email-lorenzo.pieralisi@arm.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1395142132-20788-1-git-send-email-lorenzo.pieralisi@arm.com> References: <1395142132-20788-1-git-send-email-lorenzo.pieralisi@arm.com> X-OriginalArrivalTime: 18 Mar 2014 11:27:52.0964 (UTC) FILETIME=[19F24440:01CF429D] X-MC-Unique: 114031811274303301 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140318_072805_122704_17D0E805 X-CRM114-Status: GOOD ( 13.26 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [91.220.42.44 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mark Rutland , Mike Turquette , Tomasz Figa , Mark Hambleton , Lorenzo Pieralisi , Russell King , Sebastian Capella , Nicolas Pitre , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, Grant Likely , Dave Martin , Charles Garcia Tobin , Kevin Hilman , linux-pm@vger.kernel.org, Kumar Gala , Rob Herring , Vincent Guittot , Antti Miettinen , Peter De Schrijver , Stephen Boyd , Amit Kucheria , Mark Brown , Santosh Shilimkar , Hanjun Guo , Sudeep Holla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lorenzo.pieralisi@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On ARM systems the cache topology cannot be probed at runtime, in particular, it is impossible to probe which CPUs share a given cache level. Power management software requires this knowledge to implement optimized power down sequences, hence this patch adds a document that defines the DT cache bindings for ARM systems. The bindings supersede cache bindings in the ePAPR (PowerPC bindings), because caches geometry for architected caches is probeable on ARM systems. This patch also adds properties that are specific to ARM architected caches to the existing ones defined in the ePAPR v1.1, as bindings extensions. Signed-off-by: Lorenzo Pieralisi --- Documentation/devicetree/bindings/arm/cache.txt | 166 ++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/cache.txt diff --git a/Documentation/devicetree/bindings/arm/cache.txt b/Documentation/devicetree/bindings/arm/cache.txt new file mode 100644 index 0000000..b90fcc7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/cache.txt @@ -0,0 +1,166 @@ +========================================== +ARM processors cache binding description +========================================== + +Device tree bindings for cache nodes are already part of the ePAPR standard +v1.1 ([2]) for PowerPC platforms. This document defines the cache bindings +for caches on ARM processor systems. + +On ARM based systems most of the cache properties related to cache geometry +are probeable in HW (please refer to the processor TRMs in [1] for register +details), hence, unless otherwise stated, the properties defined in ePAPR for +internal, multi-level and shared caches ([2], 3.7.3, 3.8) are to be considered +superseded on ARM. + +On ARM, caches are either architected (directly controlled by the processor +through coprocessor instructions and tightly coupled with the processor +implementation) or unarchitected (controlled through a memory mapped +interface, implemented as a stand-alone IP external to the processor +implementation). + +This document provides the device tree bindings for ARM architected caches. + +- ARM architected cache node + + Description: must be a direct child of the cpu node. + A system can contain multiple architected cache nodes + per cpu node, linked through the next-level-cache phandle. + The next-level-cache property in the cpu node points to + the first level of architected cache for the CPU. + The next-level-cache links ordering must represent the + system cache hierarchy in the system, with the upper + cache level represented by a cache node with a missing + next-level-cache property. + + ARM architected cache node defines the following properties: + + - compatible + Usage: Required + Value type: + Definition: value shall be "arm,arch-cache". + + - power-domain + Usage: Optional + Value type: + Definition: A phandle and power domain specifier as defined by + bindings of power domain specified by [3]. + +Example(dual-cluster big.LITTLE system 32-bit) + + cpus { + #size-cells = <0>; + #address-cells = <1>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0x0>; + next-level-cache = <&L1_0>; + + L1_0: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_0>; + }; + + L2_0: l2-cache { + compatible = "arm,arch-cache"; + }; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0x1>; + next-level-cache = <&L1_1>; + + L1_1: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_0>; + }; + }; + + cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0x2>; + next-level-cache = <&L1_2>; + + L1_2: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_0>; + }; + }; + + cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0x3>; + next-level-cache = <&L1_3>; + + L1_3: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_0>; + }; + }; + + cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0x100>; + next-level-cache = <&L1_4>; + + L1_4: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_1>; + }; + + L2_1: l2-cache { + compatible = "arm,arch-cache"; + }; + }; + + cpu@101 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0x101>; + next-level-cache = <&L1_5>; + + L1_5: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_1>; + }; + }; + + cpu@102 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0x102>; + next-level-cache = <&L1_6>; + + L1_6: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_1>; + }; + }; + + cpu@103 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0x103>; + next-level-cache = <&L1_7>; + + L1_7: l1-cache { + compatible = "arm,arch-cache"; + next-level-cache = <&L2_1>; + }; + }; + }; + +[1] ARM Architecture Reference Manuals + http://infocenter.arm.com/help/index.jsp + +[2] ePAPR standard + https://www.power.org/documentation/epapr-version-1-1/ + +[3] Kernel documentation - power domain bindings + Documentation/devicetree/bindings/power/power_domain.txt