Commit Graph

56939 Commits

Author SHA1 Message Date
Armando Visconti 1c0acad364 driver/sensor: lis2ds12: make use of STdC definitions
Port the lis2ds12 sensor driver on top of the lis2ds12_StdC
HAL interface (in modules/hal/st/sensor/stmemsc/).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-22 09:06:07 -05:00
Armando Visconti dabaaa1e5d drivers/sensor: stmemsc: make use of spi_dt_spec and i2c_dt_spec
Make use of the new DT facilities that introduced two new
bus structures, spi_dt_spec and i2c_dt_spec, as well as the
macros, SPI_DT_SPEC_INST_GET and I2C_DT_SPEC_INST_GET, to
retrieve info from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-22 09:06:07 -05:00
Bartosz Bilas 919b3f9165 drivers: sensor: ina23x: fix sample fetching
Fix the usage of sensor shell module that calls sensor_sample_fetch
function with SENSOR_CHAN_ALL id which is not supported and
causes the following error:

uart:~$ sensor get INA237 current
Failed to read sensor: -134
channel idx=31 current =   0.000000

Fix that by adding support for SENSOR_CHAN_ALL channel id.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2021-10-22 08:51:30 -05:00
Paul Sokolovsky 262b5b1930 console: Kconfig: Remove EXPERIMENTAL marker
Originally, it was added to allow to slightly vary API (e.g. function
signatures) without burdening the subsys with compatibility stabs.
There were not many changes recently, and with EXPERIMENTAL master
switch which is planned to be added soon, it's better to remove
this marker so the subsys remained accessible as it was before.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2021-10-22 09:46:22 -04:00
Yuval Peress f6f24a2a79 modules: Add fff mocking framework
Issue #38643

Introduce a more powerful and well established mocking framework
into Zephyr. It also allows running the actual FFF tests using the
zephyr SDK and ztest framework to ensure compatibility.

As per TSC meeting, the fff.h header was directly added to
subsys/testsuite/include/. As per the guidelines, the file is exactly
the same as it is in FFF's library, but re-styled with clang-format.

The west.yml entry was added using the "ci" group and filtered by
default. (note that the tests will break until the CI actually
specifies that the group is needed).

Signed-off-by: Yuval Peress <peress@google.com>
2021-10-22 09:43:13 -04:00
Torsten Rasmussen f17630ba75 doc: application: added description of WARN_EXPERIMENTAL setting
This commit adds description of the `WARN_EXPERIMENTAL` Kconfig setting
to the application development guide.

It describes the use of `CONFIG_WARN_EXPERIMENTAL` along with an
example of the warning output when experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-22 13:59:21 +02:00
Torsten Rasmussen 587285e4de kconfig: canbus: experimental settings now uses select EXPERIMENTAL
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in
Zephyr all subsys/canbus, subsys/net/l2/canbus, and drivers/can settings
having `[EXPERIMENTAL]` in their prompt has has been updated to include
`select EXPERIMENTAL` so that developers can enable warnings when
experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-22 13:59:21 +02:00
Torsten Rasmussen 9a2be89557 kconfig: bluetooth: experimental settings now uses select EXPERIMENTAL
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in
Zephyr all subsys/bluetooth and drivers/bluetooth/hci settings having
`[EXPERIMENTAL]` in their prompt has has been updated to include
`select EXPERIMENTAL` so that developers can enable warnings when
experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-22 13:59:21 +02:00
Torsten Rasmussen 1c911290e9 kconfig: add support for warnings when using experimental features
This adds two new Kconfig settings.

The first setting `EXPERIMENTAL` which is a promptless symbol.
This symbol must be selected by any setting which is used to enable
an experimental feature.

The second setting is `WARN_EXPERIMENTAL` which is a user controlled
setting that configures the build system to print a warning when
experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-22 13:59:21 +02:00
Anas Nashif 75cb6e6498 tests: uefi: move uefi test out of hello world
Do not misuse the hello world sample for testing of features, keep it
simple. Create a new test for booting with uefi instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-22 06:36:51 -04:00
Emil Gydesen 5c40c8005c Bluetooth: shell: Add `audio` infix for audio tests
Rename shell testcases from bluetooth.shell.*
to bluetooth.shell.audio.*

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-22 11:30:56 +02:00
Emil Gydesen f49d69ee00 Bluetooth: shell: Move LE audio configuration to a new file
Move the LE audio configuration to a new audio.conf file
in the bluetooth shell project, similar to the mesh.conf
file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-22 11:30:56 +02:00
Maciej Perkowski 2253c6efd8 twister: Fix skipping unskippable tests when --subset is used
Fixes a bug causing tests with error status get silently skipped
when --subset is used.

Fixes: #39619

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-10-21 21:45:53 -04:00
Dominik Ermel 5f0dff61be storage/flash_map: Separate layout and integrity functions
The commit separates conditionally compiled API calls to separate
C files and moves conditional compilation to CMakeLists.txt.
Inline helpers have been moved to flash_map_priv.h.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-21 17:18:44 -04:00
Dominik Ermel 51e8db228b storage/flash_map: Switch flash_area_layout to use flash_area_open
The function should use flash_area_open rather than directly
using get_flash_area_from_id.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-21 17:18:44 -04:00
Erwan Gouriou a454104383 boards: 96b_avenger96: Move clock freq config to device tree
Use new clock-frequency device tree property to configure
sys clock frequency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 13:14:37 -04:00
Erwan Gouriou 5470a1df4d dts/arm: stm32mp1: Fix simple_bus_reg warning
Fixes following warning:
'Warning (simple_bus_reg): /soc/interrupt-controller@5000D000:
simple-bus unit address format error, expected "5000d000"'


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 13:14:37 -04:00
Erwan Gouriou f696d5a8c1 boards: stm32mp157c_dk2: Move clock freq cinfig to device tree
Use new clock-frequency device tree property to configure
sys clock frequency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 13:14:37 -04:00
Erwan Gouriou 6757fae188 dts/arm: stm32mp1: Add compatible for mp1 rcc node
Add a dedicated compatible for STM32MP1 clock control node.
Since, on such platform, clock configuration is done on A9
side, only the clock-frequency property is available.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 13:14:37 -04:00
Abe Kohandel 190848177e bluetooth: ots: Enable testing with assert
Fix compilation and logic issues to allow testing OTS functionality with
assert enabled.

The compilation fixes are simple and do not require an explanation.

The assertion in bt_ots_dir_list_init was logically reversed. Its
purpose is to ensure the directory list is not already initialized
and as such should assert that the dir_list is not set (i.e. is NULL).

Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
2021-10-21 11:21:13 -04:00
Caspar Friedrich c3ca5ada1a net: mqtt: Return meaningful error code from mqtt_init()
The condition checks whether the connection was established or not. The
return value should reflect that.

Signed-off-by: Caspar Friedrich <c.s.w.friedrich@gmail.com>
2021-10-21 10:56:32 -04:00
Neil Armstrong 71766f5c05 interrupt_controller: gicv3_its: Implement Indirect Two-level table
When the ITS is configured with a large number of DeviceID bits,
up to 32, the Device Translation Table can be configured as
"indirect" mode consisting of a 2-level table with the first
level entries pointing to a second level table for each
group of DeviceIDs.

This is necessary to support platforms with DeviceID bits > 16.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-10-21 10:56:15 -04:00
Sylvio Alves 944b6d0486 soc: esp32: use same rom func prefix
This sets esp32 to use common rom functions
prefix among SoCs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:55:45 -04:00
Yong Cong Sin a720f8c627 tests/subsys/storage/flash_map: get flash device from flash area
Get flash device from flash area instead of the hardcoded
DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL. This makes the test
possible to be ran on device that has image_1 defined in
external flash.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-10-21 10:55:16 -04:00
Sylvio Alves b0717d518e drivers: gpio: esp32: use dts and improve code checks
This PR updates GPIO driver to use DTS information
regarding gpio availability.

This also fixes interrupt handling and
also removes kconfig definition for GPIO port.

A few configuration checks were also added to
improve code usage.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:53:34 -04:00
Sylvio Alves 7c10e0d947 pinmux: esp32: add missing pull down call
When configuring pin as pull up, pull down needs
to be disabled first.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-10-21 10:53:34 -04:00
Yuguo Zou 4e33cd62d0 arch: arc: Add _ARCH_MEM_PARTITION_ALIGN_CHECK for arc mpu v3 v6
_ARCH_MEM_PARTITION_ALIGN_CHECK was missing for arc mpu v3 and v6.
This commit add the missing macros.

Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
2021-10-21 10:50:03 -04:00
Johann Fischer 220ad1d40d boards: add zephyr_udc0 nodelabel to stm32 boards with usbotg_fs node
Add zephyr_udc0 (USB device controller) nodelabel to
STM32 boards with usbotg_fs node to allow generic USB device
samples to be build.

Follow up on commit e4f894788a
("boards: add zephyr_udc0 nodelabel to all boards with USB support")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-21 10:33:37 -04:00
Alexandre Bourdiol 2d4b1b6cba soc: arm: stm32h7: implement workaround for AXI SRAM data corruption
Errata ES0392 Rev 8:
2.2.9: Reading from AXI SRAM may lead to data read corruption
Workaround: Set the READ_ISS_OVERRIDE bit in the AXI_TARG7_FN_MOD
register.
This is applicable only to RevY (REV_ID 0x1003)

Fixes #38933

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-10-21 10:32:21 -04:00
Alexandre Bourdiol 82ce5c57ef boards: arm: stm32l562e_dk and nucleo_l552ze_q add openocd support
OpenOCD was partially implemented in board.cmake,
it is now functional.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-10-21 10:31:48 -04:00
Martin Jäger f24367963e task_wdt: ensure hw wdt is started before being fed
If a fallback hardware watchdog is used, it is fed together with the
task watchdog in task_wdt_feed. However, the hardware watchdog was
not yet set up before the first call to task_wdt_feed.

This commit fixes the order of wdt_setup and task_wdt_feed calls.

Fixes #39523

Signed-off-by: Martin Jäger <martin@libre.solar>
2021-10-21 07:35:11 -04:00
Keith Packard 177f95464e arm: Use correct macro for z_interrupt_stacks declaration in stack.h
There are two macros for declaring stack arrays:

K_KERNEL_STACK_ARRAY_DEFINE:

	Defines the array, allocating storage and setting the section name

K_KERNEL_STACK_ARRAY_EXTERN

	Declares the name of a stack array allowing code to reference
	the array which must be defined elsewhere

arch/arm/include/aarch32/cortex_m/stack.h was mis-using
K_KERNEL_STACK_ARRAY_DEFINE to declare z_interrupt_stacks by sticking
'extern' in front of the macro use. However, when this macro also set
the object file section for the symbol, having two of those caused a
conflict in the compiler due to the automatic unique name mechanism used
for sections to allow unused symbols to be discarded during linking.

This patch makes the header use the correct macro.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-10-21 07:34:56 -04:00
Guennadi Liakhovetski 33dbbfb3d6 Xtensa: ADSP: bootloader: use proper struct field access
Replace byte-counting with proper structure field access.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-21 07:34:03 -04:00
Guennadi Liakhovetski c2400a47ab xtensa: ADSP: Intel: fix booting on APL with XCC
When built with XCC for Apollolake, Zephyr fails to boot with the
default multi-core option enabled. Invalidate cache before reading
the firmware image to fix that.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-21 07:34:03 -04:00
Erwan Gouriou aa144ca3f0 drivers/usb: stm23: Fix deprecated macro declaration
Use of '__DEPRECATED_MACRO' was not compatible with the way macro
is used later in this driver.
Remove it and keep the warning as vector for deprecation information.

Additionally, replace DT_NODE_HAS_PROP with DT_INST_PROP as
using the former is not recommended with boolean properties.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-10-21 05:53:52 -05:00
Iuliana Prodan c0fcd35531 manifest: update hal_xtensa
Update hal_xtensa for i.MX8MP SoC overlay support.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan 602e675418 west: sign: add support for NXP i.MX8MP
Add support for signing i.MX8MP SOF with
Zephyr images with rimage.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan 8bbb11d6a1 soc: xtensa: adsp: add support for NXP ADSP for i.MX8MP
Add support for i.MX8MP target.
This has a 1 Xtensa HiFi4 core, with 64 KB TCM,
256KB OCRAM, 8MB SDRAM and 1 SAI as audio interface.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan dd1c96d123 samples/subsys/audio/sof: add configuration for imx8m board
Add support for SOF with Zephyr on i.MX8MP board.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan ad772693aa boards: xtensa: adsp: add support for imx8m board
Add support for i.MX8MP board by defining defconfig,
board configuration and device tree.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Iuliana Prodan 78606101a0 dts: xtensa: add device tree for imx8m
Add dtsi file for i.MX8MP board.
This has one HiFi4 core, from Cadence, lx6 compatible
and 2 System RAM.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-20 19:08:50 -04:00
Peter Mitsis 1d8c1162c7 doc: Fix K_EVENT_DEFINE macro code-block example
Fixes the code-block example for K_EVENT_DEFINE() documentation
to show that it only takes one argument instead of three.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2021-10-20 17:44:12 -04:00
Tom Burdick 9cb94df57a MAINTAINERS: add myself to maintainers
Adds myself to collaborators for

* Power Management
* Sensors
* Tracing

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-20 10:56:35 -05:00
Kumar Gala fb4d68973f shell: Fix various build issues with string formattors
We get a few different CI failures associated with data type
differences on various platforms.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-10-20 10:54:38 -05:00
Lixin Guo 2643e8d62d tests: mutex: fix improper test identifier
The test identifier of mutex error case in testcase.yaml is
exactly the same as mutex api's test identifier.
So I fix this.

Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
2021-10-20 10:19:18 -04:00
Jiafei Pan 799f37b421 arm64: add nocache memory segment support
In some drivers, noncache memory need to be used for dma coherent
memroy, so add nocache memory segment mapping and support for ARM64
platforms.

The following variables definition example shows they will use nocache
memory allocation:
   int var1 __nocache;
   int var2 __attribute__((__section__(".nocache")));

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2021-10-20 08:56:40 -05:00
Maureen Helm b0cdef3c25 drivers: adc: Refactor drivers to use shared init priority
Refactors all of the ADC drivers to use a shared driver class
initialization priority configuration, CONFIG_ADC_INIT_PRIORITY, to
allow configuring ADC 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
exceptions are lmp90xxx, mcp320x, and mcux_adc16 drivers which have
dependencies on GPIO, SPI, and/or DMA drivers and must therefore
initialize later than the default device priority.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-20 07:33:44 -04:00
Martí Bolívar f259790bf8 dts: bindings: fix file names
Make sure binding file names match their compatibles.

Done with a script.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-20 07:33:04 -04:00
Wouter Cappelle 96f9f6e6d2 modem: clang-format the modem_socket files
Running clang-format on the modem socket files

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2021-10-20 07:30:46 -04:00
Wouter Cappelle 287481ef0a modem: Rework the modem_sockets poll behavior
The current modem sockets poll implementation has 2 limitations
as of today:
- not following posix spec wrt timeout of -1 (should be forever,
  but as today it's was returning immediately)
- not able to poll from multiple threads on different sockets
  on the same modem.
This pull request should implement these limitations.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2021-10-20 07:30:46 -04:00