Commit graph

83623 commits

Author SHA1 Message Date
Jiang Wei W a5f4beccd2 drivers: ipm: add init version of sedi ipm driver
add init version of sedi ipm driver

Signed-off-by: Jiang Wei W <wei.w.jiang@intel.com>
2023-09-08 14:43:17 +02:00
Piotr Narajowski 925a8b65d5 bluetooth: tester: MICP Client tests
Add support for MICP Client tests.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-08 14:43:00 +02:00
Piotr Narajowski 96954acfff bluetooth: audio: Add API to get MICP service ATT handles
This is needed for upper tester.

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2023-09-08 14:43:00 +02:00
Florian Grandel d218b20643 tracing: make API tracing configurable
So far only object tracing/tracking could be individually disabled (e.g.
CONFIG_TRACING_SEMAPHORE=n). Now tracing of any API may be disabled
(e.g. CONFIG_TRACING_PM=n).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-08 06:10:14 -04:00
Christopher Friedt 20b81a865d twister: support scanning for ztests in subdirectories
Previously, only the main src/ directories was scanned for
ZTest testsuite names and tests. This allows us to place
test sources in subdirectories as well.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-09-08 06:08:58 -04:00
Chaitanya Tata 6b05af6e43 twister: handle quotes for configuration options
Add support handling quotes for configuration options in extra args by
escaping them properly instead of removing the quotes altogether. For
other options in extra_args quotes are removes as usual.

Add similar support in west build command also.

Add a unit test to check this functionality.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-09-08 06:04:48 -04:00
Benjamin Cabé faa8bb5bb8 samples: remove leftovers from current_sensing sample
Remove leftovers of a code sample that was (only partially) deleted
with PR #35538

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:11:38 +02:00
Benjamin Cabé c26679be42 samples: net: cloud: drop Google Cloud IoT Core
Google Cloud IoT Core has been retired on August 16, 2023.
Removed the sample and the link to it in a previous release note.
Added a redirect to other IoT cloud samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-08 11:04:25 +02:00
Fabio Baltieri 7140b6f9c1 modules: lvgl: initialize lvgl_heap_init from lvgl_init
Call lvgl_heap_init from lvgl_init rather than using two separate
SYS_INIT, this sensures that the heap is initialized correctly
regardless of the relation between CONFIG_KERNEL_INIT_PRIORITY_DEFAULT
and CONFIG_APPLICATION_INIT_PRIORITY.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-08 09:43:24 +02:00
Florian Grandel f7e5a103b6 drivers: serial: uart_cc13xx_cc26xx: fix race
Fixing a race in tx/rx_constrained flag access.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-08 09:26:34 +02:00
Florian Grandel c9c6676bdd doc: sys: atomic: improve bitset accessor doc
Removes an ambivalence in return value description.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-08 09:26:28 +02:00
Piotr Zierhoffer 723c4c45dc dts/arm/nuvoton: Add compat strings to NPCX SoCs
Compat strings in SoCs allow tools to identify hardware described in
flattened device trees.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
2023-09-08 09:25:43 +02:00
Fabio Baltieri c03d0f83c8 drivers: charger: fix i2c_dump_msgs_rw argument
Fixes:

zephyr/drivers/charger/emul_sbs_charger.c:70:26: warning: passing
argument 1 of ‘i2c_dump_msgs_rw’ from incompatible pointer type
[-Wincompatible-pointer-types]

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 21:41:31 +02:00
Benjamin Cabé 2c8dbc4e8b esp32: samples: Use esp32_devkitc_wroom board instead of esp32
Following #58454, fixed a few remaining references to old "virtual"
esp32 board.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-07 20:18:41 +02:00
Gerard Marull-Paretas 64968d7402 drivers: gpio: fix optional operations usage
Only provide implementations for optional operations if needed. This
patch deletes quite a few dummy `pin_interrupt_configure` ops (now
optional), and adjusts ifdeffery on some drivers so that optional ops
are only provided if they implement real functionality.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-07 20:18:33 +02:00
Gerard Marull-Paretas 35500e4d15 drivers: gpio: gpio_get_pending_int: s/ENOTSUP/ENOSYS
Because -ENOSYS is the right error code to be used if op is not
implemented.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-07 20:18:33 +02:00
Gerard Marull-Paretas b03ef6c8ba drivers: gpio: gpio_add|remove_callback: s/ENOTSUP/ENOSYS
-ENOSYS is the right error code to be returned if an op is not
implemented by a driver. Also clarify the documentation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-07 20:18:33 +02:00
Gerard Marull-Paretas 603b49b70a drivers: gpio: pin_interrupt_configure is optional
Some GPIO controllers do not support interrupts, so allow drivers to not
provide this operation.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-07 20:18:33 +02:00
Jonathan Rico 22bde976e5 Bluetooth: l2cap: validate reconfigure packet length
The specification only allows up to 5 16-bit CIDs in this PDU.
Enforce it.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-09-07 20:18:06 +02:00
Fabio Baltieri 9c5dafed95 util: add type checking to CONTAINER_OF
Add a SAME_TYPE checking macro and use it to add type validation to
CONTAINER_OF. This is inspired by the Linux container_of implementation.

The check is inhibited when using C++ as __builtin_types_compatible_p is
not available there.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 20:17:48 +02:00
Jerzy Kasenberg 48c56cebaa drivers: gpio: Smartbond: Add pdc support
This change allows to have GPIO interrupts configured
that will work while chip enters low power modes where
PD_COM is turned off.

PDC controller can wake up system on GPIO changes even when
PD_COM is off.

This is done by adding PDC entries that will wakeup Cortex-M33
at the same time when WAKEUP controller is programmed to
handle GPIO state changes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-09-07 20:16:56 +02:00
Jerzy Kasenberg a9b44e08df drivers: gpio: Smartbond: add support for both edge triggers
Hardware supports only one edge for GPIO interrupt.
This adds software implementation that hides hardware restriction.

With this change user code can use GPIO_INT_TRIG_BOTH and does not
have to do it in application code.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-09-07 20:16:56 +02:00
Jerzy Kasenberg 766af4cc0c drivers: gpio: Smartbond: correct gpio init level
Init level for GPIO drivers is set PRE_KERNEL_1.
Smartbond(tm) driver had it set to POST_KERNEL by accident.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-09-07 20:16:56 +02:00
Ricardo Rivera-Matos a627035290 charger: Adds basic stub API doc
Adds a short stub doc as a placeholder for future documentation in the
charger API.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Ricardo Rivera-Matos aee815f19d charger: Sample sbs charger driver with tests
Adds a sample sbs charger driver and basics tests.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Ricardo Rivera-Matos a7adb06ff4 charger: Initial charger dedicated API
Add initial charger driver API with the most basic of native_posix
driver tests.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2023-09-07 13:03:13 -04:00
Fabio Baltieri 2c2124de76 samples: timer_synchronization: exclude qemu_arc_hs5x
Exclude qemu_arc_hs5x from the test, seems to fail since f0daf90. Other
ARC platform works so let's exclude this one while the issue is
investigated.

Link: https://github.com/zephyrproject-rtos/zephyr/issues/62405
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 16:22:59 +02:00
Piotr Dymacz 4d678207b7 boards: arm: cc1352*/cc26x2r1: add mcuboot-{led0,button0} aliases
This adds DT aliases for LED and button used in recovery mode of the
MCUboot bootloader, on the following CC13x2/CC26x2 based boards:

- CC1352P1 LaunchXL (CC1352P)
- CC1352R1 LaunchXL (CC1352R)
- CC1352R SensorTag (CC1352R)
- CC26x2R1 LaunchXL (CC2652R)

For all boards a red LED and second button (not the one used by the
TI ROM bootloader) was selected.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-09-07 08:51:21 -05:00
Piotr Dymacz 57fa44c8a7 boards: arm: cc1352*/cc26x2r1: define flash partitions for MCUboot
This introduces partitions layout for the internal flash and includes
'zephyr,code-partition' property in 'chosen' node, in DTS files of the
following boards with the Texas Instruments SimpleLink CC13x2/CC26x2
MCU family:

- CC1352P1 LaunchXL (CC1352P)
- CC1352R1 LaunchXL (CC1352R)
- CC1352R SensorTag (CC1352R)
- CC26x2R1 LaunchXL (CC2652R)

The flash layout is defined as below (the same for all boards):

- boot_partition:     40 KiB (0xa000)
- slot0_partition:   136 KiB (0x22000)
- slot1_partition:   136 KiB (0x22000)
- storage_partition:  32 KiB (0x8000)
- unused:              8 KiB (0x2000)

All partitions are aligned on the internal flash sector size (8 KiB),
last sector is left unused as it contains 'CCFG' (defined as 88-bytes
partition in MCU's DTSI).

This change allows to use listed boards with MCUboot bootloader.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-09-07 08:51:21 -05:00
Piotr Dymacz 98e104fe3d soc: cc13x2_cc26x2: disable CCFG when building MCUboot chain-loaded images
The 'CCFG' (Customer Configuration) occupies 88 bytes in topmost flash
sector (8 KiB) and is by default always included in the final image.

This disables including CCFG part when building images for chain-loading
by the MCUboot bootloader.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-09-07 08:51:21 -05:00
Benedikt Schmidt 8d956b85ba CODEOWNERS: add codeowner of AD56XX
Add myself as codeowner of the DAC driver for the AD56XX.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Benedikt Schmidt ac02559447 tests: drivers: dac: add AD56xx
Add instances of the DACs AD56xx to the build all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Benedikt Schmidt 536f8ae9cd drivers: dac: add driver for AD568xx
Implement a driver for the DAC AD56xx series.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Benedikt Schmidt 54f8c2b98b dts: bindings: dac: add AD56xx
Add bindings for the DACs AD56xx.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-09-07 08:48:32 -05:00
Gerard Marull-Paretas 0371708ba4 boards: arm: (mimx|vmu_)rt1170: fix documentation issues
- Remove duplicated labels (not sure why they were not spotted by doc
  CI?)
- Fix titles

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-07 14:27:31 +02:00
Alexander Razinkov 9ae9df8b6f kernel: spinlock: k_spin_is_locked introduction
Currently spinlock internals are directly accessed from the tests.
This way the test becomes bound to the particular spinlock implementation.
To remove this unnecessary dependency the distinct API to check if spinlock
is locked is introduced.

k_spin_is_locked should be used for the spinlock testing only,
so the scope of this API is intentionally restricted.

Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
2023-09-07 14:26:55 +02:00
Fabio Baltieri 22fbd73fab sensor: max17055: fix v_empty setting
Fix the whole v_empty setting code, this was using a wrong scaling
factor, but also incorrectly clearing the recovery voltage part of the
register.

Change the code to read the previous value and mask out the bits not
used by VE.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 14:25:47 +02:00
Morten Priess 79ab982f46 Bluetooth: controller: Introduce config for avoiding SDU fragmentation
The CIS Central uses the algorithm described in BT Core 5.4 Vol 6,
Part G, Section 2.2 to calculate the Max_PDU value for framed mode.

However, HAP needs the Max_PDU to be calculated according to "Core
enhancement for ISOAL CR" coming with the "Atlanta" update. With this
update, the fragmentation is controlled via a parameter at CIG creation.

Enabling CONFIG_BT_CTLR_CONN_ISO_AVOID_SEGMENTATION will set the
ISO_Interval to 7.5 ms for a 10 ms framed CIG, and calculate Max_PDU to
45/65 for 16/24 kHz.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2023-09-07 14:25:35 +02:00
Fabio Baltieri 02afefe34a sensor: f75303: fix i2c_dump_msgs_rw argument
i2c_dump_msgs_rw argument should be the device pointer.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 13:41:12 +02:00
Maciej Perkowski 97a7743811 boards: Allow mps2_an521_ns to execute tfm tests
Allow mps2_an521_ns to execute tests with trusted-firmware-m tag.
Resolve an error when this platform is selected as an integration
platform in tests marked with the given tag.

Fixes: #62380

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-09-07 13:00:49 +02:00
Maciej Perkowski c15ec57e6e Revert "samples: tfm: Fix test definition"
This reverts commit 811b0bd8fb.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-09-07 13:00:49 +02:00
Alberto Escolar Piedras 811b0bd8fb samples: tfm: Fix test definition
32a9d13d61
introduced a new required tag for this test
which the integration platform does not "support"
causing the testplan generation to error out.

Fix it by removing the offending tag from the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-07 11:46:20 +02:00
Robert Lubos 370096e4f5 net: tcp: Fix goto condition in case of RST/packet error
In case RST packet is received or malformed packet is received, the TCP
should not proceed with the state machine execution (which may process
the invalid packet) but rather jump directly to exit, where the
connection will be closed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-07 11:41:52 +02:00
Robert Lubos 16870cd664 tests: net: tcp: Add test case for SYN/RST+ACK scenario
Add TCP test case which verifies that if RST+ACK packet is received
during TCP handshake, the connection is brought down and
net_context_connect() fails.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-09-07 11:41:52 +02:00
Fabio Baltieri fb003d1aa8 scripts: check_init_priorities: add priority to the file debug print
Log the device priority on the file debug output print, this is
convenient to list out all the defined devices and their priority, even
if they don't depend on each other.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 09:49:55 +02:00
Bjarki Arge Andreasen 111db23d0a net: mgmt: Fix memory corruption in wait_on_iface
The net_mgmt subsystem offers a function which waits (blocks)
until a specified net event occurs. An event callback is
pushed to the stack, then added to the net_mgmt_event_callback
list. If the event occurs, the net_mgmt thread calls the
callback and deletes the callback from the list. However, if
the event does not occur within the timeout specified when
invoking mgmt_event_wait_call() the function will return,
corrupting the callback structure the stack is reused.

This PR fixes the issue by deleting the callback before exiting
in case the event does not occur.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-09-07 09:44:06 +02:00
Martin Jäger f13791d5ba canbus: isotp: use flags for configuration in isotp_msg_id
The previous design with dedicated bits in the structure required a
user to explicitly set each bit.

Using one flags variable allows to extend the features more easily
in the future and avoids breaking existing code.

This change is particularly useful for the FDF and BRS flags required
for CAN-FD support.

See also previous similar change for the CAN driver in
f8a88cdb27

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-07 09:43:56 +02:00
David Brown 7c80473e0a samples: tfm: Remove old 'tfm' tag
To avoid confusion having both a 'tfm' and a 'trusted-firmware-m' tag,
remove the old 'tfm' tag entirely.  Any external test frameworks that are
using the 'tfm' tag will need to be changed to account for this.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown a5e70cd40d samples: tfm: Also test tfm when mcuboot changes
In addition to running the tfm tests when the trusted-firmware-m module
changes, most of the tests also use MCUboot, which comes from our module.
Add the mcuboot tag to each of these tests, except for the single test that
explicitly builds without using MCUboot.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00
David Brown 32a9d13d61 samples: tfm: Update tag to run tests on module change
A recent change #61718, adds support to the twister build to check for
manifest changes, and run tests using tags based on the modules that have
changed.  The tfm tests have an existing tag `tfm` to select these tests,
but the above patch uses a tag named after the module, trusted-firmware-m.
To make this work, add `trusted-firmware-m` in addition to the existing tag
`tfm` so that these tests will run whenever the tfm module is updated.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-07 09:43:43 +02:00