Skip to contentSkip to conversation

clk: renesas: R-Car V3M/V3H: Add Z2 clocks

PATCH New Geert Uytterhoeven 1 participant 3 messages Feb 16, 2023

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover clk: renesas: R-Car V3M/V3H: Add Z2 clocks

Hi all,

This patch series adds support for the Z2 (Cortex-A53 System CPU) clocks on the Renesas R-Car V3M and V3H SoCs. These clocks use a fixed SYS-CPU divider.

Note that the BSP went to great lengths to describe them as programmable Z clocks, like on most other R-Car Gen3 SoCs, but add quirks to the Z clock driver to use a fixed divider when running on R-Car V3M or V3H. I chose the simpler way...

According to R-Car Series, 3rd Generation Hardware User’s Manual Rev. 2.30 and earlier, the SYS-CPU dividers on R-Car V3M and V3H are fixed dividers. Furthermore, the Frequency control register C, which is used on other SoCs to control the SYS-CPU divider, is documented not to exist on these SoCs (but empirical evidence shows that it does exist, and that the Z2FC field works as expected (tested on Eagle and Condor)).

I intend to queue this series in renesas-clk-for-v6.4.

Thanks for your comments!

Geert Uytterhoeven (2):
clk: renesas: r8a77970: Add Z2 clock
clk: renesas: r8a77980: Add Z2 clock

 drivers/clk/renesas/r8a77970-cpg-mssr.c | 1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c | 1 +
 2 files changed, 2 insertions(+)
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
author maintainer
#1 lore raw

PATCH 1/2 clk: renesas: r8a77970: Add Z2 clock

Add support for the Z2 (Cortex-A53 System CPU) clock on R-Car V3M, which uses a fixed SYS-CPU divider.

---
Note that the BSP went to great lengths to describe this clock as a programmable Z clock, like on most other R-Car Gen3 SoCs, but add a quirk to the Z clock driver to use a fixed divider when running on R-Car V3M.

According to R-Car Series, 3rd Generation Hardware User’s Manual Rev. 2.30 and earlier, the SYS-CPU divider on R-Car V3M is a fixed divider. Furthermore, the Frequency control register C, which is used on other SoCs to control the SYS-CPU divider, is documented not to exist (but empirical evidence shows that it does exist, and that the Z2FC field works as expected).

---
 drivers/clk/renesas/r8a77970-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/renesas/r8a77970-cpg-mssr.c +1 -0
index 0f59c84229a8b8ce..7e90e94c4b68821b 100644
@@ -76,6 +76,7 @@ static const struct cpg_core_clk r8a77970_core_clks[] __initconst = {
 	DEF_FIXED(".pll1_div4",	CLK_PLL1_DIV4,	CLK_PLL1_DIV2,	2, 1),
 
 	/* Core Clock Outputs */
+	DEF_FIXED("z2",		R8A77970_CLK_Z2,    CLK_PLL1_DIV4,  1, 1),
 	DEF_FIXED("ztr",	R8A77970_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",	R8A77970_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",		R8A77970_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/2 clk: renesas: r8a77980: Add Z2 clock

In reply to Geert Uytterhoeven

Add support for the Z2 (Cortex-A53 System CPU) clock on R-Car V3H, which uses a fixed SYS-CPU divider.

---
Note that the BSP went to great lengths to describe this clock as a programmable Z clock, like on most other R-Car Gen3 SoCs, but add a quirk to the Z clock driver to use a fixed divider when running on R-Car V3H.

According to R-Car Series, 3rd Generation Hardware User’s Manual Rev. 2.30 and earlier, the SYS-CPU divider on R-Car V3H is a fixed divider. Furthermore, the Frequency control register C, which is used on other SoCs to control the SYS-CPU divider, is documented not to exist (but empirical evidence shows that it does exist, and that the Z2FC field works as expected).

---
 drivers/clk/renesas/r8a77980-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/renesas/r8a77980-cpg-mssr.c +1 -0
index 6dc63eaf115566f9..bac92c606d0bf808 100644
@@ -72,6 +72,7 @@ static const struct cpg_core_clk r8a77980_core_clks[] __initconst = {
 	DEF_RATE(".oco",	CLK_OCO,           32768),
 
 	/* Core Clock Outputs */
+	DEF_FIXED("z2",		R8A77980_CLK_Z2,    CLK_PLL2,       4, 1),
 	DEF_FIXED("ztr",	R8A77980_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",	R8A77980_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",		R8A77980_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
Signature · 1 line
2.34.1