Skip to content

Commit 27de8d5

Browse files
committed
Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull more ARM cpufreq changes for v5.15-rc1 from Viresh Kumar: "This adds a new cpufreq driver for Mediatek, which had been going through reviews since last one year." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: mediatek-hw: Add support for CPUFREQ HW cpufreq: Add of_perf_domain_get_sharing_cpumask dt-bindings: cpufreq: add bindings for MediaTek cpufreq HW
2 parents dd7c46d + 4855e26 commit 27de8d5

File tree

5 files changed

+448
-1
lines changed

5 files changed

+448
-1
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/cpufreq/cpufreq-mediatek-hw.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek's CPUFREQ Bindings
8+
9+
maintainers:
10+
- Hector Yuan <[email protected]>
11+
12+
description:
13+
CPUFREQ HW is a hardware engine used by MediaTek SoCs to
14+
manage frequency in hardware. It is capable of controlling
15+
frequency for multiple clusters.
16+
17+
properties:
18+
compatible:
19+
const: mediatek,cpufreq-hw
20+
21+
reg:
22+
minItems: 1
23+
maxItems: 2
24+
description:
25+
Addresses and sizes for the memory of the HW bases in
26+
each frequency domain. Each entry corresponds to
27+
a register bank for each frequency domain present.
28+
29+
"#performance-domain-cells":
30+
description:
31+
Number of cells in a performance domain specifier.
32+
Set const to 1 here for nodes providing multiple
33+
performance domains.
34+
const: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
- "#performance-domain-cells"
40+
41+
additionalProperties: false
42+
43+
examples:
44+
- |
45+
cpus {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
49+
cpu0: cpu@0 {
50+
device_type = "cpu";
51+
compatible = "arm,cortex-a55";
52+
enable-method = "psci";
53+
performance-domains = <&performance 0>;
54+
reg = <0x000>;
55+
};
56+
};
57+
58+
/* ... */
59+
60+
soc {
61+
#address-cells = <2>;
62+
#size-cells = <2>;
63+
64+
performance: performance-controller@11bc00 {
65+
compatible = "mediatek,cpufreq-hw";
66+
reg = <0 0x0011bc10 0 0x120>, <0 0x0011bd30 0 0x120>;
67+
68+
#performance-domain-cells = <1>;
69+
};
70+
};

drivers/cpufreq/Kconfig.arm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ config ARM_MEDIATEK_CPUFREQ
133133
help
134134
This adds the CPUFreq driver support for MediaTek SoCs.
135135

136+
config ARM_MEDIATEK_CPUFREQ_HW
137+
tristate "MediaTek CPUFreq HW driver"
138+
depends on ARCH_MEDIATEK || COMPILE_TEST
139+
default m
140+
help
141+
Support for the CPUFreq HW driver.
142+
Some MediaTek chipsets have a HW engine to offload the steps
143+
necessary for changing the frequency of the CPUs. Firmware loaded
144+
in this engine exposes a programming interface to the OS.
145+
The driver implements the cpufreq interface for this HW engine.
146+
Say Y if you want to support CPUFreq HW.
147+
136148
config ARM_OMAP2PLUS_CPUFREQ
137149
bool "TI OMAP2+"
138150
depends on ARCH_OMAP2PLUS

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o
5656
obj-$(CONFIG_ARM_IMX_CPUFREQ_DT) += imx-cpufreq-dt.o
5757
obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o
5858
obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ) += mediatek-cpufreq.o
59+
obj-$(CONFIG_ARM_MEDIATEK_CPUFREQ_HW) += mediatek-cpufreq-hw.o
5960
obj-$(CONFIG_MACH_MVEBU_V7) += mvebu-cpufreq.o
6061
obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o
6162
obj-$(CONFIG_ARM_PXA2xx_CPUFREQ) += pxa2xx-cpufreq.o

0 commit comments

Comments
 (0)