Skip to contentSkip to conversation

arm64: dts: renesas: r8a779g0/white-hawk: Add RPC and QSPI FLASH support

PATCH In review Geert Uytterhoeven 3 participants 8 messages Oct 12, 2022 – Oct 13, 2022

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover arm64: dts: renesas: r8a779g0/white-hawk: Add RPC and QSPI FLASH support

Hi all,

This patch series adds SPI Multi I/O Bus Controller (RPC-IF) support for the R-Car V4H SoC, and QSPI FLASH support for the White Hawk board.

I plan to queue these in renesas-devel for v6.2.
Thanks for your comments!

Hai Pham (2):
arm64: dts: renesas: r8a779g0: Add RPC node
arm64: dts: renesas: white-hawk-cpu: Add QSPI FLASH support

 .../dts/renesas/r8a779g0-white-hawk-cpu.dtsi  | 33 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi     | 16 +++++++++
 2 files changed, 49 insertions(+)
Signature · 12 lines
2.25.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 arm64: dts: renesas: r8a779g0: Add RPC node

From: Hai Pham <[email protected]>

Add a device node for the SPI Multi I/O Bus Controller (RPC-IF) on the Renesas R-Car V4H (R8A779G0) SoC.

---
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +16 -0
index 33d9df39a9cc7149..8141ffc38a08301d 100644
@@ -921,6 +921,22 @@ mmc0: mmc@ee140000 {
 			status = "disabled";
 		};
 
+		rpc: spi@ee200000 {
+			compatible = "renesas,r8a779g0-rpc-if",
+				     "renesas,rcar-gen4-rpc-if";
+			reg = <0 0xee200000 0 0x200>,
+			      <0 0x08000000 0 0x04000000>,
+			      <0 0xee208000 0 0x100>;
+			reg-names = "regs", "dirmap", "wbuf";
+			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 629>;
+			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+			resets = <&cpg 629>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		gic: interrupt-controller@f1000000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <3>;
Signature · 1 line
2.25.1
author maintainer
#3 lore raw

PATCH 2/2 arm64: dts: renesas: white-hawk-cpu: Add QSPI FLASH support

In reply to Geert Uytterhoeven

From: Hai Pham <[email protected]>

Describe the QSPI FLASH on the White Hawk CPU board.

---
 .../dts/renesas/r8a779g0-white-hawk-cpu.dtsi  | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi +33 -0
index b306e5a10794dfb5..bb4dd08781ca275d 100644
@@ -232,12 +232,45 @@ mmc_pins: mmc {
 		power-source = <1800>;
 	};
 
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+
 	scif_clk_pins: scif_clk {
 		groups = "scif_clk";
 		function = "scif_clk";
 	};
 };
 
+&rpc {
+	pinctrl-0 = <&qspi0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	flash@0 {
+		compatible = "spansion,s25fs512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			boot@0 {
+				reg = <0x0 0x1200000>;
+				read-only;
+			};
+			user@1200000 {
+				reg = <0x1200000 0x2e00000>;
+			};
+		};
+	};
+};
+
 &scif_clk {
 	clock-frequency = <24000000>;
 };
Signature · 1 line
2.25.1
#5 lore raw

Re: [PATCH 2/2] arm64: dts: renesas: white-hawk-cpu: Add QSPI FLASH support

Hi Wolfram,

Quoted 9 lines · Wolfram Sang
Quoted 6 lines · Geert Uytterhoeven

From: Hai Pham <[email protected]>

Describe the QSPI FLASH on the White Hawk CPU board.

Looks good, but I can't really review the partition sizes. However,

Actually I just kept the partition sizes from the BSP.
As the second partition on my board is still empty, all I could verify is that the first partition is sufficiently large to hold the boot loader (ca. 9 MiB). Note that the boot partition on Falcon is smaller.

Quoted 1 line

Geert is very good and careful with hex values :)

"i" (from iprint) is your friend...

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

#6 lore raw
In reply to Geert Uytterhoeven

Hi Geert,

Quoted 2 lines

This patch series adds SPI Multi I/O Bus Controller (RPC-IF) support for the R-Car V4H SoC, and QSPI FLASH support for the White Hawk board.

Did you need to alter the firmware to access it, or did it work out of the box?

Happy hacking,

Wolfram

#7 lore raw

Hi Wolfram,

Quoted 5 lines · Wolfram Sang
Quoted 2 lines

This patch series adds SPI Multi I/O Bus Controller (RPC-IF) support for the R-Car V4H SoC, and QSPI FLASH support for the White Hawk board.

Did you need to alter the firmware to access it, or did it work out of the box?

It worked out of the box.
Note that the initial firmware that was on the board was newer, but that was lost by installing a firmware stack that did include U-Boot.

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