From patchwork Thu Sep 19 21:24:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2913691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D36F0BFF05 for ; Thu, 19 Sep 2013 21:25:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E441B20399 for ; Thu, 19 Sep 2013 21:25:18 +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 846BD20367 for ; Thu, 19 Sep 2013 21:25:17 +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 1VMlil-00030d-36; Thu, 19 Sep 2013 21:25:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VMlii-0000eI-PI; Thu, 19 Sep 2013 21:25:04 +0000 Received: from mail-ob0-f170.google.com ([209.85.214.170]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VMlif-0000dq-RG for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2013 21:25:02 +0000 Received: by mail-ob0-f170.google.com with SMTP id va2so10921651obc.1 for ; Thu, 19 Sep 2013 14:24:37 -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=+ml4hS6TUCtGGrLOpLY5Hg5rTgOpoyBOR+L8xNYHyxo=; b=gFw1vvrVIuOisBQ0WcYwG7Y5ZnIwUV4SionHOT8Ml4lJjW/ExLTZayYRxEV0sn20CU 32vGotBvZ8tjHrYlM0qRJKUMo9LzI4nQtEZPKwgePSyfrxUkS2z9CSF6MIRcSlmQjYGY BCTmx9TxjIhlRB+T7KjEh89czQMr3H+FVCkWyrzBkfmIRuYUZW4p5C8jG1cGIT8GhOf2 ciQi+9dBD8LzHbt9Zr7w+0KsBQvAQF0jUt5MDTfCQx1IKjTZXaodJqAX8T7P51MjeCud hsHDX+zYLa+x851G27pDP23F/n9EX7WGiclqaN/EKsGICrl+wzmFl3wuA9u64SMlpMk4 QEgA== X-Received: by 10.182.66.164 with SMTP id g4mr2532492obt.47.1379625877563; Thu, 19 Sep 2013 14:24:37 -0700 (PDT) Received: from rob-laptop.calxeda.com ([173.226.190.126]) by mx.google.com with ESMTPSA id d8sm5165873oeu.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 14:24:36 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4] dt: update PSCI binding documentation for v0.2 Date: Thu, 19 Sep 2013 16:24:28 -0500 Message-Id: <1379625868-5395-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-20130919_172502_024500_478FE661 X-CRM114-Status: GOOD ( 12.94 ) X-Spam-Score: 1.1 (+) Cc: Mark Rutland , 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=-1.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no 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 --- v4: Reword last paragraph concerning calling convention used for functions without -32 or -64 suffix. v3: This version implements Mark's suggested binding with -32 and -64 suffixes. Documentation/devicetree/bindings/arm/psci.txt | 64 +++++++++++++++++++------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt index 433afe9..8675ec2 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,55 @@ 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 functions have have separate IDs for 32-bit and 64-bit calling +conventions. These separate function IDs are described with function names with +"-64" and "-32" suffixes (e.g. cpu_on-64). Where a function name does not have +a suffix, the ID may be used with either calling convention depending on the +CPU state -- AArch32 callers should use the 32-bit calling convention, and +AArch64 callers should use the 64-bit calling convention. 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>; }; +