From patchwork Mon Aug 14 09:50:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 109965 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp4117346qge; Mon, 14 Aug 2017 02:52:07 -0700 (PDT) X-Received: by 10.98.131.141 with SMTP id h135mr24279116pfe.271.1502704327374; Mon, 14 Aug 2017 02:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502704327; cv=none; d=google.com; s=arc-20160816; b=iiggBDlUfPLA68MToFrNq6BrU5OiU6Zo7JG2hCt76hwC7LdXZf01kTsshDl0DOWcUt 4Qlgh4UCzjoW+XC3Nk49r408W0uMNpAGxkY+CatXvve9odNvtJ6dv/LIBGTudqnN2RK/ a6mTAPOCy11qOboH6mjp8PoZ4DdQ0Mm9ef/HpH68BGliSZV8xwmYKcRBsmD/6hzurXfc SEhiuIrGS3iGs0DUiEzrGfjXQqBATrq8iv7fwRQBb7RBpI0acBrqNWaRjnizaJ0XYje3 4+8uR3gKpMLHKypnjulQm3XPkLzPc8SqGI/RSsAgK5NqoJKYZQH12SpW3fD06Y4gHkrJ VuEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dVFuz2TLmweOcX9BioKcZwDS4mjMWVboiFif7nfCIrw=; b=y+rU1Z40r0W2ao5WhoW+B4hpGCIDV5y8FnHksbwLJoJjH1DhdUE2n0JotQ4oZxuY6Q A8dFJyYX2NVo+vtG1lGkcTwlj7FyIaQEGoxWKzgxEq4N7f8f8viAO/eWwGe7l+2XSrzw zFcnZ+qG3ykoPF7jwT69eUJ9KJ9m84Oo9SDTrZ6IBf2WzetuZqV4DaJH4cOdjIkMZFhi 4ak7+Z77gTeJxtzP2vzKOQ+8pg76kLtrKGq616E+CrU5EEyMEGxlXnPtRVJunzP2VWDa VaTe85Z39/7wlk6ZGmCDlZYghAv+KPh3jkrhhTSQInZ0IpeGVFEpJ+fFaQjFXFaC/hrW 559g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fQGJsmSa; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m37si4339881pla.718.2017.08.14.02.52.07; Mon, 14 Aug 2017 02:52:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fQGJsmSa; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbdHNJwG (ORCPT + 6 others); Mon, 14 Aug 2017 05:52:06 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:38046 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752572AbdHNJwF (ORCPT ); Mon, 14 Aug 2017 05:52:05 -0400 Received: by mail-pg0-f41.google.com with SMTP id l64so43979067pge.5 for ; Mon, 14 Aug 2017 02:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=izwmUH+oXLcypvtruigKXYn1jhuGjaz7ElDVSnC+7Vk=; b=fQGJsmSaoZV6ZGuBxI21NbPP4hOExasb8sQvhWS1GED2YvDd/VkEQF6dltKMFA+9F0 +GAPJQFHoKVIne2BPJUrVPdwbIOMkVoruiYymAMTia+lVtJMhLHVm2nkNn9dJpVIDdFT 3qx4zn81SuJ1d6CFvQRS+uKs0Jqf/Y6r3L21k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=izwmUH+oXLcypvtruigKXYn1jhuGjaz7ElDVSnC+7Vk=; b=FhEB9sj6HXz23LKKTf3kRbsf6fAigBG1h9SOmSXSpYk13PiiogiqtQdkADD8MNrj6Z DjXvhaX5CCuNh0kRP5io1AsSfeFwlwkt5axNBlyBK/ndJJExUioZIaHjMwMGsHCoTmiP ul6rS2IPiItBIMUx0hRuzNgSqAQmVz6TP61muORfQGDaFcZtVyNJ8sssEJ1Cf6ahPHPe ex8/VzOay+aUk7oaD0gbdYLvY3+abRqm344JMg5PTc5M/5GfYbqQm2s+P+MM+kOjlxW/ t7yRHJRTAUIgttMwl3jIOTDvL+6Wi80uVMVyPhGZvhuNlyTPrGfx3YFy42Xx17OKVLQV unUw== X-Gm-Message-State: AHYfb5gqgyMaadDox4aZST6Bvu81AjZG4fsgf1mFznu8iu2mLSvSNIWt Q4Tql1yLNSbepjuq X-Received: by 10.84.131.15 with SMTP id 15mr27090842pld.156.1502704324993; Mon, 14 Aug 2017 02:52:04 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.41.135.45]) by smtp.gmail.com with ESMTPSA id e63sm3468674pfc.24.2017.08.14.02.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Aug 2017 02:52:04 -0700 (PDT) From: Guodong Xu To: xuwei5@hisilicon.com, robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Leo Yan , Kevin Wang Subject: [PATCH v3 01/10] arm64: dts: hi3660: enable idle states Date: Mon, 14 Aug 2017 17:50:40 +0800 Message-Id: <20170814095049.27701-2-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170814095049.27701-1-guodong.xu@linaro.org> References: <20170814095049.27701-1-guodong.xu@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Leo Yan There are two clusters on the Hi3660, the first one is Cortex-A53 based and the other one is Cortex-A73 based. These two clusters have different idle states. Thanks to Daniel Lezcano's recent changes, the generic ARM cpuidle driver can now support several clusters with different idle states, thus supporting the big.Little architecture. In addition to the WFI idle state which is the default shallowest state for all ARM cpus, the Hi3660 supports the following states: - CA53 CPUs: - CPU_SLEEP: CPU power off state - CLUSTER_SLEEP_0: Cluster power off state - CA73 CPUs: - CPU_NAP: CPU retention state - CPU_SLEEP: CPU power off state - CLUSTER_SLEEP_1: Cluster power off state This patch adds the idle states description for the Hi3660 to the device tree. Cc: Kevin Wang Signed-off-by: Leo Yan Acked-by: Daniel Lezcano --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index c6a1961..8921310 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -58,6 +58,7 @@ device_type = "cpu"; reg = <0x0 0x0>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; }; cpu1: cpu@1 { @@ -65,6 +66,7 @@ device_type = "cpu"; reg = <0x0 0x1>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; }; cpu2: cpu@2 { @@ -72,6 +74,7 @@ device_type = "cpu"; reg = <0x0 0x2>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; }; cpu3: cpu@3 { @@ -79,6 +82,7 @@ device_type = "cpu"; reg = <0x0 0x3>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; }; cpu4: cpu@100 { @@ -86,6 +90,11 @@ device_type = "cpu"; reg = <0x0 0x100>; enable-method = "psci"; + cpu-idle-states = < + &CPU_NAP + &CPU_SLEEP + &CLUSTER_SLEEP_1 + >; }; cpu5: cpu@101 { @@ -93,6 +102,11 @@ device_type = "cpu"; reg = <0x0 0x101>; enable-method = "psci"; + cpu-idle-states = < + &CPU_NAP + &CPU_SLEEP + &CLUSTER_SLEEP_1 + >; }; cpu6: cpu@102 { @@ -100,6 +114,11 @@ device_type = "cpu"; reg = <0x0 0x102>; enable-method = "psci"; + cpu-idle-states = < + &CPU_NAP + &CPU_SLEEP + &CLUSTER_SLEEP_1 + >; }; cpu7: cpu@103 { @@ -107,6 +126,50 @@ device_type = "cpu"; reg = <0x0 0x103>; enable-method = "psci"; + cpu-idle-states = < + &CPU_NAP + &CPU_SLEEP + &CLUSTER_SLEEP_1 + >; + }; + + idle-states { + entry-method = "psci"; + + CPU_NAP: cpu-nap { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0000001>; + entry-latency-us = <7>; + exit-latency-us = <2>; + min-residency-us = <15>; + }; + + CPU_SLEEP: cpu-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <40>; + exit-latency-us = <70>; + min-residency-us = <3000>; + }; + + CLUSTER_SLEEP_0: cluster-sleep-0 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x1010000>; + entry-latency-us = <500>; + exit-latency-us = <5000>; + min-residency-us = <20000>; + }; + + CLUSTER_SLEEP_1: cluster-sleep-1 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x1010000>; + entry-latency-us = <1000>; + exit-latency-us = <5000>; + min-residency-us = <20000>; + }; }; };