[PATCH/RFC 12/13] ARM: dts: renesas: marzen: Add FLASH node

Geert Uytterhoeven geert+renesas at glider.be
Thu Aug 31 04:52:34 PDT 2023


Add a device node for the Spansion S29GL512N NOR FLASH on the Marzen
development board.  This FLASH resides in the external address space of
the Local Bus State Controller.

Note that as the CFI-FLASH has a run-time conflict with CPU bring-up, it
will only be available when booting with SMP disabled.

Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
---
Changes compared to RFC:
  - Use "cfi-flash" compatible value,
  - Add pin control,
  - Move to LBSC,
  - Depends on "[PATCH] ARM: shmobile: r8a7779: Reserve boot area when
    SMP is enabled".

[1] "[PATCH/RFC] ARM: dts: marzen: Add FLASH node"
    https://lore.kernel.org/r/07cf5e2b466f3ba217403afc66a8246460609e09.1679330105.git.geert+renesas@glider.be/
---
 arch/arm/boot/dts/renesas/r8a7779-marzen.dts | 34 ++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/renesas/r8a7779-marzen.dts b/arch/arm/boot/dts/renesas/r8a7779-marzen.dts
index 9c001cbfc02f79f7..dfc6d63a21cd5474 100644
--- a/arch/arm/boot/dts/renesas/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/renesas/r8a7779-marzen.dts
@@ -229,6 +229,35 @@ &extal_clk {
 };
 
 &lbsc {
+	flash at 0 {
+		compatible = "cfi-flash";
+		reg = <0x0 0x04000000>;
+		pinctrl-0 = <&flash_pins>;
+		pinctrl-names = "default";
+		bank-width = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "uboot";
+				reg = <0x00000000 0x00040000>;
+				read-only;
+			};
+			partition at 40000 {
+				label = "uboot-env";
+				reg = <0x00040000 0x00040000>;
+				read-only;
+			};
+			partition at 80000 {
+				label = "flash";
+				reg = <0x00080000 0x03f80000>;
+			};
+		};
+	};
+
 	ethernet at 18000000 {
 		compatible = "smsc,lan89218", "smsc,lan9115";
 		reg = <0x18000000 0x100>;
@@ -288,6 +317,11 @@ lbsc {
 		};
 	};
 
+	flash_pins: flash {
+		groups = "lbsc_cs0";
+		function = "lbsc";
+	};
+
 	scif2_pins: scif2 {
 		groups = "scif2_data_c";
 		function = "scif2";
-- 
2.34.1




More information about the linux-arm-kernel mailing list