OSDN Git Service

cpufreq: tegra194: add OPP support and set bandwidth
authorSumit Gupta <sumitg@nvidia.com>
Tue, 11 Apr 2023 10:59:59 +0000 (16:29 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 18 Apr 2023 10:37:50 +0000 (16:07 +0530)
commitf41e1442ac5bd687389d6104d7b74766db821eb3
tree5c9b34a4e17b956ee56222445539820665a89d96
parente2b47e585931a988c856fd4ba31e1296f749aee3
cpufreq: tegra194: add OPP support and set bandwidth

Add support to use OPP table from DT in Tegra194 cpufreq driver.
Tegra SoC's receive the frequency lookup table (LUT) from BPMP-FW.
Cross check the OPP's present in DT against the LUT from BPMP-FW
and enable only those DT OPP's which are present in LUT also.

The OPP table in DT has CPU Frequency to bandwidth mapping where
the bandwidth value is per MC channel. DRAM bandwidth depends on the
number of MC channels which can vary as per the boot configuration.
This per channel bandwidth from OPP table will be later converted by
MC driver to final bandwidth value by multiplying with number of
channels before sending the request to BPMP-FW.

If OPP table is not present in DT, then use the LUT from BPMP-FW
directy as the CPU frequency table and not do the DRAM frequency
scaling which is same as the current behavior.

Now, as the CPU Frequency table is being controlling through OPP
table in DT. Keeping fewer entries in the table will create less
frequency steps and can help to scale fast to high frequencies
when required.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/tegra194-cpufreq.c