From patchwork Tue Aug 27 00:50:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2849856 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 44FEE9F313 for ; Tue, 27 Aug 2013 00:51:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7623C20322 for ; Tue, 27 Aug 2013 00:51:13 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ED6942030E for ; Tue, 27 Aug 2013 00:51:11 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VE7Uy-0007BO-IC; Tue, 27 Aug 2013 00:51:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VE7Uw-0005F9-6s; Tue, 27 Aug 2013 00:51:06 +0000 Received: from mail-ob0-x232.google.com ([2607:f8b0:4003:c01::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VE7Ut-0005ED-LL for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2013 00:51:04 +0000 Received: by mail-ob0-f178.google.com with SMTP id ef5so3978178obb.23 for ; Mon, 26 Aug 2013 17:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=j6E2jLbac3XRX1wgjGGxodAxfNUNKo5mHeoEdOAmk8M=; b=a+4VBBOM5IT0TF5hj0Rgqs3vGRGUPMc/YYPvzHUjwdf6FY4UnDcwD6LQxnqvSRO58U 53MyFSXPlP4ktb91pMTKc62aHgc60SOgdSLh+Rn7xgxtq96cFoJtWbvE/+k2VeH3vDdb uszzCbopYV4b+ia+FF57gOUhYv1oSaPGlo3kk048xnsMiWtNlhlke40f949Ea8cEDagX lyZDj0g15paGvc5Iypn/3v187arqQQ8r7lnZSyc7dOhMSeJ4zNLW5GNtdwd5jVY4FL+f Lm2vTAAyZYNqp6bxiSZgb4sT+KKMKM3tVNXJ3v/0udpEW0f1zligqh8BqCFVhH84YDRW KrcA== X-Received: by 10.60.95.40 with SMTP id dh8mr14089253oeb.20.1377564642418; Mon, 26 Aug 2013 17:50:42 -0700 (PDT) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPSA id uz16sm17266009obc.5.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Aug 2013 17:50:41 -0700 (PDT) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3] dt: update PSCI binding documentation for v0.2 Date: Mon, 26 Aug 2013 19:50:33 -0500 Message-Id: <1377564633-31638-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.8.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130826_205103_834634_02811C2D X-CRM114-Status: GOOD ( 10.72 ) X-Spam-Score: -1.8 (-) Cc: Mark Rutland , devicetree@vger.kernel.org, Ian Campbell , Stefano Stabellini , Marc Zyngier , Rob Herring , Matt Sealey , Dave Martin , Christoffer Dall , Charles Garcia-Tobin 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Herring The PSCI spec from ARM has been updated to 0.2 version. Update the binding document to reflect the spec changes. For the binding, the major changes are the addition of psci_version, affinity_info, migrate_info_type, migrate_info_up_cpu, system_reset and system_off functions. The recommended function ID numbering has also changed. This update also defines 32 and 64 bit calling conventions. The calling convention is defined on a per function ID basis. Signed-off-by: Rob Herring Cc: Dave Martin Cc: Mark Rutland Cc: Ian Campbell Cc: Stefano Stabellini Cc: Marc Zyngier Cc: Christoffer Dall , Cc: Charles Garcia-Tobin Cc: Matt Sealey Cc: devicetree@vger.kernel.org --- v3: This version implements Mark's suggested binding with -32 and -64 suffixes. Documentation/devicetree/bindings/arm/psci.txt | 62 +++++++++++++++++++------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt index 433afe9..209bb04 100644 --- a/Documentation/devicetree/bindings/arm/psci.txt +++ b/Documentation/devicetree/bindings/arm/psci.txt @@ -1,16 +1,17 @@ * Power State Coordination Interface (PSCI) Firmware implementing the PSCI functions described in ARM document number -ARM DEN 0022A ("Power State Coordination Interface System Software on ARM +ARM DEN 0022B ("Power State Coordination Interface System Software on ARM processors") can be used by Linux to initiate various CPU-centric power operations. -Issue A of the specification describes functions for CPU suspend, hotplug -and migration of secure software. +Issue B of the specification describes functions for CPU suspend, hotplug, +migration of secure software, and system level reset and powerdown. Functions are invoked by trapping to the privilege level of the PSCI firmware (specified as part of the binding below) and passing arguments -in a manner similar to that specified by AAPCS: +as defined in ARM document "SMC Calling Convention" (ARM DEN 0028) in a manner +similar to that specified by AAPCS: r0 => 32-bit Function ID / return value {r1 - r3} => Parameters @@ -21,10 +22,10 @@ to #0. Main node required properties: - - compatible : Must be "arm,psci" + - compatible : Must contain "arm,psci-0.2" or "arm,psci" - - method : The method of calling the PSCI firmware. Permitted - values are: + - method : The method defines the calling convention for the PSCI + firmware. Permitted values are: "smc" : SMC #0, with the register assignments specified in this binding. @@ -32,24 +33,53 @@ Main node required properties: "hvc" : HVC #0, with the register assignments specified in this binding. + - psci_version : Function ID for PSCI_VERSION operation. Required for + "arm,psci-0.2" compatible version or later. + Main node optional properties: - - cpu_suspend : Function ID for CPU_SUSPEND operation + - cpu_suspend[-<32|64] : Function ID for CPU_SUSPEND operation + + - cpu_off : Function ID for CPU_OFF operation + + - cpu_on[-<32|64] : Function ID for CPU_ON operation + + - affinity_info[-<32|64] : Function ID for AFFINITY_INFO operation - - cpu_off : Function ID for CPU_OFF operation + - migrate[-<32|64] : Function ID for MIGRATE operation - - cpu_on : Function ID for CPU_ON operation + - migrate_info_type : Function ID for MIGRATE_INFO_TYPE operation - - migrate : Function ID for MIGRATE operation + - migrate_info_up_cpu[-<32|64] : Function ID for MIGRATE_INFO_UP_CPU operation + - system_reset : Function ID for SYSTEM_RESET operation + + - system_off : Function ID for SYSTEM_OFF operation + +Some function IDs support 32-bit and 64-bit calling conventions. If no size is +specified, then the 32-bit calling convention is used. Therefore, all function +IDs for 64-bit calling convention are required to have "-64" suffix. Use of the +"-32" suffix is recommended, but not required for backwards compatibility. Example: psci { - compatible = "arm,psci"; + compatible = "arm,psci-0.2"; method = "smc"; - cpu_suspend = <0x95c10000>; - cpu_off = <0x95c10001>; - cpu_on = <0x95c10002>; - migrate = <0x95c10003>; + psci_version = <0x84000000>; + cpu_suspend-32 = <0x84000001>; + cpu_suspend-64 = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on-32 = <0x84000003>; + cpu_on-64 = <0xc4000003>; + affinity_info-32 = <0x84000004>; + affinity_info-64 = <0xc4000004>; + migrate-32 = <0x84000005>; + migrate-64 = <0xc4000005>; + migrate_info_type = <0x84000006>; + migrate_info_up_cpu-32 = <0x84000007>; + migrate_info_up_cpu-64 = <0xc4000007>; + system_off = <0x84000008>; + system_reset = <0x84000009>; }; +