mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout
@ 2020-07-11  9:02 Ahmad Fatoum
  2020-07-11  9:02 ` [PATCH 2/2] fixup! ARM: at91: sama5d2: read back memory size from DDRAM controller Ahmad Fatoum
  2020-07-14 18:37 ` [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2020-07-11  9:02 UTC (permalink / raw)
  To: barebox

Linux v5.8-rc1 adds partitions to the flash@0 node, which now overlap
with the partitions we define and resulting in errors:

  ERROR: m25p0.barebox: New partition m25p0.barebox conflicts
	with m25p0.at91bootstrap
  ERROR: m25p0.barebox-environment: New partition
  	m25p0.barebox-environment conflicts with m25p0.bootloader

We don't want to reuse those partitions as their name may and probably
will change (they have leading zeroes in the unit address).
We could use the &{/path/to/partition} syntax, but that might be broken
soon as well, as the nodes aren't inside a partitions node with a
"fixed-partitions" compatible.
The busses also don't align with the yaml schema and might be renamed.

Nuke the full flash@0 node and supply ours and avoid these problems.
The offsets of the partitions have been adjusted to coincide with the
upstream offsets for second stage bootloader and environment.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
Hello Sascha,

The brekage doesn't seem to end..
if possible please reorder before v5.8-rc1 dts/ sync.
---
 arch/arm/dts/at91-sama5d27_som1_ek.dts | 28 +++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/at91-sama5d27_som1_ek.dts b/arch/arm/dts/at91-sama5d27_som1_ek.dts
index befee89ad78a..97a326dd2b26 100644
--- a/arch/arm/dts/at91-sama5d27_som1_ek.dts
+++ b/arch/arm/dts/at91-sama5d27_som1_ek.dts
@@ -31,18 +31,28 @@
 };
 
 &qspi1 {
+	/delete-node/ flash@0;
+
 	flash@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <80000000>;
+		m25p,fast-read;
 
-		partition@0 {
-			label = "barebox";
-			reg = <0x0 0x80000>;
-		};
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			barebox@40000 {
+				label = "barebox";
+				reg = <0x40000 0xc0000>;
+			};
 
-		barebox_env: partition@80000 {
-			label = "barebox-environment";
-			reg = <0x80000 0x80000>;
+			barebox_env: barebox-env@100000 {
+				label = "barebox-environment";
+				reg = <0x100000 0x40000>;
+			};
 		};
 	};
 };
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] fixup! ARM: at91: sama5d2: read back memory size from DDRAM controller
  2020-07-11  9:02 [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Ahmad Fatoum
@ 2020-07-11  9:02 ` Ahmad Fatoum
  2020-07-14 18:37 ` [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2020-07-11  9:02 UTC (permalink / raw)
  To: barebox

The SiP node has a memory node embedded that has a bigger size than some
of the smaller variants. We now delete the node and have the size read
back from the memory controller. This means we no longer need sizes for
sama5d2 boards in the device tree (and must not have any, because
referencing non-existent &{/memory} is a compile error.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/arm/dts/at91-sama5d27_giantboard.dts | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/dts/at91-sama5d27_giantboard.dts b/arch/arm/dts/at91-sama5d27_giantboard.dts
index 961474d23b44..2ba3ff217101 100644
--- a/arch/arm/dts/at91-sama5d27_giantboard.dts
+++ b/arch/arm/dts/at91-sama5d27_giantboard.dts
@@ -46,10 +46,6 @@
 	};
 };
 
-&{/memory} {
-	reg = <0x20000000 0x8000000>;
-};
-
 &slow_xtal {
 	clock-frequency = <32768>;
 };
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout
  2020-07-11  9:02 [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Ahmad Fatoum
  2020-07-11  9:02 ` [PATCH 2/2] fixup! ARM: at91: sama5d2: read back memory size from DDRAM controller Ahmad Fatoum
@ 2020-07-14 18:37 ` Sascha Hauer
  2020-07-14 18:45   ` Ahmad Fatoum
  1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2020-07-14 18:37 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Sat, Jul 11, 2020 at 11:02:02AM +0200, Ahmad Fatoum wrote:
> Linux v5.8-rc1 adds partitions to the flash@0 node, which now overlap
> with the partitions we define and resulting in errors:
> 
>   ERROR: m25p0.barebox: New partition m25p0.barebox conflicts
> 	with m25p0.at91bootstrap
>   ERROR: m25p0.barebox-environment: New partition
>   	m25p0.barebox-environment conflicts with m25p0.bootloader
> 
> We don't want to reuse those partitions as their name may and probably
> will change (they have leading zeroes in the unit address).
> We could use the &{/path/to/partition} syntax, but that might be broken
> soon as well, as the nodes aren't inside a partitions node with a
> "fixed-partitions" compatible.
> The busses also don't align with the yaml schema and might be renamed.
> 
> Nuke the full flash@0 node and supply ours and avoid these problems.
> The offsets of the partitions have been adjusted to coincide with the
> upstream offsets for second stage bootloader and environment.
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
> Hello Sascha,
> 
> The brekage doesn't seem to end..
> if possible please reorder before v5.8-rc1 dts/ sync.
> ---

I haven't reordered it, please see if you are happy with the result
anyway. It looks like I would have to put the whole at91 stack before
the dts updates, I rather don't do that.

Regards,
 Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout
  2020-07-14 18:37 ` [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Sascha Hauer
@ 2020-07-14 18:45   ` Ahmad Fatoum
  0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2020-07-14 18:45 UTC (permalink / raw)
  To: Sascha Hauer, Ahmad Fatoum; +Cc: barebox



On 7/14/20 8:37 PM, Sascha Hauer wrote:
> On Sat, Jul 11, 2020 at 11:02:02AM +0200, Ahmad Fatoum wrote:
>> Linux v5.8-rc1 adds partitions to the flash@0 node, which now overlap
>> with the partitions we define and resulting in errors:
>>
>>   ERROR: m25p0.barebox: New partition m25p0.barebox conflicts
>> 	with m25p0.at91bootstrap
>>   ERROR: m25p0.barebox-environment: New partition
>>   	m25p0.barebox-environment conflicts with m25p0.bootloader
>>
>> We don't want to reuse those partitions as their name may and probably
>> will change (they have leading zeroes in the unit address).
>> We could use the &{/path/to/partition} syntax, but that might be broken
>> soon as well, as the nodes aren't inside a partitions node with a
>> "fixed-partitions" compatible.
>> The busses also don't align with the yaml schema and might be renamed.
>>
>> Nuke the full flash@0 node and supply ours and avoid these problems.
>> The offsets of the partitions have been adjusted to coincide with the
>> upstream offsets for second stage bootloader and environment.
>>
>> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
>> ---
>> Hello Sascha,
>>
>> The brekage doesn't seem to end..
>> if possible please reorder before v5.8-rc1 dts/ sync.
>> ---
> 
> I haven't reordered it, please see if you are happy with the result
> anyway. It looks like I would have to put the whole at91 stack before
> the dts updates, I rather don't do that.

Ah, I missed that they don't apply cleanly.
Well, I think it's ok. Only environment will be broken between these
two comments.

> 
> Regards,
>  Sascha
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2020-07-14 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11  9:02 [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Ahmad Fatoum
2020-07-11  9:02 ` [PATCH 2/2] fixup! ARM: at91: sama5d2: read back memory size from DDRAM controller Ahmad Fatoum
2020-07-14 18:37 ` [PATCH 1/2] ARM: at91: dts: sama5d27-som1: adapt to upstream partition layout Sascha Hauer
2020-07-14 18:45   ` Ahmad Fatoum

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