[PATCH 4/6] ARM: dts: renesas: genmai: add rpc-if SPI NOR flash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Magnus Damm <damm@xxxxxxxxxxxxx>

Add genmai board support code to make use of one of the on-chip rpc-if devices
to interface to the on-board SPI flash U6 Spansion S25FK512S-16. Without this
patch the SPI flash is accessible through a memory mapped window, however by
adding pinctrl configuration and a rpc-if device node to the DTS we can now
access the SPI flash via the the rpc-if driver instead.

Signed-off-by: Magnus Damm <damm@xxxxxxxxxxxxx>
---

 Applies to next-20250704

 arch/arm/boot/dts/renesas/r7s72100-genmai.dts |   71 ++++++++++++++-----------
 1 file changed, 42 insertions(+), 29 deletions(-)

--- 0001/arch/arm/boot/dts/renesas/r7s72100-genmai.dts
+++ work/arch/arm/boot/dts/renesas/r7s72100-genmai.dts	2025-07-06 00:02:33.267119292 +0900
@@ -18,6 +18,7 @@
 
 	aliases {
 		serial0 = &scif2;
+		spi0 = &rpc0;
 	};
 
 	chosen {
@@ -25,35 +26,6 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	flash@18000000 {
-		compatible = "mtd-rom";
-		reg = <0x18000000 0x08000000>;
-		bank-width = <4>;
-		device-width = <1>;
-
-		clocks = <&mstp9_clks R7S72100_CLK_SPIBSC0>;
-		power-domains = <&cpg_clocks>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition@0 {
-				label = "user";
-				reg = <0x00000000 0x04000000>;
-			};
-
-			partition@4000000 {
-				label = "user1";
-				reg = <0x04000000 0x04000000>;
-			};
-		};
-	};
-
 	keyboard {
 		compatible = "gpio-keys";
 
@@ -98,6 +70,38 @@
 	};
 };
 
+&rpc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rpc0_pins>;
+
+	status = "okay";
+
+	flash0: spi-flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <1>;
+		reg = <0>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x00000000 0x00080000>;
+			};
+			partition@80000 {
+				label = "uboot-env";
+				reg = <0x00080000 0x00040000>;
+			};
+		};
+	};
+};
+
 &bsc {
 	flash@0 {
 		compatible = "cfi-flash";
@@ -273,6 +277,15 @@
 			 <RZA1_PINMUX(4, 14, 3)>,	/* SD_D3_0 */
 			 <RZA1_PINMUX(4, 15, 3)>;	/* SD_D2_0 */
 	};
+
+	rpc0_pins: rpc0 {
+		pinmux = <RZA1_PINMUX(9, 2, 2)>,	/* P9_2/SPBCLK_0 */
+			 <RZA1_PINMUX(9, 3, 2)>,	/* P9_3/SPBSSL_0 */
+			 <RZA1_PINMUX(9, 4, 2)>,	/* P9_4/SPBIO00_0 */
+			 <RZA1_PINMUX(9, 5, 2)>,	/* P9_5/SPBIO10_0 */
+			 <RZA1_PINMUX(9, 6, 2)>,	/* P9_6/SPBIO20_0 */
+			 <RZA1_PINMUX(9, 7, 2)>;	/* P9_7/SPBIO30_0 */
+	};
 };
 
 &rtc_x1_clk {




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux