Skip to contentSkip to conversation

riscv: dts: starfive: Update flash partition layout

PATCH Applied [email protected] 5 participants 7 messages Jun 3, 2024 – Jun 4, 2024

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

PATCH 1/1 riscv: dts: starfive: Update flash partition layout

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

---

 arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +2 -5
index 8ff6ea64f0489..37b4c294ffcc5 100644
@@ -321,16 +321,13 @@ partitions {
 			#size-cells = <1>;
 
 			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;
 			};
 			uboot-env@f0000 {
 				reg = <0xf0000 0x10000>;
 			};
 			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;
 			};
 		};
 	};
Signature · 1 line
2.45.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On 03.06.24 17:07, [email protected] wrote:

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

For flashing larger firmware like EDK II it is helpful to maximize the partition sizes. Thanks for sending the patch.

Commit 8384087a ("riscv: dts: starfive: Add QSPI controller node for StarFive JH7110 SoC") https://lore.kernel.org/linux-riscv/[email protected]/ introduced the current layout.

CCing Starfive's U-Boot reviewers.

Quoted 29 lines

---

  arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +2 -5
index 8ff6ea64f0489..37b4c294ffcc5 100644
@@ -321,16 +321,13 @@ partitions {
  			#size-cells = <1>;
 
  			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;
  			};
  			uboot-env@f0000 {
  				reg = <0xf0000 0x10000>;
  			};
  			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;
  			};
  		};
  	};
#2 lore raw
Quoted 13 lines · Heinrich Schuchardt
Quoted 7 lines · On 03.06.24 17:07, [email protected] wrote:

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

For flashing larger firmware like EDK II it is helpful to maximize the partition sizes. Thanks for sending the patch.

Quoted 8 lines

Commit 8384087a ("riscv: dts: starfive: Add QSPI controller node for StarFive JH7110 SoC") https://lore.kernel.org/linux-riscv/20230804020254.291239-4-
[email protected]/
introduced the current layout.

CCing Starfive's U-Boot reviewers.

We added a "reserved-data" partition because the u-boot of VF2 didn't require a large space and users can use this partition to do something they want.

Best regards,
Hal

Quoted 15 lines
Quoted 15 lines

---

  arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +0 -0
index 8ff6ea64f0489..37b4c294ffcc5 100644
@@ -321,16 +321,13 @@ partitions {
  			#size-cells = <1>;
 
Quoted 16 lines
Quoted 6 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -1
  			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;
  			};
  			uboot-env@f0000 {
  				reg = <0xf0000 0x10000>;

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 333

Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -4
  			};
  			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;
  			};
  		};
  	};

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#3 lore raw
In reply to [email protected]
Quoted 7 lines · matthias.bgg@ wrote:

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

Hi Matthias,

Thanks for the patch.

Quoted 11 lines

---

 arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +0 -0
index 8ff6ea64f0489..37b4c294ffcc5 100644

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 324

Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -1
@@ -321,16 +321,13 @@ partitions {
 			#size-cells = <1>;
 
 			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;

..this is definitely fine, but..

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 330

Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -4
 			};
 			uboot-env@f0000 {
 				reg = <0xf0000 0x10000>;
 			};
 			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;

Do we know that all of the VF2 1.2A, VF2 1.3B and Milk-V Mars boards have at least 15kB SPI flash chips? In other words were there a reason this previously ended at 10kB?

Also it looks like my Mars board and VF2 1.3B both report discovering a "gd25lq128d" chip of 16kB, so why stop at 15kB?

/Emil

#4 lore raw
Quoted 47 lines · Emil Renner Berthing
Quoted 7 lines · matthias.bgg@ wrote:

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

Hi Matthias,

Thanks for the patch.

Quoted 11 lines

---

  arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +0 -0
index 8ff6ea64f0489..37b4c294ffcc5 100644

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 324

Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -1
@@ -321,16 +321,13 @@ partitions {
  			#size-cells = <1>;
 
  			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;

..this is definitely fine, but..

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 330

Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -4
  			};
  			uboot-env@f0000 {
  				reg = <0xf0000 0x10000>;
  			};
  			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;

Do we know that all of the VF2 1.2A, VF2 1.3B and Milk-V Mars boards have at least 15kB SPI flash chips? In other words were there a reason this previously ended at 10kB?

Quoted 2 lines

Also it looks like my Mars board and VF2 1.3B both report discovering a "gd25lq128d" chip of 16kB, so why stop at 15kB?

Hello Emil,

0xf00000 (15 MiB) is the value of the size-cell. gd25lq128d has 128 Mbit (=16 MiB).

Cf. the examples in Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml

The prior partition scheme had a partition 'reserved-data' also ending at 16 MiB. We don't change the expected size with the current patch.

Best regards

Heinrich

Quoted 2 lines

/Emil

#5 lore raw
Quoted 53 lines · Heinrich Schuchardt
Quoted 47 lines · Emil Renner Berthing
Quoted 7 lines · matthias.bgg@ wrote:

From: Matthias Brugger <[email protected]>

Up to now, the describe flash partition layout has some gaps. Use the whole flash chip by getting rid of the gaps.

Hi Matthias,

Thanks for the patch.

Quoted 11 lines

---

  arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +0 -0
index 8ff6ea64f0489..37b4c294ffcc5 100644

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 324

Quoted 5 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -1
@@ -321,16 +321,13 @@ partitions {
  			#size-cells = <1>;
 
  			spl@0 {
-				reg = <0x0 0x80000>;
+				reg = <0x0 0xf0000>;

..this is definitely fine, but..

arch/riscv/boot/dts/starfive/jh7110-common.dtsi partitions { · line 330

Quoted 10 lines
arch/riscv/boot/dts/starfive/jh7110-common.dtsi +1 -4
  			};
  			uboot-env@f0000 {
  				reg = <0xf0000 0x10000>;
  			};
  			uboot@100000 {
-				reg = <0x100000 0x400000>;
-			};
-			reserved-data@600000 {
-				reg = <0x600000 0xa00000>;
+				reg = <0x100000 0xf00000>;

Do we know that all of the VF2 1.2A, VF2 1.3B and Milk-V Mars boards have at least 15kB SPI flash chips? In other words were there a reason this previously ended at 10kB?

Quoted 2 lines

Also it looks like my Mars board and VF2 1.3B both report discovering a "gd25lq128d" chip of 16kB, so why stop at 15kB?

Hello Emil,

Quoted 8 lines

0xf00000 (15 MiB) is the value of the size-cell. gd25lq128d has 128 Mbit (=16 MiB).

Cf. the examples in Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml

The prior partition scheme had a partition 'reserved-data' also ending at 16 MiB. We don't change the expected size with the current patch.

Oh, you're right. I totally misread that, sorry. You can add my