Skip to contentSkip to conversation

ARM: dts: aspeed: tacoma partitions

PATCH In review Brad Bishop 2 participants 4 messages Sep 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: aspeed: tacoma partitions

Add a layout suitable for 128MiB raw flash devices, and use it the Tacoma system.

Needs to be applied atop these series:
https://lists.ozlabs.org/pipermail/openbmc/2019-September/018517.html
https://lists.ozlabs.org/pipermail/openbmc/2019-September/018500.html

Tested by booting and mounting filesystems on the Tacoma system with 7624e846f5 of https://github.com/legoater/qemu although I had to use a 128MiB flash part.

Brad Bishop (2):
ARM: dts: Add 128MiB OpenBMC flash layout
ARM: dts: aspeed: tacoma: Add fmc and partitions

 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts   | 11 +++++++
 .../boot/dts/openbmc-flash-layout-128.dtsi    | 32 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 arch/arm/boot/dts/openbmc-flash-layout-128.dtsi
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/2 ARM: dts: Add 128MiB OpenBMC flash layout

This is an alternate layout used by OpenBMC systems. It describes the fixed flash layout for 128MiB devices.

---
 .../boot/dts/openbmc-flash-layout-128.dtsi    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 arch/arm/boot/dts/openbmc-flash-layout-128.dtsi
arch/arm/boot/dts/openbmc-flash-layout-128.dtsi new file +32 -0
new file mode 100644
index 000000000000..4e2819a8dac6
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+partitions {
+	compatible = "fixed-partitions";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	u-boot@0 {
+		reg = <0x0 0x60000>;
+		label = "u-boot";
+	};
+
+	u-boot-env@60000 {
+		reg = <0x60000 0x20000>;
+		label = "u-boot-env";
+	};
+
+	kernel@80000 {
+		reg = <0x80000 0x780000>;
+		label = "kernel";
+	};
+
+	rofs@800000 {
+		reg = <0x800000 0x5800000>;
+		label = "rofs";
+	};
+
+	rwfs@6000000 {
+		reg = <0x6000000 0x2000000>;
+		label = "rwfs";
+	};
+};
Signature · 1 line
2.21.0
maintainer
#2 lore raw

Re: [PATCH linux dev-5.3 1/2] ARM: dts: Add 128MiB OpenBMC flash layout

Quoted 16 lines · Brad Bishop

This is an alternate layout used by OpenBMC systems. It describes the fixed flash layout for 128MiB devices.

---
 .../boot/dts/openbmc-flash-layout-128.dtsi    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 arch/arm/boot/dts/openbmc-flash-layout-128.dtsi
arch/arm/boot/dts/openbmc-flash-layout-128.dtsi new file +0 -0
new file mode 100644
index 000000000000..4e2819a8dac6

arch/arm/boot/dts/openbmc-flash-layout-128.dtsi line 9

Quoted 9 lines
arch/arm/boot/dts/openbmc-flash-layout-128.dtsi new file +9 -0
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+partitions {
+       compatible = "fixed-partitions";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       u-boot@0 {
+               reg = <0x0 0x60000>;

This is 384KB, which is too small for the ast2600 u-boot.

I suggest we make it 896KB. This is 1MB - 128KB for the environment.

arch/arm/boot/dts/openbmc-flash-layout-128.dtsi line 19

Quoted 10 lines
arch/arm/boot/dts/openbmc-flash-layout-128.dtsi new file +10 -0
+               label = "u-boot";
+       };
+
+       u-boot-env@60000 {
+               reg = <0x60000 0x20000>;
+               label = "u-boot-env";
+       };
+
+       kernel@80000 {
+               reg = <0x80000 0x780000>;

I suggest we make this bigger. 9MB seems like a nice round number; that means we end up with 10MB for u-boot + env + FIT.

I will send a patch for review with my proposal.

Cheers,

Joel

Quoted 15 lines
arch/arm/boot/dts/openbmc-flash-layout-128.dtsi new file +13 -1
+               label = "kernel";
+       };
+
+       rofs@800000 {
+               reg = <0x800000 0x5800000>;
+               label = "rofs";
+       };
+
+       rwfs@6000000 {
+               reg = <0x6000000 0x2000000>;
+               label = "rwfs";
+       };
+};
--

2.21.0

#3 lore raw

PATCH 2/2 ARM: dts: aspeed: tacoma: Add fmc and partitions

In reply to Brad Bishop

Enable the fmc device and specify the OpenBMC 128 MiB fixed partition layout.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +11 -0
index 408af001c06c..8c2526bcf6ee 100644
@@ -35,6 +35,17 @@
 	status = "okay";
 };
 
+&fmc {
+	status = "okay";
+	flash@0 {
+		status = "okay";
+		m25p,fast-read;
+		label = "bmc";
+		spi-max-frequency = <50000000>;
+#include "openbmc-flash-layout-128.dtsi"
+	};
+};
+
 &fsim0 {
 	status = "okay";
 };
Signature · 1 line
2.21.0