Skip to content

Commit 8beff78

Browse files
committed
Merge tag 'renesas-clk-for-v6.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas
Pull more Renesas clk driver updates from Geert Uytterhoeven: - Miscellaneous fixes and improvements - Add SPI (MSIOF) and external interrupt (INTC-EX) clocks on R-Car V4M - Add interrupt controller (PLIC) clock and reset on RZ/Five - Prepare power domain support for RZ/G2L family members, and add actual support on RZ/G3S SoC * tag 'renesas-clk-for-v6.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a08g045: Add support for power domains clk: renesas: rzg2l: Extend power domain support dt-bindings: clock: renesas,rzg2l-cpg: Update #power-domain-cells = <1> for RZ/G3S dt-bindings: clock: r9a08g045-cpg: Add power domain IDs dt-bindings: clock: r9a07g054-cpg: Add power domain IDs dt-bindings: clock: r9a07g044-cpg: Add power domain IDs dt-bindings: clock: r9a07g043-cpg: Add power domain IDs clk: renesas: shmobile: Remove unused CLK_ENABLE_ON_INIT clk: renesas: r8a7740: Remove unused div4_clk.flags field clk: renesas: r9a07g043: Add clock and reset entry for PLIC clk: renesas: r8a779h0: Add INTC-EX clock clk: renesas: r8a779h0: Add MSIOF clocks clk: renesas: r8a779a0: Fix CANFD parent clock
2 parents 1758c68 + 5add5eb commit 8beff78

File tree

14 files changed

+577
-35
lines changed

14 files changed

+577
-35
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ 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-
const: 0
60+
The power domain specifiers defined in <dt-bindings/clock/r9a0*-cpg.h> could
61+
be used to reference individual CPG power domains.
6162

6263
'#reset-cells':
6364
description:
@@ -76,6 +77,21 @@ required:
7677

7778
additionalProperties: false
7879

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+
7995
examples:
8096
- |
8197
cpg: clock-controller@11010000 {

drivers/clk/renesas/clk-r8a73a4.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ struct r8a73a4_cpg {
3030
#define CPG_PLL2HCR 0xe4
3131
#define CPG_PLL2SCR 0xf4
3232

33-
#define CLK_ENABLE_ON_INIT BIT(0)
34-
3533
struct div4_clk {
3634
const char *name;
3735
unsigned int reg;

drivers/clk/renesas/clk-r8a7740.c

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,25 @@ struct r8a7740_cpg {
2626
#define CPG_USBCKCR 0x8c
2727
#define CPG_FRQCRC 0xe0
2828

29-
#define CLK_ENABLE_ON_INIT BIT(0)
30-
3129
struct div4_clk {
3230
const char *name;
3331
unsigned int reg;
3432
unsigned int shift;
35-
int flags;
3633
};
3734

3835
static struct div4_clk div4_clks[] = {
39-
{ "i", CPG_FRQCRA, 20, CLK_ENABLE_ON_INIT },
40-
{ "zg", CPG_FRQCRA, 16, CLK_ENABLE_ON_INIT },
41-
{ "b", CPG_FRQCRA, 8, CLK_ENABLE_ON_INIT },
42-
{ "m1", CPG_FRQCRA, 4, CLK_ENABLE_ON_INIT },
43-
{ "hp", CPG_FRQCRB, 4, 0 },
44-
{ "hpp", CPG_FRQCRC, 20, 0 },
45-
{ "usbp", CPG_FRQCRC, 16, 0 },
46-
{ "s", CPG_FRQCRC, 12, 0 },
47-
{ "zb", CPG_FRQCRC, 8, 0 },
48-
{ "m3", CPG_FRQCRC, 4, 0 },
49-
{ "cp", CPG_FRQCRC, 0, 0 },
50-
{ NULL, 0, 0, 0 },
36+
{ "i", CPG_FRQCRA, 20 },
37+
{ "zg", CPG_FRQCRA, 16 },
38+
{ "b", CPG_FRQCRA, 8 },
39+
{ "m1", CPG_FRQCRA, 4 },
40+
{ "hp", CPG_FRQCRB, 4 },
41+
{ "hpp", CPG_FRQCRC, 20 },
42+
{ "usbp", CPG_FRQCRC, 16 },
43+
{ "s", CPG_FRQCRC, 12 },
44+
{ "zb", CPG_FRQCRC, 8 },
45+
{ "m3", CPG_FRQCRC, 4 },
46+
{ "cp", CPG_FRQCRC, 0 },
47+
{ NULL, 0, 0 },
5148
};
5249

5350
static const struct clk_div_table div4_div_table[] = {

drivers/clk/renesas/clk-sh73a0.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ struct sh73a0_cpg {
3434
#define CPG_DSI0PHYCR 0x6c
3535
#define CPG_DSI1PHYCR 0x70
3636

37-
#define CLK_ENABLE_ON_INIT BIT(0)
38-
3937
struct div4_clk {
4038
const char *name;
4139
const char *parent;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = {
139139
DEF_MOD("avb3", 214, R8A779A0_CLK_S3D2),
140140
DEF_MOD("avb4", 215, R8A779A0_CLK_S3D2),
141141
DEF_MOD("avb5", 216, R8A779A0_CLK_S3D2),
142-
DEF_MOD("canfd0", 328, R8A779A0_CLK_CANFD),
142+
DEF_MOD("canfd0", 328, R8A779A0_CLK_S3D2),
143143
DEF_MOD("csi40", 331, R8A779A0_CLK_CSI0),
144144
DEF_MOD("csi41", 400, R8A779A0_CLK_CSI0),
145145
DEF_MOD("csi42", 401, R8A779A0_CLK_CSI0),

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ static const struct mssr_mod_clk r8a779h0_mod_clks[] = {
184184
DEF_MOD("i2c1", 519, R8A779H0_CLK_S0D6_PER),
185185
DEF_MOD("i2c2", 520, R8A779H0_CLK_S0D6_PER),
186186
DEF_MOD("i2c3", 521, R8A779H0_CLK_S0D6_PER),
187+
DEF_MOD("irqc", 611, R8A779H0_CLK_CL16M),
188+
DEF_MOD("msi0", 618, R8A779H0_CLK_MSO),
189+
DEF_MOD("msi1", 619, R8A779H0_CLK_MSO),
190+
DEF_MOD("msi2", 620, R8A779H0_CLK_MSO),
191+
DEF_MOD("msi3", 621, R8A779H0_CLK_MSO),
192+
DEF_MOD("msi4", 622, R8A779H0_CLK_MSO),
193+
DEF_MOD("msi5", 623, R8A779H0_CLK_MSO),
187194
DEF_MOD("rpc-if", 629, R8A779H0_CLK_RPCD2),
188195
DEF_MOD("scif0", 702, R8A779H0_CLK_SASYNCPERD4),
189196
DEF_MOD("scif1", 703, R8A779H0_CLK_SASYNCPERD4),

drivers/clk/renesas/r9a07g043-cpg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ static const struct rzg2l_mod_clk r9a07g043_mod_clks[] = {
280280
0x5a8, 1),
281281
DEF_MOD("tsu_pclk", R9A07G043_TSU_PCLK, R9A07G043_CLK_TSU,
282282
0x5ac, 0),
283+
#ifdef CONFIG_RISCV
284+
DEF_MOD("nceplic_aclk", R9A07G043_NCEPLIC_ACLK, R9A07G043_CLK_P1,
285+
0x608, 0),
286+
#endif
283287
};
284288

285289
static const struct rzg2l_reset r9a07g043_resets[] = {
@@ -338,6 +342,10 @@ static const struct rzg2l_reset r9a07g043_resets[] = {
338342
DEF_RST(R9A07G043_ADC_PRESETN, 0x8a8, 0),
339343
DEF_RST(R9A07G043_ADC_ADRST_N, 0x8a8, 1),
340344
DEF_RST(R9A07G043_TSU_PRESETN, 0x8ac, 0),
345+
#ifdef CONFIG_RISCV
346+
DEF_RST(R9A07G043_NCEPLIC_ARESETN, 0x908, 0),
347+
#endif
348+
341349
};
342350

343351
static const unsigned int r9a07g043_crit_mod_clks[] __initconst = {
@@ -347,6 +355,7 @@ static const unsigned int r9a07g043_crit_mod_clks[] __initconst = {
347355
#endif
348356
#ifdef CONFIG_RISCV
349357
MOD_CLK_BASE + R9A07G043_IAX45_CLK,
358+
MOD_CLK_BASE + R9A07G043_NCEPLIC_ACLK,
350359
#endif
351360
MOD_CLK_BASE + R9A07G043_DMAC_ACLK,
352361
};

drivers/clk/renesas/r9a08g045-cpg.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,43 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = {
240240
MOD_CLK_BASE + R9A08G045_DMAC_ACLK,
241241
};
242242

243+
static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
244+
/* Keep always-on domain on the first position for proper domains registration. */
245+
DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON,
246+
DEF_REG_CONF(0, 0),
247+
RZG2L_PD_F_ALWAYS_ON),
248+
DEF_PD("gic", R9A08G045_PD_GIC,
249+
DEF_REG_CONF(CPG_BUS_ACPU_MSTOP, BIT(3)),
250+
RZG2L_PD_F_ALWAYS_ON),
251+
DEF_PD("ia55", R9A08G045_PD_IA55,
252+
DEF_REG_CONF(CPG_BUS_PERI_CPU_MSTOP, BIT(13)),
253+
RZG2L_PD_F_ALWAYS_ON),
254+
DEF_PD("dmac", R9A08G045_PD_DMAC,
255+
DEF_REG_CONF(CPG_BUS_REG1_MSTOP, GENMASK(3, 0)),
256+
RZG2L_PD_F_ALWAYS_ON),
257+
DEF_PD("wdt0", R9A08G045_PD_WDT0,
258+
DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)),
259+
RZG2L_PD_F_NONE),
260+
DEF_PD("sdhi0", R9A08G045_PD_SDHI0,
261+
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(0)),
262+
RZG2L_PD_F_NONE),
263+
DEF_PD("sdhi1", R9A08G045_PD_SDHI1,
264+
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(1)),
265+
RZG2L_PD_F_NONE),
266+
DEF_PD("sdhi2", R9A08G045_PD_SDHI2,
267+
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(11)),
268+
RZG2L_PD_F_NONE),
269+
DEF_PD("eth0", R9A08G045_PD_ETHER0,
270+
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(2)),
271+
RZG2L_PD_F_NONE),
272+
DEF_PD("eth1", R9A08G045_PD_ETHER1,
273+
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(3)),
274+
RZG2L_PD_F_NONE),
275+
DEF_PD("scif0", R9A08G045_PD_SCIF0,
276+
DEF_REG_CONF(CPG_BUS_MCPU2_MSTOP, BIT(1)),
277+
RZG2L_PD_F_NONE),
278+
};
279+
243280
const struct rzg2l_cpg_info r9a08g045_cpg_info = {
244281
/* Core Clocks */
245282
.core_clks = r9a08g045_core_clks,
@@ -260,5 +297,9 @@ const struct rzg2l_cpg_info r9a08g045_cpg_info = {
260297
.resets = r9a08g045_resets,
261298
.num_resets = R9A08G045_VBAT_BRESETN + 1, /* Last reset ID + 1 */
262299

300+
/* Power domains */
301+
.pm_domains = r9a08g045_pm_domains,
302+
.num_pm_domains = ARRAY_SIZE(r9a08g045_pm_domains),
303+
263304
.has_clk_mon_regs = true,
264305
};

0 commit comments

Comments
 (0)