Commit graph

1112 commits

Author SHA1 Message Date
Markus Swarowsky
8b257c058d modules: tf-m: Remove platform_ns target
The platform_ns library is no longer build with the split build anymore
so removing it.

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

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

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

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

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

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

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-17 16:52:52 +01:00
Eduardo Montoya
fe9e306a83 net: openthread: fix otLinkMetricsInit usage
Remove usage of `otPlatRadioGetReceiveSensitivity` without the
`otInstance` parameter.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2024-01-17 09:55:34 +01:00
Tomasz Moń
2dee952a95 modules: hal_nordic: nrfx: update API version to 3.3.0
Update i2s nrfx driver to pass buffer size alongside buffer pointers.
No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-01-15 13:54:13 +01:00
Damian Krolik
7b42e36c68 net: openthread: Print the actual assert location
When OpenThread application is built with CONFIG_ASSERT
and CONFIG_ASSERT_NO_MSG_INFO, OT_ASSERT() prints a location
that points to the otPlatAssertFail() function instead of
the code that actually failed an assertion.

This is confusing and CONFIG_ASSERT_NO_MSG_INFO sometimes
cannot be disabled because of flash size limitations.

Make otPlatAssertFail() always print the actual assert
location.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-01-15 09:58:48 +01:00
Damian Krolik
36b7a3e701 net: openthread: Remove PSA crypto backend workarounds
Remove two workarounds in OpenThread's PSA crypto backend
that were required when Zephyr used pre-1.5 TF-M version:
1. psa_open_key() is no longer needed to reference
   a persistent key
2. psa_cipher_encrypt() can be used to simplify AES
   encryption

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-01-12 11:26:41 -06:00
Armando Visconti
765519ea92 drivers/sensor: fix some ST drivers dependency to HAL_ST module
In order to avoid build failures as described in issue #67242,
make all ST drivers using HAL_ST module dependent to HAL_STMEMSC
and HAS_STLIB libs, which need to be configured in all samples
referring to them.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-01-12 12:55:46 +01:00
Mahesh Mahadevan
0a26da9b08 Revert "modules: hal_nxp: usb: enable sof notifications"
This reverts commit 2b91d62c0e.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-01-12 09:59:02 +01:00
Przemyslaw Bida
0018204091 net: openthread: Add new key and algorithm in PSA.
This commit adds new types of keys and algorithm to crypto_psa backend
of openthread.

Added options:
- `OT_CRYPTO_KEY_TYPE_ECDSA`
- `OT_CRYPTO_KEY_ALG_ECDSA`
- `OT_CRYPTO_KEY_USAGE_VERIFY_HASH`

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-01-11 15:40:55 -06:00
Maciej Baczmanski
f32e686511 net: openthread: implement otPlatResetToBootloader
This commit implements `otPlatResetToBootloader` in two ways:

- trigger reset to bootloader using boot mode retention API
- trigger reset to bootloader by triggering GPIO pin (applicable
for nRF52840 Dongle)

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-01-11 15:37:58 -06:00
Andrzej Kuros
c4ce235973 modules: hal_nordic: remove NRF_802154_ENERGY_DETECTED_VERSION
The macro `NRF_802154_ENERGY_DETECTED_VERSION` is no longer required
because transition of nrf 802154 API is done.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-01-10 20:55:05 -05:00
James Zipperer
2b91d62c0e modules: hal_nxp: usb: enable sof notifications
When building with CONFIG_USB_DEVICE_AUDIO, enable start of frame
notifications from the mcux sdk usb middleware

Signed-off-by: James Zipperer <jzipperer@fb.com>
2024-01-10 15:08:06 +01:00
Gerard Marull-Paretas
067f32731e modules: hal_gigadevice: use CONFIG_${ARCH} to select components
Instead of using custom SoC definitions. The selected components (e.g.
CMSIS), depend on the architecture selected by the SoC Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-10 15:05:54 +01:00
Andriy Gelman
d540407fc8 drivers: mdio: Add xmc4xxx mdio drivers
Add mdio drivers for xmc4xxx SoCs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-01-09 10:00:47 +01:00
Jakub Zymelka
ade49f081d modules: hal_nordic: nrfx: update API version to 3.2.0
Updated API version enables multi-instance GPIOTE driver.
Additionally obsolete symbol that was used to specify
API version in the past was removed.
Affected drivers have been adjusted and appropriate changes
in affected files have been made.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-01-08 11:19:37 +01:00
Jakub Zymelka
dfbcc8911a dts: arm: add new gpiote instances definition
Added GPIOTE0, GPIOTE1 instances for legacy devices,
GPIOTE20, GPIOTE30 for Moonlight and GPIOTE130,
GPIOTE131 instances for Haltium.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-01-08 11:19:37 +01:00
Maciej Baczmanski
d0283f9b15 net: openthread: add missing cmake option
Added `OT_PLATFORM_POWER_CALIBRATION` and set to always off
as in Zephyr power calibration is handled by Radio Driver.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-01-08 10:09:13 +01:00
Eduardo Montoya
5767998d4f drivers: ieee802154: nrf: make selective tx power the default
Remove `IEEE802154_SELECTIVE_TXPOWER` option.

Cache the tx power value in nRF5 driver and make use of it on each
operation.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-01-05 09:04:17 +01:00
Maciej Baczmanski
11613e08e7 net: openthread: increase TCAT stack size
Running TCAT with PSA crypto API  causes stack overflow.
Increased stack size.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-01-03 19:01:05 +00:00
Jędrzej Ciupis
57ee911891 modules: hal_nordic: new nrf_802154 configuration option
This commit adds a new Kconfig for the nRF 802.15.4 radio driver that
allows the user to specify the number of encryption keys the driver can
simultaneously store.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-01-03 10:18:56 +01:00
Jędrzej Ciupis
054353a75d modules: hal_nordic: reorganize nrf_802154 Kconfig
There are multiple Kconfig symbols that are only available when the
radio hardware is present. As a result, the nRF 802.15.4 radio driver
is more difficult to configure on multicore architectures. Also, such
solution goes against the principle of hiding the details of the
platform behind the driver's interface.

This commit moves all the Kconfig options that correspond to settings
present in common nRF 802.15.4 configuration header so that they're
available no matter if the API is serialized.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-01-03 10:18:56 +01:00
cyliang tw
9ad8e1ab74 drivers: adc: support Nuvoton numaker series
Add Nuvoton numaker series adc controller, including async read feature.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-01-02 10:10:27 +01:00
TOKITA Hiroshi
2b24a5c90c modules: hal_rpi_pico: Remove unused drivers
Remove drivers that not been referenced.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-12-20 11:14:24 +01:00
Erwan Gouriou
6ed002ddae modules: Kconfig.stm32: Add Kconfig symbol for RAMCFG
RAMCFG will be required for STM32WBA BLE support.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-18 17:31:08 +00:00
Przemyslaw Bida
b6d8d2715c net: openthread: Add cmake makro to openthread cmake lists.
This commit introduces `kconfig_to_ot_option` to simply fye the way of
adding openthread related kconfigs.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-12-18 12:25:12 +01:00
Adam Wojasinski
a7a6b5654a modules: hal_nordic: Add possibility to specify own source of the nrfx
Introduce possibility to override `NRFX_DIR` sybol from hal_nordic's
CMakeLists.txt file that specifies source dir for the nrfx drivers.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-12-15 11:41:02 +00:00
Armando Visconti
1badec4bfd drivers/sensor: add support to LIS2DU12 accelerometer
The LIS2DU12 is a linear 3-axis accelerometer with advanced digital
functions whose MEMS and ASIC have been expressly designed to build
an outstanding ultralow-power architecture in which the anti-aliasing
filter operates with a current consumption among the lowest in the
market.
This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/en/datasheet/lis2du12.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Anas Nashif
d398e9631b lib: heap: build heap_info conditionally
Only build when needed and adapt existing users to pull this in when
needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-13 17:27:54 -05:00
Jędrzej Ciupis
00f7c0e445 modules: hal_nordic: nrf_802154: remove magic number
This commit replaces a magic number in the definition of serialization
ring buffer length with a macro provided by the 802.15.4 driver.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2023-12-13 13:57:24 +01:00
Jędrzej Ciupis
7afeb62e20 drivers: ieee802154: support Key Identifier Mode > 1
IEEE 802.15.4-2020 defines four possible values for Key Identifier Mode
field of the Auxiliary Security Header. The current ieee802154 driver
API only supports two of them: b00 and b01. This commit adds support for
the two remaining Key Identifier Mode values. It's done by replacing a
field that can only hold Key Index into a field that can holds a pointer
to the entire Key Identifier field.

See IEEE 802.15.4-2020, sections 9.4.2.3 and 9.4.4 for further reference.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2023-12-13 13:57:24 +01:00
Anas Nashif
e29452da64 arch: arm: remove aarch32 from include header guards
We follow the path of the header to define the guard, aarch32 was
removed some time ago and the guards still had AARCH32 in them, just
remove it and keep the guard consistent and short.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-12 18:47:57 +00:00
Joakim Andersson
2687376eff tfm: Enforce initial attestation with required key provisioned
Enforce that the initial attestation partition has the required
initial attestation key provisioned.

If the initial attestation key (IAK) is not present during boot of
TF-M the system will panic during initialization.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-12 19:08:46 +01:00
Joakim Andersson
25787e2df6 tfm: Harded build against TF-M built with unsecure keys
Introduce Kconfig option in zephyr build system that reflects the TF-M
cmake config variable with the same default value for dummy provisioning
and have it satisfy the IAK present requirement.
This configuration is not suitable for production, and by having this
in zephyr configuration we can have this as part of the hardened
configuration check.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-12 19:08:46 +01:00
Markus Swarowsky
3a1e179c4d modules: mbedtls: Remove check_config.h
build_info.h of mbedtls includes the config file for mbedtls but
also includes check_config.h so its not needed to have it in the
config file

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2023-12-12 12:51:23 +01:00
Joakim Andersson
3b0b33b726 tfm: Add profile choice selection for Medium without ARoT enabled
Add profile choice selection for Medium without ARoT enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 18:31:47 +01:00
Joakim Andersson
44106dac56 tfm: Update prompt for profile not set
Update prompt for profile type not set, make it appear in a similar
way as the rest of the options in the choice.

Add in parethesis "base", which is how this referred to in the upstream
TF-M documentation.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 18:31:47 +01:00
Joakim Andersson
02c5cd28db tfm: Fix indentation of help text for BUILD_WITH_TFM
Fix indentation of help text for BUILD_WITH_TFM.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 18:31:47 +01:00
Andrzej Kuros
f5337fc7a3 modules: hal_nordic: nRF 802.15.4 customizable asserts
Recent nRF 802.15.4 Radio Driver provides assert abstraction layer.
The assert abstraction layer is implemented in Zephyr in following
ways depending on the `NRF_802154_ASSERT_CHOICE` Kconfig choice.

`NRF_802154_ASSERT_ZEPHYR_MINIMAL` (default) gives ability to still
perform run-time checking of the nRF 802.15.4 Radio Driver operation
with minimum memory overhead and configurable behavior on fault
detection regardless of the `CONFIG_ASSERT` Kconfig option value.

`NRF_802154_ASSERT_ZEPHYR` gives ability to use asserts provided and
configurable by Zephyr including the ability to turn off the run-time
checking of the nRF 802.15.4 Radio Driver operation.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-12-11 10:50:27 +01:00
Anas Nashif
bf7d7d6214 modules/hal_ethos_u: do not expose module kconfigs if not enabled
Do not expose module Kconfigs if not enabled or used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-09 07:31:04 -05:00
Przemyslaw Bida
304b98391c net: openthread: Add openthread TCAT implementation.
This commit adds bbtc implementation.
New file in modules/openthread/platform/ble.c
New corresponding kconfig option `OPENTHREAD_BLE_TCAT`.

Co-authored-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
Signed-off-by: Piotr Jasiński <piotr.jasinski@nordicsemi.no>
2023-12-08 10:21:56 +00:00
Przemyslaw Bida
8f2b7a121b net: openthread: Openthread upmerge to 4ed44bc
This commit bumps openthread commit to `4ed44bc`
and implements `CONFIG_OPENTHREAD_MULTIPAN_RCP` option.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-12-08 10:21:56 +00:00
Torsten Rasmussen
790388b7c0 cmake: tfm: propagate Zephyr Python3 interpreter to TF-M build
The TF-M build uses the vanilla CMake FindPython3 mechanism which in
several cases misbehaves, see #24308 for details.

Ensure TF-M build uses same Python interpreter as Zephyr itself.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-12-06 10:29:02 -05:00
Fabian Blatz
d94d226fe1 modules: lvgl: input: add zephyr,lvgl-keypad-input device binding
Add a pseudo device which can be used to hook into input events and
emit lvgl keypad events.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-12-06 09:15:50 +00:00
Wilfried Chauveau
3599fb47e1 modules: cmsis: Add consistency checks
This change adds checks to validate consistency between Zephyr’s Kconfig
settings and cmsis configuration defined in SiP’s sdk provided headers.

This change also introduces a config to enable cmsis’ own checks which
emits warnings if a parameter relies on auto-populated default values.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Wilfried Chauveau
8d91ba200f modules: cmsis: Move cortex_m default configuration to its own file
Kconfig parameters, header’s default & silicon vendor’s SDK configuration
for CMSIS Core, must be consistent. Depending on the inclusion order of
the headers, this is currently not always the case.

This change introduces consistency checks & enusers defaults match their
Kconfig settings.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2023-12-05 10:19:15 +00:00
Joakim Andersson
8caae66eae Kconfig: tfm: Switch BOARD_BL5340_DVK_CPUAPP_NS TF-M board selection
Switch BOARD_BL5340_DVK_CPUAPP_NS TF-M board selection from using the
platform support that is built-in to TF-M module, and instead use
the generic nRF5340 cpuapp platform support that all other nrf5340 SoC
related boards use.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-04 14:33:45 +01:00
Jonas Remmert
7a2fcc419e drivers/sensor: add support to LPS28DFW pressure sensor
The LPS28DFW is an ultracompact, piezoresistive, absolute pressure sensor.
Compared to the LPS22DF, the LPS28DFW is waterproof and has a Dual FS
capability and does not have SPI. This commit extends the LPS22DF driver to
be compatible with the LPS28DFW device.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-12-01 12:19:05 -06:00
Pieter De Gendt
4b1a8cb95b modules: nanopb: Add custom target for generated header files
Nanopb generates header files that need to be available before being
included. This isn't an issue for a target where the files were added
with zephyr_nanopb_sources. But if another target wants to include
these generated files we need a cmake dependency chain.

The nanopb_generated_headers custom target been added for this purpose.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-12-01 10:50:26 +00:00
Eduardo Montoya
e504ab5217 net: openthread: add Link Metrics noise floor initialization
It was missing.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-11-30 10:05:14 +01:00
Adam Wojasinski
38739368dd modules: hal_nordic: watchdog: Add Kconfig symbols for new WDT instances
This commit is a part of introduction of new WTD instances.
It adds new Kconfig symbols that can be used in WDT shim and
nrfx driver.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-11-29 13:12:42 +01:00
Jędrzej Ciupis
29d027a47b modules: hal_nordic: nrf_802154: lengthen serialization ring buffer
This commit increases the length of ring buffer that holds serialized
nRF 802.15.4 API calls so that it can simultaneously store all
notifications the driver is capable of issuing. Currently that's not the
case, which creates a possibility of the serialization buffers running
out while the driver is issuing notifications.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2023-11-29 10:09:05 +01:00
Marek Pieta
00d8263a93 soc: arm: nrf52: Configurable EGU instance for anomaly 109 workaround
Change makes EGU instance used for anomaly 109 workaround configurable.
The default EGU instance (5) may be used for other purpose.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2023-11-28 14:23:49 +00:00
Maciej Baczmanski
c2f1ff7f5f net: openthread: upmerge to 75694d2
Regular OpenThread upmerge to commit `75694d2`.

Move CONFIG_OPENTHREAD_PLATFORM_KEY_REFERENCES_ENABLE
from header file to Kconfig.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-11-27 19:59:04 +01:00
Pieter De Gendt
e3f5c96667 modules: nanopb: Let Nanopb search for protoc
The Nanopb cmake locates the protoc executable, verify the result
instead of doing it ourselves.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-24 15:37:37 +01:00
Joakim Andersson
1ab669e3d0 tfm: Remove SFN model FP limitation
Despite what the TF-M documentation says about SFN model not supporting
Floating Point, it does support it, according to TF-M developers.

Remove SFN limitation not supported with FP Hard ABI.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-23 10:01:22 +01:00
Andrej Butok
d2bd778bcc kconfig: mcuboot: Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY option
Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY Kconfig option which
passes the --overwrite-only option to imgtool to avoid
adding the swap status area size when calculating overflow.
It is used by non-swap update modes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-23 09:59:36 +01:00
Joakim Andersson
3467a25fff tfm: Change SFN and FP_HARDABI dependency
TF-M only suports floating point in IPC model, not the SFN model.
Since floating point is a basic feature of the architecture and TF-M
has the limitation it makes more sense for the dependency to exist in
TF-M and and limit the TF-M model choice instead of limiting the
option to enable floating point.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-21 09:55:24 +01:00
Adam Wojasinski
cac170d2b9 modules: hal_nordic: Add I2S Kconfig symbols and translation to nrfx
Add Kconfig symbols for I2S 20 instance and translation symbols
used in nrfx drivers.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-11-20 09:24:05 +01:00
Fabian Blatz
8861bc0671 modules: lvgl: Force fullsize render buffer on full refresh
Changes the default of `LV_Z_VDB_SIZE` to 100 percent if
`LV_Z_FULL_REFRESH` is set. Reason is that LVGL will reset the full
refresh flag if the buffer is not equal to the screen size.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-11-20 09:23:04 +01:00
Natalia Pluta
f5658254e8 modules: hal_nordic: Add QDEC Kconfig symbols and translation to nrfx
Add Kconfig symbols for QDEC instances (20, 21, 130, 131) and
translation symbols used in nrfx drivers.

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-11-20 09:19:45 +01:00
Pieter De Gendt
8f8a77abc9 modules: hal_rpi_pico: Use zephyr_library_add_dependencies
Replace usage of add_dependencies(${ZEPHYR_CURRENT_LIBRARY} ...)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-20 09:19:34 +01:00
Jamie McCrae
ce3ba0dfd2 modules: openthread: platform: radio: Rename missed type
Fixes an issue whereby a rename of a variable type has been
forgotten in an instance, which now uses the correct type name

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-17 16:00:07 +01:00
Joakim Andersson
df7114456e tfm: Change default TF-M model for profile small to match profile conf
Change the default TF-M model for small profile to match the
configuration set in the profile small configuration file.
Otherwise we would be overriding the profile default.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-16 16:52:03 +01:00
Joakim Andersson
1c8b668d23 tfm: Fix include order between platform_ns and tfm_api_ns libraries
Fix include order between platform_ns and tfm_api_ns libraries.
platform_ns functions may depend on tfm_api_ns.
This would typically be platform specific IOCTL services added to the
platform_ns library requiring the tfm_platform_ioctl from the
TF-M platform partition exposed in tfm_platform_api.c

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-16 09:31:41 +01:00
Henrik Brix Andersen
c9da68290a modules: canopennode: use zephyr/dsp/types.h for float32_t/float64_t
Include the zephyr/dsp/types.h header for float32_t/float64_t type
definitions to avoid conflicts with other subsystems including this header.

Add compile-time asserts to ensure the typedefs meet the requirements of
the CANopenNode module.

Fixes: #63896

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-16 09:28:59 +01:00
Fabian Blatz
84c7f2fe0a modules: lvgl: Fix usage of LVGL log levels
Introduces a Kconfig symbol `LV_Z_LOG_LEVEL` because contrary to Zephyr the
numerical value of log levels in LVGL increases with severity. Also support
for the `LV_LOG_LEVEL_USER` is added.

Resolves issue #64351.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-11-15 14:54:47 +01:00
Patryk Lipinski
14827aad65 modules: hal_nordic: nrfx_glue: Changes in the macro statements
Changes in the macro statements that allows to build
with -Wudef flag enebaled, without errors.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
2023-11-15 09:59:56 +01:00
Eduardo Montoya
b406024148 net: openthread: implement otPlatRadioSetRxOnWhenIdle
OpenThread upmerge to commit `193e77e`.

Implement `otPlatRadioSetRxOnWhenIdle` radio platform API.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-11-15 09:59:17 +01:00
Armando Visconti
f1f7e4712c drivers/sensor: add support to LPS22DF pressure sensor
The LPS22DF is an ultracompact, piezoresistive, absolute pressure sensor
that functions as a digital output barometer. The LPS22DF provides lower
power consumption, achieving lower pressure noise than its predecessor.
This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/en/datasheet/lps22df.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-13 16:08:46 +00:00
Grant Ramsay
a3ff19a39e cmake: compiler: Add compiler property for no-builtin
Abstracts these flags for multiple toolchain support

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-13 10:21:41 +01:00
Eduardo Montoya
3508cd609c net: openthread: upmerge to 6edb06e
Regular OpenThread upmerge to `6edb06e`.

Also add `OPENTHREAD_CSL_RECEIVER_LOCAL_TIME_SYNC` config.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-11-09 18:21:41 +01:00
Declan Snyder
345f079e49 dts: bindings: Fix NXP USB bindings
NXP USB bindings were combined into one binding and using
a property corresponding to HAL enums which is improper use
of devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-09 15:34:39 +01:00
Johan Hedberg
58ba0e1e26 modules: acpica: Fix CMakeLists.txt style
Fix indentation to use spaces (instead of tabs) and remove the
unnecessary repetition of the condition inside endif().

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-08 15:12:02 +00:00
Nazar Palamar
4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar
5c3abe9197 drivers: bluetooth: rename BT_CYW43XXX to BT_AIROC
rename BT_CYW43XXX to BT_AIROC to be compatible with
WIFI_AIROC

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Nazar Palamar
1fd080b8cf drivers: sdhc: added Infineon CAT1 SDHC/SDIO driver
Added initial version of Infineon CAT1 SDHC/SDIO driver

Added initial version of binding file for Infineon CAT1 SDHC/SDIO
driver

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Przemyslaw Bida
2a4350dfd2 net: openthread: Adding snoop entries kconfig.
Adding missing `CONFIG_OPENTHREAD_TMF_ADDRESS_CACHE_MAX_SNOOP_ENTRIES`
to thread kconfig file.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-11-08 10:08:58 +01:00
Tomasz Moń
8db6919695 nrfx_usbd: Rename to nrf_usbd_common
Rename local usbd copy from nrfx_usbd to nrf_usbd_common and use it in
both USB stacks. Renaming header to nrf_usbd_common.h allows breaking
changes in exposed interface. Mark all doxygen comments as internal
because local usbd copy should not be treated as public interface
because we are under refactoring process that aims to arrive at native
driver and therefore drop nrf_usbd_common in the future.

Use Zephyr constructs directly instead of nrfx glue macros.

No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-07 14:06:51 +01:00
Tomasz Moń
2010d4d599 nrfx_usbd: Copy nrfx usbd code to Zephyr
Copy nrfx_usbd code from zephyrproject-rtos/hal_nordic git revision
d054a315eb888ba70e09e5f6decd4097b0276d1f. This enables us to refactor
the code towards a native driver in a step by step manner where the
smallest changes that bring biggest performance improvements are done
early on.

The code is not a vanilla copy from zephyrproject-rtos/hal_nordic.
The code was reformated with clang-format to match project style.
Manual modifications were done to change comments formatting, place
constant comparisons on the right and add blank lines to pass Zephyr
compliance check.

Relicense to Apache 2.0.

No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2023-11-07 14:06:51 +01:00
Alberto Escolar Piedras
3b49f79cc4 modules libc3: Add missing Kconfig dependency
The LC3 coded requires floating point support in
the C library, so let's select REQUIRES_FULL_LIBC
in the module kconfig, instead of having samples
adding it to their prj.conf

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 10:10:27 +01:00
Eduardo Montoya
1d0dda794c net: pkt: remove redundant net_pkt_cb_ieee802154 fields
Remove redundant `arb` and `fv2015` fields.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-11-03 11:44:40 +01:00
Flavio Ceolin
e57e7f28a9 Revert "Revert "modules: tinycrypt: Options only when module is available""
This reverts commit 572491ab95.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-27 13:33:30 -05:00
Andriy Gelman
d0961756a6 drivers: watchdog: Add xmc4xxx support
Adds watchdog support for Infineon xmc4xxx MCUs.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-10-27 12:58:07 -05:00
Przemyslaw Bida
b2fec758b3 net: openthread: Fix dependency on openthread max ip addr.
Fixes discrepancy between FTD and MTD in amount of ipaddr in
`ChildUpdateRequest`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-10-27 10:52:55 +02:00
Joakim Andersson
96c5052733 tfm: Add BL2 log level configuration and disable it with TFM silent conf
Add choice for BL2 log level configuration.
Silence TF-M BL2 logging when TF-M is configured to be silent.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-26 12:10:11 +02:00
Jukka Rissanen
83c875adab hostap: Move the relevant config options away from hostap
Moving the Zephyr specific config options from
modules/hostap/Kconfig to corresponding Kconfig where the
option is specified.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-10-26 09:48:47 +02:00
Sridhar Nuvusetty
ab5821a8c8 hostap: Add build support for Zephyr
Only adds basic build support using Zephyr. Crypto support is disabled
till the MbedTLS integration is complete.

Signed-off-by: Sridhar Nuvusetty <sridhar.nuvusetty@nordicsemi.no>
Signed-off-by: Sachin Kulkarni <sachin.kulkarni@nordicsemi.no>
Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2023-10-26 09:48:47 +02:00
Alberto Escolar Piedras
572491ab95 Revert "modules: tinycrypt: Options only when module is available"
This reverts commit 713ca15224.

This change broken several BT unit tests breaking CI in the main
branch. Let's revert it.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/64344

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-10-25 11:04:43 +02:00
Nikodem Kastelik
70db8cd12a modules: hal_nordic: nrfx: enable NRFX_GPIOTE1 for non-secure builds
Now it is needed to explicitly use NRF_GPIOTE1 instance
in nrfx_gpiote driver for non-secure builds.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2023-10-24 11:13:53 +02:00
Flavio Ceolin
ffe1285343 modules: zcbor: Options only when module is available
Only show zcbor menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin
2e6871a46f modules: openamp: Options only when module is available
Only show openamp menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin
f4cb487b79 modules: sof: Options only when module is available
Only show sof menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin
9eff0ca521 modules: libmetal: Options only when module is available
Only show libmetal menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin
713ca15224 modules: tinycrypt: Options only when module is available
Only show tinycrypt menu options when the module is available.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Flavio Ceolin
761a3039bb modules: Remove legacy comment
Module's Kconfig depends now in the presence of the module itself.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-24 10:53:24 +02:00
Joakim Andersson
33a44d0ed8 tfm: nordic_nrf: Add generic SoC support for nordic SoCs
Add generic SoC support for the supported nordic SoCs:
- nrf5340
- nrf9160
- nrf9120

Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-10-24 09:40:16 +02:00
Sebastian Bøe
a4e9aed68d tfm: Enable TFM_EXCEPTION_INFO_DUMP by default
Exception info dump is a very basic feature so it should IMHO be
enabled by default.

For instance, a simple null-pointer exception in the non-secure app
will not be logged unless this option is enabled.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2023-10-20 19:29:32 +02:00
Adam Wojasinski
5685af0923 modules: hal_nordic: Add support for new TWIM instances
Add Kconfig and symbols for twim: 20-22, 30, 121, 130-137 instances

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:04:10 +02:00
Adam Wojasinski
5c1daef5ab drivers: spi: nrfx: Add SPIM Kconfig symbols for new instances
Add support for upcomming SPIM instances.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-10-20 15:03:17 +02:00
Przemyslaw Bida
cc85223ed4 net: openthread: Remove waiting for DTR in openthread UART.
Uart driver for openthread have been waiting for host to start
communicating with coprocessor, during booting of the Zephyr and
by that blocking start os OS. There is no longer a need for
that since the stack will be soft rebooted after host connects
to coprocessor, removing the need to wait on host communication.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-10-20 14:59:47 +02:00
Florian Grandel
e9d5a98e9d drivers: ieee802154: improve CSL standard conformance
This change slightly simplifies the configuration of a CSL receiver and
generalized CSL_RX_TIME to EXPECTED_RX_TIME as a re-usable primitive
across several timing-sensitive IEEE 802.15.4 standard sub-protocols
(namely BE-PANs/DSME/CSL/RIT/TSCH).

This API change is based on the rules outlined in RFC #61227.

Fixes: #62918

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:32 +02:00
Florian Grandel
80da9ddfef drivers: ieee802154: improve ACK header IE config
Improves standard conformance of the IEEE802154_CONFIG_ENH_ACK_HEADER_IE
option and introduces certain "soft MAC" capabilities around header IEs:
 * Introduces types and helpers that allow driver maintainers to
   represent, parse, write and validate header IEs.
 * Introduces helper functions to access non-aligned fields in header
   IEs, namely element IDs.

Updates the only existing L2 and driver pair that uses
IEEE802154_CONFIG_ENH_ACK_HEADER_IE: OpenThread platform radio and nRF5
and improves header IE validation in the nRF5 driver.

This change should help further driver maintainers to support
OpenThread's CSL and vendor IE extensions. It is based on the rules
specified in RFC #61227.

It is also a precondition to generically support both, "soft MAC" and
"hard MAC", approaches to header IEs in the TSCH protocol, namely the
time synchronization IE.

Fixes: #62940

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:23 +02:00
Florian Grandel
62396443fc drivers: ieee802154: deprecate OT "sleep" nomenclature
"Sleeping" has a well defined meaning in Zephyr related to threading and
power management. This differs from OpenThread's definition:

- Deprecates the "SLEEP_TO_TX" capability as it is redundant and
  conflicts with all of Zephyr's nomenclature, #61227, RFC 2863, Thread
  standard and IEEE 802.15.4. This binds the API to an implementation
  detail of OpenThread, instead. See #63670 for the agreed migration path.

- Renames the "SLEEP" event to "RX_OFF" which conforms to the
  nomenclature in Zephyr, this API and IEEE 802.15.4.

Fixes: #62995

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-10-20 14:58:16 +02:00
Andrzej Głąbek
5e38471e71 modules: hal_nordic: cmake: Fix checking if uicr DT node is accessible
According to cmake documentation, in the `if(<string>)` expression
the string evaluates to false unless its value is one of the true
constants. Thus, the commands under `if(${uicr_path})` are never
executed. Use `if(DEFINED uicr_path)` instead, since `uicr_path`
is returned by `dt_nodelabel()` and it will be undefined if such
node does not exist.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-10-13 21:23:17 +03:00
Henrik Brix Andersen
b9675b05d3 drivers: can: mcux: flexcan: override maximum HAL wait loop iterations
Add option for overriding the maximum number of wait loop iterations for
entering/leaving freeze mode. Set the default to 10000 (as opposed to a
default of 1000 used in the HAL).

Fixes: #56171

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-10-13 10:04:57 +01:00
Flavio Ceolin
e7bd10ae71 random: Rename random header
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.

Rename it to random.h and get consistently with other
subsystems.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-10 14:23:50 +03:00
Laurentiu Mihalcea
3563347b10 modules: Kconfig.mcux: Remove implicit selection of HAS_CMSIS_CORE
CONFIG_HAS_MCUX is also selected by ARM64 and XTENSA-based cores
which don't have any CMSIS files. As such, it's wrong to implicitly
select CONFIG_HAS_CMSIS_CORE when CONFIG_HAS_MCUX is selected. Since
the ARM32-based cores implicitly select CONFIG_HAS_CMSIS_CORE there's
no point in CONFIG_HAS_MCUX also selecting it too.

The old approach caused config-related warnings
in external projects such as SOF after the introduction of
Commit '8d5ed53' ("modules: remove uncessary source for
external cmsis kconfig"). The warnings were in the form of:
"HAS_CMSIS_CORE (defined at modules/cmsis/Kconfig:7) has
direct dependencies 0 with value n ..."

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-10-06 16:49:51 +03:00
Najumon B.A
b86b4b96a1 lib: acpi: update DSDT Kconfig with condition enable
update DSDT_SUPPORT Kconfig with condition enable only if both
ACPI and PCI enabled

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-10-06 10:40:14 +02:00
Ryan McClelland
2a2d032341 modules: hal_ethos_u: ethosu_log depends on stdout console
ethosu_log.h uses the stdout as it's stream for printf. This could
cause an issue where if CONFIG_LOG=n and CONFIG_CONSOLE=y then there
would be no way to control the log level and it would default to debug
level. There is no NONE option as with the way the ethos-u hal is set
up with no way to go below the err level.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-10-05 11:12:28 +02:00
Florian Grandel
36402b6d2a net: pkt: time: introduce ns timestamp helper
A little refactoring that simplifies dealing with nanosecond timestamp
values in packets and further decouples calling code from PTP:

Benefits:
- simplifies calling code by removing redundant conversions.
- prepares for removing PTP dependencies from net_pkt.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-29 16:27:15 +02:00
Iuliana Prodan
4289359eb2 modules: mcux: fix HAS_CMSIS_CORE selection
Do not select HAS_CMSIS_CORE for SOC_FAMILY_NXP_ADSP.
This soc family refers to the Audio DSP from i.MX MPU,
which is a HiFi4 core, Xtensa arch.

HAS_CMSIS_CORE is for ARM cores (A, M, R cores) -
see modules/cmsis/Kconfig.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-29 08:41:37 -05:00
Dominik Ermel
5d28fdea63 modules/MCUboot: Add overwrite mode for MCUboot
Add MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY mode.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-28 16:27:45 +02:00
Ryan McClelland
8d5ed530d7 modules: remove uncessary source for external cmsis kconfig
CMSIS uses an external KConfig so sourcing the KConfig is uncessary. This
also adds a comment if it is not available.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Ryan McClelland
90c6465f1f modules: fix naming of cmsis-nn,cmsis-dsp folder
The names have underscores within them. Somehow it was still being found
within the build but not with building documents. This renames them to
the correct name.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-27 18:33:40 -04:00
Flavio Ceolin
5d505c7b28 random: Fix feature dependency usage
Code using sys_csrand_get should depend on CONFIG_CSPRNG_ENABLED symbol
and not in ENTROPY_HAS_DRIVER since they are not using the entropy
device directly.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-09-27 11:55:10 -05:00
Dominik Ermel
a2b238eee7 modules/MCUboot: Fix missing dependency
The CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP has been missing
select of CONFIG_MCUBOOT_BOOTLOADER_MODE_HAS_NO_DOWNGRADE.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-27 09:54:28 +02:00
Fabian Blatz
c7f8033f2b modules: lvgl: simplify sys_heap memory size configs
Changes the Kconfig symbols for the sys_heap based memory management option
and removes the notion of `BLOCKS` with a more concise single
`LV_Z_MEM_POOL_SIZE` option. Also adds `LV_MEM_CUSTOM` to the lv_conf.h,
since in any option the memory management is considered to be custom.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-27 09:54:08 +02:00
Dominik Ermel
f17e4f1b76 modules/MCUboot: Add new Kconfig indicating downgrade prevention
Add the MCUBOOT_BOOTLOADER_NO_DOWNGRADE Kconfig option that allows,
when paired with MCUboot mode Kconfig, to indicate that the MCUboot
has been configured with downgrade prevention, which means that only
application with version higher than running can be swapped on next boot.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 16:41:25 +02:00
Dominik Ermel
f3067f2364 mgmt/MCUmgr/grp/img: Add support for DirectXIP with revert
The commit adds support for uploading image to board with MCUboot
configured with DirectXIP with revert.
It allows to set uploaded image either for test or as permanent
boot application, until newer image gets confirmed.
Note that in DirectXIP with revert MCUboot will remove image
that has not been set for test nor confirmed and MCUmgr does not
set either mode unless image has the mode set within uploaded
binary.
The commit adds Kconfig option
CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT
that enabled the new mode of operation within MCUmgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2023-09-26 13:40:11 +02:00
Ryan McClelland
d2f82648cd modules: tflite-micro: update to latest
Update tflite-micro to use the latest. This also updates to use
the cmsis-nn module.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Ryan McClelland
b092094815 modules: cmsis-nn: add cmsis-nn module
This adds the cmsis-nn module since it moved to its own realm.
This also adds a kconfig for the long short-term memory.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Ryan McClelland
104ea2ccca modules: cmsis-dsp: add cmsis-dsp module
Use CMSIS-DSP from its new realm. This also changes change how you
initialize FFT tables as well to use arm_cfft_init_64_f32 if you
know the FFT size in advance rather than the generic initialization
arm_cfft_init_f32.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-09-25 09:46:33 +02:00
Roland Lezuo
f4c901b82d soc: arm: st_stm32: add config to allow debugger attach in sleep/stop modes
Adds CONFIG_STM32_ENABLE_DEBUG_SLEEP_STOP to allow debugger attaching in
sleep/stop mode of STM32 parts. Mainly useful for debugging. Move DBGMCU
from part-sepcific power.c to common soc_config.c. CONFIG_USE_SEGGER_RTT
depends on this as well.

Signed-off-by: Roland Lezuo <roland.lezuo@embedded-solutions.at>
2023-09-22 15:31:47 +02:00
Alberto Escolar Piedras
6afe7cf216 hal nordic: cmake: Add support for nrf53_bsim boards
Also set the HAL variant appropriately when building for
the new nrf53_bsim boards.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-20 08:56:49 +02:00
Fabian Blatz
2ea2d37d60 modules: lvgl: retain last event for button/pointer device
Adds saving of the last lv_indev_data_t for button and pointer type
devices. This is needed because there is currently no way to tell LVGL in
the read callback that no event is pending. Preservation of the last state
is expected to happen in the port layer for the input devices.
This resolves issue #62512.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-19 16:18:18 +01:00
Maciej Baczmanski
d2495b14f2 modules: openthread: fix unused variable during otPlatCryptoInit
If asserts are disabled, there is a warning in 'otPlatCryptoInit'
regarding unused variable `err`. This commit fixes that.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-09-19 15:22:03 +01:00
Florian Grandel
e2005b6e48 modules: openthread: radio: OT now uses standard TX timestamp
Synchronizes with the new upstream RX/TX timestamp definition in
OpenThread based on the standard's SFD.

This change is synchronized with the upstream OpenThread implementation
via west.yml.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-19 15:21:17 +01:00
Fabian Blatz
1896130bd8 modules: lvgl: fix initialization order depedencies
Removes the pseudo device prerequisite that the LVGL setup routine has been
executed before initialization. The pseudo devices are now registered at
the end of the LVGL setup routine, the driver is not concerned with
configuring the devices anymore. This also removes the need for enforcing
certain priorities within the same init level.

This resolves issue #62753.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-18 20:37:43 +02:00
Gerard Marull-Paretas
4d7d5ce226 modules: hal_nordic: nrfx: add support for 'gpio-as-nreset'
So that the HAL's system init function configures the reset GPIO as
nRESET if requested by the user.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-18 13:14:08 +02:00
Gerard Marull-Paretas
e43c2f3eb5 modules: hal_nordic: inject CONFIG_NFCT_PINS_AS_GPIOS
If the users configures this option in devicetree, ie,

```
&uicr {
    nfct-pins-as-gpios;
};
```

CMake will inject the HAL-specific CONFIG_NFCT_PINS_AS_GPIOS definition,
so that the necessary operations are performed during system init.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:05:28 +02:00
Gerard Marull-Paretas
c7292efbda modules: lvgl: input: move to POST_KERNEL level
devices need to be initialized in pre/post-Kernel.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-15 16:04:19 +02:00
Alberto Escolar Piedras
5029922384 mbedtls module: Fix for other POSIX arch boards
Instead of detecting that we are in a native/POSIX arch based
board by checking for each board specifically,
let checks for the architecture.
In that way other boards (like the upcoming nrf53_bsim ones)
will also work.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-15 12:58:00 +02:00
Pieter De Gendt
0357b4d4f5 modules: nanopb: Add helper function to generate sources
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-09-15 12:57:40 +02:00
Florian La Roche
79d0bf39b8 modules/acpica: CMakeLists.txt: move conditional to beginning of file
Move the conditional compile of CONFIG_ACPI to the beginning of the file
as we currently add compiler include paths to all projects even if
CONFIG_ACPI is not set.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2023-09-15 09:26:14 +02:00
Johan Lafon
6f0bf76086 modules: fatfs: fix build warnings
Adds a missing include to avoid these warnings :
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: implicit declaration
  of function 'k_malloc'; did you mean 'ff_memalloc'?
  [-Wimplicit-function-declaration]
- zephyr/modules/fatfs/zfs_ffsystem.c:19:16: warning: returning 'int' from
  a function with return type 'void *' makes pointer from integer without a
  cast [-Wint-conversion]
- zephyr/modules/fatfs/zfs_ffsystem.c:25:9: warning: implicit declaration
  of function 'k_free' [-Wimplicit-function-declaration]

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2023-09-14 16:03:13 +02:00
TOKITA Hiroshi
8d98e7064e modules: hal_rpi_pico: Enable TIMER driver
Enable TIME driver.
Add the path of the TIME driver header into include paths.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-09-13 16:18:44 +02:00
Jordan Yates
1e06ba2328 soc: arm: nordic: handle nRF52832 anomaly 109
Enable workaround for anomaly 109 by default when affected peripherals
are enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-09-13 12:05:27 +02:00
Vladimir Graudt
d40dbdf96f modules: mbedtls: use proper memory alignment on 64-bit platforms
This commit instructs mbedtls to use 64-bit alignment in its internal
memory allocation routines when targeting 64-bit platforms. By default
mbedtls uses 32-bit alignment regardless the platform, what may result
in misaligned memory accesses, possibly inducing access time overhead or
exceptions

Signed-off-by: Vladimir Graudt <vladimir.graudt@syntacore.com>
2023-09-13 12:02:06 +02:00
Fabian Blatz
ca56084244 modules: lvgl: move existing includes to folder
Moves the includes to the exisiting `include` folder within the
module.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Fabian Blatz
094342866f modules: lvgl: input: add zephyr,lvgl-encoder-input device binding
Add a pseudo device which can be used to hook into qdec events and
optionally a button and relay the input_event to lvgl.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-09-13 11:35:04 +02:00
Huifeng Zhang
2c22e83dfb include: arch: arm: Remove aarch32 directory
This commit follows the parent commit work.

This commit introduces the following major changes.

  1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
    to the 'include/zephyr/arch/arm' directory.

  2. Change the path string which is influenced by the changement 1.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-13 10:08:05 +01:00
Aron Lander
89c866ab68 modules: Add DFM and move Tracerecorder into percepio module
This commit adds the DFM (DevAlert target side code) module and
moves the TraceRecorder module into the percepio module, which
results in the TraceRecorder module definition being removed
from the west manufest and module definition within zephyr.

Signed-off-by: Aron Lander <aron.lander@percepio.com>
2023-09-12 10:19:37 -04:00
Mateusz Sierszulski
8db11e6a0a drivers: spi: Add Ambiq MSPI driver
This commit adds MSPI driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-09-08 14:44:12 +02:00
Fabio Baltieri
7140b6f9c1 modules: lvgl: initialize lvgl_heap_init from lvgl_init
Call lvgl_heap_init from lvgl_init rather than using two separate
SYS_INIT, this sensures that the heap is initialized correctly
regardless of the relation between CONFIG_KERNEL_INIT_PRIORITY_DEFAULT
and CONFIG_APPLICATION_INIT_PRIORITY.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-08 09:43:24 +02:00
Najumon B.A
e5ec893c00 lib: acpi: add support for MAD table and DMAR table
add support for retrieve MAD and DMAR table information. Provided
two new interface namely acpi_dmar_entry_get() and acpi_drhd_get()
for retrieve DMA Remapping Reporting and DMA-remapping hardware
unit definition (DRDH).

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-09-07 09:42:38 +02:00
Jamie McCrae
95349eae2b mcuboot: Use tweak version for final signing version field
Includes the application VERSION-file designated tweak version
for the build number field when signing MCUboot images.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-01 17:44:28 +02:00
Sreeram Tatapudi
09a07e42c0 drivers: cat1: Updates to support latest version of HAL/PDL
- Refactoring to support latest versions of HAL/PDL

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-01 09:52:25 +02:00
Robert Lubos
232e4ad6b8 modules: mbedtls: Add Kconfig option to enable DTLS Connection ID
Add Kconfig option for `config-tls-generic.h` to enable DTLS Connection
ID extension.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-30 11:36:51 +02:00
Gerard Marull-Paretas
432609ec8e modules: hal_nordic: nrf_802154: add missing init.h
File was using SYS_INIT without including init.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-08-29 16:13:08 +01:00
Fabian Blatz
b296d1152f input: add zephyr,lvgl-button-input device binding
Add a pseudo device which can be used to hook into gpio-keys input_events
and relay the events to a lv_indev.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
5e5d9f481c modules: lvgl: Move lvgl kscan pointer handling to separate file
Moves lvgl pointer driver handling based on kscan to its own file, to ease
deletion when the usage of kscan for display touch input has been
deprecated.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Fabian Blatz
c536bd3845 modules: lvgl: add zephyr,lvgl-pointer-input pseudo device
Add the scaffolding to create input lvgl pseudo devices which route zephyr
input_event to their lvgl `indev` equivalent. As a first cut also add a
`zephyr,lvgl-pointer-input compatible which can be a drop-in replacement
for the existing kscan solution.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-29 10:17:52 +02:00
Maciej Baczmanski
be483d76d7 modules: openthread: initialize settings in otPlatCryptoInit()
In OpenThread, Settings are initialized after KeyManager by default.
If device uses PSA with emulated TFM, Settings have to be initialized
at the end of otPlatCryptoInit(), to be available before storing
Network Key.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-08-28 14:27:53 +02:00
Mateusz Sierszulski
2b74109f20 drivers: spi: Add Ambiq SPI driver
This commits adds SPI master driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-25 10:31:58 +02:00
Alberto Escolar Piedras
65cd717152 modules: hal_nordic: Make module directory avaliable to others
Make the nrfx module directory avaliable to other
cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-08-24 15:40:00 +02:00
Gerard Marull-Paretas
94a4d38ed9 cmsis: remove unnecessary includes
Some files included <cmsis_core.h> for nothing, delete it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Gerard Marull-Paretas
9c961571a2 modules: cmsis: move glue code to modules/cmsis
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).

To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.

All files including CMSIS have been updated.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Gerard Marull-Paretas
1818522572 modules: cmsis: move to a folder
Move CMSIS module Kconfig options to a folder, in preparation for CMSIS
core header creation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-08-24 13:20:21 +02:00
Daniel DeGrasse
da59df2905 modules: lvgl: allow offloading rendering process to background thread
Enable offloading of display_write call to background thread for color
displays. This feature is opt-in, as it may offer significant
performance gains for every display pipeline.

When enabled display_write and lv_disp_flush_ready will be called from a
background thread. This means that while the display driver waits on the
hardware to render the framebuffer, the LVGL rendering thread will not
be blocked.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-08-22 18:05:58 +02:00
Daniel Leung
50a20f7b62 openthread: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Jędrzej Ciupis
a41475507a modules: hal_nordic: remove 802.15.4 gpiote platform
This commit removes deprecated GPIOTE platform abstraction for nRF IEEE
802.15.4 radio driver.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2023-08-22 11:39:33 +02:00
Fabian Blatz
63bb74c69a modules: lvgl: Handle errors on fs_tell
Changes the lvgl filesystem `tell()` wrapper to check for errors returned
by zephyr filesystem subsystem.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-22 10:01:29 +02:00
Fabian Blatz
ab6d99ffde modules: lvgl: Unify memory management strategy for filesystem
Changes the memory management for the lvgl filesystem wrapper to use the
memory management strategy selected by kconfig. Additionally fixes memory
leaks if fs_{file,dir}_t initialization failed.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-22 10:01:29 +02:00
Andrzej Kuros
04d3dcb116 drivers: ieee802154_nrf5: energy_detected api change adjust
The prototype of `nrf_802154_energy_detected` callout has changed.
This commit adjusts to this change.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2023-08-20 19:31:21 +02:00
Mateusz Sierszulski
47d0e79444 drivers: i2c: Add Ambiq I2C driver
This commit adds I2C master driver for Apollo4 SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-17 15:15:45 +02:00
Aleksandr Khromykh
2cdacb3fa8 tests: Bluetooth: Mesh: add cfg mesh with mbedtls PSA to bsim CI
Commit adds configuration for mesh with mbedtls PSA
to CI BabbleSim tests as well as emulation of
the Internal Trustable Storage(ITS) based on Zephyr's
settings to run in parallel environment.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-08-17 15:14:19 +02:00
Florian Grandel
137a7edd6e drivers: ieee802154: nRF5: TX timestamp now refers to start of PHR
Based on the standard based definitions given in previous commits, the
TX timestamp used for timed TX now refers to the start of PHR. As OT
continues to calculate timestamps based on a "start of SHR" definition,
the duration of the PHY specific SHR is added in the OT adaptation layer
to make up for this OT quirk.

Fixes: #59245

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-16 17:06:16 +02:00
Florian Grandel
7db0184e1b drivers: ieee802154: nRF5: remove RX PHR offset workaround
Builds upon the newly introduced nrf_802154_phr_timestamp_get() function
to calculate RX timestamps according to the timestamp definitions
introduced in earlier commits and removes the prior workaround to
calculate the start-of-frame message timestamp point.

Fixes: #59245

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-16 17:06:16 +02:00
Florian Grandel
eacec3dad2 modules: openthread: radio: encapsulate OT 32-bit timestamp
OT does not have 64 bit timestamp support. This is a limitation of OT
and not of the IEEE 802.15.4 driver API. Therefore any workaround
related to such OT idiosyncracies should be encapsulated inside the OT
adapatation layer.

This change moves the OT-specific conversion of OT 32 bit timestamps to
Zephyr 64 bit timestamps into the OT adaptation layer.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-16 17:06:16 +02:00
Mateusz Sierszulski
171285140c drivers: watchdog: Add Ambiq wdt driver
This commits add watchdog driver for Apollo4 SoCs

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-08-16 13:03:33 +02:00
Fabian Blatz
2e2163c1bc modules: lvgl: Move gluecode back to zephyr main repo
Moves back the module specific gluecode into the main repository

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2023-08-16 10:57:12 +02:00
Manuel Argüelles
298f028d20 soc: nxp_s32: rename family to SOC_FAMILY_NXP_S32
Rename NXP S32 device's family to SOC_FAMILY_NXP_S32 to avoid ambiguity.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-16 10:21:26 +02:00
Manuel Argüelles
acbdf1f53c modules: rename S32 to NXP_S32
Rename module from `S32` to `NXP_S32` to avoid ambiguity.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-08-16 10:21:26 +02:00
David Brown
3b3e28aeda 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-08-10 08:11:59 +00:00
Natalia Pluta
76bb1d7453 modules: hal_nordic: Add nrfx specific drivers logging Kconfig
This commit introduces Kconfig symbols for enabling logging
for each nrfx drivers in Zephyr.

Example Usage:
To enable logging for the NRFX ADC driver, add the following
line to the project's configuration file (prj.conf):
CONFIG_NRFX_ADC_LOG=y

The purpose of this change is to enable selective logging
in Zephyr for specific nrfx drivers.

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-08-08 12:34:19 +00:00
Natalia Pluta
764466a6da modules: hal_nordic: nrfx: Add zephyr to nrfx logging symbols mapping
A Kconfig symbol mapping is necessary to enable logging for specific
nrfx drivers in Zephyr, allowing the association of these symbols with
their corresponding nrfx-specific symbols.

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-08-08 12:34:19 +00:00
Maciej Sobkowski
9bc3ee67be drivers: counter: Add Ambiq counter driver
This commit adds Ambiq counter driver for Apollo4p SoCs.

Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-07 16:12:58 +02:00
Florian Grandel
6262304125 tracing: segger-sysview: conf include fix
The Zephyr-specific Segger SystemView configuration was not used as
the same file was available inside the external Segger module with
higher import priority.

Fixes the regression by moving the SystemView configuration to the same
place in the external module where RTT configuration already resides and
thereby creates a canonical include path to avoid further regressions of
the same kind.

Fixes: #61133

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-08-06 07:44:06 -04:00
Maciej Sobkowski
29e0186aa4 modules: add Kconfig for Ambiq HAL module
This commit introduces the Ambiq HAL module required for the
Ambiq Apollo4 Plus SoC support.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2023-08-04 10:48:58 +02:00
David Ullmann
bcc7499684 drivers: rt6xx ctimer pwm driver
using ctimer to implement pwm api
Signed-off-by: David Ullmann <davidu@meta.com>
2023-08-03 12:39:06 -04:00
Aron Lander
6f62768492 modules: Updated Percepio TraceRecorder to version 4.8.0.hotfix2
This version introduces support for the syscalls extension,
which greatly reduces the amount of bandwidth being used
for tracing syscalls.

Signed-off-by: Aron Lander <aron.lander@percepio.se>
2023-08-03 07:28:12 -04:00
Robert Lubos
d5f6fe484a modules: mbedtls: Build psa_crypto_slot_management conditionally
TFM redefines functions from mbed TLS's psa_crypto_slot_management.c,
therefore that file should not be included in build when TFM is enabled.
Otherwise, the linker reports an error about redefined functions like
psa_open_key() etc.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-02 10:38:11 +02:00
Robert Lubos
561f220686 modules: uoscore-uedhoc: Make the library build with TFM
Following the same pattern as in the other libraries/samples, add TFM
include directory explicitly when building uoscore library, to mitigate
the problem of redefined header files in TFM. When TFM is enabled,
headers from TFM should be used, not mbed TLS ones.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-02 10:38:11 +02:00
Robert Lubos
f602c72773 modules: uoscore-uedhoc: Update to the latest version
Update uoscore-uedhoc repository to the latest revision.
Align uoscore tests with the API changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-02 10:38:11 +02:00
Robert Lubos
c605c4930b modules: mbedtls: Fix dependencies with PSA crypto enabled
After an update to mbed TLS 3.3.0, dependencies with
CONFIG_MBEDTLS_PSA_CRYPTO_C enabled got affected.

mbed TLS in its build_info.h file, enables MBEDTLS_PK_WRITE_C config
under the hood. MBEDTLS_PK_WRITE_C has a dependency to
MBEDTLS_ASN1_WRITE_C which wasn't reflected anywhere.

Therefore, update Kconfig.tls-generic to enable
CONFIG_MBEDTLS_PK_WRITE_C automatically, when PSA crypto is enabled, to
reflect mbed TLS configuration pattern. Additionally, enable
MBEDTLS_ASN1_WRITE_C automatically, when PK write is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-08-02 10:38:11 +02:00
Arkadiusz Balys
f16f1ae819 net: openthread: Initialize PSA crypto when random is initializing
The psa_generate_random function requires the psa_crypto_init call
before the usage. This can be ensured by calling the psa_crypto_init
in otPlatCryptoRandomInitfunction.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2023-08-01 08:23:52 +00:00
Christopher Friedt
1f278d9ae4 thrift: add temporary Mutex implementation
The Thrift library has its own abstraction for mutexes, which
normally just a wrapper around `std::mutex` using the PIMPL
idiom (pointer-to-impl).

Since Zephyr does not yet support `std::mutex`, a workaround
was added in Zephyr that was essentially no-op, and actually
the PIMPL idiom made it quite easy to do that. However,
pretending there is no synchronization requirement is not a
solution for it.

We can't yet just use a `struct k_mutex` yet, because we
don't yet support userspace, but for now we can fake a mutex
interface with a spinlock.

We hope to eventually drop this workaround entirely and just
support `std::mutex`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-29 10:26:56 -04:00
Dong Wang
4e3ec6207d ish: add module Kconfig for Intel HAL
Add a new Kconfig option to enable the build of Intel HAL and select
it always for ish SoCs

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2023-07-28 17:49:09 +02:00
Florian Grandel
a4cd5cee40 drivers: ieee802154: consistent high res timestamps
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps

All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.

The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.

For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).

Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g.  UTC, TAI, PTP, NTP, ...).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-07-28 09:06:35 +00:00
Christopher Friedt
16e1526866 tests: thrift: check for channel closure before throwing
Previously, the binary protocol variant of ThriftTest would fail
consistently in CI for `qemu_x86_64` with the message below.

```
E: failed to poll fds -1, -1: 1
```

Note: 1 corresponds to EPERM

The root cause of this is that we do not yet have support for
standard synchronization primitives in C++, and there is
slightly racey behaviour in thrift until we do have support
for standard synchronization primitives.

With the addition of dynamic thread stacks, conforming pthreads,
and some additional work in the toolchain area
(re gthr-posix.h), we should soon be able to enable proper
synchronization primitives.

This change is a temporary workaround but solves the
test failure (which would occur even when tests all passed).

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-07-28 08:36:29 +00:00
Andriy Gelman
23b6e4f507 drivers: pwm: Add driver for xmc4xxx using ccu4 module
Adds driver for pwm on xmc4xxx using Capture Compare Unit 4 (CCU4)
module. There are four CCU4 with each one having four channels
Thus it's possible to have up to 16 pwm output signals. The output of
each channel can only be connected to a specific port/pin. The possible
connection and gpio configurations are defined using pinctrl.

The CCU4 module also has a capture mode. Capture support will be added
in the future.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-07-26 15:09:41 +02:00
Marek Matej
6b57b3b786 soc: xtensa,riscv: esp32xx: refactor folder structure
Refactor the ESP32 target SOCs together with
all related boards. Most braking changes includes:

- changing the CONFIG_SOC_ESP32* to refer to
  the actual soc line (esp32,esp32s2,esp32s3,esp32c3)
- replacing CONFIG_SOC with the CONFIG_SOC_SERIES
- creating CONFIG_SOC_FAMILY_ESP32 to embrace all
  the ESP32 across all used architectures
- introducing CONFIG_SOC_PART_NUMBER_* to
  provide a SOC model config
- introducing the 'common' folder to hide all
  commonly used configs and files.
- updating west.yml to reflect previous changes in hal

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Jordan Yates
a2395e8d5b mbedtls: add MBEDTLS_AES_FEWER_TABLES control
Add a kconfig symbol to control the mbedtls option
`MBEDTLS_AES_FEWER_TABLES`. 6KiB is a not insignificant ROM/RAM savings,
and the extra arthmetic is quite reasonable.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-07-25 16:44:16 +02:00
Joakim Andersson
648355cb69 tfm: Fix help text for crypto key module functionality
Fix help text for crypto key module functionality, which is included
in the source file of crypto_key_management.c source file.
The crypto_key.c source file contains generic code that is always
included.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-07-25 09:15:32 +02:00
Fabio Baltieri
0bfe3cc2d0 Revert "manifest: Upgrade to trusted-firmware-m 1.8.0"
This reverts commit a30dbd5fe8.

It's causing some breakage in the main CI run.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-22 10:56:52 -04:00
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