Skip to content

Commit b6f2c6b

Browse files
prabhakarladgeertu
authored andcommitted
clk: renesas: r9a09g057: Add clock and reset entries for GE3D
Add PLLGPU along with the necessary clock and reset entries for GE3D. 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 360387a commit b6f2c6b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/clk/renesas/r9a09g057-cpg.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ enum clk_ids {
2929
CLK_PLLDTY,
3030
CLK_PLLCA55,
3131
CLK_PLLVDO,
32+
CLK_PLLGPU,
3233

3334
/* Internal Core Clocks */
3435
CLK_PLLCM33_DIV4,
@@ -47,6 +48,7 @@ enum clk_ids {
4748
CLK_PLLVDO_CRU1,
4849
CLK_PLLVDO_CRU2,
4950
CLK_PLLVDO_CRU3,
51+
CLK_PLLGPU_GEAR,
5052

5153
/* Module Clocks */
5254
MOD_CLK_BASE,
@@ -87,6 +89,7 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
8789
DEF_FIXED(".plldty", CLK_PLLDTY, CLK_QEXTAL, 200, 3),
8890
DEF_PLL(".pllca55", CLK_PLLCA55, CLK_QEXTAL, PLLCA55),
8991
DEF_FIXED(".pllvdo", CLK_PLLVDO, CLK_QEXTAL, 105, 2),
92+
DEF_PLL(".pllgpu", CLK_PLLGPU, CLK_QEXTAL, PLLGPU),
9093

9194
/* Internal Core Clocks */
9295
DEF_FIXED(".pllcm33_div4", CLK_PLLCM33_DIV4, CLK_PLLCM33, 1, 4),
@@ -110,6 +113,8 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
110113
DEF_DDIV(".pllvdo_cru2", CLK_PLLVDO_CRU2, CLK_PLLVDO, CDDIV4_DIVCTL1, dtable_2_4),
111114
DEF_DDIV(".pllvdo_cru3", CLK_PLLVDO_CRU3, CLK_PLLVDO, CDDIV4_DIVCTL2, dtable_2_4),
112115

116+
DEF_DDIV(".pllgpu_gear", CLK_PLLGPU_GEAR, CLK_PLLGPU, CDDIV3_DIVCTL1, dtable_2_64),
117+
113118
/* Core Clocks */
114119
DEF_FIXED("sys_0_pclk", R9A09G057_SYS_0_PCLK, CLK_QEXTAL, 1, 1),
115120
DEF_DDIV("ca55_0_coreclk0", R9A09G057_CA55_0_CORE_CLK0, CLK_PLLCA55,
@@ -238,6 +243,12 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
238243
BUS_MSTOP(9, BIT(7))),
239244
DEF_MOD("cru_3_pclk", CLK_PLLDTY_DIV16, 13, 13, 6, 29,
240245
BUS_MSTOP(9, BIT(7))),
246+
DEF_MOD("gpu_0_clk", CLK_PLLGPU_GEAR, 15, 0, 7, 16,
247+
BUS_MSTOP(3, BIT(4))),
248+
DEF_MOD("gpu_0_axi_clk", CLK_PLLDTY_ACPU_DIV2, 15, 1, 7, 17,
249+
BUS_MSTOP(3, BIT(4))),
250+
DEF_MOD("gpu_0_ace_clk", CLK_PLLDTY_ACPU_DIV2, 15, 2, 7, 18,
251+
BUS_MSTOP(3, BIT(4))),
241252
};
242253

243254
static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
@@ -287,6 +298,9 @@ static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
287298
DEF_RST(12, 14, 5, 31), /* CRU_3_PRESETN */
288299
DEF_RST(12, 15, 6, 0), /* CRU_3_ARESETN */
289300
DEF_RST(13, 0, 6, 1), /* CRU_3_S_RESETN */
301+
DEF_RST(13, 13, 6, 14), /* GPU_0_RESETN */
302+
DEF_RST(13, 14, 6, 15), /* GPU_0_AXI_RESETN */
303+
DEF_RST(13, 15, 6, 16), /* GPU_0_ACE_RESETN */
290304
};
291305

292306
const struct rzv2h_cpg_info r9a09g057_cpg_info __initconst = {

drivers/clk/renesas/rzv2h-cpg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct pll {
2828
})
2929

3030
#define PLLCA55 PLL_PACK(0x60, 1)
31+
#define PLLGPU PLL_PACK(0x120, 1)
3132

3233
/**
3334
* struct ddiv - Structure for dynamic switching divider
@@ -63,6 +64,7 @@ struct ddiv {
6364
#define CDDIV1_DIVCTL1 DDIV_PACK(CPG_CDDIV1, 4, 2, 5)
6465
#define CDDIV1_DIVCTL2 DDIV_PACK(CPG_CDDIV1, 8, 2, 6)
6566
#define CDDIV1_DIVCTL3 DDIV_PACK(CPG_CDDIV1, 12, 2, 7)
67+
#define CDDIV3_DIVCTL1 DDIV_PACK(CPG_CDDIV3, 4, 3, 13)
6668
#define CDDIV3_DIVCTL2 DDIV_PACK(CPG_CDDIV3, 8, 3, 14)
6769
#define CDDIV3_DIVCTL3 DDIV_PACK(CPG_CDDIV3, 12, 1, 15)
6870
#define CDDIV4_DIVCTL0 DDIV_PACK(CPG_CDDIV4, 0, 1, 16)

0 commit comments

Comments
 (0)