1 From 5b5b5806f22390808b8e8fa180fe35b003a4a74d Mon Sep 17 00:00:00 2001
2 From: Varadarajan Narayanan <quic_varada@quicinc.com>
3 Date: Tue, 31 Oct 2023 12:41:39 +0530
4 Subject: [PATCH 2/2] cpufreq: qcom-nvmem: Introduce cpufreq for ipq95xx
6 IPQ95xx SoCs have different OPPs available for the CPU based on
7 the SoC variant. This can be determined from an eFuse register
8 present in the silicon.
10 Added support for ipq95xx on nvmem driver which helps to
11 determine OPPs at runtime based on the eFuse register which
12 has the CPU frequency limits. opp-supported-hw dt binding
13 can be used to indicate the available OPPs for each limit.
15 Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
16 Signed-off-by: Praveenkumar I <ipkumar@codeaurora.org>
17 Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
18 Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
19 [ Viresh: Fixed subject ]
20 Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
22 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
23 drivers/cpufreq/qcom-cpufreq-nvmem.c | 6 ++++++
24 2 files changed, 7 insertions(+)
26 --- a/drivers/cpufreq/cpufreq-dt-platdev.c
27 +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
28 @@ -179,6 +179,7 @@ static const struct of_device_id blockli
30 { .compatible = "qcom,ipq5332", },
31 { .compatible = "qcom,ipq8064", },
32 + { .compatible = "qcom,ipq9574", },
33 { .compatible = "qcom,apq8064", },
34 { .compatible = "qcom,msm8974", },
35 { .compatible = "qcom,msm8960", },
36 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
37 +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
38 @@ -157,6 +157,11 @@ static int qcom_cpufreq_kryo_name_versio
42 + case QCOM_ID_IPQ9514:
43 + case QCOM_ID_IPQ9550:
44 + case QCOM_ID_IPQ9554:
45 + case QCOM_ID_IPQ9570:
46 + case QCOM_ID_IPQ9574:
47 drv->versions = 1 << (unsigned int)(*speedbin);
49 case QCOM_ID_MSM8996SG:
50 @@ -361,6 +366,7 @@ static const struct of_device_id qcom_cp
51 { .compatible = "qcom,ipq5332", .data = &match_data_kryo },
52 { .compatible = "qcom,ipq8064", .data = &match_data_krait },
53 { .compatible = "qcom,apq8064", .data = &match_data_krait },
54 + { .compatible = "qcom,ipq9574", .data = &match_data_kryo },
55 { .compatible = "qcom,msm8974", .data = &match_data_krait },
56 { .compatible = "qcom,msm8960", .data = &match_data_krait },