Skip to content

Commit 35655ce

Browse files
committed
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk updates from Stephen Boyd: "Here's a collection of largely clk driver updates. The usual suspects are here: i.MX, Qualcomm, Renesas, Allwinner, Samsung, and Rockchip, but it feels pretty light on commits. There's only one real commit to the framework core and that's to consolidate code. Otherwise the diffstat is dominated by many Qualcomm clk driver patches that modernize the driver for the proper way of speciying clk parents. That's shifting data around, which could subtly break things so I'll be on the lookout for fixes. New Drivers: - Proper clk driver for Mediatek MT7621 SoCs - Support for the clock controller on the new Rockchip rk3568 Updates: - Simplify Zynq Kconfig dependencies - Use clk_hw pointers in socfpga driver - Cleanup parent data in qcom clk drivers - Some cleanups for rk3399 modularization - Fix reparenting of i.MX UART clocks by initializing only the ones associated to stdout - Correct the PCIE clocks for i.MX8MP and i.MX8MQ - Make i.MX LPCG and SCU clocks return on registering failure - Kernel doc fixes - Add DAB hardware accelerator clocks on Renesas R-Car E3 and M3-N - Add timer (TMU) clocks on Renesas R-Car H3 ES1.0 - Add Timer (TMU & CMT) and thermal sensor (TSC) clocks on Renesas R-Car V3U - Sigma-delta modulation on Allwinner V3s audio PLL" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (82 commits) MAINTAINERS: add MT7621 CLOCK maintainer staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' staging: mt7621-dts: make use of new 'mt7621-clk' clk: ralink: add clock driver for mt7621 SoC clk: uniphier: Fix potential infinite loop clk: qcom: rpmh: add support for SDX55 rpmh IPA clock clk: qcom: gcc-sdm845: get rid of the test clock clk: qcom: convert SDM845 Global Clock Controller to parent_data dt-bindings: clock: separate SDM845 GCC clock bindings clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a7-pll: Add missing MODULE_DEVICE_TABLE dt: bindings: add mt7621-sysc device tree binding documentation dt-bindings: clock: add dt binding header for mt7621 clocks clk: samsung: Remove redundant dev_err calls clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback clk: zynqmp: Drop dependency on ARCH_ZYNQMP clk: zynqmp: Enable the driver if ZYNQMP_FIRMWARE is selected clk: qcom: gcc-sm8350: use ARRAY_SIZE instead of specifying num_parents ...
2 parents d8201ef + 3ba2d41 commit 35655ce

File tree

109 files changed

+5279
-2034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+5279
-2034
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/mediatek,mt7621-sysc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MT7621 Clock Device Tree Bindings
8+
9+
maintainers:
10+
- Sergio Paracuellos <[email protected]>
11+
12+
description: |
13+
The MT7621 has a PLL controller from where the cpu clock is provided
14+
as well as derived clocks for the bus and the peripherals. It also
15+
can gate SoC device clocks.
16+
17+
Each clock is assigned an identifier and client nodes use this identifier
18+
to specify the clock which they consume.
19+
20+
All these identifiers could be found in:
21+
[1]: <include/dt-bindings/clock/mt7621-clk.h>.
22+
23+
The clocks are provided inside a system controller node.
24+
25+
properties:
26+
compatible:
27+
items:
28+
- const: mediatek,mt7621-sysc
29+
- const: syscon
30+
31+
reg:
32+
maxItems: 1
33+
34+
"#clock-cells":
35+
description:
36+
The first cell indicates the clock number, see [1] for available
37+
clocks.
38+
const: 1
39+
40+
ralink,memctl:
41+
$ref: /schemas/types.yaml#/definitions/phandle
42+
description:
43+
phandle of syscon used to control memory registers
44+
45+
clock-output-names:
46+
maxItems: 8
47+
48+
required:
49+
- compatible
50+
- reg
51+
- '#clock-cells'
52+
- ralink,memctl
53+
54+
additionalProperties: false
55+
56+
examples:
57+
- |
58+
#include <dt-bindings/clock/mt7621-clk.h>
59+
60+
sysc: sysc@0 {
61+
compatible = "mediatek,mt7621-sysc", "syscon";
62+
reg = <0x0 0x100>;
63+
#clock-cells = <1>;
64+
ralink,memctl = <&memc>;
65+
clock-output-names = "xtal", "cpu", "bus",
66+
"50m", "125m", "150m",
67+
"250m", "270m";
68+
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/qcom,gcc-sdm845.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Global Clock & Reset Controller Binding
8+
9+
maintainers:
10+
- Stephen Boyd <[email protected]>
11+
- Taniya Das <[email protected]>
12+
13+
description: |
14+
Qualcomm global clock control module which supports the clocks, resets and
15+
power domains on SDM845
16+
17+
See also:
18+
- dt-bindings/clock/qcom,gcc-sdm845.h
19+
20+
properties:
21+
compatible:
22+
const: qcom,gcc-sdm845
23+
24+
clocks:
25+
items:
26+
- description: Board XO source
27+
- description: Board active XO source
28+
- description: Sleep clock source
29+
- description: PCIE 0 Pipe clock source
30+
- description: PCIE 1 Pipe clock source
31+
32+
clock-names:
33+
items:
34+
- const: bi_tcxo
35+
- const: bi_tcxo_ao
36+
- const: sleep_clk
37+
- const: pcie_0_pipe_clk
38+
- const: pcie_1_pipe_clk
39+
40+
'#clock-cells':
41+
const: 1
42+
43+
'#reset-cells':
44+
const: 1
45+
46+
'#power-domain-cells':
47+
const: 1
48+
49+
reg:
50+
maxItems: 1
51+
52+
protected-clocks:
53+
description:
54+
Protected clock specifier list as per common clock binding.
55+
56+
required:
57+
- compatible
58+
- reg
59+
- '#clock-cells'
60+
- '#reset-cells'
61+
- '#power-domain-cells'
62+
63+
additionalProperties: false
64+
65+
examples:
66+
# Example for GCC for SDM845:
67+
- |
68+
#include <dt-bindings/clock/qcom,rpmh.h>
69+
clock-controller@100000 {
70+
compatible = "qcom,gcc-sdm845";
71+
reg = <0x100000 0x1f0000>;
72+
clocks = <&rpmhcc RPMH_CXO_CLK>,
73+
<&rpmhcc RPMH_CXO_CLK_A>,
74+
<&sleep_clk>,
75+
<&pcie0_lane>,
76+
<&pcie1_lane>;
77+
clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk", "pcie_0_pipe_clk", "pcie_1_pipe_clk";
78+
#clock-cells = <1>;
79+
#reset-cells = <1>;
80+
#power-domain-cells = <1>;
81+
};
82+
...

Documentation/devicetree/bindings/clock/qcom,gcc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ description: |
3232
- dt-bindings/clock/qcom,gcc-mdm9615.h
3333
- dt-bindings/reset/qcom,gcc-mdm9615.h
3434
- dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660)
35-
- dt-bindings/clock/qcom,gcc-sdm845.h
3635
3736
properties:
3837
compatible:
@@ -52,7 +51,6 @@ properties:
5251
- qcom,gcc-mdm9615
5352
- qcom,gcc-sdm630
5453
- qcom,gcc-sdm660
55-
- qcom,gcc-sdm845
5654

5755
'#clock-cells':
5856
const: 1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/rockchip,rk3568-cru.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ROCKCHIP rk3568 Family Clock Control Module Binding
8+
9+
maintainers:
10+
- Elaine Zhang <[email protected]>
11+
- Heiko Stuebner <[email protected]>
12+
13+
description: |
14+
The RK3568 clock controller generates the clock and also implements a
15+
reset controller for SoC peripherals.
16+
(examples: provide SCLK_UART1\PCLK_UART1 and SRST_P_UART1\SRST_S_UART1 for UART module)
17+
Each clock is assigned an identifier and client nodes can use this identifier
18+
to specify the clock which they consume. All available clocks are defined as
19+
preprocessor macros in the dt-bindings/clock/rk3568-cru.h headers and can be
20+
used in device tree sources.
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- rockchip,rk3568-cru
26+
- rockchip,rk3568-pmucru
27+
28+
reg:
29+
maxItems: 1
30+
31+
"#clock-cells":
32+
const: 1
33+
34+
"#reset-cells":
35+
const: 1
36+
37+
required:
38+
- compatible
39+
- reg
40+
- "#clock-cells"
41+
- "#reset-cells"
42+
43+
additionalProperties: false
44+
45+
examples:
46+
# Clock Control Module node:
47+
- |
48+
pmucru: clock-controller@fdd00000 {
49+
compatible = "rockchip,rk3568-pmucru";
50+
reg = <0xfdd00000 0x1000>;
51+
#clock-cells = <1>;
52+
#reset-cells = <1>;
53+
};
54+
- |
55+
cru: clock-controller@fdd20000 {
56+
compatible = "rockchip,rk3568-cru";
57+
reg = <0xfdd20000 0x1000>;
58+
#clock-cells = <1>;
59+
#reset-cells = <1>;
60+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11469,6 +11469,12 @@ L: [email protected]
1146911469
S: Maintained
1147011470
F: drivers/net/wireless/mediatek/mt7601u/
1147111471

11472+
MEDIATEK MT7621 CLOCK DRIVER
11473+
M: Sergio Paracuellos <[email protected]>
11474+
S: Maintained
11475+
F: Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml
11476+
F: drivers/clk/ralink/clk-mt7621.c
11477+
1147211478
MEDIATEK MT7621/28/88 I2C DRIVER
1147311479
M: Stefan Roese <[email protected]>
1147411480

arch/mips/ralink/mt7621.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ phys_addr_t mips_cpc_default_phys_base(void)
112112

113113
void __init ralink_of_remap(void)
114114
{
115-
rt_sysc_membase = plat_of_remap_node("mtk,mt7621-sysc");
116-
rt_memc_membase = plat_of_remap_node("mtk,mt7621-memc");
115+
rt_sysc_membase = plat_of_remap_node("mediatek,mt7621-sysc");
116+
rt_memc_membase = plat_of_remap_node("mediatek,mt7621-memc");
117117

118118
if (!rt_sysc_membase || !rt_memc_membase)
119119
panic("Failed to remap core resources");
@@ -181,7 +181,7 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
181181

182182
if (n0 == MT7621_CHIP_NAME0 && n1 == MT7621_CHIP_NAME1) {
183183
name = "MT7621";
184-
soc_info->compatible = "mtk,mt7621-soc";
184+
soc_info->compatible = "mediatek,mt7621-soc";
185185
} else {
186186
panic("mt7621: unknown SoC, n0:%08x n1:%08x\n", n0, n1);
187187
}

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ source "drivers/clk/meson/Kconfig"
390390
source "drivers/clk/mstar/Kconfig"
391391
source "drivers/clk/mvebu/Kconfig"
392392
source "drivers/clk/qcom/Kconfig"
393+
source "drivers/clk/ralink/Kconfig"
393394
source "drivers/clk/renesas/Kconfig"
394395
source "drivers/clk/rockchip/Kconfig"
395396
source "drivers/clk/samsung/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ obj-$(CONFIG_COMMON_CLK_NXP) += nxp/
100100
obj-$(CONFIG_MACH_PISTACHIO) += pistachio/
101101
obj-$(CONFIG_COMMON_CLK_PXA) += pxa/
102102
obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/
103+
obj-y += ralink/
103104
obj-y += renesas/
104105
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
105106
obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/

drivers/clk/at91/sama7g5.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static const struct {
166166
.c = &pll_characteristics,
167167
.t = PLL_TYPE_FRAC,
168168
/*
169-
* This feeds syspll_divpmcck which may feed critial parts
169+
* This feeds syspll_divpmcck which may feed critical parts
170170
* of the systems like timers. Therefore it should not be
171171
* disabled.
172172
*/
@@ -178,7 +178,7 @@ static const struct {
178178
.c = &pll_characteristics,
179179
.t = PLL_TYPE_DIV,
180180
/*
181-
* This may feed critial parts of the systems like timers.
181+
* This may feed critical parts of the systems like timers.
182182
* Therefore it should not be disabled.
183183
*/
184184
.f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE,
@@ -455,7 +455,7 @@ static const struct {
455455
* @pp: PLL parents
456456
* @pp_mux_table: PLL parents mux table
457457
* @r: clock output range
458-
* @pp_chg_id: id in parrent array of changeable PLL parent
458+
* @pp_chg_id: id in parent array of changeable PLL parent
459459
* @pp_count: PLL parents count
460460
* @id: clock id
461461
*/

drivers/clk/clk.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ static int clk_core_determine_round_nolock(struct clk_core *core,
13301330
return 0;
13311331

13321332
/*
1333-
* At this point, core protection will be disabled if
1333+
* At this point, core protection will be disabled
13341334
* - if the provider is not protected at all
13351335
* - if the calling consumer is the only one which has exclusivity
13361336
* over the provider
@@ -2078,12 +2078,8 @@ static void clk_change_rate(struct clk_core *core)
20782078
return;
20792079

20802080
if (core->flags & CLK_SET_RATE_UNGATE) {
2081-
unsigned long flags;
2082-
20832081
clk_core_prepare(core);
2084-
flags = clk_enable_lock();
2085-
clk_core_enable(core);
2086-
clk_enable_unlock(flags);
2082+
clk_core_enable_lock(core);
20872083
}
20882084

20892085
if (core->new_parent && core->new_parent != core->parent) {
@@ -2116,11 +2112,7 @@ static void clk_change_rate(struct clk_core *core)
21162112
core->rate = clk_recalc(core, best_parent_rate);
21172113

21182114
if (core->flags & CLK_SET_RATE_UNGATE) {
2119-
unsigned long flags;
2120-
2121-
flags = clk_enable_lock();
2122-
clk_core_disable(core);
2123-
clk_enable_unlock(flags);
2115+
clk_core_disable_lock(core);
21242116
clk_core_unprepare(core);
21252117
}
21262118

@@ -3564,18 +3556,14 @@ static int __clk_core_init(struct clk_core *core)
35643556
* reparenting clocks
35653557
*/
35663558
if (core->flags & CLK_IS_CRITICAL) {
3567-
unsigned long flags;
3568-
35693559
ret = clk_core_prepare(core);
35703560
if (ret) {
35713561
pr_warn("%s: critical clk '%s' failed to prepare\n",
35723562
__func__, core->name);
35733563
goto out;
35743564
}
35753565

3576-
flags = clk_enable_lock();
3577-
ret = clk_core_enable(core);
3578-
clk_enable_unlock(flags);
3566+
ret = clk_core_enable_lock(core);
35793567
if (ret) {
35803568
pr_warn("%s: critical clk '%s' failed to enable\n",
35813569
__func__, core->name);

0 commit comments

Comments
 (0)