public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: starfive: Update flash partition layout
@ 2024-06-03 15:07 matthias.bgg
  2024-06-03 15:27 ` Heinrich Schuchardt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: matthias.bgg @ 2024-06-03 15:07 UTC (permalink / raw)
  To: kernel, robh, krzk+dt, conor+dt
  Cc: devicetree, aou, duwe, linux-kernel, palmer, heinrich.schuchardt,
	paul.walmsley, linux-riscv, Matthias Brugger

From: Matthias Brugger <matthias.bgg@gmail.com>

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

Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

---

 arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index 8ff6ea64f0489..37b4c294ffcc5 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -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.45.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 15:07 [PATCH] riscv: dts: starfive: Update flash partition layout matthias.bgg
@ 2024-06-03 15:27 ` Heinrich Schuchardt
  2024-06-04  2:48   ` Hal Feng
  2024-06-03 16:10 ` Emil Renner Berthing
  2024-06-04 17:06 ` Conor Dooley
  2 siblings, 1 reply; 7+ messages in thread
From: Heinrich Schuchardt @ 2024-06-03 15:27 UTC (permalink / raw)
  To: matthias.bgg
  Cc: devicetree, aou, duwe, linux-kernel, palmer, paul.walmsley,
	linux-riscv, Matthias Brugger, kernel, robh, krzk+dt, conor+dt,
	Hal Feng, Minda Chen

On 03.06.24 17:07, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <matthias.bgg@gmail.com>
> 
> Up to now, the describe flash partition layout has some gaps.
> Use the whole flash chip by getting rid of the gaps.
> 
> Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

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/20230804020254.291239-4-william.qiu@starfivetech.com/ 
introduced the current layout.

CCing Starfive's U-Boot reviewers.

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

> 
> ---
> 
>   arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> index 8ff6ea64f0489..37b4c294ffcc5 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> @@ -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>;
>   			};
>   		};
>   	};


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 15:07 [PATCH] riscv: dts: starfive: Update flash partition layout matthias.bgg
  2024-06-03 15:27 ` Heinrich Schuchardt
@ 2024-06-03 16:10 ` Emil Renner Berthing
  2024-06-03 17:59   ` Heinrich Schuchardt
  2024-06-04 17:06 ` Conor Dooley
  2 siblings, 1 reply; 7+ messages in thread
From: Emil Renner Berthing @ 2024-06-03 16:10 UTC (permalink / raw)
  To: matthias.bgg, kernel, robh, krzk+dt, conor+dt
  Cc: devicetree, aou, duwe, linux-kernel, palmer, heinrich.schuchardt,
	paul.walmsley, linux-riscv, Matthias Brugger

matthias.bgg@ wrote:
> From: Matthias Brugger <matthias.bgg@gmail.com>
>
> Up to now, the describe flash partition layout has some gaps.
> Use the whole flash chip by getting rid of the gaps.
>
> Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

Hi Matthias,

Thanks for the patch.

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

..this is definitely fine, but..

>  			};
>  			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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 16:10 ` Emil Renner Berthing
@ 2024-06-03 17:59   ` Heinrich Schuchardt
  2024-06-03 20:31     ` Emil Renner Berthing
  0 siblings, 1 reply; 7+ messages in thread
From: Heinrich Schuchardt @ 2024-06-03 17:59 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: devicetree, aou, duwe, linux-kernel, palmer, paul.walmsley,
	linux-riscv, Matthias Brugger, matthias.bgg, kernel, robh,
	krzk+dt, conor+dt

On 6/3/24 18:10, Emil Renner Berthing wrote:
> matthias.bgg@ wrote:
>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> Up to now, the describe flash partition layout has some gaps.
>> Use the whole flash chip by getting rid of the gaps.
>>
>> Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> 
> Hi Matthias,
> 
> Thanks for the patch.
> 
>>
>> ---
>>
>>   arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
>>   1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
>> index 8ff6ea64f0489..37b4c294ffcc5 100644
>> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
>> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
>> @@ -321,16 +321,13 @@ partitions {
>>   			#size-cells = <1>;
>>
>>   			spl@0 {
>> -				reg = <0x0 0x80000>;
>> +				reg = <0x0 0xf0000>;
> 
> ..this is definitely fine, but..
> 
>>   			};
>>   			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?

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

> 
> /Emil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 17:59   ` Heinrich Schuchardt
@ 2024-06-03 20:31     ` Emil Renner Berthing
  0 siblings, 0 replies; 7+ messages in thread
From: Emil Renner Berthing @ 2024-06-03 20:31 UTC (permalink / raw)
  To: Heinrich Schuchardt, Emil Renner Berthing
  Cc: devicetree, aou, duwe, linux-kernel, palmer, paul.walmsley,
	linux-riscv, Matthias Brugger, matthias.bgg, kernel, robh,
	krzk+dt, conor+dt

Heinrich Schuchardt wrote:
> On 6/3/24 18:10, Emil Renner Berthing wrote:
> > matthias.bgg@ wrote:
> >> From: Matthias Brugger <matthias.bgg@gmail.com>
> >>
> >> Up to now, the describe flash partition layout has some gaps.
> >> Use the whole flash chip by getting rid of the gaps.
> >>
> >> Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> >> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> >
> > Hi Matthias,
> >
> > Thanks for the patch.
> >
> >>
> >> ---
> >>
> >>   arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
> >>   1 file changed, 2 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> >> index 8ff6ea64f0489..37b4c294ffcc5 100644
> >> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> >> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> >> @@ -321,16 +321,13 @@ partitions {
> >>   			#size-cells = <1>;
> >>
> >>   			spl@0 {
> >> -				reg = <0x0 0x80000>;
> >> +				reg = <0x0 0xf0000>;
> >
> > ..this is definitely fine, but..
> >
> >>   			};
> >>   			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?
>
> 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.

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

Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 15:27 ` Heinrich Schuchardt
@ 2024-06-04  2:48   ` Hal Feng
  0 siblings, 0 replies; 7+ messages in thread
From: Hal Feng @ 2024-06-04  2:48 UTC (permalink / raw)
  To: Heinrich Schuchardt, matthias.bgg@kernel.org
  Cc: devicetree@vger.kernel.org, aou@eecs.berkeley.edu, duwe@suse.de,
	linux-kernel@vger.kernel.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com, linux-riscv@lists.infradead.org,
	Matthias Brugger, kernel@esmil.dk, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, Minda Chen

> On 03.06.24 23:27, Heinrich Schuchardt wrote:
> On 03.06.24 17:07, matthias.bgg@kernel.org wrote:
> > From: Matthias Brugger <matthias.bgg@gmail.com>
> >
> > Up to now, the describe flash partition layout has some gaps.
> > Use the whole flash chip by getting rid of the gaps.
> >
> > Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> 
> 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/20230804020254.291239-4-
> william.qiu@starfivetech.com/
> introduced the current layout.
> 
> CCing Starfive's U-Boot reviewers.
> 
> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

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

> 
> >
> > ---
> >
> >   arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 7 ++-----
> >   1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> > b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> > index 8ff6ea64f0489..37b4c294ffcc5 100644
> > --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> > +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
> > @@ -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>;
> >   			};
> >   		};
> >   	};


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] riscv: dts: starfive: Update flash partition layout
  2024-06-03 15:07 [PATCH] riscv: dts: starfive: Update flash partition layout matthias.bgg
  2024-06-03 15:27 ` Heinrich Schuchardt
  2024-06-03 16:10 ` Emil Renner Berthing
@ 2024-06-04 17:06 ` Conor Dooley
  2 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2024-06-04 17:06 UTC (permalink / raw)
  To: kernel, robh, krzk+dt, conor+dt, matthias.bgg
  Cc: conor, Conor Dooley, devicetree, aou, duwe, linux-kernel, palmer,
	heinrich.schuchardt, paul.walmsley, linux-riscv, Matthias Brugger

From: Conor Dooley <conor.dooley@microchip.com>

On Mon, 03 Jun 2024 17:07:55 +0200, matthias.bgg@kernel.org wrote:
> Up to now, the describe flash partition layout has some gaps.
> Use the whole flash chip by getting rid of the gaps.
> 
> 

Applied to riscv-dt-for-next, thanks!

[1/1] riscv: dts: starfive: Update flash partition layout
      https://git.kernel.org/conor/c/1dc5f8f6ea73

Thanks,
Conor.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-04 17:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 15:07 [PATCH] riscv: dts: starfive: Update flash partition layout matthias.bgg
2024-06-03 15:27 ` Heinrich Schuchardt
2024-06-04  2:48   ` Hal Feng
2024-06-03 16:10 ` Emil Renner Berthing
2024-06-03 17:59   ` Heinrich Schuchardt
2024-06-03 20:31     ` Emil Renner Berthing
2024-06-04 17:06 ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox