From patchwork Wed Jun 14 08:23:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 105477 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp180379qgd; Wed, 14 Jun 2017 01:25:34 -0700 (PDT) X-Received: by 10.98.201.25 with SMTP id k25mr2988699pfg.206.1497428734145; Wed, 14 Jun 2017 01:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497428734; cv=none; d=google.com; s=arc-20160816; b=tKai7WakDp/Ip32l9Rio2Uq9qEfazhINSRC+AKF/pb60V4o1TJC68560MfMLoUODUS m2EGS95fcTVgc7xMeNGznVOLdu6L8BlCHikUyfxnhf2EX0Dr84XBDgsUGiUQc0yW4aOr RD8/RZZVTspaw6vxlEsgyrvbk4UTV1yg/Rjj9w4tzty8x0jt2ziRhfxlvxaWF6aWbuKu b35LT+1s0sh19xu0k2T/OvPVSuRiNDjzpHdmzQcBC9wV27IP13zKrVcbSRD3sJ3+rmtq VU9Zl61XLojHjSET9S0R0Z5iwlWvii6Q8ChJiNBzfc5wASftDlLIPqY6Z33u5fO87WSA Vt4Q== 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=Dgi33QPkQ1deClIDwufc9d3EOY+73tCE05vgrsgc0ww=; b=ctaJFsddEgjEHTKFyVb5aLF6gR/f5OIuYM/XTU3nFVHiskHy57EAJbo1wYdLI7R3f+ lkftDzFclRKmArLejeTQbEoDxa2zpcV3hN+CBTZhgnztF78Z41R5yppn8mEhSkf2TONT YCdnpVRcaiGrRZhiLFOlcskxabS7gq+JuIWK1dz8YzecKH64JAdOrcJQuWLHuXXUu3jC /X3gz99LloAjw1d2s3TPbLlnn8RobPHhi20qX1PYMaFZVs90T/iHNppfKAy9wBcwvthZ Lgvm5q7lwIDKMC2XyvNuy3GCl2wZ9JJfRKArOqrkoQCJVmo6QDQLXAj+ZJGai93u63mA OotQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=OgvUmsIs; 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 33si168406plk.159.2017.06.14.01.25.33; Wed, 14 Jun 2017 01:25:34 -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.b=OgvUmsIs; 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 S932094AbdFNIZX (ORCPT + 7 others); Wed, 14 Jun 2017 04:25:23 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36267 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754695AbdFNIZV (ORCPT ); Wed, 14 Jun 2017 04:25:21 -0400 Received: by mail-pf0-f178.google.com with SMTP id x63so80807553pff.3 for ; Wed, 14 Jun 2017 01:25:20 -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=sdoeWHTBchA4wklXVPyN5pFwXvOs7OFDKJVs/X76X9w=; b=OgvUmsIswtbXmg06koqg2rgMjNz3++6NksU7gGHioL1Hz5TM22aHDqsVbkI8cK0LRD Ny90M/5Gdb2lDYYuhe8xdWyu+HzO/2juiNaiJBdQHdZP2KBjaxzWwF5nvn/OTaTJl+m9 G9xQDD4weAYaG0RGg4jzGwbb0vrbG6YwxxAts= 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=sdoeWHTBchA4wklXVPyN5pFwXvOs7OFDKJVs/X76X9w=; b=Zh4bSNJ5H3HFcIvEBUqhQi6/C/XHiFFqrh8PnlZeULINCMH8bmLOhfClMEMrGNE6r1 4LuTkAQD9zsV4uLHlF3YEVbn2Dp7jCnd4q7eCfJbfv8pCm+EU9e5XhDhWFq6T1HEuMMY Z9WFxhEtvu8dNK13Tbr64xqSlOQB4cZ66SVXiQzD3Qdlumbb3sq7n5YKELmi+xtx7ELR 6v9cdV5zMKQ+z0PJx+SdCN7T3JML97N2jJEBq3eIXg8VGrjbgrAeOG/Qs8PW+HvuJdXU otvaMaR3noiL4dd2rNn5UzZ1FqSqGKzBqsTA340KP/tX1cDZgfu6Q9AWP+gjPrVWpzMI kXjQ== X-Gm-Message-State: AKS2vOx1SOSPGok10k2ZC5wPsfgSOMF58J/Yw9/+2GU54kNd2CUY2BLb 9oubESGLPkIxrhwe X-Received: by 10.84.232.8 with SMTP id h8mr3754294plk.278.1497428720003; Wed, 14 Jun 2017 01:25:20 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.99]) by smtp.gmail.com with ESMTPSA id h14sm766802pfh.71.2017.06.14.01.25.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 01:25:19 -0700 (PDT) From: Guodong Xu To: robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, wangkefeng.wang@huawei.com, xuejiancheng@hisilicon.com, peter.griffin@linaro.org, puck.chen@hisilicon.com, lee.jones@linaro.org, ulf.hansson@linaro.org, bhelgaas@google.com, arnd@arndb.de Cc: zhangfei.gao@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-pci@vger.kernel.org, Leo Yan , Daniel Lezcano , Kevin Wang Subject: [PATCH v3 14/21] arm64: dts: hi3660: enable idle states Date: Wed, 14 Jun 2017 16:23:31 +0800 Message-Id: <20170614082338.15673-15-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170614082338.15673-1-guodong.xu@linaro.org> References: <20170614082338.15673-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 On Hi3660 there have two clusters, one is CA53 cluster and another is CA73 cluster. This two clusters have different idle states separately. With Daniel Lezcano's patch (ARM: cpuidle: Support asymmetric idle definition), now ARM idle driver can support different clusters with different idle states. Base on this, this patch is to bind two clusters idle states on Hi3660. Except the "WFI" states are enabled by default for all CPUs, this patch also binds below extra idle states: - CA53 CPUs have two more states: CPU_SLEEP: CPU power off state CLUSTER_SLEEP_0: Cluster power off state - CA73 CPUs have three more states: CPU_NAP: CPU retention state CPU_SLEEP: CPU power off state CLUSTER_SLEEP_1: Cluster power off state Cc: Daniel Lezcano Cc: Kevin Wang Signed-off-by: Leo Yan --- 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 e138973..4101bf5 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>; + }; }; };