Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp310423ybl; Thu, 15 Aug 2019 17:59:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLAiskuXu+W/L7hSWtQd2gjJGnC9H54d8O63lnfxQ+BsSsnua/dRa5XCZ2tNxf2Um4lMHJ X-Received: by 2002:a63:121b:: with SMTP id h27mr5590924pgl.335.1565917177203; Thu, 15 Aug 2019 17:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565917177; cv=none; d=google.com; s=arc-20160816; b=S6BzIKkno/vy2z1PZrbRrPGrUcsmUH7cV9GAWKNP9g0FWo70OemQoPSlFb5FMWjkEy 0/5eF+Tqhv6oq1/XKYDcxjMJG8RZOc3UGKZcLEP2871DfKeaBeJhjwTG9pCN/Q4TUuZo G+JvScBgwQE3BMByiU0FYgz+1dxn77hZkwTUtvX671LVC6YkLzT1Ilf15ipqWJWmj/Fx pi/RuH54V6gST+P5NIzYPb7y4ui6784S8ax2f1DiQFQMfbtEv9apDfhZyQ9fXZH3Xjhi c+OITdOLWFK2YbPsFBOExTPiztcvy8vOZJyjngroEGnJ7kcKN2oLf6AUAkssJgFHOqCD 3pOQ== 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=FWzGCOG895ukkSFesb5jWw4Bt5IDze9/rKdOyubIYRE=; b=x3jbLLMkhOUN5i4NcvqbLCUcpcyfGtJYwPRHUeb3DMILmNYm8Vo667UnJev26X9X/y bY6mVeL8Y/fEkuY79DuO27kiLp/qQogwEu37vSY4zgbK3qYmvcadit9LBsrjgSBm9ktr CNcXllwXblOMVDKU5TWkE3jPAfw3dWHw/7i0dasSGoXEpCLqEb+Mbca1Hu1krphRwpQN ldUALcZuVBXDDXrvB/vN5BBwVisFm+xl/mPh6h4ghnd2ZW+s/90s9bVBbbSsIkP39Od2 9BDs8cS2JMpQ/0KjmfpHh7RYQfCiSJD5knH5nBIkfVn+awJPLT8IH3s/8PAoPNrINTAG hbYg== 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 b16si3134049pfd.126.2019.08.15.17.59.21; Thu, 15 Aug 2019 17:59:37 -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 S1726457AbfHPA53 (ORCPT + 99 others); Thu, 15 Aug 2019 20:57:29 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49974 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbfHPA50 (ORCPT ); Thu, 15 Aug 2019 20:57:26 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BCB231A0056; Fri, 16 Aug 2019 02:57:24 +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 42A321A00B8; Fri, 16 Aug 2019 02:57:15 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 92E9A40305; Fri, 16 Aug 2019 08:57:03 +0800 (SGT) From: Anson Huang To: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, daniel.lezcano@linaro.org, tglx@linutronix.de, leonard.crestez@nxp.com, daniel.baluta@nxp.com, ping.bai@nxp.com, jun.li@nxp.com, l.stach@pengutronix.de, abel.vesa@nxp.com, ccaione@baylibre.com, andrew.smirnov@gmail.com, angus@akkea.ca, agx@sigxcpu.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V6 4/4] arm64: dts: imx8mm: Enable cpu-idle driver Date: Thu, 15 Aug 2019 20:38:45 -0400 Message-Id: <1565915925-21009-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565915925-21009-1-git-send-email-Anson.Huang@nxp.com> References: <1565915925-21009-1-git-send-email-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 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-pd-wait root@imx8mmevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/usage 6647 Signed-off-by: Anson Huang --- Changes since V5: - improve state1 idle name to better match PSCI doc; - remove wakeup-latency-us property as it is NOT necessary when entry-latency-us/exit-latency-us exist. --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 94433c53..9b2dc12 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -44,6 +44,19 @@ #address-cells = <1>; #size-cells = <0>; + idle-states { + entry-method = "psci"; + + cpu_pd_wait: cpu-pd-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>; + }; + }; + A53_0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53"; @@ -56,6 +69,7 @@ nvmem-cells = <&cpu_speed_grade>; nvmem-cell-names = "speed_grade"; #cooling-cells = <2>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_1: cpu@1 { @@ -68,6 +82,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_2: cpu@2 { @@ -80,6 +95,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_3: cpu@3 { @@ -92,6 +108,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; #cooling-cells = <2>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_L2: l2-cache0 { -- 2.7.4