From patchwork Fri Aug 23 15:10:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 2848871 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 D068FBF546 for ; Fri, 23 Aug 2013 15:11:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7174020211 for ; Fri, 23 Aug 2013 15:11:02 +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 B80F9201EC for ; Fri, 23 Aug 2013 15:11:00 +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 1VCt0o-00011U-Kx; Fri, 23 Aug 2013 15:10:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VCt0m-0006Cr-E9; Fri, 23 Aug 2013 15:10:52 +0000 Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VCt0j-0006CI-BN for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2013 15:10:50 +0000 Received: by mail-ob0-f181.google.com with SMTP id dn14so802757obc.12 for ; Fri, 23 Aug 2013 08:10:27 -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=Ly0tw01eYR6Mv0/w3IJkzaYP4m0mJdztYasmLdisJl8=; b=HgecWZJG7ELppVnqIM2zIf542HxIaiHvEGkL7ZAHxWJbtNlb+l31eZcFpAmwn9buVj 3w+W1/1uxX5vcEKC6LyrPJcaRMTFJaPenPi2g2WKasYQiua6qT8g+5Alg8wl/wrldTLv uQP/iVh5EsFQRa+VWg5N3WKJ4ft1sdPUYwMS2SrxCvh3nTLBReu1ytXh/PqMTOhQ3tMC GVj0jBrrwPO1cHd+0mNsYFO6jux1GSzuvriY4qPUf6cFC1/IdxEG1nKEsWScJkkFl2L2 ZOFsOt6slGJgMYCbtFMm24TDGoanyUwmAHteaNrVE6v4fyBzR+EqpIOUIxtETwQTMUmq spmQ== X-Received: by 10.60.134.14 with SMTP id pg14mr109880oeb.66.1377270627601; Fri, 23 Aug 2013 08:10:27 -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 b5sm179907obj.8.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 08:10:26 -0700 (PDT) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt: update PSCI binding documentation for v0.2 Date: Fri, 23 Aug 2013 10:10:13 -0500 Message-Id: <1377270613-28435-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-20130823_111049_492315_2E4C515A X-CRM114-Status: GOOD ( 12.38 ) 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.9 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 addition of system reset and poweroff functions. The recommended function id numbering has also changed. This update also defines 32 and 64 bit calling conventions. The calling convention is defined by the method property. 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 --- Documentation/devicetree/bindings/arm/psci.txt | 85 +++++++++++++++++++++----- 1 file changed, 69 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt index 433afe9..2c03d0b 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,16 +22,37 @@ to #0. Main node required properties: - - compatible : Must be "arm,psci" + - compatible : Must be "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. If the firmware supports multiple calling + conventions (i.e. 32 and 64 bit), then the DT shall have a + node for each method. Permitted values are: "smc" : SMC #0, with the register assignments specified - in this binding. + in this binding (deprecated, "arm,psci" only). + + "smc32" : SMC #0, using 32-bit SMC calling convention with + 32-bit register assignments specified in this + binding. + + "smc64" : SMC #0, using 64-bit SMC calling convention with + 64-bit register assignments specified in this + binding. "hvc" : HVC #0, with the register assignments specified - in this binding. + in this binding (deprecated, "arm,psci" only). + + "hvc32" : HVC #0, using 32-bit HVC calling convention with + 32-bit register assignments specified in this + binding. + + "hvc64" : HVC #0, using 64-bit HVCC calling convention with + 64-bit 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: @@ -40,16 +62,47 @@ Main node optional properties: - cpu_on : Function ID for CPU_ON operation + - affinity_info : Function ID for AFFINITY_INFO operation + - migrate : Function ID for MIGRATE operation + - migrate_info_type : Function ID for MIGRATE_INFO_TYPE operation + + - migrate_info_up_cpu : Function ID for MIGRATE_INFO_UP_CPU operation + + - system_reset : Function ID for SYSTEM_RESET operation + + - system_off : Function ID for SYSTEM_OFF operation + Example: - psci { - compatible = "arm,psci"; - method = "smc"; - cpu_suspend = <0x95c10000>; - cpu_off = <0x95c10001>; - cpu_on = <0x95c10002>; - migrate = <0x95c10003>; + psci32 { + compatible = "arm,psci-0.2"; + method = "smc32"; + psci_version = <0x84000000>; + cpu_suspend = <0x84000001>; + cpu_off = <0x84000002>; + cpu_on = <0x84000003>; + affinity_info = <0x84000004>; + migrate = <0x84000005>; + migrate_info_type = <0x84000006>; + migrate_info_up_cpu = <0x84000007>; + system_off = <0x84000008>; + system_reset = <0x84000009>; + }; + + psci64 { + compatible = "arm,psci-0.2"; + method = "smc64"; + psci_version = <0x84000000>; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + affinity_info = <0xc4000004>; + migrate = <0xc4000005>; + migrate_info_type = <0x84000006>; + migrate_info_up_cpu = <0xc4000007>; + system_off = <0x84000008>; + system_reset = <0x84000009>; };