Skip to content

Commit 0bdd95c

Browse files
committed
Merge tag 'cpufreq-arm-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull cpufreq/ARM updates for 6.4 from Viresh Kumar: "- Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta). - Use of_property_present() for testing DT property presence (Rob Herring). - Remove MODULE_LICENSE in non-modules (Nick Alcock). - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss). - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson). - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski). - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno)."
2 parents 44295af + f41e144 commit 0bdd95c

11 files changed

Lines changed: 331 additions & 111 deletions

File tree

Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml

Lines changed: 116 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ properties:
2020
oneOf:
2121
- description: v1 of CPUFREQ HW
2222
items:
23+
- enum:
24+
- qcom,qcm2290-cpufreq-hw
25+
- qcom,sc7180-cpufreq-hw
26+
- qcom,sdm845-cpufreq-hw
27+
- qcom,sm6115-cpufreq-hw
28+
- qcom,sm6350-cpufreq-hw
29+
- qcom,sm8150-cpufreq-hw
2330
- const: qcom,cpufreq-hw
2431

2532
- description: v2 of CPUFREQ HW (EPSS)
2633
items:
2734
- enum:
2835
- qcom,qdu1000-cpufreq-epss
36+
- qcom,sa8775p-cpufreq-epss
2937
- qcom,sc7280-cpufreq-epss
3038
- qcom,sc8280xp-cpufreq-epss
3139
- qcom,sm6375-cpufreq-epss
@@ -36,14 +44,14 @@ properties:
3644
- const: qcom,cpufreq-epss
3745

3846
reg:
39-
minItems: 2
47+
minItems: 1
4048
items:
4149
- description: Frequency domain 0 register region
4250
- description: Frequency domain 1 register region
4351
- description: Frequency domain 2 register region
4452

4553
reg-names:
46-
minItems: 2
54+
minItems: 1
4755
items:
4856
- const: freq-domain0
4957
- const: freq-domain1
@@ -85,6 +93,111 @@ required:
8593

8694
additionalProperties: false
8795

96+
allOf:
97+
- if:
98+
properties:
99+
compatible:
100+
contains:
101+
enum:
102+
- qcom,qcm2290-cpufreq-hw
103+
then:
104+
properties:
105+
reg:
106+
minItems: 1
107+
maxItems: 1
108+
109+
reg-names:
110+
minItems: 1
111+
maxItems: 1
112+
113+
interrupts:
114+
minItems: 1
115+
maxItems: 1
116+
117+
interrupt-names:
118+
minItems: 1
119+
120+
- if:
121+
properties:
122+
compatible:
123+
contains:
124+
enum:
125+
- qcom,qdu1000-cpufreq-epss
126+
- qcom,sc7180-cpufreq-hw
127+
- qcom,sc8280xp-cpufreq-epss
128+
- qcom,sdm845-cpufreq-hw
129+
- qcom,sm6115-cpufreq-hw
130+
- qcom,sm6350-cpufreq-hw
131+
- qcom,sm6375-cpufreq-epss
132+
then:
133+
properties:
134+
reg:
135+
minItems: 2
136+
maxItems: 2
137+
138+
reg-names:
139+
minItems: 2
140+
maxItems: 2
141+
142+
interrupts:
143+
minItems: 2
144+
maxItems: 2
145+
146+
interrupt-names:
147+
minItems: 2
148+
149+
- if:
150+
properties:
151+
compatible:
152+
contains:
153+
enum:
154+
- qcom,sc7280-cpufreq-epss
155+
- qcom,sm8250-cpufreq-epss
156+
- qcom,sm8350-cpufreq-epss
157+
- qcom,sm8450-cpufreq-epss
158+
- qcom,sm8550-cpufreq-epss
159+
then:
160+
properties:
161+
reg:
162+
minItems: 3
163+
maxItems: 3
164+
165+
reg-names:
166+
minItems: 3
167+
maxItems: 3
168+
169+
interrupts:
170+
minItems: 3
171+
maxItems: 3
172+
173+
interrupt-names:
174+
minItems: 3
175+
176+
- if:
177+
properties:
178+
compatible:
179+
contains:
180+
enum:
181+
- qcom,sm8150-cpufreq-hw
182+
then:
183+
properties:
184+
reg:
185+
minItems: 3
186+
maxItems: 3
187+
188+
reg-names:
189+
minItems: 3
190+
maxItems: 3
191+
192+
# On some SoCs the Prime core shares the LMH irq with Big cores
193+
interrupts:
194+
minItems: 2
195+
maxItems: 2
196+
197+
interrupt-names:
198+
minItems: 2
199+
200+
88201
examples:
89202
- |
90203
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
@@ -235,7 +348,7 @@ examples:
235348
#size-cells = <1>;
236349
237350
cpufreq@17d43000 {
238-
compatible = "qcom,cpufreq-hw";
351+
compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
239352
reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
240353
reg-names = "freq-domain0", "freq-domain1";
241354

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ static const struct of_device_id blocklist[] __initconst = {
152152
{ .compatible = "qcom,sm6115", },
153153
{ .compatible = "qcom,sm6350", },
154154
{ .compatible = "qcom,sm6375", },
155+
{ .compatible = "qcom,sm7225", },
155156
{ .compatible = "qcom,sm8150", },
156157
{ .compatible = "qcom,sm8250", },
157158
{ .compatible = "qcom,sm8350", },
@@ -179,7 +180,7 @@ static bool __init cpu0_node_has_opp_v2_prop(void)
179180
struct device_node *np = of_cpu_device_node_get(0);
180181
bool ret = false;
181182

182-
if (of_get_property(np, "operating-points-v2", NULL))
183+
if (of_property_present(np, "operating-points-v2"))
183184
ret = true;
184185

185186
of_node_put(np);

drivers/cpufreq/freq_table.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,3 @@ int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy)
372372

373373
MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");
374374
MODULE_DESCRIPTION("CPUfreq frequency table helpers");
375-
MODULE_LICENSE("GPL");

drivers/cpufreq/imx-cpufreq-dt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
8989

9090
cpu_dev = get_cpu_device(0);
9191

92-
if (!of_find_property(cpu_dev->of_node, "cpu-supply", NULL))
92+
if (!of_property_present(cpu_dev->of_node, "cpu-supply"))
9393
return -ENODEV;
9494

9595
if (of_machine_is_compatible("fsl,imx7ulp")) {

drivers/cpufreq/imx6q-cpufreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static int imx6q_opp_check_speed_grading(struct device *dev)
222222
u32 val;
223223
int ret;
224224

225-
if (of_find_property(dev->of_node, "nvmem-cells", NULL)) {
225+
if (of_property_present(dev->of_node, "nvmem-cells")) {
226226
ret = nvmem_cell_read_u32(dev, "speed_grade", &val);
227227
if (ret)
228228
return ret;
@@ -279,7 +279,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
279279
u32 val;
280280
int ret = 0;
281281

282-
if (of_find_property(dev->of_node, "nvmem-cells", NULL)) {
282+
if (of_property_present(dev->of_node, "nvmem-cells")) {
283283
ret = nvmem_cell_read_u32(dev, "speed_grade", &val);
284284
if (ret)
285285
return ret;

0 commit comments

Comments
 (0)