Skip to content

Commit 8cce33a

Browse files
prabhakarladgeertu
authored andcommitted
clk: renesas: r9a09g057: Add CA55 core clocks
Add CA55 core clocks which are derived from PLLCA55. Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 29cb497 commit 8cce33a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

drivers/clk/renesas/r9a09g057-cpg.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ enum clk_ids {
4141
MOD_CLK_BASE,
4242
};
4343

44+
static const struct clk_div_table dtable_1_8[] = {
45+
{0, 1},
46+
{1, 2},
47+
{2, 4},
48+
{3, 8},
49+
{0, 0},
50+
};
51+
4452
static const struct clk_div_table dtable_2_64[] = {
4553
{0, 2},
4654
{1, 4},
@@ -74,6 +82,14 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
7482

7583
/* Core Clocks */
7684
DEF_FIXED("sys_0_pclk", R9A09G057_SYS_0_PCLK, CLK_QEXTAL, 1, 1),
85+
DEF_DDIV("ca55_0_coreclk0", R9A09G057_CA55_0_CORE_CLK0, CLK_PLLCA55,
86+
CDDIV1_DIVCTL0, dtable_1_8),
87+
DEF_DDIV("ca55_0_coreclk1", R9A09G057_CA55_0_CORE_CLK1, CLK_PLLCA55,
88+
CDDIV1_DIVCTL1, dtable_1_8),
89+
DEF_DDIV("ca55_0_coreclk2", R9A09G057_CA55_0_CORE_CLK2, CLK_PLLCA55,
90+
CDDIV1_DIVCTL2, dtable_1_8),
91+
DEF_DDIV("ca55_0_coreclk3", R9A09G057_CA55_0_CORE_CLK3, CLK_PLLCA55,
92+
CDDIV1_DIVCTL3, dtable_1_8),
7793
DEF_FIXED("iotop_0_shclk", R9A09G057_IOTOP_0_SHCLK, CLK_PLLCM33_DIV16, 1, 1),
7894
};
7995

drivers/clk/renesas/rzv2h-cpg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ struct ddiv {
3232
})
3333

3434
#define CPG_CDDIV0 (0x400)
35+
#define CPG_CDDIV1 (0x404)
3536

3637
#define CDDIV0_DIVCTL2 DDIV_PACK(CPG_CDDIV0, 8, 3, 2)
38+
#define CDDIV1_DIVCTL0 DDIV_PACK(CPG_CDDIV1, 0, 2, 4)
39+
#define CDDIV1_DIVCTL1 DDIV_PACK(CPG_CDDIV1, 4, 2, 5)
40+
#define CDDIV1_DIVCTL2 DDIV_PACK(CPG_CDDIV1, 8, 2, 6)
41+
#define CDDIV1_DIVCTL3 DDIV_PACK(CPG_CDDIV1, 12, 2, 7)
3742

3843
/**
3944
* Definitions of CPG Core Clocks

0 commit comments

Comments
 (0)