Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5432317ybe; Tue, 10 Sep 2019 03:41:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlZhcvuwftEEDsqE9JFuQOJATUbpD2l7YOVTgYc28wywbKmIxShUvqQC71nSjNkWbRk8oD X-Received: by 2002:a50:ab83:: with SMTP id u3mr23129611edc.228.1568112078254; Tue, 10 Sep 2019 03:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568112078; cv=none; d=google.com; s=arc-20160816; b=m9V/mrtA4jQ51hj2J4m8x2tEfdwzCjuVJLZkA5/xj+UQDfiQbJFRc4sQ8fiHkYJxcZ F0hCINu4+1Iuz8OIMuLcsqTINs+aaJu6h+e/uzsGsduXAorNCFr1RFNQpBJ1+2164Huc AjGatgLIo6v2XO/ua2IUnhATwQ/ad0Z0W3mbYLljOEs2uF2l8tnbsJRfQSZrR6+tI9uw fAWmA856Exn3WObUnCYChMR3bfJimbZoxkNoSTVp9bh0Nf8OUVgWf66EmkeUCSuB1cz8 pyKNusjmtOQKC9oalhDXw2kBHR6IxrniwP4Ecy3qPgd+cZ8dyoOBUWtFH8OmPVve3qIq Axpg== 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=NsnixZuNJY8utDRSUgh5QHACVpn6HSKjp9aMDvl9VGg=; b=P96X9k8HDPI4crj4/DLfOjyrIuDwt7IZKzleNB5CTaUfRH8fjG90fiohoE42QTz3ME rTO4c0zfl6wOnjCN1yq0Rh/85HtCu+vgVXrN21Q0O+EZmk563dCTkipwViBSMUHmxVtA q8c+gGzx8HrQZQFcMuESar8bb7dugJHoMUZ2tJJVUFfCC9I9DOUVxNhg/hmbBOhkbXfA JLpI4acaghkNP117u/yvU4tofA5BZhqzRTRCv14GxDfP7oc1XmM/4yZHNkSsQnNxbX7m UhNAyMtP8bIqwKVxQFdpHs2US29MW5oZOVcUSn8/XTDjYp9ZK3fIZuZ1rChLKEjuoqaO xuoQ== 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 g6si626381edn.395.2019.09.10.03.40.54; Tue, 10 Sep 2019 03:41:18 -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 S2392826AbfIJD0h (ORCPT + 99 others); Mon, 9 Sep 2019 23:26:37 -0400 Received: from inva020.nxp.com ([92.121.34.13]:33586 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728598AbfIJD0g (ORCPT ); Mon, 9 Sep 2019 23:26:36 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A15AF1A0869; Tue, 10 Sep 2019 05:26:35 +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 46C9E1A0454; Tue, 10 Sep 2019 05:26:30 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 71BA5402BF; Tue, 10 Sep 2019 11:26:23 +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, leonard.crestez@nxp.com, daniel.baluta@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 2/2] arm64: dts: imx8mn: Enable cpu-idle driver Date: Tue, 10 Sep 2019 11:25:18 -0400 Message-Id: <1568129118-31114-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568129118-31114-1-git-send-email-Anson.Huang@nxp.com> References: <1568129118-31114-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.MX8MN cpu-idle using generic ARM cpu-idle driver, 2 states are supported, details as below: root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/name WFI root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/usage 3098 root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/name cpu-pd-wait root@imx8mnevk:~# cat /sys/devices/system/cpu/cpu0/cpuidle/state1/usage 3078 Signed-off-by: Anson Huang --- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index 0166f8c..e4efe8d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -43,6 +43,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"; @@ -54,6 +67,7 @@ operating-points-v2 = <&a53_opp_table>; nvmem-cells = <&cpu_speed_grade>; nvmem-cell-names = "speed_grade"; + cpu-idle-states = <&cpu_pd_wait>; }; A53_1: cpu@1 { @@ -65,6 +79,7 @@ enable-method = "psci"; next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_2: cpu@2 { @@ -76,6 +91,7 @@ enable-method = "psci"; next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_3: cpu@3 { @@ -87,6 +103,7 @@ enable-method = "psci"; next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; + cpu-idle-states = <&cpu_pd_wait>; }; A53_L2: l2-cache0 { -- 2.7.4