From: Marc Zyngier <maz@kernel.org>
To: Hector Martin <marcan@marcan.st>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Sven Peter <sven@svenpeter.dev>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/5] Apple SoC cpufreq driver
Date: Mon, 24 Oct 2022 09:28:50 +0100 [thread overview]
Message-ID: <861qqxocal.wl-maz@kernel.org> (raw)
In-Reply-To: <20221024043925.25379-1-marcan@marcan.st>
On Mon, 24 Oct 2022 05:39:20 +0100,
Hector Martin <marcan@marcan.st> wrote:
>
> Hi folks,
>
> Third time's the charm? Here's v3 of the cpufreq driver for Apple SoCs.
> 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.
>
> As usual, MAINTAINERS and DT changes are split. I expect patches #2~#4
> to go through the cpufreq tree, and we'll take care of #1 and #5 via
> the asahi-soc tree.
>
> Hector Martin (5):
> MAINTAINERS: Add entries for Apple SoC cpufreq driver
> dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC
> cpufreq
> cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format
> 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 | 119 ++++++
> MAINTAINERS | 2 +
> arch/arm64/boot/dts/apple/t8103.dtsi | 206 +++++++++-
> drivers/cpufreq/Kconfig.arm | 9 +
> drivers/cpufreq/Makefile | 1 +
> drivers/cpufreq/apple-soc-cpufreq.c | 352 ++++++++++++++++++
> drivers/cpufreq/cpufreq-dt-platdev.c | 2 +
> drivers/cpufreq/mediatek-cpufreq-hw.c | 14 +-
> include/linux/cpufreq.h | 28 +-
> 9 files changed, 706 insertions(+), 27 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
> create mode 100644 drivers/cpufreq/apple-soc-cpufreq.c
FWIW, and for the whole series:
Acked-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2022-10-24 8:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 4:39 [PATCH v3 0/5] Apple SoC cpufreq driver Hector Martin
2022-10-24 4:39 ` [PATCH v3 1/5] MAINTAINERS: Add entries for " Hector Martin
2022-10-24 4:39 ` [PATCH v3 2/5] dt-bindings: cpufreq: apple,soc-cpufreq: Add binding for Apple SoC cpufreq Hector Martin
2022-10-25 16:01 ` Krzysztof Kozlowski
2022-10-25 17:22 ` Hector Martin
2022-10-25 18:56 ` Krzysztof Kozlowski
2022-10-26 4:18 ` Hector Martin
2022-10-26 14:13 ` Krzysztof Kozlowski
2022-10-25 23:12 ` Rob Herring
2022-10-26 4:26 ` Hector Martin
2022-10-24 4:39 ` [PATCH v3 3/5] cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format Hector Martin
2022-11-02 5:37 ` Viresh Kumar
2022-10-24 4:39 ` [PATCH v3 4/5] cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states Hector Martin
2022-10-24 8:27 ` Marc Zyngier
2022-11-09 12:13 ` Hector Martin
2022-11-09 14:20 ` Marc Zyngier
2022-11-09 15:39 ` Hector Martin
2022-11-01 15:16 ` Ulf Hansson
2022-11-01 18:17 ` Hector Martin
2022-11-14 19:49 ` Ulf Hansson
2022-11-02 6:18 ` Viresh Kumar
2022-11-09 12:36 ` Hector Martin
2022-11-14 6:51 ` Viresh Kumar
2022-11-14 6:57 ` Hector Martin
2022-11-14 7:03 ` Viresh Kumar
2022-11-14 11:06 ` Hector Martin
2022-10-24 4:39 ` [PATCH v3 5/5] arm64: dts: apple: Add CPU topology & cpufreq nodes for t8103 Hector Martin
2022-10-25 16:02 ` Krzysztof Kozlowski
2022-10-24 8:28 ` Marc Zyngier [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861qqxocal.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=mark.kettenis@xs4all.nl \
--cc=matthias.bgg@gmail.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sven@svenpeter.dev \
--cc=ulf.hansson@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).