Skip to content

Commit 5add5eb

Browse files
claudiubezneageertu
authored andcommitted
clk: renesas: r9a08g045: Add support for power domains
Instantiate power domains for the currently enabled IPs of the R9A08G045 SoC. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20240422105355.1622177-8-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 0c8a59b commit 5add5eb

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

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)