linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@somainline.org>
To: ~postmarketos/upstreaming@lists.sr.ht
Cc: martin.botka@somainline.org,
	angelogioacchino.delregno@somainline.org,
	marijn.suijten@somainline.org, jamipkettunen@somainline.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 08/17] arm64: dts: qcom: sm6350: Add cpufreq-hw support
Date: Fri, 20 Aug 2021 22:49:17 +0200	[thread overview]
Message-ID: <20210820204926.235192-9-konrad.dybcio@somainline.org> (raw)
In-Reply-To: <20210820204926.235192-1-konrad.dybcio@somainline.org>

Add cpufreq-hw node and assign qcom,freq-domain properties to CPUs to enable
CPU clock scaling.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index e70b1f09a488..f7965d5fb341 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -41,6 +41,7 @@ CPU0: cpu@0 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_0>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_0: l2-cache {
 				compatible = "cache";
@@ -59,6 +60,7 @@ CPU1: cpu@100 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_100>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_100: l2-cache {
 				compatible = "cache";
@@ -74,6 +76,7 @@ CPU2: cpu@200 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_200>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_200: l2-cache {
 				compatible = "cache";
@@ -89,6 +92,7 @@ CPU3: cpu@300 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_300>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_300: l2-cache {
 				compatible = "cache";
@@ -104,6 +108,7 @@ CPU4: cpu@400 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_400>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_400: l2-cache {
 				compatible = "cache";
@@ -119,6 +124,7 @@ CPU5: cpu@500 {
 			capacity-dmips-mhz = <1024>;
 			dynamic-power-coefficient = <100>;
 			next-level-cache = <&L2_500>;
+			qcom,freq-domain = <&cpufreq_hw 0>;
 			#cooling-cells = <2>;
 			L2_500: l2-cache {
 				compatible = "cache";
@@ -135,6 +141,7 @@ CPU6: cpu@600 {
 			capacity-dmips-mhz = <1894>;
 			dynamic-power-coefficient = <703>;
 			next-level-cache = <&L2_600>;
+			qcom,freq-domain = <&cpufreq_hw 1>;
 			#cooling-cells = <2>;
 			L2_600: l2-cache {
 				compatible = "cache";
@@ -150,6 +157,7 @@ CPU7: cpu@700 {
 			capacity-dmips-mhz = <1894>;
 			dynamic-power-coefficient = <703>;
 			next-level-cache = <&L2_700>;
+			qcom,freq-domain = <&cpufreq_hw 1>;
 			#cooling-cells = <2>;
 			L2_700: l2-cache {
 				compatible = "cache";
@@ -622,6 +630,16 @@ rpmhcc: clock-controller {
 				clocks = <&xo_board>;
 			};
 		};
+
+		cpufreq_hw: cpufreq@18323000 {
+			compatible = "qcom,cpufreq-hw";
+			reg = <0 0x18323000 0 0x1000>, <0 0x18325800 0 0x1000>;
+			reg-names = "freq-domain0", "freq-domain1";
+			clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
+			clock-names = "xo", "alternate";
+
+			#freq-domain-cells = <1>;
+		};
 	};
 
 	timer {
-- 
2.33.0


  parent reply	other threads:[~2021-08-20 20:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210820204926.235192-1-konrad.dybcio@somainline.org>
2021-08-20 20:49 ` [PATCH 02/17] arm64: dts: qcom: Add SM6350 device tree Konrad Dybcio
2021-08-21 14:55   ` Konrad Dybcio
2021-09-14 16:08   ` Bjorn Andersson
2021-08-20 20:49 ` [PATCH 03/17] arm64: dts: qcom: sm6350: Add LLCC node Konrad Dybcio
2021-08-20 20:49 ` [PATCH 04/17] arm64: dts: qcom: sm6350: Add RPMHCC node Konrad Dybcio
2021-08-20 20:49 ` [PATCH 05/17] arm64: dts: qcom: sm6350: Add GCC node Konrad Dybcio
2021-08-20 20:49 ` [PATCH 06/17] arm64: dts: qcom: sm6350: Add TLMM block node Konrad Dybcio
2021-08-20 20:49 ` [PATCH 07/17] arm64: dts: qcom: sm6350: Add USB1 nodes Konrad Dybcio
2021-08-20 20:49 ` Konrad Dybcio [this message]
2021-08-20 20:49 ` [PATCH 09/17] arm64: dts: qcom: sm6350: Add TSENS nodes Konrad Dybcio
2021-08-20 20:49 ` [PATCH 10/17] arm64: dts: qcom: sm6350: Add AOSS_QMP Konrad Dybcio
2021-08-20 20:49 ` [PATCH 11/17] arm64: dts: qcom: sm6350: Add SPMI bus Konrad Dybcio
2021-08-20 20:49 ` [PATCH 12/17] arm64: dts: qcom: sm6350: Add PRNG node Konrad Dybcio
2021-08-20 20:49 ` [PATCH 13/17] arm64: dts: qcom: sm6350: Add RPMHPD and BCM voter Konrad Dybcio
2021-08-20 20:49 ` [PATCH 14/17] arm64: dts: qcom: sm6350: Add SDHCI1/2 nodes Konrad Dybcio
2021-08-20 20:49 ` [PATCH 15/17] arm64: dts: qcom: sm6350: Add apps_smmu Konrad Dybcio
2021-08-20 20:49 ` [PATCH 16/17] arm64: dts: qcom: sm6350: Add iommus property to USB1 Konrad Dybcio
2021-08-20 20:49 ` [PATCH 17/17] arm64: dts: qcom: Add device tree for Sony Xperia 10 III Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210820204926.235192-9-konrad.dybcio@somainline.org \
    --to=konrad.dybcio@somainline.org \
    --cc=agross@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jamipkettunen@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=robh+dt@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).