Message ID | 20240208124300.2740313-11-claudiu.beznea.uj@bp.renesas.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp251684dyd; Thu, 8 Feb 2024 07:35:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWnSfjVpceQv4MaxkXykTzi+4yWEyoJtGoMEUkZ1gFgZhv5pswoJUwHhUZoFth4j+P5iUpxf5jSvNzUbnRE7fFOy7EReg== X-Google-Smtp-Source: AGHT+IH45ftKEkzAp9C84+EvuvcY7U6RYpcd2BKJ3NmkscYSpwspSEloVu9u1mnV7JPtAxgVgefs X-Received: by 2002:ac8:6e9d:0:b0:42b:e3ce:f43 with SMTP id c29-20020ac86e9d000000b0042be3ce0f43mr9896207qtv.53.1707406552647; Thu, 08 Feb 2024 07:35:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707406552; cv=pass; d=google.com; s=arc-20160816; b=QLptOLSVrxF0+tz1JnuPSPN9ZpLCTZBbpRRbU+MwNKK+BxYfBi5AIkIkXpZP5elgWp ceWo+M0OjGijz0LV6+PS3swebJi956xpx40m6qLwL4Qh9Lm7nbmqaWdum2zrhCwJNlJC w+5WyMlqCxXHL6TzmYqGwmqKAs3rOl3mTmONPrZZYrql29s+g6S+TcFa3l7rHJSY7y5m 4Hf+JATHO//9z3Wsz9NLSBoSDHPPc/+Hej5jV+4kLeq8EefMvDj29eWyBNrcoXE17CQU /QkA021MBgJdilq0FS39h3xoLUwd/4eUdwnMT2s8mbIBtUgCcTyAUrPI6/Xi76kh2oc1 JDeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=9rO5WdjuJmB2S7TQJ0EBDmOconefLyJTkDblhQ1H3b4=; fh=EQ0sgDvcNKCgGDTOTA8W1EUjXRd9/k6gbFLlvyyvYTI=; b=C6NHMgFW5ru+qS5I1t2hW+etLN2IjINuZulFFEOoK+GtNuvuoeQqHXQZNPyWOouNIY bpDkrgt1J4l2AeTwoobjhAvpjW8+gR4Cj/HDEEa5fC28RB7ok2w9Ymp798AgfnnkknJE rczfsWCx6/H55ywxP9AhrUZDWzETiERDMowxmi8UB1I3NIv8u0CoEeBTP9HLJcO/wKn3 +htYXPf2mpR7eDI0gjvNiSdMP+r7pLLrUYI0YZk9qBPQFjuPIwpdB0CM0DSS6h+iLzx6 vAouxzzdm9y3m7x8Ni9UOPhUH3PPQ4xkLhQTmLEvJeVM5HD0nDo3gHJNICZ62ybz9ZE2 U4Pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=aVskWnLB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCX0eKD7NQjB+XEsf912o5A4jOmopf89QOud0bM4yEGj17dOtUpgcQRYno80BVUZFS2yWOgoOfka+LR+PaE80qzOBpg10w== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u31-20020a05622a199f00b0042c3ed94d8csi212216qtc.392.2024.02.08.07.35.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 07:35:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=aVskWnLB; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58082-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 72BEE1C280FD for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 12:46:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 755867CF34; Thu, 8 Feb 2024 12:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="aVskWnLB" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 267967B3E4 for <linux-kernel@vger.kernel.org>; Thu, 8 Feb 2024 12:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707396249; cv=none; b=aGJ/rUTE+qsrQBk6OxxK5S1MJI95xD5XZXN69RaKErJdfk56kVDFYOc6wVOUmBb7aqRo0WI7MMp/82YqJ/IHexUyIIWl6MmOlS5VQDqOwURNJvT6NFrc1LNvNHroPQrzEIfSF0uS/nCbHrRPUYPUf+M/aP/6wT83i49JjCsA+8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707396249; c=relaxed/simple; bh=/MlmcOyXoCfFZ4lv63XPpglVSMzow4LsfXUTpf+BCr4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Lr0+lvMxMy2hRbB5Cw0d40qdxCC/xTf2VfjlDMrTjgOh0WoYbxZowbmW1wSftPS0J15fa1AG3rcZqI86kRNj+NR0chSNWjBnVisEzzdAQWUMsHgjG9oeFr2bfcPAaS9XU417cZy1Ri2g4f8TcZl7AA3cpH9isiCrbz86ncoHvHM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=aVskWnLB; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40ff28388a6so16084325e9.1 for <linux-kernel@vger.kernel.org>; Thu, 08 Feb 2024 04:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707396245; x=1708001045; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9rO5WdjuJmB2S7TQJ0EBDmOconefLyJTkDblhQ1H3b4=; b=aVskWnLBohnYJMeR2FIB2vDv2XMEZTnoJGQELgHQdimYuPbnjkAv6Xb26kITfcnXdQ F8kvGXRna4lCusomMtgS0nwJtQo3vVsvLJyscE+s8/TplO32gWpZetsHSM/k28QcLWo4 a/LkVL8VD/ab6ws98S7jDn0meqtbEr6mj5iVUCZo1xrUHgOYfV37oL52M/iaQrD0VwpG wnmRwjV4G6/v6GrKcPmG8kSb3042NsPIHJp3xl3EmkiI6mC7VS7fE2/U5/V+w6YvFwnJ yxkq5blW+4CTLddSMEw0kcFJnSUSkZsNpN+p2lNdfIv3i5+kGAYa/k36wxqeD1ZVU8+u 8xMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707396245; x=1708001045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9rO5WdjuJmB2S7TQJ0EBDmOconefLyJTkDblhQ1H3b4=; b=K4rHQrySFHDbxAmobI1fSKxbb4jil+e6AJQORHHs9XpITc/l67LuRZVo0+ZiEW10Xo LRiFe5Ey/NaXOzsQ1E4pH2X9umfgDB3jDh/7fZBcFiMy+zxkk1DlXtH/1GXFShiVCwTV ROtSyjkbrYlQ0+LlN+rGYLEVxC784YZJtbFy2ivnKVO8Sgb4V8UQt+IRjmat67gKYIbT NIjyc9fnUyTRH23pJsoAMe6MArtIlfxZYUNB0embyj/28msDTxqPcWtSyWSBinM+x/Pr XQ0UAnxifh8axyqQ6yQM6i3e8QjEMZkm3KxujetQl+FMHFsYarx8ZXVQnE0dQRiW0nD+ bfeA== X-Forwarded-Encrypted: i=1; AJvYcCVXdOq702etww6sSwr4t0vguMU6FRfUPAr+6kd9ateN3INCL7Br1o1DYjcEQXgtwDRD9z50EuTO7UitJnpNEL2ohXcBQnqFt36itNEQ X-Gm-Message-State: AOJu0YxjefMVsa4Lp8eO7vQW9TCGdZqH11Q/buuo0mG4GelsBr5RLq/3 NtCinoNyhJ++k5kCv07IWrDU/2BU/oxE3PZcCDKNIoxAFeXFBZ3pBM1vGoYrH/s= X-Received: by 2002:a05:600c:3b97:b0:410:8f2:262a with SMTP id n23-20020a05600c3b9700b0041008f2262amr4272603wms.13.1707396245502; Thu, 08 Feb 2024 04:44:05 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW7Lpay7FODh9fbZn3a01H8ZvmM2SiauhTcEP7H2iU5vuup9mMYT1+LGEIv3Cp9BD81U4vXRMCr/EOF9yA8rP3x2Y+AnhZaeVGXDbeReb1bgkWyFi1iPHI2XqMtH/j6BX470KlFbzpptyr3mTCkzGvtSvwH8+QdsLJgjGCLlm6VrR0hYSmhfQY0JfAdLkasF4N3lkfYv1ahZc8EAhd67oPU+eAVjbZxl+OAiGnfWtG1FjqbVRWrxRcQ33tu+sYQW9cK/tDYRgUAbGQvKckrJaz+domK+n/SGhw4+6nW/11h+pjlI3mUTt+lI87Qn//RPdf6BSsiN/p1KwI5TgwTZDDFuzqNAIueiRvSvzmxd3cOFMABK5GpDvMkVwfKJ3+fyrmjWz7UvH7RnRlldNB1GWdX3T7fL1I2vA5UXrLwVlbyso7UbjQ9ixUccrbcg1ZSCleoNZuImVzeDLgDRVua1i8sNgCYv4enjHmFQ6y0eEZS8I6QkNo3sEJQ9aMagG4wA8im8ZWKwW/TX5EyWjQ9i4eKp+0hvywPPy25Iw1SMamq9cM0A0Uh4xFkd4qpCfmDj8o= Received: from claudiu-X670E-Pro-RS.. ([82.78.167.45]) by smtp.gmail.com with ESMTPSA id o13-20020a05600c4fcd00b0041047382b76sm790244wmq.37.2024.02.08.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:44:05 -0800 (PST) From: Claudiu <claudiu.beznea@tuxon.dev> X-Google-Original-From: Claudiu <claudiu.beznea.uj@bp.renesas.com> To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, magnus.damm@gmail.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, claudiu.beznea@tuxon.dev, Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Subject: [PATCH 10/17] clk: renesas: r9a08g045: Add support for power domains Date: Thu, 8 Feb 2024 14:42:53 +0200 Message-Id: <20240208124300.2740313-11-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208124300.2740313-1-claudiu.beznea.uj@bp.renesas.com> References: <20240208124300.2740313-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790345533626456161 X-GMAIL-MSGID: 1790345533626456161 |
Series |
clk: renesas: rzg2l: Add support for power domains
|
|
Commit Message
claudiu beznea
Feb. 8, 2024, 12:42 p.m. UTC
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Instantiate power domains for the currently enabled IPs of R9A08G045 SoC. Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> --- drivers/clk/renesas/r9a08g045-cpg.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
Comments
Hi Claudiu, On Thu, Feb 8, 2024 at 1:44 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > Instantiate power domains for the currently enabled IPs of R9A08G045 SoC. > > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Thanks for your patch! > --- a/drivers/clk/renesas/r9a08g045-cpg.c > +++ b/drivers/clk/renesas/r9a08g045-cpg.c > @@ -240,6 +240,28 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = { > MOD_CLK_BASE + R9A08G045_DMAC_ACLK, > }; > > +static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = { > + DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON, 0, 0, > + RZG2L_PD_F_PARENT | RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("gic", R9A08G045_PD_GIC, MSTOP(ACPU, BIT(3)), PWRDN(IP1, 2), My docs document only bit 0 of the CPG_BUS_ACPU_MSTOP register. > + RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("ia55", R9A08G045_PD_IA55, MSTOP(PERI_CPU, BIT(13)), PWRDN(IP1, 3), > + RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("dmac", R9A08G045_PD_DMAC, MSTOP(REG1, GENMASK(3, 0)), 0, > + RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("ddr", R9A08G045_PD_DDR, MSTOP(PERI_DDR, BIT(1)), PWRDN(IP2, 0), Only BIT(1)? My docs suggest GENMASK(1, 0). > + RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("tzcddr", R9A08G045_PD_TZCDDR, MSTOP(TZCDDR, GENMASK(2, 0)), > + PWRDN(IP2, 1), RZG2L_PD_F_ALWAYS_ON), > + DEF_PD("otfde_ddr", R9A08G045_PD_OTFDE_DDR, 0, PWRDN(IP2, 2), RZG2L_PD_F_ALWAYS_ON), MSTOP(PERI_CPU2, BIT(2))? > + DEF_PD("sdhi0", R9A08G045_PD_SDHI0, MSTOP(PERI_COM, BIT(0)), PWRDN(IP1, 13), 0), > + DEF_PD("sdhi1", R9A08G045_PD_SDHI1, MSTOP(PERI_COM, BIT(1)), PWRDN(IP1, 14), 0), > + DEF_PD("sdhi2", R9A08G045_PD_SDHI2, MSTOP(PERI_COM, BIT(11)), PWRDN(IP1, 15), 0), > + DEF_PD("eth0", R9A08G045_PD_ETHER0, MSTOP(PERI_COM, BIT(2)), PWRDN(IP1, 11), 0), > + DEF_PD("eth1", R9A08G045_PD_ETHER1, MSTOP(PERI_COM, BIT(3)), PWRDN(IP1, 12), 0), > + DEF_PD("scif0", R9A08G045_PD_SCIF0, MSTOP(MCPU2, BIT(1)), 0, 0), > +}; > + The rest LGTM. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi, Geert, On 16.02.2024 16:10, Geert Uytterhoeven wrote: > Hi Claudiu, > > On Thu, Feb 8, 2024 at 1:44 PM Claudiu <claudiu.beznea@tuxon.dev> wrote: >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >> >> Instantiate power domains for the currently enabled IPs of R9A08G045 SoC. >> >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > Thanks for your patch! > >> --- a/drivers/clk/renesas/r9a08g045-cpg.c >> +++ b/drivers/clk/renesas/r9a08g045-cpg.c >> @@ -240,6 +240,28 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = { >> MOD_CLK_BASE + R9A08G045_DMAC_ACLK, >> }; >> >> +static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = { >> + DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON, 0, 0, >> + RZG2L_PD_F_PARENT | RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("gic", R9A08G045_PD_GIC, MSTOP(ACPU, BIT(3)), PWRDN(IP1, 2), > > My docs document only bit 0 of the CPG_BUS_ACPU_MSTOP register. Indeed, mine, too. I took as reference the table "Registers for Module Standby Mode". I asked for clarifications. The TF-A software also uses BIT(3) for setting this. > >> + RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("ia55", R9A08G045_PD_IA55, MSTOP(PERI_CPU, BIT(13)), PWRDN(IP1, 3), >> + RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("dmac", R9A08G045_PD_DMAC, MSTOP(REG1, GENMASK(3, 0)), 0, >> + RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("ddr", R9A08G045_PD_DDR, MSTOP(PERI_DDR, BIT(1)), PWRDN(IP2, 0), > > Only BIT(1)? My docs suggest GENMASK(1, 0). I wanted to keep PHY separated but there's no reason for doing that, AFAICT. I'll update it. > >> + RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("tzcddr", R9A08G045_PD_TZCDDR, MSTOP(TZCDDR, GENMASK(2, 0)), >> + PWRDN(IP2, 1), RZG2L_PD_F_ALWAYS_ON), >> + DEF_PD("otfde_ddr", R9A08G045_PD_OTFDE_DDR, 0, PWRDN(IP2, 2), RZG2L_PD_F_ALWAYS_ON), > > MSTOP(PERI_CPU2, BIT(2))? OK. Thank you, Claudiu Beznea > >> + DEF_PD("sdhi0", R9A08G045_PD_SDHI0, MSTOP(PERI_COM, BIT(0)), PWRDN(IP1, 13), 0), >> + DEF_PD("sdhi1", R9A08G045_PD_SDHI1, MSTOP(PERI_COM, BIT(1)), PWRDN(IP1, 14), 0), >> + DEF_PD("sdhi2", R9A08G045_PD_SDHI2, MSTOP(PERI_COM, BIT(11)), PWRDN(IP1, 15), 0), >> + DEF_PD("eth0", R9A08G045_PD_ETHER0, MSTOP(PERI_COM, BIT(2)), PWRDN(IP1, 11), 0), >> + DEF_PD("eth1", R9A08G045_PD_ETHER1, MSTOP(PERI_COM, BIT(3)), PWRDN(IP1, 12), 0), >> + DEF_PD("scif0", R9A08G045_PD_SCIF0, MSTOP(MCPU2, BIT(1)), 0, 0), >> +}; >> + > > The rest LGTM. > > Gr{oetje,eeting}s, > > Geert > > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
diff --git a/drivers/clk/renesas/r9a08g045-cpg.c b/drivers/clk/renesas/r9a08g045-cpg.c index c3e6da2de197..b06d8e93707f 100644 --- a/drivers/clk/renesas/r9a08g045-cpg.c +++ b/drivers/clk/renesas/r9a08g045-cpg.c @@ -240,6 +240,28 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = { MOD_CLK_BASE + R9A08G045_DMAC_ACLK, }; +static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = { + DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON, 0, 0, + RZG2L_PD_F_PARENT | RZG2L_PD_F_ALWAYS_ON), + DEF_PD("gic", R9A08G045_PD_GIC, MSTOP(ACPU, BIT(3)), PWRDN(IP1, 2), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("ia55", R9A08G045_PD_IA55, MSTOP(PERI_CPU, BIT(13)), PWRDN(IP1, 3), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("dmac", R9A08G045_PD_DMAC, MSTOP(REG1, GENMASK(3, 0)), 0, + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("ddr", R9A08G045_PD_DDR, MSTOP(PERI_DDR, BIT(1)), PWRDN(IP2, 0), + RZG2L_PD_F_ALWAYS_ON), + DEF_PD("tzcddr", R9A08G045_PD_TZCDDR, MSTOP(TZCDDR, GENMASK(2, 0)), + PWRDN(IP2, 1), RZG2L_PD_F_ALWAYS_ON), + DEF_PD("otfde_ddr", R9A08G045_PD_OTFDE_DDR, 0, PWRDN(IP2, 2), RZG2L_PD_F_ALWAYS_ON), + DEF_PD("sdhi0", R9A08G045_PD_SDHI0, MSTOP(PERI_COM, BIT(0)), PWRDN(IP1, 13), 0), + DEF_PD("sdhi1", R9A08G045_PD_SDHI1, MSTOP(PERI_COM, BIT(1)), PWRDN(IP1, 14), 0), + DEF_PD("sdhi2", R9A08G045_PD_SDHI2, MSTOP(PERI_COM, BIT(11)), PWRDN(IP1, 15), 0), + DEF_PD("eth0", R9A08G045_PD_ETHER0, MSTOP(PERI_COM, BIT(2)), PWRDN(IP1, 11), 0), + DEF_PD("eth1", R9A08G045_PD_ETHER1, MSTOP(PERI_COM, BIT(3)), PWRDN(IP1, 12), 0), + DEF_PD("scif0", R9A08G045_PD_SCIF0, MSTOP(MCPU2, BIT(1)), 0, 0), +}; + const struct rzg2l_cpg_info r9a08g045_cpg_info = { /* Core Clocks */ .core_clks = r9a08g045_core_clks, @@ -260,5 +282,10 @@ const struct rzg2l_cpg_info r9a08g045_cpg_info = { .resets = r9a08g045_resets, .num_resets = R9A08G045_VBAT_BRESETN + 1, /* Last reset ID + 1 */ + /* Power domains */ + .pm_domains = r9a08g045_pm_domains, + .num_pm_domains = ARRAY_SIZE(r9a08g045_pm_domains), + .pm_domain_pwrdn_mstop = true, + .has_clk_mon_regs = true, };