public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
* [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support
@ 2025-11-21  8:07 Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 1/6] dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock Ovidiu Panait
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

Hi,

This series adds XSPI support for the Renesas RZ/V2H SoC and enables the
MT25QU512ABB8E12 flash device used on the RZ/V2H EVK board.

Patches were cherry-picked from mainline kernel.

Best regards,
Ovidiu

Lad Prabhakar (6):
  dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock
  clk: renesas: r9a09g057: Add support for xspi mux and divider
  clk: renesas: r9a09g057: Add XSPI clock/reset
  dt-bindings: memory: renesas,rzg3e-xspi: Document RZ/V2H(P) and RZ/V2N
    support
  arm64: dts: renesas: r9a09g057: Add XSPI node
  arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable serial NOR FLASH

 .../renesas,rzg3e-xspi.yaml                   |  9 ++-
 arch/arm64/boot/dts/renesas/r9a09g057.dtsi    | 21 +++++++
 .../dts/renesas/r9a09g057h44-rzv2h-evk.dts    | 55 +++++++++++++++++++
 drivers/clk/renesas/r9a09g057-cpg.c           | 39 +++++++++++--
 drivers/clk/renesas/rzv2h-cpg.h               |  2 +
 .../dt-bindings/clock/renesas,r9a09g057-cpg.h |  1 +
 6 files changed, 122 insertions(+), 5 deletions(-)

-- 
2.51.0



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

* [PATCH 6.12.y-cip 1/6] dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 2/6] clk: renesas: r9a09g057: Add support for xspi mux and divider Ovidiu Panait
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit 5e4e8c1415c181ce311a0b5936ef301edd57c5d1 upstream.

Add XSPI core clock definitions to the clock bindings for the Renesas
R9A09G056 and R9A09G057 SoCs. These clocks IDs are used to support XSPI
interface.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250627204237.214635-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[OP: cherry-picked only the RZ/V2H part]
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 include/dt-bindings/clock/renesas,r9a09g057-cpg.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/renesas,r9a09g057-cpg.h b/include/dt-bindings/clock/renesas,r9a09g057-cpg.h
index 884dbeb1e139..5346a898ab60 100644
--- a/include/dt-bindings/clock/renesas,r9a09g057-cpg.h
+++ b/include/dt-bindings/clock/renesas,r9a09g057-cpg.h
@@ -21,5 +21,6 @@
 #define R9A09G057_USB2_0_CLK_CORE1		10
 #define R9A09G057_GBETH_0_CLK_PTP_REF_I		11
 #define R9A09G057_GBETH_1_CLK_PTP_REF_I		12
+#define R9A09G057_SPI_CLK_SPI			13
 
 #endif /* __DT_BINDINGS_CLOCK_RENESAS_R9A09G057_CPG_H__ */
-- 
2.51.0



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

* [PATCH 6.12.y-cip 2/6] clk: renesas: r9a09g057: Add support for xspi mux and divider
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 1/6] dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 3/6] clk: renesas: r9a09g057: Add XSPI clock/reset Ovidiu Panait
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit 7aada0abe9676d90d95fce065a8227e5d494f611 upstream.

The mux smux2_xspi_clk{0,1} used for selecting spi and spix2 clocks and
pllcm33_xspi divider to select different clock rates. Add support for
both.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250627204237.214635-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 drivers/clk/renesas/r9a09g057-cpg.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/r9a09g057-cpg.c b/drivers/clk/renesas/r9a09g057-cpg.c
index da908e820950..39065d63df61 100644
--- a/drivers/clk/renesas/r9a09g057-cpg.c
+++ b/drivers/clk/renesas/r9a09g057-cpg.c
@@ -16,7 +16,7 @@
 
 enum clk_ids {
 	/* Core Clock Outputs exported to DT */
-	LAST_DT_CORE_CLK = R9A09G057_GBETH_1_CLK_PTP_REF_I,
+	LAST_DT_CORE_CLK = R9A09G057_SPI_CLK_SPI,
 
 	/* External Input Clocks */
 	CLK_AUDIO_EXTAL,
@@ -33,9 +33,14 @@ enum clk_ids {
 	CLK_PLLGPU,
 
 	/* Internal Core Clocks */
+	CLK_PLLCM33_DIV3,
 	CLK_PLLCM33_DIV4,
+	CLK_PLLCM33_DIV5,
 	CLK_PLLCM33_DIV4_PLLCM33,
 	CLK_PLLCM33_DIV16,
+	CLK_SMUX2_XSPI_CLK0,
+	CLK_SMUX2_XSPI_CLK1,
+	CLK_PLLCM33_XSPI,
 	CLK_PLLCLN_DIV2,
 	CLK_PLLCLN_DIV8,
 	CLK_PLLCLN_DIV16,
@@ -78,6 +83,14 @@ static const struct clk_div_table dtable_2_4[] = {
 	{0, 0},
 };
 
+static const struct clk_div_table dtable_2_16[] = {
+	{0, 2},
+	{1, 4},
+	{2, 8},
+	{3, 16},
+	{0, 0},
+};
+
 static const struct clk_div_table dtable_2_64[] = {
 	{0, 2},
 	{1, 4},
@@ -99,6 +112,8 @@ static const char * const smux2_gbe0_rxclk[] = { ".plleth_gbe0", "et0_rxclk" };
 static const char * const smux2_gbe0_txclk[] = { ".plleth_gbe0", "et0_txclk" };
 static const char * const smux2_gbe1_rxclk[] = { ".plleth_gbe1", "et1_rxclk" };
 static const char * const smux2_gbe1_txclk[] = { ".plleth_gbe1", "et1_txclk" };
+static const char * const smux2_xspi_clk0[] = { ".pllcm33_div3", ".pllcm33_div4" };
+static const char * const smux2_xspi_clk1[] = { ".smux2_xspi_clk0", ".pllcm33_div5" };
 
 static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
 	/* External Clock Inputs */
@@ -116,10 +131,16 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
 	DEF_PLL(".pllgpu", CLK_PLLGPU, CLK_QEXTAL, PLLGPU),
 
 	/* Internal Core Clocks */
+	DEF_FIXED(".pllcm33_div3", CLK_PLLCM33_DIV3, CLK_PLLCM33, 1, 3),
 	DEF_FIXED(".pllcm33_div4", CLK_PLLCM33_DIV4, CLK_PLLCM33, 1, 4),
+	DEF_FIXED(".pllcm33_div5", CLK_PLLCM33_DIV5, CLK_PLLCM33, 1, 5),
 	DEF_DDIV(".pllcm33_div4_pllcm33", CLK_PLLCM33_DIV4_PLLCM33,
 		 CLK_PLLCM33_DIV4, CDDIV0_DIVCTL1, dtable_2_64),
 	DEF_FIXED(".pllcm33_div16", CLK_PLLCM33_DIV16, CLK_PLLCM33, 1, 16),
+	DEF_SMUX(".smux2_xspi_clk0", CLK_SMUX2_XSPI_CLK0, SSEL1_SELCTL2, smux2_xspi_clk0),
+	DEF_SMUX(".smux2_xspi_clk1", CLK_SMUX2_XSPI_CLK1, SSEL1_SELCTL3, smux2_xspi_clk1),
+	DEF_CSDIV(".pllcm33_xspi", CLK_PLLCM33_XSPI, CLK_SMUX2_XSPI_CLK1, CSDIV0_DIVCTL3,
+		  dtable_2_16),
 
 	DEF_FIXED(".pllcln_div2", CLK_PLLCLN_DIV2, CLK_PLLCLN, 1, 2),
 	DEF_FIXED(".pllcln_div8", CLK_PLLCLN_DIV8, CLK_PLLCLN, 1, 8),
-- 
2.51.0



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

* [PATCH 6.12.y-cip 3/6] clk: renesas: r9a09g057: Add XSPI clock/reset
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 1/6] dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 2/6] clk: renesas: r9a09g057: Add support for xspi mux and divider Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 4/6] dt-bindings: memory: renesas,rzg3e-xspi: Document RZ/V2H(P) and RZ/V2N support Ovidiu Panait
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit fc7dd515374455f07cdd24b8bad3c7952e812bff upstream.

Add clock and reset entries for the XSPI interface on the R9A09G057 SoC.

While at it, rename CLK_PLLCM33_DIV4_PLLCM33 to CLK_PLLCM33_GEAR to align
with the terminology used in the hardware manual.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250627204237.214635-7-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[OP: Included FIXED_MOD_CONF_XSPI macro from a separate upstream commit
20e31205ae1 ("clk: renesas: r9a09g056: Add XSPI clock/reset") to fix
the build. Only the macro definition was taken; r9a09g056-cpg.c changes
were skipped as the file doesn't exist in 6.12.y-cip]
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 drivers/clk/renesas/r9a09g057-cpg.c | 16 +++++++++++++---
 drivers/clk/renesas/rzv2h-cpg.h     |  2 ++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/renesas/r9a09g057-cpg.c b/drivers/clk/renesas/r9a09g057-cpg.c
index 39065d63df61..687c25f76852 100644
--- a/drivers/clk/renesas/r9a09g057-cpg.c
+++ b/drivers/clk/renesas/r9a09g057-cpg.c
@@ -36,8 +36,8 @@ enum clk_ids {
 	CLK_PLLCM33_DIV3,
 	CLK_PLLCM33_DIV4,
 	CLK_PLLCM33_DIV5,
-	CLK_PLLCM33_DIV4_PLLCM33,
 	CLK_PLLCM33_DIV16,
+	CLK_PLLCM33_GEAR,
 	CLK_SMUX2_XSPI_CLK0,
 	CLK_SMUX2_XSPI_CLK1,
 	CLK_PLLCM33_XSPI,
@@ -134,7 +134,7 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
 	DEF_FIXED(".pllcm33_div3", CLK_PLLCM33_DIV3, CLK_PLLCM33, 1, 3),
 	DEF_FIXED(".pllcm33_div4", CLK_PLLCM33_DIV4, CLK_PLLCM33, 1, 4),
 	DEF_FIXED(".pllcm33_div5", CLK_PLLCM33_DIV5, CLK_PLLCM33, 1, 5),
-	DEF_DDIV(".pllcm33_div4_pllcm33", CLK_PLLCM33_DIV4_PLLCM33,
+	DEF_DDIV(".pllcm33_gear", CLK_PLLCM33_GEAR,
 		 CLK_PLLCM33_DIV4, CDDIV0_DIVCTL1, dtable_2_64),
 	DEF_FIXED(".pllcm33_div16", CLK_PLLCM33_DIV16, CLK_PLLCM33, 1, 16),
 	DEF_SMUX(".smux2_xspi_clk0", CLK_SMUX2_XSPI_CLK0, SSEL1_SELCTL2, smux2_xspi_clk0),
@@ -189,10 +189,12 @@ static const struct cpg_core_clk r9a09g057_core_clks[] __initconst = {
 		  CLK_PLLETH_DIV_125_FIX, 1, 1),
 	DEF_FIXED("gbeth_1_clk_ptp_ref_i", R9A09G057_GBETH_1_CLK_PTP_REF_I,
 		  CLK_PLLETH_DIV_125_FIX, 1, 1),
+	DEF_FIXED_MOD_STATUS("spi_clk_spi", R9A09G057_SPI_CLK_SPI, CLK_PLLCM33_XSPI, 1, 2,
+			     FIXED_MOD_CONF_XSPI),
 };
 
 static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
-	DEF_MOD("dmac_0_aclk",			CLK_PLLCM33_DIV4_PLLCM33, 0, 0, 0, 0,
+	DEF_MOD("dmac_0_aclk",			CLK_PLLCM33_GEAR, 0, 0, 0, 0,
 						BUS_MSTOP(5, BIT(9))),
 	DEF_MOD("dmac_1_aclk",			CLK_PLLDTY_ACPU_DIV2, 0, 1, 0, 1,
 						BUS_MSTOP(3, BIT(2))),
@@ -258,6 +260,12 @@ static const struct rzv2h_mod_clk r9a09g057_mod_clks[] __initconst = {
 						BUS_MSTOP(1, BIT(7))),
 	DEF_MOD("riic_7_ckm",			CLK_PLLCLN_DIV16, 9, 11, 4, 27,
 						BUS_MSTOP(1, BIT(8))),
+	DEF_MOD("spi_hclk",			CLK_PLLCM33_GEAR, 9, 15, 4, 31,
+						BUS_MSTOP(4, BIT(5))),
+	DEF_MOD("spi_aclk",			CLK_PLLCM33_GEAR, 10, 0, 5, 0,
+						BUS_MSTOP(4, BIT(5))),
+	DEF_MOD("spi_clk_spix2",		CLK_PLLCM33_XSPI, 10, 1, 5, 2,
+						BUS_MSTOP(4, BIT(5))),
 	DEF_MOD("sdhi_0_imclk",			CLK_PLLCLN_DIV8, 10, 3, 5, 3,
 						BUS_MSTOP(8, BIT(2))),
 	DEF_MOD("sdhi_0_imclk2",		CLK_PLLCLN_DIV8, 10, 4, 5, 4,
@@ -380,6 +388,8 @@ static const struct rzv2h_reset r9a09g057_resets[] __initconst = {
 	DEF_RST(9, 14, 4, 15),		/* RIIC_6_MRST */
 	DEF_RST(9, 15, 4, 16),		/* RIIC_7_MRST */
 	DEF_RST(10, 0, 4, 17),		/* RIIC_8_MRST */
+	DEF_RST(10, 3, 4, 20),		/* SPI_HRESETN */
+	DEF_RST(10, 4, 4, 21),		/* SPI_ARESETN */
 	DEF_RST(10, 7, 4, 24),		/* SDHI_0_IXRST */
 	DEF_RST(10, 8, 4, 25),		/* SDHI_1_IXRST */
 	DEF_RST(10, 9, 4, 26),		/* SDHI_2_IXRST */
diff --git a/drivers/clk/renesas/rzv2h-cpg.h b/drivers/clk/renesas/rzv2h-cpg.h
index 34423bd4d3e1..f1fcc2c30ea1 100644
--- a/drivers/clk/renesas/rzv2h-cpg.h
+++ b/drivers/clk/renesas/rzv2h-cpg.h
@@ -149,6 +149,8 @@ struct fixed_mod_conf {
 				 FIELD_PREP_CONST(BUS_MSTOP_BITS_MASK, (mask)))
 #define BUS_MSTOP_NONE		GENMASK(31, 0)
 
+#define FIXED_MOD_CONF_XSPI    FIXED_MOD_CONF_PACK(5, 1)
+
 /**
  * Definitions of CPG Core Clocks
  *
-- 
2.51.0



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

* [PATCH 6.12.y-cip 4/6] dt-bindings: memory: renesas,rzg3e-xspi: Document RZ/V2H(P) and RZ/V2N support
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
                   ` (2 preceding siblings ...)
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 3/6] clk: renesas: r9a09g057: Add XSPI clock/reset Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 5/6] arm64: dts: renesas: r9a09g057: Add XSPI node Ovidiu Panait
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit 93a7aedc4cc4476da54ea45f3ed5308aabafef75 upstream.

Document support for the Expanded Serial Peripheral Interface (xSPI)
controller found on the Renesas RZ/V2H(P) (R9A09G057) and RZ/V2N
(R9A09G056) SoCs.

The xSPI hardware block on these SoCs is functionally identical to the
one on the RZ/G3E (R9A09G047) SoC. Therefore, the existing driver can be
reused without modification by using `renesas,r9a09g047-xspi` as a
fallback compatible.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250624171605.469724-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 .../bindings/memory-controllers/renesas,rzg3e-xspi.yaml  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas,rzg3e-xspi.yaml b/Documentation/devicetree/bindings/memory-controllers/renesas,rzg3e-xspi.yaml
index 2bfe63ec62dc..7a84f5bb7284 100644
--- a/Documentation/devicetree/bindings/memory-controllers/renesas,rzg3e-xspi.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/renesas,rzg3e-xspi.yaml
@@ -23,7 +23,14 @@ allOf:
 
 properties:
   compatible:
-    const: renesas,r9a09g047-xspi  # RZ/G3E
+    oneOf:
+      - const: renesas,r9a09g047-xspi  # RZ/G3E
+
+      - items:
+          - enum:
+              - renesas,r9a09g056-xspi  # RZ/V2N
+              - renesas,r9a09g057-xspi  # RZ/V2H(P)
+          - const: renesas,r9a09g047-xspi
 
   reg:
     items:
-- 
2.51.0



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

* [PATCH 6.12.y-cip 5/6] arm64: dts: renesas: r9a09g057: Add XSPI node
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
                   ` (3 preceding siblings ...)
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 4/6] dt-bindings: memory: renesas,rzg3e-xspi: Document RZ/V2H(P) and RZ/V2N support Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 6/6] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable serial NOR FLASH Ovidiu Panait
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit 7449d4d58da7cf579b4ee6d7cbeef7cabcb4c512 upstream.

Add XSPI node to RZ/V2H(P) ("R9A09G057") SoC DTSI.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250704140823.163572-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 arch/arm64/boot/dts/renesas/r9a09g057.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
index 24a5356f8074..b97828f498d6 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g057.dtsi
@@ -251,6 +251,27 @@ sys: system-controller@10430000 {
 			resets = <&cpg 0x30>;
 		};
 
+		xspi: spi@11030000 {
+			compatible = "renesas,r9a09g057-xspi", "renesas,r9a09g047-xspi";
+			reg = <0 0x11030000 0 0x10000>,
+			      <0 0x20000000 0 0x10000000>;
+			reg-names = "regs", "dirmap";
+			interrupts = <GIC_SPI 228 IRQ_TYPE_EDGE_RISING>,
+				     <GIC_SPI 229 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "pulse", "err_pulse";
+			clocks = <&cpg CPG_MOD 0x9f>,
+				 <&cpg CPG_MOD 0xa0>,
+				 <&cpg CPG_CORE R9A09G057_SPI_CLK_SPI>,
+				 <&cpg CPG_MOD 0xa1>;
+			clock-names = "ahb", "axi", "spi", "spix2";
+			resets = <&cpg 0xa3>, <&cpg 0xa4>;
+			reset-names = "hresetn", "aresetn";
+			power-domains = <&cpg>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		ostm0: timer@11800000 {
 			compatible = "renesas,r9a09g057-ostm", "renesas,ostm";
 			reg = <0x0 0x11800000 0x0 0x1000>;
-- 
2.51.0



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

* [PATCH 6.12.y-cip 6/6] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable serial NOR FLASH
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
                   ` (4 preceding siblings ...)
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 5/6] arm64: dts: renesas: r9a09g057: Add XSPI node Ovidiu Panait
@ 2025-11-21  8:07 ` Ovidiu Panait
  2025-11-21 10:11 ` [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Pavel Machek
  2025-11-22  9:01 ` Pavel Machek
  7 siblings, 0 replies; 9+ messages in thread
From: Ovidiu Panait @ 2025-11-21  8:07 UTC (permalink / raw)
  To: cip-dev, pavel, nobuhiro.iwamatsu.x90

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

commit 145a2a9e27562926c592645a05d682fe8e1f82e9 upstream.

Enable MT25QU512ABB8E12 FLASH connected to XSPI.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250704140823.163572-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
 .../dts/renesas/r9a09g057h44-rzv2h-evk.dts    | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts
index 81b9bcbd440b..3a413837c58f 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g057h44-rzv2h-evk.dts
@@ -340,6 +340,18 @@ vbus {
 			pinmux = <RZV2H_PORT_PINMUX(6, 6, 14)>; /* VBUS */
 		};
 	};
+
+	xspi_pins: xspi0 {
+		ctrl {
+			pins = "XSPI0_RESET0N", "XSPI0_CS0N", "XSPI0_CKP";
+			output-enable;
+		};
+
+		io {
+			pins = "XSPI0_IO0", "XSPI0_IO1", "XSPI0_IO2", "XSPI0_IO3";
+			renesas,output-impedance = <3>;
+		};
+	};
 };
 
 &qextal_clk {
@@ -394,3 +406,46 @@ &usb2_phy1 {
 &wdt1 {
 	status = "okay";
 };
+
+&xspi {
+	pinctrl-0 = <&xspi_pins>;
+	pinctrl-names = "default";
+	/*
+	 * MT25QU512ABB8E12 flash chip is capable of running at 166MHz
+	 * clock frequency. Set the clock frequency to the maximum 133MHz
+	 * supported by the RZ/V2H SoC.
+	 */
+	assigned-clocks = <&cpg CPG_CORE R9A09G057_SPI_CLK_SPI>;
+	assigned-clock-rates = <133333334>;
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		vcc-supply = <&reg_1p8v>;
+		m25p,fast-read;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "bl2";
+				reg = <0x00000000 0x00060000>;
+			};
+
+			partition@60000 {
+				label = "fip";
+				reg = <0x00060000 0x1fa0000>;
+			};
+
+			partition@2000000 {
+				label = "user";
+				reg = <0x2000000 0x2000000>;
+			};
+		};
+	};
+};
-- 
2.51.0



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

* Re: [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
                   ` (5 preceding siblings ...)
  2025-11-21  8:07 ` [PATCH 6.12.y-cip 6/6] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable serial NOR FLASH Ovidiu Panait
@ 2025-11-21 10:11 ` Pavel Machek
  2025-11-22  9:01 ` Pavel Machek
  7 siblings, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2025-11-21 10:11 UTC (permalink / raw)
  To: Ovidiu Panait; +Cc: cip-dev, nobuhiro.iwamatsu.x90

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

Hi!

> This series adds XSPI support for the Renesas RZ/V2H SoC and enables the
> MT25QU512ABB8E12 flash device used on the RZ/V2H EVK board.
> 
> Patches were cherry-picked from mainline kernel.

This looks okay to me, I can apply it if there are no other comments
and it passes testing.

Best regards,
                                                                Pavel
-- 
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich,
Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

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

* Re: [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support
  2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
                   ` (6 preceding siblings ...)
  2025-11-21 10:11 ` [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Pavel Machek
@ 2025-11-22  9:01 ` Pavel Machek
  7 siblings, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2025-11-22  9:01 UTC (permalink / raw)
  To: Ovidiu Panait; +Cc: cip-dev, nobuhiro.iwamatsu.x90

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

Hi!

> This series adds XSPI support for the Renesas RZ/V2H SoC and enables the
> MT25QU512ABB8E12 flash device used on the RZ/V2H EVK board.
> 
> Patches were cherry-picked from mainline kernel.

Thank you, applied, along with "Add RZ/V2H USB2.0 support" series.

Best regards,
								Pavel
-- 
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich,
Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

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

end of thread, other threads:[~2025-11-22  9:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  8:07 [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 1/6] dt-bindings: clock: renesas,r9a09g056/57-cpg: Add XSPI core clock Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 2/6] clk: renesas: r9a09g057: Add support for xspi mux and divider Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 3/6] clk: renesas: r9a09g057: Add XSPI clock/reset Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 4/6] dt-bindings: memory: renesas,rzg3e-xspi: Document RZ/V2H(P) and RZ/V2N support Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 5/6] arm64: dts: renesas: r9a09g057: Add XSPI node Ovidiu Panait
2025-11-21  8:07 ` [PATCH 6.12.y-cip 6/6] arm64: dts: renesas: r9a09g057h44-rzv2h-evk: Enable serial NOR FLASH Ovidiu Panait
2025-11-21 10:11 ` [PATCH 6.12.y-cip 0/6] Add RZ/V2H XSPI support Pavel Machek
2025-11-22  9:01 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox