devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add Ethernet and GMAC clocks for Renesas RZ/{T2H, N2H} SoCs
@ 2025-08-27 18:19 Prabhakar
  2025-08-27 18:19 ` [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks Prabhakar
  2025-08-27 18:19 ` [PATCH 2/2] clk: renesas: r9a09g077: Add Ethernet Subsystem core and module clocks Prabhakar
  0 siblings, 2 replies; 4+ messages in thread
From: Prabhakar @ 2025-08-27 18:19 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Magnus Damm
  Cc: linux-renesas-soc, linux-clk, linux-kernel, devicetree, Prabhakar,
	Biju Das, Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi All,

This patch series aims to add Ethernet and GMAC clocks for Renesas
RZ/{T2H, N2H} SoCs. The first patch adds the core clock definitions
and the second patch adds the entries to modules and core clocks.

Cheers,
Prabhakar

Lad Prabhakar (2):
  dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks
  clk: renesas: r9a09g077: Add Ethernet Subsystem core and module clocks

 drivers/clk/renesas/r9a09g077-cpg.c            | 18 +++++++++++++++++-
 .../clock/renesas,r9a09g077-cpg-mssr.h         |  9 +++++++++
 .../clock/renesas,r9a09g087-cpg-mssr.h         |  9 +++++++++
 3 files changed, 35 insertions(+), 1 deletion(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks
  2025-08-27 18:19 [PATCH 0/2] Add Ethernet and GMAC clocks for Renesas RZ/{T2H, N2H} SoCs Prabhakar
@ 2025-08-27 18:19 ` Prabhakar
  2025-08-28 17:50   ` Conor Dooley
  2025-08-27 18:19 ` [PATCH 2/2] clk: renesas: r9a09g077: Add Ethernet Subsystem core and module clocks Prabhakar
  1 sibling, 1 reply; 4+ messages in thread
From: Prabhakar @ 2025-08-27 18:19 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Magnus Damm
  Cc: linux-renesas-soc, linux-clk, linux-kernel, devicetree, Prabhakar,
	Biju Das, Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Add clock definitions for Ethernet (ETCLK A-E) and GMAC (GMAC0-2)
peripherals to both R9A09G077 and R9A09G087 SoCs. These definitions
are required for describing Ethernet and GMAC devices in device trees.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h | 9 +++++++++
 include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h b/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
index 0c2ce81a8744..a9e88b0c502d 100644
--- a/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
+++ b/include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
@@ -26,5 +26,14 @@
 #define R9A09G077_CLK_PCLKL		14
 #define R9A09G077_SDHI_CLKHS		15
 #define R9A09G077_USB_CLK		16
+#define R9A09G077_ETCLKA		17
+#define R9A09G077_ETCLKB		18
+#define R9A09G077_ETCLKC		19
+#define R9A09G077_ETCLKD		20
+#define R9A09G077_ETCLKE		21
+#define R9A09G077_GMAC0_PCLKH		22
+#define R9A09G077_GMAC1_PCLKAH		23
+#define R9A09G077_GMAC2_PCLKAH		24
+
 
 #endif /* __DT_BINDINGS_CLOCK_RENESAS_R9A09G077_CPG_H__ */
diff --git a/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h b/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
index 70ee883f2386..c86ffa68f87c 100644
--- a/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
+++ b/include/dt-bindings/clock/renesas,r9a09g087-cpg-mssr.h
@@ -26,5 +26,14 @@
 #define R9A09G087_CLK_PCLKL		14
 #define R9A09G087_SDHI_CLKHS		15
 #define R9A09G087_USB_CLK		16
+#define R9A09G087_ETCLKA		17
+#define R9A09G087_ETCLKB		18
+#define R9A09G087_ETCLKC		19
+#define R9A09G087_ETCLKD		20
+#define R9A09G087_ETCLKE		21
+#define R9A09G087_GMAC0_PCLKH		22
+#define R9A09G087_GMAC1_PCLKAH		23
+#define R9A09G087_GMAC2_PCLKAH		24
+
 
 #endif /* __DT_BINDINGS_CLOCK_RENESAS_R9A09G087_CPG_H__ */
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] clk: renesas: r9a09g077: Add Ethernet Subsystem core and module clocks
  2025-08-27 18:19 [PATCH 0/2] Add Ethernet and GMAC clocks for Renesas RZ/{T2H, N2H} SoCs Prabhakar
  2025-08-27 18:19 ` [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks Prabhakar
@ 2025-08-27 18:19 ` Prabhakar
  1 sibling, 0 replies; 4+ messages in thread
From: Prabhakar @ 2025-08-27 18:19 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Magnus Damm
  Cc: linux-renesas-soc, linux-clk, linux-kernel, devicetree, Prabhakar,
	Biju Das, Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Add module and core clocks used by Ethernet Subsystem (Ethernet_SS),
Ethernet MAC (GMAC), Ethernet Switch (ETHSW).

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/clk/renesas/r9a09g077-cpg.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/r9a09g077-cpg.c b/drivers/clk/renesas/r9a09g077-cpg.c
index 1fdd764f9b91..1d3717cc4533 100644
--- a/drivers/clk/renesas/r9a09g077-cpg.c
+++ b/drivers/clk/renesas/r9a09g077-cpg.c
@@ -72,7 +72,7 @@ enum rzt2h_clk_types {
 
 enum clk_ids {
 	/* Core Clock Outputs exported to DT */
-	LAST_DT_CORE_CLK = R9A09G077_USB_CLK,
+	LAST_DT_CORE_CLK = R9A09G077_GMAC2_PCLKAH,
 
 	/* External Input Clocks */
 	CLK_EXTAL,
@@ -166,11 +166,22 @@ static const struct cpg_core_clk r9a09g077_core_clks[] __initconst = {
 	DEF_DIV("CA55S", R9A09G077_CLK_CA55S, CLK_SEL_CLK_PLL0, DIVCA55S,
 		dtable_1_2),
 	DEF_FIXED("PCLKGPTL", R9A09G077_CLK_PCLKGPTL, CLK_SEL_CLK_PLL1, 2, 1),
+	DEF_FIXED("PCLKH", R9A09G077_CLK_PCLKH, CLK_SEL_CLK_PLL1, 4, 1),
 	DEF_FIXED("PCLKM", R9A09G077_CLK_PCLKM, CLK_SEL_CLK_PLL1, 8, 1),
 	DEF_FIXED("PCLKL", R9A09G077_CLK_PCLKL, CLK_SEL_CLK_PLL1, 16, 1),
+	DEF_FIXED("PCLKAH", R9A09G077_CLK_PCLKAH, CLK_PLL4D1, 6, 1),
 	DEF_FIXED("PCLKAM", R9A09G077_CLK_PCLKAM, CLK_PLL4D1, 12, 1),
 	DEF_FIXED("SDHI_CLKHS", R9A09G077_SDHI_CLKHS, CLK_SEL_CLK_PLL2, 1, 1),
 	DEF_FIXED("USB_CLK", R9A09G077_USB_CLK, CLK_PLL4D1, 48, 1),
+	DEF_FIXED("ETCLKA", R9A09G077_ETCLKA, CLK_SEL_CLK_PLL1, 5, 1),
+	DEF_FIXED("ETCLKB", R9A09G077_ETCLKB, CLK_SEL_CLK_PLL1, 8, 1),
+	DEF_FIXED("ETCLKC", R9A09G077_ETCLKC, CLK_SEL_CLK_PLL1, 10, 1),
+	DEF_FIXED("ETCLKD", R9A09G077_ETCLKD, CLK_SEL_CLK_PLL1, 20, 1),
+	DEF_FIXED("ETCLKE", R9A09G077_ETCLKE, CLK_SEL_CLK_PLL1, 40, 1),
+
+	DEF_FIXED("GMAC0_PCLKH", R9A09G077_GMAC0_PCLKH, R9A09G077_CLK_PCLKH, 1, 1),
+	DEF_FIXED("GMAC1_PCLKH", R9A09G077_GMAC1_PCLKAH, R9A09G077_CLK_PCLKAH, 1, 1),
+	DEF_FIXED("GMAC2_PCLKH", R9A09G077_GMAC2_PCLKAH, R9A09G077_CLK_PCLKAH, 1, 1),
 };
 
 static const struct mssr_mod_clk r9a09g077_mod_clks[] __initconst = {
@@ -186,6 +197,11 @@ static const struct mssr_mod_clk r9a09g077_mod_clks[] __initconst = {
 	DEF_MOD("iic2", 601, R9A09G077_CLK_PCLKL),
 	DEF_MOD("sdhi0", 1212, R9A09G077_CLK_PCLKAM),
 	DEF_MOD("sdhi1", 1213, R9A09G077_CLK_PCLKAM),
+	DEF_MOD("gmac0", 400, R9A09G077_CLK_PCLKM),
+	DEF_MOD("ethsw", 401, R9A09G077_CLK_PCLKM),
+	DEF_MOD("ethss", 403, R9A09G077_CLK_PCLKM),
+	DEF_MOD("gmac1", 416, R9A09G077_CLK_PCLKAM),
+	DEF_MOD("gmac2", 417, R9A09G077_CLK_PCLKAM),
 };
 
 static struct clk * __init
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks
  2025-08-27 18:19 ` [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks Prabhakar
@ 2025-08-28 17:50   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2025-08-28 17:50 UTC (permalink / raw)
  To: Prabhakar
  Cc: Geert Uytterhoeven, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Magnus Damm, linux-renesas-soc,
	linux-clk, linux-kernel, devicetree, Biju Das, Fabrizio Castro,
	Lad Prabhakar

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]



Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-28 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 18:19 [PATCH 0/2] Add Ethernet and GMAC clocks for Renesas RZ/{T2H, N2H} SoCs Prabhakar
2025-08-27 18:19 ` [PATCH 1/2] dt-bindings: clock: renesas,r9a09g077/87: Add Ethernet and GMAC clocks Prabhakar
2025-08-28 17:50   ` Conor Dooley
2025-08-27 18:19 ` [PATCH 2/2] clk: renesas: r9a09g077: Add Ethernet Subsystem core and module clocks Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).