Commit Graph

29 Commits

Author SHA1 Message Date
Ioannis Glaropoulos 735f40b330 boards: do not force TF-M isolation level 2 for STM32L562/L552 boards
We do not need to force TFM Isolation Level 2 for the
STM32 board that can build with TM-M. We remove the
respective Kconfig setting. We also remove the Kconfig
overlay for STM32L562 board in the psa_level1 sample,
which was used for forcing Isolation Level 1; this is
not needed any more.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-16 13:33:32 +02:00
Erwan Gouriou 1bbee0a285 boards: STM32L5: Update TFM related instructions
On STM32L5 based boards, rework the TFM build/flash instructions
to minimize potential confusions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-04-09 08:27:07 -04:00
Yestin Sun d2403d07f3 boards: arm: nucleo_l552ze_q: add support for hardware RNG
Added support for RNG for nucleo_l552ze_q board, and updated
the document.

Tested with sample entropy project.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-29 13:43:20 -04:00
Kumar Gala 98d691e223 boards: stm32: Remove unneeded zephyr_include_directories
The include of ${ZEPHYR_BASE}/drivers isn't needed anymore for
board code so remove it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-03-24 05:38:58 -04:00
Yestin Sun 93ff119afc boards: nucleo_l552ze_q: Leverage consolidated TFM signing code
This commit removes the signing commands from the post build steps,
in order to leverage the consolidated TFM signing code.

Also with the support to adjust the hex base address when signing,
there is no need to run the TFM_UPDATE.sh script. We can use west
flash to flash the merged hex file on the board.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Erwan Gouriou b17530c986 boards: stm32: Remove redundant CORTEX_M_SYSTICK=y
CORTEX_M_SYSTICK is enabled by default on all STM32 based targets,
in common soc Kconfig files.
Forcing its definition in board files is redundant and prevents
to disable it when activating LPTIM as ticker.
Remove these definitions

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-03-06 09:03:29 -06:00
Torsten Rasmussen dfa52a3ba7 module: moving TFM CMakeLists.txt into Zephyr repo
This commit moves TFM CMakeLists.txt into Zephyr and relocates the
Kconfig.tfm file under the modules/tfm folder.

Updates the manifest to point to related TFM changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-16 10:01:36 +01:00
Øyvind Rønningstad 3f9d277bdc boards: Use tfm target properties for executable paths
for the signing procedures for boards an521, nrf5340, nrf9160,
nucleo_l552ze_q, and musca_b1.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-12-14 11:24:16 +01:00
Erwan Gouriou 610fd27164 boards: nulceo_l552ze_q: Enable MPU on ns target
The bug on TFM that prevented to enable MPU on NS side is
fixed on TFM current version.
MPU can now be safely enabled on NS target.

Fixes: #27809

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-25 14:27:11 +02:00
Andrei Gansari c1356f6a11 boards: nucleo_l552ze_q: set board isolation to 2
According to new Kconfig.tfm isolation is set by default to 2 on Nucleu
L552ZE Q board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-11-17 17:26:20 +02:00
Øyvind Rønningstad a28da5118d tfm: Configure TFM via Kconfig instead of Cmake
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.

Update west.yml to bring in Cmake changes that use the new KConfigs.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Erwan Gouriou bf62ef172e boards: stm32: Remove pinmux.c files
Following migration of pinctrl configuration from pinmux.c files
to device tree and deprecation of pinctrl defines, remove
pinmux.c files when possible.
Additionally remove the CMakeLists.txt files when it makes sense.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-11-03 11:11:04 +01:00
Ioannis Glaropoulos 49c56b4071 boards: nucleo_l552ze_q_ns: pass compiler name to the post-build script
Pass the compiler name and path to the TF-M post-build
script as an argument, so the TF-M build can work with
the Zephyr SDK as well (not only with the GNU ARM embedded
toolchain.)

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos 310999da5b boards: arm: update tfm post-build scripts after upmerge
Update the TF-M post-build scripts in the relevant
ARM platforms in the wake of updating TF-M to the
latest upstream.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos c9fd62a2ea boards: arm: update board definitions due to new TF-M build system
TF-M related information in the relevant board definitions
needs to be updated in the wake of the new TF-M Build
system.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Jeremy LOCHE 339402d094 boards: nucleo_l552ze_q: configure serial pins from DT
lpuart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Erwan Gouriou ee3dab3082 boards: nucleo_l552ze_q_ns: Use dts flash partitioning.
Provide device tree flash partition in order to configure
and flash non secure binary.
Flash partitioning depends on TFM configuration and use case,
so it is provided as an overlay in the sample it is used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 15:43:28 +02:00
Erwan Gouriou 3ab5ac81ca boards: stm32: Turn hardware stack protection on by default
Enable HW stack protection by default on all STM32 when possible.
This excludes all series based on M0(FO) and M0+(G0/L0).
Also this is made only on boards with enabled MPU (SRAM > 64K).

Cf similar change on nRF boards: #28470

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-30 10:46:16 -05:00
Erwan Gouriou 8efd1d7767 boards/arm: Remove soc compatible from board compatible
There's no reason to add soc compatible at this level.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-30 09:54:41 -05:00
Erwan Gouriou 209429338a boards: nucleo_l552ze_q: Fix connectors image
Add correct image for nucleo_l552ze_q "zio" connectors.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-23 13:10:40 -05:00
Ioannis Glaropoulos 2eaef86577 boards: nucleo_l552ze_q: do not offset the image by default by 0x400.
We only need to offset the start of the non-secure image
by 0x400, if TFM is built with BL2 support. In this case
we use the ROM_START_OFFSET Kconfig switch and we set it
to 0x400, which is the default BL2 Header size value in
TF-M builds. This instructs the linker to offset the beginning
of the ROM section by 0x400. In other words, we do not need
to statically move the start of the image by 0x400 (using
FLASH_BASE_ADDRESS or FLASH_LOAD_OFFSET) when building for
nucleo_l552ze_q 'non-secure'. This fixes an issue that
prevents from running Zephyr + TFM without BL2 support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-23 15:05:43 +02:00
Erwan Gouriou 04113e2b35 boards: nucleo: Recommand pyocd pack --update command
Running pack --update gives more change to the pack --install to
succeed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-09-03 21:54:37 +02:00
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Nolwenn Violette fb88b0aafc sample: tfm_ipc: Add nucleo_l552ze_q support
This commit adds the signing commands and the configuration required
to build a non secure image for a nucleo_l552ze_q.

Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
2020-08-27 12:02:16 +02:00
Nolwenn Violette 522235e418 boards: nucleo_l552ze_q: Add non secure target
This commit adds a second target for the nucleo_l552ze_q board.
The non secure target is configured for TFM applications.

Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
2020-08-27 12:02:16 +02:00
Erwan Gouriou f9d5df3937 boards: stm32: pinmux: Restore Kconfig control on pinmux (serial)
In order to avoid pin configuration conflicts between peripherals,
add CONFIG_SERIAL flag to for each serial pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-20 12:09:19 +02:00
Martí Bolívar 6e8775ff84 devicetree: remove DT_HAS_NODE_STATUS_OKAY
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 18:24:42 +02:00
Erwan Gouriou f81c5547f2 boards: nucleo_l552ze_q: Set system clock to 110MHz
Use MSI as PLL source. This enables to run system clock at 110MHz.
To achieve this, voltage regulator should be set to scale 0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 6d31b1075a boards: Add support for nucleo_l552ze
Tested with hello_world, basic/blinky, basic/button.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00