Commit graph

79747 commits

Author SHA1 Message Date
Francois Ramu
d69f7636e3 drivers: serial: stm32 uart driver asserts when baudRate >=16
Change the assertion when evaluating the baudrate to trig if
result is greater or equal to 16.
This will also match the comment : checking BRR.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-05-30 13:16:05 -04:00
Krzysztof Chruściński
4f5be73491 tests: logging: log_link_order: Fix uninitialized memory access
Mocks used in the test were not initializing certain variables.
Valgrind detected that. Test was passing but could fail if some
garbage would end up in that memory.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-05-30 13:15:50 -04:00
Kornel Dulęba
057888836e drivers: sensors: npcx_tach: Clear stale data
The tachometer collects the data continuously setting a "data ready" bit
when it's ready. The availability bit has to be cleared before the
register is updated.
The driver also supports underflow detection, when the bit indicating it
is set the reading of "0" is returned.
The problem here is that there is that once the underflow bit is cleared
we might end up reading stale data.
To prevent that clear the "data ready" bit when underflow is detected

Signed-off-by: Kornel Dulęba <mindal@semihalf.com>
2023-05-30 13:04:28 -04:00
Andrei Emeltchenko
2b607733e6 tests: coap_client: Type case to uint8_t after shift
Type casting to uint8_t before shift by 8 does not make sense.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-05-30 13:04:13 -04:00
Declan Snyder
86fcc5de97 drivers: dma_mcux_lpc: Fix OTRIG build error
Fix the OTRIG related build error in the DMA LPC
by defaulting num_of_otrigs to 0 if a plarform using
the LPC DMA does not specify this property in devicetree.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-05-30 11:07:02 -04:00
Filip Kokosinski
e6672e025f doc/releases: add RISC-V release notes for Zephyr v3.4
This commit adds RISC-V release notes for Zephyr v3.4.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-30 10:50:15 -04:00
Kai Vehmanen
aa5b66be5f intel_adsp: cavs25: configure access to ALH
For Intel cavs2.5, access from LPGPDMAC to Audio Link Hub
RX/TX registers needs to be explicitly enabled before use.

The logic follow hardware initialization done in
SOF project sof/src/platform/intel/cavs/platform.c

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-05-30 10:50:02 -04:00
Siyuan Cheng
d2e91c6b8f drivers: spi: fix spi_dw interrupt mask
Found EMSDP board SPI-FLASH sample broke after adding DFSS
into spi_dw. Found wrong interrput mask resulting in false
interrupt enabled. Now fixed it to fit both DFSS and DW.

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2023-05-30 10:49:47 -04:00
Christopher Friedt
5a7b343d9d tests: posix: eventfd: split into blocking and nonblocking
Set up a test fixture to reduce repetition and split
testsuite into blocking and nonblocking tests.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Christopher Friedt
d3a602ef85 tests: posix: eventfd: normalize includes
Include standard headers first, and then ensure that the
convention of `<zephyr/posix/...>` is followed for internal
POSIX sources.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Christopher Friedt
26b523bf06 tests: posix: eventfd: reduce testing requirements and scope
In order to reduce churn in CI, test only with the default libc.

Additionally, reduce Kconfig options in `prj.conf` to minimum.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Christopher Friedt
49d0dface4 tests: posix: eventfd: be less repetitive in naming
Instead of `ZTEST(eventfd, test_eventfd_...)` use
`ZTEST(eventfd, test_...)`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Christopher Friedt
6da81c8ebf tests: posix: eventfd: consistent testsuite name
Make the cmake project and suite name consistent.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Christopher Friedt
cc9bc2a5e0 tests: posix: eventfd: consilidate into one testsuite
Merge the `eventfd_basic` testsuite with the `eventfd`
testsuite in order to reduce churn in CI.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-05-30 10:46:06 -04:00
Xudong Zheng
147d4067e6 drivers: serial: rpi_pico: add support for hardware flow control
Flow control will be enabled for UART if hw-flow-control is set.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2023-05-30 09:00:09 -04:00
Morten Priess
5db51d3679 Bluetooth: controller: Fix reconfiguring of CIG and CISes
Up until now, it has not been possible to reconfigure a CIG and its
CISes after initial configuration, without first removing the CIG.

With this commit, le_set_cig_parameters allows the following
reconfiguration operations in configuration state:
- Set new CIG configuration parameters on existing CIG
- Iteratively configure single CIS (of more CISes)
- Increment number of CISes via multiple configuration calls
- Keep handle- and CIS_ID relation

Changes:
- Pass handles in le_set_cig_parameters from ll_cig_parameters_commit
  via output variable.
- Implement CIG state variable instead of 'started', with states
  IDLE/CONFIGURABLE, ACTIVE and INACTIVE.
- Implement ll_conn_iso_stream_get_by_id for easier access to specific
  CIS.

This fixes the following CIS Central EBQ tests:
- HCI/CIS/BI-10-C
- HCI/CIS/BI-11-C
- HCI/CIS/BI-13-C
- HCI/CIS/BV-05-C

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-05-30 08:59:16 -04:00
Morten Priess
3fd1fbeff8 Bluetooth: controller: Validate parameters for CIG configuration
Parameter checking updates for passing HCI/CIS/BI* EBQ tests.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-05-30 08:59:16 -04:00
Morten Priess
03faaa9e45 Bluetooth: host: Fix hci_le_remove_iso_data_path direction parameters
The path_dir variable of BT_HCI_OP_LE_REMOVE_ISO_PATH must be bitflags,
with the following meaning:
- BIT(0) : DIR_HOST_TO_CTLR
- BIT(1) : DIR_CTLR_TO_HOST

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-05-30 08:59:16 -04:00
Morten Priess
acd83ad794 Bluetooth: controller: Fix ll_remove_iso_path direction parameter
According to the Core spec, the direction parameter passed to this function
should be bitfields, i.e.:
- BIT(0) : DIR_HOST_TO_CTLR
- BIT(1) : DIR_CTLR_TO_HOST

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-05-30 08:59:16 -04:00
Gerard Marull-Paretas
8a56405808 doc: release-notes: add iterable sections changes
The API resides now in a new header.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
9d8eea80cc doc: release-notes: add Twister changes
Add relevant Twister changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
9a7cb2194c doc: release-notes: inform about COMPILER_TRACK_MACRO_EXPANSION
This option is relevant enough to appear in the release notes, since it
is helpful to ease the debugging of a frequent issue.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
88c0f64b2e doc: release-notes: add PM changes
Add relevant power-management changes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
a5937cdd4e doc: release-notes: add device model changes
Inform about relevant changes to the device model.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
3e505737c6 doc: release-notes: add regulators release notes
Add relevant changes to the regulator driver class.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
6ceb802f84 doc: release-notes: add pinctrl changes
Add new driver additions for pinctrl.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
57f21993a6 doc: release-notes: inform about pinmux removal
Pinmux API has been removed in favor of pin control.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Gerard Marull-Paretas
c502a119e9 doc: release-notes: remove dead TF-M entry
TF-M changes are documented in another section of the document, this is
likely a merge mistake.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-30 08:58:48 -04:00
Andrzej Głąbek
e7fdb31a95 samples: sensor: qdec: Correct encoder emulation
Use phase shift between the emulated A and B signals equal to the half
of the used period instead of a fixed 1 millisecond, to not enforce
decoders to use relatively frequent sampling just to make use of this
emulation.
Add also a few missing `static` keywords.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-30 14:01:04 +02:00
Andrzej Głąbek
b6f266a500 drivers: sensor: qdec_nrfx: Add missing REPORTRDY interrupt activation
This is a follow-up to commit 09fa46ee4e.

Before nrfx 3.0, the QDEC interrupt on REPORTRDY event was activated
implicitly when a `reportper` value other than `DISABLED` was used.
Now, the `reportper_inten` field needs to be used to activate this
interrupt.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-30 14:01:04 +02:00
Anas Nashif
0d8eb8ae45 boards: kv260_r5: should not marked as default twister board
This platform does not support simulation, it should not be built by CI
by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-30 13:04:07 +02:00
Anas Nashif
dae79cefaa twister: coverage: set coverage platforms default to an empty list
When calling twister with --coverage and no platform specified on the
command line, set the the value of coverage platforms to an empty list.

Fixes #57534

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-05-30 06:30:39 -04:00
Krzysztof Kopyściński
972f40db57 Tests: Bluetooth: Mesh: add BSim tests for Private Beacons
This set tests if Private Beacons are advertised properly, with address
changed for every beacon and Random value changing appropriately
regarding the scenario (IV Update, Key Refresh, advertisements on device
with friendship support) and Random Interval state.

All tests contain two devices: tx advertises Private Beacon (has Private
Beacon Server in composition) and rx sets Private Beacon state on tx
device (has Private Beacon Client). On rx device, scan callback is
registered to monitor Private Beacon advertisements.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-05-30 06:30:25 -04:00
Krzysztof Kopyściński
67a33ed1a0 Bluetooth: Mesh: fix Random value generation for Private Beacons
In `private_random_update`, when first beacon is advertised, there could
be a case when uptime is less then interval * 10s
(`priv_random.timestamp` is equal to 0 for first beacon). Then, Private
Random value will not be generated and will be set to all zeros.

New Private Random must also be generated  before Random Interval
expires, when KR or IVU flags are changed. Reset timestamp to 0 on
`bt_mesh_beacon_update` to generate new Random value.

Do not generate new private random if it won't be used (Private Beacon
state is not enabled).

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-05-30 06:30:25 -04:00
Przemyslaw Bida
b020c5d889 net: openthread: Fix OPENTHREAD_FTD dependency.
Thic commit fixes `OPENTHREAD_FTD` dependency to `OPENTHREAD_UPTIME`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-05-30 10:15:08 +02:00
Jaxson Han
08791d5fae arch: arm64: Enable FPU and FPU_SHARING for v8r aarch64
This commit is to enable FPU and FPU_SHARING for v8r aarch64.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-05-30 10:14:55 +02:00
Jaxson Han
0b3136c2e8 arch: arm64: Add cpu_map to map cpu id and mpid
cpu_node_list does not hold the corrent mapping of cpu id and mpid when
core booting sequence does not follow the DTS cpu node sequence. This
will cause an issue that sgi cannot deliver to the right target.

Add the cpu_map array to hold the corrent mapping between cpu id and
mpid.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-05-30 10:14:55 +02:00
Jaxson Han
f03a4cec57 arch: arm64: Fix the STACK_INIT logic during the reset
Each core should init their own stack during the reset when SMP enabled,
but do not touch others. The current init results in each core starting
init the stack from the same address which will break others.

Fix the issue by setting a correct start address.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-05-30 10:14:55 +02:00
Jaxson Han
101ae5d240 arch: arm64: mpu: Remove LOG print before mpu enabled
LOG system has unalignment access instruction which will cause an
alignment exception before MPU is enabled. Remove the LOG print before
MPU is enabled to avoid this issue.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-05-30 10:14:55 +02:00
Jaxson Han
7d174eed41 test: kernel: fpu_sharing: Fix text exception by increasing the stack size
The test case will show an unexpected exception in the idle thread after
all test cases pass. The issue is caused by the main thread
stackoverflow.

Increase the main stack configured in this test case to fix the issue.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-05-30 10:14:55 +02:00
TOKITA Hiroshi
5f5b34793d samples: net: dhcpv4_client: Make DHCPv4 requests on all ipv4 interfaces
Send DHCPv4 requests on all available ipv4 interfaces.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-05-29 14:34:46 -04:00
Lukasz Mrugala
072ca4bfeb tests: lib: devicetree: Docstring typo fix
Word 'platform' misspelled as 'plaform'.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-05-29 14:34:33 -04:00
Lukasz Mrugala
2d1ab025b0 tests: shared_multi_heap: Docstring typo fix
Word 'platform' misspelled as 'plaform'.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-05-29 14:34:33 -04:00
Lukasz Mrugala
fe3f5816b8 testsuite: Docstring typo fix
Word 'platform' misspelled as 'platorm'.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-05-29 14:34:33 -04:00
Lukasz Mrugala
164c26ff18 scripts: Typo in the word 'platform' fix
testinstance.py contains a string literal comparison to the
word 'platform', which has been misspelled as 'plaform'.

The change is verified by a test expansion.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2023-05-29 14:34:33 -04:00
Henrik Brix Andersen
5f67426b93 drivers: can: mcan: do not iterate all filter elements to find free one
There is no need for iterating all the Bosch M_CAN filter elements in
Message RAM in order to find a free filter as the driver already keeps
track of assigned filters.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Henrik Brix Andersen
0f36f1a3ee drivers: can: mcan: use per-instance message RAM configuration
Restructure the Bosch M_CAN driver backend to use per-instance Message RAM
configuration.

This removes the need for a common, artificial "can" devicetree node for
SoCs with multiple Bosch M_CAN-based CAN controllers and allows for
per-instance configuration of the number of e.g. standard (11-bit) and
extended (29-bit) filter elements.

As part of the restructure, software handling of CAN filter flags was moved
from per-flags bitfields to per-filter bitfields, solving an issue when
using more than 32 standard (11-bit) filter elements or more than 16
extended (29-bit) filter elements.

Fixes: #42030, #53417

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Henrik Brix Andersen
d112e08f0c drivers: can: mcan: remove unused message marker split
The Bosch M_CAN Message Marker, an 8-bit field copied from Tx Buffer
elements to Tx Event FIFO elements to aid software in identifying Tx frame
status, need not be split into an index and a count, as the count is
unused.

Remove this split and replace "struct can_mcan_mm" with a simple "uint8_t".

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Henrik Brix Andersen
d452a0043d drivers: can: mcan: add build asserts for message RAM configuration
Add build asserts to ensure the Message RAM configuration meets the
IP core restrictions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00
Henrik Brix Andersen
de659f9f61 drivers: can: stm32: fdcan: message RAM layout is fixed
The Message RAM layout used by the STM32 FDCAN IPs contains a fixed number
of elements, even though the software can opt to use less standard/extended
filter elements. Change the BUILD_ASSERT() statements to reflect this.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-05-29 14:34:19 -04:00