From patchwork Tue Feb 11 14:17:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Pieralisi X-Patchwork-Id: 24461 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9057206FF for ; Tue, 11 Feb 2014 14:17:53 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id gq1sf31038987obb.8 for ; Tue, 11 Feb 2014 06:17:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=MB1+SKjHsv7jPyXohiwEGxsItKAS2EhRJZuKHTSJNec=; b=S4kCuVrzImPapE60LVZioEUd6Obq9YuOW0P+dAYj87Q1EVVgDhYd9eK2QOEq0t+ukp 3AKH+oD+9PKu0J9gi6H89j26MDj1s/Zu8KsTxGfxg9JB+sH+wuUrN0+HPvtoAyuMp5rr 3CC/DN4l8t5XtWOq72dDy9EIU29vQXfwOj39/ZTiiEQw6OS9dfGDiYeZsIpGBtyJgktu X6knheSrgkm2pXyAWuM76HSfh+CjiwtPy5P2CBC+CE1w8MUvsdqXc1favwoOE0WYAKnd rYmdLOOezA2o89UynMor3U7sMWSL7se3aKLQyE4BCkzRxQkkO2BNriGz8cXdwGnmwchk ZagA== X-Gm-Message-State: ALoCoQlu7/aS8G6SZapsRMEXAomTTplmr2rOCmQDtEKO9M2rJiSjDpKRoxRRDFeoKxbbf5JhL68l X-Received: by 10.50.18.49 with SMTP id t17mr8575226igd.3.1392128272790; Tue, 11 Feb 2014 06:17:52 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.134 with SMTP id i6ls2500534qge.2.gmail; Tue, 11 Feb 2014 06:17:52 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr1848314vco.25.1392128272626; Tue, 11 Feb 2014 06:17:52 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id rb4si2275191vec.60.2014.02.11.06.17.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 06:17:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so6004109vcb.3 for ; Tue, 11 Feb 2014 06:17:52 -0800 (PST) X-Received: by 10.58.37.232 with SMTP id b8mr1283987vek.27.1392128272481; Tue, 11 Feb 2014 06:17:52 -0800 (PST) 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.174.196 with SMTP id u4csp249638vcz; Tue, 11 Feb 2014 06:17:51 -0800 (PST) X-Received: by 10.68.213.41 with SMTP id np9mr44471169pbc.90.1392128241453; Tue, 11 Feb 2014 06:17:21 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf2si19114314pad.256.2014.02.11.06.17.20; Tue, 11 Feb 2014 06:17:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751824AbaBKORK (ORCPT + 11 others); Tue, 11 Feb 2014 09:17:10 -0500 Received: from service87.mimecast.com ([91.220.42.44]:33528 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbaBKORH (ORCPT ); Tue, 11 Feb 2014 09:17:07 -0500 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 11 Feb 2014 14:17:05 +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, 11 Feb 2014 14:17:04 +0000 From: Lorenzo Pieralisi To: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Lorenzo Pieralisi , Dave Martin , Mark Rutland , Sudeep Holla , Charles Garcia Tobin , Nicolas Pitre , Rob Herring , Peter De Schrijver , Grant Likely , Kumar Gala , Santosh Shilimkar , Russell King , Mark Hambleton , Hanjun Guo , Daniel Lezcano , Amit Kucheria , Vincent Guittot , Antti Miettinen , Stephen Boyd , Tomasz Figa , Kevin Hilman , Mike Turquette , Mark Brown Subject: [PATCH RFC v3 2/3] Documentation: arm: add cache DT bindings Date: Tue, 11 Feb 2014 14:17:52 +0000 Message-Id: <1392128273-8614-3-git-send-email-lorenzo.pieralisi@arm.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1392128273-8614-1-git-send-email-lorenzo.pieralisi@arm.com> References: <1392128273-8614-1-git-send-email-lorenzo.pieralisi@arm.com> X-OriginalArrivalTime: 11 Feb 2014 14:17:04.0162 (UTC) FILETIME=[F012E820:01CF2733] X-MC-Unique: 114021114170504301 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.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.220.172 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 | 165 ++++++++++ 1 file changed, 165 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cache.txt b/Documentation/devicetree/bindings/arm/cache.txt new file mode 100644 index 0000000..bd9f3d9 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/cache.txt @@ -0,0 +1,165 @@ +========================================== +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: phandle + Definition: A phandle and power domain specifier as defined by + bindings of power domain specified by the + phandle [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