LKML Archive on
help / color / mirror / Atom feed
From: Hector Yuan <>
To: <>,
	"Rafael J. Wysocki" <>,
	Viresh Kumar <>,
	Rob Herring <>, <>
Cc: <>, <>,
Subject: [PATCH v13] cpufreq: mediatek-hw: Add support for Mediatek cpufreq HW driver
Date: Fri, 30 Jul 2021 00:08:09 +0800	[thread overview]
Message-ID: <> (raw)

The CPUfreq HW present in some Mediatek chipsets offloads the steps necessary for changing the frequency of CPUs. 
The driver implements the cpufreq driver interface for this hardware engine. 

From v12 to v13, there are two modifications.
1. Move related_cpus function to common place, so all performance-domain cpufreq driver can refer.
2. Make cpu resource init to each policy rather than per-cpu

From v11 to v12, there are two modifications.
1. Based on patchset[1], align binding with scmi for performance domain(latest version).
2. Shrink binding example wording. 

From v8 to v9, there are three more modifications.
1. Based on patchset[2], align binding with scmi for performance domain.
2. Add the CPUFREQ fast switch function support and define DVFS latency.
3. Based on patchser[3], add energy model API parameter for mW.

From v7 to v8, there are three more patches based on patchset v8[4].
This patchset is about to register power table to Energy model for EAS and thermal usage.
1. EM CPU power table
- Register energy model table for EAS and thermal cooling device usage.
- Read the coresponding LUT for power table.
2. SVS initialization
- The SVS(Smart Voltage Scaling) engine is a hardware which is
  used to calculate optimized voltage values for CPU power domain.
  DVFS driver could apply those optimized voltage values to reduce power consumption.
- Driver will polling if HW engine is done for SVS initialization.
  After that, driver will read power table and register it to EAS.
- CPUs must be in power on state when doing SVS. Use pm_qos to block cpu-idle state for SVS initializing.
3. Cooling device flag
- Add cooling device flag for thermal

Hector.Yuan (2):
  dt-bindings: cpufreq: add bindings for MediaTek cpufreq HW
  cpufreq: mediatek-hw: Add support for CPUFREQ HW

 .../bindings/cpufreq/cpufreq-mediatek-hw.yaml      |   70 ++++
 drivers/cpufreq/Kconfig.arm                        |   12 +
 drivers/cpufreq/Makefile                           |    1 +
 drivers/cpufreq/mediatek-cpufreq-hw.c              |  357 ++++++++++++++++++++
 include/linux/cpufreq.h                            |   39 +++
 5 files changed, 479 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml
 create mode 100644 drivers/cpufreq/mediatek-cpufreq-hw.c

             reply	other threads:[~2021-07-29 16:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 16:08 Hector Yuan [this message]
2021-07-29 16:08 ` [PATCH v13 1/2] dt-bindings: cpufreq: add bindings for MediaTek cpufreq HW Hector Yuan
2021-08-03  5:05   ` Viresh Kumar
2021-08-03 19:17     ` Rob Herring
2021-08-03 19:22   ` Rob Herring
2021-07-29 16:08 ` [PATCH v13 2/2] cpufreq: mediatek-hw: Add support for CPUFREQ HW Hector Yuan
2021-08-03  7:13   ` Viresh Kumar
2021-08-16 12:56     ` Hector Yuan
2021-08-17  3:42       ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v13] cpufreq: mediatek-hw: Add support for Mediatek cpufreq HW driver' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).