Skip to contentSkip to conversation

ARM: dts: Fix 64MiB OpenBMC flash layout and aspeed-ast2600-evb.dts

PATCH In review Troy Lee 3 participants 4 messages Mar 16, 2021 – Jun 3, 2021

Subsystems (2)
lore
Share & tools
lore

Troy Lee

author
#0 lore raw

PATCH 1/1 ARM: dts: Fix 64MiB OpenBMC flash layout and aspeed-ast2600-evb.dts

Aspeed AST2600 u-boot requires 600KiB+ flash space. Sharing the same openbmc-flash-layout-64.dtsi requires to resize the flash partition.

The updated flash layout as follows:
- u-boot: 896 KiB
- u-boot-env: 128 KiB
- kernel: 9MiB
- rofs: 32 MiB
- rwfs: 22 MiB

---
 arch/arm/boot/dts/aspeed-ast2600-evb.dts      | 32 +------------------
 .../arm/boot/dts/openbmc-flash-layout-64.dtsi | 18 +++++------
 2 files changed, 10 insertions(+), 40 deletions(-)
arch/arm/boot/dts/aspeed-ast2600-evb.dts +1 -31
index 89be13197780..2cfae9cfed3a 100644
@@ -121,37 +121,7 @@ flash at 0 {
 		m25p,fast-read;
 		label = "bmc";
 		spi-max-frequency = <50000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			u-boot at 0 {
-				reg = <0x0 0xe0000>; // 896KB
-				label = "u-boot";
-			};
-
-			u-boot-env at e0000 {
-				reg = <0xe0000 0x20000>; // 128KB
-				label = "u-boot-env";
-			};
-
-			kernel at 100000 {
-				reg = <0x100000 0x900000>; // 9MB
-				label = "kernel";
-			};
-
-			rofs at a00000 {
-				reg = <0xa00000 0x2000000>; // 32MB
-				label = "rofs";
-			};
-
-			rwfs at 6000000 {
-				reg = <0x2a00000 0x1600000>; // 22MB
-				label = "rwfs";
-			};
-		};
+#include "openbmc-flash-layout-64.dtsi"
 	};
 };
 
arch/arm/boot/dts/openbmc-flash-layout-64.dtsi +9 -9
index 91163867be34..31f59de5190b 100644
@@ -9,27 +9,27 @@ partitions {
 	#size-cells = <1>;
 
 	u-boot at 0 {
-		reg = <0x0 0x60000>; // 384KB
+		reg = <0x0 0xe0000>; // 896KB
 		label = "u-boot";
 	};
 
-	u-boot-env at 60000 {
-		reg = <0x60000 0x20000>; // 128KB
+	u-boot-env at e0000 {
+		reg = <0xe0000 0x20000>; // 128KB
 		label = "u-boot-env";
 	};
 
-	kernel at 80000 {
-		reg = <0x80000 0x500000>; // 5MB
+	kernel at 100000 {
+		reg = <0x100000 0x900000>; // 9MB
 		label = "kernel";
 	};
 
-	rofs at 580000 {
-		reg = <0x580000 0x2a80000>; // 42.5MB
+	rofs at a00000 {
+		reg = <0xa00000 0x2000000>; // 32MB
 		label = "rofs";
 	};
 
-	rwfs at 3000000 {
-		reg = <0x3000000 0x1000000>; // 16MB
+	rwfs at 6000000 {
+		reg = <0x2a00000 0x1600000>; // 22MB
 		label = "rwfs";
 	};
 };
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 10 lines · Troy Lee

Aspeed AST2600 u-boot requires 600KiB+ flash space. Sharing the same openbmc-flash-layout-64.dtsi requires to resize the flash partition.

The updated flash layout as follows:
- u-boot: 896 KiB
- u-boot-env: 128 KiB
- kernel: 9MiB
- rofs: 32 MiB
- rwfs: 22 MiB

Changing the 64MB layout will break the systems that are already using this layout. I'll get the Bytedance people to chime in, as theirs is the only system using this layout so far.

John, Lei?

Quoted 94 lines
---
 arch/arm/boot/dts/aspeed-ast2600-evb.dts      | 32 +------------------
 .../arm/boot/dts/openbmc-flash-layout-64.dtsi | 18 +++++------
 2 files changed, 10 insertions(+), 40 deletions(-)
arch/arm/boot/dts/aspeed-ast2600-evb.dts +1 -31
index 89be13197780..2cfae9cfed3a 100644
@@ -121,37 +121,7 @@ flash at 0 {
                m25p,fast-read;
                label = "bmc";
                spi-max-frequency = <50000000>;
-
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       u-boot at 0 {
-                               reg = <0x0 0xe0000>; // 896KB
-                               label = "u-boot";
-                       };
-
-                       u-boot-env at e0000 {
-                               reg = <0xe0000 0x20000>; // 128KB
-                               label = "u-boot-env";
-                       };
-
-                       kernel at 100000 {
-                               reg = <0x100000 0x900000>; // 9MB
-                               label = "kernel";
-                       };
-
-                       rofs at a00000 {
-                               reg = <0xa00000 0x2000000>; // 32MB
-                               label = "rofs";
-                       };
-
-                       rwfs at 6000000 {
-                               reg = <0x2a00000 0x1600000>; // 22MB
-                               label = "rwfs";
-                       };
-               };
+#include "openbmc-flash-layout-64.dtsi"
        };
 };
 
arch/arm/boot/dts/openbmc-flash-layout-64.dtsi +9 -10
index 91163867be34..31f59de5190b 100644
@@ -9,27 +9,27 @@ partitions {
        #size-cells = <1>;
 
        u-boot at 0 {
-               reg = <0x0 0x60000>; // 384KB
+               reg = <0x0 0xe0000>; // 896KB
                label = "u-boot";
        };
 
-       u-boot-env at 60000 {
-               reg = <0x60000 0x20000>; // 128KB
+       u-boot-env at e0000 {
+               reg = <0xe0000 0x20000>; // 128KB
                label = "u-boot-env";
        };
 
-       kernel at 80000 {
-               reg = <0x80000 0x500000>; // 5MB
+       kernel at 100000 {
+               reg = <0x100000 0x900000>; // 9MB
                label = "kernel";
        };
 
-       rofs at 580000 {
-               reg = <0x580000 0x2a80000>; // 42.5MB
+       rofs at a00000 {
+               reg = <0xa00000 0x2000000>; // 32MB
                label = "rofs";
        };
 
-       rwfs at 3000000 {
-               reg = <0x3000000 0x1000000>; // 16MB
+       rwfs at 6000000 {
+               reg = <0x2a00000 0x1600000>; // 22MB
                label = "rwfs";
        };
 };
--

2.25.1

#2 lore raw
Quoted 13 lines · Joel Stanley
Quoted 10 lines · Troy Lee

Aspeed AST2600 u-boot requires 600KiB+ flash space. Sharing the same openbmc-flash-layout-64.dtsi requires to resize the flash partition.

The updated flash layout as follows:
- u-boot: 896 KiB
- u-boot-env: 128 KiB
- kernel: 9MiB
- rofs: 32 MiB
- rwfs: 22 MiB

Quoted 5 lines

Changing the 64MB layout will break the systems that are already using this layout. I'll get the Bytedance people to chime in, as theirs is the only system using this layout so far.

John, Lei?

Because the kernel's offset is updated, several other changes are required:
1. The related offsets, which is already sent to
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/39343
2. The u-boot patch to update the bootm address and make sure it only applies to the 64MiB layout.

Without the above two changes, I would suggest holding the merge.

Signature · 2 lines
BRs,
Lei YU
maintainer Reviewed-by
#3 lore raw
Quoted 21 lines · Lei Yu
Quoted 13 lines · Joel Stanley
Quoted 10 lines · Troy Lee

Aspeed AST2600 u-boot requires 600KiB+ flash space. Sharing the same openbmc-flash-layout-64.dtsi requires to resize the flash partition.

The updated flash layout as follows:
- u-boot: 896 KiB
- u-boot-env: 128 KiB
- kernel: 9MiB
- rofs: 32 MiB
- rwfs: 22 MiB

Quoted 5 lines

Changing the 64MB layout will break the systems that are already using this layout. I'll get the Bytedance people to chime in, as theirs is the only system using this layout so far.

John, Lei?

Quoted 7 lines

Because the kernel's offset is updated, several other changes are required:
1. The related offsets, which is already sent to
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/39343
2. The u-boot patch to update the bootm address and make sure it only applies to the 64MiB layout.

Without the above two changes, I would suggest holding the merge.

Just confirming that we are okay to go ahead with this change, as per the discussion on the openbmc list[1].

[1] https://lore.kernel.org/openbmc/CACPK8XdVNXSfzDBPryjQh_4S0yU4Tp6VOOtju+L_DcfgHumPJw at mail.gmail.com/

Cheers,

Joel