Commit graph

73966 commits

Author SHA1 Message Date
TOKITA Hiroshi 666386f642 boards: gd32: add spi as supported feature
Add `spi` as supported feature to yaml configuration.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
TOKITA Hiroshi 2af7d728e2 tests: spi: spi_loopback: add interrupt and DMA tests for GD32 boards
Add interrupt and DMA tests for GD32 boards.
Use overlay-gd32-spi-interrupt.conf when testing interrupt based transfer,
use overlay-gd32-spi-dma.conf when testing DMA transfer,

Add overlay file for GD32 boards for these tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
TOKITA Hiroshi e55cbb8ce6 drivers: spi: gd32: Add support DMA transfer
Add supporting DMA-based transfer for GD32 SPI.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2023-01-11 08:50:56 -08:00
Johann Fischer b5bfd3b12c drivers: udc: fixup parameter endpoint description
The description was still from the early stages of development.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer 98770caf2a usb: device_next: remove workaround for the UDC enqueue bug
Remove workaround for the UDC enqueue bug in experimental
CDC ACM implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer 2cab3a8243 drivers: usb: udc_kinetis: fix race condition in Kinetis USBFSOTG
Periodic enqeueu of buffers can cause a attempt to start
a new transfer even though an endpoint is already busy.

Split usbfsotg_xfer_start() into two function, one to start
next transfer and another to continue the transfers, and use
busy state flags to explicitly mark an endpoint busy.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer 00adb2a539 drivers: udc: remove no more required pending state flag
Pending state flag was only used by the UDC nRF USBD driver.
With the introduction of busy state flag it is no longer needed
and can be removed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer a033784c7e drivers: usb: udc_nrf: fix race condition in nRF USBD
Periodic enqeueu of buffers can cause a attempt to start
a new transfer to host even though an IN endpoint is already busy.
Use busy state flags to explicitly mark an endpoint busy.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer baef621bed drivers: udc: add helper functions to set/check endpoint busy state
Add helper functions to set and check endpoint busy state.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer c1860326d1 drivers: udc: avoid NULL pointer dereferencing if endpoint is invalid
Immediately return NULL if endpoint configuration is not available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:50 +01:00
Johann Fischer e9bab613cc usb: device_next: rename Kconfig template instances count
The name and wording used in template can be misleading.
Use more accurate word instance instead of device since
an implementation does not necessarily have to implement
a device (in the sense of Zephyr device model), and if it
does then devicetree should be used to describe number of
instances as in the case of CDC ACM implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-01-11 17:44:27 +01:00
Torsten Rasmussen fe3efbc6a2 cmake: BOARD_REVISION_CONFIG setting for Kconfig revision fragments
Fixes: #53696

Create a BOARD_REVISION_CONFIG setting to be consistent with the
BOARD_DEFCONFIG setting.

This allows systems which re-uses the Kconfig module to overrule the
file to be used as BOARD_REVISION_CONFIG in same way as is done for
the BOARD_DEFCONFIG file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2023-01-11 08:10:45 -08:00
Erwan Gouriou 3b92034b57 drivers: ethernet: stm32_hal: Rework data provisionning style
Use more concise and readable style.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-11 17:07:20 +01:00
Erwan Gouriou 8eee0afa1f drivers: stm32_hal: Add option to enable HW checksum
Provide a Kconfig option to enable HW RX and TX checksum, which
can increase throughput performances.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2023-01-11 17:07:20 +01:00
Emil Gydesen c8014d181e Bluetooth: Audio: Remove unicast_group_valid_qos
The function checked several value, but the BAP spec does
not specify that these cannot be different from stream to
stream in the CIG. The function thus did nothing but needlessly
restrict the upper layers.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-01-11 17:07:11 +01:00
Anas Nashif 5fd629b48b twister: package artifacts for testing
Package artifact for later use with --test-only.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-11 10:35:08 -05:00
Anas Nashif 3ae7b250c7 twister: do not log on waiting for devices
Do not log anything about waiting for devices, this is very noisy in
some environments.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-11 10:35:08 -05:00
Anas Nashif 1ffeaac92a twister: improve handling of artifacts with --prep-artifacts-for-testing
Previous commit dealing with cleanup (c304db56f1) was not taking
--prep-artifacts-for-testing into consideration. Fix this and make sure
we do cleanup when this option is enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-11 10:35:08 -05:00
Anas Nashif 1925277d5d mec172xevb_assy6906: set binaries for testing, ignore_tags
Set the name of binaries to be kept when doing device testing and ignore
unrelated subsystems using tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-11 10:35:08 -05:00
Anas Nashif 21077b7cf2 twister: support custom test binaries
Have boards define what binaries should be kept for device testing. The
purpose of this is to reduce the amount of artifacts and just keep the
binaries needed for flashing a device, reducing the size of the final
payload.

A board can have twister keep multiple binaries needed for testing when
--prep-artifacts-for-testing option is used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-01-11 10:35:08 -05:00
Fabio Baltieri afd766d2b3 drivers: xec_qmspi: add missing default y to SPI_XEC_QMSPI_FULL_DUPLEX
Add missing "default y" to the Kconfig option so that it gets selected
automatically when a matching devicetree node is enabled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-11 09:11:03 -06:00
Stephanos Ioannidis 9c2c227504 boards: ronoth_lodev: Enable HSI48 clock
Since the commit 2ed292e1be, the HSI48
clock must be explicitly enabled in the devicetree when a peripheral
that depends on the HSI48 clock is enabled.

This commit enables the HSI48 clock for the `ronoth_lodev` board
because it enables the RNG, which requires the it.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2023-01-11 23:48:24 +09:00
Tomasz Leman d6048afeea Revert "soc: intel_adsp/ace: fix CPU halting"
This reverts commit 81908cd367.

This commit introduced a regression on SOF. Value of soc_cpus_active is
set by the core X it self in functions pm_state_set and
pm_state_exit_post_ops. soc_adsp_halt_cpu can by called only by the
primary core.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-01-11 07:06:10 -05:00
Pavel Vasilyev 69a0058578 tests: bluetooth: mesh: Add separate assert macro with message support
ASSERT_OK macro is confusing as it accepts additional arguments, but
don't use them. This commit removes the confusion by making ASSERT_OK
macro accept only one argument. An additional macro ASSERT_OK_MSG is
added that mandates a format string that will be printed and optionally
arguments for the format string.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Pavel Vasilyev abce1b9e42 tests: bluetooth: mesh: extend friend queue overflow test
Extend Friend Queue overflow test by overflow with segmented messages:
- when a segmented message is preempted by an unsegmented message;
- when a segmented message is preempted by another segmented message;

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Pavel Vasilyev ffc4e716f0 Bluetooth: Mesh: Add extra flag to control seg msg in frnd queue
This commit fixes issue introduced in
5d059117fd.

Use extra flag stored in user data of net_buf to control segmented
messages in Friend Queue. The initial idea with using fragments didn't
work.

This fixes the following PTS tests:
- MESH/NODE/FRND/FN/BV-08-C
- MESH/NODE/FRND/FN/BV-19-C
- MESH/NODE/CFG/HBS/BV-05-C

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Pavel Vasilyev 7b4f94220d Revert "bluetooth: mesh: Remove illegal use of NET_BUF_FRAG in friend.c"
This reverts commit 5d059117fd.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-01-11 10:47:06 +00:00
Piotr Dymacz fab547f047 boards: nrf52840dongle_nrf52840: restore storage partition
This restores the 'storage' partition (16 KiB) in the stock layout
(fstab-stock.dts), removed in 9a842588fb, probably by mistake (the
commit description refers to scratch area only).

This was found when building OpenThread Co-Processor sample.

Fixes #53689

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-01-11 10:45:51 +00:00
Robert Lubos a64be51391 net: stats: Fix UDP packet counter for DHCPv4 TX
Fix UDP TX packet count when DHCPv4 is used. Currently UDP TX counter
is only updated when net context is in use. DHCPv4 however does not use
net_context underneath, therefore it needs to update UDP TX stats on its
own.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-01-11 11:26:08 +01:00
HaiLong Yang 1c2c254f7c lib: os: Fix note on fdtable.c
After fcntl.h moved to posix, there have a compiler note
on fdtable.c. As suggested in fcntl.h, instead with
zephyr/posix/fcntl.h.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2023-01-11 10:54:42 +01:00
Ruibin Chang 50274718e2 ITE dts/riscv/ite: separate dtsi node to it81xx2 from it8xxx2
The interrupt and watchdog registers of the it82xx2 will be
remapped, so these device nodes should be separated to
it81xx2 from it8xxx2. it8xxx2 dtsi are common settings
for it81xx2 and it82xx2.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-01-11 09:42:11 +01:00
Marc Desvaux ae2cf06f0b drivers: ethernet: fix error UDP server on STM32
With ETH_STM32_HAL_API_V2 avoid log error message
if error log report:
we have problems if the traffic is high


Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-01-11 09:42:00 +01:00
Christopher Friedt 85b44f0ed7 samples: posix: gettimeofday: include time.h
Due to some previous time-related header issues, we included
`<sys/time.h>` without including `<time.h>`. The latter is
necessary for `time()` (specified by both ISO C and POSIX).

Fixes #53673

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-01-11 09:41:29 +01:00
Henrik Brix Andersen 1147d73f9e drivers: can: fake: fix header guards
Change the fake CAN driver headers guards to match the updated file
location.

Fixes: f30a5969d0

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-11 09:40:43 +01:00
Mulin Chao b1214ead19 driver: i2c: npcx: simplify smb bank registers with union
For NPCX SMB/I2C SMB modules in FIFO mode, the registers include:

* Common registers, offset 0x00-0x0f, accessible regardless of the value
  of BNK_SEL
* Bank 0 registers, offset 0x10-0x1e, accessible if BNK_SEL is set to 0
* Bank 1 registers, offset 0x10-0x1e, accessible if BNK_SEL
is set to 1

In the current driver, it uses two structures, `smb_reg` and
`smb_fifo_reg`, to access `Common + Bank 0` and `Common + Bank 1`
registers. But It might be easy to misunderstand that they are two
different modules.

This CL tries to simplify this by the following steps:

1. Use `union` to combine `Bank 0/1` registers in the same structure.
2. Remove `smb_fifo_reg`. We needn't use two structures to present
   SMB registers.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-01-11 09:40:36 +01:00
Marti Bolivar 1037348b7b doc: update stale references to boilerplate.cmake
Inclusion of this file is now deprecated in favor of
find_package(Zephyr ...). Update documentation appropriately.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-01-11 09:40:14 +01:00
Marti Bolivar 951664749b cmake: fix and clean up some module doc comments
The boards, shields, and zephyr_module CMake modules have some issues
in their comments that can be trivially fixed up.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-01-11 09:40:14 +01:00
Henrik Brix Andersen d151424a6d scripts: west: runners: canopen: add SDO block transfer support
Add SDO block transfer support for the CANopen program download west
runner. SDO block transfers are experimental in the underlying CANopen for
Python.

Reduce the program download chunk size to half the program download buffer
size to avoid blocking IO.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-11 09:39:57 +01:00
Henrik Brix Andersen 16552e86d9 manifest: update CANopenNode to fix SDO block transfer CRC function
Update CANopenNode revision to fix the CRC calculation for SDO block
transfers.

Fixes: #52479

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-01-11 09:39:57 +01:00
Francois Ramu 302983fd7d drivers: flash: stm32 qspi driver correct device size
The find_lsb_set is giving the position of the first '1' found,
starting from 1. "Bits are numbered starting at 1
from the least significant bit."
So that the find_lsb_set(64MBytes) is 27.
The HAL_QSPI_Init() accepts Init.FlashSize where "FlashSize+1
is effectively the number of address bits
required to address the flash memory."
To get 64MBytes = 2^26, the value of the Init.FlashSize must be 25.
and bit written to the DCR = 25.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-11 09:39:47 +01:00
Francois Ramu 4500dba078 drivers: flash: stm32 ospi driver correct device size
The find_lsb_set is giving the position of the first '1' found,
starting from 1. "Bits are numbered starting at 1
from the least significant bit."
So that the find_lsb_set(64MBytes) is 27.
To get 64MBytes = 2^26, the value of the Init.DeviceSize must be 26.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-11 09:39:47 +01:00
Francois Ramu 2cca8b54a3 drivers: flash: stm32 ospi driver prepare sfdp command
Change the stm32_ospi_read_sfdp to have AddressSize
prepared in one single condition.
Add more debug msg.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-01-11 09:39:47 +01:00
Aleksandr Khromykh 8a58e86d42 tests: Bluetooth: Mesh: create reduced legacy configuration
mesh_shell application has been included recently some set new
abilities that added more functionality for testing.
That caused the application cannot fit in some supported plarforms
like qemu_cortex_m3. The reduced legacy configuration has been
added to fit stack into it. This platform is used in CI.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-01-11 09:39:34 +01:00
Andrei Emeltchenko 5608a80dea tests: logging: Fix wrong buf_check() parameter
After adding checking results from buf_check() fix also parameter.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Andrei Emeltchenko 2ea492e4a9 tests: logging: Add actual buf_check()
Check buf_check() results.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Andrei Emeltchenko b5fd057d90 tests: logging: Use proper type
Function cbpprintf() returns int type and may return negative error
code. Fixes static tool warnings.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-01-11 09:39:23 +01:00
Grzegorz Chwierut f016761859 twister: fix hardware map updates
When re-generating hardware map for DKs with more than 1 serial port (more
enries in the hardware map), then we keep enfo only about the last entry.
For boards like nrf5340 it works, because the last serial port is used,
but for nrf52840 with two ports, the first one is important, so after
re-generating the hardware map it does not work.
The solution is to keep all entries after re-generating the hardware map.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-01-11 09:39:03 +01:00
Michał Barnaś 0918442ba6 ec_host_cmd: add ITE SHI peripheral for the host commands
This commit adds the support for host commands being transported
by the Serial Host Interface on the IT8xxx2 SoC.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-01-11 09:38:45 +01:00
Michał Barnaś 3ae105e76b ec_host_cmd: add NPCX SHI peripheral for the host commands
This commit adds the support for host commands being transported
by the Serial Host Interface on the NPCX SoC.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-01-11 09:38:45 +01:00
Michał Barnaś cbb6742855 ec_host_cmd: add Kconfig to set ec host commands logging level
This commit adds Kconfig CONFIG_EC_HC_LOG_LEVEL that sets the logging
level of host commands subsystem.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-01-11 09:38:45 +01:00