Commit Graph

57512 Commits

Author SHA1 Message Date
Robert Lubos 477c0d9499 tests: net: net_pkt: Verify unchecked net_pkt functions results
Some net_pkt functions in `test_net_pkt_headroom_copy()` did not have
their return values verified, causing coverity complains.

CID: 240661

Fixes #39841

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-02 22:27:21 -04:00
Bartosz Bilas d85465fb11 scripts: gen_relocate_app: check if argument matches
Check each line whether contains the correct pattern
${location}:${file} before splitting because it
turns out that script passes also compile
definitions added in project CMakeLists.txt such as:

add_compile_definitions(ABCD="XYZ")

which results in the build failure.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-11-02 22:26:41 -04:00
Henrik Brix Andersen 0acb38adf1 drivers: gpio: mcux: add drive strength flags support
Add support for setting high/low GPIO output drive strength.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-02 22:25:33 -04:00
Andrew Hedin 52c298e0e3 drivers: sensors: lis2dh: Add ability to read temperature
Allow user to read temperature from LIS2DH family of sensors.

Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
2021-11-02 22:23:39 -04:00
Wouter Cappelle 8cdc822954 dts: arm: Add devicetree files for STM32L010xB series microcontrollers
This PR adds the devicetree file for supporting the STM32L010xB mcu.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2021-11-02 22:21:45 -04:00
Erwan Gouriou 9f6246c325 drivers/disk: sdmmc_stm32: Add Hardware FC Kconfig option
Add a Kconfig symbol to enable use of SDMMC hardware flow control.
In specific cases, this feature could help to avoid FIFO ovderrun
and underrun errors.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-02 22:20:36 -04:00
Erwan Gouriou 5fb5b7fff8 dts: stm32: Add interrupts to "st,stm32-sdmmc" nodes
Add interrupts property to "st,stm32-sdmmc" nodes to enable
use of IT driven mode.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-02 22:20:36 -04:00
Erwan Gouriou 8bd5549021 drivers/disk: sdmmc_stm32: Convert driver to IT driven mode for r/w
Add IT driven read/write access.
2 new semaphores are added to protect IT driven procedures.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-11-02 22:20:36 -04:00
Marc Herbert 1ef19a8519 MAINTAINERS: add marc-hb to audio
Add myself to audio.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-02 15:52:29 -04:00
Tom Burdick 71c0cebac9 rddrone_fmuk66: Board docs for RDDRONE-FMUK66
Adds board docs and picture of board with all its great accessories

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-11-02 13:17:44 -05:00
Tom Burdick 73f343c51e board: Adds RDDRONE-FMUK66 board support package
Adds required LQ18 part number to the kinetis K66 series

Signed-off-by: Tom Burdick <tom.burdick@electromatic.us>
2021-11-02 13:17:44 -05:00
Jamie McCrae b100faf6e6 MAINTAINERS: Add myself to mcu manager as collaborator
Add myself to mcu manager as collaborator

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-11-02 18:15:22 +01:00
Dawid Niedzwiecki dc8d301fc9 i2c: tests: update i2c_api test
Add testing of the new i2c_get_config function to the i2c_api test.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-11-02 16:46:33 +01:00
Dawid Niedzwiecki 65277d4770 i2c: emul: Add get_config function
Add get_config function to I2C emulator.

Also update tests using I2C emulator to use i2c_get_config.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-11-02 16:46:33 +01:00
Dawid Niedzwiecki 51c3e0de79 i2c: npcx: Add get_config function
Add get_config function to NPCX I2C driver. The master mode is hardcoded
and get the speed from a controller.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-11-02 16:46:33 +01:00
Dawid Niedzwiecki 72486b6971 i2c: Add get_config to I2C API
Some applications need to get the current I2C configuration. Add a
proper callback to I2C API under Kconfig option not to change
applications that don't need this feature.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2021-11-02 16:46:33 +01:00
Robert Lubos e8f09b471e net: sockets: tls: Fix TCP disconnect detection in poll()
`ztls_socket_data_check()` function ignored a fact when
`mbedtls_ssl_read()` indicated that the underlying TCP connection was
closed. Fix this by returning `-ENOTCONN` in such case, allowing
`poll()` to detect such event.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-11-02 13:26:25 +01:00
Bartosz Bilas 50ec0461af scripts: gen_relocate_app: fix C0201 pylint warning
As pylint says "Consider iterating the dictionary directly
instead of calling .keys()" don't use .keys() method.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-11-02 13:26:09 +01:00
Bartosz Bilas 865ff22b3f samples: subsys: dfu: update URL of the MCUboot zephyr readme
Switch to the new MCUboot zephyr documentation URL
since the old one returns error 404.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-11-02 13:25:43 +01:00
Rubin Gerritsen 4af5b7efa5 Bluetooth: Host: Fix setting long adv data with long AD fields
Previously, if the AD field length was greater than the maximum
fragment size - 2 bytes, an out of bounds access would occur.

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

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2021-11-02 13:25:01 +01:00
Gerard Marull-Paretas b4f968cf9d doc: add a toctree with reference material
Add a new toctree with reference material, including:

- API docs (Doxygen)
- Kconfig options
- Devicetree bindings

Note that the toctree is rendered manually due to the limitations Sphinx
has when it comes to including relative URLs. Hardcoding absolute URLs
in toctrees is possible, but that means we'd need to update the toctree
on every release (to point to /version/ URL), and downstream users of
the documentation would have to manually patch the toctree with their
own URL. In order to make local builds work, version prefix is only
added if publish tag is provided.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-02 13:24:40 +01:00
Francois Ramu a1e7c4dbfa drivers: clock control disable AHB3 clock in stm32_clock_control_off
This commit is fixing the error on clock control for the AHB3
in the stm32_clock_control_off function.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:24:10 +01:00
Nicolai Glud 8773c31047 drivers: flash: the chosen_flash variable was not read properly
This fixes an issue with code relocation.

Signed-off-by: Nicolai Glud <nicolai.glud@prevas.dk>
2021-11-02 13:23:56 +01:00
Asbjørn Sæbø 3b44a6d4aa Bluetooth: Audio: CCID - updates for upmerge
Updates to the CCID module for upmerge to Zephyr main

- add bt_ prefix to the ccid_get() function, add explaining comment,
  use defined value for limit
- update copyright statement
- update Kconfig to current practice

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2021-11-02 13:23:42 +01:00
Asbjørn Sæbø c1f1b34c31 Bluetooth: Audio: Content Control ID module
This commit adds the content control ID (CCID) module from the
topic-le-audio branch.  This is required to the le-audio media control
files and call control files, which depend upon CCID.

The commit is a pure copy of the files and content in the
topic-le-audio branch, with the following exceptions:

- files are in bluetooth/audio instead of bluetooth/host/audio, with
  some include paths updated as a consequence
- as a consequence, CMake files and Kconfig files updates are done in
  other locations

The CCID module is written by
Emil Gydesen <emil.gydesen@nordicsemi.no>

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2021-11-02 13:23:42 +01:00
Asbjørn Sæbø 9c6e578d50 Bluetooth: Audio: UUID values for the CCID characteristic
UUID values for the Content Control ID characteristic

The Content Control ID characteristic is a separately defined
characteristic used in the media control service and in the telephone
bearer service in LE Audio.

This commit is part of the upmerge of le-audio from the topic-le-audio
branch.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2021-11-02 13:23:42 +01:00
Paul Gautreaux 50913bd6c8 net: lib: config: Fix the timeout when waiting on network
Loop by LOOP_DIVIDER counts instead of the number of seconds
specified in the timeout.

Fixes #39672

Signed-off-by: Paul Gautreaux <paulgautreaux@fb.com>
2021-11-02 13:23:10 +01:00
Krzysztof Chruscinski 97007abf65 tests: drivers: watchdog: Add counter watchdog to test
Added support for counter watchdog device in wdt_basic_api.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-02 13:22:58 +01:00
Krzysztof Chruscinski 9174cd8dbc drivers: watchdog: Add software watchdog based on counter
Added watchdog implementation which is using counter device
to implement watchdog driver API. Watchdog timeout is called from
counter interrupt context. Some counter implementations support
using ZLI interrupt level which can be use here as well. Watchdog
like this can be used along hardware watchdog to cover for its
limitations, i.e. Nordic watchdog resets unconditionally after
62uS after triggering watchdog interrupt. It is not enough time
to dump logging data.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-02 13:22:58 +01:00
Francois Ramu 0ddc07d511 boards: arm: stm32 disco kit target board has IWDG instance
This commit enables the independent watchdog peripheral
instance (IWDG1) on the target board b_u585i_iot02a
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:24 +01:00
Francois Ramu 76158916eb dts/arm: stm32u5: add independent watchdog node
Add the IWDG node for stm32u5 socs.
The IWDG peripheral has an early wakeUp interrupt.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:24 +01:00
Francois Ramu 085f54a345 boards: arm: stm32 disco kit target board has entropy RNG instance
This commit enables the Random Nb Generator peripheral
instance (RNG) on the target board b_u585i_iot02a
from STMicroelectronics.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:11 +01:00
Francois Ramu abf7f2cb76 dts/arm: stm32u5: add entropy node as Random Number Generator
Add the true Random Number Generator (RNG) node for stm32u5 socs.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-11-02 13:22:11 +01:00
Nikolai Kondrashov 6d6c441069 doc: bluetooth: List BLE controller HW reqs
Add a list of hardware/peripheral requirements of the BLE controller.

Co-authored-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov 1b4e364977 doc: bluetooth: Spell out BLE per Bluetooth SIG
Spell out BLE fully in the Bluetooth Architecture guide, since Bluetooth
SIG does not use the abbreviation.

Co-authored-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov 6609a75f78 doc: bluetooth: Hyphenate adjectives before nouns
Hyphenate multi-word adjectives (compound modifiers) before nouns on the
Bluetooth Architecture guide page. This makes the sentence a little
easier to read.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov 533b8c971a arch: arm: aarch32: Fix spelling of "want"
Fix spelling of "want" in a comment in _arch_isr_direct_mp().

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Nikolai Kondrashov 6d8fd96a2f doc: threads: Use plural for SSE registers
Use plural when referring to SSE registers (as in previous sentence) in
documentation of K_SSE_REGS thread option.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
2021-11-02 10:46:00 +01:00
Gerhard Jörges 9c7734a63c net: pkt: clone ieee802154 fields in clone_pkt_attributes()
IEEE 802.15.4 fields were missing from cloned net_pkt

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2021-11-02 11:31:10 +02:00
Henrik Brix Andersen 351d065f63 drivers: pwm: mcux: ftm: return -EBUSY if PWM capture in progress
Return -EBUSY (not 0) from pwm_pin_enable_capture() if PWM capture is
already in progress.

Fixes: #39817

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-01 22:11:04 -04:00
Christopher Friedt 213ad01ed0 tests: kernel: disable one test for qemu_cortex_a9
Currently a test is failing.

```
twister -i -p qemu_cortex_a9 \
  -s tests/kernel/fatal/exception/kernel.common.stack_sentinel
```

Disable those temporarily until a fix is in place.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2021-11-01 22:10:04 -04:00
Szymon Janc 7e0502ebe3 tests: bluetooth: tester: Add support for pairing failed event
This event is sent if pairing failed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-11-01 21:48:52 -04:00
Szymon Janc 47ac14282d bluetooth: host: Add support for SMP error code 0x0f
This error code informs that peer device rejected key during
keys distribution phase.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-11-01 21:48:52 -04:00
Jun Lin ef995dfbdc samples: drivers: spi_flash: add support for the NPCX EVB
This commit adds the support to run the SPI NOR sample code on the
npcx7m6fb_evb and npcx9m6f_evb boards.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I780c5dfcf53f3ac537da946673fc03f5ee24e90c
2021-11-01 21:48:20 -04:00
Jun Lin 5d72417df4 drivers: spi: npcx: add SPI support to access the SPI flash
The FIU/UMA module in the NPCX chip provides an dedicated SPI interface
to access the SPI flash. This commit adds the driver support for it.
With this commit, the application can call the flash APIs
(via spi_nor.c) to access the internal flash of NPCX EC chips.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I32bbf09f6e014b728ff8e4692e48151ae759e188
2021-11-01 21:48:20 -04:00
Chris Pearson c4842c1879 net: openthread: add log_strdup to role text, fix doc gender issue
- Add a `log_strdup` to the role text output for logging V1
  compatibility
- Fix style issues
- Change where the documentation refers to an OpenThread device as
  "himself" to "itself"

Signed-off-by: Chris Pearson <ctpearson@gmail.com>
2021-11-01 21:47:43 -04:00
Chris Pearson b8dff131dd net: openthread: Change OT net log to display current role in text
If CONFIG_NET_LOG=y is set, OpenThread will output the current OT
role whenever the state changes.

To simplify understanding of the log output, this change replaces
the numerical role ID with the text name of the role. This also
required a change to a documentation file to replace an instance
of a numerical ID.

NOTE: This is potentially a breaking change should anyone be using
test scripts that monitor the OpenThread state changes and look
for the numerical ID. This does not seem to be the case for the
Zephyr tests, however.

Signed-off-by: Chris Pearson <ctpearson@gmail.com>
2021-11-01 21:47:43 -04:00
Felipe Neves 0a0fed7879 drivers: spi: esp32: add esp32c3 support
to the esp32 spi unified driver

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-11-01 21:47:26 -04:00
Carlo Caione c03519fffc mbox: ipc: s/_MBOX_NRFX/_MBOX_NRFX_IPC/
Use a more precise Kconfig symbol name to avoid namespace conflicts when
more NRFX-dependent drivers will be added.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-11-01 11:30:59 -04:00
Joakim Andersson dda3a5ad0d modules: tfm: Split trusted-firmware-m repository
Split the zephyr project maintained repository trusted-firmware-m into
forks of the individual upstream repositories.

https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Upstream: TF-Mv1.4.1
Additions:
zephyr: module: Add zephyr module file
trusted-firmware-m: platform: lpcxpresso55s69: Update SDK

https://git.trustedfirmware.org/TF-M/tf-m-tests.git
Upstream: 51ff2bdfae043f6dd0813b000d928c4bda172660
Additions:
zephyr: module: Add module file for tf-m-tests

https://github.com/ARM-software/psa-arch-tests.git
Upstream: 60faad2ead1b967ec8e73accd793d3ed0e5c56bd
Additions:
zephyr: module: Add module file for psa-arch-tests
psa-arch-tests: Allow overriding of toolchain file

The organization of folders remain the same with the following
exceptions:
Moved:
root folder moved from modules/tee/tfm to modules/tee/tf-m to avoid
problems with west update.
zephyr/module.yml to trusted-firmware-m/zephyr/module.yml and
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} points to what was previously
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m.
Added:
psa-arch-tests/zephyr/module.yml and ${ZEPHYR_PSA_ARCH_TESTS_MODULE_DIR}
tf-m-tests/zephyr/module/ and ${ZEPHYR_TF_M_TESTS_MODULE_DIR}
Removed:
init-git.sh
README.rst

Fixes: #39353

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-11-01 11:20:06 -04:00