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: 9898437 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 18EA4602D9 for ; Mon, 14 Aug 2017 09:52:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A933285AE for ; Mon, 14 Aug 2017 09:52:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F33FD285DD; Mon, 14 Aug 2017 09:52:33 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW 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 9974E285A2 for ; Mon, 14 Aug 2017 09:52:33 +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=Deth40wx15HYzVz+jhlDw7LS40bnZXbi/iGB1X670DM=; b=NEagwC3NF8aj3TCrK8gQJQkPpK xY81UWp3mIn/2goIfJnpxN2m28Bt2auxfLF71m2plSKdUckr8xoghBSLrtDRyWVDCvNTFP2K4PZiN eV4XLjcWopbpEOG1ncaNSUJAM7Qo8ALabpsTbAxuEKAyOgFTKplIovFoI10bMzoadADL4ZJYMCQpM YQNt7UUvdZN9VPd2hZIH5IyItI0pL4yJ8yKL17QB3ZHKOw4/EFDj8bozPyFg8jKcgFc9rcU+wkhgE NABWjZVnCM3tYhhzhd8+ezL3/VaNbsBuMNf9TtwUEcJoqWijgi8FeKQPqhAy2X8Llb8BvAW/uMb95 JNfpF4og==; 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 1dhC2w-0006vw-56; Mon, 14 Aug 2017 09:52:30 +0000 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhC2s-0006tC-6F for linux-arm-kernel@lists.infradead.org; Mon, 14 Aug 2017 09:52:28 +0000 Received: by mail-pg0-x22e.google.com with SMTP id v77so44020646pgb.3 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=oyqNXuiGHytfr0bLW+pv+kyuV+O/F2Ld9nyzePx3pXpK9agwqX8ZW85nZMD/zjR8p1 VB/NT0s+ZvrMLeWwqaTGaqdDRi75cQG4hbjFMoUCksDn7s1ZsmEkZv8W+ulqcsyugRc4 Upi6zgQF7Svm88EAd5zYXcvtDAnEEeWFFeyRi4KQaRijtJ2pqQbZ5pfRFnkQVz2C6gm/ z78PG/3/GFt6pFjDyUnOZCKsTwlqcKEV4Wxe9YgERERrQY8WL+TMMDsQgMWP+/7Utrzx NLe0dZnxAvfd9b1dkOSXD6stMw4Z77ON+vYBPcnPtxyKLXKrhgNb/5SJmyWEla5Z/oC/ STGw== X-Gm-Message-State: AHYfb5hP/ybtRFepLdH4nTK/IMy17lqUvHJM5NKhcyI5sNUw/NJW2qvn CsaBBDWHUCjuq13k 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170814_025226_338840_145C7029 X-CRM114-Status: GOOD ( 10.05 ) 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, Kevin Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Leo Yan 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 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(+) 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>; + }; }; };