devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ansuel Smith <ansuelsmth@gmail.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Ansuel Smith <ansuelsmth@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: [PATCH v2 2/2] dt-bindings: arm: Document L2 Krait CPU Cache scaling driver
Date: Tue, 29 Sep 2020 18:29:25 +0200	[thread overview]
Message-ID: <20200929162926.139-2-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20200929162926.139-1-ansuelsmth@gmail.com>

Document dedicated L2 Krait CPU Cache devfreq scaling driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
v2:
* Fix problems reported by Rob
* Update example to use opp v2
* Drop unused voltage-tollerance
* Better describe scaling thresholds
* Add bindings to describe Krait L2-Cache

 .../bindings/arm/qcom,krait-cache.yaml        | 116 ++++++++++++++++++
 1 file changed, 116 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/qcom,krait-cache.yaml

diff --git a/Documentation/devicetree/bindings/arm/qcom,krait-cache.yaml b/Documentation/devicetree/bindings/arm/qcom,krait-cache.yaml
new file mode 100644
index 000000000000..4143a758dc28
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,krait-cache.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,krait-cache.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Krait L2 CPU Cache
+
+maintainers:
+  - Ansuel Smith <ansuelsmth@gmail.com>
+
+description: |
+  This describe all the needed bindings required by the Krait L2 CPU Cache.
+
+  Describe what level is available for the shared cache connected to the
+  Krait Cpus, the qcom saw used for qcom spm and how the cache should be
+  scaled using operating-points and cpufreq thresholds.
+  The Krait L2 CPU Cache Scaling Driver scale the frequency and optionally
+  voltage when the Cpu Frequency is changed (using the cpufreq notifier).
+
+  Cache is scaled with the max frequency across all CPU core and the Cache
+  frequency will scale based on the configured CpuFreq threshold in the dts.
+  (example: CPU 600000 kHz, L2 Cache will be scaled to 1000000000 Hz.
+            CPU 1100000 kHz, L2 Cache will be scaled to 1000000000 Hz.
+            CPU 1200000 KHz, L2 Cache will be scaled to 1200000000 Hz.)
+
+  The CpuFreq thresholds can be set from a minimum of 3 bin (idle, nominal
+  and high) and upper but the Krait Cache supports only 3 operating points.
+
+properties:
+  compatible:
+    const: qcom,krait-cache
+
+  cache-level:
+    const: 2
+
+  qcom,saw:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: |
+      Specifies the SAW* node associated with this L2 Cache.
+
+      Required for systems that have an "enable-method" property
+      value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2" defined in
+      CPUs node.
+
+      * arm/msm/qcom,saw2.txt
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: l2
+
+  qcom,l2-cpufreq:
+    description: |
+      Threshold used by the driver to scale the L2 cache.
+      If the max CPU Frequency is more than the set frequency,
+      the driver will transition to the next frequency bin.
+      Value is in kHz
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 3
+    items:
+      - description: idle
+      - description: nominal
+      - description: high
+
+  l2-supply:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: Phandle to the L2 regulator supply.
+
+  operating-points-v2: true
+
+required:
+  - compatible
+  - cache-level
+  - qcom,saw
+  - clocks
+  - clock-names
+  - qcom,l2-cpufreq
+
+examples:
+  - |
+    L2: l2-cache {
+      compatible = "qcom,krait-cache";
+      cache-level = <2>;
+      qcom,saw = <&saw_l2>;
+
+      clocks = <&kraitcc 4>;
+      clock-names = "l2";
+      l2-supply = <&smb208_s1a>;
+      qcom,l2-cpufreq = <384000 600000 1200000>;
+      operating-points-v2 = <&opp_table_l2>;
+    };
+
+    opp_table_l2: opp_table_l2 {
+      compatible = "operating-points-v2";
+
+      opp-384000000 {
+        opp-hz = /bits/ 64 <384000000>;
+        opp-microvolt = <1100000>;
+        clock-latency-ns = <100000>;
+      };
+
+      opp-1000000000 {
+        opp-hz = /bits/ 64 <1000000000>;
+        opp-microvolt = <1100000>;
+        clock-latency-ns = <100000>;
+      };
+
+      opp-1200000000 {
+        opp-hz = /bits/ 64 <1200000000>;
+        opp-microvolt = <1150000>;
+        clock-latency-ns = <100000>;
+      };
+    };
-- 
2.27.0


  reply	other threads:[~2020-09-29 16:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200929162941epcas1p4a6f524f2406785934918c2a9f556ae4b@epcas1p4.samsung.com>
2020-09-29 16:29 ` [PATCH v2 1/2] devfreq: qcom: Add L2 Krait Cache devfreq scaling driver Ansuel Smith
2020-09-29 16:29   ` Ansuel Smith [this message]
2020-09-30  9:29   ` Sudeep Holla
2020-09-30 11:56     ` ansuelsmth
2020-09-30 13:57       ` Sudeep Holla
2020-09-30 15:21         ` ansuelsmth
2022-05-20  1:11   ` Chanwoo Choi
2022-05-20  0:52     ` Ansuel Smith

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=20200929162926.139-2-ansuelsmth@gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).