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: 109758 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1715750qge; Wed, 9 Aug 2017 19:26:45 -0700 (PDT) X-Received: by 10.84.217.144 with SMTP id p16mr11603774pli.276.1502332005411; Wed, 09 Aug 2017 19:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502332005; cv=none; d=google.com; s=arc-20160816; b=agI0QJg5cb3mhtkzLTSSXOSFcaMH5rI6U6zScotzKq76VcnlAwZtgUP6fS1+CKBkNX /M01+O9Ea3jIX5WQWHB6Y2pu5YS8OphNe0hUi7zOKg8qPhjrQmPqsEuqtUugrpVs8uBW PKpv1HqQKTbAXtcnKqY/8yJjjwU+6c+l7nOX7SphJeozbwR4Iz8Jt024osIYGqqtXF5t zNetGJgwP9qDHeyOCv9XhNChUzhavb8QTMp7BXkE7rk4RNYVJJY0WeChsuZDhB30iIqR 9M0FCCZ5xt4BABRn5/Ef96hwFK0a2zKkmxpoAQHwbJSJiFM4sMcLtCOtOobDvSIX43ea uCLg== 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=+kknoa0xsS51ZeDEXOO586zfYUubZWU6uIrMU6WoYyU=; b=0HupS3EKX4pbpkS8P+8U+GRlyb3SLB1Gi8ibwXxhunOfJnFuT3CQ1ApBl6LtulDG3m 0/+gIg41YNsNkl6bPcAWEUP6jM4q9E3r6L0cAZEvTP1cU1uSBdrpjtTIpxrnamy36s/2 5KxKGwx1rbXVEBsO/4icVDv4+55+Rrnw1OAQKTvAlwDsHY8ctcNUHbk6xokuJUg+Y/KY ojZRyIIH+udfroAoN24LBniASwAe/WQZTyqMaqLtArBfJnXbgRbmduZcz2Uj4MkDeXRW //YKKm55tsaGmRXTRIO8cj740DSJdiIhH8n8SMCl8+jPygUUkQgISukywC2dD9InYj0Y b91w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMFo4gzb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 11si3425142pft.626.2017.08.09.19.26.45; Wed, 09 Aug 2017 19:26:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMFo4gzb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467AbdHJC0m (ORCPT + 25 others); Wed, 9 Aug 2017 22:26:42 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:37633 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbdHJC0k (ORCPT ); Wed, 9 Aug 2017 22:26:40 -0400 Received: by mail-pg0-f52.google.com with SMTP id y129so35408993pgy.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=dwoWj8DdVCa7l4efkiSE8dXV4B7X2HyK74UUVouegqm0VvYXApxPDs4+sPkvYec+Dv ecbdczPYZLj9JNPAxg9oEmaB9MBWw+1LvfZhcwSygR9GTY77D2+zwEGD7pZh/JVIQ8xN rAvfM5uYiz62aAncdXBtvS7nwG4eupKT+qgtQTDK+yzbXZFpPeRf48zlyqVp6HBr6W72 ZeYY5pLDva5NradWHKDba4NILSbbmeM82DK36S6AkSTtmdg+oOcM/MYeodHuHbKl6zWE +GPkiBSgbFa1sg1JaBhBVnWI7ILkzFFtn5TV6wHgUlQZG27joKeoyx429RHC7Ww5WjRl NpQw== X-Gm-Message-State: AHYfb5i1tvM7hw53C174K6KICOo6gE3A0E90fDRa6xfDfkofPmo4odr0 ct6Ua67nXVM6m2yn 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 Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Leo Yan , Daniel Lezcano , Kevin Wang 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Acked-by: Daniel Lezcano 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>; + }; }; };