From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 2/3] clk: renesas: r9a07g044: Add MSTOP for RZ/G2L
Date: Tue, 5 Aug 2025 22:18:07 +0300 [thread overview]
Message-ID: <eb7241f5-4b52-4fac-8cb8-07d4a9958cdb@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdXGvNgv9hGhcr5MhTL+X_E2f-2kz2NEqhG1fw_dBC0uBA@mail.gmail.com>
Hi, Geert,
On 04.08.2025 13:00, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Fri, 4 Jul 2025 at 15:43, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> Add MSTOP configuration for all the module clocks on the RZ/G2L
>> based SoCs (RZ/G2L, RZ/G2LC).
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
>> --- a/drivers/clk/renesas/r9a07g044-cpg.c
>> +++ b/drivers/clk/renesas/r9a07g044-cpg.c
>> @@ -242,163 +242,163 @@ static const struct {
>> } mod_clks = {
>> .common = {
>
>> DEF_MOD("gpu_clk", R9A07G044_GPU_CLK, R9A07G044_CLK_G,
>> - 0x558, 0, 0),
>> + 0x558, 0, MSTOP(BUS_REG1, BIT(4))),
>> DEF_MOD("gpu_axi_clk", R9A07G044_GPU_AXI_CLK, R9A07G044_CLK_P1,
>> 0x558, 1, 0),
>> DEF_MOD("gpu_ace_clk", R9A07G044_GPU_ACE_CLK, R9A07G044_CLK_P1,
>> 0x558, 2, 0),
>
> Perhaps these two should have "MSTOP(BUS_REG1, BIT(4))", too?
According to table "Table 42.3 Registers for Module Standby Mode" only bit
0 of CPG_CLKON_3DGE maps to bit 4 of CPG_BUS_REG1_MSTOP. There are no hints
in the description of CPG_BUS_REG1_MSTOP neither in the description of
CPG_CLKON_3DGE registers that leads to having bit 4 of CPG_BUS_REG1_MSTOP
for AXI or ACE clocks as well.
I tried to play with MSTOP and clocks at runtime to see if there is any
relation b/w them but can't establish something.
I tried the following steps:
a/ remove the panfrost module (at this point all clocks are disabled and
mstop != 0)
b/ devmem2 0x11010858 w 0x130013 # de-assert the GPU resets
c/ devmem2 0x11010b80 w 0x100000 # switch the module to normal
d/ enable different clocks and read one register as follows:
1/ gpu_axi enabled -> devmem 0x11840000 fail
2/ gpu_axi, gpu_ace enabled -> devmem 0x11840000 fail
3/ gpu_axi, gpu_ace, gpu_clk enabled -> devmem 0x11840000 OK
4/ gpu_clk enabled -> devmem2 0x11840000 fail
5/ gpu_clk, gpu_axi enabled -> devmem2 0x11840000 OK
6/ gpu_clk, gpu_ace enabled -> devmem2 0x11840000 fail
7/ gpu_ace enabled -> devmem2 0x11840000 fail
8/ gpu_ace, gpu_clk enabled -> devmem2 0x11840000 fail
From software point of view I can add it, it doesn't harm. With this,
please let me know if you prefer to have it.
>
>> DEF_MOD("canfd", R9A07G044_CANFD_PCLK, R9A07G044_CLK_P0,
>> - 0x594, 0, 0),
>> + 0x594, 0, MSTOP(BUS_MCPU2, BIT(9))),
>> DEF_MOD("gpio", R9A07G044_GPIO_HCLK, R9A07G044_OSCCLK,
>> 0x598, 0, 0),
>
> "MSTOP(BUS_PERI_CPU, BIT(6))"?
That was a good catch, thank you!
I played with it at runtime and it seems it should be here. It is not
present in table "Table 42.3 Registers for Module Standby Mode" either. It
is also valid for RZ/G3S so I'll add it there, too.
Thank you for your review,
Claudiu
>
>> DEF_MOD("adc_adclk", R9A07G044_ADC_ADCLK, R9A07G044_CLK_TSU,
>> - 0x5a8, 0, 0),
>> + 0x5a8, 0, MSTOP(BUS_MCPU2, BIT(14))),
>
>
> The rest LGTM.
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-08-05 19:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 13:43 [PATCH 0/3] clk: renesas: Add MSTOP support for RZ/G2{L, LC, UL}, RZ/V2L, RZ/Five Claudiu
2025-07-04 13:43 ` [PATCH 1/3] clk: renesas: r9a08g045: Add MSTOP for coupled clocks as well Claudiu
2025-07-07 10:08 ` Geert Uytterhoeven
2025-07-04 13:43 ` [PATCH 2/3] clk: renesas: r9a07g044: Add MSTOP for RZ/G2L Claudiu
2025-08-04 10:00 ` Geert Uytterhoeven
2025-08-05 19:18 ` Claudiu Beznea [this message]
2025-08-06 7:23 ` Geert Uytterhoeven
2025-07-04 13:43 ` [PATCH 3/3] clk: renesas: r9a07g043: Add MSTOP for RZ/G2UL Claudiu
2025-08-04 10:18 ` Geert Uytterhoeven
2025-08-05 19:18 ` Claudiu Beznea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb7241f5-4b52-4fac-8cb8-07d4a9958cdb@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=geert@linux-m68k.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®