Skip to contentSkip to conversation

cpufreq: mediatek: Cleanup and support MT8183 and MT8186

PATCH In review Rex-BC Chen 2 participants 5 messages May 16, 2022 – May 17, 2022

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

v7 cover cpufreq: mediatek: Cleanup and support MT8183 and MT8186

Cpufreq is a DVFS driver used for power saving to scale the clock frequency and supply the voltage for CPUs. This series do some cleanup for MediaTek cpufreq drivers and add support for MediaTek SVS[2] and MediaTek CCI devfreq[3] which are supported in MT8183 and MT8186.

Changes for v7:
1. Drop all drviers patches because they are all accepted.
2. Correct clock/clock-name for cci in dts.

Changes for v6:
1. Reorder patches in this series.
2. Add a new patch to do unregister platform device.
3. Modify drivers from maintainer's advice.

Reference series:
[1]: V1 of this series is present by Jia-Wei Chang.

     https://lore.kernel.org/all/[email protected]/

[2]: The MediaTek CCI devfreq driver is introduced in another series.

     https://lore.kernel.org/all/[email protected]/

[3]: The MediaTek SVS driver is introduced in another series.

     https://lore.kernel.org/all/[email protected]/

Rex-BC Chen (3):
arm64: dts: mediatek: Add opp table and clock property for MT8183
cpufreq
arm64: dts: mediatek: Add MediaTek CCI node for MT8183
arm64: dts: mediatek: Add mediatek,cci property for MT8183 cpufreq

 arch/arm64/boot/dts/mediatek/mt8183-evb.dts   |  36 +++
 .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |   4 +
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      | 286 ++++++++++++++++++
 3 files changed, 326 insertions(+)
Signature · 1 line
2.18.0
#3 lore raw

PATCH v7 3/3 arm64: dts: mediatek: Add mediatek,cci property for MT8183 cpufreq

Add mediatek,cci property to support MediaTek CCI feature.

---
 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +8 -0
index 21ec9f1ef406..7c0ed2642b69 100644
@@ -337,6 +337,7 @@
 			operating-points-v2 = <&cluster0_opp>;
 			dynamic-power-coefficient = <84>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu1: cpu@1 {
@@ -352,6 +353,7 @@
 			operating-points-v2 = <&cluster0_opp>;
 			dynamic-power-coefficient = <84>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu2: cpu@2 {
@@ -367,6 +369,7 @@
 			operating-points-v2 = <&cluster0_opp>;
 			dynamic-power-coefficient = <84>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu3: cpu@3 {
@@ -382,6 +385,7 @@
 			operating-points-v2 = <&cluster0_opp>;
 			dynamic-power-coefficient = <84>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu4: cpu@100 {
@@ -397,6 +401,7 @@
 			operating-points-v2 = <&cluster1_opp>;
 			dynamic-power-coefficient = <211>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu5: cpu@101 {
@@ -412,6 +417,7 @@
 			operating-points-v2 = <&cluster1_opp>;
 			dynamic-power-coefficient = <211>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu6: cpu@102 {
@@ -427,6 +433,7 @@
 			operating-points-v2 = <&cluster1_opp>;
 			dynamic-power-coefficient = <211>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		cpu7: cpu@103 {
@@ -442,6 +449,7 @@
 			operating-points-v2 = <&cluster1_opp>;
 			dynamic-power-coefficient = <211>;
 			#cooling-cells = <2>;
+			mediatek,cci = <&cci>;
 		};
 
 		idle-states {
Signature · 1 line
2.18.0
#1 lore raw

PATCH v7 1/3 arm64: dts: mediatek: Add opp table and clock property for MT8183 cpufreq

In reply to Rex-BC Chen

- Add cpufreq opp table.
- Add MediaTek cci opp table.
- Add property of opp table and clock fro cpufreq.

---
 arch/arm64/boot/dts/mediatek/mt8183-evb.dts |  32 +++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi    | 270 ++++++++++++++++++++
 2 files changed, 302 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +32 -0
index f3fd3cca23e9..8953dbf84f3e 100644
@@ -412,6 +412,38 @@
 
 };
 
+&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";
 };
arch/arm64/boot/dts/mediatek/mt8183.dtsi +270 -0

324 lines not on this page · raw message

Signature · 1 line
2.18.0
#2 lore raw

PATCH v7 2/3 arm64: dts: mediatek: Add MediaTek CCI node for MT8183

In reply to Rex-BC Chen

Add MediaTek CCI devfreq node for MT8183.

---
 arch/arm64/boot/dts/mediatek/mt8183-evb.dts    | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi       | 8 ++++++++
 3 files changed, 16 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +4 -0
index 8953dbf84f3e..7ac9864db9de 100644
@@ -412,6 +412,10 @@
 
 };
 
+&cci {
+	proc-supply = <&mt6358_vproc12_reg>;
+};
+
 &cpu0 {
 	proc-supply = <&mt6358_vproc12_reg>;
 };
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +4 -0
index 8d5bf73a9099..b035e06840e6 100644
@@ -230,6 +230,10 @@
 	status = "okay";
 };
 
+&cci {
+	proc-supply = <&mt6358_vproc12_reg>;
+};
+
 &cpu0 {
 	proc-supply = <&mt6358_vproc12_reg>;
 };
arch/arm64/boot/dts/mediatek/mt8183.dtsi +8 -0
index cecf96b628b7..21ec9f1ef406 100644
@@ -280,6 +280,14 @@
 		};
 	};
 
+	cci: cci {
+		compatible = "mediatek,mt8183-cci";
+		clocks = <&mcucfg CLK_MCU_BUS_SEL>,
+			 <&topckgen CLK_TOP_ARMPLL_DIV_PLL1>;
+		clock-names = "cci", "intermediate";
+		operating-points-v2 = <&cci_opp>;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
Signature · 1 line
2.18.0
maintainer
#4 lore raw
In reply to Rex-BC Chen
Quoted 5 lines · Rex-BC Chen

Cpufreq is a DVFS driver used for power saving to scale the clock frequency and supply the voltage for CPUs. This series do some cleanup for MediaTek cpufreq drivers and add support for MediaTek SVS[2] and MediaTek CCI devfreq[3] which are supported in MT8183 and MT8186.

Series applied to v5.19-next/dts64

Thanks!

Quoted 25 lines

Changes for v7:
1. Drop all drviers patches because they are all accepted.
2. Correct clock/clock-name for cci in dts.

Changes for v6:
1. Reorder patches in this series.
2. Add a new patch to do unregister platform device.
3. Modify drivers from maintainer's advice.

Reference series:
[1]: V1 of this series is present by Jia-Wei Chang.

      https://lore.kernel.org/all/[email protected]/

[2]: The MediaTek CCI devfreq driver is introduced in another series.

      https://lore.kernel.org/all/[email protected]/

[3]: The MediaTek SVS driver is introduced in another series.

      https://lore.kernel.org/all/[email protected]/

Rex-BC Chen (3):
arm64: dts: mediatek: Add opp table and clock property for MT8183
cpufreq
arm64: dts: mediatek: Add MediaTek CCI node for MT8183
arm64: dts: mediatek: Add mediatek,cci property for MT8183 cpufreq

Quoted 5 lines
  arch/arm64/boot/dts/mediatek/mt8183-evb.dts   |  36 +++
  .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |   4 +
  arch/arm64/boot/dts/mediatek/mt8183.dtsi      | 286 ++++++++++++++++++
  3 files changed, 326 insertions(+)

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek