linux-kernel.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 v3 08/17] arm64: dts: qcom: sm6350: Add cpufreq-hw support
Date: Thu, 23 Sep 2021 18:21:54 +0200	[thread overview]
Message-ID: <20210923162204.21752-8-konrad.dybcio@somainline.org> (raw)
In-Reply-To: <20210923162204.21752-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 ad755a16310a..582915d2b4f0 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -42,6 +42,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";
@@ -60,6 +61,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";
@@ -75,6 +77,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";
@@ -90,6 +93,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";
@@ -105,6 +109,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";
@@ -120,6 +125,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";
@@ -136,6 +142,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";
@@ -151,6 +158,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";
@@ -621,6 +629,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-09-23 16:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23 16:21 [PATCH v3 01/17] dt-bindings: arm: cpus: Add Kryo 560 CPUs Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 02/17] arm64: dts: qcom: Add SM6350 device tree Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 03/17] arm64: dts: qcom: sm6350: Add LLCC node Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 04/17] arm64: dts: qcom: sm6350: Add RPMHCC node Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 05/17] arm64: dts: qcom: sm6350: Add GCC node Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 06/17] arm64: dts: qcom: sm6350: Add TLMM block node Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 07/17] arm64: dts: qcom: sm6350: Add USB1 nodes Konrad Dybcio
2021-09-23 16:21 ` Konrad Dybcio [this message]
2021-09-23 16:21 ` [PATCH v3 09/17] arm64: dts: qcom: sm6350: Add TSENS nodes Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 10/17] arm64: dts: qcom: sm6350: Add AOSS_QMP Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 11/17] arm64: dts: qcom: sm6350: Add SPMI bus Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 12/17] arm64: dts: qcom: sm6350: Add PRNG node Konrad Dybcio
2021-09-23 16:21 ` [PATCH v3 13/17] arm64: dts: qcom: sm6350: Add RPMHPD and BCM voter Konrad Dybcio
2021-09-23 16:22 ` [PATCH v3 14/17] arm64: dts: qcom: sm6350: Add SDHCI1/2 nodes Konrad Dybcio
2021-09-23 16:22 ` [PATCH v3 15/17] arm64: dts: qcom: sm6350: Add apps_smmu and assign iommus prop to USB1 Konrad Dybcio
2021-09-23 16:22 ` [PATCH v3 16/17] arm64: dts: qcom: Add device tree for Sony Xperia 10 III Konrad Dybcio
2021-09-23 16:22 ` [PATCH v3 17/17] arm64: dts: qcom: pm6150l: Add missing include Konrad Dybcio
2021-09-23 16:50 ` [PATCH v3 01/17] dt-bindings: arm: cpus: Add Kryo 560 CPUs Rob Herring
2021-09-23 16:51   ` Konrad Dybcio
2021-09-27 22:56 ` Bjorn Andersson

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=20210923162204.21752-8-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).