Skip to content

Commit d39fc26

Browse files
committed
Merge branch 'clk-qcom' into clk-next
- Enable CPU clks on Qualcomm MSM8996 SoCs * clk-qcom: clk: qcom: Add CPU clock driver for msm8996 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 soc: qcom: Separate kryo l2 accessors from PMU driver clk: qcom: Fix return value check in apss_ipq6018_probe()
2 parents 12ef393 + 03e342d commit d39fc26

File tree

12 files changed

+711
-68
lines changed

12 files changed

+711
-68
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/qcom,kryocc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm clock controller for MSM8996 CPUs
8+
9+
maintainers:
10+
- Loic Poulain <[email protected]>
11+
12+
description: |
13+
Qualcomm CPU clock controller for MSM8996 CPUs, clock 0 is for Power cluster
14+
and clock 1 is for Perf cluster.
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- qcom,msm8996-apcc
20+
21+
reg:
22+
maxItems: 1
23+
24+
'#clock-cells':
25+
const: 1
26+
27+
clocks:
28+
items:
29+
- description: Primary PLL clock for power cluster (little)
30+
- description: Primary PLL clock for perf cluster (big)
31+
- description: Alternate PLL clock for power cluster (little)
32+
- description: Alternate PLL clock for perf cluster (big)
33+
34+
clock-names:
35+
items:
36+
- const: pwrcl_pll
37+
- const: perfcl_pll
38+
- const: pwrcl_alt_pll
39+
- const: perfcl_alt_pll
40+
41+
required:
42+
- compatible
43+
- reg
44+
- '#clock-cells'
45+
46+
additionalProperties: false
47+
48+
examples:
49+
# Example for msm8996
50+
- |
51+
kryocc: clock-controller@6400000 {
52+
compatible = "qcom,msm8996-apcc";
53+
reg = <0x6400000 0x90000>;
54+
#clock-cells = <1>;
55+
};
56+
...

drivers/clk/qcom/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ config QCOM_CLK_APCS_MSM8916
3737
Say Y if you want to support CPU frequency scaling on devices
3838
such as msm8916.
3939

40+
config QCOM_CLK_APCC_MSM8996
41+
tristate "MSM8996 CPU Clock Controller"
42+
select QCOM_KRYO_L2_ACCESSORS
43+
depends on ARM64
44+
help
45+
Support for the CPU clock controller on msm8996 devices.
46+
Say Y if you want to support CPU clock scaling using CPUfreq
47+
drivers for dyanmic power management.
48+
4049
config QCOM_CLK_RPM
4150
tristate "RPM based Clock Controller"
4251
depends on MFD_QCOM_RPM

drivers/clk/qcom/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
4444
obj-$(CONFIG_MSM_MMCC_8998) += mmcc-msm8998.o
4545
obj-$(CONFIG_QCOM_A53PLL) += a53-pll.o
4646
obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o
47+
obj-$(CONFIG_QCOM_CLK_APCC_MSM8996) += clk-cpu-8996.o
4748
obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
4849
obj-$(CONFIG_QCOM_CLK_RPMH) += clk-rpmh.o
4950
obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o

drivers/clk/qcom/apss-ipq6018.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static int apss_ipq6018_probe(struct platform_device *pdev)
8787
struct regmap *regmap;
8888

8989
regmap = dev_get_regmap(pdev->dev.parent, NULL);
90-
if (IS_ERR(regmap))
91-
return PTR_ERR(regmap);
90+
if (!regmap)
91+
return -ENODEV;
9292

9393
return qcom_cc_really_probe(pdev, &apss_ipq6018_desc, regmap);
9494
}

drivers/clk/qcom/clk-alpha-pll.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ struct pll_vco {
4747
u32 val;
4848
};
4949

50+
#define VCO(a, b, c) { \
51+
.val = a,\
52+
.min_freq = b,\
53+
.max_freq = c,\
54+
}
55+
5056
/**
5157
* struct clk_alpha_pll - phase locked loop (PLL)
5258
* @offset: base address of registers

0 commit comments

Comments
 (0)