From patchwork Tue May 15 02:53:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 135817 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp414468lji; Mon, 14 May 2018 19:55:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpd0Hl4U4NHlSJxqQ1wRZ6SSIkp3Zu6/ZUh21EghOWEmRUTB3FJcU+UubTX5/UAbk0Vlbm6 X-Received: by 2002:a17:902:b087:: with SMTP id p7-v6mr12419824plr.227.1526352904305; Mon, 14 May 2018 19:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526352904; cv=none; d=google.com; s=arc-20160816; b=u9KlXGYJKpDQD5R5F0N3PRq0vFZce/1tD5bmCyxSWNkX19Rt/oN//0RKYrtK+uZ+wy mnsIq5M/sTVKqTgV8FjGvbZc5zsWxAlKZ1duftcAN9NEnFS4CDNEYn964FzoZsahazr1 qnHohh31JBKupSn/7eQo9f/YjDn4rE03cFYFJ2VTsrjpGq9ah+pEUGpiTeD/zwAL+472 tnqupG0cWUeAnAtoh5pxfWyQgV+c4a1Xz9JXKn5HFZUqlWjIa4nd4KrHUQHFc4noMuWg GMHBqadvrgIYSlEQFNXbmtbjGKxLa4JZedP8ScwaIvS+OuwnEby3kInRiem4hTw0lNZD tD5w== 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=eM6f+5RBONUcBLdLuAEczx07cLMcSgHu7g/S+NU8cyQ=; b=AZdDOB5Y8x8LFdtcUgq0hcZw1J/aLDBSv7gDgchad9kmZP7u4qFHRYtgHrOzCA7aue GJKrWthk/AwIkNND03RaNQyIYtSWrTRnmuQy4P2itykH0fZ1ic6crKfRXQ/YcWyO6Ylj jsNi5zXb5HS2Smfb9F30zQy/LQZpFp2phYbV/BauXUjapeMo6OEgSfbh+GGnbOkOm6Cr wJH3B4LRNxdKgKnhF5N6C1MpKxqzY8XKt8mHBfilEn/hpWCI5l69mUmxLVXJL8D7hsGj vv5J0EsvoYNZQdFJgRo9Jk/QDy7eEr5Cl7WAg6sR9Wt9Ijzrp/rAXUzcRZWWexzhA93M cVpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CmUK9oZ7; 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 u10-v6si10465381pfn.44.2018.05.14.19.55.04; Mon, 14 May 2018 19:55:04 -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=CmUK9oZ7; 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 S1752490AbeEOCzC (ORCPT + 29 others); Mon, 14 May 2018 22:55:02 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46630 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098AbeEOCzA (ORCPT ); Mon, 14 May 2018 22:55:00 -0400 Received: by mail-pl0-f66.google.com with SMTP id 30-v6so3662154pld.13 for ; Mon, 14 May 2018 19:55:00 -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=eM6f+5RBONUcBLdLuAEczx07cLMcSgHu7g/S+NU8cyQ=; b=CmUK9oZ7twt0XgIieQ1EO3vSGvX0hJHCxaBLSfzZb13skkGGVzAqkqL/yYPK3K/+du 59X0giXe8h3X5xog7cYKvT2RBtbv38uRR+OBsl1IgTXacqwws40hg2jjJnvLI3xe2FRw psm0OOdhfe4cX/dpEIF/TnKaI7lVgoXO+DWvU= 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=eM6f+5RBONUcBLdLuAEczx07cLMcSgHu7g/S+NU8cyQ=; b=eqXtbbb914oNzZ9NCrP3FhESiKH7fzSC8O+qRvcHEBICtGfjqO+gPhohUqWb/Gu/yC ep2R5CKjHbljh3gohtQYHcHfoJ4C0Q4ci86wSx4zAm28VUyzNqCuTn18gxRCCX8sd21m BadhYTjQRk0YHVueEet3CUgSUSUp1xbW4IXnFM80u0Do5KQgpn5wuk1fyLzjJOoSKtvE uUzNdbm3d45+Q8+i7L8+mM7gUD/y/mIFNVtuT3o3blX9fmT+Wde5ZsWb8oU2kNPNcG7+ IlEkyNR9UbdcUKIKGaGTye3jZISeOiHGvncT+nGmDCB2Wwz7xsMpWn75N80IFZSnqfcE LOmQ== X-Gm-Message-State: ALKqPwdnzW1XhCHJnAh6FHCKaNzrxPfs1GM4LD4xkU4UERtxkYHOt2G/ kMJcZtpIzZUUvX3tyWQXQVRlDA== X-Received: by 2002:a17:902:a60d:: with SMTP id u13-v6mr12515031plq.40.1526352899702; Mon, 14 May 2018 19:54:59 -0700 (PDT) Received: from localhost.localdomain (li1168-94.members.linode.com. [45.79.69.94]) by smtp.gmail.com with ESMTPSA id z129-v6sm17482561pfb.108.2018.05.14.19.54.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 May 2018 19:54:58 -0700 (PDT) From: Leo Yan To: Wei Xu , Rob Herring , Mark Rutland , Michael Turquette , Stephen Boyd , Jassi Brar , Arnd Bergmann , Olof Johansson , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 3/5] arm64: dts: hi3660: Add CPU frequency scaling support Date: Tue, 15 May 2018 10:53:13 +0800 Message-Id: <1526352795-6991-4-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526352795-6991-1-git-send-email-leo.yan@linaro.org> References: <1526352795-6991-1-git-send-email-leo.yan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add two CPU OPP tables, one table is corresponding to one cluster, which allow CPU frequency scaling on hi3660 platforms. Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) -- 1.9.1 diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index 3a3bcff..a39da09 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -62,6 +62,8 @@ next-level-cache = <&A53_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; + operating-points-v2 = <&cluster0_opp>; }; cpu1: cpu@1 { @@ -72,6 +74,8 @@ next-level-cache = <&A53_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; + operating-points-v2 = <&cluster0_opp>; }; cpu2: cpu@2 { @@ -82,6 +86,8 @@ next-level-cache = <&A53_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; + operating-points-v2 = <&cluster0_opp>; }; cpu3: cpu@3 { @@ -92,6 +98,8 @@ next-level-cache = <&A53_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; + operating-points-v2 = <&cluster0_opp>; }; cpu4: cpu@100 { @@ -102,6 +110,8 @@ next-level-cache = <&A73_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; + operating-points-v2 = <&cluster1_opp>; }; cpu5: cpu@101 { @@ -112,6 +122,8 @@ next-level-cache = <&A73_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; + operating-points-v2 = <&cluster1_opp>; }; cpu6: cpu@102 { @@ -122,6 +134,8 @@ next-level-cache = <&A73_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; + operating-points-v2 = <&cluster1_opp>; }; cpu7: cpu@103 { @@ -132,6 +146,8 @@ next-level-cache = <&A73_L2>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; + clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; + operating-points-v2 = <&cluster1_opp>; }; idle-states { @@ -174,6 +190,76 @@ }; }; + cluster0_opp: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp00 { + opp-hz = /bits/ 64 <533000000>; + opp-microvolt = <700000>; + clock-latency-ns = <300000>; + }; + + opp01 { + opp-hz = /bits/ 64 <999000000>; + opp-microvolt = <800000>; + clock-latency-ns = <300000>; + }; + + opp02 { + opp-hz = /bits/ 64 <1402000000>; + opp-microvolt = <900000>; + clock-latency-ns = <300000>; + }; + + opp03 { + opp-hz = /bits/ 64 <1709000000>; + opp-microvolt = <1000000>; + clock-latency-ns = <300000>; + }; + + opp04 { + opp-hz = /bits/ 64 <1844000000>; + opp-microvolt = <1100000>; + clock-latency-ns = <300000>; + }; + }; + + cluster1_opp: opp_table1 { + compatible = "operating-points-v2"; + opp-shared; + + opp10 { + opp-hz = /bits/ 64 <903000000>; + opp-microvolt = <700000>; + clock-latency-ns = <300000>; + }; + + opp11 { + opp-hz = /bits/ 64 <1421000000>; + opp-microvolt = <800000>; + clock-latency-ns = <300000>; + }; + + opp12 { + opp-hz = /bits/ 64 <1805000000>; + opp-microvolt = <900000>; + clock-latency-ns = <300000>; + }; + + opp13 { + opp-hz = /bits/ 64 <2112000000>; + opp-microvolt = <1000000>; + clock-latency-ns = <300000>; + }; + + opp14 { + opp-hz = /bits/ 64 <2362000000>; + opp-microvolt = <1100000>; + clock-latency-ns = <300000>; + }; + }; + gic: interrupt-controller@e82b0000 { compatible = "arm,gic-400"; reg = <0x0 0xe82b1000 0 0x1000>, /* GICD */