Commit graph

52777 commits

Author SHA1 Message Date
Flavio Ceolin
18e9ec70d6 drivers: can: can_set_bitrate is not a syscall
There was a verification function for can_set_bitrate calling a syscall
implementation. But, can_set_bitrate is not a syscall and does not need
to be because it is accessing the driver through other syscalls.

Fixes #34734

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-27 07:05:34 -05:00
Krzysztof Chruscinski
f98bc0c0bc logging: backend_rtt: Align to changes in RTT_LOCK/UNLOCK
RTT_LOCK/UNLOCK in certain configuration creates code block (curly
braces). In that case variables declared inside are local to that
block. Moved declaration of ret variable before the block. Updated
code to ensure that RTT_LOCK/UNLOCK are in the same code block.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-27 13:33:02 +02:00
Krzysztof Chruscinski
9b69036500 manifest: update segger
Update segger with RTT version that support no multithreading.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-27 13:33:02 +02:00
Krzysztof Chruscinski
909fbb2086 drivers: console: rtt: Add no multithreading support
Avoid calling k_sleep when multithreading is disabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-27 13:33:02 +02:00
Casper Bonde
3af1f4bac5 Bluetooth: ISO: Make it possible to setup unidirectional CIS
The current iso commands in the shell only supports setting up
a bidirectional stream or unidirectional for central role.
Adding rx/tx/rxtx option to iso listen command to allow for
peripheral side configuration of an iso connection.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2021-05-27 13:16:40 +02:00
Casper Bonde
04dfcba792 Bluetooth: ISO: Add sequence number to ISO data packets
The sequence number is needed in the appliaction layer to detect lost
packets in the ISO stream in cases where the timestamp is not included.
(Sequence number is mandatory to include where timestamp is optional).
The API for the public metadata have been moved to a public header file.

As the size of the ISO meta data exceeds the default 4 octets net_buf
user_data the public ISO metadata have been moved into a seperate array.
The internal metadata is still stored in net_buf user_data.

This also fixed the user_data overflow on 32 bit systems, caused by
writing the ts into user_data on index 4 to 7, which is outside the 4
allocated bytes.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2021-05-27 13:16:40 +02:00
Casper Bonde
afe469eac7 Bluetooth: ISO: Speed up BT ISO data processing
For the native posix build the sleep calls used in tasks will stall
the zephyr instance which sets an upper limit on the data processing
interval to once every 20-30 millisecond.
This change reduces the duration of the sleep calls and increases the
TICKS_PER_SECOND to allow for shorter sleeps. This is needed to
support the data rates needed for LE Audio streaming. The rate is
tuned to support up to bidirectional 5ms ISO-intervals.
This change also increases the ISO buffer count from 1 to 5 to
allow for some buffering in the controller, which is needed for
gapless playback and/or use of burst number larger than 1.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
2021-05-27 13:16:40 +02:00
Kumar Gala
6e2522d3de release: Zephyr 2.6.0-rc2
Set version to 2.6.0-rc2

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-27 00:08:01 -05:00
Scott Worley
825170e00b drivers: pinmux: mchp: Update pinmux based on latest HAL
Microchip HAL 1.2.0 fixed a bug in the define of GPIO
control register MUX field. The incorrect MUX defined
cleared by GPIO input pad disable field by accident.
After the MUX definition was corrected the pinmux driver
must be modified to mask off the input pad disable for
the pin to be operational.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2021-05-26 19:09:47 -05:00
Kumar Gala
6e11ccb678 doc/releases: v2.6.0: Update for SoCs and ARM boards
Add list of new SoCs and ARM boards added in this release.  (Folded the
STM32 board section into the ARM board section).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-05-26 19:09:27 -05:00
Ioannis Glaropoulos
00e2bb0288 samples: tfm_integration: DT overlay doc fixes for stm32l562e_dk_ns
Minor documentation fixes for the DT overlay files for
stm32l562e_dk_ns board.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 18:58:15 -05:00
Ioannis Glaropoulos
d4ae6a9cf3 samples: tfm_ipc: update DT overlay for nucleo_l552ze_q_ns
Update overlay file for nucleo_l552ze_q_ns board,
since now the sample does not enable REGRESSION,
and thus regular TF-M flash layout for the board
is used.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 18:58:15 -05:00
Ioannis Glaropoulos
fa041ddb23 boards: lpcxpresso55s69: fix TFM offset for builds without MCUboot
The flash layout definition has changed in upstream TF-M for the
LCPXPRESSO55S69 platform, for builds without bootloader. Fix the
layout in the boards' configuration, as well.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 18:58:15 -05:00
Kevin Townsend
5fd7a52d4e samples: tfm_integration: tfm_ipc: Remove regression dependency
Removes the dependency on the external test service from the
CONFIG_TFM_REGRESSION_S test suite, instead
demonstrating how to make direct IPC calls to the CRYPTO
service that is available as a part of standard TF-M builds.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2021-05-26 18:58:15 -05:00
Ioannis Glaropoulos
90f4b5e745 manifest: update TF-M with latest upstream
The TF-M update brings in the latest PSA crypto headers,
after TF-M switched formally to MBedTLS 2.26.0. It also
brings in some important fixes for cache enabling in nRF
platforms.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 18:58:15 -05:00
Carlo Caione
835ff89c40 cmake: arm64: Bail out if the old SDK is used
After the ARM/ARM64 split the SDK 0.12.4 is needed to be able to compile
the ARM64 arch code. Bail out if an old SDK is detected at compile time.

Also change the minimal supported Zephyr SDK to v0.12, as agreed in
Toolchain WG.  Main reason is added compiler architectures and important
inclusion of fixes, for example qemu and arm fixes for veneers (TFM)

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-05-26 18:15:08 -05:00
Henrik Brix Andersen
2b0a481291 arch: arm: cortex-m: add support for clearing NXP MPU regions at boot
Clear NXP MPU regions at boot if CONFIG_INIT_ARCH_HW_AT_BOOT is
enabled.

Fixes: #34045

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-05-26 18:14:03 -05:00
Henrik Brix Andersen
eb9cf9e0dc soc: arm: nxp: kinetis: k2x: remove MPU support
Remove (disabled) MPU support for the NXP Kinetis K2x. At least the
MK22F51212, which is the only K2x supported by Zephyr so far, does not
contain an MPU.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-05-26 18:14:03 -05:00
Evgeniy Paltsev
18a24c3f6f ARC: gcc-m-cpu: use -mcpu=archs as a default for ARCv2 HS
Due to the fact that we use -mcpu=hs as a default for ARCv2 HS
the compiler doesn't generate multiply/divide/mac/64bit memory
operations instructions.

Fix that by using -mcpu=archs as a default for ARCv2 HS which is
fits for all existing boards with ARCv2 HS CPU.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-05-26 18:13:30 -05:00
Piotr Mienkowski
a323a41fc2 sensor: qdec_sam: use compatible atmel,sam-tc-qdec
Change the drivers's compatible from atmel,sam-tc to atmel,sam-tc-qdec.
The atmel,sam-tc should be reserved for the future counter driver.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-05-26 18:13:10 -05:00
Piotr Mienkowski
80ad300b6c dts: same70: use lower case letter in tc0 reg address
The change removes the following warning:
Warning: /soc/tc@4000C000: simple-bus unit address format error,
         expected "4000c000"

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2021-05-26 18:13:10 -05:00
Lauren Murphy
4c85b4606b kernel: k_sleep: fix return value for absolute timeout
Fixes calculation of remaining ticks returned from z_tick_sleep
so that it takes absolute timeouts into account.

Fixes #32506

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2021-05-26 18:11:52 -05:00
Anas Nashif
5b8d418058 nios2: revert back to builtin sys_io functions
Some time ago we did a cleanup of sys_io function and left nios2 broken,
especially on the MAX10 board. Revert back to the original
implementation for this architecture.

Fixes #35694

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-26 18:09:47 -05:00
Anas Nashif
6148ac9549 boards: max10: fix function name in debug section
_Cstart was renamed, fix the docs to reflect that.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-26 18:09:47 -05:00
Anas Nashif
dde1a2126f nios2: max10: fix uart0 base register
Fix register for uart0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-26 18:09:47 -05:00
Bradley Bolen
2323319866 tests: ztest: Use #if defined()
This compile test should be checking if a symbol has been defined,
otherwise it is using the kconfig value directly.  This fixes a warning

../src/main.c:115:37: warning: "CONFIG_SOC_QEMU_ARC" is not defined,
evaluates to 0 [-Wundef]

when using the -Wundef flag.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-05-26 14:12:01 -05:00
Bradley Bolen
505c22ee79 MAINTAINERS.yml: Add myself as ARM collaborator
Currently the Cortex-R platform has no one watching over it.  Submitting
myself to help with the Cortex-R parts of the ARM architecture.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
2021-05-26 14:11:45 -05:00
Maureen Helm
5d528c50da boards: arm: Update frdm_k64f and mimxrt10{60,64}_evk board docs
Updates board documentation for several NXP boards to reflect currently
supported features, NXP documentation links, clarifications on debug
probes, additional troubleshooting tips, and some minor editorial
changes.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-26 13:13:01 -05:00
Ioannis Glaropoulos
b3b36f69a6 arm: cortex-m: shrink hidden option for null-pointer detection
Shrink the name of the hidden cortex-m option for the
null-pointer dereference detection feature.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 12:30:05 -05:00
Ioannis Glaropoulos
d105a2b76c arm: shrink names for null-pointer exception detection Kconfigs
Reduce the length of the Kconfig defines related to
null-pointed dereference detection in Cortex-M.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 12:30:05 -05:00
Marek Pieta
94cc9a9bdb arch: arm: Fix build warning
Change fixes a build warning related to attribute ignored in
declaration of struct. The __packed attribute is removed.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-05-26 11:17:45 -05:00
Ioannis Glaropoulos
4084242a71 kernel: make MULTITHREADING promptless if single-thread not supported
If single thread builds are not supported by the
architecture, the MULTITHREADING option should be
prompt-less to block any modifications to it. We
also introduce an explicit ARCH-level Kconfig that
reflects whether the ARCH is capable of single-thread
Zephyr builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-05-26 11:03:22 -05:00
Martí Bolívar
7e7f4201df doc: guides: dts improvements
People seem to miss the troubleshooting page a lot, since nobody ever
mentions that they tried its steps and they didn't work. Promote it to
a top level page to make it easier to see. Add cross-references
between the two to keep them well linked together.

Add a couple of extra links to the bindings related HOWTO while we are
here, now that the bindings docs are a bit better off than they were
when this content was originally written.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-26 11:01:24 -05:00
Martin Jäger
574746e7dc doc: release notes 2.6: Add notes for CAN bus
New CAN-FD driver based on M_CAN IP and some updates to ISO-TP.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-05-26 11:00:56 -05:00
Martin Jäger
c55a76c713 doc: release notes 2.6: Add notes for Task Watchdog
This new subsystem was introduced in 2.6 for the first time.

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-05-26 11:00:56 -05:00
Erwan Gouriou
6c69ecebb2 doc/releases: v2.6.0: Update for shields impacts
Update v2.6.0 release note with shields addition.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-26 10:55:32 -05:00
Erwan Gouriou
302f3242b8 doc/releases: v2.6.0: Update for STM32 impacts
Update v2.6.0 release note with STM32 related changes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-26 10:55:32 -05:00
Omkar Kulkarni
d6db9abd9d Bluetooth: Mesh: Add information about secure provisioning
This clarification helps implementers to choose provisioning process
parameters.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2021-05-26 10:55:07 -05:00
Torsten Rasmussen
39f06e0195 ld.bfd: ensure that ld.bfd is preferred over ld.
Fixes: #32237

When building for native_posix, then host tools are used.
This means that gcc will link using `/usr/bin/ld` per default.

If ld points to lld, then linking will fail.

This commit will first look for ld.bfd, and if found then use
-fuse-ld=bfd for linking. If ld.bfd is not found, then ld is used as
fallback as that will be assumed to be the best working candidate.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-05-26 10:54:45 -05:00
Affrin Pinhero
c1daae647e driver/spi: STM32 Revert while loop on tx only
This commit reverted while loop on tx only.
This commit solves SPI loopback failure and SPI wrong behaviour on RX.
fix:
* zephyrproject-rtos/zephyr#35297
* zephyrproject-rtos/zephyr#35539

Revert "drivers/spi: STM32: This solves SPI infinite loop on Tranceive"

This reverts commit 50c2acbc03e7a48a09880b6fcb8c22256bffa70c.

Signed-off-by: Affrin Pinhero <affrin.pinhero@hcl.com>
2021-05-26 10:38:21 -05:00
Flavio Ceolin
3056c5ec30 pm: device_runtime: Remove not necessary check
pm_device_runtime_state_set takes care of the check the reference count
and take the right action. It is not necessary check it in
pm_device_request.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
5c03d9643f pm: device_runtime: Simplify mutex usage
Assuming that pm_device_state_set is synchronous it is possible to
simplify the mutex usage. Now there are two places where the lock is
held, one in the worqueue handler and other in pm_device_request to
cover the synchronous path. It is no longer needed held the lock in the
pm_device_state_set callback and not needed to wait on the conditional
variable after set the state in the synchronous path.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
d67a5786bc pm: device_runtime: Change API behavior s/_sync/_async
Most APIs have the default synchronous and an asynchronous version
with the sufix _async because that is the most common use.

All devices in tree right now are using the synchronous version, so
just change it to be consistent with the rest of the system.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
452890628a docs: pm: Add samples and tests links
Add some applications samples to the documentation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
7c5ce5ba51 docs: pm: Improve residency policy documentation
Add information about exit latency time.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
eba2dc7e9b docs: pm: Add link to application defined policy
Add a link for the sample that defines its own policy manager.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
7f667680f4 docs: pm: Fix device busy information
Remove invalid information about device busy API.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
ffcba96b1a docs: pm: Add missing device states
Adding documentation about two new device states, SUSPENDING and
RESUMING.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
62e2952a5a docs: pm: Device pm fixes and enhancements
- idle/runtime
- Information about asynchronous calls and how to use the condition
  variable
- More details about usage count

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00
Flavio Ceolin
90be4b67cf docs: pm: Fix invalid API reference
s/device_set_power_state/pm_device_state_set/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-05-26 10:56:55 -04:00