clk: renesas: r8a779g0: Add custom clock for PLL2
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 8 Dec 2022 09:56:58 +0000 (10:56 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 24 Jan 2023 09:11:50 +0000 (10:11 +0100)
commit584d29912db27e56eaaccd225e283e1f429e4f83
treeafab810123a716404755045c64e2f372c98c9dd5
parent1c052043c79af5f70e80e2acd4dd70904ae08666
clk: renesas: r8a779g0: Add custom clock for PLL2

Currently the PLLs are modeled as fixed factor clocks, based on initial
settings.  However, enabling CPU boost clock rates requires increasing
the PLL clock rates.

Add a custom clock driver to model the PLL clocks on R-Car Gen4, and use
it for PLL2 on R-Car V4H.  This allows the Z clock (Cortex-A76 core
clock) to request PLL rate changes, and enable boost mode for the High
Performance mode.  For now this is limited to integer multiplication
modes.

Note that the definition for CPG_PLLxCR0_NI uses the value for R-Car V4H.
On R-Car S4-8, the integer and fractional multiplication fields are one
bit larger resp. smaller, but R-Car S4-8 does not support High
Performance mode.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/76a5952900a6e15604c640bc8a27762e0e936677.1670492384.git.geert+renesas@glider.be
drivers/clk/renesas/r8a779g0-cpg-mssr.c
drivers/clk/renesas/rcar-gen4-cpg.c
drivers/clk/renesas/rcar-gen4-cpg.h