Commit graph

52060 commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada 7eba8c403d Bluetooth: controller: Add Kconfig for maximum Broadcast ISO PDU length
Added Kconfig option to configure the maximum Broadcast and
Synchronized Receiver ISO PDU length.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-07 13:10:11 +02:00
Marcin Niestroj eb78d70805 drivers: wifi: esp: stop using pkt->work in TX path
Usage of k_work object from within net_pkt results in undefined behavior
in case when net_pkt is deallocated (by net_pkt_unref()) before work has
been finished.

Use per socket k_work object (sock->send_work) to submit send work and
put net_pkt objects onto k_fifo (sock->tx_fifo). Add a helper function
esp_socket_queue_tx() for that, which will make sure that packets are
enqueued only when send work handler will be successfully submitted (so
that all packets are consumed/dereferenced).

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-05-07 13:10:01 +02:00
Torsten Rasmussen b671cf7279 cmake: tfm: support for custom CMake args when building TF-M
This commit allows a subsystem to specify additional CMake flags to be
given to the TF-M build.

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

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

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-07 13:09:54 +02:00
Aymeric Aillet 8b285fc104 boards: arm: rcar_h3ulcb: Enable UART
Enable UART driver for Renesas R-Car H3 boards.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00
Aymeric Aillet 8eed20db0c dts: arm: rcar_gen3_cr7: Add SCIF support to DTS
Add SCIF bus initial support to Renesas R-Car SOC series.
SCIF1 is used as main serial and shell output on R-Car H3 board.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00
Aymeric Aillet c5a057bc63 drivers: serial: add Renesas R-Car driver
This patch add support for polling based UART
on the Renesas R-Car SCIF (Serial Communication Interface
with FIFO)

This hardware block can be found on various Renesas R-Car
SoC series.

It allows to get console on R-Car Gen3 H3ULCB board.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00
Aymeric Aillet 9a90dffc3c dts: bindings: serial: add Renesas R-Car SCIF
Renesas has Serial Communication Interface with
FIFO (SCIF) hardware block which allow asynchronous and
synchronous serial communication. The SCIF has 16-stage FIFO
buffers separately for transmissions and reception.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2021-05-07 13:08:48 +02:00
Thomas Ebert Hansen 5f43fb3463 Bluetooth: controller: Make number of done events vendor configurable
The amount of needed done events changes when using the "must expire"
logic.

Make the amount vendor configurable (via ull_vendor.h)

Defaults to the original amount of 3.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
2021-05-07 13:08:27 +02:00
Krzysztof Chruscinski 6a5d828948 drivers: serial: nrf_uarte: Conditionally call PPI driver
Avoid calling PPI driver when enhanced poll functionality is
disabled. Fixing a case when driver failed to compile when
enhanced poll is disabled for all instances.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-07 12:11:32 +02:00
Rubin Gerritsen f05ea6711a tests: bluetooth: advx: Support multiple sets and identies
This will exercise caching of the HCI_LE_Connection_Complete
event in the host.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-05-07 12:15:20 +03:00
Rubin Gerritsen 98321c61fb bluetooth: host: Allow concurrent advertising with multiple ids
The HCI specification creates additional complexity to allow this
configuration:
 - When a connection gets established, we need to know which
   identity the HCI_LE_Connection_Complete event corresponds to.
 - The identity is a property of the advertising set.
   Therefore we need the advertising handle.
 - The advertising handle is part of the
   HCI_LE_Advertising_Set_Terminated event and is not part of
   the HCI_LE_Connection_Complete event. Therefore
   the information of both events needs to be combined.

By spec the LE_Connection_Complete comes first. Therefore we cache
this event until the identity is available.
The event is only cached when a connection gets established as
that is the only case where we need to resolve the identity.

As the caching requires more resources, it is only enabled if the
application requires multiple advertising sets and multiple
identities.

The host maps the HCI_LE_Advertising_Set_Terminated event with
the HCI_LE_Connection_Complete event by comparing the connection
handles.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-05-07 12:15:20 +03:00
Martí Bolívar 6b15ad1fd5 dts: nrf52811: fix indendation in dtsi
Commit 233149eec5 moved flash sram nodes
under /soc for various nordic ICs, but the indentation isn't right for
52811. Fix it.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-07 09:27:21 +02:00
Martí Bolívar c8e8d1d109 soc: nrf52811: add missing instance 3 check
spi1 and i2c0 share peripheral ID number 3.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-07 09:27:21 +02:00
Martí Bolívar 824f7224d5 soc: nrf52811: fix enabled instance 0 check
Similar fix to that for the 52805.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-07 09:27:21 +02:00
Martí Bolívar 8765a6b041 soc: nrf52805: fix enabled instance 0 check
UART0, TWI0, and SPI0 have different peripheral IDs (2, 3, and 4
respectively) on this SoC and therefore should not be mutually
exclusive to use.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-07 09:27:21 +02:00
Jamie McCrae f4350a9303 boards: arm: Add Laird Connectivity BL5340 DVK platform
This adds initial support for the Laird Connectivity BL5340
development kit hardware

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-07 09:06:27 +02:00
Arvin Farahmand 2de6bf91d5 west: sign.py: fix logic bug
Fix bug where if `CONFIG_BOOTLOADER_MCUBOOT` is set sign.py incorrectly
shows warning `CONFIG_BOOTLOADER_MCUBOOT is not set to y...`.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-05-06 19:49:52 -05:00
Dominik Ermel 56c22355e4 samples/subsys/mgmt/smp_svr: Fix shell mgmt not working via serial
The Kconfig option SHELL_BACKEND_SERIAL had been defaulting to y,
causing shell to block mcumgr from processing serial input.

Fixes: #34670

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-05-06 16:35:14 -05:00
Kumar Gala 6d5d783a49 samples: mgmt: osdp: Fix compile issue
With the change to use GPIO_DT_SPEC_GET_OR a number of platforms
failed to build these samples.  This was due to the GPIO drivers not
being enabled by default.  Add CONFIG_GPIO=y to the prj.conf to fix
the issue.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-06 17:33:58 -04:00
Kumar Gala b579c12714 tests: devicetree: exclude hsdk platforms
The devicetree test will not link the hsdk platforms as
when CONFIG_GPIO=y this enable CONFIG_I2C as the board utilizes
a GPIO expander over I2C.  So we exclude building this test on
the hsdk platforms.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-06 17:33:58 -04:00
Kumar Gala b7e908707f boards: arc: hsdk: Enable CY8C95XX if GPIO
The board has an I2C GPIO expander on it.  A number of samples utilize
LEDs on GPIOs for testing purpose so it makes sense to enable the GPIO
expander (CONFIG_GPIO_CY8C95XX) driver when CONFIG_GPIO has been
enabled.  We have to also enable I2C since the expander is connected
over an I2C interface.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-06 17:33:58 -04:00
Marc Herbert 4ea66b32fa git.cmake: git describe --always to support shallow clones
There's no reason for BUILD_VERSION to work only when there are git
tags.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-06 16:30:15 -05:00
Marc Herbert 654a2f245d git.cmake: print BUILD_VERSION always, simplify and fix error message
In an ideal world, good CIs make it very clear what exact git versions
are getting built. However:

- Zephyr is (re-)used in many projects and they cannot all be expected
  to have ideal CI.

- CI with multiple git repos is complex (#34713) which makes the world
  an even less ideal place: much more chance for some git versions to be
  missing.

- Many developers don't realize that Github and other CIs do not test
  pull/12345/head but the moving target pull/12345/merge instead. While
  not resolving pull/12345/merge completely (maybe another day), this
  commit provides at least evidence that pull/12345/head is NOT the
  commit tested.

So the addition of the following line in the logs is a very small price
to pay that can save enormous amounts of time when trying to understand
some obscure build failures.

-- BUILD_VERSION=zephyr-v2.5.0-2957-g6230b5bb66bc

Note this obviously does not provide any git information when
BUILD_VERSION is overriden but it does not hurt either in this case:
knowing BUILD_VERSION was overriden is also useful.

The "BUILD_VERSION is left undefined" message was just wrong in
the (unlikely) case `git describe` printed something while also
failing. Remove it; it's so much simpler to just print $BUILD_VERSION
and give the direct, unfiltered information.

Note this simplification is also a partial revert of 1b80f00f56
which threw the entire git warnings "baby" with some obscure duplicate
1.13.0 "bathwater" that is not relevant any more and that I guess barely
anyone noticed even at the time.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-06 16:30:15 -05:00
Ioannis Glaropoulos 89ec3d82ad tests: arm_thread_swap_tz: add tfm tag
Add the tfm tag to the arm_thread_swap_tz test,
since the test is running with TF-M by default.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-06 22:17:35 +02:00
Ioannis Glaropoulos 14d7fab4a0 samples: psa_leve1: do not re-initialize NS interface
TF-M NS interface is initialized by the TF-M module
code, so it does not need to be re-initialized in the
sample code.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-06 22:17:35 +02:00
Ioannis Glaropoulos a4a1123e80 manifest: update trusted-firmware-m to latest upstream
Synchronize TF-M to the latest ustream main branch.
This brings TF-M support for BL5340 Dev Kit in Zephyr.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-06 22:17:35 +02:00
Anas Nashif 01c1bcf724 ci: disable identifier_length scripts for now
This rules is not working as expected, so remove it for now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-06 14:45:03 -04:00
Erwan Gouriou 47c9ac5c69 drivers/gpio: stm32: Don't perform clock gating with VddIO2
In some cases, VddIO2 is required to get port working.
Looking in details, VddIO2 should be set on start up
but not toggled on/off in PM use cases.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Erwan Gouriou 125d82a84c tests/drivers: gpio: Add support for stm32l562e_dk
Required for board testing


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Erwan Gouriou 46f33bcd3e drivers/pinmux: stm32: Enable PM_DEVICE_RUNTIME services
Add PM_DEVICE_RUNTIME support

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Erwan Gouriou 13de6e3b24 drivers/gpio: stm32: Enable PM_DEVICE services
Implement power mgmt hooks to support PM_DEVICE and
PM_DEVICE_RUNTIME.
In case of PM_DEVICE_RUNTIME, clock is requested for bank writes
so it is requested before configuring and released only if pin
is not configured as output.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Erwan Gouriou c730603332 samples/boards: stm32: Add low power blinky sample
This sample demonstrates a low power blinky application.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Bradley Bolen 3b6707f140 arch: arm: aarch32: Use mpu headers from common aarch32 location
The mpu headers moved in order to support the Cortex-R mpu in later
commits.  Use the new locations.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-05-06 19:39:09 +02:00
Bradley Bolen 2076131543 arch: arm: aarch32: mpu: Move mpu header files up one level
Prepare for Cortex-R MPU support by moving the MPU headers to the
aarch32 common directory.  Add compat headers to ease the transition for
the Cortex-M external modules.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-05-06 19:39:09 +02:00
Bradley Bolen 95a7e71661 arch: arm: aarch32: Move mpu code up a level
Move the mpu code to the common aarch32 directory in preparation for
Cortex-R mpu support

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-05-06 19:39:09 +02:00
Morten Priess b8aae321a1 Bluetooth: controller: ISO resume ticker in ULL
Added function ull_conn_iso_resume_ticker_start to enable LLL ISO
peripheral/central to start the one-shot resume ticker.
At timeout the common lll_resume handler is called, and based on the
LLL state, the peripheral/central is able to resume the CIG event.

The resume acts exactly like a normal event resume from the prepare
pipeline, with the exception that the LLL must provide specific
lll_event instances.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-05-06 13:23:00 -04:00
Vinayak Kariappa Chettimada 03a285b9d5 Bluetooth: controller: Add LE Read Buffer Size v2 support
Add LE Read Buffer Size v2 support in the controller
implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-06 13:22:02 -04:00
Vinayak Kariappa Chettimada 44e9163484 Bluetooth: controller: Add ISO Buffer size Kconfig dependency
Add BT_CTLR_ISO_TX_BUFFER_SIZE depends on Broadcast ISO
and/or Connected ISO feature being enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-06 13:22:02 -04:00
Vinayak Kariappa Chettimada 63a68e6ff4 Bluetooth: HCI: Rename LE Read Buffer Size v2 struct members
Rename LE Read Buffer Size v2 struct members to related to
Bluetooth Specification use Length and Number terminology.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-06 13:22:02 -04:00
Vinayak Kariappa Chettimada 8db6941b1a Bluetooth: controller: Minor conditional compile comment correction
Corrected a conditional compile comment and added some
newlines.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-06 13:22:02 -04:00
Marcin Niestroj b4854debd1 drivers: wifi: esp_at: rename driver from esp
Recently WiFi ESP32 driver (utilizing WiFi radio in ESP32 SoC) was
introduced into drivers/wifi/esp32/ and it already caused confusion as
there was existing drivers/wifi/esp/ directory for ESP-AT
driver (utilizing external WiFi chip, by communicating using AT commands
from any serial capable platform). So question has arisen whether it is
good to merge both, while they are totally different drivers.

Rename ESP-AT driver to be placed in drivers/wifi/esp_at/, so that it is
easier to figure out difference between "esp32" and "esp_at" just by
looking at driver name. Rename also DT compatible and all Kconfig
options for the same reason.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-05-06 13:21:39 -04:00
Glauber Maroto Ferreira 84f599b228 esp32: i2c: fix: fixed error status handling
Fixed error status handling on ESP32's I2C.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-05-06 13:20:45 -04:00
Lingao Meng 4640e6e927 Tester: Add bsim auto test for bluetooth mesh provision
Add auto test for bluetooth mesh provision procedure

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-05-06 13:20:18 -04:00
Vinayak Kariappa Chettimada ffb3242e4b Bluetooth: controller: Accumulate latency on aborting event in pipeline
Only accumulate latency when event has not been prepared but
has been aborted while being enqueued in pipeline.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-06 19:13:31 +02:00
Marcin Niestroj 1beb95938e smp: shell: consume all pending buffers in smp_shell_process()
smp_shell_process() is called only once after receiving new bytes over
shell. If multiple MCUMGR frames were received over UART one after the
other, then calling smp_shell_process() resulted in consuming only the
first one. All subsequent frames were not processed unless there was
some more RX traffic.

Process received frames in smp_shell_process() in a loop until there is
no frame left. This will make sure that received packets are not stalled
waiting for more RX traffic to trigger processing again.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-05-06 19:13:20 +02:00
Jared Wolff 779439550b boards: arm: nrf: Adding updated Circuit Dojo board definitions.
Adding the Circuit Dojo nRF9160 Thing Plus device tree definitions.
Both secure and non secure targets.

Adding LIS2DH to nRF9160 Feather
definitions. Updating flash to W25Q32JV.

Signed-off-by: Jared Wolff <hello@jaredwolff.com>
2021-05-06 18:38:57 +02:00
Jamie McCrae 498f964bd2 boards: bl654_sensor_board
Add BL654 Sensor Board files

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-06 18:36:02 +02:00
Greg Leach 70361f579b boards: Add Laird Connectivity BT6x0
Adds support for the BT6x0, a multi sensor platform.

Signed-off-by: Greg Leach <greg.leach@lairdconnect.com>
2021-05-06 18:34:34 +02:00
Pavel Vasilyev a335c755a7 Bluetooth: Mesh: Add option to include bt name in scan rsp
Sometimes it may be needed to know device name when proxy feature is
enabled.

This commit adds an option to include device name in scan response.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-05-06 19:20:00 +03:00
Paul Sokolovsky 39b0423e7a tests: lib: mem_alloc: Fix up conditions for "no_mem" testcases
These should run for minlibc configured with
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=0. In all other cases normal
testsuite should run.

How preprocessor #if's were put previously, some configurations,
e.g. prj_newlib.conf, had the testsuite completely skipped.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2021-05-06 18:19:38 +02:00