Skip to content

Commit

Permalink
boards: raspberrypi: rp2040-zero,xiao_rp2040: fixed inconsistencies
Browse files Browse the repository at this point in the history
There were some inconsistencies in flash memory for both
of these boards where they do not match their stated specs.
This commit fixes the inconsistencies.

Signed-off-by: Nicolas Munnich <[email protected]>
  • Loading branch information
Nick-Munnich committed Feb 1, 2025
1 parent 9791034 commit 97c2f83
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions boards/seeed/xiao_rp2040/xiao_rp2040.dts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};

/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 2MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code";
reg = <0x100 (DT_SIZE_M(2) - 0x100)>;
Expand Down
2 changes: 1 addition & 1 deletion boards/seeed/xiao_rp2040/xiao_rp2040.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: XIAO RP2040
type: mcu
arch: arm
flash: 2048
ram: 256
ram: 264
toolchain:
- zephyr
- gnuarmemb
Expand Down
6 changes: 3 additions & 3 deletions boards/waveshare/rp2040_zero/rp2040_zero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
};

&flash0 {
reg = <0x10000000 DT_SIZE_M(16)>;
reg = <0x10000000 DT_SIZE_M(2)>;

partitions {
compatible = "fixed-partitions";
Expand All @@ -44,11 +44,11 @@

/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 16MB minus the 0x100 bytes taken by the bootloader.
* size is 2MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code-partition";
reg = <0x100 (DT_SIZE_M(16) - 0x100)>;
reg = <0x100 (DT_SIZE_M(2) - 0x100)>;
read-only;
};
};
Expand Down
2 changes: 1 addition & 1 deletion boards/waveshare/rp2040_zero/rp2040_zero.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ identifier: rp2040_zero
name: Waveshare RP2040-Zero
type: mcu
arch: arm
flash: 16384
flash: 2048
ram: 264
toolchain:
- zephyr
Expand Down

0 comments on commit 97c2f83

Please sign in to comment.