From patchwork Wed Nov 5 10:15:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 5233311 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 5AFD5C11AC for ; Wed, 5 Nov 2014 10:19:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77F6C20165 for ; Wed, 5 Nov 2014 10:19:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F01EE2015E for ; Wed, 5 Nov 2014 10:19:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XlxdP-0002CF-6K; Wed, 05 Nov 2014 10:16:15 +0000 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XlxdM-00022R-OV for linux-arm-kernel@lists.infradead.org; Wed, 05 Nov 2014 10:16:13 +0000 Received: by mail-pa0-f45.google.com with SMTP id lf10so497915pab.32 for ; Wed, 05 Nov 2014 02:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=EQ0BJTcjtEW5NlM5T0bOQLfkJOUG6WiS9NSJ8io9i2E=; b=tMLGHl+furmKdFAEKeI+PH6KkX3KRL3oSWjYVgll5avZitCHstoImAlJl0319sOSZV P8sjQJlgcpHt0RR/lfvnJKYhZNIPOpA7Ynz5DFY9TICo+7uXSnZwprZu3owiaMT8blNF 2F9/g0HRTwjFYFR/u2s5kyqLgL69cnsh/C1Tsiw79PfskmpYg5zqM5XTeY5Ho0gHuSRB TNcb4t39fN76HlS+QbyNoT6dNNcHOFUWtDxcuc4zJ1ZrxVjap8Bd4MKdVzlcsE9dQ3Hr BpAxcNFLoM6fc+LLba6pdKFwixlQifKrpj54JEodisROAy1KyhtONEkvCQVjf11k85bn h1JQ== X-Received: by 10.68.190.42 with SMTP id gn10mr4620478pbc.69.1415182551633; Wed, 05 Nov 2014 02:15:51 -0800 (PST) Received: from chander-ubuntu.localdomain6 ([14.140.216.146]) by mx.google.com with ESMTPSA id kp2sm2778826pdb.30.2014.11.05.02.15.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Nov 2014 02:15:51 -0800 (PST) From: Chander Kashyap To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3] arm64: dts: exynos7: add support for cpuidle core power down Date: Wed, 5 Nov 2014 15:45:36 +0530 Message-Id: <1415182536-11613-1-git-send-email-k.chander@samsung.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141105_021612_817884_4018E4AC X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: mark.rutland@arm.com, Chander Kashyap , lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, daniel.lezcano@linaro.org, rjw@rjwysocki.net, kgene.kim@samsung.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,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 Exynos7 has core power down state where cores can be powered off independently. This patch adds support for this state. Entry latency for the core power down is calculated as follows: 1. Time difference is measured between cpuidle entry and exit. 2. WFI is skipped measuring the time. 3. The time is averaged out for 100000 cpuidle transactions with varying load. Exit latency and target residency are supplied as per HW team Signed-off-by: Chander Kashyap --- This patch has following dependencies: - [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC http://www.spinics.net/lists/linux-samsung-soc/msg37047.html Changes in v2: - Moved the cpu-idle-state property after reg property - removed the status property. Changes in v3: - Added the Entry latency calculation in commit message. arch/arm64/boot/dts/exynos/exynos7.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi index 50ae936..444dde1 100644 --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi @@ -37,6 +37,7 @@ compatible = "arm,cortex-a57", "arm,armv8"; enable-method = "psci"; reg = <0x0>; + cpu-idle-states = <&CPU_SLEEP>; }; cpu@1 { @@ -44,6 +45,7 @@ compatible = "arm,cortex-a57", "arm,armv8"; enable-method = "psci"; reg = <0x1>; + cpu-idle-states = <&CPU_SLEEP>; }; cpu@2 { @@ -51,6 +53,7 @@ compatible = "arm,cortex-a57", "arm,armv8"; enable-method = "psci"; reg = <0x2>; + cpu-idle-states = <&CPU_SLEEP>; }; cpu@3 { @@ -58,6 +61,20 @@ compatible = "arm,cortex-a57", "arm,armv8"; enable-method = "psci"; reg = <0x3>; + cpu-idle-states = <&CPU_SLEEP>; + }; + + idle-states { + entry-method = "arm,psci"; + + CPU_SLEEP: cpu-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <20>; + exit-latency-us = <150>; + min-residency-us = <2100>; + }; }; };