Commit Graph

52086 Commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada 32d9b68944 Bluetooth: controller: Implement LE Set Host Feature Command
Added implementation of HCI LE Set Host Feature command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-07 15:25:18 +02:00
Vinayak Kariappa Chettimada ed59ceba62 Bluetooth: controller: Replace use if LL_FEAT with ll_feat_get()
Replace the use of LL_FEAT define with ll_feat_get() so that
feature set value can be updated at runtime with host
feature bit values.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-07 15:25:18 +02:00
Hake Huang c1080f3ceb adc: adc dma driver
add dma support to adc driver
add HW trigger dma support
using new dma api to request dma channel

tested on frdm_k82f and frdm_k64f

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang d7edd375bd adc: add sim opt for adc hw trigger
add sim opt setting for adc hw trigger

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang c1a17cfd89 test: add adc_dma test application
add adc_dma test application
enable periodic_trigger flag for adc edma

enable for frdm_k64f and frdm_k82f

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang 77f27ac158 test: update adc_api case to support frdm_k82f
add frdm_k82f adc settings

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang d4c0c95a1c adc: add adc edma support in frdm_k82f
adc edma and pit support in frdm_k82f

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang 0062372af1 adc: add soc config for adc
update k8x series to support edma and pit

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang b336579cbb dts: add edma related in dts bindings
add dts bingings for dma usage
add dts support for adc with edma and hwtrigger
add a periodic_trigger feature to dts

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Emil Gydesen 8192623263 Bluetooth: Audio: BSIM test suite for VCS
Adds a Babblesim test suite for the volume control service
and client, that exercises the entire API and most of the
VCS functionality.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-05-07 15:02:41 +02:00
Emil Gydesen 82a32f5ca5 Bluetooth: Audio: Volume Control Service and client
This commit implements the volume control service (VCS) and
client, The implementation supports and uses the
Audio Input Control Service (AICS) and
Volume Offset Control Service (VOCS) secondary services.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-05-07 15:02:41 +02:00
Vinayak Kariappa Chettimada a9e900dbfd Bluetooth: controller: Fix scheduling stall in BT_CTLR_LOW_LAT feature
Fix radio event scheduling stall when using BT_CTLR_LOW_LAT
feature.

Performing a Connection Update Procedure on an ACL
connection while simultaneously having continuous scanning
causes the ACL connection to drop in nRF51 series which uses
BT_CTLR_LOW_LAT by default.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-05-07 15:02:13 +02:00
MORGER Patrick 0e1d16bf03 drivers: sensors: smart-battery with SBS 1.1 compliant fuel gauge
Implementation of a SBS 1.1 compliant fuel gauge driver

Signed-off-by: MORGER Patrick <patrick.morger@leica-geosystems.com>
2021-05-07 07:55:23 -05:00
Krzysztof Chruscinski 4a382ae2ce tests: kernel: threads: no-multithreading: Add more platforms
Add more platforms (including non-emulators) on which test runs.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-07 14:40:27 +02:00
Krzysztof Chruscinski 22ae43f0a6 tests: arch: arm: arm_no_multithreading: Add physical platforms
Add 2 nordic boards on which no multithreading test is
passing.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-07 14:40:27 +02:00
Ioannis Glaropoulos afb73942c1 doc: release: add note for new TF-M boards in v.2.6.0
Add a release note entry for the new Zephyr boards
supported in TF-M in Zephyr v.2.6.0.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-07 13:33:43 +02:00
Ioannis Glaropoulos cc9431c41c doc: release notes: add Zephyr v2.6.0 release notes for TF-M
Add release note entries for TF-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-07 13:33:43 +02:00
Watson Zeng 01815af28e board: qemu_arc: skip trigger_fault_divide_zero test case
qemu arc has limited support for DIV/REM, no DIVZERO exception
throw, so we need to skip trigger_fault_divide_zero test case.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-05-07 13:15:13 +02:00
Watson Zeng b2aab9f0e8 board: qemu_arc: disable test: tests/kernel/mem_protect/mem_protect
This test fails on qemu_arc_{em|hs} consistently,
due to bug in quem_arc, details:
https://github.com/foss-for-synopsys-dwc-arc-processors/qemu/issues/14.
To get clean results we need to disable this test until the
bug is fixed and fix gets propagated to new Zephyr-SDK.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-05-07 13:15:13 +02:00
Watson Zeng e0af111d33 board: qemu_arc: fix cpu frequency to 10Mhz
we have set SYS_CLOCK_HW_CYCLES_PER_SEC to 10000000,
so we need to set cpu.freq_hz=10000000 too.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-05-07 13:15:13 +02:00
Watson Zeng 6a7982ff10 arc: qemu: enable MPU
Enable MPU for arc qemu.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2021-05-07 13:15:13 +02:00
Johann Fischer 85a9e04aa2 doc: release-notes-2.6: add note about USB HID class API change
Add release note about USB HID class API change.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-05-07 13:14:47 +02:00
Johann Fischer 8999c30cee usb: hid: remove get_protocol/set_protocol from USB HID class API
The USB HID class API offers the possibility to register callbacks
for Get/SetIdle, Get/SetProtocol to the application.
Rules for these callbacks are neither obvious nor documented.

This patch remove this possibility to register Get/SetProtocol
and Get/SetIdle callbacks for the following reasons:

The possibility to call unknown application code while processing
control requests should be avoided or reduced to a minimum.

The Get/SetProtocol callbacks are redundant and do not provide any
additional value since the way to inform the application
about the change of the protocol exists via the callback
hid_protocol_cb_t protocol_change.

The core provides implementation to handle Get/SetIdle requests and
on idle reports. If this is not suitable in any way then the application
should implement everything itself.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-05-07 13:14:47 +02:00
Asger Munk Nielsen 29006bd6fb Bluetooth: Controller: ISO adaptation layer
Improves error handling and makes ISO adaptation layer
independent of CIS.

Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
2021-05-07 13:14:31 +02:00
Dong Wang 7989302e6a interrupt_controller: ioapic: support more device power states
do nothing when enter or resume from DEVICE_PM_LOW_POWER_STATE

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2021-05-07 13:11:14 +02:00
Aurelien Jarno 0ede57ee52 modules: stm32: Update HAL to fix SPI low power consumption
Update the STM32 HAL to fix the SPI pin configuration in order to reduce
power consumption in STOP mode.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-05-07 13:10:23 +02:00
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