Skip to contentSkip to conversation

ARM: dts: renesas: LBSC and FLASH improvements

PATCH In review Geert Uytterhoeven 2 participants 15 messages Aug 31, 2023 – Sep 25, 2023

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover ARM: dts: renesas: LBSC and FLASH improvements

Hi all,

This patch series adds support for various FLASH devices on the Blanche, Genmai, Marzen, and RSK+RZA1 development boards. As several of these FLASH devices reside in the external address space of a (Local) Bus State Controller, the current (too) minimal support for (L)BSC is improved first. All of this is preceded by two small fixes.

As FLASH on Blanche and Marzen conflicts with SMP, the last two patches depend on [1], so I marked them RFC.

This has been tested on the APE6-EVM, Blanche, Genmai, Marzen, and RSK+RZA1 development boards.

Thanks for your comments!

[1] "[PATCH/RFC 0/4] ARM: shmobile: Reserve boot area when SMP is

     enabled"
    https://lore.kernel.org/all/[email protected]

Geert Uytterhoeven (13):
ARM: dts: renesas: ape6evm: Drop bogus "mtd-rom" compatible value
ARM: dts: renesas: gr-peach: Remove unneeded probe-type property
ARM: dts: renesas: Remove unused LBSC nodes from board DTS
ARM: dts: renesas: r7s72100: Add BSC node
ARM: dts: renesas: r8a7779: Add LBSC node
ARM: dts: renesas: r8a7792: Add LBSC node
ARM: dts: renesas: marzen: Move Ethernet node to LBSC
ARM: dts: renesas: blanche: Move Ethernet node to LBSC
ARM: dts: renesas: wheat: Move Ethernet node to LBSC
ARM: dts: renesas: genmai: Add FLASH nodes
ARM: dts: renesas: rskrza1: Add FLASH nodes
ARM: dts: renesas: marzen: Add FLASH node
ARM: dts: renesas: blanche: Add FLASH node

 arch/arm/boot/dts/renesas/r7s72100-genmai.dts | 82 ++++++++++++++++++-
 .../boot/dts/renesas/r7s72100-gr-peach.dts    |  6 --
 .../arm/boot/dts/renesas/r7s72100-rskrza1.dts | 71 ++++++++++++++--
 arch/arm/boot/dts/renesas/r7s72100.dtsi       |  7 ++
 .../arm/boot/dts/renesas/r7s9210-rza2mevb.dts |  5 --
 arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dts |  2 +-
 arch/arm/boot/dts/renesas/r8a7779-marzen.dts  | 66 +++++++++++----
 arch/arm/boot/dts/renesas/r8a7779.dtsi        |  7 ++
 arch/arm/boot/dts/renesas/r8a7790-lager.dts   |  5 --
 arch/arm/boot/dts/renesas/r8a7791-koelsch.dts |  5 --
 arch/arm/boot/dts/renesas/r8a7792-blanche.dts | 66 +++++++++++----
 arch/arm/boot/dts/renesas/r8a7792-wheat.dts   | 34 ++++----
 arch/arm/boot/dts/renesas/r8a7792.dtsi        |  7 ++
 arch/arm/boot/dts/renesas/r8a7794-alt.dts     |  5 --
 14 files changed, 289 insertions(+), 79 deletions(-)
Signature · 12 lines
2.34.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/13 ARM: dts: renesas: ape6evm: Drop bogus "mtd-rom" compatible value

make dtbs_check:

arch/arm/boot/dts/r8a73a4-ape6evm.dtb: flash@0: compatible: 'oneOf' conditional failed, one must be fixed:
['cfi-flash', 'mtd-rom'] is too long
'cfi-flash' is not one of ['amd,s29gl01gp', 'amd,s29gl032a', 'amd,s29gl256n', 'amd,s29gl512n', 'arm,versatile-flash', 'arm,vexpress-flash', 'cortina,gemini-flash', 'cypress,hyperflash', 'ge,imp3a-firmware-mirror', 'ge,imp3a-paged-flash', 'gef,ppc9a-firmware-mirror', 'gef,ppc9a-paged-flash', 'gef,sbc310-firmware-mirror', 'gef,sbc310-paged-flash', 'gef,sbc610-firmware-mirror', 'gef,sbc610-paged-flash', 'intel,28f128j3', 'intel,dt28f160', 'intel,ixp4xx-flash', 'intel,JS28F128', 'intel,JS28F640', 'intel,PC28F640P30T85', 'numonyx,js28f00a', 'numonyx,js28f128', 'sst,sst39vf320', 'xlnx,xps-mch-emc-2.00.a'] 'cfi-flash' is not one of ['cypress,cy7c1019dv33-10zsxi', 'arm,vexpress-psram']
'mtd-rom' is not one of ['cfi-flash', 'jedec-flash']
'mtd-ram' was expected
From schema: Documentation/devicetree/bindings/mtd/mtd-physmap.yaml

---
 arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/renesas/r8a73a4-ape6evm.dts +1 -1
index 91b27258be36ff45..de87f2682e323866 100644
@@ -178,7 +178,7 @@ &cpu0 {
 
 &bsc {
 	flash@0 {
-		compatible = "cfi-flash", "mtd-rom";
+		compatible = "cfi-flash";
 		reg = <0x0 0x08000000>;
 		bank-width = <2>;
 
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/13 ARM: dts: renesas: gr-peach: Remove unneeded probe-type property

In reply to Geert Uytterhoeven

The "probe-type" property was only needed when used with the (long obsolete) "direct-mapped" compatible value.

---
 arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts +0 -1
index 105f9c71f9fd54f4..dc05eaf391f8e069 100644
@@ -36,7 +36,6 @@ lbsc {
 
 	flash@18000000 {
 		compatible = "mtd-rom";
-		probe-type = "map_rom";
 		reg = <0x18000000 0x00800000>;
 		bank-width = <4>;
 		device-width = <1>;
Signature · 1 line
2.34.1
author maintainer
#3 lore raw

PATCH 3/13 ARM: dts: renesas: Remove unused LBSC nodes from board DTS

In reply to Geert Uytterhoeven

Several board DTS files contain minimal device nodes that represent on-SoC Local Bus State Controllers (LBSC), although they belong in the SoC-specific DTS files instead. As these device nodes are incomplete and unused, and hamper adding proper nodes later, it is better to just remove them.

---
 arch/arm/boot/dts/renesas/r7s72100-genmai.dts   | 5 -----
 arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts | 5 -----
 arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts  | 5 -----
 arch/arm/boot/dts/renesas/r7s9210-rza2mevb.dts  | 5 -----
 arch/arm/boot/dts/renesas/r8a7790-lager.dts     | 5 -----
 arch/arm/boot/dts/renesas/r8a7791-koelsch.dts   | 5 -----
 arch/arm/boot/dts/renesas/r8a7794-alt.dts       | 5 -----
 7 files changed, 35 deletions(-)
arch/arm/boot/dts/renesas/r7s72100-genmai.dts +0 -5
index 1e8447176b1051f3..ee52c6d5349d0046 100644
@@ -29,11 +29,6 @@ memory@8000000 {
 		reg = <0x08000000 0x08000000>;
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	leds {
 		status = "okay";
 		compatible = "gpio-leds";
arch/arm/boot/dts/renesas/r7s72100-gr-peach.dts +0 -5
index dc05eaf391f8e069..9d29861f23f1d964 100644
@@ -29,11 +29,6 @@ memory@20000000 {
 		reg = <0x20000000 0x00a00000>;
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	flash@18000000 {
 		compatible = "mtd-rom";
 		reg = <0x18000000 0x00800000>;
arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts +0 -5
index 9bfa7d8e2888b9ee..e95b820e401663eb 100644
@@ -60,11 +60,6 @@ key-3 {
 		};
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
arch/arm/boot/dts/renesas/r7s9210-rza2mevb.dts +0 -5
index 69a5a44b8a2fdd74..cd2324b8e8ffbddf 100644
@@ -63,11 +63,6 @@ key-3 {
 		};
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
arch/arm/boot/dts/renesas/r8a7790-lager.dts +0 -5
index 5ad5349a50dc9b26..4d666ad8b114b33b 100644
@@ -73,11 +73,6 @@ memory@140000000 {
 		reg = <1 0x40000000 0 0xc0000000>;
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	keyboard {
 		compatible = "gpio-keys";
 
arch/arm/boot/dts/renesas/r8a7791-koelsch.dts +0 -5
index 26a40782cc899bd0..545515b41ea3fae1 100644
@@ -73,11 +73,6 @@ memory@200000000 {
 		reg = <2 0x00000000 0 0x40000000>;
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	keyboard {
 		compatible = "gpio-keys";
 
arch/arm/boot/dts/renesas/r8a7794-alt.dts +0 -5
index 4d93319674c6efcf..08df031bc27c9e03 100644
@@ -90,11 +90,6 @@ vccq_sdhi1: regulator-vccq-sdhi1 {
 		states = <3300000 1>, <1800000 0>;
 	};
 
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
 	keyboard {
 		compatible = "gpio-keys";
 
Signature · 1 line
2.34.1
author maintainer
#4 lore raw

PATCH 4/13 ARM: dts: renesas: r7s72100: Add BSC node

In reply to Geert Uytterhoeven

Add a minimal device node for the Bus State Controller (BSC) on the RZ/A1H SoC, to be extended by board DTS files for devices residing in the BSC external address space.

---
 arch/arm/boot/dts/renesas/r7s72100.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/renesas/r7s72100.dtsi +7 -0
index b07b71307f24ad59..e6d8da6faffb5576 100644
@@ -36,6 +36,13 @@ b_clk: b {
 		clock-div = <3>;
 	};
 
+	bsc: bsc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0x18000000>;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
Signature · 1 line
2.34.1
author maintainer
#5 lore raw

PATCH 5/13 ARM: dts: renesas: r8a7779: Add LBSC node

In reply to Geert Uytterhoeven

Add a minimal device node for the Local Bus State Controller (LBSC) on the R-Car H1 SoC, to be extended by board DTS files for devices residing in the LBSC external address space.

---
 arch/arm/boot/dts/renesas/r8a7779.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/renesas/r8a7779.dtsi +7 -0
index bba0c6d2386cd042..eaed2ae339383b34 100644
@@ -706,6 +706,13 @@ R8A7779_CLK_MMC1 R8A7779_CLK_MMC0
 		};
 	};
 
+	lbsc: lbsc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0x1c000000>;
+	};
+
 	prr: chipid@ff000044 {
 		compatible = "renesas,prr";
 		reg = <0xff000044 4>;
Signature · 1 line
2.34.1
author maintainer
#6 lore raw

PATCH 6/13 ARM: dts: renesas: r8a7792: Add LBSC node

In reply to Geert Uytterhoeven

Add a minimal device node for the Local Bus State Controller (LBSC) on the R-Car V2H SoC, to be extended by board DTS files for devices residing in the LBSC external address space.

---
 arch/arm/boot/dts/renesas/r8a7792.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/renesas/r8a7792.dtsi +7 -0
index a6d9367f8fa047be..ecfab3ff59e843ff 100644
@@ -84,6 +84,13 @@ extal_clk: extal {
 		clock-frequency = <0>;
 	};
 
+	lbsc: lbsc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0x1c000000>;
+	};
+
 	pmu {
 		compatible = "arm,cortex-a15-pmu";
 		interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.34.1
author maintainer
#7 lore raw

PATCH 7/13 ARM: dts: renesas: marzen: Move Ethernet node to LBSC

In reply to Geert Uytterhoeven

The SMSC LAN89218AQ Ethernet controller on the Marzen development board resides in the external address space of the Local Bus State Controller (LBSC). Move the Ethernet device node to reflect this.

---
 arch/arm/boot/dts/renesas/r8a7779-marzen.dts | 32 +++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)
arch/arm/boot/dts/renesas/r8a7779-marzen.dts +17 -15
index 50a468c8018351df..9c001cbfc02f79f7 100644
@@ -52,21 +52,6 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
 		states = <3300000 1>, <1800000 0>;
 	};
 
-	ethernet@18000000 {
-		compatible = "smsc,lan89218", "smsc,lan9115";
-		reg = <0x18000000 0x100>;
-		pinctrl-0 = <&ethernet_pins>;
-		pinctrl-names = "default";
-
-		phy-mode = "mii";
-		interrupt-parent = <&irqpin0>;
-		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-		smsc,irq-push-pull;
-		reg-io-width = <4>;
-		vddvario-supply = <&fixedregulator3v3>;
-		vdd33a-supply = <&fixedregulator3v3>;
-	};
-
 	keyboard-irq {
 		compatible = "gpio-keys";
 
@@ -229,6 +214,23 @@ &extal_clk {
 	clock-frequency = <31250000>;
 };
 
+&lbsc {
+	ethernet@18000000 {
+		compatible = "smsc,lan89218", "smsc,lan9115";
+		reg = <0x18000000 0x100>;
+		pinctrl-0 = <&ethernet_pins>;
+		pinctrl-names = "default";
+
+		phy-mode = "mii";
+		interrupt-parent = <&irqpin0>;
+		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+		smsc,irq-push-pull;
+		reg-io-width = <4>;
+		vddvario-supply = <&fixedregulator3v3>;
+		vdd33a-supply = <&fixedregulator3v3>;
+	};
+};
+
 &tmu0 {
 	status = "okay";
 };
Signature · 1 line
2.34.1
author maintainer
#8 lore raw

PATCH 8/13 ARM: dts: renesas: blanche: Move Ethernet node to LBSC

In reply to Geert Uytterhoeven

The SMSC LAN89218AQ Ethernet controller on the Blanche development board resides in the external address space of the Local Bus State Controller (LBSC). Move the Ethernet device node to reflect this.

---
 arch/arm/boot/dts/renesas/r8a7792-blanche.dts | 32 ++++++++++---------
 1 file changed, 17 insertions(+), 15 deletions(-)
arch/arm/boot/dts/renesas/r8a7792-blanche.dts +17 -15
index 6a83923aa4612e71..e793134f32a3020a 100644
@@ -39,21 +39,6 @@ d3_3v: regulator-3v3 {
 		regulator-always-on;
 	};
 
-	ethernet@18000000 {
-		compatible = "smsc,lan89218", "smsc,lan9115";
-		reg = <0 0x18000000 0 0x100>;
-		phy-mode = "mii";
-		interrupt-parent = <&irqc>;
-		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
-		smsc,irq-push-pull;
-		reg-io-width = <4>;
-		vddvario-supply = <&d3_3v>;
-		vdd33a-supply = <&d3_3v>;
-
-		pinctrl-0 = <&lan89218_pins>;
-		pinctrl-names = "default";
-	};
-
 	vga-encoder {
 		compatible = "adi,adv7123";
 
@@ -196,6 +181,23 @@ &can_clk {
 	clock-frequency = <48000000>;
 };
 
+&lbsc {
+	ethernet@18000000 {
+		compatible = "smsc,lan89218", "smsc,lan9115";
+		reg = <0x18000000 0x100>;
+		phy-mode = "mii";
+		interrupt-parent = <&irqc>;
+		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+		smsc,irq-push-pull;
+		reg-io-width = <4>;
+		vddvario-supply = <&d3_3v>;
+		vdd33a-supply = <&d3_3v>;
+
+		pinctrl-0 = <&lan89218_pins>;
+		pinctrl-names = "default";
+	};
+};
+
 &pfc {
 	scif0_pins: scif0 {
 		groups = "scif0_data";
Signature · 1 line
2.34.1
author maintainer
#9 lore raw

PATCH 9/13 ARM: dts: renesas: wheat: Move Ethernet node to LBSC

In reply to Geert Uytterhoeven

The SMSC LAN89218AQ Ethernet controller on the Wheat development board resides in the external address space of the Local Bus State Controller (LBSC). Move the Ethernet device node to reflect this.

---
 arch/arm/boot/dts/renesas/r8a7792-wheat.dts | 34 +++++++++++----------
 1 file changed, 18 insertions(+), 16 deletions(-)
arch/arm/boot/dts/renesas/r8a7792-wheat.dts +18 -16
index 434e4655be9daff7..f87e78fe3f6e6aec 100644
@@ -38,22 +38,6 @@ d3_3v: regulator-3v3 {
 		regulator-always-on;
 	};
 
-	ethernet@18000000 {
-		compatible = "smsc,lan89218", "smsc,lan9115";
-		reg = <0 0x18000000 0 0x100>;
-		phy-mode = "mii";
-		interrupt-parent = <&irqc>;
-		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
-		smsc,irq-push-pull;
-		smsc,save-mac-address;
-		reg-io-width = <4>;
-		vddvario-supply = <&d3_3v>;
-		vdd33a-supply = <&d3_3v>;
-
-		pinctrl-0 = <&lan89218_pins>;
-		pinctrl-names = "default";
-	};
-
 	keyboard {
 		compatible = "gpio-keys";
 
@@ -117,6 +101,24 @@ &extal_clk {
 	clock-frequency = <20000000>;
 };
 
+&lbsc {
+	ethernet@18000000 {
+		compatible = "smsc,lan89218", "smsc,lan9115";
+		reg = <0x18000000 0x100>;
+		phy-mode = "mii";
+		interrupt-parent = <&irqc>;
+		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+		smsc,irq-push-pull;
+		smsc,save-mac-address;
+		reg-io-width = <4>;
+		vddvario-supply = <&d3_3v>;
+		vdd33a-supply = <&d3_3v>;
+
+		pinctrl-0 = <&lan89218_pins>;
+		pinctrl-names = "default";
+	};
+};
+
 &pfc {
 	scif0_pins: scif0 {
 		groups = "scif0_data";
Signature · 1 line
2.34.1
author maintainer
#10 lore raw

PATCH 10/13 ARM: dts: renesas: genmai: Add FLASH nodes

In reply to Geert Uytterhoeven

Add device nodes for the two Spansion S29GL512S NOR FLASHes and the dual Spansion S25FL512S QSPI NOR FLASH on the Genmai development board. The former reside in the address space of the Bus State Controller (BSC). The latter is mapped directly through the SPI Multi I/O Bus Controller.

---
 arch/arm/boot/dts/renesas/r7s72100-genmai.dts | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)
arch/arm/boot/dts/renesas/r7s72100-genmai.dts +85 -0
index ee52c6d5349d0046..29ba098f5dd5e86b 100644
@@ -29,6 +29,35 @@ memory@8000000 {
 		reg = <0x08000000 0x08000000>;
 	};
 
+	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 0x40000000>;
+			};
+		};
+	};
+
 	leds {
 		status = "okay";
 		compatible = "gpio-leds";
@@ -82,6 +111,62 @@ &extal_clk {
 	clock-frequency = <13330000>;
 };
 
+&bsc {
+	flash@0 {
+		compatible = "cfi-flash";
+		reg = <0x00000000 0x04000000>;
+		bank-width = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x00000000 0x00040000>;
+			};
+
+			partition@40000 {
+				label = "uboot-env";
+				reg = <0x00040000 0x00020000>;
+			};
+
+			partition@60000 {
+				label = "flash";
+				reg = <0x00060000 0x03fa0000>;
+			};
+		};
+	};
+
+	flash@4000000 {
+		compatible = "cfi-flash";
+		reg = <0x04000000 0x04000000>;
+		bank-width = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot1";
+				reg = <0x00000000 0x00040000>;
+			};
+
+			partition@40000 {
+				label = "uboot-env1";
+				reg = <0x00040000 0x00020000>;
+			};
+
+			partition@60000 {
+				label = "flash1";
+				reg = <0x00060000 0x03fa0000>;
+			};
+		};
+	};
+};
+
 &usb_x1_clk {
 	clock-frequency = <48000000>;
 };
Signature · 1 line
2.34.1
author maintainer
#11 lore raw

PATCH 11/13 ARM: dts: renesas: rskrza1: Add FLASH nodes

In reply to Geert Uytterhoeven

Add device nodes for the Spansion S29GL512S NOR FLASH and the dual Spansion S25FL512S QSPI NOR FLASH on the RSK+RZA1 development board. The former resides in the external address space of the Bus State Controller (BSC). The latter is mapped directly through the SPI Multi I/O Bus Controller.

---
 .../arm/boot/dts/renesas/r7s72100-rskrza1.dts | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)
arch/arm/boot/dts/renesas/r7s72100-rskrza1.dts +66 -0
index e95b820e401663eb..f3233290041d0b52 100644
@@ -29,6 +29,48 @@ memory@8000000 {
 		reg = <0x08000000 0x02000000>;
 	};
 
+	flash@18000000 {
+		compatible = "mtd-rom";
+		reg = <0x18000000 0x08000000>;
+		clocks = <&mstp9_clks R7S72100_CLK_SPIBSC0>;
+		power-domains = <&cpg_clocks>;
+		bank-width = <4>;
+		device-width = <1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		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>;
+			};
+
+			partition@c0000 {
+				label = "dt";
+				reg = <0x000c0000 0x00040000>;
+			};
+
+			partition@100000 {
+				label = "kernel";
+				reg = <0x00100000 0x00280000>;
+			};
+
+			partition@400000 {
+				label = "rootfs";
+				reg = <0x00400000 0x01c00000>;
+			};
+		};
+	};
+
 	keyboard {
 		compatible = "gpio-keys";
 
@@ -113,6 +155,30 @@ eeprom@50 {
 	};
 };
 
+&bsc {
+	flash@0 {
+		compatible = "cfi-flash";
+		reg = <0x00000000 0x4000000>;
+		bank-width = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "apps";
+				reg = <0x00000000 0x01000000>;
+			};
+
+			partition@1000000 {
+				label = "data";
+				reg = <0x01000000 0x03000000>;
+			};
+		};
+	};
+};
+
 &usb_x1_clk {
 	clock-frequency = <48000000>;
 };
Signature · 1 line
2.34.1
author maintainer
#12 lore raw

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

In reply to Geert Uytterhoeven

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.

---
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(+)
arch/arm/boot/dts/renesas/r8a7779-marzen.dts +34 -0
index 9c001cbfc02f79f7..dfc6d63a21cd5474 100644
@@ -229,6 +229,35 @@ &extal_clk {
 };
 
 &lbsc {
+	flash@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@0 {
+				label = "uboot";
+				reg = <0x00000000 0x00040000>;
+				read-only;
+			};
+			partition@40000 {
+				label = "uboot-env";
+				reg = <0x00040000 0x00040000>;
+				read-only;
+			};
+			partition@80000 {
+				label = "flash";
+				reg = <0x00080000 0x03f80000>;
+			};
+		};
+	};
+
 	ethernet@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";
Signature · 1 line
2.34.1
author maintainer
#13 lore raw

PATCH 13/13 ARM: dts: renesas: blanche: Add FLASH node

In reply to Geert Uytterhoeven

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

---
This depends on "[PATCH] ARM: shmobile: rcar-gen2: Reserve boot area when SMP is enabled".

---
 arch/arm/boot/dts/renesas/r8a7792-blanche.dts | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/arm/boot/dts/renesas/r8a7792-blanche.dts +34 -0
index e793134f32a3020a..4ee83b8aae2a4f19 100644
@@ -182,6 +182,35 @@ &can_clk {
 };
 
 &lbsc {
+	flash@0 {
+		compatible = "cfi-flash";
+		reg = <0x00000000 0x04000000>;
+		pinctrl-0 = <&flash_pins>;
+		pinctrl-names = "default";
+		bank-width = <2>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x00000000 0x00040000>;
+				read-only;
+			};
+			partition@40000 {
+				label = "uboot-env";
+				reg = <0x00040000 0x00040000>;
+				read-only;
+			};
+			partition@80000 {
+				label = "flash";
+				reg = <0x00080000 0x03f80000>;
+			};
+		};
+	};
+
 	ethernet@18000000 {
 		compatible = "smsc,lan89218", "smsc,lan9115";
 		reg = <0x18000000 0x100>;
@@ -240,6 +269,11 @@ du1_pins: du1 {
 		function = "du1";
 	};
 
+	flash_pins: flash {
+		groups = "lbsc_cs0";
+		function = "lbsc";
+	};
+
 	keyboard_pins: keyboard {
 		pins = "GP_3_10", "GP_3_11", "GP_3_12", "GP_3_15", "GP_11_2";
 		bias-pull-up;
Signature · 1 line
2.34.1
#14 lore raw
In reply to Geert Uytterhoeven
Quoted 18 lines · Geert Uytterhoeven

This patch series adds support for various FLASH devices on the Blanche, Genmai, Marzen, and RSK+RZA1 development boards. As several of these FLASH devices reside in the external address space of a (Local) Bus State Controller, the current (too) minimal support for (L)BSC is improved first. All of this is preceded by two small fixes.

As FLASH on Blanche and Marzen conflicts with SMP, the last two patches depend on [1], so I marked them RFC.

This has been tested on the APE6-EVM, Blanche, Genmai, Marzen, and RSK+RZA1 development boards.

Thanks for your comments!

[1] "[PATCH/RFC 0/4] ARM: shmobile: Reserve boot area when SMP is

     enabled"
    https://lore.kernel.org/all/[email protected]
Quoted 12 lines

Geert Uytterhoeven (13):
ARM: dts: renesas: ape6evm: Drop bogus "mtd-rom" compatible value
ARM: dts: renesas: gr-peach: Remove unneeded probe-type property
ARM: dts: renesas: Remove unused LBSC nodes from board DTS
ARM: dts: renesas: r7s72100: Add BSC node
ARM: dts: renesas: r8a7779: Add LBSC node
ARM: dts: renesas: r8a7792: Add LBSC node
ARM: dts: renesas: marzen: Move Ethernet node to LBSC
ARM: dts: renesas: blanche: Move Ethernet node to LBSC
ARM: dts: renesas: wheat: Move Ethernet node to LBSC
ARM: dts: renesas: genmai: Add FLASH nodes
ARM: dts: renesas: rskrza1: Add FLASH nodes

Thanks, queuing 1-11 in renesas-devel for v6.7.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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