Skip to content

Commit 668756f

Browse files
bijudasgeertu
authored andcommitted
clk: renesas: r9a07g044: Add P2 Clock support
Add support for P2 clock which is sourced from pll3_div2_4_2. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20210626081344.5783-5-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent fd8c3f6 commit 668756f

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/clk/renesas/r9a07g044-cpg.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ enum clk_ids {
3131
CLK_PLL3,
3232
CLK_PLL3_DIV2,
3333
CLK_PLL3_DIV2_4,
34+
CLK_PLL3_DIV2_4_2,
3435
CLK_PLL3_DIV4,
3536
CLK_PLL4,
3637
CLK_PLL5,
@@ -68,6 +69,7 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
6869

6970
DEF_FIXED(".pll3_div2", CLK_PLL3_DIV2, CLK_PLL3, 1, 2),
7071
DEF_FIXED(".pll3_div2_4", CLK_PLL3_DIV2_4, CLK_PLL3_DIV2, 1, 4),
72+
DEF_FIXED(".pll3_div2_4_2", CLK_PLL3_DIV2_4_2, CLK_PLL3_DIV2_4, 1, 2),
7173
DEF_FIXED(".pll3_div4", CLK_PLL3_DIV4, CLK_PLL3, 1, 4),
7274

7375
/* Core output clk */
@@ -77,6 +79,8 @@ static const struct cpg_core_clk r9a07g044_core_clks[] __initconst = {
7779
DEF_FIXED("TSU", R9A07G044_CLK_TSU, CLK_PLL2_DIV20, 1, 1),
7880
DEF_DIV("P1", R9A07G044_CLK_P1, CLK_PLL3_DIV2_4,
7981
DIVPL3B, dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
82+
DEF_DIV("P2", R9A07G044_CLK_P2, CLK_PLL3_DIV2_4_2,
83+
DIVPL3A, dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
8084
};
8185

8286
static struct rzg2l_mod_clk r9a07g044_mod_clks[] = {

drivers/clk/renesas/renesas-rzg2l-cpg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define DDIV_PACK(offset, bitpos, size) \
2222
(((offset) << 20) | ((bitpos) << 12) | ((size) << 8))
2323
#define DIVPL2A DDIV_PACK(CPG_PL2_DDIV, 0, 3)
24+
#define DIVPL3A DDIV_PACK(CPG_PL3A_DDIV, 0, 3)
2425
#define DIVPL3B DDIV_PACK(CPG_PL3A_DDIV, 4, 3)
2526

2627
/**

0 commit comments

Comments
 (0)