Skip to content

Commit 522a83a

Browse files
committed
Merge branches 'clk-tenstorrent', 'clk-rockchip', 'clk-imx' and 'clk-allwinner' into clk-next
* clk-tenstorrent: clk: tenstorrent: Add Atlantis clock controller driver reset: tenstorrent: Add reset controller for Atlantis dt-bindings: clk: tenstorrent: Add tenstorrent,atlantis-prcm-rcpu * clk-rockchip: clk: rockchip: rk3568: Add PCIe pipe clock gates clk: rockchip: Add clock controller for the RV1103B dt-bindings: clock: rockchip: Add RV1103B CRU support * clk-imx: clk: imx8mq: Correct the CSI PHY sels clk: vf610: Add support for the Ethernet switch clocks dt-bindings: clock: vf610: Add definitions for MTIP L2 switch dt-bindings: clock: vf610: Drop VF610_CLK_END define clk: vf610: Move VF610_CLK_END define to clk-vf610 driver clk: imx: imx8-acm: fix flags for acm clocks clk: imx: imx6q: Fix device node reference leak in of_assigned_ldb_sels() clk: imx: imx6q: Fix device node reference leak in pll6_bypassed() clk: imx: fracn-gppll: Add 477.4MHz support clk: imx: fracn-gppll: Add 333.333333 MHz support clk: imx: pll14xx: Use unsigned format specifier dt-bindings: clock: imx6q[ul]-clock: add optional clock enet[1]_ref_pad * clk-allwinner: clk: sunxi-ng: sun55i-a523-r: Add missing r-spi module clock
5 parents 699646e + 5aa81ab + 0fc42d2 + 6e42454 + 887f655 commit 522a83a

28 files changed

Lines changed: 2238 additions & 9 deletions

Documentation/devicetree/bindings/clock/imx6q-clock.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,24 @@ properties:
2929
const: 1
3030

3131
clocks:
32+
minItems: 5
3233
items:
3334
- description: 24m osc
3435
- description: 32k osc
3536
- description: ckih1 clock input
3637
- description: anaclk1 clock input
3738
- description: anaclk2 clock input
39+
- description: clock input from enet ref pad
3840

3941
clock-names:
42+
minItems: 5
4043
items:
4144
- const: osc
4245
- const: ckil
4346
- const: ckih1
4447
- const: anaclk1
4548
- const: anaclk2
49+
- const: enet_ref_pad
4650

4751
fsl,pmic-stby-poweroff:
4852
$ref: /schemas/types.yaml#/definitions/flag

Documentation/devicetree/bindings/clock/imx6ul-clock.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@ properties:
2929
const: 1
3030

3131
clocks:
32+
minItems: 4
3233
items:
3334
- description: 32k osc
3435
- description: 24m osc
3536
- description: ipp_di0 clock input
3637
- description: ipp_di1 clock input
38+
- description: clock input from enet1 ref pad
3739

3840
clock-names:
41+
minItems: 4
3942
items:
4043
- const: ckil
4144
- const: osc
4245
- const: ipp_di0
4346
- const: ipp_di1
47+
- const: enet1_ref_pad
4448

4549
required:
4650
- compatible

Documentation/devicetree/bindings/clock/rockchip,rv1126b-cru.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ description:
1717
properties:
1818
compatible:
1919
enum:
20+
- rockchip,rv1103b-cru
2021
- rockchip,rv1126b-cru
2122

2223
reg:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/tenstorrent,atlantis-prcm-rcpu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Tenstorrent Atlantis PRCM (Power, Reset, Clock Management) Module
8+
9+
maintainers:
10+
- Anirudh Srinivasan <[email protected]>
11+
12+
description:
13+
Multifunctional register block found in Tenstorrent Atlantis SoC whose main
14+
function is to control clocks and resets. This block is instantiated multiple
15+
times in the SoC, each block controls clock and resets for a different
16+
subsystem. RCPU prcm serves low speed IO interfaces.
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- tenstorrent,atlantis-prcm-rcpu
22+
23+
reg:
24+
maxItems: 1
25+
26+
clocks:
27+
maxItems: 1
28+
29+
"#clock-cells":
30+
const: 1
31+
description:
32+
See <dt-bindings/clock/tenstorrent,atlantis-prcm-rcpu.h> for valid indices.
33+
34+
"#reset-cells":
35+
const: 1
36+
37+
required:
38+
- compatible
39+
- reg
40+
- clocks
41+
- "#clock-cells"
42+
- "#reset-cells"
43+
44+
additionalProperties: false
45+
46+
examples:
47+
- |
48+
clock-controller@a8000000 {
49+
compatible = "tenstorrent,atlantis-prcm-rcpu";
50+
reg = <0xa8000000 0x10000>;
51+
clocks = <&osc_24m>;
52+
#clock-cells = <1>;
53+
#reset-cells = <1>;
54+
};

MAINTAINERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22812,8 +22812,12 @@ M: Joel Stanley <[email protected]>
2281222812
2281322813
S: Maintained
2281422814
T: git https://github.com/tenstorrent/linux.git
22815+
F: Documentation/devicetree/bindings/clock/tenstorrent,atlantis-prcm-rcpu.yaml
2281522816
F: Documentation/devicetree/bindings/riscv/tenstorrent.yaml
2281622817
F: arch/riscv/boot/dts/tenstorrent/
22818+
F: drivers/clk/tenstorrent/
22819+
F: drivers/reset/reset-tenstorrent-atlantis.c
22820+
F: include/dt-bindings/clock/tenstorrent,atlantis-prcm-rcpu.h
2281722821

2281822822
RISC-V THEAD SoC SUPPORT
2281922823
M: Drew Fustini <[email protected]>

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ source "drivers/clk/starfive/Kconfig"
532532
source "drivers/clk/sunxi/Kconfig"
533533
source "drivers/clk/sunxi-ng/Kconfig"
534534
source "drivers/clk/tegra/Kconfig"
535+
source "drivers/clk/tenstorrent/Kconfig"
535536
source "drivers/clk/thead/Kconfig"
536537
source "drivers/clk/stm32/Kconfig"
537538
source "drivers/clk/ti/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ obj-y += starfive/
156156
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
157157
obj-y += sunxi-ng/
158158
obj-$(CONFIG_ARCH_TEGRA) += tegra/
159+
obj-y += tenstorrent/
159160
obj-$(CONFIG_ARCH_THEAD) += thead/
160161
obj-y += ti/
161162
obj-$(CONFIG_CLK_UNIPHIER) += uniphier/

drivers/clk/imx/clk-fracn-gppll.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {
8585
PLL_FRACN_GP(519750000U, 173, 25, 100, 1, 8),
8686
PLL_FRACN_GP(498000000U, 166, 0, 1, 0, 8),
8787
PLL_FRACN_GP(484000000U, 121, 0, 1, 0, 6),
88+
PLL_FRACN_GP(477400000U, 119, 35, 100, 0, 6),
8889
PLL_FRACN_GP(445333333U, 167, 0, 1, 0, 9),
8990
PLL_FRACN_GP(400000000U, 200, 0, 1, 0, 12),
9091
PLL_FRACN_GP(393216000U, 163, 84, 100, 0, 10),
92+
PLL_FRACN_GP(333333333U, 125, 0, 1, 1, 9),
9193
PLL_FRACN_GP(332600000U, 138, 584, 1000, 0, 10),
9294
PLL_FRACN_GP(300000000U, 150, 0, 1, 0, 12),
9395
PLL_FRACN_GP(241900000U, 201, 584, 1000, 0, 20),

drivers/clk/imx/clk-imx6q.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,23 @@ static void of_assigned_ldb_sels(struct device_node *node,
188188
}
189189
if (clkspec.np != node || clkspec.args[0] >= IMX6QDL_CLK_END) {
190190
pr_err("ccm: parent clock %d not in ccm\n", index);
191+
of_node_put(clkspec.np);
191192
return;
192193
}
193194
parent = clkspec.args[0];
195+
of_node_put(clkspec.np);
194196

195197
rc = of_parse_phandle_with_args(node, "assigned-clocks",
196198
"#clock-cells", index, &clkspec);
197199
if (rc < 0)
198200
return;
199201
if (clkspec.np != node || clkspec.args[0] >= IMX6QDL_CLK_END) {
200202
pr_err("ccm: child clock %d not in ccm\n", index);
203+
of_node_put(clkspec.np);
201204
return;
202205
}
203206
child = clkspec.args[0];
207+
of_node_put(clkspec.np);
204208

205209
if (child != IMX6QDL_CLK_LDB_DI0_SEL &&
206210
child != IMX6QDL_CLK_LDB_DI1_SEL)
@@ -238,8 +242,11 @@ static bool pll6_bypassed(struct device_node *node)
238242
return false;
239243

240244
if (clkspec.np == node &&
241-
clkspec.args[0] == IMX6QDL_PLL6_BYPASS)
245+
clkspec.args[0] == IMX6QDL_PLL6_BYPASS) {
246+
of_node_put(clkspec.np);
242247
break;
248+
}
249+
of_node_put(clkspec.np);
243250
}
244251

245252
/* PLL6 bypass is not part of the assigned clock list */
@@ -249,6 +256,9 @@ static bool pll6_bypassed(struct device_node *node)
249256
ret = of_parse_phandle_with_args(node, "assigned-clock-parents",
250257
"#clock-cells", index, &clkspec);
251258

259+
if (!ret)
260+
of_node_put(clkspec.np);
261+
252262
if (clkspec.args[0] != IMX6QDL_CLK_PLL6)
253263
return true;
254264

drivers/clk/imx/clk-imx8-acm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ static int imx8_acm_clk_probe(struct platform_device *pdev)
371371
for (i = 0; i < priv->soc_data->num_sels; i++) {
372372
hws[sels[i].clkid] = devm_clk_hw_register_mux_parent_data_table(dev,
373373
sels[i].name, sels[i].parents,
374-
sels[i].num_parents, 0,
374+
sels[i].num_parents,
375+
CLK_SET_RATE_NO_REPARENT,
375376
base + sels[i].reg,
376377
sels[i].shift, sels[i].width,
377378
0, NULL, NULL);

0 commit comments

Comments
 (0)