Skip to content

Commit b1712f9

Browse files
committed
Merge tag 'renesas-clk-for-v6.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas
Pull Renesas clk driver updates from Geert Uytterhoeven: - Add Expanded Serial Peripheral Interface (xSPI) clocks and resets on Renesas RZ/V2H(P) and RZ/V2N - Add SPI (RSPI) clocks and resets on Renesas RZ/V2H(P) - Add SDHI and I2C clocks on Renesas RZ/T2H and RZ/N2H - Add Ethernet clocks and resets on Renesas RZ/G3E - Initial support for the Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs - Add Ethernet clocks and resets on Renesas RZ/V2H and RZ/V2N - Add timer, I2C, watchdog, GPU, and USB2.0 clocks and resets on Renesas RZ/V2N - Rework Module Stop and Power Domain support on the Renesas RZ/G2L family of SoCs (especially on RZ/G3S) - Add I3C clocks and resets on Renesas RZ/G3E * tag 'renesas-clk-for-v6.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: (42 commits) clk: renesas: r9a08g045: Add MSTOP for coupled clocks as well clk: renesas: r9a09g047: Add clock and reset signals for the GBETH IPs clk: renesas: r9a09g057: Add XSPI clock/reset clk: renesas: r9a09g056: Add XSPI clock/reset clk: renesas: rzv2h: Add fixed-factor module clocks with status reporting clk: renesas: r9a09g057: Add support for xspi mux and divider clk: renesas: r9a09g056: Add support for xspi mux and divider clk: renesas: r9a09g077: Add RIIC module clocks clk: renesas: r9a09g077: Add PLL2 and SDHI clock support clk: renesas: rzv2h: Drop redundant base pointer from pll_clk clk: renesas: r9a09g057: Add entries for the RSPIs dt-bindings: clock: renesas,r9a09g077/87: Add SDHI_CLKHS clock ID dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock clk: renesas: rzv2h: Add missing include file clk: renesas: rzv2h: Use devm_kmemdup_array() clk: renesas: Add CPG/MSSR support to RZ/N2H SoC clk: renesas: r9a09g077: Add PCLKL core clock dt-bindings: clock: renesas,cpg-mssr: Document RZ/N2H support dt-bindings: soc: renesas: Document RZ/N2H (R9A09G087) SoC dt-bindings: clock: renesas,r9a09g077: Add PCLKL core clock ID ...
2 parents 19272b3 + 0ab2d84 commit b1712f9

35 files changed

+1743
-968
lines changed

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

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,16 @@ properties:
5252
- renesas,r8a779f0-cpg-mssr # R-Car S4-8
5353
- renesas,r8a779g0-cpg-mssr # R-Car V4H
5454
- renesas,r8a779h0-cpg-mssr # R-Car V4M
55+
- renesas,r9a09g077-cpg-mssr # RZ/T2H
56+
- renesas,r9a09g087-cpg-mssr # RZ/N2H
5557

5658
reg:
57-
maxItems: 1
59+
minItems: 1
60+
items:
61+
- description: base address of register block 0
62+
- description: base address of register block 1
63+
description: base addresses of clock controller. Some controllers
64+
(like r9a09g077) use two blocks instead of a single one.
5865

5966
clocks:
6067
minItems: 1
@@ -92,16 +99,6 @@ properties:
9299
the datasheet.
93100
const: 1
94101

95-
if:
96-
not:
97-
properties:
98-
compatible:
99-
items:
100-
enum:
101-
- renesas,r7s9210-cpg-mssr
102-
then:
103-
required:
104-
- '#reset-cells'
105102

106103
required:
107104
- compatible
@@ -111,6 +108,36 @@ required:
111108
- '#clock-cells'
112109
- '#power-domain-cells'
113110

111+
allOf:
112+
- if:
113+
properties:
114+
compatible:
115+
contains:
116+
enum:
117+
- renesas,r9a09g077-cpg-mssr
118+
- renesas,r9a09g087-cpg-mssr
119+
then:
120+
properties:
121+
reg:
122+
minItems: 2
123+
clock-names:
124+
items:
125+
- const: extal
126+
else:
127+
properties:
128+
reg:
129+
maxItems: 1
130+
- if:
131+
not:
132+
properties:
133+
compatible:
134+
items:
135+
enum:
136+
- renesas,r7s9210-cpg-mssr
137+
then:
138+
required:
139+
- '#reset-cells'
140+
114141
additionalProperties: false
115142

116143
examples:

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ properties:
5757
can be power-managed through Module Standby should refer to the CPG device
5858
node in their "power-domains" property, as documented by the generic PM
5959
Domain bindings in Documentation/devicetree/bindings/power/power-domain.yaml.
60-
The power domain specifiers defined in <dt-bindings/clock/r9a0*-cpg.h> could
61-
be used to reference individual CPG power domains.
60+
const: 0
6261

6362
'#reset-cells':
6463
description:
@@ -77,21 +76,6 @@ required:
7776

7877
additionalProperties: false
7978

80-
allOf:
81-
- if:
82-
properties:
83-
compatible:
84-
contains:
85-
const: renesas,r9a08g045-cpg
86-
then:
87-
properties:
88-
'#power-domain-cells':
89-
const: 1
90-
else:
91-
properties:
92-
'#power-domain-cells':
93-
const: 0
94-
9579
examples:
9680
- |
9781
cpg: clock-controller@11010000 {

Documentation/devicetree/bindings/soc/renesas/renesas.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,16 @@ properties:
602602
- renesas,r9a09g077m44 # RZ/T2H with Quad Cortex-A55 + Dual Cortex-R52 - no security
603603
- const: renesas,r9a09g077
604604

605+
- description: RZ/N2H (R9A09G087)
606+
items:
607+
- enum:
608+
- renesas,rzn2h-evk # RZ/N2H Evaluation Board (RTK9RZN2H0S00000BJ)
609+
- enum:
610+
- renesas,r9a09g087m04 # RZ/N2H with Single Cortex-A55 + Dual Cortex-R52 - no security
611+
- renesas,r9a09g087m24 # RZ/N2H with Dual Cortex-A55 + Dual Cortex-R52 - no security
612+
- renesas,r9a09g087m44 # RZ/N2H with Quad Cortex-A55 + Dual Cortex-R52 - no security
613+
- const: renesas,r9a09g087
614+
605615
additionalProperties: true
606616

607617
...

drivers/clk/renesas/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ config CLK_RENESAS
4343
select CLK_R9A09G047 if ARCH_R9A09G047
4444
select CLK_R9A09G056 if ARCH_R9A09G056
4545
select CLK_R9A09G057 if ARCH_R9A09G057
46+
select CLK_R9A09G077 if ARCH_R9A09G077
47+
select CLK_R9A09G087 if ARCH_R9A09G087
4648
select CLK_SH73A0 if ARCH_SH73A0
4749

4850
if CLK_RENESAS
@@ -208,6 +210,14 @@ config CLK_R9A09G057
208210
bool "RZ/V2H(P) clock support" if COMPILE_TEST
209211
select CLK_RZV2H
210212

213+
config CLK_R9A09G077
214+
bool "RZ/T2H clock support" if COMPILE_TEST
215+
select CLK_RENESAS_CPG_MSSR
216+
217+
config CLK_R9A09G087
218+
bool "RZ/N2H clock support" if COMPILE_TEST
219+
select CLK_RENESAS_CPG_MSSR
220+
211221
config CLK_SH73A0
212222
bool "SH-Mobile AG5 clock support" if COMPILE_TEST
213223
select CLK_RENESAS_CPG_MSTP

drivers/clk/renesas/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ obj-$(CONFIG_CLK_R9A09G011) += r9a09g011-cpg.o
4040
obj-$(CONFIG_CLK_R9A09G047) += r9a09g047-cpg.o
4141
obj-$(CONFIG_CLK_R9A09G056) += r9a09g056-cpg.o
4242
obj-$(CONFIG_CLK_R9A09G057) += r9a09g057-cpg.o
43+
obj-$(CONFIG_CLK_R9A09G077) += r9a09g077-cpg.o
44+
obj-$(CONFIG_CLK_R9A09G087) += r9a09g077-cpg.o
4345
obj-$(CONFIG_CLK_SH73A0) += clk-sh73a0.o
4446

4547
# Family

drivers/clk/renesas/r7s9210-cpg-mssr.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,13 @@ static void __init r7s9210_update_clk_table(struct clk *extal_clk,
159159

160160
static struct clk * __init rza2_cpg_clk_register(struct device *dev,
161161
const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
162-
struct clk **clks, void __iomem *base,
163-
struct raw_notifier_head *notifiers)
162+
struct cpg_mssr_pub *pub)
164163
{
165-
struct clk *parent;
164+
void __iomem *base = pub->base0;
165+
struct clk **clks = pub->clks;
166166
unsigned int mult = 1;
167167
unsigned int div = 1;
168+
struct clk *parent;
168169

169170
parent = clks[core->parent];
170171
if (IS_ERR(parent))

drivers/clk/renesas/r8a77970-cpg-mssr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,11 @@ static int __init r8a77970_cpg_mssr_init(struct device *dev)
219219

220220
static struct clk * __init r8a77970_cpg_clk_register(struct device *dev,
221221
const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
222-
struct clk **clks, void __iomem *base,
223-
struct raw_notifier_head *notifiers)
222+
struct cpg_mssr_pub *pub)
224223
{
225224
const struct clk_div_table *table;
225+
void __iomem *base = pub->base0;
226+
struct clk **clks = pub->clks;
226227
const struct clk *parent;
227228
unsigned int shift;
228229

@@ -236,8 +237,7 @@ static struct clk * __init r8a77970_cpg_clk_register(struct device *dev,
236237
shift = 4;
237238
break;
238239
default:
239-
return rcar_gen3_cpg_clk_register(dev, core, info, clks, base,
240-
notifiers);
240+
return rcar_gen3_cpg_clk_register(dev, core, info, pub);
241241
}
242242

243243
parent = clks[core->parent];

0 commit comments

Comments
 (0)