forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patchset adds support for DVFS on the IPQ8074 family. Its split into HK and AC CPU DTSI as they have different clocks and voltages. Currently, a static voltage map is used instead of the CPR as there is no driver for it to dynamically adjust each range based on the load. Signed-off-by: Robert Marko <robimarko@gmail.com>
- Loading branch information
Showing
10 changed files
with
606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-ac-cpu.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
|
||
&CPU0 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU1 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU2 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU3 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&cpus { | ||
cpu_opp_table: cpu_opp_table { | ||
compatible = "operating-points-v2"; | ||
opp-shared; | ||
|
||
opp-1017600000 { | ||
opp-hz = /bits/ 64 <1017600000>; | ||
opp-microvolt = <704000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-1382400000 { | ||
opp-hz = /bits/ 64 <1382400000>; | ||
opp-microvolt = <824000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
}; | ||
}; |
55 changes: 55 additions & 0 deletions
55
target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-hk-cpu.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
|
||
&CPU0 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU1 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU2 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&CPU3 { | ||
operating-points-v2 = <&cpu_opp_table>; | ||
}; | ||
|
||
&cpus { | ||
cpu_opp_table: cpu_opp_table { | ||
compatible = "operating-points-v2"; | ||
opp-shared; | ||
|
||
opp-1017600000 { | ||
opp-hz = /bits/ 64 <1017600000>; | ||
opp-microvolt = <704000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-1382400000 { | ||
opp-hz = /bits/ 64 <1382400000>; | ||
opp-microvolt = <784000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-1651200000 { | ||
opp-hz = /bits/ 64 <1651200000>; | ||
opp-microvolt = <832000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-1843200000 { | ||
opp-hz = /bits/ 64 <1843200000>; | ||
opp-microvolt = <880000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-1920000000 { | ||
opp-hz = /bits/ 64 <1920000000>; | ||
opp-microvolt = <904000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
opp-2208000000 { | ||
opp-hz = /bits/ 64 <2208000000>; | ||
opp-microvolt = <984000>; | ||
clock-latency-ns = <200000>; | ||
}; | ||
}; | ||
}; |
54 changes: 54 additions & 0 deletions
54
target/linux/ipq807x/patches-5.15/0130-clk-qcom-clk-alpha-pll-add-support-for-APSS-PLL.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 5a127450125f71247b7384930459b892da227e28 Mon Sep 17 00:00:00 2001 | ||
From: Robert Marko <robimarko@gmail.com> | ||
Date: Tue, 28 Dec 2021 20:32:46 +0100 | ||
Subject: [PATCH] clk: qcom: clk-alpha-pll: add support for APSS PLL | ||
|
||
APSS PLL type will be used by the IPQ8074 APSS driver for providing the | ||
CPU core clocks and enabling CPU Frequency scaling. | ||
|
||
This is ported from the downstream 5.4 kernel. | ||
|
||
Signed-off-by: Robert Marko <robimarko@gmail.com> | ||
--- | ||
drivers/clk/qcom/clk-alpha-pll.c | 12 ++++++++++++ | ||
drivers/clk/qcom/clk-alpha-pll.h | 1 + | ||
2 files changed, 13 insertions(+) | ||
|
||
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c | ||
index 8f65b9bdafce..d2c3eb4cf4af 100644 | ||
--- a/drivers/clk/qcom/clk-alpha-pll.c | ||
+++ b/drivers/clk/qcom/clk-alpha-pll.c | ||
@@ -139,6 +139,18 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { | ||
[PLL_OFF_OPMODE] = 0x28, | ||
[PLL_OFF_STATUS] = 0x38, | ||
}, | ||
+ [CLK_ALPHA_PLL_TYPE_APSS] = { | ||
+ [PLL_OFF_L_VAL] = 0x08, | ||
+ [PLL_OFF_ALPHA_VAL] = 0x10, | ||
+ [PLL_OFF_ALPHA_VAL_U] = 0xff, | ||
+ [PLL_OFF_USER_CTL] = 0x18, | ||
+ [PLL_OFF_USER_CTL_U] = 0xff, | ||
+ [PLL_OFF_CONFIG_CTL] = 0x20, | ||
+ [PLL_OFF_CONFIG_CTL_U] = 0x24, | ||
+ [PLL_OFF_TEST_CTL] = 0x30, | ||
+ [PLL_OFF_TEST_CTL_U] = 0x34, | ||
+ [PLL_OFF_STATUS] = 0x28, | ||
+ }, | ||
}; | ||
EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); | ||
|
||
diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h | ||
index 55e4fa47912f..45e4b93253a9 100644 | ||
--- a/drivers/clk/qcom/clk-alpha-pll.h | ||
+++ b/drivers/clk/qcom/clk-alpha-pll.h | ||
@@ -17,6 +17,7 @@ enum { | ||
CLK_ALPHA_PLL_TYPE_LUCID = CLK_ALPHA_PLL_TYPE_TRION, | ||
CLK_ALPHA_PLL_TYPE_AGERA, | ||
CLK_ALPHA_PLL_TYPE_ZONDA, | ||
+ CLK_ALPHA_PLL_TYPE_APSS, | ||
CLK_ALPHA_PLL_TYPE_MAX, | ||
}; | ||
|
||
-- | ||
2.35.1 | ||
|
36 changes: 36 additions & 0 deletions
36
...inux/ipq807x/patches-5.15/0131-clk-qcom-Add-DT-bindings-for-IPQ8074-APSS-clock-cont.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From ab17c6d31f07271b42c6c36c9ad785bdc2871e62 Mon Sep 17 00:00:00 2001 | ||
From: Robert Marko <robimarko@gmail.com> | ||
Date: Tue, 28 Dec 2021 20:36:45 +0100 | ||
Subject: [PATCH] clk: qcom: Add DT bindings for IPQ8074 APSS clock controller | ||
|
||
Add DT-binding for the IPQ8074 APSS clock controller. | ||
|
||
Signed-off-by: Robert Marko <robimarko@gmail.com> | ||
--- | ||
include/dt-bindings/clock/qcom,apss-ipq8074.h | 14 ++++++++++++++ | ||
1 file changed, 14 insertions(+) | ||
create mode 100644 include/dt-bindings/clock/qcom,apss-ipq8074.h | ||
|
||
diff --git a/include/dt-bindings/clock/qcom,apss-ipq8074.h b/include/dt-bindings/clock/qcom,apss-ipq8074.h | ||
new file mode 100644 | ||
index 000000000000..df07766b0146 | ||
--- /dev/null | ||
+++ b/include/dt-bindings/clock/qcom,apss-ipq8074.h | ||
@@ -0,0 +1,14 @@ | ||
+/* SPDX-License-Identifier: GPL-2.0 */ | ||
+/* | ||
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved. | ||
+ */ | ||
+ | ||
+#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ8074_H | ||
+#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ8074_H | ||
+ | ||
+#define APSS_PLL_EARLY 0 | ||
+#define APSS_PLL 1 | ||
+#define APCS_ALIAS0_CLK_SRC 2 | ||
+#define APCS_ALIAS0_CORE_CLK 3 | ||
+ | ||
+#endif | ||
-- | ||
2.35.1 | ||
|
Oops, something went wrong.