public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] ARM: dts: renesas: r9a06g032-rzn1d400-db: add QSPI node including NOR flash
@ 2026-01-16 11:48 Wolfram Sang
  2026-01-16 16:08 ` Miquel Raynal
  2026-01-19 16:40 ` Geert Uytterhoeven
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2026-01-16 11:48 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Miquel Raynal, Wolfram Sang, Geert Uytterhoeven, Magnus Damm,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree

Enable the QSPI controller to access the connected SPI NOR flash. The
NOR datasheet may suggest faster tuning parameters but those did not
work on my board.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Depends on the series "[PATCH v2 00/13] spi: cadence-qspi: Add Renesas
RZ/N1 support". As this is still under discussion, this patch is RFC
only.

The tuning values used came from Miquel and work here as well. An
interested party may try to tune this further but I will go the safe
route here.

The partitioning comes from the BSP. Using these partitions, I actually
discovered previous kernels and DTBs from the previous owner of the
board :)

Thanks and happy hacking, everyone!

 .../dts/renesas/r9a06g032-rzn1d400-db.dts     | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
index 4a72aa7663f2..0e23aa8aa55b 100644
--- a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
+++ b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
@@ -300,6 +300,84 @@ pins_mdio1: pins_mdio1 {
 		pinmux = <RZN1_PINMUX(152, RZN1_FUNC_MDIO1_SWITCH)>,
 			 <RZN1_PINMUX(153, RZN1_FUNC_MDIO1_SWITCH)>;
 	};
+
+	pins_qspi0: pins_qspi0 {
+		pinmux = <RZN1_PINMUX(74, RZN1_FUNC_QSPI)>,
+			 <RZN1_PINMUX(75, RZN1_FUNC_QSPI)>,
+			 <RZN1_PINMUX(76, RZN1_FUNC_QSPI)>,
+			 <RZN1_PINMUX(77, RZN1_FUNC_QSPI)>,
+			 <RZN1_PINMUX(78, RZN1_FUNC_QSPI)>,
+			 <RZN1_PINMUX(79, RZN1_FUNC_QSPI)>;
+		bias-disable;
+	};
+};
+
+&qspi0 {
+	pinctrl-0 = <&pins_qspi0>;
+	pinctrl-names = "default";
+	status = "okay";
+	bootph-all;
+
+	flash@0 {
+		reg = <0>;
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <62500000>;
+		spi-rx-bus-width = <4>;
+		spi-tx-bus-width = <4>;
+		cdns,read-delay = <1>;
+		cdns,tshsl-ns = <200>;
+		cdns,tsd2d-ns = <255>;
+		cdns,tchsh-ns = <20>;
+		cdns,tslch-ns = <20>;
+		bootph-all;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				/* 64KB */
+				label = "qspi0:spl";
+				reg = <0x0000000 0x00010000>;
+			};
+			partition@1 {
+				/* 64KB */
+				label = "qspi0:pkgt";
+				reg = <0x0010000 0x00010000>;
+			};
+			partition@2 {
+				/* 512KB */
+				label = "qspi0:u-boot";
+				reg = <0x0020000 0x00080000>;
+			};
+			partition@3 {
+				/* 64KB */
+				label = "qspi0:env";
+				reg = <0x00a0000 0x00010000>;
+			};
+			partition@4 {
+				/* 128KB */
+				label = "qspi0:dtb";
+				reg = <0x00b0000 0x00020000>;
+			};
+			partition@5 {
+				/* 1MB */
+				label = "qspi0:cm3";
+				reg = <0x00d0000 0x00100000>;
+			};
+			partition@6 {
+				/* 6MB */
+				label = "qspi0:kernel";
+				reg = <0x01d0000 0x00600000>;
+			};
+			partition@7 {
+				/* Remaining */
+				label = "qspi0:data";
+				reg = <0x07d0000 0>;
+			};
+		};
+	};
 };
 
 &rtc0 {
-- 
2.47.3


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

end of thread, other threads:[~2026-01-19 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 11:48 [RFC PATCH] ARM: dts: renesas: r9a06g032-rzn1d400-db: add QSPI node including NOR flash Wolfram Sang
2026-01-16 16:08 ` Miquel Raynal
2026-01-18  8:58   ` Wolfram Sang
2026-01-19 16:40 ` Geert Uytterhoeven

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