Skip to content

Commit

Permalink
Merge tag 'renesas-clk-for-v6.13-tag1' of git://git.kernel.org/pub/sc…
Browse files Browse the repository at this point in the history
…m/linux/kernel/git/geert/renesas-drivers into clk-renesas

Pull Renesas clk driver updates from Geert Uytterhoeven:

 - Add Cortex-A55 core clocks and Interrupt Control Unit (ICU) clock
   and reset on Renesas RZ/V2H(P)

* tag 'renesas-clk-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks
  clk: renesas: r9a09g057: Add clock and reset entries for ICU
  clk: renesas: r9a09g057: Add CA55 core clocks
  clk: renesas: Remove duplicate and trailing empty lines
  • Loading branch information
bebarino committed Oct 18, 2024
2 parents 9852d85 + 92850be commit 31ba299
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 14 deletions.
1 change: 0 additions & 1 deletion drivers/clk/renesas/clk-r8a73a4.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ r8a73a4_cpg_register_clock(struct device_node *np, struct r8a73a4_cpg *cpg,
unsigned int mult = 1;
unsigned int div = 1;


if (!strcmp(name, "main")) {
u32 ckscr = readl(base + CPG_CKSCR);

Expand Down
1 change: 0 additions & 1 deletion drivers/clk/renesas/clk-r8a7778.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ r8a7778_cpg_register_clock(struct device_node *np, const char *name)
return ERR_PTR(-EINVAL);
}


static void __init r8a7778_cpg_clocks_init(struct device_node *np)
{
struct clk_onecell_data *data;
Expand Down
1 change: 0 additions & 1 deletion drivers/clk/renesas/r8a779a0-cpg-mssr.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ static const struct rcar_gen4_cpg_pll_config cpg_pll_configs[4] __initconst = {
{ 2, 128, 1, 192, 1, 32, },
};


static int __init r8a779a0_cpg_mssr_init(struct device *dev)
{
const struct rcar_gen4_cpg_pll_config *cpg_pll_config;
Expand Down
10 changes: 4 additions & 6 deletions drivers/clk/renesas/r8a779h0-cpg-mssr.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ enum clk_ids {
CLK_PLL5,
CLK_PLL6,
CLK_PLL1_DIV2,
CLK_PLL2_DIV2,
CLK_PLL3_DIV2,
CLK_PLL4_DIV2,
CLK_PLL4_DIV5,
Expand Down Expand Up @@ -78,7 +77,6 @@ static const struct cpg_core_clk r8a779h0_core_clks[] __initconst = {
DEF_GEN4_PLL_V8_25(".pll6", 6, CLK_PLL6, CLK_MAIN),

DEF_FIXED(".pll1_div2", CLK_PLL1_DIV2, CLK_PLL1, 2, 1),
DEF_FIXED(".pll2_div2", CLK_PLL2_DIV2, CLK_PLL2, 2, 1),
DEF_FIXED(".pll3_div2", CLK_PLL3_DIV2, CLK_PLL3, 2, 1),
DEF_FIXED(".pll4_div2", CLK_PLL4_DIV2, CLK_PLL4, 2, 1),
DEF_FIXED(".pll4_div5", CLK_PLL4_DIV5, CLK_PLL4, 5, 1),
Expand All @@ -101,10 +99,10 @@ static const struct cpg_core_clk r8a779h0_core_clks[] __initconst = {
DEF_RATE(".oco", CLK_OCO, 32768),

/* Core Clock Outputs */
DEF_GEN4_Z("zc0", R8A779H0_CLK_ZC0, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 0),
DEF_GEN4_Z("zc1", R8A779H0_CLK_ZC1, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 8),
DEF_GEN4_Z("zc2", R8A779H0_CLK_ZC2, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 32),
DEF_GEN4_Z("zc3", R8A779H0_CLK_ZC3, CLK_TYPE_GEN4_Z, CLK_PLL2_DIV2, 2, 40),
DEF_GEN4_Z("zc0", R8A779H0_CLK_ZC0, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 0),
DEF_GEN4_Z("zc1", R8A779H0_CLK_ZC1, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 8),
DEF_GEN4_Z("zc2", R8A779H0_CLK_ZC2, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 32),
DEF_GEN4_Z("zc3", R8A779H0_CLK_ZC3, CLK_TYPE_GEN4_Z, CLK_PLL2, 4, 40),
DEF_FIXED("s0d2", R8A779H0_CLK_S0D2, CLK_S0, 2, 1),
DEF_FIXED("s0d3", R8A779H0_CLK_S0D3, CLK_S0, 3, 1),
DEF_FIXED("s0d4", R8A779H0_CLK_S0D4, CLK_S0, 4, 1),
Expand Down
1 change: 0 additions & 1 deletion drivers/clk/renesas/r9a09g011-cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ static const struct clk_div_table dtable_divd[] = {
{0, 0},
};


static const struct clk_div_table dtable_divw[] = {
{0, 6},
{1, 7},
Expand Down
18 changes: 18 additions & 0 deletions drivers/clk/renesas/r9a09g057-cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ enum clk_ids {
MOD_CLK_BASE,
};

static const struct clk_div_table dtable_1_8[] = {
{0, 1},
{1, 2},
{2, 4},
{3, 8},
{0, 0},
};

static const struct clk_div_table dtable_2_64[] = {
{0, 2},
{1, 4},
Expand Down Expand Up @@ -74,10 +82,19 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {

/* Core Clocks */
DEF_FIXED("sys_0_pclk", R9A09G057_SYS_0_PCLK, CLK_QEXTAL, 1, 1),
DEF_DDIV("ca55_0_coreclk0", R9A09G057_CA55_0_CORE_CLK0, CLK_PLLCA55,
CDDIV1_DIVCTL0, dtable_1_8),
DEF_DDIV("ca55_0_coreclk1", R9A09G057_CA55_0_CORE_CLK1, CLK_PLLCA55,
CDDIV1_DIVCTL1, dtable_1_8),
DEF_DDIV("ca55_0_coreclk2", R9A09G057_CA55_0_CORE_CLK2, CLK_PLLCA55,
CDDIV1_DIVCTL2, dtable_1_8),
DEF_DDIV("ca55_0_coreclk3", R9A09G057_CA55_0_CORE_CLK3, CLK_PLLCA55,
CDDIV1_DIVCTL3, dtable_1_8),
DEF_FIXED("iotop_0_shclk", R9A09G057_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
};

static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
DEF_MOD_CRITICAL("icu_0_pclk_i", CLK_PLLCM33_DIV16, 0, 5, 0, 5),
DEF_MOD("gtm_0_pclk", CLK_PLLCM33_DIV16, 4, 3, 2, 3),
DEF_MOD("gtm_1_pclk", CLK_PLLCM33_DIV16, 4, 4, 2, 4),
DEF_MOD("gtm_2_pclk", CLK_PLLCLN_DIV16, 4, 5, 2, 5),
Expand Down Expand Up @@ -119,6 +136,7 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
};

static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
DEF_RST(3, 6, 1, 7), /* ICU_0_PRESETN_I */
DEF_RST(6, 13, 2, 30), /* GTM_0_PRESETZ */
DEF_RST(6, 14, 2, 31), /* GTM_1_PRESETZ */
DEF_RST(6, 15, 3, 0), /* GTM_2_PRESETZ */
Expand Down
1 change: 0 additions & 1 deletion drivers/clk/renesas/rcar-cpg-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,3 @@ struct clk * __init cpg_rpcd2_clk_register(const char *name,

return clk;
}

1 change: 0 additions & 1 deletion drivers/clk/renesas/rcar-gen3-cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ static u32 cpg_quirks __initdata;

#define RCKCR_CKSEL BIT(1) /* Manual RCLK parent selection */


static const struct soc_device_attribute cpg_quirks_match[] __initconst = {
{
.soc_id = "r8a7796", .revision = "ES1.0",
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/renesas/renesas-cpg-mssr.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#define WARN_DEBUG(x) do { } while (0)
#endif


/*
* Module Standby and Software Reset register offets.
*
Expand Down Expand Up @@ -716,7 +715,6 @@ static inline int cpg_mssr_reset_controller_register(struct cpg_mssr_priv *priv)
}
#endif /* !CONFIG_RESET_CONTROLLER */


static const struct of_device_id cpg_mssr_match[] = {
#ifdef CONFIG_CLK_R7S9210
{
Expand Down
5 changes: 5 additions & 0 deletions drivers/clk/renesas/rzv2h-cpg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ struct ddiv {
})

#define CPG_CDDIV0 (0x400)
#define CPG_CDDIV1 (0x404)

#define CDDIV0_DIVCTL2 DDIV_PACK(CPG_CDDIV0, 8, 3, 2)
#define CDDIV1_DIVCTL0 DDIV_PACK(CPG_CDDIV1, 0, 2, 4)
#define CDDIV1_DIVCTL1 DDIV_PACK(CPG_CDDIV1, 4, 2, 5)
#define CDDIV1_DIVCTL2 DDIV_PACK(CPG_CDDIV1, 8, 2, 6)
#define CDDIV1_DIVCTL3 DDIV_PACK(CPG_CDDIV1, 12, 2, 7)

/**
* Definitions of CPG Core Clocks
Expand Down

0 comments on commit 31ba299

Please sign in to comment.