From patchwork Thu Aug 10 02:26:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9892547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CEA29601EB for ; Thu, 10 Aug 2017 02:27:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8F09289BD for ; Thu, 10 Aug 2017 02:27:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADEA3289CD; Thu, 10 Aug 2017 02:27:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F0D5289BD for ; Thu, 10 Aug 2017 02:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BrPbiwIdqOkP8h/vZmEsu0d1W8Tb9UP5l9iPyi8Dw6o=; b=sdCR0MqmqL9lP8/nr2KULCymQ3 BXryMYE1W2eowduPNYXiMj7MeT96dtkX2Jc+/1uAbedKl6mZvu/WBG8FO+ZwZ5EgQbUPFAjpGoxRl uaifm0X1nWx16oq2I3QvvKG/Own3Jit7WbHCYA8n6YUnlx1/Mw2oE6vlxZ367jQoWJRaxOpTYTodR UldyMiXUup+MTyEDA3QIcWUmXZZjO3tPje5oZhyUYumAHaqcJN+qGZohiZJfQzBBXD/68sX4WZ1Js riv/84S9N4qKIubRvENJfIC3UIqr4+G/cUCqe72mpmRc3+Z5LkuiL8FfAbTXUt+OV3ZAiX2FuiMvv RuoBtyNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfdCF-0002cT-7I; Thu, 10 Aug 2017 02:27:39 +0000 Received: from mail-pg0-x233.google.com ([2607:f8b0:400e:c05::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfdBd-0001uB-1E for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2017 02:27:12 +0000 Received: by mail-pg0-x233.google.com with SMTP id y129so35408994pgy.4 for ; Wed, 09 Aug 2017 19:26:40 -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=+kknoa0xsS51ZeDEXOO586zfYUubZWU6uIrMU6WoYyU=; b=fMFo4gzbDGTYS4YMdOnv/pjWuxQsWRhoyaB1PT6enXpsauCUqeRELoVDfWi0krOLlG ffBfHVJzC5KXCsGSfOpXQXChhNu+xAoia8e2iTkvCdMkVNFy3hPpkHtTldnl9mQxtiBD 4DktXd7BbYKb4RKUgz4X+xdXDRpfyCpMs2Z4A= 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=+kknoa0xsS51ZeDEXOO586zfYUubZWU6uIrMU6WoYyU=; b=ZT1jWI4GKdPv6fGCU5F9yk6q5Zh8Pbv434fiIcvivz5m0Hj/voxqjpvteE+S506kyF yboiQz80d8wXLuMjlunYP+PePjsf9UDXiE73cnZnuWkz8mqaELT+XdPQdXZbNL3zLOtI OamKgw0GIXRAcynsi1UyXEYgVBQ9Dv3H0fKhsb4WV07mVe3F1XAzHUYabcYKw7nvw3KN 1wP8sn/H9jMW2Sk5yIru9rFttZnMPr3p8vPW2GdzJnbn4UI0W+tAIzem3yE2jwi33tEM Qg7Brdz0Y8NDnQCp4cUNKckaBxFNl8J5Dli6UwQf1mJmhyx4fSHC2YMNXxiUVCZYZO1F btaA== X-Gm-Message-State: AHYfb5jBF39UqgQaN9SfeJDMD2YpLmBIX+mE/Qqb2LllTzD7VLSVdskr 1ChFyjbB2VEO0yVC X-Received: by 10.99.185.16 with SMTP id z16mr9605239pge.395.1502331999719; Wed, 09 Aug 2017 19:26:39 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.41.135.55]) by smtp.gmail.com with ESMTPSA id s11sm7789166pgr.53.2017.08.09.19.26.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Aug 2017 19:26:39 -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 Subject: [PATCH v2 1/9] arm64: dts: hi3660: enable idle states Date: Thu, 10 Aug 2017 10:26:07 +0800 Message-Id: <20170810022615.19204-2-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170810022615.19204-1-guodong.xu@linaro.org> References: <20170810022615.19204-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170809_192701_855704_FA0EBB66 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniel Lezcano , linux-kernel@vger.kernel.org, Leo Yan , Kevin Wang , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Daniel Lezcano --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) 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>; + }; }; };