mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-22 18:02:46 +00:00
Backport CPUFreq patch and enable RPM. This is to enable CPU Frequency scaling and regulators. Link: https://github.com/openwrt/openwrt/pull/17725 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
111 lines
3.0 KiB
Diff
111 lines
3.0 KiB
Diff
From b36074357baf2794c825ea1c145de1d22b15380b Mon Sep 17 00:00:00 2001
|
|
From: Varadarajan Narayanan <quic_varada@quicinc.com>
|
|
Date: Fri, 20 Oct 2023 11:49:39 +0530
|
|
Subject: [PATCH] arm64: dts: qcom: ipq9574: populate the opp table based on
|
|
the eFuse
|
|
|
|
IPQ95xx SoCs have different OPPs available for the CPU based on
|
|
SoC variant. This can be determined from an eFuse register
|
|
present in the silicon.
|
|
|
|
Add support to read the eFuse and populate the OPPs based on it.
|
|
|
|
Frequency 1.2GHz 1.8GHz 1.5GHz No opp-supported-hw
|
|
Limit
|
|
------------------------------------------------------------
|
|
936000000 1 1 1 1 0xf
|
|
1104000000 1 1 1 1 0xf
|
|
1200000000 1 1 1 1 0xf
|
|
1416000000 0 1 1 1 0x7
|
|
1488000000 0 1 1 1 0x7
|
|
1800000000 0 1 0 1 0x5
|
|
2208000000 0 0 0 1 0x1
|
|
-----------------------------------------------------------
|
|
|
|
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
|
|
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
|
|
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
|
|
Link: https://lore.kernel.org/r/14ab08b7cfd904433ca6065fac798d4f221c9d95.1697781921.git.quic_varada@quicinc.com
|
|
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
|
---
|
|
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 21 ++++++++++++++++++++-
|
|
1 file changed, 20 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
|
|
index 8a72ad4afd03..d4b7e215fc92 100644
|
|
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
|
|
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
|
|
@@ -106,42 +106,56 @@ memory@40000000 {
|
|
};
|
|
|
|
cpu_opp_table: opp-table-cpu {
|
|
- compatible = "operating-points-v2";
|
|
+ compatible = "operating-points-v2-kryo-cpu";
|
|
opp-shared;
|
|
+ nvmem-cells = <&cpu_speed_bin>;
|
|
|
|
opp-936000000 {
|
|
opp-hz = /bits/ 64 <936000000>;
|
|
opp-microvolt = <725000>;
|
|
+ opp-supported-hw = <0xf>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
|
|
opp-1104000000 {
|
|
opp-hz = /bits/ 64 <1104000000>;
|
|
opp-microvolt = <787500>;
|
|
+ opp-supported-hw = <0xf>;
|
|
+ clock-latency-ns = <200000>;
|
|
+ };
|
|
+
|
|
+ opp-1200000000 {
|
|
+ opp-hz = /bits/ 64 <1200000000>;
|
|
+ opp-microvolt = <862500>;
|
|
+ opp-supported-hw = <0xf>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
|
|
opp-1416000000 {
|
|
opp-hz = /bits/ 64 <1416000000>;
|
|
opp-microvolt = <862500>;
|
|
+ opp-supported-hw = <0x7>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
|
|
opp-1488000000 {
|
|
opp-hz = /bits/ 64 <1488000000>;
|
|
opp-microvolt = <925000>;
|
|
+ opp-supported-hw = <0x7>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
|
|
opp-1800000000 {
|
|
opp-hz = /bits/ 64 <1800000000>;
|
|
opp-microvolt = <987500>;
|
|
+ opp-supported-hw = <0x5>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
|
|
opp-2208000000 {
|
|
opp-hz = /bits/ 64 <2208000000>;
|
|
opp-microvolt = <1062500>;
|
|
+ opp-supported-hw = <0x1>;
|
|
clock-latency-ns = <200000>;
|
|
};
|
|
};
|
|
@@ -223,6 +237,11 @@ qfprom: efuse@a4000 {
|
|
reg = <0x000a4000 0x5a1>;
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
+
|
|
+ cpu_speed_bin: cpu-speed-bin@15 {
|
|
+ reg = <0x15 0x2>;
|
|
+ bits = <7 2>;
|
|
+ };
|
|
};
|
|
|
|
cryptobam: dma-controller@704000 {
|
|
--
|
|
2.45.2
|
|
|