Commit graph

1112 commits

Author SHA1 Message Date
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
TOKITA Hiroshi
2e3cfec25d modules: Add option for enabling HAL debug functions
Add GD32_DBG_SUPPORT options to enable HAL debug functions.

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

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

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

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

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

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

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

Fixes #49960.

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

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

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

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

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

Fixes: #45304

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Automated using:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes #43887.

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

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

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

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

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

Hence removing this feature in CMake.

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

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

Update the maintainers file to reflect this change.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes: #45303

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-04-19 11:47:40 +02:00