Skip to content

Commit 1578968

Browse files
committed
Merge branches 'clk-imx6-mmdc', 'clk-qcom-krait', 'clk-rockchip' and 'clk-smp2s11-match' into clk-next
- iMX6 MMDC clks - Qualcomm Krait CPU clk support * clk-imx6-mmdc: clk: imx6q: add mmdc0 ipg clock clk: imx6sl: add mmdc ipg clocks clk: imx6sll: add mmdc1 ipg clock clk: imx6sx: add mmdc1 ipg clock clk: imx6ul: add mmdc1 ipg clock * clk-qcom-krait: clk: qcom: Add safe switch hook for krait mux clocks dt-bindings: clock: Document qcom,krait-cc clk: qcom: Add Krait clock controller driver dt-bindings: arm: Document qcom,kpss-gcc clk: qcom: Add KPSS ACC/GCC driver clk: qcom: Add support for Krait clocks clk: qcom: Add IPQ806X's HFPLLs clk: qcom: Add MSM8960/APQ8064's HFPLLs dt-bindings: clock: Document qcom,hfpll clk: qcom: Add HFPLL driver clk: qcom: Add support for High-Frequency PLLs (HFPLLs) ARM: Add Krait L2 register accessor functions * clk-rockchip: clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call clk: rockchip: use the newly added clock-id for hdmi on RK3066 clk: rockchip: add clock-id for HCLK_HDMI on rk3066 clk: rockchip: fix wrong mmc sample phase shift for rk3328 clk: rockchip: improve rk3288 pll rates for better hdmi output * clk-smp2s11-match: clk: s2mps11: Add used attribute to s2mps11_dt_match clk: s2mps11: Fix matching when built as module and DT node contains compatible
5 parents 1fe7c04 + 341ce35 + 7761272 + 1b4d990 + 9c940bb commit 1578968

36 files changed

+1620
-19
lines changed

Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,29 @@ PROPERTIES
2121
the register region. An optional second element specifies
2222
the base address and size of the alias register region.
2323

24+
- clocks:
25+
Usage: required
26+
Value type: <prop-encoded-array>
27+
Definition: reference to the pll parents.
28+
29+
- clock-names:
30+
Usage: required
31+
Value type: <stringlist>
32+
Definition: must be "pll8_vote", "pxo".
33+
34+
- clock-output-names:
35+
Usage: optional
36+
Value type: <string>
37+
Definition: Name of the output clock. Typically acpuX_aux where X is a
38+
CPU number starting at 0.
39+
2440
Example:
2541

2642
clock-controller@2088000 {
2743
compatible = "qcom,kpss-acc-v2";
2844
reg = <0x02088000 0x1000>,
2945
<0x02008000 0x1000>;
46+
clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
47+
clock-names = "pll8_vote", "pxo";
48+
clock-output-names = "acpu0_aux";
3049
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
2+
3+
PROPERTIES
4+
5+
- compatible:
6+
Usage: required
7+
Value type: <string>
8+
Definition: should be one of the following. The generic compatible
9+
"qcom,kpss-gcc" should also be included.
10+
"qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc"
11+
"qcom,kpss-gcc-apq8064", "qcom,kpss-gcc"
12+
"qcom,kpss-gcc-msm8974", "qcom,kpss-gcc"
13+
"qcom,kpss-gcc-msm8960", "qcom,kpss-gcc"
14+
15+
- reg:
16+
Usage: required
17+
Value type: <prop-encoded-array>
18+
Definition: base address and size of the register region
19+
20+
- clocks:
21+
Usage: required
22+
Value type: <prop-encoded-array>
23+
Definition: reference to the pll parents.
24+
25+
- clock-names:
26+
Usage: required
27+
Value type: <stringlist>
28+
Definition: must be "pll8_vote", "pxo".
29+
30+
- clock-output-names:
31+
Usage: required
32+
Value type: <string>
33+
Definition: Name of the output clock. Typically acpu_l2_aux indicating
34+
an L2 cache auxiliary clock.
35+
36+
Example:
37+
38+
l2cc: clock-controller@2011000 {
39+
compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc";
40+
reg = <0x2011000 0x1000>;
41+
clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
42+
clock-names = "pll8_vote", "pxo";
43+
clock-output-names = "acpu_l2_aux";
44+
};
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
High-Frequency PLL (HFPLL)
2+
3+
PROPERTIES
4+
5+
- compatible:
6+
Usage: required
7+
Value type: <string>:
8+
shall contain only one of the following. The generic
9+
compatible "qcom,hfpll" should be also included.
10+
11+
"qcom,hfpll-ipq8064", "qcom,hfpll"
12+
"qcom,hfpll-apq8064", "qcom,hfpll"
13+
"qcom,hfpll-msm8974", "qcom,hfpll"
14+
"qcom,hfpll-msm8960", "qcom,hfpll"
15+
16+
- reg:
17+
Usage: required
18+
Value type: <prop-encoded-array>
19+
Definition: address and size of HPLL registers. An optional second
20+
element specifies the address and size of the alias
21+
register region.
22+
23+
- clocks:
24+
Usage: required
25+
Value type: <prop-encoded-array>
26+
Definition: reference to the xo clock.
27+
28+
- clock-names:
29+
Usage: required
30+
Value type: <stringlist>
31+
Definition: must be "xo".
32+
33+
- clock-output-names:
34+
Usage: required
35+
Value type: <string>
36+
Definition: Name of the PLL. Typically hfpllX where X is a CPU number
37+
starting at 0. Otherwise hfpll_Y where Y is more specific
38+
such as "l2".
39+
40+
Example:
41+
42+
1) An HFPLL for the L2 cache.
43+
44+
clock-controller@f9016000 {
45+
compatible = "qcom,hfpll-ipq8064", "qcom,hfpll";
46+
reg = <0xf9016000 0x30>;
47+
clocks = <&xo_board>;
48+
clock-names = "xo";
49+
clock-output-names = "hfpll_l2";
50+
};
51+
52+
2) An HFPLL for CPU0. This HFPLL has the alias register region.
53+
54+
clock-controller@f908a000 {
55+
compatible = "qcom,hfpll-ipq8064", "qcom,hfpll";
56+
reg = <0xf908a000 0x30>, <0xf900a000 0x30>;
57+
clocks = <&xo_board>;
58+
clock-names = "xo";
59+
clock-output-names = "hfpll0";
60+
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Krait Clock Controller
2+
3+
PROPERTIES
4+
5+
- compatible:
6+
Usage: required
7+
Value type: <string>
8+
Definition: must be one of:
9+
"qcom,krait-cc-v1"
10+
"qcom,krait-cc-v2"
11+
12+
- #clock-cells:
13+
Usage: required
14+
Value type: <u32>
15+
Definition: must be 1
16+
17+
- clocks:
18+
Usage: required
19+
Value type: <prop-encoded-array>
20+
Definition: reference to the clock parents of hfpll, secondary muxes.
21+
22+
- clock-names:
23+
Usage: required
24+
Value type: <stringlist>
25+
Definition: must be "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb".
26+
27+
Example:
28+
29+
kraitcc: clock-controller {
30+
compatible = "qcom,krait-cc-v1";
31+
clocks = <&hfpll0>, <&hfpll1>, <&acpu0_aux>, <&acpu1_aux>, <qsb>;
32+
clock-names = "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb";
33+
#clock-cells = <1>;
34+
};

arch/arm/common/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ config DMABOUNCE
77
bool
88
select ZONE_DMA
99

10+
config KRAIT_L2_ACCESSORS
11+
bool
12+
1013
config SHARP_LOCOMO
1114
bool
1215

arch/arm/common/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ obj-y += firmware.o
77

88
obj-$(CONFIG_SA1111) += sa1111.o
99
obj-$(CONFIG_DMABOUNCE) += dmabounce.o
10+
obj-$(CONFIG_KRAIT_L2_ACCESSORS) += krait-l2-accessors.o
1011
obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
1112
obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
1213
obj-$(CONFIG_SHARP_SCOOP) += scoop.o

arch/arm/common/krait-l2-accessors.c

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
// Copyright (c) 2018, The Linux Foundation. All rights reserved.
3+
4+
#include <linux/spinlock.h>
5+
#include <linux/export.h>
6+
7+
#include <asm/barrier.h>
8+
#include <asm/krait-l2-accessors.h>
9+
10+
static DEFINE_RAW_SPINLOCK(krait_l2_lock);
11+
12+
void krait_set_l2_indirect_reg(u32 addr, u32 val)
13+
{
14+
unsigned long flags;
15+
16+
raw_spin_lock_irqsave(&krait_l2_lock, flags);
17+
/*
18+
* Select the L2 window by poking l2cpselr, then write to the window
19+
* via l2cpdr.
20+
*/
21+
asm volatile ("mcr p15, 3, %0, c15, c0, 6 @ l2cpselr" : : "r" (addr));
22+
isb();
23+
asm volatile ("mcr p15, 3, %0, c15, c0, 7 @ l2cpdr" : : "r" (val));
24+
isb();
25+
26+
raw_spin_unlock_irqrestore(&krait_l2_lock, flags);
27+
}
28+
EXPORT_SYMBOL(krait_set_l2_indirect_reg);
29+
30+
u32 krait_get_l2_indirect_reg(u32 addr)
31+
{
32+
u32 val;
33+
unsigned long flags;
34+
35+
raw_spin_lock_irqsave(&krait_l2_lock, flags);
36+
/*
37+
* Select the L2 window by poking l2cpselr, then read from the window
38+
* via l2cpdr.
39+
*/
40+
asm volatile ("mcr p15, 3, %0, c15, c0, 6 @ l2cpselr" : : "r" (addr));
41+
isb();
42+
asm volatile ("mrc p15, 3, %0, c15, c0, 7 @ l2cpdr" : "=r" (val));
43+
44+
raw_spin_unlock_irqrestore(&krait_l2_lock, flags);
45+
46+
return val;
47+
}
48+
EXPORT_SYMBOL(krait_get_l2_indirect_reg);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#ifndef __ASMARM_KRAIT_L2_ACCESSORS_H
4+
#define __ASMARM_KRAIT_L2_ACCESSORS_H
5+
6+
extern void krait_set_l2_indirect_reg(u32 addr, u32 val);
7+
extern u32 krait_get_l2_indirect_reg(u32 addr);
8+
9+
#endif

drivers/clk/clk-s2mps11.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,36 @@ static const struct platform_device_id s2mps11_clk_id[] = {
229229
};
230230
MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
231231

232+
#ifdef CONFIG_OF
233+
/*
234+
* Device is instantiated through parent MFD device and device matching is done
235+
* through platform_device_id.
236+
*
237+
* However if device's DT node contains proper clock compatible and driver is
238+
* built as a module, then the *module* matching will be done trough DT aliases.
239+
* This requires of_device_id table. In the same time this will not change the
240+
* actual *device* matching so do not add .of_match_table.
241+
*/
242+
static const struct of_device_id s2mps11_dt_match[] __used = {
243+
{
244+
.compatible = "samsung,s2mps11-clk",
245+
.data = (void *)S2MPS11X,
246+
}, {
247+
.compatible = "samsung,s2mps13-clk",
248+
.data = (void *)S2MPS13X,
249+
}, {
250+
.compatible = "samsung,s2mps14-clk",
251+
.data = (void *)S2MPS14X,
252+
}, {
253+
.compatible = "samsung,s5m8767-clk",
254+
.data = (void *)S5M8767X,
255+
}, {
256+
/* Sentinel */
257+
},
258+
};
259+
MODULE_DEVICE_TABLE(of, s2mps11_dt_match);
260+
#endif
261+
232262
static struct platform_driver s2mps11_clk_driver = {
233263
.driver = {
234264
.name = "s2mps11-clk",

drivers/clk/imx/clk-imx6q.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
789789
clk[IMX6QDL_CLK_MLB] = imx_clk_gate2("mlb", "axi", base + 0x74, 18);
790790
clk[IMX6QDL_CLK_MMDC_CH0_AXI] = imx_clk_gate2_flags("mmdc_ch0_axi", "mmdc_ch0_axi_podf", base + 0x74, 20, CLK_IS_CRITICAL);
791791
clk[IMX6QDL_CLK_MMDC_CH1_AXI] = imx_clk_gate2("mmdc_ch1_axi", "mmdc_ch1_axi_podf", base + 0x74, 22);
792+
clk[IMX6QDL_CLK_MMDC_P0_IPG] = imx_clk_gate2_flags("mmdc_p0_ipg", "ipg", base + 0x74, 24, CLK_IS_CRITICAL);
792793
clk[IMX6QDL_CLK_OCRAM] = imx_clk_gate2("ocram", "ahb", base + 0x74, 28);
793794
clk[IMX6QDL_CLK_OPENVG_AXI] = imx_clk_gate2("openvg_axi", "axi", base + 0x74, 30);
794795
clk[IMX6QDL_CLK_PCIE_AXI] = imx_clk_gate2("pcie_axi", "pcie_axi_sel", base + 0x78, 0);

0 commit comments

Comments
 (0)