Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8814768ybi; Tue, 9 Jul 2019 23:44:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQn3D4YaGfK4Eki5+e1leK0/zl/hs6LufhbXJyKIgjDLEcCNXtoFyYeF0FEXeUhGqy0Utx X-Received: by 2002:a63:6507:: with SMTP id z7mr33718942pgb.186.1562741048961; Tue, 09 Jul 2019 23:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562741048; cv=none; d=google.com; s=arc-20160816; b=ONIKBgf2aa/bIfOXjEbFpQ/RsOXbwE0woauRI6TWWXcqPjmZBs11kmcDcgMAbplSBZ g66IhhfR9BEgo4RJpz9FV64cBrP00ULDKpvGlQvrrPXYPGMocHuy8MvpnAIHq2M/ND7m 25KblUoP3/iSidP6cjautCF6ay1c6bpJItHuGf62mj3+w+dRTZxvDe0AbSdU2bxFpTkG 06nOBo8CdbNmbXUJ1mMQlxLCLnmzx08JHn+j2WO+1UTc0w2h7svwC8Kw/5hGv+XvMSHz fEEwJgLowCDMy6f8zyUYQ5CdUonQagY+WIZRo6+KJ9gnOj6E3khWMfMEolVBVl0Oml6N Ko/A== 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; bh=KDZatam8QW9YRV84lEGiqTPPGyficMH3H3UuSo4fJG0=; b=vsws90B2ySAJh0FNiVK3TJgrGofrsBky0vnhzQ8p15sCLveKZbLqKyiaWDd5J00cYN BUdKUyk9CnilXeOHf3idaifT3Ou2Buc3OevdCz6NLV6CUFq7GlX1fETIXah+LBdRfgQQ g7wuoEp6+Zk1pWnGNggABVc/MZRfc/aKRZW6E3j1lS6X2fedINl6k7Y3QRTzNnjNa+vh q365LmhcZKtI1B2QS5hxCT8p0i6848TcDIHsNF1kNqIW5ZbkQi5OBTf7fORVcXmcPGZA HbCo9ZQkSkjRlESLPu9JI0ICZJHWfN0g4TElfJ3Lcd0c2pMsQaWKur0Zpc+MuDoECWh1 hyhA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si1346382pfi.161.2019.07.09.23.43.53; Tue, 09 Jul 2019 23:44:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727190AbfGJGkg (ORCPT + 99 others); Wed, 10 Jul 2019 02:40:36 -0400 Received: from inva020.nxp.com ([92.121.34.13]:57974 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbfGJGkd (ORCPT ); Wed, 10 Jul 2019 02:40:33 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D09E1A0147; Wed, 10 Jul 2019 08:40:31 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2D4A51A00BC; Wed, 10 Jul 2019 08:40:18 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id DFA614031C; Wed, 10 Jul 2019 14:40:04 +0800 (SGT) From: Anson.Huang@nxp.com To: catalin.marinas@arm.com, will@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, daniel.lezcano@linaro.org, tglx@linutronix.de, leonard.crestez@nxp.com, aisheng.dong@nxp.com, daniel.baluta@nxp.com, ping.bai@nxp.com, l.stach@pengutronix.de, abel.vesa@nxp.com, andrew.smirnov@gmail.com, ccaione@baylibre.com, angus@akkea.ca, agx@sigxcpu.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V5 5/5] arm64: dts: imx8mm: Enable cpu-idle driver Date: Wed, 10 Jul 2019 14:30:56 +0800 Message-Id: <20190710063056.35689-5-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20190710063056.35689-1-Anson.Huang@nxp.com> References: <20190710063056.35689-1-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang Enable i.MX8MM cpu-idle using generic ARM cpu-idle driver, 2 states are supported, details as below: root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/name WFI root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/usage 3973 root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/name cpu-sleep-wait root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/usage 6647 Signed-off-by: Anson Huang --- New patch, as this patch is based on other patches in this series, so I include it. --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 8cf7f34..8f3ed39 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -44,6 +44,20 @@ #address-cells = <1>; #size-cells = <0>; + idle-states { + entry-method = "psci"; + + cpu_sleep_wait: cpu-sleep-wait { + compatible = "arm,idle-state"; + arm,psci-suspend-param = <0x0010033>; + local-timer-stop; + entry-latency-us = <1000>; + exit-latency-us = <700>; + min-residency-us = <2700>; + wakeup-latency-us = <1500>; + }; + }; + A53_0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; @@ -56,6 +70,7 @@ nvmem-cells = <&cpu_speed_grade>; nvmem-cell-names = "speed_grade"; #cooling-cells = <2>; + cpu-idle-states = <&cpu_sleep_wait>; }; A53_1: cpu@1 { @@ -68,6 +83,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_sleep_wait>; }; A53_2: cpu@2 { @@ -80,6 +96,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_sleep_wait>; }; A53_3: cpu@3 { @@ -92,6 +109,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_sleep_wait>; }; A53_L2: l2-cache0 { -- 2.7.4