* [PATCH v2 0/2] arm: dts: aspeed: Add an alt 128M flash layout.
@ 2025-12-18 18:48 Marc Olberding
2025-12-18 18:48 ` [PATCH v2 1/2] arm: dts: aspeed: add " Marc Olberding
2025-12-18 18:48 ` [PATCH v2 2/2] arm: dts: aspeed: Add alt partition support to msx4 Marc Olberding
0 siblings, 2 replies; 4+ messages in thread
From: Marc Olberding @ 2025-12-18 18:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery
Cc: devicetree, linux-arm-kernel, linux-aspeed, linux-kernel,
Marc Olberding
Add a layout for an alternate 128M flash layout. This is useful for the
aspeed ast2500[2] and ast2600[1] SoCs, where it has the ability to boot
from one of two spi chips, nominally the primary and backup SPIs. Adding
a layout allows userspace to flash the alternate spi by partition and
switch over to it, allowing lower downtime for firmware flash, or for
updating the primary flash from the golden backup flash. This is already
an established scheme for the 32M and 64M layouts, where the layout is
the same but each partition has `alt` prepended to its name. This allows
userspace to just prepend alt to the images in the update process to
specify which flash chip to update. This series also adds support for
the msx4 to use this layout.
References:
[1] https://www.aspeedtech.com/server_ast2600/
[2] https://www.aspeedtech.com/server_ast2500/
Signed-off-by: Marc Olberding <molberding@nvidia.com>
---
Marc Olberding (2):
arm: dts: aspeed: add an alt 128M flash layout
arm: dts: aspeed: Add alt partition support to msx4
.../boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts | 1 +
.../dts/aspeed/openbmc-flash-layout-128-alt.dtsi | 32 ++++++++++++++++++++++
2 files changed, 33 insertions(+)
---
base-commit: 459a5aa171c0f13fcd78faa9594dc4aa5a95770b
change-id: 20251218-alt-128-19270d894872
Best regards,
--
Marc Olberding <molberding@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2 1/2] arm: dts: aspeed: add an alt 128M flash layout
2025-12-18 18:48 [PATCH v2 0/2] arm: dts: aspeed: Add an alt 128M flash layout Marc Olberding
@ 2025-12-18 18:48 ` Marc Olberding
2026-01-08 6:04 ` Andrew Jeffery
2025-12-18 18:48 ` [PATCH v2 2/2] arm: dts: aspeed: Add alt partition support to msx4 Marc Olberding
1 sibling, 1 reply; 4+ messages in thread
From: Marc Olberding @ 2025-12-18 18:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery
Cc: devicetree, linux-arm-kernel, linux-aspeed, linux-kernel,
Marc Olberding
Add a 128M layout for the BMC flash chip we didn't boot from. Including
this allows the user to write to each partition on the alternate spi
chip. This dtsi follows the existing standard of using the same layout
as non alt version and prepending `alt` to each partition's name.
Testing: Include this in msx4 and cat size, offsets and name
```
for devdir in /sys/class/mtd/mtd*; do
> [[ -d $devdir && -r $devdir/name ]] || continue
> name=$(<"$devdir/name")
> [[ $name == alt* ]] || continue
>
> size=$(<"$devdir/size")
> offset=0
> [[ -r $devdir/offset ]] && offset=$(<"$devdir/offset")
>
> dev=$(basename "$devdir")
> printf "%s name=%s offset=0x%X size=0x%X\n" "$dev" "$name" \
> "$offset" "$size"
> done
mtd10 name=alt-rofs offset=0xA00000 size=0x5600000
mtd11 name=alt-rwfs offset=0x6000000 size=0x2000000
mtd7 name=alt-u-boot offset=0x0 size=0xE0000
mtd8 name=alt-u-boot-env offset=0xE0000 size=0x20000
mtd9 name=alt-kernel offset=0x100000 size=0x900000
```
Signed-off-by: Marc Olberding <molberding@nvidia.com>
---
.../dts/aspeed/openbmc-flash-layout-128-alt.dtsi | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/openbmc-flash-layout-128-alt.dtsi b/arch/arm/boot/dts/aspeed/openbmc-flash-layout-128-alt.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..08ce2eab472c3da4aa3d841adb0eb1c971e6a25a
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed/openbmc-flash-layout-128-alt.dtsi
@@ -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 0xe0000>; // 896KB
+ label = "alt-u-boot";
+ };
+
+ u-boot-env@e0000 {
+ reg = <0xe0000 0x20000>; // 128KB
+ label = "alt-u-boot-env";
+ };
+
+ kernel@100000 {
+ reg = <0x100000 0x900000>; // 9MB
+ label = "alt-kernel";
+ };
+
+ rofs@a00000 {
+ reg = <0xa00000 0x5600000>; // 86MB
+ label = "alt-rofs";
+ };
+
+ rwfs@6000000 {
+ reg = <0x6000000 0x2000000>; // 32MB
+ label = "alt-rwfs";
+ };
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/2] arm: dts: aspeed: add an alt 128M flash layout
2025-12-18 18:48 ` [PATCH v2 1/2] arm: dts: aspeed: add " Marc Olberding
@ 2026-01-08 6:04 ` Andrew Jeffery
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2026-01-08 6:04 UTC (permalink / raw)
To: Marc Olberding, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Joel Stanley
Cc: devicetree, linux-arm-kernel, linux-aspeed, linux-kernel
Hi Marc,
Regarding the subject prefix, can you please capitalise the 'ARM' portion, so:
ARM: dts: aspeed: add an alt 128M flash layout
That way it's consistent with the rest of history.
On Thu, 2025-12-18 at 10:48 -0800, Marc Olberding wrote:
> Add a 128M layout for the BMC flash chip we didn't boot from. Including
> this allows the user to write to each partition on the alternate spi
> chip. This dtsi follows the existing standard of using the same layout
> as non alt version and prepending `alt` to each partition's name.
>
> Testing: Include this in msx4 and cat size, offsets and name
I think this would be better with s/Testing/Tested by/ and associated
grammar fixes.
> ```
> for devdir in /sys/class/mtd/mtd*; do
> > [[ -d $devdir && -r $devdir/name ]] || continue
> > name=$(<"$devdir/name")
> > [[ $name == alt* ]] || continue
> >
> > size=$(<"$devdir/size")
> > offset=0
> > [[ -r $devdir/offset ]] && offset=$(<"$devdir/offset")
> >
> > dev=$(basename "$devdir")
> > printf "%s name=%s offset=0x%X size=0x%X\n" "$dev" "$name" \
> > "$offset" "$size"
> > done
> mtd10 name=alt-rofs offset=0xA00000 size=0x5600000
> mtd11 name=alt-rwfs offset=0x6000000 size=0x2000000
> mtd7 name=alt-u-boot offset=0x0 size=0xE0000
> mtd8 name=alt-u-boot-env offset=0xE0000 size=0x20000
> mtd9 name=alt-kernel offset=0x100000 size=0x900000
> ```
Can you rather remove the markdown codeblock and instead indent the
code snippet (IMO 4 spaces is fine)?
Also the shell continuation markers seem a little unfortunate. Maybe
just drop them for clarity? You can separate the output from the
script.
I also found this helpful:
diff -u arch/arm/boot/dts/aspeed/openbmc-flash-layout-128{,-alt}.dtsi
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] arm: dts: aspeed: Add alt partition support to msx4
2025-12-18 18:48 [PATCH v2 0/2] arm: dts: aspeed: Add an alt 128M flash layout Marc Olberding
2025-12-18 18:48 ` [PATCH v2 1/2] arm: dts: aspeed: add " Marc Olberding
@ 2025-12-18 18:48 ` Marc Olberding
1 sibling, 0 replies; 4+ messages in thread
From: Marc Olberding @ 2025-12-18 18:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery
Cc: devicetree, linux-arm-kernel, linux-aspeed, linux-kernel,
Marc Olberding
Add support for the alt 128M partition table to the msx4. This allows it
program the flash it didn't boot from by partition.
Signed-off-by: Marc Olberding <molberding@nvidia.com>
---
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts
index 44f95a3986cb9e2c6902ba9b3c1ed56e782438b3..a12d4164de4ac82160696b67b69c0e94696c23fd 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-msx4-bmc.dts
@@ -67,6 +67,7 @@ flash@1 {
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
status = "okay";
+ #include "openbmc-flash-layout-128-alt.dtsi"
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-08 6:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 18:48 [PATCH v2 0/2] arm: dts: aspeed: Add an alt 128M flash layout Marc Olberding
2025-12-18 18:48 ` [PATCH v2 1/2] arm: dts: aspeed: add " Marc Olberding
2026-01-08 6:04 ` Andrew Jeffery
2025-12-18 18:48 ` [PATCH v2 2/2] arm: dts: aspeed: Add alt partition support to msx4 Marc Olberding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox