diff mbox series

arm64: dts: ti: k3-am69-sk: Update OSPI partitions offsets

Message ID 20240830090702.220402-1-b-padhi@ti.com (mailing list archive)
State New
Headers show
Series arm64: dts: ti: k3-am69-sk: Update OSPI partitions offsets | expand

Commit Message

Beleswar Prasad Padhi Aug. 30, 2024, 9:07 a.m. UTC
OSPI NOR flash was partitioned with a size of 1 MB for the initial
bootloader ("ospi.tiboot3"). On the AM69-SK board, boot failures were
sometimes observed when the initial bootloader size exceeded 512 KB. To
address this, the initial bootloader image has been optimized to be
smaller than 512 KB.

Therefore, limit the first OSPI partition size to 512 KB and adjust the
remaining size across the subsequent partitions.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am69-sk.dts | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Nishanth Menon Aug. 30, 2024, 9:22 a.m. UTC | #1
On 14:37-20240830, Beleswar Padhi wrote:
> OSPI NOR flash was partitioned with a size of 1 MB for the initial
> bootloader ("ospi.tiboot3"). On the AM69-SK board, boot failures were
> sometimes observed when the initial bootloader size exceeded 512 KB. To

Why does the boot fail when > 512MB?

> address this, the initial bootloader image has been optimized to be
> smaller than 512 KB.
> 
> Therefore, limit the first OSPI partition size to 512 KB and adjust the
> remaining size across the subsequent partitions.

I am NOT a fan of redoing flash partition organization of platforms that
are already in production - all kinds of ecosystem messes happen as a
result. Alternatively - give the 512K to u-boot tispl partition and
leave all others as is - this will at least allow people's current env
to be retained.

> 
> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
> ---
>  arch/arm64/boot/dts/ti/k3-am69-sk.dts | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> index 1e36965a1403..641236918379 100644
> --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> @@ -1241,27 +1241,27 @@ partitions {
>  
>  			partition@0 {
>  				label = "ospi.tiboot3";
> -				reg = <0x0 0x100000>;
> +				reg = <0x0 0x80000>;
>  			};
>  
> -			partition@100000 {
> +			partition@80000 {
>  				label = "ospi.tispl";
> -				reg = <0x100000 0x200000>;
> +				reg = <0x80000 0x200000>;
>  			};
>  
> -			partition@300000 {
> +			partition@280000 {
>  				label = "ospi.u-boot";
> -				reg = <0x300000 0x400000>;
> +				reg = <0x280000 0x400000>;
>  			};
>  
> -			partition@700000 {
> +			partition@680000 {
>  				label = "ospi.env";
> -				reg = <0x700000 0x40000>;
> +				reg = <0x680000 0x40000>;
>  			};
>  
> -			partition@740000 {
> +			partition@6c0000 {
>  				label = "ospi.env.backup";
> -				reg = <0x740000 0x40000>;
> +				reg = <0x6c0000 0x40000>;
>  			};
>  
>  			partition@800000 {
> -- 
> 2.34.1
>
Beleswar Prasad Padhi Aug. 30, 2024, 3:08 p.m. UTC | #2
On 30-08-2024 14:52, Nishanth Menon wrote:
> On 14:37-20240830, Beleswar Padhi wrote:
>> OSPI NOR flash was partitioned with a size of 1 MB for the initial
>> bootloader ("ospi.tiboot3"). On the AM69-SK board, boot failures were
>> sometimes observed when the initial bootloader size exceeded 512 KB. To
> Why does the boot fail when > 512MB?


It is a limitation by BOOT ROM where it can not bring up the initial 
bootloader when its size exceeds 512 KB in the DFU boot mode.

>
>> address this, the initial bootloader image has been optimized to be
>> smaller than 512 KB.
>>
>> Therefore, limit the first OSPI partition size to 512 KB and adjust the
>> remaining size across the subsequent partitions.
> I am NOT a fan of redoing flash partition organization of platforms that
> are already in production - all kinds of ecosystem messes happen as a
> result. Alternatively - give the 512K to u-boot tispl partition and
> leave all others as is - this will at least allow people's current env
> to be retained.


This sounds good to me. I will let Prasanth comment over this.

>
>> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am69-sk.dts | 18 +++++++++---------
>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> index 1e36965a1403..641236918379 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> @@ -1241,27 +1241,27 @@ partitions {
>>   
>>   			partition@0 {
>>   				label = "ospi.tiboot3";
>> -				reg = <0x0 0x100000>;
>> +				reg = <0x0 0x80000>;
>>   			};
>>   
>> -			partition@100000 {
>> +			partition@80000 {
>>   				label = "ospi.tispl";
>> -				reg = <0x100000 0x200000>;
>> +				reg = <0x80000 0x200000>;
>>   			};
>>   
>> -			partition@300000 {
>> +			partition@280000 {
>>   				label = "ospi.u-boot";
>> -				reg = <0x300000 0x400000>;
>> +				reg = <0x280000 0x400000>;
>>   			};
>>   
>> -			partition@700000 {
>> +			partition@680000 {
>>   				label = "ospi.env";
>> -				reg = <0x700000 0x40000>;
>> +				reg = <0x680000 0x40000>;
>>   			};
>>   
>> -			partition@740000 {
>> +			partition@6c0000 {
>>   				label = "ospi.env.backup";
>> -				reg = <0x740000 0x40000>;
>> +				reg = <0x6c0000 0x40000>;
>>   			};
>>   
>>   			partition@800000 {
>> -- 
>> 2.34.1
>>
Kumar, Udit Aug. 30, 2024, 3:15 p.m. UTC | #3
On 8/30/2024 2:52 PM, Nishanth Menon wrote:
> On 14:37-20240830, Beleswar Padhi wrote:
>> OSPI NOR flash was partitioned with a size of 1 MB for the initial
>> bootloader ("ospi.tiboot3"). On the AM69-SK board, boot failures were
>> sometimes observed when the initial bootloader size exceeded 512 KB. To
> Why does the boot fail when > 512MB?
>
>> address this, the initial bootloader image has been optimized to be
>> smaller than 512 KB.
>>
>> Therefore, limit the first OSPI partition size to 512 KB and adjust the
>> remaining size across the subsequent partitions.
> I am NOT a fan of redoing flash partition organization of platforms that
> are already in production - all kinds of ecosystem messes happen as a
> result. Alternatively - give the 512K to u-boot tispl partition and
> leave all others as is - this will at least allow people's current env
> to be retained.


If preference to keep same partitions, which are defined once. Then 
let's align u-boot with this.

Thanks to refactor in u-boot , now AM69 and J784S4 can stay at different 
config.

>
>> Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am69-sk.dts | 18 +++++++++---------
>>   1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> index 1e36965a1403..641236918379 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> @@ -1241,27 +1241,27 @@ partitions {
>>   
>>   			partition@0 {
>>   				label = "ospi.tiboot3";
>> -				reg = <0x0 0x100000>;
>> +				reg = <0x0 0x80000>;
>>   			};
>>   
>> -			partition@100000 {
>> +			partition@80000 {
>>   				label = "ospi.tispl";
>> -				reg = <0x100000 0x200000>;
>> +				reg = <0x80000 0x200000>;
>>   			};
>>   
>> -			partition@300000 {
>> +			partition@280000 {
>>   				label = "ospi.u-boot";
>> -				reg = <0x300000 0x400000>;
>> +				reg = <0x280000 0x400000>;
>>   			};
>>   
>> -			partition@700000 {
>> +			partition@680000 {
>>   				label = "ospi.env";
>> -				reg = <0x700000 0x40000>;
>> +				reg = <0x680000 0x40000>;
>>   			};
>>   
>> -			partition@740000 {
>> +			partition@6c0000 {
>>   				label = "ospi.env.backup";
>> -				reg = <0x740000 0x40000>;
>> +				reg = <0x6c0000 0x40000>;
>>   			};
>>   
>>   			partition@800000 {
>> -- 
>> 2.34.1
>>
Prasanth Mantena Sept. 2, 2024, 6:01 a.m. UTC | #4
On 20:38-20240830, Beleswar Prasad Padhi wrote:
> 
> On 30-08-2024 14:52, Nishanth Menon wrote:
> > On 14:37-20240830, Beleswar Padhi wrote:
> > > OSPI NOR flash was partitioned with a size of 1 MB for the initial
> > > bootloader ("ospi.tiboot3"). On the AM69-SK board, boot failures were
> > > sometimes observed when the initial bootloader size exceeded 512 KB. To
> > Why does the boot fail when > 512MB?
> 
> 
> It is a limitation by BOOT ROM where it can not bring up the initial
> bootloader when its size exceeds 512 KB in the DFU boot mode.
> 
> > 
> > > address this, the initial bootloader image has been optimized to be
> > > smaller than 512 KB.
> > > 
> > > Therefore, limit the first OSPI partition size to 512 KB and adjust the
> > > remaining size across the subsequent partitions.
> > I am NOT a fan of redoing flash partition organization of platforms that
> > are already in production - all kinds of ecosystem messes happen as a
> > result. Alternatively - give the 512K to u-boot tispl partition and
> > leave all others as is - this will at least allow people's current env
> > to be retained.
> 
> 
> This sounds good to me. I will let Prasanth comment over this.
> 

We can align things in u-boot level rather than changing anything here.
This patch can be dropped Beleswar.

> > 
> > > Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
> > > ---
> > >   arch/arm64/boot/dts/ti/k3-am69-sk.dts | 18 +++++++++---------
> > >   1 file changed, 9 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> > > index 1e36965a1403..641236918379 100644
> > > --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> > > +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> > > @@ -1241,27 +1241,27 @@ partitions {
> > >   			partition@0 {
> > >   				label = "ospi.tiboot3";
> > > -				reg = <0x0 0x100000>;
> > > +				reg = <0x0 0x80000>;
> > >   			};
> > > -			partition@100000 {
> > > +			partition@80000 {
> > >   				label = "ospi.tispl";
> > > -				reg = <0x100000 0x200000>;
> > > +				reg = <0x80000 0x200000>;
> > >   			};
> > > -			partition@300000 {
> > > +			partition@280000 {
> > >   				label = "ospi.u-boot";
> > > -				reg = <0x300000 0x400000>;
> > > +				reg = <0x280000 0x400000>;
> > >   			};
> > > -			partition@700000 {
> > > +			partition@680000 {
> > >   				label = "ospi.env";
> > > -				reg = <0x700000 0x40000>;
> > > +				reg = <0x680000 0x40000>;
> > >   			};
> > > -			partition@740000 {
> > > +			partition@6c0000 {
> > >   				label = "ospi.env.backup";
> > > -				reg = <0x740000 0x40000>;
> > > +				reg = <0x6c0000 0x40000>;
> > >   			};
> > >   			partition@800000 {
> > > -- 
> > > 2.34.1
> > >
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
index 1e36965a1403..641236918379 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
@@ -1241,27 +1241,27 @@  partitions {
 
 			partition@0 {
 				label = "ospi.tiboot3";
-				reg = <0x0 0x100000>;
+				reg = <0x0 0x80000>;
 			};
 
-			partition@100000 {
+			partition@80000 {
 				label = "ospi.tispl";
-				reg = <0x100000 0x200000>;
+				reg = <0x80000 0x200000>;
 			};
 
-			partition@300000 {
+			partition@280000 {
 				label = "ospi.u-boot";
-				reg = <0x300000 0x400000>;
+				reg = <0x280000 0x400000>;
 			};
 
-			partition@700000 {
+			partition@680000 {
 				label = "ospi.env";
-				reg = <0x700000 0x40000>;
+				reg = <0x680000 0x40000>;
 			};
 
-			partition@740000 {
+			partition@6c0000 {
 				label = "ospi.env.backup";
-				reg = <0x740000 0x40000>;
+				reg = <0x6c0000 0x40000>;
 			};
 
 			partition@800000 {