From patchwork Wed Jul 6 08:20:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 9215683 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 5CB0A6048B for ; Wed, 6 Jul 2016 08:22:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D4182877F for ; Wed, 6 Jul 2016 08:22:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4182028781; Wed, 6 Jul 2016 08:22:53 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D1AAD2877F for ; Wed, 6 Jul 2016 08:22:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKi5I-0004CO-MI; Wed, 06 Jul 2016 08:21:28 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKi5E-0003yb-Gy; Wed, 06 Jul 2016 08:21:25 +0000 Received: by mail-pa0-f68.google.com with SMTP id ib6so4453250pad.3; Wed, 06 Jul 2016 01:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XnwvNPYZeJpUUF7XRM3jwqCC2xt5CntalEB/97gyHBA=; b=cXeSTFSsntOWON5MV6+fQu2Q3HT5QCipPnO0LV3Gr/xF07cWFIOvv0taTceumFMlZC jp5Ty7h9S7G/CWrTrjZ56Q6eQe3bBr/CHSYBQo1cxZeLPbSH/3h0B++heCLEPaarwxqE K7oeee/ZMu4T3H7SMKuMKphTQqky5TiqTSs4pCnVV5tDL+4FKzJZsd9qmy7Hn9qF32W6 c9EuidAsKmi6SdLstTMqs7cGEzAYhlrXxYgJVwJ1dTtTWWnDgq8PSKvxdvnnFHltSbE6 cT308ynbBBsCFl/PvgepVWzpZCgyXpucBRZ3b6WKUNldWu0Zu5P0U77vhIvvj7rf7GQO aSwg== X-Gm-Message-State: ALyK8tK1uPsgub110N8gjvSCDccrqDRw5FRAfDe4Q1hiuPiR2EGK+g7S7Jl5PovG5x0KCQ== X-Received: by 10.66.11.72 with SMTP id o8mr39280647pab.106.1467793263472; Wed, 06 Jul 2016 01:21:03 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id z127sm2320787pfz.20.2016.07.06.01.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 01:21:02 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner Subject: [PATCH] arm64: dts: rockchip: Add idle-states to device tree for rk3399 Date: Wed, 6 Jul 2016 16:20:54 +0800 Message-Id: <1467793254-10808-1-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160706_012124_646074_C67EA182 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Brian Norris , Xing Zheng , Masahiro Yamada , Catalin Marinas , dbasehore@chromium.org, Will Deacon , dianders@chromium.org, Rob Herring , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, tony.xie@rock-chips.com, David Wu , cf@rock-chips.com, Jianqun Xu , linux-arm-kernel@lists.infradead.org, Caesar Wang 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 As the rk3399 ATF had been supported on ARM github [0], so we can add idle-states for rk3399. This patch adds idle-states bindings data collected through tests experiments (latency and energy consumption) on rk3399 evb2 board. You can see detail idle-states definitions on document [1]. * arm,psci-suspend-param: power_state parameter to pass to the PSCI suspend call. * entry-latency: Worst case latency required to enter the idle state. The exit-latency may be guaranteed only after entry-latency has passed. * min-residency: Minimum period, including preparation and entry, for a given idle state to be worthwhile energywise * min-residency: Minimum period, including preparation and entry, for a given idle state to be worthwhile energywise. [0]: https://github.com/ARM-software/arm-trusted-firmware [1]: Documentation/devicetree/bindings/arm/psci.txt Documentation/devicetree/bindings/arm/idle-states.txt Signed-off-by: Caesar Wang --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index a6dd623..12ce265 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -101,6 +101,18 @@ }; }; + idle-states { + entry-method = "psci"; + cpu_sleep: cpu-sleep-0 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <350>; + exit-latency-us = <600>; + min-residency-us = <1150>; + }; + }; + cpu_l0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a53", "arm,armv8"; @@ -108,6 +120,7 @@ enable-method = "psci"; #cooling-cells = <2>; /* min followed by max */ clocks = <&cru ARMCLKL>; + cpu-idle-states = <&cpu_sleep>; }; cpu_l1: cpu@1 { @@ -116,6 +129,7 @@ reg = <0x0 0x1>; enable-method = "psci"; clocks = <&cru ARMCLKL>; + cpu-idle-states = <&cpu_sleep>; }; cpu_l2: cpu@2 { @@ -124,6 +138,7 @@ reg = <0x0 0x2>; enable-method = "psci"; clocks = <&cru ARMCLKL>; + cpu-idle-states = <&cpu_sleep>; }; cpu_l3: cpu@3 { @@ -132,6 +147,7 @@ reg = <0x0 0x3>; enable-method = "psci"; clocks = <&cru ARMCLKL>; + cpu-idle-states = <&cpu_sleep>; }; cpu_b0: cpu@100 { @@ -141,6 +157,7 @@ enable-method = "psci"; #cooling-cells = <2>; /* min followed by max */ clocks = <&cru ARMCLKB>; + cpu-idle-states = <&cpu_sleep>; }; cpu_b1: cpu@101 { @@ -149,6 +166,7 @@ reg = <0x0 0x101>; enable-method = "psci"; clocks = <&cru ARMCLKB>; + cpu-idle-states = <&cpu_sleep>; }; };