Skip to content

Commit ba5a61a

Browse files
quic-varadavireshk
authored andcommitted
cpufreq: qcom-nvmem: Enable cpufreq for ipq53xx
IPQ53xx have different OPPs available for the CPU based on SoC variant. This can be determined through use of an eFuse register present in the silicon. Added support for ipq53xx on nvmem driver which helps to determine OPPs at runtime based on the eFuse register which has the CPU frequency limits. opp-supported-hw dt binding can be used to indicate the available OPPs for each limit. nvmem driver also creates the "cpufreq-dt" platform_device after passing the version matching data to the OPP framework so that the cpufreq-dt handles the actual cpufreq implementation. Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Kathiravan T <[email protected]> Signed-off-by: Varadarajan Narayanan <[email protected]> [ Viresh: Fixed subject ] Signed-off-by: Viresh Kumar <[email protected]>
1 parent 0b9cd94 commit ba5a61a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ static const struct of_device_id blocklist[] __initconst = {
180180
{ .compatible = "ti,am62a7", },
181181
{ .compatible = "ti,am62p5", },
182182

183+
{ .compatible = "qcom,ipq5332", },
183184
{ .compatible = "qcom,ipq6018", },
184185
{ .compatible = "qcom,ipq8064", },
185186
{ .compatible = "qcom,ipq8074", },

drivers/cpufreq/qcom-cpufreq-nvmem.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev,
183183
switch (msm_id) {
184184
case QCOM_ID_MSM8996:
185185
case QCOM_ID_APQ8096:
186+
case QCOM_ID_IPQ5332:
187+
case QCOM_ID_IPQ5322:
188+
case QCOM_ID_IPQ5312:
189+
case QCOM_ID_IPQ5302:
190+
case QCOM_ID_IPQ5300:
186191
drv->versions = 1 << (unsigned int)(*speedbin);
187192
break;
188193
case QCOM_ID_MSM8996SG:
@@ -541,6 +546,7 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = {
541546
{ .compatible = "qcom,msm8909", .data = &match_data_msm8909 },
542547
{ .compatible = "qcom,msm8996", .data = &match_data_kryo },
543548
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
549+
{ .compatible = "qcom,ipq5332", .data = &match_data_kryo },
544550
{ .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 },
545551
{ .compatible = "qcom,ipq8064", .data = &match_data_ipq8064 },
546552
{ .compatible = "qcom,ipq8074", .data = &match_data_ipq8074 },

0 commit comments

Comments
 (0)