Skip to contentSkip to conversation

arm64: dts: mediatek: Add cpufreq nodes for MT8192

PATCH In review Allen-KH Cheng 5 participants 5 messages Mar 17, 2023 – May 31, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 arm64: dts: mediatek: Add cpufreq nodes for MT8192

Add the cpufreq nodes for MT8192 SoC.

---
Change from v2:
Fix wrong performance-domains [Allen-KH Cheng <[email protected]>]
---

---
 arch/arm64/boot/dts/mediatek/mt8192.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +14 -0
index 87b91c8feaf9..ba49f37933d6 100644
@@ -70,6 +70,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <128>;
 			next-level-cache = <&l2_0>;
+			performance-domains = <&performance 0>;
 			capacity-dmips-mhz = <530>;
 		};
 
@@ -87,6 +88,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <128>;
 			next-level-cache = <&l2_0>;
+			performance-domains = <&performance 0>;
 			capacity-dmips-mhz = <530>;
 		};
 
@@ -104,6 +106,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <128>;
 			next-level-cache = <&l2_0>;
+			performance-domains = <&performance 0>;
 			capacity-dmips-mhz = <530>;
 		};
 
@@ -121,6 +124,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <128>;
 			next-level-cache = <&l2_0>;
+			performance-domains = <&performance 0>;
 			capacity-dmips-mhz = <530>;
 		};
 
@@ -138,6 +142,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <256>;
 			next-level-cache = <&l2_1>;
+			performance-domains = <&performance 1>;
 			capacity-dmips-mhz = <1024>;
 		};
 
@@ -155,6 +160,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <256>;
 			next-level-cache = <&l2_1>;
+			performance-domains = <&performance 1>;
 			capacity-dmips-mhz = <1024>;
 		};
 
@@ -172,6 +178,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <256>;
 			next-level-cache = <&l2_1>;
+			performance-domains = <&performance 1>;
 			capacity-dmips-mhz = <1024>;
 		};
 
@@ -189,6 +196,7 @@
 			d-cache-line-size = <64>;
 			d-cache-sets = <256>;
 			next-level-cache = <&l2_1>;
+			performance-domains = <&performance 1>;
 			capacity-dmips-mhz = <1024>;
 		};
 
@@ -318,6 +326,12 @@
 		compatible = "simple-bus";
 		ranges;
 
+		performance: performance-controller@11bc10 {
+			compatible = "mediatek,cpufreq-hw";
+			reg = <0 0x0011bc10 0 0x120>, <0 0x0011bd30 0 0x120>;
+			#performance-domain-cells = <1>;
+		};
+
 		gic: interrupt-controller@c000000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <4>;
Signature · 1 line
2.18.0
Reviewed-by Tested-by on v3 1/1
#2 lore raw
In reply to Allen-KH Cheng
Quoted 3 lines · Allen-KH Cheng

Add the cpufreq nodes for MT8192 SoC.

Tested on Asurada Spherion Chromebook as well. In particular, verified that applying this commit makes suspend/resume work. Before, it would hang during resume:

	Enabling non-boot CPUs ...
	Detected VIPT I-cache on CPU1
	GICv3: CPU1: found redistributor 100 region 0:0x000000000c060000
	CPU1: Booted secondary processor 0x0000000100 [0x412fd050]

But with this commit applied the machine is able to proceed bringing up the secondary processors and complete resume.

Thanks,
Nícolas

Tested-by
#3 lore raw
Quoted 13 lines · Nícolas F. R. A. Prado
Quoted 3 lines · Allen-KH Cheng

Add the cpufreq nodes for MT8192 SoC.

Tested on Asurada Spherion Chromebook as well. In particular, verified that applying this commit makes suspend/resume work. Before, it would hang during resume:

Quoted 7 lines

Enabling non-boot CPUs ...
Detected VIPT I-cache on CPU1
GICv3: CPU1: found redistributor 100 region 0:0x000000000c060000
CPU1: Booted secondary processor 0x0000000100 [0x412fd050]

But with this commit applied the machine is able to proceed bringing up the secondary processors and complete resume.

Ping on this patch.

maintainer
#4 lore raw
Quoted 20 lines · Chen-Yu Tsai
Quoted 18 lines · Nícolas F. R. A. Prado
Quoted 3 lines · Allen-KH Cheng

Add the cpufreq nodes for MT8192 SoC.

Tested on Asurada Spherion Chromebook as well. In particular, verified that applying this commit makes suspend/resume work. Before, it would hang during resume:

Enabling non-boot CPUs ...
Detected VIPT I-cache on CPU1
GICv3: CPU1: found redistributor 100 region 0:0x000000000c060000
CPU1: Booted secondary processor 0x0000000100 [0x412fd050]

Quoted 6 lines
Quoted 2 lines

But with this commit applied the machine is able to proceed bringing up the secondary processors and complete resume.

Ping on this patch.

Applied now, thanks for the ping.

Regards,
Matthias