Skip to content

Commit f9fca89

Browse files
committed
Merge branches 'clk-xilinx', 'clk-kunit', 'clk-cs2000' and 'clk-renesas' into clk-next
- Kunit tests for clk-gate implementation - Convert Cirrus Logic CS2000P driver to regmap, yamlify DT binding and add support for dynamic mode * clk-xilinx: clk: zynqmp: replace warn_once with pr_debug for failed clock ops * clk-kunit: clk: gate: Add some kunit test suites * clk-cs2000: clk: cs2000-cp: convert driver to regmap clk: cs2000-cp: freeze config during register fiddling clk: cs2000-cp: make clock skip setting configurable clk: cs2000-cp: add support for dynamic mode clk: cs2000-cp: Make aux output function controllable dt-bindings: clock: cs2000-cp: document cirrus,dynamic-mode dt-bindings: clock: cs2000-cp: document cirrus,clock-skip flag dt-bindings: clock: cs2000-cp: document aux-output-source dt-bindings: clock: convert cs2000-cp bindings to yaml * clk-renesas: dt-bindings: clock: renesas: Make example 'clocks' parsable clk: rs9: Add Renesas 9-series PCIe clock generator driver clk: fixed-factor: Introduce devm_clk_hw_register_fixed_factor_index() dt-bindings: clk: rs9: Add Renesas 9-series I2C PCIe clock generator clk: renesas: r8a779f0: Add PFC clock clk: renesas: r8a779f0: Add I2C clocks clk: renesas: r8a779f0: Add WDT clock clk: renesas: r8a779f0: Fix RSW2 clock divider clk: renesas: rzg2l-cpg: Add support for RZ/V2L SoC dt-bindings: clock: renesas: Document RZ/V2L SoC dt-bindings: clock: Add R9A07G054 CPG Clock and Reset Definitions clk: renesas: r8a779a0: Add CANFD module clock clk: renesas: r9a07g044: Update multiplier and divider values for PLL2/3 clk: renesas: r8a7799[05]: Add MLP clocks clk: renesas: r8a779f0: Add SYS-DMAC clocks
5 parents 407c04d + 4917394 + a992acb + 5edffb9 + 3b1db05 commit f9fca89

28 files changed

+1744
-337
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/cirrus,cs2000-cp.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Binding CIRRUS LOGIC Fractional-N Clock Synthesizer & Clock Multiplier
8+
9+
maintainers:
10+
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
11+
12+
description: |
13+
The CS2000-CP is an extremely versatile system clocking device that
14+
utilizes a programmable phase lock loop.
15+
16+
Link: https://www.cirrus.com/products/cs2000/
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- cirrus,cs2000-cp
22+
23+
clocks:
24+
description:
25+
Common clock binding for CLK_IN, XTI/REF_CLK
26+
minItems: 2
27+
maxItems: 2
28+
29+
clock-names:
30+
items:
31+
- const: clk_in
32+
- const: ref_clk
33+
34+
'#clock-cells':
35+
const: 0
36+
37+
reg:
38+
maxItems: 1
39+
40+
cirrus,aux-output-source:
41+
description:
42+
Specifies the function of the auxiliary clock output pin
43+
$ref: /schemas/types.yaml#/definitions/uint32
44+
enum:
45+
- 0 # CS2000CP_AUX_OUTPUT_REF_CLK: ref_clk input
46+
- 1 # CS2000CP_AUX_OUTPUT_CLK_IN: clk_in input
47+
- 2 # CS2000CP_AUX_OUTPUT_CLK_OUT: clk_out output
48+
- 3 # CS2000CP_AUX_OUTPUT_PLL_LOCK: pll lock status
49+
default: 0
50+
51+
cirrus,clock-skip:
52+
description:
53+
This mode allows the PLL to maintain lock even when CLK_IN
54+
has missing pulses for up to 20 ms.
55+
$ref: /schemas/types.yaml#/definitions/flag
56+
57+
cirrus,dynamic-mode:
58+
description:
59+
In dynamic mode, the CLK_IN input is used to drive the
60+
digital PLL of the silicon.
61+
If not given, the static mode shall be used to derive the
62+
output signal directly from the REF_CLK input.
63+
$ref: /schemas/types.yaml#/definitions/flag
64+
65+
required:
66+
- compatible
67+
- reg
68+
- clocks
69+
- clock-names
70+
- '#clock-cells'
71+
72+
additionalProperties: false
73+
74+
examples:
75+
- |
76+
#include <dt-bindings/clock/cirrus,cs2000-cp.h>
77+
78+
i2c@0 {
79+
reg = <0x0 0x100>;
80+
#address-cells = <1>;
81+
#size-cells = <0>;
82+
83+
clock-controller@4f {
84+
#clock-cells = <0>;
85+
compatible = "cirrus,cs2000-cp";
86+
reg = <0x4f>;
87+
clocks = <&rcar_sound 0>, <&x12_clk>;
88+
clock-names = "clk_in", "ref_clk";
89+
cirrus,aux-output-source = <CS2000CP_AUX_OUTPUT_CLK_OUT>;
90+
};
91+
};

Documentation/devicetree/bindings/clock/cs2000-cp.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/renesas,9series.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Binding for Renesas 9-series I2C PCIe clock generators
8+
9+
description: |
10+
The Renesas 9-series are I2C PCIe clock generators providing
11+
from 1 to 20 output clocks.
12+
13+
When referencing the provided clock in the DT using phandle
14+
and clock specifier, the following mapping applies:
15+
16+
- 9FGV0241:
17+
0 -- DIF0
18+
1 -- DIF1
19+
20+
maintainers:
21+
- Marek Vasut <marex@denx.de>
22+
23+
properties:
24+
compatible:
25+
enum:
26+
- renesas,9fgv0241
27+
28+
reg:
29+
description: I2C device address
30+
enum: [ 0x68, 0x6a ]
31+
32+
'#clock-cells':
33+
const: 1
34+
35+
clocks:
36+
items:
37+
- description: XTal input clock
38+
39+
renesas,out-amplitude-microvolt:
40+
enum: [ 600000, 700000, 800000, 900000 ]
41+
description: Output clock signal amplitude
42+
43+
renesas,out-spread-spectrum:
44+
$ref: /schemas/types.yaml#/definitions/uint32
45+
enum: [ 100000, 99750, 99500 ]
46+
description: Output clock down spread in pcm (1/1000 of percent)
47+
48+
patternProperties:
49+
"^DIF[0-19]$":
50+
type: object
51+
description:
52+
Description of one of the outputs (DIF0..DIF19).
53+
54+
properties:
55+
renesas,slew-rate:
56+
$ref: /schemas/types.yaml#/definitions/uint32
57+
enum: [ 2000000, 3000000 ]
58+
description: Output clock slew rate select in V/ns
59+
60+
additionalProperties: false
61+
62+
required:
63+
- compatible
64+
- reg
65+
- clocks
66+
- '#clock-cells'
67+
68+
additionalProperties: false
69+
70+
examples:
71+
- |
72+
/* 25MHz reference crystal */
73+
ref25: ref25m {
74+
compatible = "fixed-clock";
75+
#clock-cells = <0>;
76+
clock-frequency = <25000000>;
77+
};
78+
79+
i2c@0 {
80+
reg = <0x0 0x100>;
81+
#address-cells = <1>;
82+
#size-cells = <0>;
83+
84+
rs9: clock-generator@6a {
85+
compatible = "renesas,9fgv0241";
86+
reg = <0x6a>;
87+
#clock-cells = <1>;
88+
89+
clocks = <&ref25m>;
90+
91+
DIF0 {
92+
renesas,slew-rate = <3000000>;
93+
};
94+
};
95+
};
96+
97+
...

Documentation/devicetree/bindings/clock/renesas,cpg-div6-clock.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ additionalProperties: false
5151
examples:
5252
- |
5353
#include <dt-bindings/clock/r8a73a4-clock.h>
54+
55+
cpg_clocks: cpg_clocks@e6150000 {
56+
compatible = "renesas,r8a73a4-cpg-clocks";
57+
reg = <0xe6150000 0x10000>;
58+
clocks = <&extal1_clk>, <&extal2_clk>;
59+
#clock-cells = <1>;
60+
clock-output-names = "main", "pll0", "pll1", "pll2",
61+
"pll2s", "pll2h", "z", "z2",
62+
"i", "m3", "b", "m1", "m2",
63+
"zx", "zs", "hp";
64+
};
65+
5466
sdhi2_clk: sdhi2_clk@e615007c {
5567
compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
5668
reg = <0xe615007c 4>;

Documentation/devicetree/bindings/clock/renesas,rzg2l-cpg.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
$id: "http://devicetree.org/schemas/clock/renesas,rzg2l-cpg.yaml#"
55
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
66

7-
title: Renesas RZ/G2L Clock Pulse Generator / Module Standby Mode
7+
title: Renesas RZ/{G2L,V2L} Clock Pulse Generator / Module Standby Mode
88

99
maintainers:
1010
- Geert Uytterhoeven <geert+renesas@glider.be>
1111

1212
description: |
13-
On Renesas RZ/G2L SoC, the CPG (Clock Pulse Generator) and Module
13+
On Renesas RZ/{G2L,V2L} SoC, the CPG (Clock Pulse Generator) and Module
1414
Standby Mode share the same register block.
1515
1616
They provide the following functionalities:
@@ -22,7 +22,9 @@ description: |
2222
2323
properties:
2424
compatible:
25-
const: renesas,r9a07g044-cpg # RZ/G2{L,LC}
25+
enum:
26+
- renesas,r9a07g044-cpg # RZ/G2{L,LC}
27+
- renesas,r9a07g054-cpg # RZ/V2L
2628

2729
reg:
2830
maxItems: 1
@@ -40,9 +42,9 @@ properties:
4042
description: |
4143
- For CPG core clocks, the two clock specifier cells must be "CPG_CORE"
4244
and a core clock reference, as defined in
43-
<dt-bindings/clock/r9a07g044-cpg.h>
45+
<dt-bindings/clock/r9a07g*-cpg.h>
4446
- For module clocks, the two clock specifier cells must be "CPG_MOD" and
45-
a module number, as defined in the <dt-bindings/clock/r9a07g044-cpg.h>.
47+
a module number, as defined in the <dt-bindings/clock/r9a07g0*-cpg.h>.
4648
const: 2
4749

4850
'#power-domain-cells':
@@ -56,7 +58,7 @@ properties:
5658
'#reset-cells':
5759
description:
5860
The single reset specifier cell must be the module number, as defined in
59-
the <dt-bindings/clock/r9a07g044-cpg.h>.
61+
the <dt-bindings/clock/r9a07g0*-cpg.h>.
6062
const: 1
6163

6264
required:

drivers/clk/.kunitconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_KUNIT=y
2+
CONFIG_COMMON_CLK=y
3+
CONFIG_CLK_GATE_KUNIT_TEST=y

drivers/clk/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ config COMMON_CLK_CDCE925
197197
config COMMON_CLK_CS2000_CP
198198
tristate "Clock driver for CS2000 Fractional-N Clock Synthesizer & Clock Multiplier"
199199
depends on I2C
200+
select REGMAP_I2C
200201
help
201202
If you say yes here you get support for the CS2000 clock multiplier.
202203

@@ -337,6 +338,15 @@ config COMMON_CLK_OXNAS
337338
help
338339
Support for the OXNAS SoC Family clocks.
339340

341+
config COMMON_CLK_RS9_PCIE
342+
tristate "Clock driver for Renesas 9-series PCIe clock generators"
343+
depends on I2C
344+
depends on OF
345+
select REGMAP_I2C
346+
help
347+
This driver supports the Renesas 9-series PCIe clock generator
348+
models 9FGV/9DBV/9DMV/9FGL/9DML/9QXL/9SQ.
349+
340350
config COMMON_CLK_VC5
341351
tristate "Clock driver for IDT VersaClock 5,6 devices"
342352
depends on I2C
@@ -426,4 +436,12 @@ source "drivers/clk/x86/Kconfig"
426436
source "drivers/clk/xilinx/Kconfig"
427437
source "drivers/clk/zynqmp/Kconfig"
428438

439+
# Kunit test cases
440+
config CLK_GATE_KUNIT_TEST
441+
tristate "Basic gate type Kunit test" if !KUNIT_ALL_TESTS
442+
depends on KUNIT
443+
default KUNIT_ALL_TESTS
444+
help
445+
Kunit test for the basic clk gate type.
446+
429447
endif

drivers/clk/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ obj-$(CONFIG_COMMON_CLK) += clk-divider.o
66
obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o
77
obj-$(CONFIG_COMMON_CLK) += clk-fixed-rate.o
88
obj-$(CONFIG_COMMON_CLK) += clk-gate.o
9+
obj-$(CONFIG_CLK_GATE_KUNIT_TEST) += clk-gate_test.o
910
obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o
1011
obj-$(CONFIG_COMMON_CLK) += clk-mux.o
1112
obj-$(CONFIG_COMMON_CLK) += clk-composite.o
@@ -67,6 +68,7 @@ obj-$(CONFIG_COMMON_CLK_STM32MP157) += clk-stm32mp1.o
6768
obj-$(CONFIG_COMMON_CLK_TPS68470) += clk-tps68470.o
6869
obj-$(CONFIG_CLK_TWL6040) += clk-twl6040.o
6970
obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o
71+
obj-$(CONFIG_COMMON_CLK_RS9_PCIE) += clk-renesas-pcie.o
7072
obj-$(CONFIG_COMMON_CLK_VC5) += clk-versaclock5.o
7173
obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
7274
obj-$(CONFIG_COMMON_CLK_XGENE) += clk-xgene.o

0 commit comments

Comments
 (0)