]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
clk: renesas: cpg-mssr: Add module reset support for RZ/T2H
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Mon, 29 Sep 2025 11:23:24 +0000 (12:23 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 20 Oct 2025 08:11:56 +0000 (10:11 +0200)
commit3b37979dcbef0dc3fc1aaba75b21ff9a21799055
tree2dde5c2686c07d1ac36ffded6373acacde948e1a
parent0f537c41831aea18e54d889350e706e221beda63
clk: renesas: cpg-mssr: Add module reset support for RZ/T2H

Add support for module reset handling on the RZ/T2H SoC. Unlike earlier
CPG/MSSR variants, RZ/T2H uses a unified set of Module Reset Control
Registers (MRCR) where both reset and deassert actions are done via
read-modify-write (RMW) to the same register.

Introduce a new MRCR offset table (mrcr_for_rzt2h) for RZ/T2H and assign
it to reset_regs. For this SoC, the number of resets is based on the
number of MRCR registers rather than the number of module clocks. Also
add cpg_mrcr_reset_ops to implement reset, assert, and deassert using RMW
while holding the spinlock. This follows the RZ/T2H requirements, where
processing after releasing a module reset must be secured by performing
seven dummy reads of the same register, and where a module that is reset
and released again must ensure the target bit in the Module Reset Control
Register is set to 1.

Update the reset controller registration to select cpg_mrcr_reset_ops for
RZ/T2H, while keeping the existing cpg_mssr_reset_ops for other SoCs.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patch.msgid.link/20250929112324.3622148-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/renesas-cpg-mssr.c