From patchwork Wed May 8 02:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "andrew-sh.cheng" X-Patchwork-Id: 10934123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D6ED1390 for ; Wed, 8 May 2019 02:42:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AA0928901 for ; Wed, 8 May 2019 02:42:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E82F2890A; Wed, 8 May 2019 02:42:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB60228927 for ; Wed, 8 May 2019 02:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SvSbcZ2ewoNpTDFZ21LFGlWQ6UK8bDVo5V88hyCigow=; b=JwRyrZOpY+nsI4 S861EBW36zy6As91NJji/n42dnU1bcPT3uZYRAxIlQBn5j9oQyCnlvW2ZN0QIc3Etq3JT6fgyOMX5 tXMRKeBB49eBPeKFVEcanxtarSVeeIFFy6PyiGnNJSa2gojTGyDdCHqd79O2xTDIYNXYcq1Q4Xzlf go1bixaQwaQcW4tjUZa09rpvM1bnriLjTH1k8Um8V8qGdZJYnELZo1jHP4L5480fRva8LsEUMe//x 4dNsFwIibnksvVi0jh8WTZgtgnUKqDwOZE+nAaizWXDjYmFFYlQYJpMNuJwLBlhLhVFWn7YbRukZ1 TKkJgmv8ymHEWTk7qwlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOCXo-0005AY-Mg; Wed, 08 May 2019 02:42:56 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOCXh-000539-3D; Wed, 08 May 2019 02:42:50 +0000 X-UUID: c90a60dd8b574413938f296a8466436f-20190507 X-UUID: c90a60dd8b574413938f296a8466436f-20190507 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1316383185; Tue, 07 May 2019 18:42:12 -0800 Received: from MTKMBS02N1.mediatek.inc (172.21.101.77) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 7 May 2019 19:42:10 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 8 May 2019 10:42:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 8 May 2019 10:42:08 +0800 From: Andrew-sh.Cheng To: Rob Herring , Mark Rutland , Matthias Brugger Subject: [PATCH v2] arm64: dts: mediatek: add cpufreq and cci devfreq nodes for mt8183 Date: Wed, 8 May 2019 10:42:06 +0800 Message-ID: <1557283326-6739-1-git-send-email-andrew-sh.cheng@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190507_194249_144340_193F575B X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Andrew-sh.Cheng" Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Andrew-sh.Cheng" add cpufreq and cci devfreq nodes for mt8183 Signed-off-by: Andrew-sh.Cheng --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 36 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 245 ++++++++++++++++++++++++++++ 2 files changed, 281 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index 9b525597e5ec..27a4f96324a4 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -26,6 +26,42 @@ }; }; +&cci { + proc-supply = <&mt6358_vproc12_reg>; +}; + +&cpu0 { + proc-supply = <&mt6358_vproc12_reg>; +}; + +&cpu1 { + proc-supply = <&mt6358_vproc12_reg>; +}; + +&cpu2 { + proc-supply = <&mt6358_vproc12_reg>; +}; + +&cpu3 { + proc-supply = <&mt6358_vproc12_reg>; +}; + +&cpu4 { + proc-supply = <&mt6358_vproc11_reg>; +}; + +&cpu5 { + proc-supply = <&mt6358_vproc11_reg>; +}; + +&cpu6 { + proc-supply = <&mt6358_vproc11_reg>; +}; + +&cpu7 { + proc-supply = <&mt6358_vproc11_reg>; +}; + &uart0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 75c4881bbe5e..a2cdf8db13fe 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -16,6 +16,219 @@ #address-cells = <2>; #size-cells = <2>; + cluster0_opp: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + opp00 { + opp-hz = /bits/ 64 <793000000>; + opp-microvolt = <650000>; + }; + opp01 { + opp-hz = /bits/ 64 <910000000>; + opp-microvolt = <687500>; + }; + opp02 { + opp-hz = /bits/ 64 <1014000000>; + opp-microvolt = <718750>; + }; + opp03 { + opp-hz = /bits/ 64 <1131000000>; + opp-microvolt = <756250>; + }; + opp04 { + opp-hz = /bits/ 64 <1248000000>; + opp-microvolt = <800000>; + }; + opp05 { + opp-hz = /bits/ 64 <1326000000>; + opp-microvolt = <818750>; + }; + opp06 { + opp-hz = /bits/ 64 <1417000000>; + opp-microvolt = <850000>; + }; + opp07 { + opp-hz = /bits/ 64 <1508000000>; + opp-microvolt = <868750>; + }; + opp08 { + opp-hz = /bits/ 64 <1586000000>; + opp-microvolt = <893750>; + }; + opp09 { + opp-hz = /bits/ 64 <1625000000>; + opp-microvolt = <906250>; + }; + opp10 { + opp-hz = /bits/ 64 <1677000000>; + opp-microvolt = <931250>; + }; + opp11 { + opp-hz = /bits/ 64 <1716000000>; + opp-microvolt = <943750>; + }; + opp12 { + opp-hz = /bits/ 64 <1781000000>; + opp-microvolt = <975000>; + }; + opp13 { + opp-hz = /bits/ 64 <1846000000>; + opp-microvolt = <1000000>; + }; + opp14 { + opp-hz = /bits/ 64 <1924000000>; + opp-microvolt = <1025000>; + }; + opp15 { + opp-hz = /bits/ 64 <1989000000>; + opp-microvolt = <1050000>; + }; }; + + cluster1_opp: opp_table1 { + compatible = "operating-points-v2"; + opp-shared; + opp00 { + opp-hz = /bits/ 64 <793000000>; + opp-microvolt = <650000>; + }; + opp01 { + opp-hz = /bits/ 64 <910000000>; + opp-microvolt = <675000>; + }; + opp02 { + opp-hz = /bits/ 64 <1014000000>; + opp-microvolt = <700000>; + }; + opp03 { + opp-hz = /bits/ 64 <1131000000>; + opp-microvolt = <725000>; + }; + opp04 { + opp-hz = /bits/ 64 <1248000000>; + opp-microvolt = <750000>; + }; + opp05 { + opp-hz = /bits/ 64 <1326000000>; + opp-microvolt = <775000>; + }; + opp06 { + opp-hz = /bits/ 64 <1417000000>; + opp-microvolt = <800000>; + }; + opp07 { + opp-hz = /bits/ 64 <1508000000>; + opp-microvolt = <825000>; + }; + opp08 { + opp-hz = /bits/ 64 <1586000000>; + opp-microvolt = <850000>; + }; + opp09 { + opp-hz = /bits/ 64 <1625000000>; + opp-microvolt = <862500>; + }; + opp10 { + opp-hz = /bits/ 64 <1677000000>; + opp-microvolt = <881250>; + }; + opp11 { + opp-hz = /bits/ 64 <1716000000>; + opp-microvolt = <900000>; + }; + opp12 { + opp-hz = /bits/ 64 <1781000000>; + opp-microvolt = <925000>; + }; + opp13 { + opp-hz = /bits/ 64 <1846000000>; + opp-microvolt = <950000>; + }; + opp14 { + opp-hz = /bits/ 64 <1924000000>; + opp-microvolt = <975000>; + }; + opp15 { + opp-hz = /bits/ 64 <1989000000>; + opp-microvolt = <1000000>; + }; + }; + + cci_opp: opp_table2 { + compatible = "operating-points-v2"; + opp-shared; + opp00 { + opp-hz = /bits/ 64 <273000000>; + opp-microvolt = <650000>; + }; + opp01 { + opp-hz = /bits/ 64 <338000000>; + opp-microvolt = <687500>; + }; + opp02 { + opp-hz = /bits/ 64 <403000000>; + opp-microvolt = <718750>; + }; + opp03 { + opp-hz = /bits/ 64 <463000000>; + opp-microvolt = <756250>; + }; + opp04 { + opp-hz = /bits/ 64 <546000000>; + opp-microvolt = <800000>; + }; + opp05 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <818750>; + }; + opp06 { + opp-hz = /bits/ 64 <689000000>; + opp-microvolt = <850000>; + }; + opp07 { + opp-hz = /bits/ 64 <767000000>; + opp-microvolt = <868750>; + }; + opp08 { + opp-hz = /bits/ 64 <845000000>; + opp-microvolt = <893750>; + }; + opp09 { + opp-hz = /bits/ 64 <871000000>; + opp-microvolt = <906250>; + }; + opp10 { + opp-hz = /bits/ 64 <923000000>; + opp-microvolt = <931250>; + }; + opp11 { + opp-hz = /bits/ 64 <962000000>; + opp-microvolt = <943750>; + }; + opp12 { + opp-hz = /bits/ 64 <1027000000>; + opp-microvolt = <975000>; + }; + opp13 { + opp-hz = /bits/ 64 <1092000000>; + opp-microvolt = <1000000>; + }; + opp14 { + opp-hz = /bits/ 64 <1144000000>; + opp-microvolt = <1025000>; + }; + opp15 { + opp-hz = /bits/ 64 <1196000000>; + opp-microvolt = <1050000>; + }; + }; + + cci: cci { + compatible = "mediatek,mt8183-cci"; + clocks = <&apmixedsys CLK_APMIXED_CCIPLL>; + clock-names = "cci_clock"; + operating-points-v2 = <&cci_opp>; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -57,6 +270,10 @@ compatible = "arm,cortex-a53"; reg = <0x000>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP0_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu1: cpu@1 { @@ -64,6 +281,10 @@ compatible = "arm,cortex-a53"; reg = <0x001>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP0_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu2: cpu@2 { @@ -71,6 +292,10 @@ compatible = "arm,cortex-a53"; reg = <0x002>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP0_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu3: cpu@3 { @@ -78,6 +303,10 @@ compatible = "arm,cortex-a53"; reg = <0x003>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP0_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster0_opp>; }; cpu4: cpu@100 { @@ -85,6 +314,10 @@ compatible = "arm,cortex-a73"; reg = <0x100>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP2_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; }; cpu5: cpu@101 { @@ -92,6 +325,10 @@ compatible = "arm,cortex-a73"; reg = <0x101>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP2_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; }; cpu6: cpu@102 { @@ -99,6 +336,10 @@ compatible = "arm,cortex-a73"; reg = <0x102>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP2_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; }; cpu7: cpu@103 { @@ -106,6 +347,10 @@ compatible = "arm,cortex-a73"; reg = <0x103>; enable-method = "psci"; + clocks = <&mcucfg CLK_MCU_MP2_SEL>, + <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>; + clock-names = "cpu", "intermediate"; + operating-points-v2 = <&cluster1_opp>; }; };