Commit graph

89895 commits

Author SHA1 Message Date
Daniel Leung f7bd449c52 modules: sof: use k_smp_cpu_custom_start for core power up
This updates the SOF to use the newly introduced
k_smp_cpu_custom_start() for secondary core power up.
This removes the need to mirror part of the SMP power up
code from Zephyr kernel into SOF tree. Also removes the need
to expose private kernel code to SOF.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung ea797f28b6 tests: smp_boot_delay: extend to test custom CPU start func
This extends the smp_boot_delay test to test the newly
introduced function k_smp_cpu_custom_start().

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung eefaeee061 kernel: smp: introduce k_smp_cpu_resume
This provides a path to resume a previously suspended CPU.
This differs from k_smp_cpu_start() where per-CPU kernel
structs are not initialized such that execution context
can be saved during suspend and restored during resume.
Though the actual context saving and restoring are
platform specific.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung fe66e35db0 kernel: smp: put comment on SMP code
Adds some comments to the SMP code to, hopefully, make it
a bit more clear to future readers.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung 89b231e7e2 kernel: smp: introduce k_smp_cpu_start
This renames z_smp_cpu_start() to k_smp_cpu_start().
This effectively promotes z_smp_cpu_start() into a public API
which allows out of tree usage. Since this is a new API,
we can afford to change it signature, where it allows
an additional initialization steps to be done before a newly
powered up CPU starts participating in scheduling threads
to run.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung ad87d2667c tests: kernel/smp_boot_delay: make test more generic
This makes the test a bit more generic so it can run on
other SMP enabled platforms. Though, we don't need CI
running this on every SMP platforms as this is not
testing the mechanism of bringing up a CPU. That is
being tested on the other SMP test. Therefore, only
enable qemu_x86_64 to be testing in CI so that this
feature will still be tested on CI.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung 803e0e452f kernel: amend wording on CONFIG_SMP_BOOT_DELAY
This extends the wording so that not only architecture code can
start secondary CPUs at a later time. Also adds a missing 'to'.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung f3bcf48590 boards: qemu_x86_64: amend DTS to have 2 CPU nodes
qemu_x86_64 has default of 2 CPUs but the device tree only
has 1. For correctness, add another CPU node to the tree.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Daniel Leung 991523f462 x86: add CODE_UNREACHABLE to z_x86_cpu_init
For some reason, unrelated code change triggered compiler
warning about this function returns even though it is
marked nonreturn. So add CODE_UNREACHABLE to silence
the warning, possibly to catch any errors.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-17 11:57:20 -05:00
Emil Gydesen 77c76fd7aa doc: Bluetooth: Update audio status table
Put CAP Commander into WIP.
Put PBP source and sink into done.
Put GMAP into done (minus samples).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-17 11:56:29 -05:00
Ajay Parida 4d854a193e net: mgmt: Print correct TWT teardown status message
Print success message for TWT teardown successful case.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-01-17 16:11:37 +00:00
Laurin Wolf f59ab74ba8 docs: lwm2m: fix example x509 CA certificate resource id
The resource ID of the CA certificate in the Security Object should
be 0/0/4 instead of 0/0/5

Signed-off-by: Laurin Wolf <laurin@l5w.de>
2024-01-17 16:11:04 +00:00
Alberto Escolar Piedras 33d4b6d148 manifest: Update nrf hw models to latest
* Update the HW models module to
6b6ae3652c92c95edd945dce6ad9ef9892aab89b

Including the following:
* 6b6ae36 UART: Minor optimization
* afe84c1 fake timer: Minor speed optimization for nrf52
* a5a4dfd RTC: Fix counter value when CLEAR after STOP

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-17 16:10:17 +00:00
Jukka Rissanen 3a37c5d987 net: shell: Require float printf support from libc
Various network shell commands like ping need floating
point support from libc so select the CONFIG_REQUIRES_FLOAT_PRINTF
option for it.

Fixes #67601

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-01-17 16:09:17 +00:00
Pisit Sawangvonganan ab2c9437d9 drivers: i2c: set 'i2c_driver_api' as 'static const'
This change marks each instance of the 'i2c_driver_api' as 'static const'.
The rationale is that 'i2c_driver_api' is used for declaring internal
module interfaces and is not intended to be modified at runtime.
By using 'static const', we ensure immutability, leading to usage of only
.rodata and a reduction in the .data area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-17 16:09:01 +00:00
Joakim Andersson 3a830433be tfm: Provide properties for selected TF-M toolchain for NS application
Provide properties for selected TF-M toolchain so that the NS
application will use the same toolchain as TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky ad9cdf06c4 samples: tfm_psa_test: Adapt to TF-M split build
The sample now builds the psa-arch-tests itself and doesn't rely anymore
on the TF-M module CMakeFile.
Additionally it will not run the zephyr main.c anymore but therefore only
uses the tf-m non-secure application.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky cac7f4058f modules: tf-m: Remove building of PSA arch tests
This removed the CMake code that builds the TF-M arch tests within the
TF-M CMakeFile. It will be moved to the tfm_integration/tfm_psa_test
sample CMakeFile.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f48467a2a6 tfm: Update TF-M regression tests sample to build NS app
Update the TF-M regression tests sample to build the NS app
in the tf-m-tests repository as an external project.

The regression tests need to provide test configurations to both
TF-M an NS app.
Duplicate configuration done in the spe/CMakeLists.txt to configure
TF-M image for the regression tests.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f49cbf13ca tfm: Remove TFM_BUILD_NS and update TFM_USE_NS_APP for NS build folder
TF-M no longer builds the NS app, but exports build files to api_ns
folder and expects the user to build the rest themselves.
Remove the option to build the NS app, and update the TFM_USE_NS_APP
to look for an output hex file in the tfm_ns folder.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson 6c927490d0 tfm: Add NS build support for zephyr out-of-tree nordic_nrf platform.
Add build of the NS application in the zephyr defined out-of-tree board
support for the nordic_nrf platform.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky e8eeecddcf sample: tfm_secure_partition: Change tfm_partition_defs to tfm_config
The target tfm_partition_defs got removed and  tfm_config gets used now so
updating it

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson 3398c98743 modules: mbedtls: Use TF-M PSA API headers
Use TF-M PSA API headers when compiling with TF-M enabled.

Fixes: #43249

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky dc7613865d modules: mbedtls: Add a mbedtls_ms_time implementation
MbedTLS 3.5.0 requires a implementation of mbedtls_ms_time giving a
time in ms for TLS 1.3
Therefor adding an alternative implementation using zephyrs
k_uptime_get

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky fbee1c61ed modules: mbedtls: Rename of psa_crypto_driver_wrappers
psa_crypto_driver_wrappers.c got changed to
psa_crypto_driver_wrappers_no_static.c

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson f5eecd500d tfm: nordic_nrf: Remove include of tfm_api.h, update install path
Update install path of tfm_ioctl_api.h, remove include of tfm_api.h

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson d931dded11 tfm: Use PSA error codes instead of TFM error codes
The TFM error codes are no longer in the interface headers.
All TF-M functions return PSA status codes, so use this here as well.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Joakim Andersson a14f42a817 modules: Update source, lib and include path for TF-M interface files
Update source lib and include path for TF-M interface files.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 8b257c058d modules: tf-m: Remove platform_ns target
The platform_ns library is no longer build with the split build anymore
so removing it.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 11175c3ad3 tf-m: Change NS include path for TF-M 2.0.0
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 78fd53fae7 modules: tf-m: nrf9160: Change to cpuarch.cmake
The preload.cmake was renamed to cpuarch.cmake in TF-M so change

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 132bfc45b7 modules: tf-m: nrf9120: Change to cpuarch.cmake
The preload.cmake was renamed to cpuarch.cmake in TF-M so change

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 21098acdec modules: tf-m: nrf5340_cpuapp: Change to cpuarch.cmake
The preload.cmake was renamed to cpuarch.cmake in TF-M so change

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 85ecdd70e4 modules: mbedtls: Adapt source list to 3.5.0
remove hash_info.c and add ecp_curves_new.c

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky e53485c012 modules: mbedtls: Sort base src
Sort the list of source files for the mbedTLSBase library

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Markus Swarowsky 917bec37d0 manifest: TF-M v2.0.0 update
Update TF-M to version 2.0.0 including
MbedTLS to v3.5.0
TF-M-Tests to v2.0.0
PSA-Arch_Tests to v23.06_API1.5_ADAC_EAC

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Pisit Sawangvonganan b8105c1408 drivers: bluetooth: ambiq: fix the naming of rx message buffer
This change renames the RX message buffer from g_hciRxMsg to rxmsg,
as it does not follow the Zephyr coding style.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-17 16:51:53 +01:00
Pisit Sawangvonganan 61e301a059 bluetooth: hci: place tx/rx message buffer in .noinit section
This change relocates the tx/rx message buffer from the .bss section
to the .noinit section. This adjustment is aimed at reducing boot time by
lowering the size of the .bss section, without impacting the operational
functionality of the buffer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-17 16:51:53 +01:00
Bjarki Arge Andreasen 358f1ff934 tests: modem: cmux: Implement TRANSMIT_IDLE into test suite
Use transmit idle event to synchronize with data transmitted
through DLCI pipes to test TRANSMIT_IDLE implementation.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 09:20:50 -06:00
Bjarki Arge Andreasen c114627853 modem: cmux: Implement TRANSMIT_IDLE event
Implement transmit idle event both for transmitting data to the
bus, and for the individual DLCI channels.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-17 09:20:50 -06:00
Armando Visconti 06edc37521 samples: sensor: lps22hb: fix sample document
The LPS22HB is a pressure and temperature sensor, but
this sample document is wrongly mentioning "humidity".

Fix #66117

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-17 08:28:35 -06:00
Morten Priess 056d5a354b Bluetooth: controller: Handle peripheral CIS creation latency
Instead of asserting, handle CIS creation latency for the peripheral by
finding next valid ISO event at which to start the CIG ticker.

Refactored calculations of the cig_offset to separate functions, to be
used also when calculating a new start offset.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-01-17 14:44:34 +01:00
Daniel DeGrasse c4e48b66bd tests: drivers: audio: add dmic API test
Add DMIC API test, intended to verify DMIC drivers are functioning
correctly within the DMIC API.

The test verifies the following:
- Mono channel audio
- Stereo channel audio
- Using maximum number of channels supported by DMIC IP
- Pausing/restarting channels
- Checks to make sure invalid channel maps are rejected by the DMIC.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse ff4143acfb boards: arm: mimxrt595_evk_cm33: enable DMIC0 channels 0 and 1
Enable L/R channel pair for DMIC0 on the RT595 EVK. The RT595 EVK has a
pair of MEMS microphones wired to PDM channel 0 and 1, so these channels
are configured with appropriate gain and filter settings for the MEMS
microphones.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse 9a14bece20 dts: arm: nxp_rt5xx: add definition of the DMIC to devicetree
Add definition of the DMIC to the RT5xx devicetree, including all
PDM channels.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse 6d562f1750 soc: arm: nxp_imx: rt5xx: clock DMIC0
Clock DMIC0 from the audio PLL when DMIC driver class is enabled.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse 6fbd76bef3 drivers: audio: dmic: add driver for NXP DMIC peripheral
Add driver for NXP DMIC peripheral. This peripheral is present on the
iMX RT5xx and iMX RT6xx parts, as well as some LPC SOCs. The following
features are supported:
- up to 2 simultaneous channels of L/R PCM data (4 channels are not
  supported due to limitations of the DMA engine)
- individual configuration of gain and filter parameters for each DMIC
  channel input

The driver has been tested with up to 4 PCM data streams (2 L/R channels),
as well as the MEMS microphones present on the RT595 EVK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Co-authored-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse a5ef1a296a drivers: clock_control: mcux_syscon: add definition for DMIC clock
Add definition for DMIC clock source to LPC SYSCON clock control driver.
This constant allows drivers to get the DMIC bit clock frequency.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse b7e028b31c include: audio: dmic: add DMIC_STATE_ERROR enum
Add DMIC_STATE_ERROR enum. This can be used by DMIC drivers for
instances in which a significant error has occurred (typically when the
DMIC cannot allocate additional buffers for PCM data and starves)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-17 14:43:52 +01:00
Daniel DeGrasse bedb611549 include: audio: dmic: fixup parse_channel_map implementation
Fixup parse_channel_map implementation. The previous implementation of
this function did not use the "channel_map" values passed in by the
user, and would not return correct values for the PDM hardware
controller or L/R value. This function is not being used in tree, so
correcting the implementation to align with documentation should have
minimal affect.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-17 14:43:52 +01:00