Commit graph

1112 commits

Author SHA1 Message Date
David Brown
a30dbd5fe8 manifest: Upgrade to trusted-firmware-m 1.8.0
Update trusted-firmware-m to 1.8.0, mbedtls to 3.4.0, and tf-m-tests to
1.8.0.  Includes minor cmake changes due to file renames and such, as well
as adjusting the return type of a callback function that has changed since
the previous version of trusted-firmware-m.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-07-21 19:08:01 +00:00
Marc Desvaux
6d824667df modules: align Kconfig.stm32
conforms the Kconfig.stm32 file with the CmakeLists.txt files
for STM32H5x/C0x/U5x/WBx series

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-07-19 09:51:03 +00:00
Raoul Rubien
6f74f53efc drivers: sensors: ilps22qs: added item in kconfig
The ILPS22QS sensor cannot be enabled unless USE_STDC_ILPS22QS is defined.
This PR fixes #57825 add adds the missing item in Kconfig.st file.

Signed-off-by: Raoul Rubien <rubienr@sbox.tugraz.at>
2023-07-18 09:53:40 +00:00
Przemyslaw Bida
96893e84ce net: openthread: Refactor openthread entropy otPlatEntropyGet.
This commit replaces direct entropy device driver class with
`sys_csrand_get`, which is recommended way of getting crypto
secure random buffer.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-07-17 13:22:16 +00:00
Przemyslaw Bida
54c991b8f2 net: openthread: regular openthread upmerge to f7690fe
Adding new kconfig option: CONFIG_OPENTHREAD_TX_QUEUE_STATISTICS

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-07-17 10:13:49 +00:00
Tomasz Moń
440af3ecc8 modules: hal_nordic: nrfx: Make ISO IN ZLP configurable
nRF USBD ISOINCONFIG register controls USBD behavior after receiving IN
token addressed to ISO IN endpoint when the endpoint was not armed with
data. The options are:
  * NoResp, in which case there is no response (i.e. bus timeout)
  * ZeroData, in which case device responds with ZLP

This commit both makes the ISOINCONFIG value configurable and changes
the default from NoResp to ZeroData. For reference, DWC_otg controller
will always send ZLP in such case and does not have NoResp equivalent.

Automatically sending ZLP when ISO IN endpoint is not armed resolves
periodic audio dropouts observed on Mac OS with USB Audio headset
sample. Apple USB Audio class driver will attempt recovery (abort all
pending URBs, switch to alternate config 0, switch to active alternate
config and submit new URBs) every time it sees kIOReturnNotResponding
status code. During recovery no audio data can be transferred and
therefore there are gaps in the audio stream.

Apple USB Audio driver sees kIOReturnNotResponding when there is bus
timeout (i.e. IN token was sent to nRF when the endpoint was not armed
and NoResp option was active). Activating ZeroData option results in
perfectly fine (albeit short) packet that does not trigger interface
recovery and thus fixes the USB Audio issues on Mac OS.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-07-14 09:37:04 +02:00
Adam Wojasinski
9aeb497321 modules: hal_nordic: nrfx_config: Align to updates in nrfx 3.1.0
Align config files to templates introduced with nrfx 3.1.0 release

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-07-13 13:21:41 +02:00
Joakim Andersson
b21a537986 tfm: Fix board selection for Musca B1 board
Fix board selection for Musca B1 board.
The platform path in TF-M was changed in the TF-M 1.7.0 update.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-07-11 09:44:14 +02:00
Bill Waters
541482ff20 driver: i2c: infineon: Adding XMC4 I2C driver
- This includes the driver, test app, and sample app
- Only the boards\arm\xmc47_relax_kit board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-07-11 09:43:19 +02:00
Florian Grandel
4edf46d86c net: l2: ieee802154: radio: fix radio utils naming
The IEEE 802.15.4 stack defines radio API helpers that provide
simplified and encapsulated access to radio API features.

These helpers were missing the `_radio_` infix. This infix is introduced
to clearly distinguish between MAC and PHY concerns. While PHY features
may be shared between L2 implementations (including the functions
concerned here), this is not true for MAC features.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-10 09:29:10 +02:00
Eduardo Montoya
8e40304258 net: openthread: remove unneeded OPENTHREAD_MAX_CHILDREN default value
After https://github.com/openthread/openthread/pull/9213 there is no
need to reduce the `ChildMask` size for MTD builds.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-07-07 10:15:24 +00:00
Przemyslaw Bida
8a78148e61 manifest: openthread: regular openthread upmerge 37fb770
Implementation of new option:
`OPENTHREAD_OPERATIONAL_DATASET_AUTO_INIT`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-07-07 09:18:25 +02:00
Manuel Arguelles
6d88aa7d73 modules: mcux: allow to build with MCUX for NXP S32 devices
Some NXP S32 devices share common harwdware blocks with other non-S32
devices which are already supported using MCUX-based drivers. In order
to leverage existing support, allow to build with MCUX enabled for NXP
S32 family.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-06 14:19:23 -05:00
Marcin Niestroj
630555d9f6 mbedtls: fix _mbedtls_init() invocation
SYS_INIT() requires pointer to function that takes `void` now, instead of
pointer to device structure. Since the commit was developed before that
switch, it still invoked it with NULL. Fix that now.

Fixes:

  zephyr/modules/mbedtls/zephyr_init.c: In function 'mbedtls_init':
  zephyr/modules/mbedtls/zephyr_init.c:108:16: error: too many arguments \
                                              to function '_mbedtls_init'
    108 |         return _mbedtls_init(NULL);
        |                ^~~~~~~~~~~~~
  zephyr/modules/mbedtls/zephyr_init.c:86:12: note: declared here
     86 | static int _mbedtls_init(void)
        |

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-07-06 07:10:23 -04:00
Eugene Cohen
3e294acf31 mbedtls: add CONFIG_MBEDTLS_INIT
Add a config flag to enable conditional mbebtls
initialization at startup, defaulting to enabled.

Also add a function, mbedtls_init(), that should be
called by platforms that wish to initialise mbedtls
at a time of their choosing.

Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
Signed-off-by: Dave Aldridge <quic_daldridg@quicinc.com>
2023-07-06 11:45:08 +02:00
Fabio Baltieri
30fa612289 modules: define few undefined but referenced symbols
These are referenced by the "x module not available" message in
modules/Kconfig, but were only defined in the module, were generating an
undefined symbol warning when running CI compliance with no modules.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-05 09:11:02 +02:00
Najumon Ba
793910fdde build: west: add acpica module into zephyr project
Integrate acpica module into zephyr project for enable acpi bus
support.

Signed-off-by: Najumon Ba <najumon.ba@intel.com>
2023-06-30 17:53:01 +03:00
Jamie McCrae
ac95e57bbe modules: hal_nordic: nrf_802154: Make paths relative
Makes the files listed in the cmake file relative as they do not
need to be absolute paths.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-06-30 16:07:05 +02:00
Florian Grandel
c88a9ef272 segger: rtt: disable unsupported shell/log features
The RTT backend of the shell does not support several of the more
advanced terminal features. This commit proposes to inactivate these
features by default when RTT is selected as shell backend.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-23 14:42:41 +02:00
Przemyslaw Bida
f940a5a988 manifest: openthread: Regular openthread upmerge to 6d55738
Openthread upmerge to `6d55738`. Includes implementing of:
- `OPENTHREAD_CONFIG_RADIO_STATS_ENABLE`
- `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-06-23 09:20:23 +02:00
cyliang tw
512371b75b soc: arm: add support for nuvoton numaker m46x series
Add initial support for nuvoton numaker m46x SoC series including
basic init.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-21 09:26:00 +00:00
Florian Grandel
1ee4d3ed77 net: l2: ieee802154: document L1/L2 sep. of concerns
The method ieee802154_radio_handle_ack() does not belong to the
PHY/radio layer but to the L2 layer. It is a callback called from the
radio layer into the L2 layer and to be implemented by all L2 stacks.
This is the same pattern as is used for ieee802154_init(). The
'_radio_' infix in this function is therefore confusing and
conceptually wrong.

This change fixes the naming inconsistency and extensively documents
its rationale.

It is assumed that the change can be made without prior deprecation of the
existing method as in the rare cases where users have implemented custom
radio drivers these will break in obvious ways and can easily be fixed.

Nevertheless such a rename would not be justified on its own if it were
not for an important conceptual reason:

The renamed function represents a generic "inversion-of-control" pattern
which will become important in the TSCH context: It allows for clean
separation of concerns between the PHY/radio driver layer and the
MAC/L2 layer even in situations where the radio driver needs to be
involved for performance or deterministic timing reasons. This
"inversion-of-control" pattern can be applied to negotiate timing
sensitive reception and transmission windows, it let's the L2 layer
deterministically timestamp information elements just-in-time with
internal radio timer counter values, etc.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 16:20:21 -04:00
Aleksandr Khromykh
29895d8275 Bluetooth: Mesh: refactor mesh to use both tinycrypt and psa based crypto
A mesh key type has been added to be able to choose the different
key representation for different security libraries.
The type as well as some functionality related to Mesh key
management has been added as a public API.
If tynicrypt is chosen then keys have representation
as 16 bytes array. If mbedTLS with PSA is used then keys are
the PSA key id. Raw value is not kept within BLE Mesh stack
for mbedTLS. Keys are imported into the security library
and key ids are gotten back. This refactoring has been done
for the network(including all derivated keys), application,
device, and session keys.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-17 07:46:03 -04:00
Daniel Leung
2ba7855ddf modules: mipi-syst: support minimal C library
This allows the MIPI Sys-T library to be built with minimal C
library. This is due to lack of support for wchar in our
minimal C library. This simply tells the library to skip any
wchar support.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-06-17 07:31:26 -04:00
Florian Grandel
b224a099fd net: l2: ieee802154: standardize RSSI value
The RSSI value in net_pkt (net_pkt_cb_ieee802154.rssi) was used
inconsistently across drivers. Some drivers did cast a signed dBm value
directly to net_pkt's unsigned byte value. Others were assigning the
negative value of the signed dBm value and again others were offsetting
and stretching the signed dBm value linearly onto the full unsigned byte
range.

This change standardizes net_pkt's rssi attribute to represent RSSI on
the RX path as an unsigned integer ranging from 0 (–174 dBm) to 254 (80
dBm) and lets 255 represent an "unknown RSSI" (IEEE 802.15.4-2020,
section 6.16.2.8). On the TX path the rssi attribute will always be
zero. Out-of-range values will be truncated to max/min values.

The change also introduces conversion functions to and from signed dBm
values and introduces these consistently to all existing call sites. The
"unknown RSSI" value is represented as INT16_MIN in this case.

In some cases drivers had to be changed to calculate dBm values from
internal hardware specific representations.

The conversion functions are fully covered by unit tests.

Fixes: #58494

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-06-17 07:16:32 -04:00
Fabio Baltieri
b31215e34f modules: lvgl: replace LV_Z_DPI with LV_DPI_DEF
It looks like LV_Z_DPI is not used anywhere and only lived in the
context of an incorrect board symbol definition so far (moved to
Kconfig.lvgl in the previous patch).

This was probably meant to be LV_DPI_DEF (which actually exists in the
LVGL module) and was renamed incorrectly, fix it by renaming it
everywhere.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-13 07:26:29 -04:00
Fabio Baltieri
9d7bd52313 modules: lvgl: define the Kconfig types used in boards
Some boards override default for few LVGL LV_Z_* symbols. This causes
the build to fail if the module is not present in the system, and has
been worked around on one board by repeating the types in the board
Kconfig file.

Fix this properly by defining the known type for all symbols used in
boards in modules/Kconfig.lvgl.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-13 07:26:29 -04:00
Nathan Olff
833a228db4 tracing: sysview: implement RTT channel selection through KConfig
Implement Kconfig value for selecting the RTT channel to be used
by Segger SystemView

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2023-06-08 06:51:03 -04:00
Kevin Townsend
4f4f459d16 modules: tf-m: Add missing FWU API file
`tfm_fwu_api.c` was missing from the list of possible source files
to be exported from TF-M, which is required when
`CONFIG_TFM_PARTITION_FIRMWARE_UPDATE` is defined.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-06-05 10:48:31 -04:00
Robert Lubos
f3bdac91b2 net: ieee802154: Remove IEEE802154_2015 option usage
The IEEE802154_2015 option is misleading, as it does not introduce full
802.15.4-2015 standard compliance but only random bits, plus it's
defined at the radio driver level, which brings yet another confusion.
Because of that, the option will be deprecated, and respective parts of
code that made use of it converted to use more specific configurations:

* nRF driver will now use CONFIG_NRF_802154_ENCRYPTION to specify
  whether to compile in TX security
* net_pkt will only add extra 802.15.4 control block fields if
  OpenThread is used, as they were solely used by this L2
* OpenThread radio layer will now use the OpenThread version to
  determine whether to compile in TX security.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-06-01 04:53:02 -04:00
Przemyslaw Bida
b020c5d889 net: openthread: Fix OPENTHREAD_FTD dependency.
Thic commit fixes `OPENTHREAD_FTD` dependency to `OPENTHREAD_UPTIME`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-05-30 10:15:08 +02:00
Rajkumar Kanagaraj
80a06b2533 modules: mbedtls: build MbedTLS as three libraries
Previously, Zephyr's mbedtls module's cmake build created a single static
library, rather than the collection of libraries (mbedtls, mbedcrypto,
and mbedx509) that upstream mbedTLS cmake provides.

To give better control at link time to choose the required libraries to
link, this commit updates the Zephyr MbedTLS module to also define a
collection of libraries rather than a single static MbedTLS library.

One benefit of the three library approach is that if mbedTLS is used in
Zephyr in the the non-secure application in addition to TFM's PSA Crypto
API on the secure side with TF-M, PSA API calls on the non-secure side
will be redirected to the TFM PSA implementation, and the mbedcrypto
library will only be linked to the secure (TF-M) binary, with the mbedtls
and mbedx509 libraries linked against the non-secure (Zephyr) binary,
enabling TLS calls to PSA crypto to be redirected to mbedcrypto in the
secure partition and avoiding function duplication in the non-secure
binary.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2023-05-26 14:00:18 -04:00
Sreeram Tatapudi
d9e4f8fa1d drivers: watchdog: Driver for Infineon watchdog
Initial version of the driver for Infineon CAT1 devices

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-24 19:42:50 -04:00
Przemyslaw Bida
fa590519e2 net: openthread: Fix double initialization problem in openthread usb.
nRF52 in case of USB CDC required `CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n`
Due to incorrect error check in `otPlatUartEnable`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-05-19 19:53:21 +00:00
Carles Cufi
837245fcec mcuboot: move the MCUboot kconfig file to modules/
After the MCUboot configuration options were moved out of the main
Kconfig.zephyr they were placed in a new Kconfig.mcuboot in the root of
the repo. This is not right, and the file belongs in the modules/
folder.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-05-18 14:09:00 -04:00
Armando Visconti
e5b7799ce3 drivers/sensor: add support to LSM6DSV16X IMU sensor
The LSM6DSV16X is a system-in-package featuring a 3-axis digital
accelerometer and a 3-axis digital gyroscope for industrial and IoT
solutions. The LSM6DSV16X embeds advanced dedicated features such as
a finite state machine (FSM) for configurable motion tracking and a
machine learning core (MLC) for context awareness.

https://www.st.com/en/mems-and-sensors/lsm6dsv16x.html

This driver is based on stmemsc HAL i/f v2.02

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-18 11:43:36 -05:00
Piotr Jasiński
9efd52fb90 manifest: openthread upmerge to d9abe30
openthread upmerge to `d9abe30`

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2023-05-18 15:52:13 +02:00
Sreeram Tatapudi
ea591e2899 drivers: bluetooth: Add Infineon Bluetooth driver
Add initial version of the Bluetooth driver for
the cy8cproto_063_ble board

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-17 09:59:36 +03:00
Przemyslaw Bida
56425425a4 net: openthread: Remove not needed OPENTHREAD_EXCLUDE_TCPLP_LIB
Remove not needed `OPENTHREAD_EXCLUDE_TCPLP_LIB`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-05-11 12:10:25 +02:00
Przemyslaw Bida
f93613a245 net: openthread: Add implementation of crypto api.
This commit adds implementation of following new api functions from
openthread:
	- otPlatCryptoEcdsaGenerateAndImportKey
	- otPlatCryptoEcdsaExportPublicKey
	- otPlatCryptoEcdsaVerifyUsingKeyRef
	- otPlatCryptoEcdsaSignUsingKeyRef

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-05-11 12:10:25 +02:00
Flavio Ceolin
437598b1c7 openthread: kconfig: Fix experimental feature
select EXPERIMENTAL for experimental option.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-05-10 11:41:50 +02:00
Lukasz Duda
681af7a265 net: openthread: allow to configure OPENTHREAD_CSL_TIMEOUT
Added the possibility to set the default OpenThread CSL timeout using
Kconfig.

Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
2023-05-10 16:55:41 +09:00
Armando Visconti
7ea422af84 drivers/sensor: add support to LSM6DSO16IS IMU sensor
The LSM6DSO16IS is a system-in-package featuring a 3-axis digital
accelerometer and a 3-axis digital gyroscope for industrial and IoT
solutions. The LSM6DSO16IS embeds a new ST category of processing,
ISPU (intelligent sensor processing unit) to support real-time applications
that rely on sensor data. The ISPU is an ultra-low-power, high-performance
programmable core which can execute signal processing and AI algorithms
in the edge.

https://www.st.com/en/mems-and-sensors/lsm6dso16is.html

This driver is based on stmemsc HAL i/f v2.02

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-05-09 16:23:15 +09:00
Iuliana Prodan
b2f1f64f57 boards: xtensa: nxp_adsp_imx8m: Add UART support for the ADSP from i.MX8MP
Enable UART on the DSP from the i.MX8MP target:
- add corresponding nodes in dtsi and dts;
- create a dts overlay for uart;
- add a config fragment for uart and console configuration.

So, in order to compile an application and enable UART
a user must run west build using DTC_OVERLAY_FILE and CONF_FILE.

Here's an example for hello_world:
west build -p always -b nxp_adsp_imx8m samples/hello_world/
-DDTC_OVERLAY_FILE="boards/xtensa/nxp_adsp_imx8m/
nxp_adsp_imx8m_uart.overlay" -DCONF_FILE="boards/xtensa/nxp_adsp_imx8m/
nxp_adsp_imx8m_uart.conf"

For other applications, like SOF, where we don't need UART, we simply run:
west build -p always -b nxp_adsp_imx8m ../modules/audio/sof/ --
-DTOOLCHAIN=/opt/zephyr-sdk-0.15.2/xtensa-nxp_imx8m_adsp_zephyr-elf/
bin/xtensa-nxp_imx8m_adsp_zephyr-elf -DINIT_CONFIG=imx8m_defconfig

The nxp_adsp_imx8m is using the nxp_imx_iuart driver.
For now, is used in poll mode.
Next step is to enable the interrupt controller in
DSP and use the interrupt driver UART.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-08 13:06:12 -05:00
Sreeram Tatapudi
98858f1e6a drivers: flash: Add Infineon CAT1 Flash driver
- Added initial version of Infineon CAT1 Flash driver
- Added binding file for infineon,cat1-flash-controller.yaml
- Added overlays for subsys/nvs and drivers/flash_shell
to support cy8cproto_063_ble, cy8cproto_062_4343w boards
- Defined erase-block-size in PSoC6 MPN dtsi.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-05-08 11:16:09 +02:00
Adam Wojasinski
09fa46ee4e drivers: sensor: qdec_nrfx: Add multi-instance support for QDEC SHIM
Reworked QDEC SHIM to suppor multi-instance peripheral. Patch includes
Kconfig alignment for proper instance handling.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
e3b3d0eea4 modules: hal_nordic: CMakeLists: Add source files for GPPI helper
nrfx 3.0.0 splits implementation of GPPI helper functions into
periph-specific source files.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
39b32a4f68 modules: hal_nordic: nrfx_glue: Add cache auxiliary macros
Add cache auxiliary macros needed nrfy layer in nrfx drivers SW stack.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Adam Wojasinski
1535e0f8ad modules: hal_nordic: nrfx_config: Update nrfx_config files to nrfx 3.0
Update config files to recently released with new nrfx 3.0

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Andrzej Głąbek
7a54aed015 modules: hal_nordic: nrfx: Handle properly I2S0 instance
Although existing nRF SoCs have only one I2S instance, the nrfx_i2s
driver has now multi-instance API and the related nrfx configuration
symbols need to be used appropriately.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Joakim Andersson
52d0c8ade2 boards: nrf9161dk_nrf9161_ns: Add TF-M support to nrf9161 DK
Add TF-M support for nrf9161 DK and enable it by default for the
non-secure board variant.
Disable UART1 since TF-M use this for output and it is configured
as a secure peripheral.
Enabling this will trigger a BusFault in TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-05-03 12:39:14 +02:00
Joakim Andersson
ea705116ed tfm: Print memory usage of TF-M built executables
Print the memory usage of TF-M built executables during build.
This is defaulting to OFF because we have CONFIG_TFM_BUILD_LOG_QUIET
set to ON.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-05-03 10:00:56 +02:00
Bill Waters
3e02d48e4e driver: adc: infineon: Adding ADC driver
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-04-27 10:16:23 -07:00
Przemyslaw Bida
de20ba8869 manifest: openthread: Regular openthread upmerge to 2594291
Bumping version of openthread and rename of
`OT_MTD_NETDIAG` to `OT_NETDIAG_CLIENT`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-04-26 12:58:48 +02:00
Yonatan Schachter
5abb1b1ec0 drivers: misc: Add driver for RaspberryPi Pico PIO
Added a generic driver for RaspberryPi Pico PIO.
This driver is an intermediate driver for abstracting the PIO
device driver from physical pin configuration.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Signed-off-by: Ionut Catalin Pavel <iocapa@iocapa.com>
2023-04-25 13:12:02 +02:00
Eduardo Montoya
760d8fc970 modules: openthread: align received frame timestamp to SFD
OpenThread requires that the `mTimestamp` parameter from the `mRxInfo`
struct points to the end of SFD, i.e. beggining of PHR.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-04-19 17:15:02 +02:00
Eduardo Montoya
2c4cf25836 modules: openthread: fix handling tx done when sleep to tx is supported
After `otPlatRadioSleep` was fixed to properly set radio state to sleep,
radios supporting `IEEE802154_HW_SLEEP_TO_TX` capability would not be
able to handle `PENDING_EVENT_TX_DONE` while in sleep state.

This commit fixes such case.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-04-19 17:13:32 +02:00
Carlo Caione
0bd95509f6 open-amp: Fix compilation with cache enabled
In d540cf8877 I tried to optionally enable the cache management
functions in Open-AMP introducing a new CONFIG_OPENAMP_WITH_DCACHE
symbol.

This is not working. Introduce a proper fix to have this actually
working correctly as intended.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-18 12:12:56 +02:00
Andrzej Głąbek
2a4373ce0d soc: nordic_nrf: nrf91: Add support for nRF9161 SiP / nRF9120 SoC
The nRF9161 is technically a SiP (System-in-Package) that consists of
the nRF9120 SoC and additional components like PMIC, FEM, and XTAL,
so for nrfx/MDK the nRF9120 SoC is to be selected as the build target,
but since the nRF9161 is what a user can actually see on a board, using
only nRF9120 in the Zephyr build infrastructure might be confusing.
That's why in the top level of SoC definitions (for user-configurable
options in Kconfig, for example) the nRF9161 term is used and nRF9120
underneath.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-04-17 09:30:12 -07:00
Aleksandr Khromykh
e7f1856143 Bluetooth: Mesh: add experimental support mbedtls psa
Commit adds experimental support mbedtls psa as crypto
backend for ble mesh. It were run only on bsim tests.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-04-17 16:31:20 +02:00
Henrik Brix Andersen
1cfc85bab8 modules: segger: move Kconfig to modules/segger
Move the Segger RTT module Kconfig to modules/segger/kconfig. The Segger
debug library is not a driver and should not reside under drivers/debug.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-04-17 11:21:48 +02:00
Gerard Marull-Paretas
667eeb11fb shell: fix MISRA 5.7 violations on struct shell
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-14 12:21:08 +02:00
Gerard Marull-Paretas
a5fd0d184a init: remove the need for a dummy device pointer in SYS_INIT functions
The init infrastructure, found in `init.h`, is currently used by:

- `SYS_INIT`: to call functions before `main`
- `DEVICE_*`: to initialize devices

They are all sorted according to an initialization level + a priority.
`SYS_INIT` calls are really orthogonal to devices, however, the required
function signature requires a `const struct device *dev` as a first
argument. The only reason for that is because the same init machinery is
used by devices, so we have something like:

```c
struct init_entry {
	int (*init)(const struct device *dev);
	/* only set by DEVICE_*, otherwise NULL */
	const struct device *dev;
}
```

As a result, we end up with such weird/ugly pattern:

```c
static int my_init(const struct device *dev)
{
	/* always NULL! add ARG_UNUSED to avoid compiler warning */
	ARG_UNUSED(dev);
	...
}
```

This is really a result of poor internals isolation. This patch proposes
a to make init entries more flexible so that they can accept sytem
initialization calls like this:

```c
static int my_init(void)
{
	...
}
```

This is achieved using a union:

```c
union init_function {
	/* for SYS_INIT, used when init_entry.dev == NULL */
	int (*sys)(void);
	/* for DEVICE*, used when init_entry.dev != NULL */
	int (*dev)(const struct device *dev);
};

struct init_entry {
	/* stores init function (either for SYS_INIT or DEVICE*)
	union init_function init_fn;
	/* stores device pointer for DEVICE*, NULL for SYS_INIT. Allows
	 * to know which union entry to call.
	 */
	const struct device *dev;
}
```

This solution **does not increase ROM usage**, and allows to offer clean
public APIs for both SYS_INIT and DEVICE*. Note that however, init
machinery keeps a coupling with devices.

**NOTE**: This is a breaking change! All `SYS_INIT` functions will need
to be converted to the new signature. See the script offered in the
following commit.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

init: convert SYS_INIT functions to the new signature

Conversion scripted using scripts/utils/migrate_sys_init.py.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

manifest: update projects for SYS_INIT changes

Update modules with updated SYS_INIT calls:

- hal_ti
- lvgl
- sof
- TraceRecorderSource

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: devicetree: devices: adjust test

Adjust test according to the recently introduced SYS_INIT
infrastructure.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>

tests: kernel: threads: adjust SYS_INIT call

Adjust to the new signature: int (*init_fn)(void);

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-12 14:28:07 +00:00
Yurii Lozynskyi
2ec4e79474 modules: hal_infineon: Added abstraction-rtos asset for Infenion Cat1
- cyabs_rtos_zephyr.c updated to abstraction-rtos 1.5 (released version)

Signed-off-by: Yurii Lozynskyi <yurii.lozynskyi@infineon.com>
2023-04-11 15:48:02 -04:00
Nikodem Kastelik
6bd52d553f modules: hal_nordic: nrfx: add NRF9120_XXAA support in nrfx_config
There is a single config file for nRF9120 and nRF9160.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-04-11 14:39:59 +02:00
Francois Ramu
10e296f3f1 drivers: flash: stm32 ospi driver for the stm32h5x
With the stm32h5x, hal driver is xspi for octospi
Add a header file to map functions and constants.
The ospi driver of the stm32H5x serie does not support DMA yet.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-04-07 08:33:51 +00:00
Przemyslaw Bida
11c5be105d net: openthread: Remove duplicate option TREL in openthread.
Removing duplicated `OPENTHREAD_RADIO_LINK_TREL_ENABLE`
from `Kconfig.thread` and `openthread-core-zephyr-config.h`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-04-05 12:48:54 +00:00
Mariusz Poslinski
dcfafebc8f manifest: openthread upmerge up to commit 7bdcf8a
Regular OpenThread upmerge.
Added new config:
CONFIG_OPENTHREAD_DNS_CLIENT_OVER_TCP -> OT_DNS_CLIENT_OVER_TCP

Signed-off-by: Mariusz Poslinski <mariusz.poslinski@nordicsemi.no>
2023-04-04 13:35:13 +02:00
Mariusz Poslinski
b64dee8780 module: openthread: align configs with upstream
Change OT_DNS_QUERY_UPSTREAM to OT_DNS_UPSTREAM_QUERY.
Remove unused OT_CHILD_SUPERVISION config.
Added:
CONFIG_OPENTHREAD_THREAD_VERSION_1_3_1 -> OT_THREAD_VERSION_1_3_1
CONFIG_OPENTHREAD_DNS_CLIENT_OVER_TCP -> OT_DNS_CLIENT_OVER_TCP
CONFIG_OPENTHREAD_POWER_SUPPLY -> OT_POWER_SUPPLY

Signed-off-by: Mariusz Poslinski <mariusz.poslinski@nordicsemi.no>
2023-04-04 13:35:13 +02:00
Przemyslaw Bida
172da307d6 net: openthread: Fix OPENTHREAD_CSL_RECEIVE_TIME_AHEAD.
This commit fixed Openthread kconfig option to use correct value and
description of units.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-04-03 09:50:53 +02:00
Jordan Yates
41d83d7ea2 lora: compile drivers based on devicetree
Similar to the changes made in #48048, compile in the appropriate lora
modem driver when `CONFIG_LORA=y`. The `LORA_SX12XX` symbol has no
use now so remove. LoRa and LoRaWAN subsystems are still marked as
unstable so no additional deprecation cycle is needed.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-03-31 09:20:22 +02:00
Joakim Andersson
9ccd202a76 tfm: Use relative path to the runners.yaml hex file and move tfm_merged
Move tfm_merged.hex from <build>/tfm_merged.hex to
<build>/zephyr/tfm_merged.hex.
Use relative path to the runners.yaml hex file.

This makes it possible to move the build folder.
Example would be to copy out the runners.yaml and tfm_merged.hex file
and still be able to call west flash --skip-rebuild.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-03-31 09:20:04 +02:00
Nazar Palamar
a89b86a99e modules: hal_infineon: Added support of BT controller fw blobs
- Added Cmakefiles for modules\hal_infineon\btstack-integration\,
  where handle generation of Bluetooth include blob from HCD binary.

- Supported following device/modules:
 -- CYW43012/MURATA-1LV module
 -- CYW4343W/MURATA-1DX module
 -- CYW43439/MURATA-1YN module
 -- CYW4373/STERLING-LWB5plus module

- Added possibility to use user provided BT Firmware HCD file via
  kconfig (path must be defined in
  CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)

- Updated top makefile

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-22 16:40:55 +01:00
TOKITA Hiroshi
15535edbfe modules: hal_rpi_pico: Enable DMA driver
Enable DMA driver.
Add the path of the DMA driver header into include paths.
`hardware_claim` is depends by DMA driver, also enable it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-03-22 09:33:52 +01:00
Vaishnav Achath
cb953a4255 soc: arm: ti_simplelink: Add support for TI CC13X2X7 SoC series
Product URL: https://www.ti.com/product/CC1352P7
Datasheet : https://www.ti.com/lit/ds/symlink/cc1352p7.pdf

Features:

Powerful 48-MHz Arm® Cortex®-M4F processor
* 704KB flash program memory
* 256KB of ROM for protocols and library functions
* 8KB of cache SRAM
* 144KB of ultra-low leakage SRAM with parity for
high-reliability operation
* Dual-band Sub-1 GHz and 2.4 GHz operation

Updates:
* Remove CC1352P7_LaunchXL due to compliance checks
* Add CC1352P7 updates
* Update hal_ti for CC1352P7 support
* Remove blank line at end of modules/Kconfig.simplelink
* Split struct and typedef for pinctrl_soc_pin/pinctrl_soc_pin_t
* Reference cc13x2_cc26x2/pinctrl_soc.h
* Reference cc13x2_cc26x2/soc.h

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2023-03-21 16:03:43 -04:00
Robert Lubos
032b3d121d net: openthread: Fix OPENTHREAD_CONFIG_TCP_ENABLE redefinition warning
OPENTHREAD_CONFIG_TCP_ENABLE is now set by the OpenThread build system,
based on the CONFIG_OPENTHREAD_CLI_TCP_ENABLE Kconfig entry.
Setting this symbol in the config file is therefore redundant, and
causes multiple build warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-03-21 14:06:10 +01:00
Francois Gervais
ada6881d47 modules: hal_nordic: check if gpio1 is enabled
The build will fail if `gpio1` is disabled in an overlay.

For example:
```
&gpio1 {
	status = "disabled";
};
```

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2023-03-21 09:39:02 +01:00
Krzysztof Chruscinski
369ffb4929 hal_nordic: Add protection against resource conflict (take 2)
Commit will be squeezed once agreement is reached.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Krzysztof Chruscinski
5af49c1e35 hal_nordic: Add protection against resource conflict
Add check in CMake files to prevent resource overlap for
TIMER0, TIMER1, RTC0.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Krzysztof Chruscinski
9a73b9c80d hal_nordic: Change scheme for RTC and TIMER reservation
In general, RTC and TIMER driver implements counter API but there
are exception when those peripherals are used in a custom way
(e.g. for system timer or bluetooth). In that case, system must
prevent using counter based on a reserved instance. Previously,
it was managed by Kconfig options but that cannot be maintained
when switching to devicetree configuration of the counter driver.

A new approach removes Kconfig options and instead adds static
asserts in the files which are using direct peripherals. Those
asserts check if given node is not enabled in the device tree.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Nicola Ochsenbein
eba73727ee modules: fs: Add reentrant zephyr support
This commit enables zephyr to configure the FatFs FF_FS_REENTRANT
option and support fs actions from multiple threads.
CONFIG_FS_FATFS_REENTRANT enables the option and provides zephyr
mutex wrappers.

Signed-off-by: Nicola Ochsenbein <Nicola.Ochsenbein@husqvarnagroup.com>
2023-03-13 11:58:57 +01:00
Mariusz Poslinski
5027f55a12 manifest: openthread upmerge up to commit 1f1a826
Regular OpenThread upmerge.

Added new configs:
CONFIG_OPENTHREAD_TCP -> OT_TCP
CONFIG_OPENTHREAD_DNS_QUERY_UPSTREAM -> OT_DNS_QUERY_UPSTREAM
CONFIG_OPENTHREAD_MESH_DIAG -> OT_MESH_DIAG

Signed-off-by: Mariusz Poslinski <mariusz.poslinski@nordicsemi.no>
2023-03-11 19:44:43 +01:00
Vidar Lillebø
ca3d0c8ee9 mbedtls: Remove dependency on MBEDTLS_BUILTIN for MBEDTLS_DEBUG
Allows using MBEDTLS_DEBUG functionality when not using MBEDTLS_BUILTIN.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
2023-03-10 09:30:32 +01:00
Jamie McCrae
df9027a64a sysbuild: support Zephyr modules
This commit extends the Zephyr module yaml scheme with additional
entries for sysbuild in the build section.

This allows for Zephyr modules to extend the sysbuild infrastructure
by providing additional CMake and Kconfig files to be included in
sysbuild.

The new settings are:
build:
  sysbuild-cmake: <path>
  sysbuild-kconfig: <path>/<file>
  sysbuild-ext: <true>|<false>
  sysbuild-kconfig-ext:  <true>|<false>

those settings follow the same pattern as the equivalent Zephyr build
settings but are processed by sysbuild.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-03-09 09:25:00 +01:00
Kevin Townsend
67c1a6bc20 modules: tf-m: Fix thread preemption toggling
Fixes an issue where thread preemption was not being disabled
correctly, failing to taking into account MetaIRQ, which can be
used to preempt any cooperative thread.

The updated code sets the current thread to `K_HIGHEST_THREAD_PRIO`
before calling the secure function, and restores the thread priority
level once secure execution has terminated, allowing the thread
to be preempted once again.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-03-08 15:26:08 +01:00
Przemyslaw Bida
dc5155e5a5 openthread: ieee802154_nrf5: Add implementation of new api.
Adding an Openthread radio API `otPlatRadioSetMacFrameCounterIfLarger`
implementation and the corresponding call to the IEEEE802154 driver.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-03-08 11:07:22 +01:00
Andriy Gelman
33d1792e3d drivers: spi: Add xmc4xxx driver
Adds spi driver for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-03-03 17:20:17 +01:00
Michał Barnaś
3322e73e34 lvgl: change misleading options for color depth
The option for monochrome graphics used word byte instead of bit.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-03-01 06:36:25 -05:00
Nazar Palamar
423a085fe3 modules: hal_infineon: Added blob support for CM0+ images
Initial blob support for PSoC6 CM0+ images

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Nazar Palamar
a8cc50a712 modules: hal_infineon: Added mtb-hal-cat1 asset for Infenion Cat1 devices
- Add Cmakefiles for mtb-hal-cat1
- Update top makefile

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-03-01 11:44:57 +01:00
Sylvio Alves
839b97e7c5 kconfig: add esp32s3 into configuration
Add ESP32-S3 information into Espressif's Kconfig
definitions.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-02-27 19:41:33 +01:00
Maciej Baczmanski
f1e5f60242 modules: openthread: remove code_utils.h include
Remove `#include "utils/code_utils.h"` and macros connected with it.
File was incorrectly included in `diag.c` as it is OpenThread's header
used for examples only.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-02-27 11:34:52 +01:00
Maciej Baczmanski
e84f246c66 modules: openthread: add otPlatDiagRadioTransmitCarrier
added `otPlatDiagRadioTransmitCarrier` functionality

disabled OT power calibration support

fixed wrong check of `radio_api->stop()` return value
in `otPlatRadioSleep()`

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-02-24 09:26:01 +01:00
Henrik Brix Andersen
bc4b49c149 modules: canopennode: process rx buffers in priority order
The CANopenNode stack expects registered RX buffers to be processed and
matched in priority order. The priority corresponds to the index of each
each registered RX buffer with lower indexes having higher priority.

Depending on the CANopen COB-ID network configuration used, it may result
in overlapping CAN RX filters. In the case of overlaps, the priorities of
the registered RX buffers matter.

When receiving a CAN frame, process the RX buffers in priority order and
only dispatch the callback for the matching object with the highest
priority.

Fixes: #54364

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-02-23 07:54:02 -05:00
Moritz Fischer
8e18c5ce1d modules: mbedtls: Allow for enabling LMS algorithms
Allow for enabling LMS algorithm support via KConfig

Signed-off-by: Moritz Fischer <moritzf@google.com>
2023-02-23 10:51:31 +01:00
Artur Hadasz
5ec29589c4 modules: hal_nordic: 802.15.4 carrier functions made optional
Added an option to disable and enable the continuous and optional
carrier functions in the nordic 802.15.4 driver.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2023-02-22 16:46:15 +01:00
Andriy Gelman
8a97da056b drivers: dma: Add infineon xmc4xxx dma support
Adds dma drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-21 21:15:53 +01:00
Fabio Baltieri
9b30667c77 build: drop LEGACY_INCLUDE_PATH support
LEGACY_INCLUDE_PATH has been defaulting to "n" and marked as deprecated
in both v3.2 and v3.3. Drop the option entirely for v3.4.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-02-21 15:06:48 +01:00
Przemyslaw Bida
164ec8ba63 manifest: openthread: openthread upmerge to 242c7cc
Regular openthread upmerge.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-02-20 13:24:07 +01:00
Dominik Ermel
1e0f36e896 fs/fatfs: Move FF_USE_LFN logic to Kconfig
Commit add hidden Kconfig option CONFIG_FS_FATFS_FF_USE_LFN
that is passed to ELM FAT to define FF_USE_LFN configuration.
The FF_USE_LFN still depends, indirectly, on choice
CONFIG_FS_FATFS_LFN_MODE config options
CONFIG_FS_FATFS_LFN_MODE_BSS, FS_FATFS_LFN_MODE_STACK and
FS_FATFS_LFN_MODE_HEAP, but the logic has been moved out of
zephyr_fatfs_config.h into Kconfig file.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-02-20 09:44:18 +01:00
Joakim Andersson
dd47f4c730 modules: trusted-firmware-m: Allow application to use qcbor TF-M
QCBOR cannot be shipped with Zephyr.
Allow the application to supply their own copy of QCBOR or let the TF-M
build system automatically download this dependency.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-11 07:59:06 +09:00
Kevin Townsend
cd8d4ccad5 modules: tfm: Disable initial attestation service
Prevents Zephyr from enabling the initial attestation service in TF-M,
due to a dependency it has on an incompatibly-licensed library (QCBOR).

This update checks if either of the following config flags are
enabled at build time:

- `CONFIG_TFM_PARTITION_INITIAL_ATTESTATION`
- `CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION`

If either of these are set to true, a fatal error will be thrown at
build time, indicating the reason for the failure.

This change can be reverted once a longer term solution to the QCBOR
license issues has been resolved.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-02-11 07:59:06 +09:00
Chris Friedt
0c00a3ea79 modules: add thrift module
Add glue code for the thrift module. This includes:
* workarounds for Zephyr's missing C++ facilities
* thrift config.h

This code was merged from the following repository
at the commit specified below, with minor formatting
and coding-style modifications.

https://github.com/zephyrproject-rtos/gsoc-2022-thrift
e12e014d295918cc5ba0b4c507d1bf595a2f539a

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-02-09 20:30:21 +09:00
Joakim Andersson
36421f2efc modules: trusted-firmware-m: Remove SFN limitation of platform partition
The TF-M platform partition has now been ported to PSA firmware
framework 1.1 and can now be used together with the SFN model.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Joakim Andersson
df12df354c modules: trusted-firmware-m: Remove setting of removed cmake option
Remove setting of the TFM_LIB_MODEL option for IPC and SFN models.
This option is removed together with the library model.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Joakim Andersson
5c97bb5ecd modules: trusted-firmware-m: Fix TF-M floating point options
Fix setting of TF-M floating point options when floating point is
enabled in the application.
FP design in Armv8.0-M architecture requires consistent FP ABI types
between SPE and NSPE.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-02-07 14:27:03 +01:00
Maciej Baczmanski
3172748d10 modules: openthread: fix multiple definition in openthread config
remove `CONFIG_OPENTHREAD_RADIO_LINK_IEEE_802_15_4_ENABLE` from
`openthread-core-zephyr-config.h` which is now handled in
`modules/openthread/CMakeLists.tx`

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-02-06 10:07:44 +01:00
Thad House
92e518ed5c rpi_pico: add support for Pi Pico and C11
Currently if C11 or higher is enabled, many files fail to compile because
static_assert is defined in multiple header files. Solve this by
disabling the one in the HAL if the other macro is found

Signed-off-by: Thad House <thadhouse1@gmail.com>
2023-01-28 07:48:30 -05:00
Joakim Andersson
d9b6e58eb3 modules: trusted-firmware-m: Add TF-M connection based NS API source
Add TF-M connection based NCS API source file to build.
This file is needed when a secure service is using connection
based method.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Kevin Townsend
186cd65160 manifest: Update to TF-M 1.7.0 and MBedTLS 3.2.1
Update TF-M from 1.6.0 to 1.7.0
Update MBedTLS from 3.1.0 to 3.2.1.

Updates the cmake wrapper for changes introduced in TF-M 1.7.0.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Joakim Andersson
2572a53a45 tfm: Remove library model support
In TF-M 1.7.0 release the Library model has been removed.
Remove the library model support from zephyr before updating TF-M
version.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-01-27 14:25:30 -05:00
Maciej Baczmanski
bf10d0dd16 net: openthread: add gpio diag command implementation
implemented ot diag gpio get, set and mode commands

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-01-27 19:22:05 +09:00
Keith Packard
8f01e4cf22 modules/cmsis: Change libc requirement to allow picolibc
Change from depending on newlib to requiring a full libc, this allows use
with picolibc or any other C library providing a complete implementation.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-26 10:10:45 +00:00
Alberto Escolar Piedras
8a5273525e nrf52_bsim: Convert from a nRF52832 to a nRF52833
The nRF HW models have been updated to correspond to a 52833 instead
of a 52832. Let's follow them.

The motivation for the change is to enable proper BIS encryption support
(for BT LE Audio ISO).

Changes:

* Point in manifest to latest HW models

* SOC_COMPATIBLE_NRF52832 has been removed, and SOC_COMPATIBLE_NRF52833
added in its place (with no uses at this point)

* Where SOC_COMPATIBLE_NRF52832 was used to set encryption like for a 52832
(to avoid using the MAXPACKETLENGHT), we set the condition to just
SOC_NRF52832.
Note: The MAXPACKETLENGHT register exists in the new simulated nrf52833,
thought it does nothing.

* In the BLE ctrl LLL radio HAL, all macros are renamed accordingly
(timings are NOT changed).

* Board dts definition now refers to the 52833 soc definition. New 52833
features set as not supported by now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-01-26 09:29:18 +01:00
Joakim Andersson
b43dfa27e9 modules: trusted-firmware-m: Remove dependency on module file for tests
Remove the dependency on the test repositories having a zephyr module
file in their repositories.
With this change we can take the upstream test repositories direct
commit SHA or tag.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-01-25 11:23:23 +00:00
Maciej Baczmanski
59325d1fe6 manifest: openthread upmerge up to commit a1979fd
Cleanup of Kconfig and CMakeLists for openthread module.

Added build flags:
- `OT_15_4`
- `OT_ANYCAST_LOCATOR`
- `OT_BACKBONE_ROUTER_DUA_NDPROXYING`
- `OT_BACKBONE_ROUTER_MULTICAST_ROUTING`
- `OT_BORDER_ROUTING`
- `OT_BORDER_ROUTING_COUNTERS`
- `OT_FIREWALL`
- `OT_MESSAGE_USE_HEAP`
- `OT_NAT64_TRANSLATOR`
- `OT_TX_BEACON_PAYLOAD`

Renamed flags:
- `DATSET_UPDATER` to `DATASET_UPDATER`
- `CONFIG_OPENTHREAD_BORDER_ROUTING_NAT64`
to `CONFIG_OPENTHREAD_NAT64_BORDER_ROUTING`

Rearranged flags in alphabetical order.
Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-01-18 12:14:59 +01:00
Stephanos Ioannidis
cf211aa7af treewide: Update deprecated CONFIG_LIB_CPLUSPLUS usages
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to:

* check if the Zephyr minimal C++ library is enabled using
  `CONFIG_MINIMAL_LIBCPP` instead of relying on the
  `CONFIG_LIB_CPLUSPLUS`-based inference.

* select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component-
  level C++ standard library dependency. This allows a component to
  declare C++ standard library dependency without designating a
  specific libray implementation.

* select the correct type of C++ standard library implementation to use
  through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-13 17:42:55 -05:00
YuLong Yao
2086acfa0e soc: gd32a50x: introduce gd32a50x soc series
soc: gd32a50x: introduce gd32a50x soc series

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-01-12 21:45:38 +01:00
Jamie McCrae
fd4090819a tinycbor: Remove deprecated/obsolete module
This removes the tinycbor module and replaces references in it
e.g. in sample text to use the zcbor replacement.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-10 09:26:12 +01:00
Artur Hadasz
4400540d15 modules: hal_nordic: nrf_802154: RNG xor-shift algorithm
The LCG method used earlier in the random number generator was problematic,
as the lowest bits repeated periodically (for example, the generated number
always resulted in an odd-even-odd-even-.. sequence, or the last three bits
formed an cycle of the length 8). This is because the LCG was done module
2^32. Any LCG using a power of 2 as the modulus will cause the same issue.
The used RNG method was changed to Marsaglia's xor shift-algorithm,
which does not have this issue.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2023-01-04 11:44:07 +00:00
Piotr Jasiński
ceb7ca7e80 modules: build segger debugmon code with config
Updated segger module CMake to build code added by
https://github.com/zephyrproject-rtos/segger/pull/14 when relevant
config is provided.

Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2022-12-28 12:00:46 +01:00
Reto Schneider
cb7791baf1 soc: nrf52: Kconfig option for nRF52840 anomaly 198
Enabling by default (if SPI3 used) because it affects all revisions
since "Engineering B", including the most recent one as of today
(revision 3).

Size changes when enabled:
 - -Og: flash +160 bytes (+0.02%), RAM +8 bytes (+0.01%)
 - -Os: flash +144 bytes (+0.02%), no change to RAM usage

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2022-12-27 15:32:22 +01:00
Arkadiusz Balys
3afd564bba modules: openthread: platform: Added setting default tx power
There were some requests from users for adding the possibility
of setting default openthread tx output power using kConfig.
It is possible by adding the CONFIG_OPENTHREAD_DEFAULT_TX_POWER
kConfig and assigning it to the tx_power variable in the radio.c
file in the Openthread module.

Added the possibility to set default openthread power using
kConfig.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2022-12-21 12:21:09 +01:00
Erwan Gouriou
66d4c64966 all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-12-21 10:09:23 +01:00
Andriy Gelman
2d3493bff0 drivers: adc: Add ADC xmc4xxx drivers
The ADC module has four conversion groups, each one is set up as a zephyr
device. The start-up calibration is initiated globally for all groups
and it is run in each device init function. The ADC module supports post
calibration per group. Post calibration is run automatically after each
group acquires the samples.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-20 14:17:23 +01:00
Armin Brauns
c1cc2c4a26 modules: lvgl: change mentions of "LittleVGL" to "LVGL"
The project was renamed to LVGL with release 7.0.0, from 2020-05-18.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2022-12-16 09:31:41 +01:00
Dominik Ermel
a724ebe7f7 fs/fatfs: Update FAT FS support code for version 0.15 w/patch1
The commit applies small changes in ELM FAT driver support code,
required by the driver update to version 0.15.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-13 10:44:01 -06:00
Andriy Gelman
727e589448 drivers: interrupt_controller: Add XMC4XXX ERU driver
In Infineon XMC4XXX SoCs, gpio interrupts are triggered via an
Event Request Unit (ERU) module. A subset of the gpios are
connected to the ERU. The ERU monitors edge triggers and creates
a SR.

This driver configures the ERU for a target port/pin combination
for rising/falling edge events. Note that the ERU module does
not generate SR based on the gpio level. Internally the ERU
tracks the *status* of an event. The status is set on a positive
edge and unset on a negative edge (or vice-versa depending on
the configuration). The value of the status is used to implement
a level triggered interrupt; The ISR checks the status flag and
calls the callback function if the status is set.

The ERU configurations for supported port/pin combinations are
stored in a devicetree file dts/arm/infineon/xmc4xxx_x_x-intc.dtsi.
The configurations are stored in the opaque array
uint16 port_line_mapping[].

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-12-12 10:51:29 +01:00
Jon Escombe
9cf2b20415 modules: lvgl: Enable for CPU_CORTEX_M0/M0PLUS
Cortex M0 support was previously disabled due to a compiler bug.
SDK 15.1 includes GCC 12.1 which solves this issue.

Fixes: #52788

Signed-off-by: Jon Escombe <jone@dresco.co.uk>
2022-12-07 10:23:32 +00:00
Dominik Ermel
043cea12e5 fs/fatfs: Add CONFIG_FS_FATFS_MIN_SS
The Kconfig option allows to set minimum expected sector size
to be supported by FAT fs driver.
When this value differs from CONFIG_FS_FATFS_MAX_SS the driver
will query device for actual sector size, expecting different
sector sizes for different device. When CONFIG_FS_FATFS_MIN_SS
and CONFIG_FS_FATFS_MAX_SS are the same, then there is slight
reduction if FAT driver size, as the query logic is removed
and CONFIG_FS_FATFS_MAX_SS is used for all devices.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-05 15:18:05 +01:00
Yuval Peress
b38445eaa0 math: Introduce a DSP basicmath subsystem with a cmsis backend
Introduce an API mirroring the CMSIS-DSP's basicmath. If CMSIS_DSP is
enabled, then it will by default be used as a backend. Developers may
opt into a custom backend by setting CONFIG_DSP_BACKEND_CMSIS=n. If
done, the application must provide `zdsp_backend/dsp.h` and optionally
implement the functions in its own .c files.

Signed-off-by: Yuval Peress <peress@google.com>
2022-12-02 20:15:55 +01:00
Anas Nashif
cffe98d9de crc: Make the build of crc function dependent on a Kconfig
Add CONFIG_CRC for building CRC related routines.
CRC routines are now being built for each application, whether used or
not and are add in the build system unconditionally.

Keep CONFIG_CRC enabled by default for now and until all users have
converted to use the new option.

Partial fix for #50654

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-23 13:30:00 +01:00
Eduardo Montoya
78cf49e0fd net: openthread: fix otPlatRadioSetMacKey when asserts are disabled
Ensure `otPlatRadioSetMacKey` is properly implemented when asserts are
disabled.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-11-23 11:37:24 +01:00
Andrzej Głąbek
010730aff6 modules: mbedtls: Provide mbedtls_hardware_poll() conditionally
This is a follow-up to commit c7327f5f70.

Wrap implementation of the `mbedtls_hardware_poll()` function in
`#if defined(CONFIG_MBEDTLS_ZEPHYR_ENTROPY)` so that the function
is provided only when that option is activated.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-11-22 13:17:43 +09:00
Dominik Ermel
d41832f830 modules/fatfs: Move FATFS Zephyr specific code and cmake
The code moves Zephyr specific code and CMakeLists.txt
under modules/fatfs/.

The commit also adds zephyr_fatfs_config.h header file, that
is now used to override FF_ options of ffconf.h file within
fatfs repository.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-21 16:48:14 +01:00
Robert Lubos
387a66131e net: pkt: Introduce minimum length requirement to net_pkt_get_frag()
net_pkt_get_frag() and a few other functions did not specify the
allocated fragment length, incorrectly assuming that fixed-sized
buffers are always used.

In order to make the function work properly also with variable-sized
buffers, extend the function argument list with minimum expected
fragment length parameter. This allows to use net_buf_alloc_len()
allocator in variable buffer length configuration, as well as verify if
the fixed-sized buffer is large enough to satisfy the requirements
otherwise.

Update the existing codebase to provide the expected fragment length,
based on the context.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-11-19 07:39:32 -05:00
Eduardo Montoya
257df2e21c net: openthread: implement PSA support for ECDSA API
Implement the four new ECDSA platform functions required by OT.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-11-17 11:20:03 +01:00
Kristofer Jonsson
02d4714aff modules: add an Arm Ethos-U HAL module
Adding module files for building the Arm Ethos-U Core driver.
Updating TFLU module file to build Ethos-U operator.

Adding hal_ethos_u to west manifest.

Signed-off-by: Kristofer Jonsson <kristofer.jonsson@arm.com>
Signed-off-by: Fredrik Knutsson <fredrik.knutsson@arm.com>
2022-11-15 14:47:43 +01:00
Nikodem Kastelik
67718641bf modules: hal_nordic: nrfx: switch to 2.10 API
Switch to use newest 2.10 API version in nrfx by default.
It changes signature of user callback in the nrfx_ipc driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2022-11-08 10:48:38 +01:00
Rafał Kuźnia
fe4ed1b871 boards: nrf5340dk_nrf5340: Add chosen node for nrf-802154 spinel
Currently, the nrf-802154-spinel IPC service requires that the IPC
service node has a specific name (ipc0). This makes it impossible to
overwrite the IPC service node to be used by the Spinel serialization
without completely redefining the ipc0 node. Create a `chosen` property
called nordic,802154-spinel-ipc that can be reassigned with any IPC
service node.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2022-11-05 19:57:25 +01:00
Adam Wojasinski
f762aa9aa2 modules: hal_nordic: Add API version symbol to nrfx_config.h
This commit adds API version symbols. The symbol is used in nrfx
drivers, where new API-breaking changes are introduced. Symbol
guards conflicting API.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2022-11-03 11:39:01 +01:00
Yonatan Schachter
3a3cfbb652 hal: nxp: Check Kconfig before including HAL
hal_nxp was added to cmake's include directories globally, without
checking if the hal is enabled. This made all Zephyr builds end up
including hal_nxp, even for other vendors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-11-01 21:41:55 -05:00
Carles Cufi
8e4d499fa0 treewide: Use CONFIG_*_ENDIAN instead of __BYTE_ORDER__
In order to avoid using multiple sources of truth for the platfom's
endianness, convert the in-tree code to use the (BIG|LITTLE)_ENDIAN
Kconfig variables exclusively, instead of the compiler's
__BYTE_ORDER__.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-10-28 19:23:46 +09:00
Carles Cufi
f38c283c42 modules: littlefs: Fix the endianness conversion functions
See full description in the upstream PR:
https://github.com/littlefs-project/littlefs/pull/742

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-10-28 19:23:46 +09:00
Henrik Brix Andersen
f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen
05455c3d23 modules: canopennode: storage: fix size_t format specifier
Fix the format specifier for logging size_t values.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-10-22 14:36:11 +09:00
Florian Grandel
f1e9dd2930 drivers: ieee802154: properly announce promisc mode
Most IEEE 802.15.4 drivers do not support promiscuous mode, some do.
There is a dedicated L2 flag to signal this capability to clients.

Unfortunately the IEEE 802.15.4 L2 stack does not announce this flag
even for drivers that correctly expose it in their HW capabilities.
Some clients (notably the OpenThread L2) even uses promiscuous mode
without checking whether the driver actually supports it.

This change lets the vanilla IEEE 802.15.4 L2 check the driver's
HW capabilities to announce promiscuous mode on its 'get_flags()'
interface if supported.

The OpenThread L2 uses a constant (potentially incorrect) response
to 'get_flags()'. Fixing the OpenThread L2 is out of scope of this
change. This change just introduces TODO messages to the OpenThread code
so that the OpenThread team may fix the issue (or delete the TODO if they
deem it irrelevant).

Fixes: #51263

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-10-17 16:54:37 +02:00
Manuel Arguelles
41c36357bd soc: arm: introduce NXP S32Z/E support
This patch introduces support for NXP S32 devices, specifically for
S32Z27 from S32Z/E family.

NXP S32Z27 processors are composed of two Real-Time Units (RTU)
containing each four ARM Cortex-R52 cores with flexible split/lock
configuration, and dedicated internal SRAM.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-10-14 09:51:14 +02:00
Robert Lubos
b76c35d809 modules: mbedtls: Replace select statement with depends on for EC
Instead of using "select" on certain EC configurations, which is
considered unsafe for various reasons, use a "depends on" and rely on
the user to set a proper configuration in the config file.

Update the respective project configurations to comply with the new
configuration scheme.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-07 15:12:42 +02:00
Yuval Peress
7c48900d14 modules: Remove fff tests
I've update FFF to run tests in the native CI for GitHub, so we no
longer need to run these extra tests. Remove the fff module from
west.yml since the module was only used in the CI and the header
was directly included in the Zephyr tree.

See https://github.com/zephyrproject-rtos/fff/pull/2

Signed-off-by: Yuval Peress <peress@google.com>
2022-10-04 14:24:09 -04:00
TOKITA Hiroshi
2e3cfec25d modules: Add option for enabling HAL debug functions
Add GD32_DBG_SUPPORT options to enable HAL debug functions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
TOKITA Hiroshi
db6d8c92ff modules: Add IRC configurations
Add options about Internal RC(IRC) oscillator.

- GD32_HAS_IRC_32K/40K indicates IRC types.
- GD32_LOW_SPEED_IRC_FREQUENCY is the numeric value of frequency

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2022-10-03 18:07:16 +02:00
Andriy Gelman
072a428f78 drivers: flash: Add xmc4xxx flash drivers
Add xmc4xxx flash drivers.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2022-10-03 13:56:49 +02:00
Joakim Andersson
3abcc19fd7 tfm: Add option to enable the SFN model
Add option to enable the SFN model when building TF-M.
The SFN model will eventually replace the Library model.

Change the default model to be IPC, which follows the default
configuration of TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-10-03 10:17:45 +02:00
Jordan Yates
e35d95b88e modules: loramac-node: fix CN470 linking
Update the source files compiled when `CONFIG_LORAMAC_REGION_CN470` is
enabled to link. Despite the naming, a `RegionBaseUS.c` function
(`RegionBaseUSVerifyFrequencyGroup`) is used by all four of the CN470
band implementations.

Validated by compiling `samples/subsys/lorawan/class_a` with
`CONFIG_LORAMAC_REGION_CN470` instead of `CONFIG_LORAMAC_REGION_IN865`.

Fixes #49960.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-09-26 09:38:49 +00:00
Artur Hadasz
2314d971e7 modules: hal_nordic: nrf_802154 serialization race condition fix
Fixed a race condition resulting in a serialization error.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-09-19 10:31:50 +00:00
Henrik Brix Andersen
180cdc105e drivers: can: add start and stop CAN controller API functions
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.

This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().

During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.

Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.

Fixes: #45304

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-13 16:06:50 +00:00
Przemyslaw Bida
2636bb4e4a net: openthread: priortize usec timer for openthread port.
This commit prioritizes usec timer over msec. Doing so improves
CSL by helping scheduling timeslots on IEEE 802.15.4 with lower miss
rate.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2022-09-12 10:54:56 +00:00
Huifeng Zhang
97897a003d modules: tfa: integrate trusted-firmware-a
This commit integrates trusted-firmware-a as a zephyr module

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-09-09 16:36:37 +00:00
Mahesh Mahadevan
9966181510 drivers: usb: mcux: Restructure driver for SDK updates
1. Move the defines from usb_dc_mcux.h to usb_device_config.h
   and fsl_os_abstraction.h. These headers are used by
   the SDK USB driver. usb_dc_mcux.h header file is not longer
   needed and hence deleted.
2. Delete the Zephyr implementation of the usb_device_struct
   driver and use the one implemented inside the SDK USB
   driver. This requires updating the references to
   usb_device_struct inside the USB driver
3. Move defines and structures used by the driver
   out of the header file that is included by the SDK and
   into the MCUX USB driver.
4. Use end point defines provided by Zephyr instead of adding
   them locally.
5. Add a Kconfig to set the thread stack size
6. Move code to enable interrupts back to usb_attach function.
   Interrupts should be enabled after the init is successful,
   else we see errors of the ISR getting called before the
   init is complete causing Faults
6. Update west.yml to update the NXP HAL to get the updated
   SDK USB driver.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-09-09 09:44:46 -05:00
Øyvind Rønningstad
1ec015daa1 modules: zcbor: Fix ZCBOR_ASSERT kconfig typo
It should define ZCBOR_ASSERTS, not ZCBOR_ASSERT

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-09-08 15:30:47 +00:00
TOKITA Hiroshi
725aa4759a modules: hal_rpi_pico: Enable ADC driver
Enable ADC driver.
Add the path of the ADC driver header into include paths.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-09-06 17:11:19 +02:00
Dominik Ermel
f4398e1ad6 modules: canopennode: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Fabio Baltieri
6114a72c38 modules: littlefs: use ##__VA_ARGS__ for littlefs log wrappers
LittleFS has some macros resolving to the Zephyr LOG_* ones, use
the ##__VA_ARGS__ for these so that they don't leave a trailing comma if
called with a single argument.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-05 13:41:19 +00:00
Pieter De Gendt
8563744997 modules: openthread: Build FTD/MTD libraries based on device type
Set OpenThread specific cmake options depending on the selected
device type.
This reduces the number of libraries to build.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-09-02 17:48:50 +02:00
Yannick Thesen
ffdd428419 modules: Added hal_wurthelektronik module.
Added hal_wurthelektronik module (contains drivers provided by
Würth Elektronik eiSos GmbH & Co. KG).

Signed-off-by: Yannick Thesen <Yannick.Thesen@we-online.de>
2022-08-31 21:47:58 +00:00
Lukasz Maciejonczyk
abc89c497f net: openthread: add option for optimizing large packet transmission
If enabled the optimization is done at the expense of power consumption
on SED/SSED devices.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2022-08-30 10:26:02 +02:00
Carles Cufi
d800ccc644 blobs: Introduce TAINT and TAINT_BLOBS Kconfig options
In order to ensure that builds properly reflect the use of binary blobs,
it is important to markt the build as tainted. For that purpose
introduce two new Kconfig options that ultimately will be reflected in
the build image itself.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-29 15:57:59 +02:00
Carles Cufi
4c26b8518e modules: liblc3: Rename the module for consistency
The old project, liblc3codec, is not used anymore. Rename the Zephyr
module name, folders, and Kconfig options based on the new name, liblc3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-08-22 20:40:59 +02:00
Gerard Marull-Paretas
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Mariusz Skamra
ba109548a8 liblc3: Determine language starndard for compilation
The code makes use of alignas() specifier which has been introduced on
ISO C11.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-08-22 10:21:48 +02:00
Gerard Marull-Paretas
e0125d04af devices: constify statically initialized device pointers
It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-19 11:51:26 +02:00
Henrik Brix Andersen
590cd5cb72 drivers: can: rename can_state enumerations
Rename the can_state enumerations to contain the word STATE to make their
meaning more clear:
- CAN_ERROR_ACTIVE  => CAN_STATE_ERROR_ACTIVE
- CAN_ERROR_WARNING => CAN_STATE_ERROR_WARNING
- CAN_ERROR_PASSIVE => CAN_STATE_ERROR_PASSIVE
- CAN_BUS_OFF       => CAN_STATE_BUS_OFF

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 21:41:11 +00:00
Torsten Rasmussen
9871a05a67 kconfig: optional sourcing of $(KCONFIG_BINARY_DIR)/Kconfig.modules
Change sourcing of generated Kconfig.module to be optional.

It should be possible to run parse the Zephyr Kconfig tree even if the
Kconfig.modules file has not been generated.

This can be useful in testing where you may wish to run without Zephyr
modules present, and thus not load the Zephyr module CMake module.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-08-18 14:29:14 +02:00
Måns Nilsson
2b0e820d02 modules: add support for optimized CMSIS-NN kernels
Updates TensorFlow Lite Micro module with option for CMSIS-NN optimized
kernels.

Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
2022-08-18 12:26:51 +02:00
Henrik Brix Andersen
13c75417ba drivers: can: remove z prefix from public CAN API types
Remove the "z" prefix from the public CAN controller API types as this
makes them appear as internal APIs.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-08-18 10:19:29 +02:00
Marcin Niestroj
fa5937aaed modules: mbedtls: support stripping newline from debug log messages
Debug log messages generated by mbedTLS library contain newline at the end
of log string. Remove this newline, if it exists, so that log output is
much more user friendly.

Add a dedicated Kconfig option for that, so it can be disabled on request.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj
af37c09440 modules: mbedtls: convert mbedTLS log levels to Zephyr log levels
So far LOG_DBG() was used inside debug hook for mbedTLS library. This meant
that it was hard to distinct log messages by simply looking at the log
level number, even though Zephyr logging subsystem supports colorful logs
depending on log level.

Choose an appropriate Zephyr LOG_*() macro based on log level coming from
mbedTLS library. Remove log level number from formatted log messages, as it
is now redundant.

One controversial thing about this change is that mbedTLS' "2 State change"
log level is mapped to Zephyr's "warning" log level. Those are not really
warnings in real life, but rather informational messages. However, using
"warning" log level for those allows to clearly distinguish between "2
State change" and "3 Informational" debug messages from mbedTLS.
Additionally, mbedTLS debug message implementation does not seem to be safe
to use in production, so keeping in mind MBEDTLS_DEBUG will be enabled just
during debugging phase, printing "2 State change" logs as warnings should
not be a big deal.

Set default MBEDTLS_DEBUG_LEVEL value depending on selected Zephyr logging
module level, so that only single option needs to be configured in
application project.

Remove prompt for MBEDTLS_DEBUG_LEVEL, so that interactively (e.g. via
menuconfig) adjusting MBEDTLS_LOG_LEVEL will always result in automatically
updating MBEDTLS_DEBUG_LEVEL option. This is to prevent so called "stuck
symbol syndrome".

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj
e4c11fd8aa modules: mbedtls: support extracting __FILE__ basename at buildtime
So far there was a runtime basename extraction of filenames passed to
mbedTLS debug hook. This has both runtime penalty as well as code size
penalty.

Introduce a buildtime support of extracting basename of source filenames
logged using logging subsystem, so that there is no need to do it at
runtime.

Provide Kconfig options for both buildtime and runtime basename extraction,
as in some cases the buildtime basename extraction might not work,
depending on toolchain used for building Zephyr. Default to buildtime when
using Zephyr SDK, as that is proven to work. Use runtime basename
extraction in other cases (other toolchains used).

This saves approximately 204 bytes of code footprint for sample
application with native TLS sockets built for nRF52840.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj
6653fd945f modules: mbedtls: set mbedTLS debug threshold during module initialization
mbedTLS library threshold initialization was done in native TLS socket
implementation (which tends to use mbedTLS now) and inside mbedTLS
benchmark test. Move that to mbedTLS module initialization, as this is a
global setting.

Update description of CONFIG_MBEDTLS_DEBUG_LEVEL to clarify when
mbedtls_debug_set_threshold() is called.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj
a418ad4bb4 modules: mbedtls: move debug log hook implementation to modules/mbedtls/
So far there was a debug log hook installed in TLS socket implementation.
However, mbedTLS (with debug enabled) might be used outside from TLS socket
and even outside from networking context.

Add new module, which implements debug log hook and makes it available
whenever CONFIG_MBEDTLS_DEBUG is enabled.

Note that debug hook needs to be installed for each mbedTLS context
separately, which means that this requires action from mbedTLS users, such
as TLS sockets implementation.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Marcin Niestroj
6b386336ba modules: mbedtls: convert tabs to spaces in CMakeLists.txt
This is just a whitespace cleanup.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-08-17 12:03:52 +02:00
Kumar Gala
5fa1909141 modules: hal_nordic: Remove Kconfig.dt
Remove modules/hal_nordic/Kconfig.dt as we now autogenerate the
contents of this file based on the dts bindings in tree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-17 08:06:55 +00:00
Felipe Neves
6ba5b21337 soc: xtensa: esp32_net: update kconfig
specific of soc to make it compatible to the new toolchain.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2022-08-16 18:06:02 +02:00
Eugene Cohen
03cfd130a8 modules: mbedtls: update flags to suppress unused var and func
Add module specific compiler flags to suppress reporting unused
variables and unused functions in mbedtls building.

Signed-off-by: Eugene Cohen <quic_egmc@quicinc.com>
Signed-off-by: Dave Aldridge <quic_daldridg@quicinc.com>
2022-08-15 14:32:23 +02:00
Kumar Gala
8eead50071 manifest: Update lvgl
Update lvgl for devicetree updates to use zephyr,keyboard-scan.

Remove Kconfig symbol (LV_Z_POINTER_KSCAN_DEV_NAME) that don't exist
anymore since these values are coming from devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-12 17:54:03 -05:00
Robert Lubos
ab024565f0 modules: mbedtls: Update Kconfig defaults for OSCORE/EDHOC
Set proper Kconfig defaults for mbed TLS if OSCORE/EDHOC is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos
633e7e4533 modules: Add uoscore-uedhoc repository
Introduce uoscore-uedhoc repository, providing OSCORE and EDHOC
libraries as a new Zephyr module.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos
c7327f5f70 modules: mbedtls: Add mbed TLS entropy source based on Zephyr entropy
Add entropy source for mbed TLS based on Zephyr entropy driver.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos
1c1bb51730 modules: mbedtls: Add separate configs for EC algorithms
Instead of relying on selected ciphesuite to enable mbed TLS EC configs,
add separate config entries to enable them. This allows to use EC
functionality w/o TLS/DTLS enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos
fc81f67e9a modules: mbedtls: Add Kconfig entry for PSA API
Add Kconfig option to enable PSA API in mbed TLS.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Robert Lubos
d288e24c6c modules: mbedtls: Workaround for incorrect inclusion in mbedtls
psa_crypto_cipher.c includes an internal header with <>, causing
complication errors in Zephyr (header not found).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-08-12 16:17:59 +02:00
Gerard Marull-Paretas
05b26df660 modules: hal_gigadevice: add support for CMP, TMU and SHRTIMER
The CMP, TMU and SHRTIMER modules were not compiled. Add them now that
GD32E50X series support is being added (this SoC has such units).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-12 14:13:49 +01:00
Gerard Marull-Paretas
184fb42957 modules: hal_gigadevice: add support for gd32e50x
Add some compile definitions necessary for the gd32e50x HAL and select
default crystal clock.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-08-12 14:13:49 +01:00
Eduardo Montoya
ee2a8d9a64 net: openthread: allow to configure OPENTHREAD_MESSAGE_BUFFER_SIZE
Add `OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE` to Kconfig.

Also set the number of children to minumum possible for MTD builds
in order to save some resources (~512B of RAM).

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-08-10 12:01:18 +02:00
Gerard Marull-Paretas
8faa7b8891 modules: openthread: use zephyr,ieee802154 choice
Use chosen ieee802154 device from DT since
CONFIG_NET_CONFIG_IEEE802154_DEV_NAME is being phased out.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Joakim Andersson
c51505f661 modules: tfm: Exclude non-secure TF-M application from build
Exclude the non-secure TF-M application from being built by TF-M.
This also stops the building of the tfm_ns_api library that we were
linking against.
This library is defined by the tf-m regression tests.
Add the installed interface source files exported by the TF-M build
system compile them in the zephyr build system.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-09 13:59:02 +02:00
Pieter De Gendt
584d1966e4 modules: openthread: Fix building with picolibc
The OpenThread module should not explicitly link with libc in case of
minimal libc or picolibc.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2022-08-04 13:46:08 +02:00
Kumar Gala
433e42d470 modules: lvgl: Remove Kconfig symbols that dont exist
LV_Z_DISPLAY_DEV_NAME, LV_Z_HOR_RES_MAX, & LV_Z_VER_RES_MAX
Kconfig symbols don't exist anymore.  They got removed in
recent devicetree update of lvgl module.  So remove them from
modules/Kconfig.lvgl.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-03 18:45:13 +02:00
Bartosz Bilas
bcf64d382c modules: lvgl: add missing stubs for Kconfig symbols
Add missing `LV_Z_HOR_RES_MAX`, `LV_Z_VER_RES_MAX`
and `LV_Z_DISPLAY_DEV_NAME`
Kconfig symbols to fix the following Kconfig warnings:

warning: LV_Z_DISPLAY_DEV_NAME defined without a type
warning: LV_Z_HOR_RES_MAX defined without a type
warning: LV_Z_VER_RES_MAX defined without a type

Fixes
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-08-03 05:01:03 +01:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Christoph Coenen
81694a25ed segger: Resolve circular include dependencies
Zephyr kernel is dependent on trace.
Trace is dependent on segger rtt.
Segger rtt MUST NOT be dependent on zephyr kernel.

Move lock functions from header into c file to avoid circular
dependency. This fix needs an update of the segger repository.

Fixes #43887.

Signed-off-by: Christoph Coenen <ccoenen@baumer.com>
2022-08-02 13:09:21 +02:00
Benjamin Björnsson
f5073e461e modules: segger: Update header to use guard macros
Remove usage of pragma once for consistency across all headers.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-20 13:39:23 -05:00
Gerard Marull-Paretas
2cfb5012db drivers: spi: nrfx_spim: move rx delay to DT
Move the RX (MISO) delaying capability information to Devicetree. It is
done using 2 properties:

- rx-delay-supported: enabled on SPI nodes that support delaying RX.
  This property can be used by the driver to determine if this
  capability is supported or not on a given instance.
- rx-delay: the actual RX delay value

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-07-19 13:20:00 -07:00
Torsten Rasmussen
39a7381bb9 cmake: remove deprecation_warnings.cmake
With support for deprecating Kconfig symbols within the Kconfig tree
itself, there is no reason to have a secondary location to maintain
for information that is based on a Kconfig setting in first place.

Better to directly do `select DEPRECATED` on the symbol itself, than to
maintain a secondary list with messages in CMake.

Hence removing this feature in CMake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-07-15 09:53:08 -05:00
Anas Nashif
72e7fa8176 scripts: move mergehex.py to scripts/build
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-12 10:03:45 +02:00
Robert Lubos
815ebc316e net: openthread: Move glue code into module directory
Move OpenThread's glue code along with the Kconfig files that configure
OpenThread stack itself into module directory.

Update the maintainers file to reflect this change.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-07-11 11:00:12 +02:00
Kumar Gala
b296abd605 modules: hal_nordic: Convert to use DEVICE_DT_GET
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-08 10:18:24 +02:00
Joep Buruma
7e0fff24c7 drivers: pwm: add pwm driver for rpi_pico
Add pwm driver implementation for rpi pico family.
Adds myself as codeowner of drivers/pwm/*rpi_pico*

Signed-off-by: Joep Buruma <burumaj50@gmail.com>
2022-07-07 15:17:26 +02:00
Marcin Niestroj
48a9334826 modules: mbedtls: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs
According to mbedTLS' Changelog "Mbed TLS 3.0.0 branch released
2021-07-07" -> "Removals":

   MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it
   is now determined automatically based on supported curves.

Hence remove MBEDTLS_ECP_MAX_BITS from configuration files to fix build
issues with Zephyr when there is unfortunate order of include
statements.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-07-02 14:13:45 +02:00
Bartosz Bilas
9c251fc9ac nxp_imx: rt: add XBARA Inter-Peripheral Crossbar Switch Kconfig option
Add missing MCUX XBARA module Kconfig option.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2022-07-01 16:23:11 +00:00
Joakim Andersson
3ccf5d03ff tfm: Add option for implementation custom reset handler with TF-M
Zephyr adds a custom handler that overrides the weak function
sys_arch_reset when TF-M platform partition is enabled.

This takes away the option for the application to override the weak
definition for their platform or use-case.

Add an option that control whether this default reset handling is added
to the build.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-30 13:00:09 +00:00
Joakim Andersson
cb32d8e8e9 modules: tfm: Allow enabling FPU in the application with TF-M enabled
Allow the application to enable the FPU when TF-M has been enabled.
Pass the correct compilation flags according to the TF-M integration
guide.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-06-29 14:45:39 +00:00
Filip Zajdel
fb8c86c59a modules: hal_nordic: Don't get DT Node when temp update is disabled
Avoid getting DT Node of temperature sensor when temperature update
is disabled.

Signed-off-by: Filip Zajdel <filip.zajdel@nordicsemi.no>
2022-06-29 10:26:36 +02:00
Gerard Marull-Paretas
166d013311 modules: lvgl: disable for CPU_CORTEX_M0/M0PLUS
There is a compiler bug in the current Zephyr SDK (GCC 10.3.0) that
prevents using LVGL on ARM Cortex M0/M0+. Disable LVGL on such CPU until
the next SDK is deployed (GCC 12.1), as the issues does not appear
anymore.

Ref. https://github.com/lvgl/lvgl/issues/3425

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-28 15:53:10 +02:00
Qingsong Gou
389992bc8d modules: lvgl: fix a minor issue
change Kconfig logic when lvgl not enabled, but
still configured in .config file

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2022-06-27 12:45:29 +02:00
Yonatan Schachter
2bfc245576 rpi_pico: Fix bootloader linking
A recent change to hal_rpi_pico's cmake, intended to fix the
compilation via Unix Makefiles, ended up not linking the BL
to the final ELF. This commit fixes both problems.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-06-23 09:10:10 +02:00
Martí Bolívar
f49d11d310 civetweb: remove obsolete code
This code has gone unmaintained and bugs continue to be reported
against it. We do not have the resources as a project to maintain this
in "odd fixes" mode, and nobody has stepped up to maintain it [1], so
sadly this must be removed for now.

If anyone would like to see civetweb supported in upstream Zephyr
again, they are welcome to add it back, as long as they promise to
maintain it going forward.

Many thanks to everyone who has contributed to civetweb support in
Zephyr while it was here. So long and thanks for all the fish.

Fixes: #45807
Fixes: #43910
Fixes: #34226
Fixes: #46743

[1] https://lists.zephyrproject.org/g/devel/message/8466

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-22 08:26:13 -07:00
Gerard Marull-Paretas
4946a15f15 soc: arm: gigadevice: use common API headers
Stop relying on <soc.h> to access HAL APIs. Use generic, per-API headers
instead. Note that <soc.h> has been left as is for now, since ARM MPU
relies on a fragile chain of includes/type definitions.

This change should improve compilation efficiency, as we no longer pull
APIs that are not needed. A similar approach is followed by STM32
drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-06-22 18:41:19 +09:00
Andrzej Głąbek
c08442c85a modules: hal_nordic: Adapt nrfx_busy_wait() for !SYS_CLOCK_EXISTS case
When the SYS_CLOCK_EXISTS Kconfig option is not enabled, k_busy_wait()
has no implementation, so in such case, call nrfx_coredep_delay_us()
directly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-15 17:04:30 -05:00
Marcin Niestroj
dfe9a91da2 modules: mbedtls: bring back SHA384 support
Before mbedTLS 3.0 there was just SHA512 option, which enabled both SHA384
and SHA512 support. mbedTLS 3.0 introduced SHA384 specific option, which
means that SHA384 got unsupported after merging
commit 4e6cfb67f9 ("modules: mbedTLS: Bump mbedTLS to 3.0").

Introduce SHA384 Kconfig options, so that support for it can be selected in
project configuration if needed. Since SHA384 still depends on SHA512 to be
selected, add such dependency in Kconfig.

Select SHA384 support in non-generic (not configured by Kconfig) mbedTLS
config headers, so that previous (before mbedTLS 3.0 was merged) behavior
is regained.

Fixes: 4e6cfb67f9 ("modules: mbedTLS: Bump mbedTLS to 3.0")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-06-15 09:11:09 +02:00
Bartosz Bilas
c343da5161 nxp_imx: rt: add ADC External Trigger Control Kconfig option
Add missing ADC External Trigger Control module Kconfig option.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2022-06-10 09:48:50 +02:00
Pete Skeggs
6a9854e2ca modules: mbedtls: Add Kconfig option to enable Extended Master Secret
Add Kconfig option for `config-tls-generic.h` to enable the Extended
Master Secret extension.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2022-06-05 14:26:48 +02:00
Martí Bolívar
013a0034c9 cmake: modules: deprecate civetweb
This module has gone unmaintained and we do not have the resources to
respond to bug reports for it.

The TSC has decided to deprecate it for Zephyr v3.1 and remove it
entirely in Zephyr v3.2 unless a maintainer volunteers to keep this
module up to date and fix bugs.

This commit generates a warning at CMake time if this module is
compiled in. The warning will appear in the cmake output in the same
place that deprecated board or SoC warnings would.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-05-27 15:32:31 -07:00
Martí Bolívar
dcec8d028a cmake: add a mechanism for deprecating modules
We currently have mechanisms for deprecating both boards and SoCs.
However, we lack one for deprecating modules. This is inconvenient,
because we would like to do exactly that.

Handle this in a simple way by adding a new CMake file in the modules
directory which is responsible for warning the user about any
deprecated modules they may be using. See the source code comments for
more details about the approach.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-05-27 15:32:31 -07:00
Fabio Baltieri
33cc6827ba modules: rpi_pico: fix boot_stage2 generation when using Makefiles
RPi Pico second stage bootloader generation seems to fail when using
Makefiles with:

gmake[2]: *** No rule to make target 'bootloader/boot_stage2.S'...

Changing the ExternalProject_Add byproduct to the actual generated file
and not the .S seems to fix the problem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-27 11:58:37 -07:00
Stephanos Ioannidis
4b111c1ee8 Revert "modules: zcbor: kconfig: Disallow ZCBOR_VERBOSE with MINIMAL_LIBC"
This reverts commit 619fce9e0f now that
the missing PRIuFAST32 and PRIxFAST32 macros are defined by the minimal
libc.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-26 17:38:50 +02:00
Nazar Palamar
90a0dd6d6f modules: hal_infineon: fix CMake Warning when build non Infineon device
Problem:
pull/43494 is causing the CMake warning
No SOURCES given to Zephyr library: modules_hal_infineon

modules_hal_infineon library was defined even if none of the
below subdirectories is added; so, when not building for
Infineon/Cypress devices, the source list for this library
will be empty.

Fix:
Added 'zephyr_library_named(modules_hal_infineon)' under condition
'if(CONFIG_HAS_XMCLIB OR CONFIG_SOC_FAMILY_PSOC6)'

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2022-05-16 10:17:29 +02:00
Nazar Palamar
d940d23c10 modules: hal_infineon: added initial Kconfig and CMakeLists.txt
- added initial Kconfig
- added initial CMakeLists.txt (root, core-lib,  mtb-pal-cat1)
- updated module, driver and soc to use CONFIG_USE_INFINEON_xx
  defines from modules/hal_infineon/Kconfig

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2022-05-13 21:34:59 +02:00
Daniel DeGrasse
bc841e1fb7 drivers: pinctrl: refactor pin control support for imx rt
Refactor iMX RT pin control support to use more generic names, as the
IOMUXC peripheral is present on non RT iMX application cores.
Additionally, make selection of the pin control driver occur at the SOC
level.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-12 16:57:17 -05:00
Francois Ramu
bb2cdc5966 module: Kconfig stm32 includes the DELAYBLOCK (DLYB)
add the config to support the DELAYBLOCK LL driver
for stm32 mcus like stm32U5x.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-05-12 14:56:25 -05:00
Mahesh Mahadevan
19a71887cb modules: NXP: Add MIPI DSI support
Add support for the MXRT MIPI DSI controller

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2022-05-12 09:26:50 -05:00
Rajkumar Kanagaraj
8920f43639 modules: trusted-firmware-m: update val, pal, test static lib path
Previously val_nspe.a, pal_nspe.a, test_combine.a created under tfm binary
directory (${TFM_BINARY_DIR}/app/psa_api_tests/) now from TFM 1.6 it is
generated to the respective tfm binary directory with parent directory
(${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests), update the CMake
accordingly.

Signed-off-by: Rajkumar Kanagaraj <rajkumar.kanagaraj@linaro.org>
2022-05-12 10:33:52 +02:00
Jimmy Brisson
2e6cd2550c modules: Update dependencies for TFM 1.6 release
This includes updates for the tfm deps:
 * tf-m-tests
 * psa-arch-tests

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-05-12 10:33:52 +02:00
Joakim Andersson
82600f4a6a boards: Refactor comment on default and identation on help text
Refactor help text for TFM_FLASH_MERGED_BINARY to use the standard
indentation of tab plus 2 spaces.
Reword BUILD_WITH_TFM default comment, TF-M is enabled by default, not
forced enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-05-12 09:21:36 +02:00
Henrik Brix Andersen
3f97d11afd drivers: can: convert enum can_mode to a bit field
Convert the can_mode enum to a bit field to prepare for future extensions
(CAN-FD mode, transmitter delay compensation, one-shot mode, 3-samples
mode, ...).

Rename the existing modes:
- CAN_NORMAL_MODE   -> CAN_MODE_NORMAL
- CAN_SILENT_MODE   -> CAN_MODE_LISTENONLY
- CAN_LOOPBACK_MODE -> CAN_MODE_LOOPBACK

These mode names align with the Linux naming for CAN control modes.

The old CAN_SILENT_LOOPBACK_MODE can be set with the bitmask
(CAN_MODE_LISTENONLY | CAN_MODE_LOOPBACK).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-11 10:47:54 +02:00
Henrik Brix Andersen
18890828b8 drivers: can: split CAN classic and CAN-FD syscalls
Split CAN classic and CAN-FD syscalls into two:
- can_set_timing() -> can_set_timing() + can_set_timing_data()
- can_set_bitrate() -> can_set_bitrate() + can_set_bitrate_data()

Fixes: #45303

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-05-11 10:47:54 +02:00
Sylvio Alves
c9f6d18dfc soc: esp32: add Espressif HAL config
Current Espressif porting requires standard include as
part of hal implementation. compiler_flags.cmake checks for
variant name to keep those stdinc in build.
Instead of using variant name as check, use this new CONFIG
to make it clear and to allow having toolchain integrated
in zephyr-sdk package.
stdinc dependency in hal_espressif will be worked out and removed
soon.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-05-11 10:47:27 +02:00
Gerard Marull-Paretas
5f5a905784 modules: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all modules code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:57:47 +02:00
Daniel DeGrasse
58a2b15972 drivers: hwinfo: implemented hardware info support for RT11xx SOC
RT11xx SOC uses same system reset controller as RT10xx series. Add
support for SRC on RT11xx

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-06 11:33:26 +02:00
Peter McShane
41dc7db2d3 modules: Add entry for Microchip mpfs hal
Adding entry in kconfig for Microchip mpfs hal

Signed-off-by: Peter McShane <peter.mcshane@microchip.com>
2022-05-06 11:32:54 +02:00
Yonatan Schachter
29677da91f rpi_pico: Fix compilation for non Linux systems
On non Linux system, the compilation failed because the main
CMake did not pass the CMAKE_SYSTEM_NAME to the bootloader's
CMake. This caused the variable to be empty, instead of being
"Generic".

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-05-05 14:47:23 -05:00
Stephanos Ioannidis
0fb4a3566b modules: cmsis_dsp: Fix missing common tables dependency for SVM
This commit adds the missing common tables dependency for the SVM
functions.

The `exp_tab` and `exp_tab_f16` tables are required by the SVM
functions when the MVE is enabled.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-05 11:58:11 +09:00
Stephanos Ioannidis
2c47a919af modules: cmsis_nn: Move Kconfig prompt out of CMSIS-DSP menu
The `CMSIS_NN` Kconfig previously depended on the `CMSIS_DSP` Kconfig,
and this placed the "CMSIS-NN Library Support" prompt under the "CMSIS-
DSP Library Support" menu (note that CMSIS-DSP is a menuconfig).

Since the CMSIS-NN library, although it requires the CMSIS-DSP library,
is not a subordinate component of the CMSIS-DSP library, remove its
dependency on `CMSIS_DSP` and make it select the Kconfig symbol
instead.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-05-04 18:57:41 -04:00
Jan Peters
253cec5c95 drivers: counter: add driver for NXP QTMR counters
The driver is implemented using the MCUXpresso SDK.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2022-05-03 20:41:23 -05:00
Øyvind Rønningstad
619fce9e0f modules: zcbor: kconfig: Disallow ZCBOR_VERBOSE with MINIMAL_LIBC
Because Minimal LIBC doesn't have PRIuFAST32 and PRIxFAST32 which is
needed when printing traces in zcbor.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-04-28 16:18:28 +02:00
Robert Lubos
bbba7c951d modules: mbedtls: Extend generic config with SSL cache
Add Kconfig configuration options which allow to configure
session caching in mbed TLS.

Note, that mbed TLS only takes care of server-side caching, the
application (socket layer) needs to implement a session storage for
client.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-04-28 11:31:07 +02:00
Carles Cufi
ac6a8e791f modules: zcbor: Add Kconfig options to match the zcbor ones
Add Kconfig options to enable/disable features that are exposed in zcbor
via ZCBOR_ macros that are typically set via -D statements to the
toolchain.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-04-20 09:50:37 +02:00
Henrik Brix Andersen
38ee953547 modules: canopennode: can_get_max_filters() is optional
Support for the can_get_max_filters() API function is optional and may
not be supported by all drivers.

The check for an adequate amount of filters is just there in order to
fail early. If the driver does not support can_get_max_filters(),
reporting of a failure will be delayed until a filter addition fails.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-19 11:47:40 +02:00
Rui Sousa
e5848129be modules: cmsis: fix Cortex-A support
CMSIS Cortex-A only supports AARCH32, remove dependency on
AARCH64 Cortex-A.

Signed-off-by: Rui Sousa <rui.sousa@nxp.com>
2022-04-18 17:22:51 -07:00
Yuval Peress
aaf0c6e827 modules: chre
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.

Additionally, add a sample to make sure that the module builds. It can
be built via:

```
$ west build -b native_posix -p=always samples/application_development/chre
```

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-18 13:21:52 -05:00
Jimmy Brisson
e7e78cba14 tfm: Kconfig: Configure MCUBOOT_DATA_SHARING explicitly
Previously, MCUBOOT_DATA_SHARING was enabled when BL2 was built
and when the firmware update partition was present. This is not
the only situation that you might be interested in this data
sharing. The data sharing now has it's own Kconfig.

Further, use of the firmware update partition requires data
sharing, so it selects it.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Jimmy Brisson
0dcd6bd58a modules-tfm: Configure image versions with KConfig
Previously, you were required to set the image versions through the
CMake variables TFM_IMAGE_VERSION_{S,NS}. For better integration with
the rest of the zephyr build system, these are now KConfig variables
with the same name.

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Kevin Townsend
eacae5e4e9 samples: tfm: PSA firmware update sample
This commit adds a sample application demonstrating how to use
the PSA Firmware Update API from TF-M. It also enables the
`FIRMWARE_UPDATE` partition to be included at build time.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2022-04-08 15:52:01 -07:00
Eduardo Montoya
b25de879e8 modules: mbedTLS: deselect unneeded hashes for OpenThread
SHA256 and SHA512 hashes are not needed for OpenThread.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2022-04-08 15:50:53 -07:00
Yuval Peress
1ec0c6f530 build: make non zephyr/ include prefix configurable
Add a Kconfig to disable non prefixed includes. By setting
`CONFIG_LEGACY_INCLUDE_PATH=n` developers can disable having
`include/zephyr` in the search path. This means that includes such
as `#include <kernel.h>` will no longer work.

Internally, every header should be updated to add the `zephyr/`
prefix to the headers. Only then, will developers be able to use
this config value for their applications.

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Yuval Peress
53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Carles Cufi
8257b0e3f5 modules: tinycbor: Deprecate the module
See #40591 for details, TinyCBOR (or rather the fork of TinyCBOR that we
had) is being replaced by zcbor.

Closes #40591.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-04-08 15:58:49 +02:00
Dominik Ermel
22c32cfbb4 modules: Add zcbor Kconfig and cmake recipe
The commit adds files for the zcbor to be built as module.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-04-06 10:59:45 +02:00
Joakim Andersson
dcaf8dab14 tfm: Add configuration for BL2 not supported
Add configuration for BL2 not supported. In some configurations
BL2 will not be supported. Provide a way to deselect BL2 support.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-04 18:16:41 +02:00
Andrzej Głąbek
451a6ed6ab modules: hal_nordic: Refactor nrfx related Kconfig options
Change dependencies of the Kconfig options that enable particular nrfx
drivers so that the drivers and their instances are available when
a devicetree node with a corresponding compatible property exists,
no matter if it is enabled or not.
Change the options that enable compilation of multi-instance drivers
to be promptless helpers only (not directly configurable for users),
as they need to be enabled only together with some options that enable
particular instances of a given driver, and those options select them
as needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Joakim Andersson
201433892c tfm: Fix crash in TF-M when non-secure IRQ is using FPU
Fix crash in TF-M when non-secure IRQ is interrupting the secure
processing and using the FPU.

The FPU context must be saved when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is disabled since an IRQ handler
can still access the FPU registers.

Fixes: #43587

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-04-01 12:38:01 -05:00
Casper Bonde
d03d2d854b Bluetooth: LC3: Addition of liblc3codec for LE-Audio as a module
Initial addition of the LC3 codec as a module. Usage of the module
will be seperate commits.

Even though this codec is a generic audio codec, it is tagged with
Bluetooth: as it can only be used for LE-Audio. Using the codec for
other purposes is a violation of the granted rights for the codec.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2022-03-30 14:18:01 +02:00
Emil Obalski
d877e1dded ipc_service: Automatically include source files for backends
The purpose of this change is to allow to enable more than one
backend at once by removing choice from ipc-service backend Kconfig
and depending backend Kconfig option on existing of correct compatible.

Overwriting IPC_SERVICE_BACKEND option in some places is removes
as no longer needed.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2022-03-29 12:30:50 -07:00
Joakim Andersson
f8fc1f5b72 tfm: Fix TF-M nonsecure interface disptach handling in pre kernel
Fix TF-M nonsecure interface dispatch handling when calling secure
service before the kernel is fully active.

This fixes crash in nordicsemi_nrf53_init, which is called with
PRE_KERNEL_1, when calling soc_secure_gpio_pin_mcu_select.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-28 12:47:27 +02:00
Henrik Brix Andersen
2f43226b3d modules: canopennode: CANopenNode does not support CAN-FD
The CANopenNode stack does not support CAN-FD. Depend on it being
disabled and explicitly disable it in the CANopenNode sample.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-25 15:35:10 -07:00
Jordan Yates
d1ae54a022 modules: cmsis: integrate CMSIS-NN
Integrate the CMSIS-NN libraries from the CMSIS 5.8.0 release.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-03-22 12:56:02 +01:00
Yuval Peress
347a297da2 modules: fff: Fix issue with tests being skipped in CI
The filter in the testcase.yaml made it impossible for these to run.
Also, the Kconfig names for the options didn't really make much sense
so they were renamed to avoid conflict.

This fixes an issue found by #36433.

Signed-off-by: Yuval Peress <peress@google.com>
2022-03-22 12:33:58 +01:00
Artur Hadasz
9f5c159c7c modules: hal_nordic: fixed wrong 802.15.4 NET core init level
The intialization level of 802.15.4 on NET core was set to APPLICATION,
which caused some applications to break during initialization. Changed
it to POST_KERNEL. CONFIG_NRF_802154_SER_RADIO_INIT_PRIO default value
was adjusted.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-03-22 12:29:01 +01:00
Henrik Brix Andersen
67ba9900f0 drivers: can: add struct device argument to callback functions
Include a pointer to the CAN controller device for the CAN
transmit, receive, and state change callback functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-19 14:31:22 -04:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Yonatan Schachter
90b20fffa4 drivers: hwinfo: Added unique ID support for RPi Pico
Added support for hwinfo's hwinfo_get_device_id for the
RPi Pico series.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-03-16 10:24:32 +01:00
Yonatan Schachter
36888b1fb7 soc: rp2040: Enable bootrom functions
Support function and data lookup in the RPi's ROM.
The objects are obtained by including <pico/bootrom.h> and calling
rom_func_lookup or rom_data_lookup.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-03-16 10:24:32 +01:00
Andrzej Głąbek
222d42c22a modules: hal_nordic: Improve reservation of resources for BT_CTLR
Instead of including from nrfx_glue.h a specific Zephyr Bluetooth
controller header file that defines PPI and GPIOTE resources to be
reserved for exclusive use by the controller, include a file with
only a fixed name and expect the chosen Bluetooth controller to
provide the location of this file in include paths. This way, when
a different Bluetooth controller implementation is used downstream,
a different file can be easily pointed to.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 14:59:35 +01:00
Nazar Kazakov
9713f0d47c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-14 20:22:24 -04:00
Gerard Marull-Paretas
b2001388b7 modules: hal_nordic: obtain entropy device using DEVICE_DT_GET
The entropy device can be obtained at compile time.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-11 15:27:05 -08:00
Joakim Andersson
5ee41d8b4e scripts: size_report: Add support for TF-M and BL2 image size reports
Add support for TF-M and BL2 image size reports.
This adds the following targets when TF-M or BL2 is enabled:
tfm_rom_report, tfm_ram_report, tfm_footprint
bl2_rom_report, bl2_ram_report, bl2_footprint

Example:
west build -t tfm_rom_report

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-03-09 14:03:52 -05:00
Gerard Marull-Paretas
dffaf5375c kconfig: tweak Kconfig prompts
Tweak some Kconfig prompts after the removal of "Enable...".

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Gerard Marull-Paretas
95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Bartosz Golaszewski
134f56dd2d lvgl: bump supported version to v8.2.0
In upstream the LV_COLOR_DEPTH_BITS option is called LV_COLOR_DEPTH, this
needs changing if we want to support v8.2.0.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-03-07 16:20:27 -06:00
Daniel DeGrasse
cb685709e5 soc: nxp_imx: Enable inclusion of power management HAL drivers
Add KConfig symbols to select power management HAL drivers required for low
power modes. Set ZTEST_NO_YEILD if PM is enabled, since RT series SOCs
do not connect to a debugger in WAIT mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-03-07 13:53:14 -06:00
Rafał Kuźnia
a8dd5bfe3a modules: hal_nordic: Select RPMSG backend by default
The nrf_802154 module should use the IPC_SERVICE_BACKEND_RPMSG
backend by default.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2022-03-07 10:55:16 +01:00
Artur Hadasz
5451c8b70f modules: hal_nordic: 802.15.4 make possible to disable CSMA-CA
Currently if an attempt to disable CSMA-CA in by setting an
appropriate flag in another (for example application)
CmakeLists.txt it caused lots of warnings. This fix allows
higher level CMakeLists.txt to disable CSMA-CA without
warnings.

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
2022-03-07 10:51:21 +01:00
Przemyslaw Bida
47557d7d9d manifest: openthread: Simplification of openthread integration.
This commit moves openthread CMakeLists.txt from openthread submodule
to zephyr/modules/openthread.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2022-03-02 10:06:03 -08:00
Kamil Piszczek
3e5812cc5f modules: hal_nordic: Port nrf_802154 to ipc_service
The nrf_802154 Spinel serialization was ported to multi-instance
ipc_service.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2022-03-02 17:03:01 +01:00
Torsten Rasmussen
aff31cf62b modules: littlefs: move CMake glue code from littlefs repo into Zephyr
Fixes: #40559

Moving CMakeLists.txt gluecode into Zephyr repo minimizes the patching
needed in LittleFS repo.

It provides a dedicate Zephyr LFS config header which will define the
equivalent LittleFS settings based upon Kconfig settings.
This further reduces the patching needed in LittleFS.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-03-02 15:34:11 +01:00
Torsten Rasmussen
6b56b3c14e modules: littlefs copy the naive crc function from LittleFS
LittleFS requires a `lfs_crc()` function, however the basic crc
function provided by LittleFS gets disabled when a custom configuration
header is used.

To ensure identical crc behavior let Zephyr have a copy of the basic
lfs_crc.

This allows to ensure identical behavior when moving glue code into
Zephyr repo, and allow us to change to an existing crc implementation
provided natively by Zephyr at a later time.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-03-02 15:34:11 +01:00
Flavio Ceolin
26d7a929d4 modules: mbedTLS: Add Kconfig options for hashing
Add explicit Kconfig options to enable SHA support on mbedTLS.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-03-01 16:32:43 -05:00
YuLong Yao
1ad0b193d9 modules: arm: gigadevice: set HAXTL_VALUE for gd32_e103
set HAXTL_VALUE to GD32_HXTAL_8MHZ for gd32_e103.

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2022-03-01 18:06:14 +01:00
Bartosz Golaszewski
3470ace98d modules: lvgl: add stubs for Kconfig symbols overridden in-tree
There are several Kconfig symbols defined in the lvgl module that are
referenced from various defconfigs in the zephyr tree. If the LVGL module
is unavailable, they need to be redefined as stubs in Kconfig.lvgl.

Fixes: 6c190292c0 ("lvgl: move the lvgl glue out of the zephyr tree")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 16:37:33 -08:00
Rafał Kuźnia
4635c0866f modules: hal_nordic: Remove nrf_802154_lp_timer platform
The nrf_802154_lp_timer_zephyr.c platform file is unused in the
opensource SL library variant.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2022-02-24 14:05:09 -08:00
Bartosz Golaszewski
6c190292c0 lvgl: move the lvgl glue out of the zephyr tree
Start using the upstream Kconfig from LVGL and move the glue code out
of the zephyr tree and put it under lvgl/zephyr/ in modules.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
2022-02-24 11:51:33 +01:00
Bradley Bolen
c0dd594d4d arch: arm: aarch32: Change CPU_CORTEX_R kconfig option
Change the CPU_CORTEX_R kconfig option to CPU_AARCH32_CORTEX_R to
distinguish the armv7 version from the armv8 version of Cortex-R.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2022-02-23 08:14:15 -06:00
Andrzej Kuros
7ce93ebfed modules: hal_nordic: nrf_802154_irq ZLI support
Parameter `prio` of `nrf_802154_irq_init` is now allowed to have
negative value what means use of ZLI priority or highest possible
priority if ZLIs are disabled.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2022-02-23 11:18:17 +01:00
Joakim Andersson
bfbee8c54f tfm: Add config to disable all TF-M output
Add config to disable all TF-M output. This configuration is needed
in order to exclude the UART driver through a select in Kconfig
when either the code size optimization or the UART instance requires it.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-02-21 21:02:25 -05:00
Yonatan Schachter
db5b2780bf soc: Added support for Raspberry Pi's RP2040 SoC
Added basic support for the RP2040 SoC. Support
includes booting and starting the kernel, on one
core only.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2022-02-02 16:23:35 +01:00
Torbjörn Leksell
8426cbdf8a Modules: Percepio TraceRecorder: Update module from v4.5.2 to v4.6.0(RC1)
This update updates the TraceRecorder module from version v4.5.2
to v4.6.0(RC1). The primary motivation for this update is to
fix some breaking trace hook changes introduced into Zephyr
v2.7.99, which resulted in compilation errors when using the
TraceRecorder module.

The update to v4.6.0 also introduce Snapshot tracing support,
extended kernel object naming, and a reworked configuration
scheme with better naming and layout in guiconfig.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
2022-02-01 07:45:09 -05:00
Joakim Andersson
17f8932f16 modules: trusted-firmware-m: Use TF-M install headers as interface
Use the set of headers that the TF-M build system places in the
install output. Not all public header files are available in the
interface/include directory and the TF-M build system uses the install
mechanism of cmake to include additional headers based on platform
or configuration.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-02-01 11:31:36 +01:00
Daniel DeGrasse
2ac1b42952 drivers: usb_dc_mcux: Move mcux callback handler out of ISR context
MCUX usb ISR was making usb callbacks directly, which caused assertion
failures when a callback attempted to lock a mutex. Move USB callback
handler to separate thread, and make ISR notify thread via message
queue.

Fixes #40638

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-01-28 10:05:47 +01:00
Henrik Brix Andersen
2aed5a1237 drivers: can: remove CAN_BUS_UNKNOWN CAN controller state
The CAN_BUS_UNKNOWN CAN controller state is only used to indicate that
the current CAN controller state could not be read.

Remove it and change the signature of the can_get_state() API function
to return an integer indicating success or failure.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-28 10:05:29 +01:00
Daniel DeGrasse
f5ebc30087 soc: imx_rt: Enable IMX.RT General Power Controller Driver
GPC driver is used for power management operations on RT series SoCs.
Enable inclusion of the driver into the build.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-01-18 14:09:45 -05:00
Erwan Gouriou
26cde3ab23 boards: b_u585i_iot02a: Add a non-secure target
Provide a _ns target for b_u585i_iot02a board.
Flash partition is given as default for most applications,
with the following sizes:
MCUBoot: 208K
Secure: 256K
Non secure: 512K

Tested using tfm_ipc sample.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-18 10:42:45 -05:00
Daniel Leung
b63b71aa1b tfm: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-01-12 16:02:16 -05:00
Henrik Brix Andersen
d727547f79 modules: canopennode: increase stack sizes
Increase the default CANopenNode stack sizes a bit. The current stack
sizes are too small for e.g. ST STM32F3, likely other platforms as well.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-11 14:40:49 -06:00
Henrik Brix Andersen
12388b9965 modules: mcux: add support for indicating the presence of MCAN
Add Kconfig option for indicating that a given SoC contains the NXP
MCAN CAN FD controller.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-01-10 12:00:20 +01:00
Henrik Brix Andersen
8af4bb722d drivers: can: rename API functions for better consistency
Rename a few CAN API functions for clarity and consistency with other
Zephyr RTOS APIs.

CAN_DEFINE_MSGQ() becomes CAN_MSGQ_DEFINE() to match K_MSGQ_DEFINE().

can_attach_isr() becomes can_add_rx_filter() since a filter callback
function is not an interrupt service routine (although it is called in
isr context). The word "attach" is replaced with "add" since filters are
added, not attached. This matches the terminology used is other Zephyr
APIs better.

can_detach() becomes can_remove_rx_filter() to pair with
can_add_rx_filter().

can_attach_msgq() becomes can_add_rx_filter_msgq() and documentation is
updated to mention its relationship with can_add_rx_filter().

can_register_state_change_isr() becomes can_set_state_change_callback()
since a state change callback function is not an interrupt service
routine (although it is called in isr context). The word "register" is
replaced with "set" since only one state change callback can be in
place.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-10 10:44:37 +01:00
Paweł Kwiek
2c387c6a50 modules: hal_nordic: align & extend lp_timer platform
This commit aligns nrf_802154_lp_timer_zephyr platform to new API of
nrf_rtc_timer. Moreover, it implements lp_timer synchronization
functions using the new nrf_rtc_timer API.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Signed-off-by: Paweł Kwiek <pawel.kwiek@nordicsemi.no>
2022-01-04 17:44:32 +01:00
Sebastian Bøe
7ea7eb05ae tfm: kconfig: Fix config regression from TF-M 1.5
In TF-M 1.5 some defaults changed. Some of our CMake code was
unfortunately making assumptions about the defaults.

This is now rectified. The TF-M CMake variables that had their
defaults changed are now always set dependent on the Kconfig values
and we no longer leave the CMake variables unset and with default
values.

A cleanup will be done later to not rely on default values for all
variables. This patch only fixes the defaults that have changed.

Also, TFM_PSA_API is removed as it is now an internal variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-01-04 12:33:23 +01:00
Krzysztof Chruscinski
3457ebc667 modules: hal_nordic: Add NRFX_GPIOTE_NUM_OF_EVT_HANDLERS option
Add option to specifiy number of nrfx_gpiote user handlers in Kconfig.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-01-04 09:50:02 +01:00
Henrik Brix Andersen
b1b77c1774 drivers: can: change can_tx_callback_t function signature
Change the can_tx_callback_t function signature to use an "int" (not an
uint32_t) for representing transmission errors.

The "error" callback function parameter is functionally equivalent to
the return value from can_send() and thus needs to use the same data
type and needs to be able to hold negative errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-01-01 07:40:29 -05:00
Carles Cufi
c7ec3db5e5 Revert "modules: hal_nordic: align & extend lp_timer platform"
This reverts commit 9cdd8cd168.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-12-20 21:04:26 +01:00
TOKITA Hiroshi
5c7a0ef888 drivers: interrupt-controller: add Nuclei ECLIC driver
Add support for the ECLIC interrupt controller
which is used with the Nuclei processor core.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
TOKITA Hiroshi
5f3a6af91c modules: Add Configurations for GD32VF103
Add configuration for GD32VF103 SoC.

- Add compiler definition HXTAL_VALUE for compile GigaDevice's HAL.
- Redefine gd32_cmsis_dir for source commonize.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2021-12-20 17:51:30 +01:00
Paweł Kwiek
9cdd8cd168 modules: hal_nordic: align & extend lp_timer platform
This commit aligns nrf_802154_lp_timer_zephyr platform to new API of
nrf_rtc_timer. Moreover, it implements lp_timer synchronization
functions using the new nrf_rtc_timer API.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Signed-off-by: Paweł Kwiek <pawel.kwiek@nordicsemi.no>
2021-12-20 16:25:49 +01:00
Paweł Kwiek
f3fea0e6f1 modules: hal_nordic: Add CCA macros when nRF Radio Driver is enabled
This patch restricts access of CCA configuration related macros to
builds for which nRF 802.15.4 Radio Driver is enabled. This reduces
clutter and prevents misuse of CCA macros.

Signed-off-by: Paweł Kwiek <pawel.kwiek@nordicsemi.no>
2021-12-16 10:12:36 +01:00
Damian Krolik
45307140ac tfm: kconfig: make ITS size configurable
Add two Kconfig variables for controlling the size and
the number of assets to be stored in Internal Trusted
Storage (ITS).

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2021-12-14 13:42:57 -06:00
HaiLong Yang
33a44a7748 modules: hal_gigadevie: add CEC and TSI drivers
Add CEC and TSI drivers from GD32F3X0.

Signed-off-by: HaiLong Yang <cameledyang@pm.me>
2021-12-13 20:27:30 -05:00
Joakim Andersson
faad102707 modules: tfm: Fix in SPM log level silence configuration
Fix copy-paste mistake in SPM log level silence configuration, PARTITION
should be SPM in order to correctly silence SPM log.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-12-13 16:36:06 +01:00
Henrik Brix Andersen
f499559434 drivers: can: deprecate the use of CAN-specific error return values
Deprecate the use of CAN-specific error return values and replace them
with standard errno values.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-09 12:37:40 -05:00
Robert Lubos
2bc43cf94d modules: mbedtls: Remove MBEDTLS_ECP_MAX_BITS from generic config
MBEDTLS_ECP_MAX_BITS is now set automatically by mbed TLS, redefining it
in the config file ends up in compilation warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-12-08 08:56:03 -05:00
Jimmy Brisson
ee001fa4bb boards: Add mps3-an547-ns target; build mps3-an547 with TFM in secure mode
This includes a new device tree, new target yaml and new target
defconfig

Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
2021-12-07 10:44:23 -06:00
Pieter De Gendt
4d161a3b23 drivers: counter: NXP SNVS rtc: Add support for NXP imx SNVS RTC
Adds a driver using the SNVS high power and optionally low power
RTC instances. A device specific function `mcux_snvs_rtc_set` is
provided to update the current counter value.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-12-07 09:45:43 -06:00
Henrik Brix Andersen
53f85df551 modules: canopennode: switch to using can_set_mode()
Switch from using can_configure() to using can_set_mode() for disabling
CAN controller transmissions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-12-02 10:54:44 +01:00
Hake Huang
f37a227201 modules: add HAS_MCUX_I2S module
add HAS_MCUX_I2S in mcux platforms

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-12-02 10:50:21 +01:00
Krzysztof Chruscinski
5ef63d8313 Bluetooth: Controller: nordic: Rework hw resources files
Move all defines that specifies (D)PPI resources which are used
to dedicated files which have no include dependencies. This allow
to use them in nrfx_glue.h to specify fixed (D)PPI channels used
by the bluetooth.

Additionally, added mask with GPIOTE channels used by the bluetooth
controller. It was previously not defined which could lead to
conflicts since same channels could be allocated by the nrfx_gpiote
user

Updated nrfx_glue.h to use new approach.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-02 09:55:48 +01:00
Krzysztof Chruscinski
1345b2ddd4 modules: hal_nordic: nrfx: Set NRF_SKIP_FICR_NS_COPY_TO_RAM
Set NRF_SKIP_FICR_NS_COPY_TO_RAM for nrf53 and nrf91 until corresponding
memory region is excluded from use.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-02 09:55:48 +01:00
Krzysztof Chruscinski
7e0f1d08e4 modules: hal_nordic: Update nrfx to version 2.6.0
Update the hal_nordic module revision, to switch to nrfx v2.6.0.

nrfx 2.6.0 includes extended API in nrfx_gpiote which can be
used by the zephyr shim.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-02 09:55:48 +01:00
Andrzej Puzdrowski
81b1e7fdac modules: Hooks Kconfig for MCUboot's bootutil
Mcuboot's bootutil libraries has option to use hooks which
allows to customize its behavior while proceeding on images
date. This patch introduces configuration options required for
enabling that option.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-11-30 12:08:03 +01:00
Krzysztof Chruscinski
9886bdc0c8 drivers: pwm: pwm_nrf5_sw: Use runtime resources allocation
Use nrfx_gpiote and nrfx_ppi allocators to allocate channels
at runtime instead of fixed, device-tree based allocation which
is harder to maintain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-26 09:31:54 +01:00
Sam Hurst
55831a280c stm32: Add UCPD support to Kconfig
This commit adds UCPD HAL and LL drivers to the Kconfig system
required to enable USB Power Delivery interface (UCPD)
on STM32G0/G4/L5/U5 devices

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2021-11-24 14:21:04 -05:00
Joakim Andersson
3db41349f5 cmake: Add variable for the TFM build directory
The TFM build directory path is hardcoded in many places.
In order to support out-of-tree secure partitions the output path
has to be known in potentially out-of-tree build scripts.
This could potentially break out-of-tree build scripts if the
location of the build directory was changed.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-22 22:19:41 -05:00
Gerard Marull-Paretas
f8017dc5ad drivers: pinctrl: gd32: initial support for AFIO based SoCs
Add a pin control driver for GD32 SoCs using the AFIO model.

Thanks to Gerson Fernando Budke for testing and implementation
suggestions.

Co-authored-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Gerard Marull-Paretas
543a3843ff drivers: pinctrl: gd32: initial support for AF based SoCs
Add a pin control driver for GD32 SoCs using the AF model.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Gerard Marull-Paretas
df6dd42ca3 modules: hal_gigadevice: include module headers
Include the module `include` folder to allow access to the dt-bindings
helpers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-22 16:30:28 -05:00
Joakim Andersson
13230747e3 modules: trusted-firmware-m: Fix mcuboot imgtool not found on path
Fix issue with TFM signing of images not using the correct imgtool.
The wrapper command expects the mcuboot scripts folder to be the
current working directory when called in order to find its own
version of imgtool.
Since the command is using a different current working directory
this is not found and the system imgtool is used instead.
This causes the commands to be run with 2 different version of imgtool
if the system imgtool is found and does not have any issues.
The system imgtool could not be installed or have compatibility issues
as 1.7.2 version of imgtool is currently required by the wrapper script

Fixes: #40254

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-21 18:51:16 -05:00
Gerson Fernando Budke
7fba91f383 modules: hal_gigadevice: Set directories to lowercase
This rework module hal_gigadevice to be compliance with rule
that requires firmware libraries directories names be lowercase.
This rule was created at hal_gigadevice/README and it is not
a Zephyr general rule. This only affect how hal_gigadevice is
used.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-11-20 11:54:08 -05:00
Gerard Marull-Paretas
5f99dc7a1c modules: hal_gigadevice: add missing drivers
Add missing drivers included in F4XX HAL:

- DCI
- IPA
- IREF
- SYSCFG
- TLI
- TRNG

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-18 17:42:57 +01:00
Gerard Marull-Paretas
74538a1709 modules: hal_gigadevice: make compile definitions global
GD32F4XX requires access to SoC definitions (e.g. GD32F450) when
including library header files, so expose them at Zephyr level.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-18 17:42:57 +01:00
Gerard Marull-Paretas
20d3711984 modules: hal_gigadevice: adjust CMake
Adjust CMake according to latest SoC changes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2021-11-18 17:42:57 +01:00
Joakim Andersson
9b87d6f7fc modules: tfm: Fix cmake warnings for unused variables
Fix cmake warnings for TF-M build system when PSA tests are not enabled.
This produces the following warnings:
"
CMake Warning:
  Manually-specified variables were not used by the project:

    PSA_TOOLCHAIN_FILE
    TOOLCHAIN
"

These warnings can point to cache or config variables being updated in
the TF-M build system so keep this free of warnings.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-15 14:54:48 -05:00
Joakim Andersson
4a60dce67c modules: tfm: Update crypto modules prompt strings
Update crypto modules prompt strings to follow the Kconfig guidelines.
"For a Kconfig symbol that enables a driver/subsystem FOO, consider
having just “Foo” as the prompt, instead of “Enable Foo support” or the
like."

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-13 07:58:50 -05:00
Joakim Andersson
aaa38bfcb6 modules: tfm: Split CRYPTO_ASYMMETRIC module into SIGN and ENCRYPT
The ASSYMETRIC crypto module has been split in two, for sign and
encrypt. Update Kconfig entries to match.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-13 07:58:50 -05:00
Joakim Andersson
81c5fb47a8 modules: tfm: Remove CRYPTO_GENERATOR_MODULE kconfig
Remove CRYPTO_GENERATOR_MODULE Kconfig which has been removed.
Its features are covered by TFM_CRYPTO_KEY_MODULE and
CRYPTO_KEY_DERIVATION_MODULE.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-13 07:58:50 -05:00
Fabio Baltieri
b5f9f34fb5 modules: canopennode: set tx_workq thread name
Set a thread name for the tx_workq thread, so that it shows up in
"kernel stacks" when the shell or thread debugging are enabled.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-11-12 14:51:16 +01:00
Sam Chen
671ab46e2b modules/mbedtls: add the PKCS5 enabler
Kconfig support to `MBEDTLS_PKCS5_C` feature

Signed-off-by: Sam Chen <sam.chen@iota.org>
2021-11-11 07:18:47 -05:00
Marcin Niestroj
c32b524d6d mbedtls: support configuration of PSK maximum length via Kconfig
So far maximum PSK length was configured by mbedTLS as 32 bytes.
Introduce Kconfig option that will configure it instead of relying on
default value from mbedTLS library, so that user can easily adjust that
value to application needs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2021-11-10 08:28:15 -05:00
Joakim Andersson
dda3a5ad0d modules: tfm: Split trusted-firmware-m repository
Split the zephyr project maintained repository trusted-firmware-m into
forks of the individual upstream repositories.

https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Upstream: TF-Mv1.4.1
Additions:
zephyr: module: Add zephyr module file
trusted-firmware-m: platform: lpcxpresso55s69: Update SDK

https://git.trustedfirmware.org/TF-M/tf-m-tests.git
Upstream: 51ff2bdfae043f6dd0813b000d928c4bda172660
Additions:
zephyr: module: Add module file for tf-m-tests

https://github.com/ARM-software/psa-arch-tests.git
Upstream: 60faad2ead1b967ec8e73accd793d3ed0e5c56bd
Additions:
zephyr: module: Add module file for psa-arch-tests
psa-arch-tests: Allow overriding of toolchain file

The organization of folders remain the same with the following
exceptions:
Moved:
root folder moved from modules/tee/tfm to modules/tee/tf-m to avoid
problems with west update.
zephyr/module.yml to trusted-firmware-m/zephyr/module.yml and
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} points to what was previously
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m.
Added:
psa-arch-tests/zephyr/module.yml and ${ZEPHYR_PSA_ARCH_TESTS_MODULE_DIR}
tf-m-tests/zephyr/module/ and ${ZEPHYR_TF_M_TESTS_MODULE_DIR}
Removed:
init-git.sh
README.rst

Fixes: #39353

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-01 11:20:06 -04:00
Joakim Andersson
8c09cd374f modules: trusted-firmware-m: Use module location variable for .pem keys
Use the zephyr module dir variable for the trusted-firmware-m root
folder. Update documentation to TF-M documentation in
tfm-secure-boot.rst.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-01 11:20:06 -04:00
Martin Jäger
ec576a59d3 canbus: canopen: Use new API to check number of filters
The previous CONFIG_CAN_MAX_FILTER is specific to certain drivers.

Using the new API makes the CAN open driver independent of the used
CAN hardware / driver.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-10-28 13:56:58 -04:00
Immo Birnbaum
ee7ac70c10 modules: cmsis: add core_ca inclusion for aarch32 Cortex-A SoCs
Add the inclusion of the Common Peripheral Access Layer for aarch32
Cortex-A SoCs in combination with the respective SoC's header file,
in which the feature flags evaluated in core_ca.h must be provided.

The corresponding CMSIS include path is added to the build by setting
the HAS_CMSIS_CORE_A Kconfig item for all aarch32 Cortex-A CPUs.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
2021-10-28 15:26:50 +02:00
Gerson Fernando Budke
087be00b58 soc: arm: Introduce gigadevice soc
Add gigadevice soc initial version.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Gerson Fernando Budke
6d8c03422c modules: Add gigadevice hal module
This add access to modules/hal/gigadevice with three firmware
libraries by updating west.yaml file:

 - GD32E10X ARM (Cortex-M4F)
 - GD32F403 ARM (Cortex-M4F)
 - GD32VF103 RISC-V (Nucleisys Bumblebee core)

It introduce module/hal_gigadevice, which contains all Cmake
and Kconfig rules to build GigaDevice SoCs into zephyr main
tree.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2021-10-28 11:17:25 +02:00
Joakim Andersson
4748777126 modules: tfm: Fix not defined configuration for TF-M log options
Fix configuration options for TF-M log levels configured to an empty
string when not defined. This can happen when none of the options
have been selected due to dependencies not being met.
For example when TFM_MINIMAL=y then TFM_PARTITION_LOG_LEVEL will not be
defined.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-27 10:51:34 +02:00
Andrei Auchynnikau
3b3a30612f drivers: add adc driver for the NXP RT series
adc driver is based on the NXP MCUX hal library

Signed-off-by: Andrei Auchynnikau <ovchinnikov@strim-tech.com>
2021-10-22 15:43:36 -05:00
Yuval Peress
f6f24a2a79 modules: Add fff mocking framework
Issue #38643

Introduce a more powerful and well established mocking framework
into Zephyr. It also allows running the actual FFF tests using the
zephyr SDK and ztest framework to ensure compatibility.

As per TSC meeting, the fff.h header was directly added to
subsys/testsuite/include/. As per the guidelines, the file is exactly
the same as it is in FFF's library, but re-styled with clang-format.

The west.yml entry was added using the "ci" group and filtered by
default. (note that the tests will break until the CI actually
specifies that the group is needed).

Signed-off-by: Yuval Peress <peress@google.com>
2021-10-22 09:43:13 -04:00
David Brown
1491551ca6 modules: Allow for Mbed TLS module to match upstream
Use the Mbed TLS module, expecting the upstream directory layout rather
than the nested directory we've been using before.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-18 09:51:06 -05:00
Joakim Andersson
70a9bc0e57 modules: tfm: Add configuration for TF-M log options
Add Kconfig options for configuring TF-M log options.
 - Partition log level
 - SPM log level
 - Exception info dump

Set log level to "info" which is the default in upstream TF-M.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-17 11:50:53 -04:00
Joakim Andersson
f26f416e74 modules: tfm: Remove duplicate tfm cmakecache config
Remove duplicated setting of TF-M CMakeCache.txt entry TFM_BOARD.
In addition it is also wrong since the CONFIG_ prefix is missing.

Leftover from: 583d5a6db3

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-17 11:50:53 -04:00
Sebastian Bøe
3a3e3c041b tfm: build: Build TF-M with 1 thread on Windows
Don't build TF-M in parallel on Windows as it has been reported to
expose dependency issues with the TF-M build system.

These issues will be investigated at a later time.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2021-10-13 10:12:57 -04:00
Manivannan Sadhasivam
d66a745d64 modules: loramac-node: Fix the build issue for US915 and AU915 regions
These 2 regions depends on the RegionBaseUS.c file.

Fixes: #39297

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2021-10-12 15:22:04 -04:00
Joakim Andersson
0f53679859 modules: tfm: Use ZEPHYR_<MODULE>_MODULE_DIR instead of relative paths
Use ZEPHYR_<MODULE>_MODULE_DIR instead of relative paths. Moving the
module folder would otherwise break the build system.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-11 21:05:30 -04:00
David Brown
7d8640aec3 modules: mbedtls: Fix buffer size configs for 3.0
Mbed TLS 3.0 changes the configuration defines used to determine the
buffer size used for TLS.  We were still setting the old one, which was
causing Mbed TLS to revert back to the large default buffer size.  Set
both the in and out buffer sizes to match the config setting.  A future
improvement may be to separate this into two configurations within the
Zephyr config.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-07 14:02:40 -05:00
Sebastian Bøe
e3b3afa7a5 tfm: Fix zephyr-sdk toolchain variant integration
The psa-arch-tests project changed how third-party toolchains are
integrated. This broke the Zephyr sdk.

This patch aligns with the new mechanism.

https://github.com/ARM-software/psa-arch-tests/pull/276

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2021-10-07 14:02:40 -05:00
Flavio Ceolin
0f39eac07c modules: mbdetls: define MBEDTLS_SHA224_c
Newer versions of mbedTLS require MBEDTLS_SHA224_C definition to use
sha256.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-07 14:02:40 -05:00
Frank Audun Kvamtrø
fb90efef1b modules: mbedtls: Allow custom mbedtls implementation
-The current scheme in zephyr has the two choices MBEDTLS_BUILTIN
 and MBEDTLS_LIBRARY, but the choice of MBEDTLS_LIBRARY requires
 setting CONFIG_MBEDTLS_INSTALL_PATH for includes and library linking.
 This may not be neccesary when an alternative implementation of the
 library is being used. This adds support for custom choices in
 MBEDTLS_IMPLEMENTATION which can be added in an out-of-tree Kconfig
 file.
-Made else an elseif(CONFIG_MBEDTLS_LIBRARY.
-Removed reduntant assertion between the two choices.

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
2021-09-29 15:32:40 -04:00
Pieter De Gendt
4e2bb0e762 drivers: hwinfo: add reset cause support for iMX RT series
Add a shim driver to get/clear the reset reason on NXP i.MX
RT controllers

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-09-29 14:44:21 -04:00
Gregers Gram Rygg
d47bd60933 soc: nordic_nrf: Add Kconfig option for enabling trace port
Add Kconfig option to enable the hardware trace port in the SystemInit()
function.

Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
2021-09-28 20:11:40 -04:00
Torsten Rasmussen
9b43e7a23d modules: hal_nxp: removing always empty zephyr_library
No sources were ever added to the `zephyr_library()` defined in
modules/hal_nxp/usb/CMakeLists.txt, thus removing this lib to avoid
the warning:

> No SOURCES given to Zephyr library: modules__hal_nxp__usb
>
> Excluding target from build.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-09-28 12:13:23 +02:00
Tom Owen
d63d828c8f stm32: Add FMAC support to Kconfig
This commit adds FMAC HAL and LL drivers to the Kconfig system
Required to enable Filter Math Accelerator (FMAC)
 on STM32G4/H7 devices

Signed-off-by: Tom Owen <tom.owen@zepler.net>
2021-09-15 22:36:49 -04:00
Frank Audun Kvamtrø
c91efdf939 modules: tfm: Override the TF-M MBEDCRYPTO_PATH
The TF-M build is passed a path to the mbedtls project
directory, however, NCS has its own mbedtls variant. When
building with TF-M we use a generator expression to allow
setting the path to mbedtls from nrf_security.

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-30 17:08:34 -04:00
Stephanos Ioannidis
2e5204b785 modules: cmsis_dsp: Update configs for CMSIS-DSP 1.9.0 (CMSIS 5.8.0)
This commit updates the CMSIS-DSP configurations for the CMSIS-DSP
1.9.0, which is part of the CMSIS 5.8.0 release.

Note that the Helium/MVE configurations are removed because CMSIS-DSP
now automatically selects them if available.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-08-30 18:17:47 +02:00
Joakim Andersson
fb90113dc8 modules: hal_nordic: Add nrf51 MDK defines needed to apply nrf51 erratas
Add nrf51 MDK defines needed to correctly select the nrf51 erratas
needed on the specific SoCs. The nrf51_erratas.h header file only uses
these defines to check which erratas should be applied.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-08-30 15:48:19 +02:00
Toby Firth
893bfc0fc1 drivers: counter: added ctimer driver for lpcexpresso55s69
Added shim driver for the CTIMERs for the lpcexpresso55s69 board.

Fixes: #22705

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2021-08-24 17:13:22 -04:00
Andrzej Głąbek
72e3bfe1c0 soc: nordic_nrf: Add Kconfig options for APPROTECT handling
Add Kconfig options that allow users to select the way the APPROTECT
mechanism is handled in the SystemInit() function.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-24 07:27:12 -04:00
Lauren Murphy
6cf73956c8 modules: tflite-micro: fix cmakelists.txt
Adds *_common.cc files to fix undefined references during build
of updated samples. Remove unnecessary LICENSE files. Remove
unnecessary header files in zephyr_library_sources().

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Lauren Murphy
804285ae63 modules: update tensorflow to tflite-micro
Updates west manifest and module folder name to point to new
TensorFlow Lite Micro repo Google recently pulled out of
the TensorFlow repo.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-08-24 07:26:08 -04:00
Mahesh Mahadevan
1939d48dbb modules: hal_nxp: Updates for LPC USB
Add the defines to add support for LPC USB

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-19 17:19:11 -04:00
Mahesh Mahadevan
36c9ffe8ec modules: mcux: Add support for LPC USB
Add support for LPC USB controller

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-19 17:19:11 -04:00
Mahesh Mahadevan
a69bd75bd8 modules: hal_nxp: Move NXP USB file to modules folder
Move USB file to from modules/hal_nxp to zephyr/modules
folder

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-08-13 12:51:46 -04:00
Kumar Gala
689864ebe0 modules: hal_nxp: tweak integration to utilize cmake-ext/kconfig-ext
Update zephyr side to handle hal_nxp using cmake-ext/kconfig-ext.  This
allows for having zephyr specific integration code live with the zephyr
source tree.

For now on the cmake side we just use add_subdirectory() of the hal_nxp
repo so the integration is effectively transparent.

For Kconfig we add a place holder Kconfig file since the hal_nxp repo
doesn't have any Kconfig files in it currently.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-08-11 12:26:28 -05:00
Paweł Kwiek
da8f9d77c4 modules: hal_nordic: Increase number of serialization buffers
This commit increases number of available serialization buffers to
account for possible delays caused by serialization itself and
processing on the application core.

Signed-off-by: Paweł Kwiek <pawel.kwiek@nordicsemi.no>
2021-08-11 11:47:10 +02:00
Paweł Kwiek
b7bd1be622 hal_nordic: Rework nRF IEEE 802.15.4 temperature update module
This commit reworks nRF IEEE 802.15.4 temperature update module to save
resources, otherwise used to create thread, by using work queue.

Signed-off-by: Paweł Kwiek <pawel.kwiek@nordicsemi.no>
2021-08-09 17:52:58 +02:00
Przemyslaw Bida
082efb4e9d hal_nordic: Adjust temperature sensor stack size.
This commit extends size of stack used by IEEE 802.15.4 radio
temperature sensor. This commit fixes stack overflow issue in
echo_server sample for OpenThread.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2021-07-31 14:57:19 -04:00
Mahesh Mahadevan
5f636286d3 drivers: pwm: Add PWM support for NXP LPC devices
Add PWM support using the LPC SCTimer module

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-30 13:08:03 -05:00
Håkon Øye Amundsen
881b877eca modules: tfm: add configuration for disabling the RNG module
A new configuration is available in TF-M, for disabling RNG
independent from key derivation. Introduce a corresponding
Kconfig option to control the RNG API enabling/disabling from
Zephyr.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 20:09:58 +02:00
Ioannis Glaropoulos
138be0a080 modules: tf-m: allow DOWNLOAD option for mcuboot
Allow developers the option of using the DOWNLOAD option
for MCUboot in TF-M bulds with BL2. Using MCUboot from
Zephyr is still the default option.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 19:38:35 +02:00
Ioannis Glaropoulos
aa3bd927df modules: tf-m: add TFM_BL2 dependency on TFM_MCUBOOT_IMAGE_NUMBER
TFM_MCUBOOT_IMAGE_NUMBER Kconfig option should have
a dependency on TFM_BL2, since it is not applicable
otherwise.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 19:38:35 +02:00
Ioannis Glaropoulos
5e6503f6a7 manifest: remove mcuboot version for TF-M in Zephyr
We remove the tfm-mcuboot module in Zephyr (which hosts the
mcuboot version that is used for TF-M builds in Zephyr). We
will force TF-M builds in Zephyr to  use the MCUboot version
that any Zephyr builds are using. This will allow Zephyr to
maintain a single mcuboot module version in its default
manifest.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 19:38:35 +02:00
Ioannis Glaropoulos
d42671737e modules: tf-m: supply NXP HAL directory path for builds for LPC
For TF-M builds on LPCXPRESSO55S69 we set the path to the
NXP HAL sources that are required for building TF-M for this
platform.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 19:38:35 +02:00
Ioannis Glaropoulos
101e32f1d1 modules: tf-m: update target names for arm targets
Upstream TF-M has modified the path name for ARM platforms,
so we fix the board names in the module integration code.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-07-28 19:38:35 +02:00
Pawel Kwiek
b2487e3c88 manifest: Update hal_nordic
This commit adds temperature platform used by the IEEE 802.15.4 Radio
Driver. The new platform requires an enabled temperature sensor.
The new hal_nordic revision updates the nRF 802.15.4 component.

Signed-off-by: Pawel Kwiek <pawel.kwiek@nordicsemi.no>
2021-07-23 15:54:59 -04:00
Yuriy Vynnychek
4b0b1e0eee modules: hal_telink: introduce new HAL Telink module
This commit introduce new HAL Telink module used by
new Telink B91 RISC-V platform drivers.

Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
2021-07-21 05:37:12 -04:00
Mahesh Mahadevan
db162bb05d counter: Add counter support for rt600
Add counter support using the RTC for RT600

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-07-16 18:56:15 -04:00
Marcin Niestroj
84c5a469ab module: mbedtls: add shell module
Add mbedTLS specific shell module, which allows (for now) to show heap
allocation statistics.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2021-07-14 21:14:35 -04:00
Kevin Townsend
703021a78a boards: arm: nrf9160dk_nrf9160: Rename NS target
This commit updates the NS board variant from
`nrf9160dk_nrf9160ns` to `nrf9160dk_nrf9160_ns`
to maintain consistency across zephyr.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-07-10 12:44:02 -04:00
Kevin Townsend
b8c9dc169e boards: arm: nrf5340dk_nrf5340: Rename NS target
This commit updates the NS board variant from
`nrf5340dk_nrf5340_cpuappns` to `nrf5340dk_nrf5340_cpuapp_ns`
to maintain consistency across zephyr.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-07-10 12:44:02 -04:00
Kevin Townsend
58638563b5 boards: arm: bl5340_dvk: Rename NS target
This commit update the NS board variant from `bl5340_dvk_cpuappns`
to `bl5340_dvk_cpuapp_ns` to maintain consistency across zephyr.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-07-10 12:44:02 -04:00
Henrik Brix Andersen
f1fe5212b9 modules: mcux: add support for indicating the presence of RCM
Add Kconfig option for indicating that a given SoC contains the NXP
Kinetis Reset Control Module (RCM).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-08 09:33:32 -05:00
Henrik Brix Andersen
4216b9f622 modules: canopennode: rename header and Kconfig options
Rename the top-level header file from <canbus/canopen.h> to
<canopennode.h>.

Rename CANopenNode related Kconfig options from CONFIG_CANOPEN* to
CONFIG_CANOPENNODE*.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-01 13:32:18 -04:00
Henrik Brix Andersen
d679037643 modules: canopennode: move glue code to modules directory
Move the Zephyr-specific interface and support code for CANopenNode into
the modules directory. Consolidate the CMakeLists.txt files into one.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-07-01 13:32:18 -04:00
Ryan QIAN
2883d727a7 drivers: clock_control: add ccm driver for rt117x
- add ccm driver for rt117x

Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
2021-06-29 11:30:00 -04:00
Ioannis Glaropoulos
bbcd7ef7cd trusted-firmware-m: rename AN521 target to BOARD_MPS2_AN521_CPU0_NS
Since we now have separate Kconfig symbols for the different
MPS2 AN521 board variants, we need to update the BOARD switch
for the TF-M target on MPS2 AN521.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-22 08:45:41 -04:00
Øyvind Rønningstad
583d5a6db3 tfm: Refactor the TF-M Cmake code to simplify and remove the function
The current CMakeLists.txt contains a function that is called from
the same file.

This patch removes the abstraction, allowing to remove many
lines of parameter handling.

Additionally, with this patch, the Cmake argument handling is now
done via a list, which removes many more named variables.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-06-22 08:45:20 -04:00
Lukasz Maciejonczyk
4185e8e515 modules: hal_nordic: add Kconfig option for frame auth and encryption
New option enables/disables frame encryption module, security writer
module and IE writer module.

The new hal_nordic revision updates the nRF 802.15.4 component.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2021-06-22 08:22:02 -04:00
Torbjörn Leksell
5a4070953d Tracing: TraceRecorder CMake update
- Fixed some incorrect streamport references that pointed to the
base streamport files instead of those dedicated for Zephyr.
- Updated the source file compilation to match the updated
TraceRecorder module.

Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-18 08:08:07 -05:00
Ilya Tagunov
05957b66cb lorawan: update LoRaMac-node and move CMakeLists.txt to the main repo
Update the LoRaMac-node library to the last stable release and fix
the Zephyr glue code to match it. Move CMakeLists.txt to the main
Zephyr repository to simplify loramac-node module maintenance.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2021-06-18 11:22:03 +02:00
Devaraj Ranganna
29ca4aaba2 modules: trusted-firmware-m: Set TF-M isolation level
The CMake variable `TFM_ISOLATION_LEVEL_ARG` was not properly set when
application configures higher isolation level. This led to isolation
level always being to set 1.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
2021-06-16 10:02:34 +02:00
NavinSankar Velliangiri
c9aa260f0c samples: compression: lz4: lz4 sample application
This PR add sample application for minimal lz4 library.

lz4 library RFC requested here: #28535

Fixes: #26648

Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
2021-06-12 17:21:55 +02:00
Torsten Rasmussen
7cc52f88c3 cmake: tfm: moving CMake execution of tfm_cmake to a custom command
Fixes: #36101

The move of CMake invocation to a dedicated custom target, see #34868
results in tfm_cmake to always be considered out-of-date, causing CMake
to be reinvoked in the TF-M Binary dir, which again results in the
build command to rebuild.

This commit moves the invocation to a custom command with the
CMakeCache.txt as output. The custom target tfm_cmake is updated to
depend on CMakeCache.txt.

This mean that CMake for TF-M will only be invoked inside the Zephyr
build command if that file is missing.

If the CMakeCache.txt file is updated or TF-M CMake or source code is
modified, then the build command inside the TF-M build folder will
ensure correct re-run of CMake from within the TF-M build folder.

This ensures that TF-M will still rebuild if TF-M code is modified,
while at the same time avoid unnecessary rebuilds of TF-M code.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-06-11 16:37:22 -05:00
Ioannis Glaropoulos
ce757d5970 modules: tfm: remove redundant if BUILD_WITH_TFM guard in Kconfig
We do not need the if BUILD_WITH_TFM guard in the main
Kconfig file, as the guards are present insude the respective
Kconfig files that are sourced by the main Kconfig.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-11 16:13:57 +02:00
Håkon Øye Amundsen
207f2ab1e6 modules: tf-m: split TF-M configuration in multiple Kconfig files
The TF-M project is higly configurable and we end up having
a growing number of Kconfig option definitions in the main
Kconfig file. This commit splits out the configuration options
for the TF-M partition and for the crypto partition configuration
into separate Kconfig files, for ease of reading. The commit
does not introduce behavioral changes.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-11 16:13:57 +02:00
Øyvind Rønningstad
382bbacb0a tfm: Put saving of FPU context into its own file so it can be reused
Also, this eases readability.

The new API can be used any time all FP registers must be manually
saved and restored for an operation.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-06-07 15:23:22 +02:00
Ioannis Glaropoulos
bf87f98fa4 modules: tf-m: fix NS image selection for regression tests
When running with TFM Regression option set, but without
BL2 (MCUboot) we need to use the TF-M's NS binary, and not
the Zephyr application. This was selected properly for the
case with MCUboot boot already, but not when running the
regression tests without MCUboot.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-04 16:21:42 -05:00
Håkon Øye Amundsen
f8a9e0019c modules: tfm: add option for selecting crypto modules
These are needed to disable not needed crypto modules in
the trusted-firmware-m module.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-04 16:21:24 -05:00
Devaraj Ranganna
7273603707 modules: tf-m: Add Crosstool-NG toolchain support
Zephyr SDK is not supported on OS X, however, Zephyr toolchain can be
built on OS X using Crosstool-NG.

Currently, trusted-firmware-m CMakeLists.txt only supports `zephyr` and
`gnuarmemb` toolchains which prohibits building TF-M on OS X using
Zephyr toolchain built with Crosstool-NG.

docs:
https://docs.zephyrproject.org/latest/getting_started/toolchain_3rd_party_x_compilers.html#crosstool-ng

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
2021-06-04 16:16:05 -05:00
Øyvind Rønningstad
c2efcc308c tfm: interface: Fix bug where FPU registers were not restored correctly
The caller saved registers were restored both as caller saved and
callee saved registers, i.e. register 0-15 were restored into
both register 0-15 and 15-31.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-06-04 11:12:49 -05:00
Robert Lubos
6ca92495e5 modules: mbedTLS: Add separate Kconfig entry for MBEDTLS_HAVE_TIME_DATE
Currently the MBEDTLS_HAVE_TIME_DATE mbedTLS option is enabled based on
the CONFIG_POSIX_API option. This doesn't seem right, since the enabling
the POSIX API does not guarantee that there is a valid time source in
the system. This was the case for the qemu_x86 platform, where enabling
POSIX_API caused TLS handshake failures due to certificate validation
errors caused by no valid time avaialble in the system.

Fix this by adding a specific KConfig entry for date/time configuration
in mbedTLS. Applications that need to enforce date verification in
mbedTLS should enable it explicitly instead of relying on the
non-obvious implicit configuration.

Fixes #35401

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-06-01 07:30:15 -05:00
Aurelien Jarno
cbb2a9be77 logging: Enable SWO support for nRF SOCs
The nRF SOCs declare support for SWO using the HAS_SWO define. In
addition, the SWO pin has to be configured at runtime, which is done
through the Nordic HAL by defining ENABLE_SWO.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-05-18 12:28:25 -05:00
Torsten Rasmussen
00bd442936 tfm: cmake: added CMAKE_ARGS as argument to trusted_firmware_build
Follow-up: #34868

The CMAKE_ARGS was accidentally lost during work on #34868.
This commit fixes that by re-adding `CMAKE_ARGS` as multi value arg.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-18 16:20:14 +02:00
Torsten Rasmussen
2656e6a682 kconfig: TraceRecorder Kconfig file for undefined symbols
Follow-up: #34843

This commit is a followup to PR #34843.
The Zephyr subsys/tracing/Kconfig file has a
`depends on ZEPHYR_TRACERECORDER_MODULE` but that symbol is only
available when the module is part of the manifest.

This commit adds the second part of the comment:
https://
github.com/zephyrproject-rtos/zephyr/pull/34843#discussion_r628154265

To ensure all Kconfig symbols are defined.

Without this commit, users without TraceRecorder will see following
checkpatch error:
```
ERROR   : Test KconfigBasic failed: Undefined Kconfig symbols:

warning: undefined symbol ZEPHYR_TRACERECORDER_MODULE:

- Referenced at subsys/tracing/Kconfig:35:

config PERCEPIO_TRACERECORDER
        bool "Percepio Tracealyzer support"
        select THREAD_NAME
        select INIT_STACKS
        select THREAD_MONITOR
        depends on ZEPHYR_TRACERECORDER_MODULE && <choice>
```

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-11 13:00:05 -05:00
Ioannis Glaropoulos
81e9ea5cad config: using CONFIG_MBEDTLS_USER_CONFIG_FILE as safeguard
Now using CONFIG_MBEDTLS_USER_CONFIG_FILE instead of
CONFIG_MBEDTLS_USER_CONFIG_ENABLE for inclusion of user config file.

The Kconfig MBEDTLS_USER_CONFIG_ENABLE setting now now determines if
MBEDTLS_USER_CONFIG_FILE is visible.

This removes the problem of MBEDTLS_USER_CONFIG_FILE to be stuck on its
first value.

Users can use MBEDTLS_USER_CONFIG_ENABLE to get the prompt and define
their own value.

As the CONFIG_MBEDTLS_USER_CONFIG_FILE is default promptless then we can
use this setting directly as it will only be defined if another Kconfig
file specifies a default value to use, or user enables:
MBEDTLS_USER_CONFIG_ENABLE.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
Torsten Rasmussen
5888428541 mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.

Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.

Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.

Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.

Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.

Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.

Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
Torsten Rasmussen
c5097101f3 mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt
This commit removes the prompt from MBEDTLS_USER_CONFIG_FILE unless
MBEDTLS_USER_CONFIG_ENABLE is true.

This fixes issues where other parts would specify a default value for
MBEDTLS_USER_CONFIG_FILE that would become stuck and not updated if
user re-configured the system using menuconfig.

Disabling the prompt ensures that only when a user specifically enables
MBEDTLS_USER_CONFIG_ENABLE and specify a custom user value in
MBEDTLS_USER_CONFIG_FILE the setting will be fixed.

Also updates the manifest with related change in the mbedtls project.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 15:24:23 -05:00
David Brown
4164b17034 modules: mbedtls: Enable PKCS1 v2.1
This Mbed TLS configuration option was being selected based on a
non-existent Kconfig option, and hence would never be defined.  v2.1 of
PKCS1 was published in 2003.  Use of v1.5 has been deprecated since
2016, and should not be used in new or existing designs.

Enable the v2.1 version in any situation where RSA is used for
signatures.  In the future, we should disable v1.5 entirely, but only
after all uses have been determined and possibly corrected.

No significant weaknesses have been found in v1.5, however v2.1 has a
significant security proof.  However, v2.1 does require an entropy
source, which may be an issue in some embedded device situations (which
likely are problematic for other cryptographic reasons).

Signed-off-by: David Brown <david.brown@linaro.org>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
c5b4094cfb modules: tf-m: do not expose TF-M NS interface include directories publicly
Instead of exposing publicly the TF-M NS interface include
directories, we include them when we build relevant projects.
This is required, as the TF-M include directories contains
psa crypto sources that are also provided by the mbedtls
crypto module. The downside of this solution is that the
TF-M includes need to be added explicitly in each application
that uses TF-M APIs.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
d0073fdf7e modules: trusted-firmware-m: add path for mbedcrypto
Define the MBEDCRYPTO_PATH variable for the TF-M build,
so the latter can used a checked-out version of mbedtls,
instead of pulling an external tree during build time.
This will make Zephyr builds with TF-M must faster.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
1a7f9598ba modules: mbedtls: updates to reflect module directory restructuring
Updates in CMakeLists.txt to reflect the restructuring
in the module directory. This also bumps mbetls version
to 2.26.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
1eccc71cc2 modules: mbedtls: move the configs into the main tree
Move the mbedtls configs directory in the main tree.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
67aadc2ef4 modules: mbedtls: add name for implementation choice symbol
Add a name for the Kconfig choice symbol
indicating the mbedtls implementation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
c48c50db42 modules: mbedtls: move CMakeLists.txt. into the main tree
We move the Zephyr-specific CMakeLists.txt file into
the main Zephyr tree. We also move the zephyr_init.c
source file.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
39c917788f Revert "mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE"
This reverts commit 1ad1acd7c9.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Ioannis Glaropoulos
505b03018c Revert "mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt"
This reverts commit 47fb09210b.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-09 09:59:22 -05:00
Anas Nashif
0e3771bc82 modules: add segger module locally, and update to 3.30
Move Zephyr related files into modules/ and update to 3.30

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-08 17:06:24 -04:00
Torsten Rasmussen
47fb09210b mbedtls: kconfig: MBEDTLS_USER_CONFIG_FILE default without a prompt
This commit removes the prompt from MBEDTLS_USER_CONFIG_FILE unless
MBEDTLS_USER_CONFIG_ENABLE is true.

This fixes issues where other parts would specify a default value for
MBEDTLS_USER_CONFIG_FILE that would become stuck and not updated if
user re-configured the system using menuconfig.

Disabling the prompt ensures that only when a user specifically enables
MBEDTLS_USER_CONFIG_ENABLE and specify a custom user value in
MBEDTLS_USER_CONFIG_FILE the setting will be fixed.

Also updates the manifest with related change in the mbedtls project.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-08 07:11:00 +02:00
Torsten Rasmussen
1ad1acd7c9 mbedtls: kconfig: created MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE
Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings.
The MBEDTLS_PROMPTLESS can be set to true whenever configuration of
mbedTLS is done from a subsystem or module.

Such an example is OpenThread, which selects mbedTLS for some predefined
crypto settings using OPENTHREAD_MBEDTLS=y.

Unfortunately, extensive use of select can easily cause stuck symbol
syndrome making it harder than neccesarry for users to later reconfigure
as they easily get stuck in incompatible configurations.

Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the
MBEDTLS prompt itself when selected but avoid stuck symbol if user
select another security configuration.

Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must
explicitly select this symbol before providing a custom mbedTLS config
file.

Today, other parts the Kconfig tree may set a default value for
MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig
selections elsewhere in the tree will not adjust the value.

Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user
has provided the value.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-08 07:11:00 +02:00
Anas Nashif
1af037f477 modules: enable percepio tracerecorder for tracing
Add support for percepio tracealyzer.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-07 22:10:21 -04:00
Torsten Rasmussen
b671cf7279 cmake: tfm: support for custom CMake args when building TF-M
This commit allows a subsystem to specify additional CMake flags to be
given to the TF-M build.

The additional CMake flags can be provided through the TFM_CMAKE_OPTIONS
property on the zephyr_property_target.
Using the zephyr_property_target allows Zephyr modules to append extra
TFM_CMAKE_OPTIONS regardless of the CMake processing order.

It splits the ExternalProject_Add into a two step process with the CMake
invocation executed using add_custom_target() and the build process
using ExternalProject_Add(). The reason for this split is because CMake
generator expressions passed through ExternalProject_Add to CMake will
quoted so that `$<TARGET_PROPERTY:<tgt>,<prop>>` becomes
`"-DFOO=bar -DBAR=foo"` instead of `-DFOO=bar -DBAR=foo` which again
results in CMake failures.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-07 13:09:54 +02:00
Jamie McCrae
f4350a9303 boards: arm: Add Laird Connectivity BL5340 DVK platform
This adds initial support for the Laird Connectivity BL5340
development kit hardware

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-07 09:06:27 +02:00
Øyvind Rønningstad
0500d75c3a tfm: Fix cmake library handling
Make tfm_api a proper Zephyr library and add all sources to it.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 15:36:32 +02:00
Øyvind Rønningstad
aed0643705 trusted-firmware-m: Store FP context before entering secure calls
When ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled, if FPU is
being used (CONTROL.FPCA == 1), store all FP registers before
entering the secure function, and restore them afterwards.

This is needed if any NS thread or ISR that interrupts the secure
function uses FP registers. If they do, a secure UsageFault occurs
unless this change is applied.

This allows k_sched_lock() and k_sched_unlock() to be dropped when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled.

Enable ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS by default when
building TF-M.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Lauren Murphy
a010d9152d modules: add tensorflow
Adds Kconfig option enabling TensorFlow Lite Micro support.
Updates manifest with TensorFlow module.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-04-29 08:35:57 -04:00
Mahesh Mahadevan
bc0e3492c1 modules: Add OS timer support
OS Timer support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-04-21 20:40:24 -04:00
Andreas Vibeto
0cf2753fa3 CMakeLists.txt: Add support for TF-M Non-Secure regression tests
Add new kconfigs
Include the ns-app built by TF-M build system for regression tests
Update tfm_ipc sample to use new kconfig

Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
2021-04-21 23:18:30 +02:00
Øyvind Rønningstad
b220374633 CMakeLists.txt: Add support for running PSA tests
Add necessary libs and files to the build
Add support for new kconfigs
Add Zephyr-only implementations of tfm_log and tfm_ns_interface.
Add zephyr_tfm_psa_test.c for easily running PSA tests.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-04-20 16:13:40 +02:00
Øyvind Rønningstad
a0eecfd7f4 tfm: Kconfig: Add configs for PSA tests
Allow adding a PSA test suite to the NS app.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-04-20 16:13:40 +02:00
Ioannis Glaropoulos
e75ff8f7fb modules: trusted-firmware-m: fix dependencies for isolation level
Do not allow the TFM_ISOLATION_LEVEL to be non-hidden option,
if the TFM_IPC (PSA_API) option is not set, since, in that case,
only Isolation Level 1 is supported.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-16 13:33:32 +02:00
Pieter De Gendt
b6979736ca modules: nanopb: introduce new module
Add the nanopb library and generator tools as a module.
Nanopb is a small code-size Protocol Buffers implementation in ansi C.
It is especially suitable for use in microcontrollers,
but fits any memory restricted system.

Nanopb home: https://jpa.kapsi.fi/nanopb/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-04-08 14:57:55 +02:00
Ioannis Glaropoulos
b80ad4c4b3 modules: tf-m: add TF-M profile choice
We add a Kconfig choice for the TF-M profile, in
TF-M's Kconfig file. The reason for that is to be
able to easily enable additional configurations,
depending on the profile type being selected. We
also enhance the documentation of TFM_PROFILE,
stressing that there is now also profile_large
available as an option. TFM_PROFILE is now made
hidden, forcing the users to select one of the
available choice symbols. IF the TFM_PROFILE is
set to something other than "none", then certain
options shall be made hidden, namely, IPC and
isolation level, as they are determined by the
profile setting.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos
79c1019e85 modules: tf-m: correct dependencies for audit log service
Add a dependency on IPC for the Audit Log secure service,
since the service is not compliant with the IPC model.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos
70272266f7 Revert "modules: tf-m: disable audit log partition with medium profile"
This reverts commit 6da3d7020e7d2a2ac2d1ed1a6ece9dca3c150339.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Jedrzej Ciupis
0a75e0551f modules: hal_nordic: nrf_802154: Fix RADIO IRQ handling configuration
This commit fixes nRF 802.15.4 radio driver IRQ management
configuration.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2021-04-07 14:17:22 +02:00
Rafał Kuźnia
9638876bde modules: hal_nordic: change the SL type prompt
The SL type choice option prompt was renamed to be short and concise.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Rafał Kuźnia
859952f590 modules: hal_nordic: add new nrf-802154 glue cmake
Update revision of hal_nordic which introduces new radio driver
integration scheme.

The glue cmake has been updated to use the new integration scheme
for the nrf-802154 component.

Added config option to exclude radio driver in hal_nordic from the
build process. This allows the radio driver to be supplied from
other sources.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Rafał Kuźnia
88b1d1f047 modules: hal_nordic: Remove default from SL type choice
The default value is not needed because there is only one choice.
This allows the default choice to be set in a different module.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-04-01 14:08:08 +02:00
Ioannis Glaropoulos
edd4ab5bf0 modules: tf-m: disable audit log partition with medium profile
When compiling TF-M with profile_medium, disable the support
for Audit Log due to an upstream bug.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos
9b9a6a3f52 modules: trusted-firmware-m: lock scheduler around secure calls
Prevent a thread from being preempted, while executing a Secure
function. This is required to prevent system crashes that could
occur if a thead context switch is triggered in the middle of a
Secure call.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Øyvind Rønningstad
6fa608b191 modules: tf-m: Add zephyr native NS interface and logging function
To allow using TFM NS interface without enabling
CMSIS_RTOS V2 support. And to allow using TFM NS
code that uses logging.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos
e6965b37f0 modules: trusted-firmware-m: initialize the TF-M NS interface
The TF-M NS interface needs to be initialized before
it is used. We add an initialization function that
calls tfm_ns_interface_init(), at boot time, so then
we can use TF-M interface calls (veneers).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos
261a659899 trusted-firmware-m: override sys_arch_reboot for non-secure builds
In ARM Non-Secure builds with TF-M it is not, generally,
possible to issue system reset requests from Non-Secure
domain. When the Platform SPM Partition is enabled, the
tfm_platform_system_reset(.) API can be used to request
system resets from TF-M. This commit overrides the weak
sys_arch_reboot() implementation in scb.c so Non-Secure
code is able to issue system resets.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Ioannis Glaropoulos
3fde19ec26 trusted-firmware-m: include interface sources to the build
Instruct CMake to include interface libraries when
building a Non-Secure ARM target with TF-M. In
particular, include the reboot.c source file, which
overrides the sys_arch_reboot implementation.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Øyvind Rønningstad
869978ab0d tfm: Fix TFM_BOARD for MUSCA_B1
Also add it to tfm_ipc so it is built by CI

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 11:20:10 -05:00
Øyvind Rønningstad
41eedf8ae5 tfm: Adapt to changes upstream
Rename lib.
Disable AUDIT_LOG in regression sample because of a bug upstream.
Update stm32l562e_dk_ns overlay.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 09:32:56 +01:00
Krzysztof Chruscinski
ab49673bc8 drivers: timer: nrf_rtc_timer: Change type of channel argument
There was an inconsistency in the API as z_nrf_rtc_timer_chan_alloc
returned int but other function were using uint32_t for channel
argument. Updated api to use int32_t everywhere.

Update nrf_802154 driver which was using this api to use int32_t.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-03-25 15:54:49 +01:00
Yestin Sun
46cab056bc boards: stm32l562e_dk: Enable TF-M IPC application
This commit enables the TF-M IPC sample application on stm32l562e_dk
board.
It provides device tree flash partition as an overlay in order to
configure and flash the bl2, secure/non secure firmwares.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Yestin Sun
4215955e84 modules: trusted-firmware-m: Allow to adjust hex file base address
This commit allows to append an optional --hex-addr argument to
the wrapper script if speficied. This can adjust the base address
of the output hex file when signing the non-secure or secure
firmware images.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Eduardo Montoya
d8932d607d crypto: mbedtls: add enablers for public key layer
Kconfig support for `MBEDTLS_PK_WRITE_C`.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-03-17 09:25:04 +02:00
Jukka Rissanen
51beb28ac9 modules: civetweb: Add proper dependency to Kconfig
Make sure that CONFIG_NET_TCP_ISN_RFC6528 is not set when compiling
Civetweb. There are compile issues in Civetweb if both mbedtls and
POSIX API option are set, and this happens if the TCP ISN option is
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-03-10 14:53:15 -05:00
Rafał Kuźnia
ff1594cf05 drivers: ieee802154: Fix problem with binding IRQ handlers in shim layer
The shim layer could in some circumstances not be properly
configured which would result in an unbound radio interrupt
handler.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-03-05 12:56:15 +01:00
Rafał Kuźnia
dbd66c8096 modules: hal_nordic: move nRF 802.15.4 Radio Driver glue to Zephyr
This commit moves all hal_nordic radio driver code that is
strictly dependent on Zephyr into the Zephyr repository.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2021-03-05 12:56:15 +01:00
Ioannis Glaropoulos
96b1c33cb9 modules: tf-m: introduce option to configure flash binary
Introduce an option to instruct the build system
to flash the Non-Secure (Zephyr) firmware image
together with the TF-M (Secure) firmware image
as a single merged binary, instead of just flashing
the Non-Secure application.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-04 11:26:23 +03:00
Ilya Tagunov
7e4509215d modules: loramac-node: add SX1272 support
Add Kconfig option enabling Semtech-provided SX1272 driver.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2021-02-28 16:36:35 -05:00
Øyvind Rønningstad
5137135ead boards: Consolidate all TFM signing code
Place the new signing code in the TFM module CMakeLists.txt.
Make some small tweaks and add a sentence to the docs.

In the process, make a few changes to the signing code:
- Change some names of files created.
- Minimize the number of files created.
- Use hex files instead of bin files. This is so we don't need to know
  the offset when creating hex files from bin files.

Also add signing for MCUBOOT_IMAGE_NUMBER=1 based on the code from the
v2m_musca_b1 board, though, this board does not build with =1 now
because of (I assume) some flash aliasing which places the S and NS
images 0x10000000 apart, where the manual algorithm places them next to
each other. It builds with =2, though.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-21 18:44:18 +03:00
Ioannis Glaropoulos
007c8539f6 dts: arm: nordic: add QDEC nodes for nrf5340
Add device tree nodes for QDEC peripheral instances
for nRF5340 Application core.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-17 22:34:20 +03:00
Øyvind Rønningstad
edfaa3998b tfm: Change TFM_BL2 config from a choice to a bool
The choice allowed for using TFM's own default. We now need full
knowledge over whether BL2 is enabled or not (e.g. to do signing),
so remove this option and simplify to a bool.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 19:42:44 +03:00
Håkon Øye Amundsen
f52debbd8e modules: trusted-firmware-m: fix incorrect check of <option> args
'IPC' and 'REGRESSION' are passed to the <option>
argument of cmake_parse_arguments, hence they are always defined,
and 'if (DEFINED)' would always return TRUE.

Use 'if' directly instead of 'if DEFINED' to check if these
options are set or not.

Ref: NCSDK-7702

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-02-17 15:04:58 +03:00
Håkon Øye Amundsen
c097690f2a modules: trusted-firmware-m: add kconfig to enable/disable partitions
Also update tfm module cmake to pass them to the trusted-firmware-m
build system.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-02-17 15:04:58 +03:00
Øyvind Rønningstad
b49e395277 Kconfig.tfm: Add TFM_MCUBOOT_IMAGE_NUMBER config
Controlling the number of images in TFM's BL2/mcuboot.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 10:07:17 +03:00
Øyvind Rønningstad
5f1610eeff Kconfig.tfm: Add TFM_CMAKE_BUILD_TYPE config
Controlling the build type of the TFM build system.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-16 22:58:49 +03: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
Jedrzej Ciupis
bbff645e90 west.yml: Update hal_nordic revision
This commit brings in several latest bugfixes for the hal_nordic repo.
It also removes a Kconfig entry that these changes yield deprecated.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Pawel Kwiek
b9c1903d24 modules: Change serialized radio init priority
This commit changes serialized radio initialization
priority. This fixes race condition where serialization
backend would boot earlier than the radio driver itself.

Signed-off-by: Pawel Kwiek <pawel.kwiek@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Adam Zelik
3f2b07fc2f modules: nrfx_glue: Reserve PPI/DPPI resources used by 802.15.4 drv
Mark the PPI/DPPI channels and groups used by the 802.15.4 driver
as occupied and thus unavailable for allocation through nrfx_ppi.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Ioannis Glaropoulos
1e49cccb81 modules: tf-m: remove nRF5340 PDK from the supported TF-M targets
nRF5340 PDK is removed so there is no reason to keep it
in the list of supported tf-m targets.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-15 07:59:43 -05:00
Shlomi Vaknin
cca4e89c1f modules: cmsis-dsp: Support compiling on native posix
Support compiling cmsis-dsp on native posix
architectures, as cmsis-dsp allows that.

Signed-off-by: Shlomi Vaknin <shlomi.39sd@gmail.com>
2021-01-27 14:48:37 -05:00
Andrei Gansari
c450130446 modules: mcux: HAS_MCUX_IAP_LEGACY config
Adds HAS_MCUX_IAP_LEGACY configuration for legacy LPC IAP flash driver.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2021-01-23 08:01:00 -05:00
Maureen Helm
1883c85abd modules: nxp_imx: Add HAS_MCUX_FLEXSPI
Adds a hidden config symbol HAS_MCUX_FLEXSPI selected by NXP SoCs when
the FlexSPI peripheral is present. It will be used as a dependency for a
new FlexSPI flash driver to prevent users from accidentally enabling the
driver on platforms that don't have the necessary hardware.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-01-22 11:11:54 -05:00
Henrik Brix Andersen
c9e02cd394 modules: mcux: add support for indicating the presence of PWT
Add Kconfig option for indicating that a given SoC contains the NXP
Kinetis Pulse Width Timer (PWT).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-20 08:05:57 -06:00
Torsten Rasmussen
3d88083bf1 cmake: zephyr modules: sanitize all module name when used as variable
The introduction of Zephyr module glue code in the Zephyr repository
introduces a Kconfig variable in the form of:
`config ZEPHYR_<MODULE_NAME>_MODULE`.

All Kconfig variables go into `autoconf.h`, therefore it is necessary
to sanitize the Kconfig variable, so that it does not contain special
characters. To ensure consistent variable name, then the module name
will be sanitized in all variable use in both Kconfig and CMake.
The sanitization is done be replacing all special characters with an
underscore, `_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-20 12:59:19 +01:00
Hubert Miś
6d3cdf5b4a west: hal_nordic: Use RPMsg Service for 802.15.4 serialization
This patch updates hal_nordic module revision to start using RPMsg
Service for serialization of 802.15.4. The serialization module is
implemented in the hal_nordic module.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-19 22:07:09 +01:00
Andrzej Głąbek
251648afb4 modules: Move nrfx glue code to main Zephyr repository
Move nrfx glue code (nrfx integration files, related Kconfig entries,
and related part of CMakeLists.txt taken from the hal_nordic module)
to modules/hal_nordic/nrfx/ directory.
CMakeLists.txt located in modules/hal_nordic/ is now the main cmake
file for the hal_nordic module. It points back to cmake stuff related
to the nRF IEEE 802.15.4 driver that still remains in that module and
it adds the extracted nrfx part as a subdirectory.
Kconfig.nordic is renamed to Kconfig and moved to modules/hal_nordic/.
It sources nrfx related entries from that separate file.

Update also the manifest to point to accordingly modified hal_nordic
revision.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-19 17:35:04 +01:00
Torsten Rasmussen
3673e288bd modules: introducing MODULE_EXT_ROOT to allow glue code in Zephyr repo
This commit introduces MODULE_EXT_ROOT which allows CMake and Kconfig
glue code to be placed outside of the Zephyr module repository.

This allows for placing glue code in Zephyr, but also allows users to
specify custom MODULE_EXT_ROOTs for glue code using either
`-DMODULE_EXT_ROOT` or `zephyr/module.yml` with
`build:settings:module_ext_root` settings.

MODULE_EXT_ROOT' is a list of directories, similar to other roots such
as BOARD_ROOT, DTS_ROOT, etc.
The Zephyr repo folder ${ZEPHYR_BASE} is always to the MODULE_EXT_ROOT
list as lowest priority.
For each MODULE_EXT_ROOT, the file
`<module_ext_root>/modules/modules.cmake` will be processed.

In Zephyr repo, the folder `modules/<module>/` contains CMakeLists.txt
and Kconfig glue code for the Zephyr module.

A Zephyr module can specify that CMakeLists.txt and Kconfig glue code is
placed in an external module root by specifying:
```
build:
  cmake-ext: True
  kconfig-ext: True
```

It is still possible to place the CMakeLists.txt and Kconfig files
directly in the Zephyr module using the existing:
```
build:
  cmake: <path>
  kconfig: <file>
```.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-01-18 18:02:46 +01:00
Andrzej Puzdrowski
049dac2a8a modules: introduce MCUBOOT_BOOTUTIL module
Some parts of subsys/dfu/boot code are re-implementations of
what is implemented in the MCUBoot repository.

Mcuboot's repository already provide implementation of function
required for application for interact with the MCUboot.

This patch introduces new MCUBOOT_BOOTUTIL module which covers
common code which is used in the bootloader and the chainnloaded
application.

dfu/boot: use MCUBoot's source code

Module was reworked so it start using MCUBoot's
bootutil_public API instead of copied code.

Reworked boot_is_img_confirmed() used MCUBoot's API
for determine image_ok flag.

mcuboot_shell switchd to use MCUboot's boot_read_swap_state_by_id()
This is MCUBoot function, use it for avoid linking conflict.

test/subsys/mcuboot: fix `test_write_confirm`

dfu/boot library was reworked so it uses MCUboot's bootutil_public
library whenever it can.
The library required that image was marked as copy-done before it
can be pending.
This patch adds such mark which fixes the test.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-14 18:03:38 +01:00
Andy Ross
0c80862eb0 modules: Add Sound Open Firmware module
Add the Sound Open Firmware project as a Zephyr module under
modules/audio/sof.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-06 07:53:46 -06:00
David Vincze
79cac4e58d arm: V2M Musca-S1: Add Musca-S1 SoC and board support
Musca-S1 is a Cortex-M33 based SoC. It's similar to the
Musca-B1, but among other things the embedded flash has
been replaced with embedded MRAM (eMRAM) memory.

The Musca-S1 files have been created based on the Musca-B1
SoC and board files.

Add the Musca-S1 board to the list of allowed platforms
for the TF-M integration examples.

Change-Id: I4f517d28d0a5b8c4a3fc3fab73adb5519acfc3c2
Signed-off-by: David Vincze <david.vincze@linaro.org>
2020-12-20 13:03:49 -05:00
Henrik Brix Andersen
060d815978 modules: mcux: add support for NXP MCUX ACMP
Add support for indicating that a SoC contains the NXP MCUX Analog
Comparator (ACMP) IP.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-12-17 08:54:33 -06:00
Hubert Miś
d35d26d250 drivers: ieee802154: Reserve TIMER used by 802.15.4 driver
Use new Kconfig structure to marks which TIMER peripheral is reserved by
802.15.4 radio driver. It prevents peripheral usage collisions.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2020-12-15 11:22:56 +01:00
Czeslaw Makarski
44751a1063 modules/Kconfig.nordic: Allow using direct 802.15.4 calls for nRF53
This PR allows the use of direct IEEE 802.15.4 nRF Driver calls
in case a serialized (nRF53) version of the Radio Driver is used.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2020-12-08 10:49:28 -06:00
Andrei Gansari
8f7d73900d modules: tfm: BL2 default comment
Adds a comment regarding the effect of TFM_BL2_CONFIG_FILE_DEFAULT on
building TFM images.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Ioannis Glaropoulos
060f17a5af modules: tfm: add required selection and dependencies
BUILD_WITH_TFM needs to depend on
ARM_TRUSTZONE_M, which is selected
by the SoC or Board definition. In
addition to that we add an imply
statement for INIT_ARCH_HW_AT_BOOT
because Zephyr will be chain-loaded
by TF-M, and needs to cleanup its
core ARCH registers that might be
left in non-reset state.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-01 14:19:03 +02:00
Ioannis Glaropoulos
0924cb55df modules: tfm: cleanup redundant Kconfig symbol selection
When we select BUILD_WITH_TFM we do not
really need to enable by default the
options THREAD_NAME, THREAD_STACK_INFO,
INIT_STACKS and THREAD_MONITOR, so we can
clean them up. We also remove CMSIS_RTOS_V2
for the same reason.

We also cleanup the default value for
NUM_PREEMPT_PRIORITIES, which does not
seem to be needed.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-01 14:19:03 +02:00
Wentong Wu
c85d353ca4 logging: add STP transport and raw data output support for syst
Add STP transport support for MIPI SyS-T with Kconfig MIPI_SYST_STP,
this is following SyS-T spec Section 7.
And with Kconfig MIPI_SYST_RAW_DATA, add raw data output support for
MIPI SyS-T protocol stack.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2020-11-17 10:09:19 -06:00
Marcin Niestroj
480a682220 modules: mbedtls: introduce MBEDTLS_MEMORY_DEBUG option
This option allows enable mbed TLS debugging of buffer allocator memory
issues.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-17 10:02:17 -06:00
Andrei Gansari
a0aa6e085e modules: tfm isolation and profile
Add TFM_PROFILE and TFM_ISOLATION_LEVEL options. Options are used to set
up custom board configurations, i.e. LPC55S69 uses medium_profile to fit
TFM images in a small flash area.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-11-17 17:26:20 +02:00
Ioannis Glaropoulos
30b44e276b tf-m: Add help text in some un-documented TF-M Kconfig options
Add help text in some newly introduced and un-documented
TF-M Kconfig options: REGRESSION and IPC.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-17 14:39:52 +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
Hubert Miś
9ec8aec794 samples: boards: nrf: ieee802154: New serialization sample
A new sample exposing IEEE 802.15.4 radio controller using serialization
over IPM drivers.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2020-11-17 09:56:25 +01:00
Jedrzej Ciupis
15fdd7175b drivers: ieee802154: Add support for IEEE 802.15.4 for nRF5340
This commit introduces support for IEEE 802.15.4 on nRF5340.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2020-11-16 15:24:03 +01:00
Czeslaw Makarski
b6b613d4db modules: nordic: Introduce nRF IEEE 802.15.4 Service Layer selection
This patch introduces the nRF IEEE 802.15.4 Service Layer configuration.

Signed-off-by: Czeslaw Makarski <Czeslaw.Makarski@nordicsemi.no>
2020-11-16 15:24:03 +01:00
Øyvind Rønningstad
cb3ec9d759 Kconfig.tfm: Improvements and fixes
Make it easier to add TF-M in an app by selecting and implying the
necessary configs so the app doesn't have to specify the configs itself.
Remove unneeded configs from the prj.conf files in the tfm samples.

Also, fix case in key file name.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-13 21:23:57 +02:00
Alexandre Bourdiol
d9798b9022 modules: Delete switches USE_STM32_HAL_RCC and USE_STM32_HAL_RCC_EX
With STM32Cube updates
https://github.com/zephyrproject-rtos/hal_stm32/pull/75
'..._hal_rcc.c' and '..._hal_rcc_ex.c' are now systematically
compiled, due to more and more dependencies from HAL IP on rcc.
So USE_STM32_HAL_RCC and USE_STM32_HAL_RCC_EX becomes useless.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-10-28 09:28:15 -05:00
Jakub Pegza
3292b50be9 modules: Add nrf 802.15.4 radio drv buffer config
Add configuration options for chaning number of buffers used by nRF
802.15.4 radio driver.

Signed-off-by: Jakub Pegza <Jakub.Pegza@nordicsemi.no>
2020-10-23 13:20:45 +02:00
Maureen Helm
7bebab862c soc: arm: Refactor i.mx rt device configuration data default
Refactors the i.mx rt soc series to enable device configuration data
(DCD) by default when the smart external memory controller (SEMC) is
present. This is in preparation for removing the DATA_LOCATION Kconfig
symbol and using a device tree chosen node instead.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-10-22 09:32:11 -05:00
Emil Hammarstrom
ec00feef35 net: lib: sockets: added ALPN extension option to TLS
Adds the socket option TLS_ALPN_LIST for SOL_TLS sockets

Passes the configured alpn list to the mbedtls config
on mbedtls init

Signed-off-by: Emil Hammarstrom <emil.hammarstrom@assaabloy.com>
2020-10-22 11:35:43 +03:00
Ioannis Glaropoulos
64ecac692c modules: trusted-firmware-m: update default RSA keys
Update the default paths to private keys used
for signing the Secure and the Non-Secure firmware,
when building Zephyr together with TF-M. The update
is done to match the default configuration in
the upstream TF-M project.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Mahesh Mahadevan
a3341dd347 modules: Add config for LPC clock control
Add a config for MCUX LPC clock control

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-10-15 11:17:24 -05:00
Armando Visconti
de5135b05e modules/hal_st: Align sensor drivers to stmemsc HAL i/f v1.03
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v1.03.

Requires https://github.com/zephyrproject-rtos/hal_st/pull/5
(merged as b52fdbf4b62439be9fab9bb4bae9690a42d2fb14)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-10-13 09:46:08 -05:00
Toby Firth
dc37f988e0 drivers: adc: added support adc driver for lpcexpresso55s69
Added shim driver for the LPADC for lpcexpresso55s69 board.

Fixes #22703.

Signed-off-by: Toby Firth <tobyjfirth@gmail.com>
2020-10-12 14:59:40 -05:00
Manivannan Sadhasivam
3ce8540f3a lorawan: Add initial support for LoRaWAN
Add initial support for LoRaWAN based on Semtech's loramac-node
library. Current implementation only supports OTAA config and
sending data to LoRaWAN server like ThingsNetwork.

While at it, this commit also moves the "loramac-node" library
definition from drivers/lora to subsys/lorawan. This is required
because, subsys/lorawan gets processed before drivers/lora and
that creates issue while building.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Andrzej Głąbek
8d7fee4e4a modules/Kconfig.nordic: Do not select HAS_CMSIS_CORE through HAS_NRFX
The HAS_NRFX Kconfig option is selected also for the nrf52_bsim board,
where the nrfx drivers are compiled for a simulated target, without
CMSIS. Thus, selecting HAS_CMSIS_CORE in such case is inappropriate.
This patch removes then the selection of the HAS_CMSIS_CORE option from
HAS_NRFX. When the nrfx drivers are built for a real SoC, where CMSIS
is actually used, the option will get selected by the CPU_CORTEX_M one.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-23 17:12:01 +02:00
Ioannis Glaropoulos
3758b3328c modules: tfm: make BL2 header in non-secure image configurable
When we build Zephyr for a Non-Secure image, using TFM
as the Secure counterpart, we may or may not use BL2 (e.g.
MCUboot in TFM). If we build with BL2 we need to account
for a ROM offset before the start of the non-secure image
where TFM BL2 expects the BL2 header. This offset is not
needed when TFM is built without BL2. We use the existing
Kconfig options to determine whether we need a ROM offset
or not. We use the value of 0x400 for the BL2 header,
which is the default value used in TFM, but the option is
non-hidden, allowing the user to overwrite the default
value if needed.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-09-22 19:38:51 +02:00
Jukka Rissanen
eb3288d5b1 modules: mbedtls: Allow to enable server name indication option
Allow user to enable RFC 6066 server name indication (SNI) in SSL.

Fixes #27783

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-15 09:52:44 -05:00
Jan Kowalewski
44bbd1ea3d modules: add Kconfig for QuickLogic EOS S3 module
Add proper Kconfig for external QuickLogic module.

Signed-off-by: Jan Kowalewski <jkowalewski@antmicro.com>
2020-09-04 14:48:49 -04:00
Andrei Gansari
37d2ad68e8 modules: tfm BL2 configurable
Make BL2 setting configurable via Kconfig choice.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Andrzej Głąbek
76745bc085 modules/Kconfig.nordic: Enable NRFX_USBREG together with NRFX_POWER
On SoCs featuring the USBREG peripheral, the nrfx_power driver uses
the nrfx_usbreg one internally, so enable the latter when the former
is enabled.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-09-03 21:52:52 +02:00
Mahesh Mahadevan
f75f8bec20 MXRT600: Add DMA support
Add DMA support for MCUX LPC SoC's

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-28 14:24:21 -05:00
Karol Lasończyk
b740d3bdd9 modules: hal_nordic: Update nrfx to version 2.3.0
This PR updates the hal_nordic module revision, to switch to nrfx 2.3.0
and adds new configuration option to enable two stage LFCLK start
sequence.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2020-08-25 09:29:38 +02:00
Hake Huang
f976de4767 counter: enable pit support for k8x series
enable PIT in k8x series

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Manivannan Sadhasivam
75449602bc modules: Add RDC module for MCUX family
RDC module is used by i.MX8MM SoC, so let's create a Kconfig symbol
which will be used to enable the module in SDK.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-08-14 14:51:50 -05:00
Jedrzej Ciupis
af0b1098e4 modules: nordic: add 802.15.4 multiprotocol support
This commit adds a NRF_802154_MULTIPROTOCOL_SUPPORT Kconfig switch
that makes it possible to use nRF 802.15.4 radio driver in
a multi-protocol scenario.

Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2020-08-13 10:44:36 +02:00
Jiří Keresteš
3a87517c5e drivers: watchdog: mcux_wwdt: add driver for NXP LPC 55xxx WWDT
Adds shim driver for LPC 55xxx Windowed Watchdog Timer (WWDT).

Also updates the "Supported features" table in LPCXpresso55S69
board documentation page.

Fixes #22704.

Signed-off-by: Jiří Keresteš <jiri@kerestes.cz>
2020-08-04 15:13:25 -05:00
Andreas Sandberg
6a4ebe5949 drivers: lora: Add SX126x LoRa radio support
Add support for the SX126x series of LoRa radios using the
LoRaMAC-Node HAL.

This driver currently makes the following assumptions:

  * DIO1 is used as an interrupt line.

  * There is an RF switch selecting between the TX and RX ports and
    that switch is controlled by DIO2.

  * There is either no TCXO or the TCXO is controlled by DIO3.

Specifically, the limitations above mean that modules that use GPIOs
to control the RF switch are currently not supported. Support for such
modules would need changes to the LoRaMAC-Node code.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-07-02 08:32:37 -04:00
Saravanan Sekar
4a5a165e0c soc: arm: add support for nuvoton numicro m48x series
Add initial support for nuvoton numicro m48x SoC series, basic
init and uart functionality are covered with gpio and clock
directly relies on HAL.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2020-07-01 21:09:25 +02:00
Marek Porwisz
81e0a05285 net: openthread: Simplify openthread enabling
Currently user needs to specify quite much additional options to enable
OpenThread support. He also needs to set ip address count,
heap size, etc depending on features enabled.
Nade changes to automatically select/set some of the options on
enabling OpenThread

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-06-30 07:48:08 -04:00
Hake Huang
10fc7a38cc dma: add EDMA MCUX support for RT and k6s
tested on mimxrt1060_evt
  MEMORY_NOCACHE is needed
test on frdmk64f
  special test slot need configure with
  CONFIG_DMA_TEST_SLOT_START

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-06-12 13:03:28 -05:00
Robert Lubos
bc5b05f223 modules: mbedtls: Add Kconfig entry for MBEDTLS_MD and MBEDTLS_CIPHER
Due to new checks in mbedTLS config sanitizer, TLS option can no longer
be left enabled, when TLS is not used. OpenThread needs MBEDTLS_MD_C
and MBEDTLS_CIPHER_C even without TLS being used, so we need an option
to enable them manually.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-06-02 15:24:36 +02:00
Karl Zhang
fec5ed6077 trusted-firmware-m: Add initial plumbing for TFM
This commits adds a config option to build a PSA trusted-firmware-m
(TF-M) application image for the secure processing environment, and
configures the Zephyr application image for the non-secure processing
environment. The secure and non-secure environment images will be
linked together via the veneer function table that is produced as an
artifact of the TF-M build process.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00
Parthiban Nallathambi
b687d76d09 soc: arm: add infineon_xmc series support
Add infineon xmc series with XMC4500 support. XMC series comes with,
- CPU operates upto 120MHz
- 3 RAM (PSRAM1 - code, DSRAM1 - data and DSRAM2 - communiation)
- upto 1MB flash

init: clock control & gpio is not done, so SoC initialization directly
relies on HAL. Core operating clock is stored in no_init section, which
is kept under DSRAM1. Only DSRAM1 is used until clock support. Using
PSRAM1 and DSRAM1 needs adaptation in linker script - planned for next
revision.

Note: SystemInit cannot be consumed directly due to vector table +
HAL linker dependency.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-09 14:21:44 +02:00
Erwan Gouriou
6ea53792f4 modules: stm32: Rename lib Kconfig symbol
Both ST and STM32 modules where using same HAS_STLIB Kconfig
symbol.
Now that each module is createing is own lib, we need to be able
to distinguish libs.

Depends on zephyrproject-rtos/hal_stm32/pull/52

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-09 13:08:42 +02:00
Robert Lubos
2c2771970e modules: mbedtls: Update mbedTLS commit and apply fixes
Update mbedTLS commit along with the following fixes:

* Fix naming inconsistencies in some cipher modes, to match core mbedTLS
  configs
* Add Kconfig to enable CTR cipher mode

Fixes #22421

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-05-07 23:46:08 -05:00
Andrei Gansari
97d940cf33 modules: adds HAS_MCUX_RNG
New RNG module used by LPC family devices as random number generator.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Alex Porosanu
7187d624a7 soc: kinetis: add support for TPM PWM module
Some Kinetis SoCs have an instance of the the TPM module
that can be used for PWM control. As such, add the necessary
configurations to enable it on the SoCs that support it, as well as
enable the clock for the module to function.

In this case, the enablement is done only for the KW41Z SoCs,
but there are other SoCs that support it, f.i. KW38Z

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Henrik Brix Andersen
1a59239880 modules: mcux: add option for indicating presense of a DAC module
Add option for indicating that a NXP Kinetis SoC contains a
Digital-to-Analog (DAC) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen
b8fad5b8f8 modules: mcux: add option for indicating presense of a DAC32 module
Add option for indicating that a NXP Kinetis SoC contains a
Digital-to-Analog (DAC32) module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Stephanos Ioannidis
b0041fc58c modules: cmsis: Add CMSIS-DSP configurations
This commit introduces the Kconfig configurations for the CMSIS-DSP
digital signal processing library.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-22 12:08:28 -05:00
Stephanos Ioannidis
f40fc4a3bf modules: cmsis: Add CMSIS-Core(A) configurations
This commit updates the west.yml to point to the commit that adds the
CMSIS-Core(A) and defines the configurations to enable it, in
preparation for the AArch32 Cortex-A architecture support in Zephyr.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-09 16:24:05 +02:00
Robert Lubos
d657c6bf57 drivers: ieee802154_nrf5: Add CSMA CA transmit capability
Add CSMA CA capability for the `ieee802154_nrf5` radio driver along with
appropriate implementation in the `nrf5_tx` function.

Introduce 802.15.4 radio driver with CSMA/CA support enabled. Add help
text, mentioning a list of peripherals occupied by the radio driver.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-04-03 14:07:41 +03:00
Kumar Gala
12ca04b31f ipc: openamp: Expose config options for MASTER/SLAVE builds
We can build the openamp library configured with VirtIO master
support, VirtIO slave support, or both.  By default both master
and slave code is enabled.  We can reduce code footprint by only
build master or slave as needed.

Expose Kconfig options for Master & Slave and set them accordingly in
the sample.

Here's the code reduction we see:

For the total image we see as 1260 byte reduction:
Memory region         Used Size  Region Size  %age Used
 FLASH [Master & Slave]:       30308 B       256 KB     11.56%
 FLASH [Master only]   :       29048 B       256 KB     11.08%

On the remote side we see a 828 byte reduction:

Memory region         Used Size  Region Size  %age Used
 FLASH [Master & Slave]:       11564 B        64 KB     17.65%
 FLASH [Slave only]    :       10736 B        64 KB     16.38%

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-27 15:20:25 -05:00
Henrik Brix Andersen
4dd1151b48 modules: mcux: add support for NXP Kinetis LPTMR
Add support for indicating that a SoC contains the NXP Kinetis Low
Power Timer (LPTMR) module.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-03-27 11:17:58 -05:00
Francois Ramu
b5ae23e97b modules: stm32: define new symbol for ETH extended
This add the new symbol CONFIG_USE_STM32_HAL_DMA_EX

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-03-27 08:34:19 -05:00