mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
626fa75526
Build on at leasst x86/64 failed without adding the new ksym: CONFIG_PCP_BATCH_SCALE_MAX=5 According to www.kernelconfig.io[1], this option seems to apply to all arches so I placed it in target/linux/generic/config-6.6 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.45 Removed upstreamed: generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch[2] All other patches automatically rebased. 1. https://www.kernelconfig.io/config_pcp_batch_scale_max?q=&kernelversion=6.10.3&arch=x86 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.45&id=b45cbfa204b2a0985eb85dcb33d51714ee089bb9 Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/16144 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
114 lines
3.5 KiB
Diff
114 lines
3.5 KiB
Diff
From 0b9cd949136f1b63f7aa9424b6e583a1ab261e36 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Fri, 13 Oct 2023 19:20:02 +0200
|
|
Subject: [PATCH] cpufreq: qcom-nvmem: add support for IPQ8074
|
|
|
|
IPQ8074 comes in 3 families:
|
|
* IPQ8070A/IPQ8071A (Acorn) up to 1.4GHz
|
|
* IPQ8172/IPQ8173/IPQ8174 (Oak) up to 1.4GHz
|
|
* IPQ8072A/IPQ8074A/IPQ8076A/IPQ8078A (Hawkeye) up to 2.2GHz
|
|
|
|
So, in order to be able to share one OPP table lets add support for IPQ8074
|
|
family based of SMEM SoC ID-s as speedbin fuse is always 0 on IPQ8074.
|
|
|
|
IPQ8074 compatible is blacklisted from DT platdev as the cpufreq device
|
|
will get created by NVMEM CPUFreq driver.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
|
|
[ Viresh: Fixed rebase conflict. ]
|
|
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
---
|
|
drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
|
|
drivers/cpufreq/qcom-cpufreq-nvmem.c | 48 ++++++++++++++++++++++++++++
|
|
2 files changed, 49 insertions(+)
|
|
|
|
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
|
|
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
|
|
@@ -179,6 +179,7 @@ static const struct of_device_id blockli
|
|
|
|
{ .compatible = "qcom,ipq6018", },
|
|
{ .compatible = "qcom,ipq8064", },
|
|
+ { .compatible = "qcom,ipq8074", },
|
|
{ .compatible = "qcom,apq8064", },
|
|
{ .compatible = "qcom,msm8974", },
|
|
{ .compatible = "qcom,msm8960", },
|
|
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
@@ -32,6 +32,11 @@
|
|
|
|
#define IPQ6000_VERSION BIT(2)
|
|
|
|
+enum ipq8074_versions {
|
|
+ IPQ8074_HAWKEYE_VERSION = 0,
|
|
+ IPQ8074_ACORN_VERSION,
|
|
+};
|
|
+
|
|
struct qcom_cpufreq_drv;
|
|
|
|
struct qcom_cpufreq_match_data {
|
|
@@ -260,6 +265,44 @@ static int qcom_cpufreq_ipq6018_name_ver
|
|
return 0;
|
|
}
|
|
|
|
+static int qcom_cpufreq_ipq8074_name_version(struct device *cpu_dev,
|
|
+ struct nvmem_cell *speedbin_nvmem,
|
|
+ char **pvs_name,
|
|
+ struct qcom_cpufreq_drv *drv)
|
|
+{
|
|
+ u32 msm_id;
|
|
+ int ret;
|
|
+ *pvs_name = NULL;
|
|
+
|
|
+ ret = qcom_smem_get_soc_id(&msm_id);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+
|
|
+ switch (msm_id) {
|
|
+ case QCOM_ID_IPQ8070A:
|
|
+ case QCOM_ID_IPQ8071A:
|
|
+ case QCOM_ID_IPQ8172:
|
|
+ case QCOM_ID_IPQ8173:
|
|
+ case QCOM_ID_IPQ8174:
|
|
+ drv->versions = BIT(IPQ8074_ACORN_VERSION);
|
|
+ break;
|
|
+ case QCOM_ID_IPQ8072A:
|
|
+ case QCOM_ID_IPQ8074A:
|
|
+ case QCOM_ID_IPQ8076A:
|
|
+ case QCOM_ID_IPQ8078A:
|
|
+ drv->versions = BIT(IPQ8074_HAWKEYE_VERSION);
|
|
+ break;
|
|
+ default:
|
|
+ dev_err(cpu_dev,
|
|
+ "SoC ID %u is not part of IPQ8074 family, limiting to 1.4GHz!\n",
|
|
+ msm_id);
|
|
+ drv->versions = BIT(IPQ8074_ACORN_VERSION);
|
|
+ break;
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
static const struct qcom_cpufreq_match_data match_data_kryo = {
|
|
.get_version = qcom_cpufreq_kryo_name_version,
|
|
};
|
|
@@ -278,6 +321,10 @@ static const struct qcom_cpufreq_match_d
|
|
.get_version = qcom_cpufreq_ipq6018_name_version,
|
|
};
|
|
|
|
+static const struct qcom_cpufreq_match_data match_data_ipq8074 = {
|
|
+ .get_version = qcom_cpufreq_ipq8074_name_version,
|
|
+};
|
|
+
|
|
static int qcom_cpufreq_probe(struct platform_device *pdev)
|
|
{
|
|
struct qcom_cpufreq_drv *drv;
|
|
@@ -412,6 +459,7 @@ static const struct of_device_id qcom_cp
|
|
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
|
|
{ .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 },
|
|
{ .compatible = "qcom,ipq8064", .data = &match_data_krait },
|
|
+ { .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 },
|
|
{ .compatible = "qcom,apq8064", .data = &match_data_krait },
|
|
{ .compatible = "qcom,msm8974", .data = &match_data_krait },
|
|
{ .compatible = "qcom,msm8960", .data = &match_data_krait },
|