boards: st: nucleo_l552ze_q: Populate ns flash partitions

Rather than providing flash partitions in samples, provide default
partition (no tests) as part of the board ns variant default configuration.

Update or remove related overlays.

Update ns variant yaml file to specify actual flash available for the
ns application (36K).

Additionaly, fix comment in b_u585i_iot02a_ns.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2024-03-14 16:47:57 +01:00 committed by Fabio Baltieri
parent 7a7abb7b18
commit c7e084e75b
5 changed files with 53 additions and 58 deletions

View file

@ -54,12 +54,12 @@
label = "image-0-nonsecure";
reg = <0x00098000 DT_SIZE_K(512)>;
};
/* Secure image primary slot */
/* Secure image secondary slot */
slot1_partition: partition@118000 {
label = "image-1";
reg = <0x00118000 DT_SIZE_K(384)>;
};
/* Non-secure image primary slot */
/* Non-secure image secondary slot */
slot1_ns_partition: partition@178000 {
label = "image-1-nonsecure";
reg = <0x00178000 DT_SIZE_K(512)>;

View file

@ -19,6 +19,7 @@
zephyr,shell-uart = &lpuart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_ns_partition;
};
aliases {
@ -26,3 +27,47 @@
sw0 = &user_button;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* Following flash partition is compatible with requirements
* given in TFM configuration given for current board:
* multiple image boot, no tests.
* It might require adjustment depending on evolutions on TFM.
*/
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(80)>;
read-only;
};
/* Secure image primary slot */
slot0_partition: partition@14000 {
label = "image-0";
reg = <0x00014000 DT_SIZE_K(180)>;
};
/* Non-secure image primary slot */
slot0_ns_partition: partition@41000 {
label = "image-0-nonsecure";
reg = <0x00041000 DT_SIZE_K(36)>;
};
/* Secure image secondary slot */
slot1_partition: partition@4a000 {
label = "image-1";
reg = <0x0004a000 DT_SIZE_K(180)>;
};
/* Non-secure image secondary slot */
slot1_ns_partition: partition@77000 {
label = "image-1-nonsecure";
reg = <0x00077000 DT_SIZE_K(36)>;
};
/* Applicative Non Volatile Storage */
/* Not available in this config, use secure storage */
};
};

View file

@ -9,5 +9,5 @@ supported:
- gpio
- dac
ram: 192
flash: 328
flash: 36
vendor: st

View file

@ -1,54 +0,0 @@
/*
* Copyright (c) 2020 Linaro Limited.
*
* SPDX-License-Identifier: Apache-2.0
*/
/* This partition table should be used along with TFM configuration:
* - TEST_S=OFF (NO REGRESSION)
* - TFM_PSA_API=ON (IPC)
*
* In this configuration, TFM binary does not include tests.
* The partition sizes are compatible with the TF-M platform
* flash_layout.h.
*/
/ {
chosen {
zephyr,code-partition = &slot1_partition;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(80)>;
read-only;
};
/* Secure image primary slot */
slot0_partition: partition@14000 {
label = "image-0";
reg = <0x00014000 DT_SIZE_K(180)>;
};
/* Non-secure image primary slot */
slot1_partition: partition@41000 {
label = "image-1";
reg = <0x00041000 DT_SIZE_K(36)>;
};
/*
* The flash starting at 0x7F000 and ending at
* 0x80000 is reserved for the application.
*/
storage_partition: partition@7f000 {
label = "storage";
reg = <0x0007F000 DT_SIZE_K(4)>;
};
};
};

View file

@ -13,10 +13,14 @@
/ {
chosen {
zephyr,code-partition = &slot1_partition;
zephyr,code-partition = &slot0_ns_partition;
};
};
/delete-node/ &slot1_partition;
/delete-node/ &slot1_ns_partition;
&flash0 {
partitions {