Skip to content

Apple SoC cpufreq driver

Hector Martin asahi linux-arm-kernel linux-devicetree linux-pm lkml oe-kbuild-all 4 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 14 repliesApplied
  2. v44 patches 3 repliesSuperseded
  3. v35 patches 23 repliesApplied
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v24 patches10 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4MAINTAINERS: Add entries for Apple SoC cpufreq driverMAINTAINERS+2 -00 replies
2/4dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC cpufreqDocumentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml+117 -012 replies
3/4cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-statesdrivers/cpufreq/Kconfig.arm drivers/cpufreq/Makefile drivers/cpufreq/apple-soc-cpufreq.c +1 more+364 -01 reply
4/4arm64: dts: apple: Add CPU topology & cpufreq nodes for t8103arch/arm64/boot/dts/apple/t8103.dtsi+194 -100 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc ZyngierKrzysztof KozlowskiRob HerringViresh Kumar
SeriesA-b
1/4A-b
2/4A-b R-b R-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/4] Apple SoC cpufreq driver

Hi folks,

Here's v5 of the cpufreq driver for Apple SoCs. v5 just incorporates minor review feedback changes from v3, and no functional changes. v4 had a DT schema SNAFU; this supersedes it.

Once reviewed, please merge #3 via the cpufreq tree, and we'll take care of #1,#2,#4 via the asahi-soc tree. This lets us merge the DT changes in the same cycle without blocking on the binding coming in via the cpufreq tree first.

This version takes a page from both v1 and v2, keeping the dedicated cpufreq style (instead of pretending to be a clock controller) but using dedicated DT nodes for each cluster, which accurately represents the hardware. In particular, this makes supporting t6002 (M1 Ultra) a lot more reasonable on the DT side.

This version also switches to the standard performance-domains binding, so we don't need any more vendor-specific properties. In order to support this, I had to make the performance-domains parsing code more generic. This required a minor change to the only consumer (mediatek-cpufreq-hw).

The Linux driver probes based on platform compatible, and then attempts to locate the cluster nodes by following the performance-domains links from CPU nodes (this will then fail for any incompatible nodes, e.g. if a future SoC needs a new compatible and can't fall back). This approach was suggested by robh as the right way to handle the impedance mismatch between the hardware, which has separate controllers per cluster, and the Linux model where there can only be one CPUFreq driver instance.

Functionality-wise, there are no significant changes from v2. The only notable difference is support for t8112 (M2). This works largely the same as the other SoCs, but they ran out of bits in the current PState register, so that needs a SoC-specific quirk. Since that register is not used by macOS (it was discovered experimentally) and is not critical for functionality (it just allows accurately reporting the current frequency to userspace, given boost clock limitations), I've decided to only use it when a SoC-specific compatible is present. The default fallback code will simply report the requested frequency as actual. I expect this will work for future SoCs.

Hector Martin (4):
MAINTAINERS: Add entries for Apple SoC cpufreq driver
dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC
cpufreq
cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states
arm64: dts: apple: Add CPU topology & cpufreq nodes for t8103

 .../cpufreq/apple,cluster-cpufreq.yaml        | 117 ++++++
 MAINTAINERS                                   |   2 +
 arch/arm64/boot/dts/apple/t8103.dtsi          | 204 +++++++++-
 drivers/cpufreq/Kconfig.arm                   |   9 +
 drivers/cpufreq/Makefile                      |   1 +
 drivers/cpufreq/apple-soc-cpufreq.c           | 352 ++++++++++++++++++
 drivers/cpufreq/cpufreq-dt-platdev.c          |   2 +
 7 files changed, 677 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
 create mode 100644 drivers/cpufreq/apple-soc-cpufreq.c
Signature · 1 line
2.35.1