devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 1/2] dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq
@ 2024-12-06 21:11 Christian Marangi
  2024-12-06 21:11 ` [PATCH v7 2/2] cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver Christian Marangi
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Christian Marangi @ 2024-12-06 21:11 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Christian Marangi, linux-pm, devicetree,
	linux-kernel, upstream
  Cc: Ulf Hansson

On newer Airoha SoC, CPU Frequency is scaled indirectly with SMC commands
to ATF.

A virtual clock is exposed. This virtual clock is a get-only clock and
is used to expose the current global CPU clock. The frequency info comes
by the output of the SMC command that reports the clock in MHz.

The SMC sets the CPU clock by providing an index, this is modelled as
performance states in a power domain.

CPUs can't be individually scaled as the CPU frequency is shared across
all CPUs and is global.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
---
Changes v7:
- Add more info to the description for usage of clock and
  performance-domain
- Drop redundant nodes from example
Changes v6:
- No changes
Changes v5:
- Add Reviewed-by tag
- Fix OPP node name error
- Rename cpufreq node name to power-domain
- Rename CPU node power domain name to perf
- Add model and compatible to example
Changes v4:
- Add this patch

 .../cpufreq/airoha,en7581-cpufreq.yaml        | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/airoha,en7581-cpufreq.yaml

diff --git a/Documentation/devicetree/bindings/cpufreq/airoha,en7581-cpufreq.yaml b/Documentation/devicetree/bindings/cpufreq/airoha,en7581-cpufreq.yaml
new file mode 100644
index 000000000000..7d4510b3219c
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/airoha,en7581-cpufreq.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cpufreq/airoha,en7581-cpufreq.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha EN7581 CPUFreq
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+description: |
+  On newer Airoha SoC, CPU Frequency is scaled indirectly with SMC commands
+  to ATF.
+
+  A virtual clock is exposed. This virtual clock is a get-only clock and
+  is used to expose the current global CPU clock. The frequency info comes
+  by the output of the SMC command that reports the clock in MHz.
+
+  The SMC sets the CPU clock by providing an index, this is modelled as
+  performance states in a power domain.
+
+  CPUs can't be individually scaled as the CPU frequency is shared across
+  all CPUs and is global.
+
+properties:
+  compatible:
+    const: airoha,en7581-cpufreq
+
+  '#clock-cells':
+    const: 0
+
+  '#power-domain-cells':
+    const: 0
+
+  operating-points-v2: true
+
+required:
+  - compatible
+  - '#clock-cells'
+  - '#power-domain-cells'
+  - operating-points-v2
+
+additionalProperties: false
+
+examples:
+  - |
+    performance-domain {
+        compatible = "airoha,en7581-cpufreq";
+
+        operating-points-v2 = <&cpu_smcc_opp_table>;
+
+        #power-domain-cells = <0>;
+        #clock-cells = <0>;
+    };
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-12-20 14:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 21:11 [PATCH v7 1/2] dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq Christian Marangi
2024-12-06 21:11 ` [PATCH v7 2/2] cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver Christian Marangi
2024-12-12 12:01   ` Ulf Hansson
2024-12-12 12:25     ` Ulf Hansson
2024-12-13  4:00     ` Viresh Kumar
2024-12-13 22:35       ` Christian Marangi
2024-12-18  7:41         ` Christian Marangi
2024-12-18  7:43           ` Viresh Kumar
2024-12-19 15:23         ` Ulf Hansson
2024-12-20  5:19           ` Viresh Kumar
2024-12-20 10:36           ` Christian Marangi
2024-12-20 14:19   ` Sudeep Holla
2024-12-11 16:37 ` [PATCH v7 1/2] dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq Rob Herring (Arm)
2024-12-12  7:15 ` Viresh Kumar

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