From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Hector Martin <marcan@marcan.st>, linux-arm-kernel@lists.infradead.org
Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Sven Peter <sven@svenpeter.dev>, Marc Zyngier <maz@kernel.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Catalin Marinas <catalin.marinas@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 3/9] dt-bindings: clock: Add apple,cluster-clk binding
Date: Tue, 12 Oct 2021 10:51:09 +0200 [thread overview]
Message-ID: <0fe602f6-3adc-dfac-beee-2854b01cec5c@canonical.com> (raw)
In-Reply-To: <20211011165707.138157-4-marcan@marcan.st>
On 11/10/2021 18:57, Hector Martin wrote:
> This device represents the CPU performance state switching mechanism as
> a clock controller, to be used with the standard cpufreq-dt
> infrastructure.
>
> Signed-off-by: Hector Martin <marcan@marcan.st>
> ---
> .../bindings/clock/apple,cluster-clk.yaml | 115 ++++++++++++++++++
> 1 file changed, 115 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/apple,cluster-clk.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/apple,cluster-clk.yaml b/Documentation/devicetree/bindings/clock/apple,cluster-clk.yaml
> new file mode 100644
> index 000000000000..9a8b863dadc0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/apple,cluster-clk.yaml
> @@ -0,0 +1,115 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/apple,cluster-clk.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: CPU cluster frequency scaling for Apple SoCs
> +
> +maintainers:
> + - Hector Martin <marcan@marcan.st>
> +
> +description: |
> + Apple SoCs control CPU cluster frequencies by using a performance state
> + index. This node represents the feature as a clock controller, and uses
> + a reference to the CPU OPP table to translate clock frequencies into
> + performance states. This allows the CPUs to use the standard cpufreq-dt
> + mechanism for frequency scaling.
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - apple,t8103-cluster-clk
> + - const: apple,cluster-clk
> +
> + reg:
> + maxItems: 1
> +
> + '#clock-cells':
> + const: 0
> +
> + operating-points-v2:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description:
> + A reference to the OPP table used for the CPU cluster controlled by this
> + device instance. The table should contain an `opp-level` property for
> + every OPP, which represents the p-state index used by the hardware to
> + represent this performance level.
> +
> + OPPs may also have a `required-opps` property (see power-domains).
> +
> + power-domains:
> + maxItems: 1
> + description:
> + An optional reference to a power domain provider that links its
> + performance state to the CPU cluster performance state. This is typically
> + a memory controller. If set, the `required-opps` property in the CPU
> + frequency OPP nodes will be used to change the performance state of this
> + provider state in tandem with CPU frequency changes.
> +
> +required:
> + - compatible
> + - reg
> + - '#clock-cells'
> + - operating-points-v2
> +
> +additionalProperties: false
> +
> +
One line break.
> +examples:
> + - |
> + pcluster_opp: opp-table-1 {
> + compatible = "operating-points-v2";
> + opp-shared;
> +
> + opp01 {
> + opp-hz = /bits/ 64 <600000000>;
> + opp-microvolt = <781000>;
> + opp-level = <1>;
> + clock-latency-ns = <8000>;
> + required-opps = <&mcc_lowperf>;
> + };
> + /* intermediate p-states omitted */
> + opp15 {
> + opp-hz = /bits/ 64 <3204000000>;
> + opp-microvolt = <1081000>;
> + opp-level = <15>;
> + clock-latency-ns = <56000>;
> + required-opps = <&mcc_highperf>;
> + };
> + };
> +
> + mcc_opp: opp-table-2 {
> + compatible = "operating-points-v2";
Wrong compatible.
> +
> + mcc_lowperf: opp0 {
> + opp-level = <0>;
> + apple,memory-perf-config = <0x813057f 0x1800180>;
> + };
> + mcc_highperf: opp1 {
> + opp-level = <1>;
> + apple,memory-perf-config = <0x133 0x55555340>;
> + };
> + };
> +
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + mcc: memory-controller@200200000 {
> + compatible = "apple,t8103-mcc", "apple,mcc";
> + #power-domain-cells = <0>;
> + reg = <0x2 0x200000 0x0 0x200000>;
> + operating-points-v2 = <&mcc_opp>;
> + apple,num-channels = <8>;
> + };
> +
> + clk_pcluster: clock-controller@211e20000 {
> + compatible = "apple,t8103-cluster-clk", "apple,cluster-clk";
> + #clock-cells = <0>;
> + reg = <0x2 0x11e20000 0x0 0x4000>;
> + operating-points-v2 = <&pcluster_opp>;
> + power-domains = <&mcc>;
> + };
> + };
>
Best regards,
Krzysztof
next prev parent reply other threads:[~2021-10-12 8:51 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 16:56 [RFC PATCH 0/9] Apple SoC CPU P-state switching Hector Martin
2021-10-11 16:56 ` [RFC PATCH 1/9] MAINTAINERS: apple: Add apple-mcc and clk-apple-cluster paths Hector Martin
2021-10-11 16:57 ` [RFC PATCH 2/9] dt-bindings: memory-controller: Add apple,mcc binding Hector Martin
2021-10-12 8:48 ` Krzysztof Kozlowski
2021-10-19 22:43 ` Rob Herring
2021-10-11 16:57 ` [RFC PATCH 3/9] dt-bindings: clock: Add apple,cluster-clk binding Hector Martin
2021-10-12 8:51 ` Krzysztof Kozlowski [this message]
2021-10-12 9:35 ` Viresh Kumar
[not found] ` <D0DE08FE-562E-4A48-BCA0-9094DAFCA564@marcan.st>
[not found] ` <20211012094302.3cownyzr4phxwifs@vireshk-i7>
[not found] ` <64584F8C-D49F-41B5-9658-CF8A25186E67@marcan.st>
[not found] ` <20211012095735.mhh2lzu52ohtotl6@vireshk-i7>
2021-10-12 13:48 ` Hector Martin
2021-10-11 16:57 ` [RFC PATCH 4/9] opp: core: Don't warn if required OPP device does not exist Hector Martin
2021-10-12 3:21 ` Viresh Kumar
2021-10-12 5:34 ` Hector Martin
2021-10-12 5:51 ` Viresh Kumar
2021-10-12 5:57 ` Hector Martin
2021-10-12 9:26 ` Viresh Kumar
2021-10-12 9:31 ` Hector Martin "marcan"
2021-10-12 9:32 ` Viresh Kumar
2021-10-14 6:52 ` Hector Martin
2021-10-14 6:56 ` Viresh Kumar
2021-10-14 7:03 ` Hector Martin
2021-10-14 7:22 ` Viresh Kumar
2021-10-14 7:23 ` Hector Martin
2021-10-14 11:08 ` Ulf Hansson
2021-10-14 9:55 ` Ulf Hansson
2021-10-14 11:43 ` Hector Martin
2021-10-14 12:55 ` Ulf Hansson
2021-10-14 17:02 ` Hector Martin
2021-10-15 11:26 ` Ulf Hansson
2021-10-11 16:57 ` [RFC PATCH 5/9] PM: domains: Add of_genpd_add_provider_simple_noclk() Hector Martin
2021-10-11 16:57 ` [RFC PATCH 6/9] memory: apple: Add apple-mcc driver to manage MCC perf in Apple SoCs Hector Martin
2021-10-12 9:19 ` Krzysztof Kozlowski
2021-10-14 6:59 ` Hector Martin
2021-10-14 7:36 ` Krzysztof Kozlowski
2021-10-14 7:52 ` Hector Martin
2021-10-14 8:04 ` Krzysztof Kozlowski
2021-10-14 8:31 ` Hector Martin
2021-10-11 16:57 ` [RFC PATCH 7/9] clk: apple: Add clk-apple-cluster driver to manage CPU p-states Hector Martin
[not found] ` <163424925931.1688384.9647104000291025081@swboyd.mtv.corp.google.com>
2021-10-17 9:16 ` Hector Martin
2021-10-11 16:57 ` [RFC PATCH 8/9] arm64: apple: Select MEMORY and APPLE_MCC Hector Martin
2021-10-11 16:57 ` [RFC PATCH 9/9] arm64: apple: Add CPU frequency scaling support for t8103 Hector Martin
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=0fe602f6-3adc-dfac-beee-2854b01cec5c@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=alyssa@rosenzweig.io \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=mark.kettenis@xs4all.nl \
--cc=maz@kernel.org \
--cc=mturquette@baylibre.com \
--cc=nm@ti.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sven@svenpeter.dev \
--cc=ulf.hansson@linaro.org \
--cc=vireshk@kernel.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