devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] qcom-cpufreq-hw: Add CPU clock provider support
@ 2022-10-19 13:59 Manivannan Sadhasivam
  2022-10-19 13:59 ` [PATCH 1/4] cpufreq: qcom-hw: Remove un-necessary cpumask_empty() check Manivannan Sadhasivam
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Manivannan Sadhasivam @ 2022-10-19 13:59 UTC (permalink / raw)
  To: andersson, viresh.kumar, krzysztof.kozlowski+dt, rafael, robh+dt
  Cc: johan, devicetree, linux-arm-msm, linux-kernel, linux-pm,
	Manivannan Sadhasivam

Hello,

This series adds clock provider support to the Qcom CPUFreq driver for
supplying the clocks to the CPU cores in Qcom SoCs.

The Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply
clocks to the CPU cores. But this is not represented clearly in devicetree.
There is no clock coming out of the CPUFreq HW node to the CPU. This created
an issue [1] with the OPP core when a recent enhancement series was submitted.
Eventhough the issue got fixed in the OPP framework in the meantime, that's
not a proper solution and this series aims to fix it properly.

There was also an attempt made by Viresh [2] to fix the issue by moving the
clocks supplied to the CPUFreq HW node to the CPU. But that was not accepted
since those clocks belong to the CPUFreq HW node only.

The proposal here is to add clock provider support to the Qcom CPUFreq HW
driver to supply clocks to the CPUs that comes out of the EPSS/OSM block.
This correctly reflects the hardware implementation.

The clock provider is a simple one that just provides the frequency of the
clocks supplied to each frequency domain in the SoC using .recalc_rate()
callback. The frequency supplied by the driver will be the actual frequency
that comes out of the EPSS/OSM block after the DCVS operation. This frequency
is not same as what the CPUFreq framework has set but it is the one that gets
supplied to the CPUs after throttling by LMh.

This series has been tested on SM8450 based dev board and hence there is a DTS
change only for that platform. Once this series gets accepted, rest of the
platform DTS can also be modified and finally the hack on the OPP core can be
dropped.

Thanks,
Mani

[1] https://lore.kernel.org/lkml/YsxSkswzsqgMOc0l@hovoldconsulting.com/
[2] https://lore.kernel.org/lkml/20220801054255.GA12039@thinkpad/t/

Manivannan Sadhasivam (4):
  cpufreq: qcom-hw: Remove un-necessary cpumask_empty() check
  dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider
  cpufreq: qcom-hw: Add CPU clock provider support
  arm64: dts: qcom: sm8450: Supply clock from cpufreq node to CPUs

 .../bindings/cpufreq/cpufreq-qcom-hw.yaml     | 12 ++++
 arch/arm64/boot/dts/qcom/sm8450.dtsi          |  9 +++
 drivers/cpufreq/qcom-cpufreq-hw.c             | 72 ++++++++++++++++---
 3 files changed, 84 insertions(+), 9 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-24  4:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 13:59 [PATCH 0/4] qcom-cpufreq-hw: Add CPU clock provider support Manivannan Sadhasivam
2022-10-19 13:59 ` [PATCH 1/4] cpufreq: qcom-hw: Remove un-necessary cpumask_empty() check Manivannan Sadhasivam
2022-10-19 13:59 ` [PATCH 2/4] dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider Manivannan Sadhasivam
2022-10-21  1:54   ` Rob Herring
2022-10-19 13:59 ` [PATCH 3/4] cpufreq: qcom-hw: Add CPU clock provider support Manivannan Sadhasivam
2022-10-20  5:39   ` Dmitry Baryshkov
2022-10-21  9:31     ` Manivannan Sadhasivam
2022-10-24  3:06       ` Bjorn Andersson
2022-10-24  4:01         ` Manivannan Sadhasivam
2022-10-19 13:59 ` [PATCH 4/4] arm64: dts: qcom: sm8450: Supply clock from cpufreq node to CPUs Manivannan Sadhasivam
2022-10-20  5:22 ` [PATCH 0/4] qcom-cpufreq-hw: Add CPU clock provider support Viresh Kumar
2022-10-21  8:02   ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).