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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>