From 84c08cc0c4d780c872b8f947c20724322c8e0ef3 Mon Sep 17 00:00:00 2001 From: aiamadeus <42570690+aiamadeus@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:09:01 +0800 Subject: [PATCH] ipq60xx: replace cpufreq with latest series --- .../boot/dts/qcom/ipq6000-ax5-jdcloud.dts | 1 - ...rm64-dts-qcom-ipq6018-rework-cpufreq.patch | 25 ++-- ...rm64-dts-qcom-ipq6018-rework-cpufreq.patch | 126 ++++++++++++++++++ ...dts-qcom-ipq6018-add-LDOA2-regulator.patch | 26 ---- ...pq6018-change-voltage-to-perf-levels.patch | 65 --------- 5 files changed, 141 insertions(+), 102 deletions(-) create mode 100644 target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-rework-cpufreq.patch delete mode 100644 target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-LDOA2-regulator.patch delete mode 100644 target/linux/qualcommax/patches-6.6/0910-arm64-dts-qcom-ipq6018-change-voltage-to-perf-levels.patch diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax5-jdcloud.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax5-jdcloud.dts index 68bb51173..da2950948 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax5-jdcloud.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-ax5-jdcloud.dts @@ -18,7 +18,6 @@ mmc-ddr-1_8v; mmc-hs200-1_8v; non-removable; - vqmmc-supply = <&ipq6018_l2>; status = "okay"; }; diff --git a/target/linux/qualcommax/patches-6.1/0137-arm64-dts-qcom-ipq6018-rework-cpufreq.patch b/target/linux/qualcommax/patches-6.1/0137-arm64-dts-qcom-ipq6018-rework-cpufreq.patch index 667fdce2c..7a3cb6a38 100644 --- a/target/linux/qualcommax/patches-6.1/0137-arm64-dts-qcom-ipq6018-rework-cpufreq.patch +++ b/target/linux/qualcommax/patches-6.1/0137-arm64-dts-qcom-ipq6018-rework-cpufreq.patch @@ -79,43 +79,48 @@ }; --- /dev/null +++ b/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi -@@ -0,0 +1,39 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +@@ -0,0 +1,44 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) ++/* ++ * ipq6018-mp5496.dtsi describes common properties (e.g. regulators) that ++ * apply to most devices that make use of the IPQ6018 SoC and MP5496 PMIC. ++ */ ++ ++#include "ipq6018.dtsi" + +&rpm_requests { + regulators { + compatible = "qcom,rpm-mp5496-regulators"; + -+ ipq6018_s2: s2 { ++ mp5496_s2: s2 { + regulator-min-microvolt = <725000>; + regulator-max-microvolt = <1062500>; + regulator-always-on; + }; + -+ ipq6018_l2: l2 { ++ mp5496_l2: l2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; -+ regulator-always-on; + }; + }; +}; + +&sdhc { -+ vqmmc-supply = <&ipq6018_l2>; ++ vqmmc-supply = <&mp5496_l2>; +}; + +&CPU0 { -+ cpu-supply = <&ipq6018_s2>; ++ cpu-supply = <&mp5496_s2>; +}; + +&CPU1 { -+ cpu-supply = <&ipq6018_s2>; ++ cpu-supply = <&mp5496_s2>; +}; + +&CPU2 { -+ cpu-supply = <&ipq6018_s2>; ++ cpu-supply = <&mp5496_s2>; +}; + +&CPU3 { -+ cpu-supply = <&ipq6018_s2>; ++ cpu-supply = <&mp5496_s2>; +}; diff --git a/target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-rework-cpufreq.patch b/target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-rework-cpufreq.patch new file mode 100644 index 000000000..204685952 --- /dev/null +++ b/target/linux/qualcommax/patches-6.6/0138-arm64-dts-qcom-ipq6018-rework-cpufreq.patch @@ -0,0 +1,126 @@ +--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi ++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi +@@ -43,7 +43,6 @@ cpu0: cpu@0 { + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; +- cpu-supply = <&ipq6018_s2>; + #cooling-cells = <2>; + }; + +@@ -56,7 +55,6 @@ cpu1: cpu@1 { + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; +- cpu-supply = <&ipq6018_s2>; + #cooling-cells = <2>; + }; + +@@ -69,7 +67,6 @@ cpu2: cpu@2 { + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; +- cpu-supply = <&ipq6018_s2>; + #cooling-cells = <2>; + }; + +@@ -82,7 +79,6 @@ cpu3: cpu@3 { + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; +- cpu-supply = <&ipq6018_s2>; + #cooling-cells = <2>; + }; + +@@ -119,6 +115,13 @@ opp-1056000000 { + clock-latency-ns = <200000>; + }; + ++ opp-1200000000 { ++ opp-hz = /bits/ 64 <1200000000>; ++ opp-microvolt = <850000>; ++ opp-supported-hw = <0x4>; ++ clock-latency-ns = <200000>; ++ }; ++ + opp-1320000000 { + opp-hz = /bits/ 64 <1320000000>; + opp-microvolt = <862500>; +@@ -133,6 +136,13 @@ opp-1440000000 { + clock-latency-ns = <200000>; + }; + ++ opp-1512000000 { ++ opp-hz = /bits/ 64 <1512000000>; ++ opp-microvolt = <937500>; ++ opp-supported-hw = <0x2>; ++ clock-latency-ns = <200000>; ++ }; ++ + opp-1608000000 { + opp-hz = /bits/ 64 <1608000000>; + opp-microvolt = <987500>; +@@ -170,16 +180,6 @@ glink-edge { + rpm_requests: rpm-requests { + compatible = "qcom,rpm-ipq6018"; + qcom,glink-channels = "rpm_requests"; +- +- regulators { +- compatible = "qcom,rpm-mp5496-regulators"; +- +- ipq6018_s2: s2 { +- regulator-min-microvolt = <725000>; +- regulator-max-microvolt = <1062500>; +- regulator-always-on; +- }; +- }; + }; + }; + }; +--- /dev/null ++++ b/arch/arm64/boot/dts/qcom/ipq6018-mp5496.dtsi +@@ -0,0 +1,44 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) ++/* ++ * ipq6018-mp5496.dtsi describes common properties (e.g. regulators) that ++ * apply to most devices that make use of the IPQ6018 SoC and MP5496 PMIC. ++ */ ++ ++#include "ipq6018.dtsi" ++ ++&rpm_requests { ++ regulators { ++ compatible = "qcom,rpm-mp5496-regulators"; ++ ++ mp5496_s2: s2 { ++ regulator-min-microvolt = <725000>; ++ regulator-max-microvolt = <1062500>; ++ regulator-always-on; ++ }; ++ ++ mp5496_l2: l2 { ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++}; ++ ++&sdhc { ++ vqmmc-supply = <&mp5496_l2>; ++}; ++ ++&CPU0 { ++ cpu-supply = <&mp5496_s2>; ++}; ++ ++&CPU1 { ++ cpu-supply = <&mp5496_s2>; ++}; ++ ++&CPU2 { ++ cpu-supply = <&mp5496_s2>; ++}; ++ ++&CPU3 { ++ cpu-supply = <&mp5496_s2>; ++}; diff --git a/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-LDOA2-regulator.patch b/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-LDOA2-regulator.patch deleted file mode 100644 index 69b009745..000000000 --- a/target/linux/qualcommax/patches-6.6/0139-arm64-dts-qcom-ipq6018-add-LDOA2-regulator.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d24bc08bfc66f47d6e0a294a080d62893a7696b5 Mon Sep 17 00:00:00 2001 -From: Robert Marko -Date: Thu, 18 Jan 2024 21:30:21 +0800 -Subject: [PATCH] arm64: dts: qcom: ipq6018: add LDOA2 regulator - -Add LDOA2 regulator of MP5496 to support SDCC voltage scaling. - -Signed-off-by: Robert Marko ---- - arch/arm64/boot/dts/qcom/ipq6018.dtsi | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi -+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -179,6 +179,11 @@ - regulator-max-microvolt = <1062500>; - regulator-always-on; - }; -+ -+ ipq6018_l2: l2 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ }; - }; - }; - }; diff --git a/target/linux/qualcommax/patches-6.6/0910-arm64-dts-qcom-ipq6018-change-voltage-to-perf-levels.patch b/target/linux/qualcommax/patches-6.6/0910-arm64-dts-qcom-ipq6018-change-voltage-to-perf-levels.patch deleted file mode 100644 index 25fa31367..000000000 --- a/target/linux/qualcommax/patches-6.6/0910-arm64-dts-qcom-ipq6018-change-voltage-to-perf-levels.patch +++ /dev/null @@ -1,65 +0,0 @@ -From c67a1814bb1d0df290cf1e3f9c966f04aa41b9b9 Mon Sep 17 00:00:00 2001 -From: Mantas Pucka -Date: Tue, 30 Jan 2024 12:43:56 +0200 -Subject: [PATCH] arm64: dts: qcom: ipq6018: change voltage to perf levels for - CPR4 driver - -Current CPR4 driver requires opp-microvolt to be an abstract -performance level instead of actual voltage level. - -Signed-off-by: Mantas Pucka ---- - arch/arm64/boot/dts/qcom/ipq6018.dtsi | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - ---- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi -+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -107,42 +107,42 @@ - - opp-864000000 { - opp-hz = /bits/ 64 <864000000>; -- opp-microvolt = <725000>; -+ opp-microvolt = <1>; - opp-supported-hw = <0xf>; - clock-latency-ns = <200000>; - }; - - opp-1056000000 { - opp-hz = /bits/ 64 <1056000000>; -- opp-microvolt = <787500>; -+ opp-microvolt = <2>; - opp-supported-hw = <0xf>; - clock-latency-ns = <200000>; - }; - - opp-1320000000 { - opp-hz = /bits/ 64 <1320000000>; -- opp-microvolt = <862500>; -+ opp-microvolt = <3>; - opp-supported-hw = <0x3>; - clock-latency-ns = <200000>; - }; - - opp-1440000000 { - opp-hz = /bits/ 64 <1440000000>; -- opp-microvolt = <925000>; -+ opp-microvolt = <4>; - opp-supported-hw = <0x3>; - clock-latency-ns = <200000>; - }; - - opp-1608000000 { - opp-hz = /bits/ 64 <1608000000>; -- opp-microvolt = <987500>; -+ opp-microvolt = <5>; - opp-supported-hw = <0x1>; - clock-latency-ns = <200000>; - }; - - opp-1800000000 { - opp-hz = /bits/ 64 <1800000000>; -- opp-microvolt = <1062500>; -+ opp-microvolt = <6>; - opp-supported-hw = <0x1>; - clock-latency-ns = <200000>; - };