Commit Graph

56856 Commits

Author SHA1 Message Date
Damian Krolik 726656dda5 net: openthread: Add crypto backend based on PSA API
OpenThread has lately got an option to provide a custom
crypto backend that replaces the default, based on mbedTLS
API. Implement a backend based on ARM PSA crypto API that
is better suited for applications willing to take advantage
of the ARM trust zone technology.

Add Kconfig option: OPENTHREAD_CRYPTO_PSA_ENABLE which
enables that backend.

Also, another Kconfig option:
OPENTHREAD_PLATFORM_KEY_REFERENCES_ENABLE, implied by the
former, which enables usage of key references instead of
literal keys in OpenThread. It will eventually allow
OpenThread applications to keep sensitive data such as
encryption keys in the secure storage, accessible from the
secure world only.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2021-10-17 11:51:38 -04:00
Joakim Andersson 70a9bc0e57 modules: tfm: Add configuration for TF-M log options
Add Kconfig options for configuring TF-M log options.
 - Partition log level
 - SPM log level
 - Exception info dump

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

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

Leftover from: 583d5a6db3

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-10-17 11:50:53 -04:00
Daniel Baluta 193ffabd0b west.yml: Update SOF revision
Update SOF module revision to latest main to fix
SOF support for i.MX8MP with Zephyr.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-17 11:50:16 -04:00
Andrzej Głąbek 40329881bf soc: nrf52: Add Kconfig option for enabling REG0 DC/DC converter
Add a Kconfig option, similar to the one that is already available
for nRF5340, that allows enabling the REG0 (VDDH) DC/DC converter
in nRF52840. Make use of this option in Nordic boards: nRF52840 DK
and nRF52840 Dongle.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-10-17 11:49:26 -04:00
Kumar Gala 3c6b8e5736 devicetree: Add mailbox bindings
Add general mboxes, mbox-names to base.yaml to be utilized by any
clients that use mailboxes.

Additionally add mailbox-controller.yaml for common properties shared
by all mailbox controller devices.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-10-17 11:47:59 -04:00
Julien Massot a35e046fb2 runners: openocd: prefer extended-remote for gdb connection
Instead of deprecated 'target remote'.
Fix:
Warn : Prefer GDB command "target extended-remote :3333"
instead of "target remote :3333"

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-10-17 11:47:36 -04:00
Julien Massot e4fac0e261 runners: openocd: gives configuration file before initialization
#38557 Reordered the argument for openocd, but we should not try
to call the init command before giving the board configuration
file stored in 'self.cfg_cmd'.

Move back this variable to it's original position.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-10-17 11:47:36 -04:00
Julien Massot 1cac55cf3a runners: openocd do not try to iterate over gdb_init if None
Commits 49bcc08033 introduced
a possible None object 'gdb_init', do not try to iterate over
this variable if it is a None object.

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
2021-10-17 11:47:36 -04:00
Josh Hansen ae4f68c16d drivers: dma: stm32 Fix for STM32F1 SoCs
Not all STM32 parts have at least 5 DMA interrupt vectors for DMA2. In
particular, some STM32F1 XL-density devices only have 4 DMA2 interrupt
vectors, with Channels 4 and 5 sharing the same vector. Added
#if DT_INST_IRQ_HAS_IDX(1, 4) to prevent compiler errors on these SoCs.

Signed-off-by: Josh Hansen <jhansen3141@gmail.com>
2021-10-17 10:58:39 -04:00
Maureen Helm 8302e5e21c soc: arm: Configure serial driver init priority for NXP SoCs
Configures the default serial driver initialization priority for NXP
SoCs to ensure that serial drivers initialize after clock control
drivers.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-17 10:58:09 -04:00
Maureen Helm ad1450510a drivers: serial: Refactor drivers to use shared init priority Kconfig
Refactors all of the serial drivers to use a shared driver class
initialization priority configuration, CONFIG_SERIAL_INIT_PRIORITY, to
allow configuring serial drivers separately from other devices. This is
similar to other driver classes like I2C and SPI.

The default is set to CONFIG_KERNEL_INIT_PRIORITY_DEVICE to preserve the
existing default initialization priority for most drivers. The one
exception is uart_lpc11u6x.c which previously used
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS.

This change was motivated by an issue on the frdm_k64f board where the
serial driver was incorrectly initialized before the clock control
driver.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-17 10:58:09 -04:00
Chris Reed 6d2b91461b arm: cortex-m: initialise ptr_esf in get_esf() in fault.c.
This was producing a -Wsometimes-uninitialized warning.

Signed-off-by: Chris Reed <chris.reed@arm.com>
2021-10-17 10:57:03 -04:00
Tom Burdick f523c336ef pm: Use stats subsys for tracking system states
Uses the stats subsys to provide simple but useful debugging stats for
power management state changes and timing.

Removes the no longer needed PM_DEBUG config option

Replaces the use of PM_DEBUG for a test clock output pin for mec1501 and
adds in its place an SoC Kconfig option to enable it.

Adds a STATS_SET macro for assigning a value to a stat group field

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-17 10:56:21 -04:00
Nicolas Pitre 46db2b491d lib/os/heap: option for optimizing for one heap size on 32-bit systems
The "small" heap is is way sufficient for most 32-bit systems.

Let's provide the option to have only one type of heap allowing for
smaller and faster heap code due to not having a bunch of runtime
conditionals based on the heap size.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-10-17 07:34:51 -04:00
Christopher Friedt b706316491 doc: release: 2.7: summarize major enhancements
This change adds a summary of major enhancements introduced
in v2.7.0 . There were so many it was difficult to narrow
them down!

Great work everyone!

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-16 06:33:17 -04:00
Chris Reed b0ad42428c fs: core: remove include of <sys/stat.h> from fs.c.
This include is not used at all by fs.c. Zephyr includes a minimal
sys/stat.h, but only for the minimal libc.

Signed-off-by: Chris Reed <chris.reed@arm.com>
2021-10-16 06:30:23 -04:00
Peter Mitsis 3ff549d1a2 doc: events: Add events documention
Adds documentation for event objects. Events are posted to event
objects. Threads may wait on an event object for a specified set
of events.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Peter Mitsis 10637afc00 tests: add event test code
Adds both kernel and user space test code for the events API.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Peter Mitsis ae394bff7c kernel: add support for event objects
Threads may wait on an event object such that any events posted to
that event object may wake a waiting thread if the posting satisfies
the waiting threads' event conditions.

The configuration option CONFIG_EVENTS is used to control the inclusion
of events in a system as their use increases the size of
'struct k_thread'.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Peter Mitsis fc12f69cd0 scripts: Resolve python check warnings
Resolves two pylist check warnings that recommend using 'in'.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-16 06:27:10 -04:00
Chris Reed ab4d69baf3 kernel: work_q: use flags_get() in work_delayable_busy_get_locked().
The k_work::flags field is not an atomic_t and would cause
-Wpointer-sign warning on some compilers. This function was the only
one in work.c to use atomic_get() so there is no benefit to atomicity.

Signed-off-by: Chris Reed <chris.reed@arm.com>
2021-10-16 06:23:46 -04:00
Peter Mitsis 60e780aa8e stats: Fix format specifier type
Fixes the format specifier type in a call to shell_printf().
Instead of printing with %x (which expects an unsigned int) for
an address, it is now using %p.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-15 12:15:35 -04:00
Henrik Brix Andersen 02fceed732 CODEOWNERS: take ownership of neorv32 specific files
Take ownership of all the neorv32 specific files (dts bindings, soc
implementation, drivers, and board definition).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen 3091bddafa tests: drivers: gpio: 1pin: exclude neorv32
The GPIO block of the NEORV32 contains fully independent inputs and
outputs (inputN is fully independent of outputN).

This scenario is not handled by the 1pin GPIO test case, so exclude the
neorv32 for now.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen 296ba9a7d0 tests: drivers: gpio: basic: add neorv32 test configuration
Add basic GPIO API test configuration for the NEORV32.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen 22c67bcfac boards: riscv: add basic neorv32 board definition
Add a basic board definition for the open-source NEORV32 RISC-V
compatible processor system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen b5d6f7f185 dts: riscv: neorv32: add gpio nodes
Add devicetree nodes for the NEORV32 GPIO device.

The GPIO port is 64 bits wide, but Zephyr only supports up to 32 bit
wide GPIO ports. The GPIO device is therefore handled as two Zephyr GPIO
devices with a nexus devicetree node mapping pins 0 to 31 to the device
handling the lower half, and pins 32 to 63 to the device handling the
upper half.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen 3e70c4fcc9 drivers: gpio: add neorv32 gpio driver
Add GPIO driver for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen 85963cbc02 dts: riscv: neorv32: add uart devicetree nodes
Add devicetree nodes for the NEORV32 UART devices.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen c6ada02210 drivers: serial: add neorv32 uart driver
Add UART driver for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Henrik Brix Andersen a281dbfb6d soc: riscv: privilege: add neorv32 processor suppport
Add support for the open-source NEORV32 RISC-V compatible processor
system (SoC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-15 09:46:53 -04:00
Alexander Wachter 0d97caffe6 doc: release-notes-2.7: Added CAN release notes
This commit adds the CAN specific release-notes for the 2.7
release.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-10-15 09:20:33 -04:00
Christopher Friedt 1ba74c8acc doc: release: 2.7: dns-sd service type enumeration
Added release note for DNS-SD Services Type Enumeration

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt c4b457ba2a doc: release: 2.7: remove duplicate IPM entry
Remove duplicate IPM entry.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt 3f76fbdda2 Revert "doc: release: 2.7: remove duplicate IPM entry"
This reverts commit fd5328d33a.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Christopher Friedt 2b9c484411 Revert "doc: release: 2.7: dns-sd service type enumeration"
This reverts commit 7fc77d906d.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-10-15 09:15:07 -04:00
Andrzej Głąbek 56162a48eb drivers: i2c: nrfx: Add implementation of i2c_recover_bus API function
Both nRF I2C drivers (i2c_nrfx_twi and i2c_nrfx_twim) perform the bus
recovery procedure in reaction to timeout (500 ms) of any requested
message transfer. Add implementation of the I2C API recovery function
in both these drivers so that it is also possible to execute this
procedure directly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-10-15 13:56:20 +02:00
Dennis Ruffer c714c78743 twister: Allow baud rates other than 115200
Fixes #38046
Document the changes in twister.rst
Add baud rate to debug message in twister
Add baud parameter to twister's add_device function
Set the twister baud rate from input parameters
Use 115200 as the default baud rate if not specified
Add baud to the hwmap-schema.yaml file
Add --device-serial-baud to twister arguments
Fix compliance issues
Fix mistake in parameter name from device-baud to device-serial-baud
Refactoring of the code in orded to simplify the logic
   and clear multiple definitions of the default baud rate.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Signed-off-by: Dennis Ruffer <daruffer@gmail.com>
2021-10-14 16:35:48 -04:00
Pavlo Hamov 18f26b843c drivers: wifi: esp32: fix memmory corruption
Size of data pointer for event revival must be at least sizeof
event queue item.
Update to send whole event (id + event)

Signed-off-by: Pavlo Hamov <p.hamov@venstar.com>
2021-10-14 16:35:17 -04:00
Tjerand Bjornsen 938e0e4966 net: lwm2m: Add default firmware update port
If a firmware update is fetched from a server, and no port number is set
in the URI (e.g. coap://example.com/fw_update), the client will try
to connect on the port specified by CONFIG_LWM2M_PEER_PORT.
If a port different from the peer port is to be used for firmware
update, this has to be set explicitly in the URI:
coap://example.com:5683/fw_update.

This fix adds CONFIG_LWM2M_FIRMWARE_PORT, which will be used when
fetching a firmware update without specifying the port number in the
URI.

Signed-off-by: Tjerand Bjornsen <tjerand.bjornsen@nordicsemi.no>
2021-10-14 16:34:48 -04:00
Andrei Emeltchenko 3f9d980f7c net: tcp: Remove unneeded declaration
Remove unneeded declaration and change include logic.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-10-14 16:34:23 -04:00
Andrei Emeltchenko 636c7b1677 net: tcp: Remove redundant TCP option definitions
Use the same TCP option definitions.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-10-14 16:34:23 -04:00
Jukka Rissanen fc5d46048d net: tcp2: Send our MSS to peer
Send our MSS to peer when sending SYN or SYN-ACK.

Fixes #30367

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-10-14 16:34:23 -04:00
Filip Kokosinski 3fff2550d0 samples/subsys/shell/shell_module: add board name command
This commit adds a new subcommand to the `demo` command that prints out
the name of the used board.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2021-10-14 16:33:42 -04:00
Krzysztof Chruscinski eb3375f47c shell: Add __printf_like to shell_fprintf
Add __printf_like modifier to validate strings used by shell.
Fixing warnings triggered by this change.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-14 16:32:19 -04:00
Pieter De Gendt 30cd046760 manifest: hal_nxp: Port lpi2c fix from mcux sdk
Update west manifest to port an upstream lpi2c fix to zephyr.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2021-10-14 16:31:41 -04:00
Diana Zigterman 5a8434585d NPCX: Correct ESPICFG fields
The parameters to FIELD() should be the position and size of each bit
field.  Correct the size of IOMODE and MAXFREQ.  Otherwise, the MAXFREQ
field is overwritten by the IOMODE update during espi_npcx_configure().

Signed-off-by: Diana Zigterman <dzigterman@google.com>
2021-10-14 14:30:58 -04:00
Gerard Marull-Paretas ad1dad1090 gitattributes: consider SVG files generated
SVG files are usually created or generated using editors, e.g. Inkscape.
Exclude them from stats/diffs to improve review process by marking them
as generated.

Ref. https://github.com/github/linguist/blob/master/docs/overrides.md

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-14 12:42:44 -04:00
Gerard Marull-Paretas 4addbe4d3d MAINTAINERS: add myself as a collaborator in a few areas
Added myself as a collaborator to the areas I frequently contribute or
review code. List includes:

- Display drivers
- Documentation
- Kscan drivers
- Sensor drivers
- Power management
- STM32 platform
- Pinmux/pinctrl drivers
- PWM drivers

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-14 12:15:18 -04:00