Commit graph

90201 commits

Author SHA1 Message Date
Benedikt Schmidt 2141bb4561 drivers: spi: fix unreliable SPI busy flag for some STM32 devices
Extend the workaround for the unreliable SPI busy flag
to all F7 and L4 devices, which are affected by the same
erratum.

Fixes  #67739

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-01-23 09:46:57 -05:00
Toon Stegen 8ae315764c boards: arm: stm32h750b_dk: add support for QPSI flash
devicetree definition for quad spi

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2024-01-23 09:46:25 -05:00
Fabio Baltieri 1dd2307b3f input: gpio_qdec: add optical encoder support
Change the gpio_qdec driver to support optical encoders.

Add a property to use for defining an arbitrary number of GPIOs for the
sensing devices (typically infrared LEDs, but could also be the
biasing for the phototransistor), and one for adding a delay between
turning those on and reading the pin status.

The infrared LEDs typically consume a non negligible amount of power, so
there's also a new idle-poll-time-us property that enables two possible
modes of operation:

- if idle-poll-time-us is zero (default) the LEDs are enabled all the
  time and the driver enters polling mode using the GPIO interrupt as
  with mechanical encoders. This is usable for mains powered devices and
  has the lowest overhead on the CPU.

- if idle-poll-time-us is non zero, then the driver polls the encoder
  all the time, turning on the LEDs just before reading the state and
  shutting them off immediately after, but when the encoder is idle it
  switches the polling rate to idle-poll-time-us to save power, and only
  polls at sample-time-us when some movement is detected.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-23 09:45:57 -05:00
Fabio Baltieri 91ee5c4db2 input: gpio_qdec: rename gpio to ab_gpio
Rename gpio to ab_gpio, this is in preparation for adding another gpio
pointer.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-23 09:45:57 -05:00
Grzegorz Chwierut 3e234966dc twister: pytest: Update MCUmgr helper method
Update helper method used by pytest fixtures. Extended upload
method with 'slot' parameter. Added searching of uploaded images
that can be tested or confirmed.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-01-23 09:45:27 -05:00
Vinayak Kariappa Chettimada 585d98e0d8 Bluetooth: Controller: Fix prepare overhead in scheduling ISO
Fix double prepare overhead considered in scheduling
extended, periodic and ISO broadcast radio events when using
LOW LAT variant.

ticks_slot maintained in ticker includes the overhead, the
ticks_slot stored in role/state context exclude the overhead
hence take care to include ticks_slot_overhead when value is
used from context and not when value used from ticker nodes.

Add jitter due to ticker resolution unit between scheduled
radio events. This will allow the synchronizing side too to
not overlap due to ticker resolution related jitter.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:29 +01:00
Vinayak Kariappa Chettimada 4a51f68bcc Bluetooth: Controller: Fix ISO Sync Receiver subevent Rx window
Fix ISO Synchronized Receiver subevent Rx window timing and
PDU address receive timeout to consider the +/- 2us active
clock jitter.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:16 +01:00
Vinayak Kariappa Chettimada 83174ef7dc Bluetooth: Controller: Fix ISO Sync Receiver sequential subevent skip
Fix ISO Synchronized Receiver sequential packing subevent
skip to next BIS subevent, so that radio channel is
correctly calculated.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:45:02 +01:00
Vinayak Kariappa Chettimada 6e51950cd8 Bluetooth: Controller: Use EVENT_OVERHEAD_RESERVE_MAX in Periodic Sync
Use EVENT_OVERHEAD_RESERVE_MAX conditional compile in
Periodic Advertising Sync implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-23 14:44:41 +01:00
Yong Cong Sin 8cfff4b48f tests: devicetree: api: align DT_IRQN test
Not sure why the `DT_IRQN` tests are tabbed, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 734a7db5c4 devicetree.h: rework multilevel interrupt encoding macros
Now that we have a very easy way to get the interrupt
controller and the interrupt level of a node, we can
simplify the multilevel interrupt encoding macros.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 170c659292 tests: devicetree: api: test DT_IRQ_LEVEL and DT_INST_IRQ_LEVEL
Added new test for `DT_IRQ_LEVEL` and `DT_INST_IRQ_LEVEL`.

Introduced a new `vnd.cpu-intc` compatible so that we have a
root level interrupt controller that acts as level 1
aggregator, and modified `test_intc` to be level 2 aggregator,
updated test of `DT_IRQN(TEST_I2C_BUS)` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 0b43699366 devicetree.h: add macros to get the interrupt level of a node
Added new DT macros to get the interrupt level of a node.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 450a66fa36 gen_defines: output the interrupt level of a node
Currently it is tedious to know the level of an interrupt for
a node in C. One would have to go through a very complex and
error prone macros to check if there's a parent interrupt
controller & if the controller has an interrupt number and thus
not a pseudo interrupt controller like the one found in
`rv32m1`. The level of a node is required to encode the
Zephyr's multi-level interrupt number

Since it is easier to do it in the `gen_defines` script, let's
do the heavy lifting there so that we can introduce new DT
macros to get the interrupt level very easily later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:48:16 -05:00
Yong Cong Sin 89fb8f8b98 gen_isr_tables: print index number at the end of each entry as comment
Make it easier to debug by printing the index number at the
end, this is especially helpful when there's a lot of
interrupts.

Before:

```c
/* build/zephyr/isr_tables.c */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)},
```

After:

```c
/* build/zephyr/isr_tables.c */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 0 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 1 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 2 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 3 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 4 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 5 */
{(const void *)0x0, (ISR)((uintptr_t)&z_irq_spurious)}, /* 6 */
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-23 06:40:32 -05:00
Christopher Friedt 8556ae5afe samples: posix: change Subsystem to API
The POSIX API in Zephyr is considered more of a library than a
Subsystem.

Adjust the samples doc to reflect that.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Christopher Friedt f6373d6918 samples: portability: link to posix samples
POSIX API Samples live in another directory, but they should
still be easy to find from Portability Samples.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-23 10:03:13 +00:00
Peter Mitsis 7c5a57b87b tests: latency_measure: Fix MPU fault
Fixes an MPU fault that was occurring on some ARM platforms when
executing the events portion of the latency_measure benchmark. The
fault was tracked to an attempt by a user thread to read an MMIO
register that it did not have permissions to access.

The solution was to move the printing of the stats averages out of
the test thread and into the main thread as the main thread always
executes at kernel/supervisor level and will always have permissions
to read that MMIO register.

Fixes #67438

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-23 10:02:46 +01:00
Benjamin Cabé de21b50002 doc: guidelines: drop mentions of Parasoft Codescan
Drop the section of the coding guidelines that's referring to Parasoft
Codescan as it's not used by the project anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-01-23 10:02:39 +01:00
Ayush Singh ef04b5226e MAINTAINERS: Add BeagleBoard Platforms
- Due to the incresing support for ZephyrRTOS in BeagleBoard boards, it
  would be good to have this entry.
- Was discussed in Discord when asking for help for PR review

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-01-23 10:02:32 +01:00
Sean Madigan a9a3b808e8 samples: bluetooth: iso_receive: Allow syncing any subevent number
When using softdevice controller on iso_broadcast sample, the BIG
created uses more than 1 subevent. This means that when you try to
use the iso_receive sample to sync it does not work.

So update the sample to use mse=0 and allow any number of subevents,
making the sample more flexible and work with SDC without any changes.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-01-23 10:02:26 +01:00
Przemyslaw Bida a6184b9be3 net: openthread: Fix key import in case of ECDSA.
According to PSA specification in case of `PSA_KEY_TYPE_ECC_KEY_PAIR`
function `psa_import_key` takes private key from key pair as argument.
This commit adds extraction of Private key from ECDSA key pair.

Also removes not needed `otPlatCryptoEcdsaGetPublicKey`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-01-23 10:02:17 +01:00
Przemyslaw Bida f661aa7641 net: openthread: Regular openthread upmerge to 00076af
Regular upmerge.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-01-23 10:02:17 +01:00
Anders Storrø 93a6ee501a Bluetooth: Mesh: Add artificial beacon delay
After removing 20ms in advertiser, all subnetwork beacons are sent as high
dense packet of frames with minimal distance between them. That might
cause collisions if beacon interval on devices will coincide.

This commit adds an artificial delay between each subnet advertsing
beacons.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2024-01-23 10:02:00 +01:00
Gerard Marull-Paretas 68799d507d arch: riscv: make __soc_is_irq optional
It looks like all SoCs in tree check if an exception comes from an IRQ
the same way, so let's provide a common logic by default, still
customizable if the SoC selects RISCV_SOC_ISR_CHECK.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 49e2bc69a2 arch: riscv: add RISCV_HAS_(C|P)LIC from soc/riscv
Because these are general RISC-V options, not soc specific.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 2dcbb0ee3f soc: riscv: make RISCV_HAS_(C|P)LIC promptless
These options are meant to be selected by SoC series supporting
(C|P)LIC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Gerard Marull-Paretas 00904c4267 boards: riscv: beaglev_fire|mpfs_icicle: drop redundant options
CONFIG_RISCV_SOC_INTERRUPT_INIT=y and CONFIG_RISCV_HAS_PLIC=y are both
defaulted to y by the board SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-23 09:57:57 +01:00
Anas Nashif 6df6935b67 intel_adsp: ace: do not use external kconfigs in code
use CONFIG_SOC_INTEL_ACE15_MTPM instead of CONFIG_ACE_VERSION_1_5.

CONFIG_ACE_VERSION_1_5 leaked from SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-22 17:02:47 -05:00
Declan Snyder e4b761aafb MAINTAINERS: Create NXP Drivers group
Create NXP Drivers group separate from the platforms.
The idea being that currently there are two problems:

- All the Drivers drivers are falling under the responsibility
of the MCUX platforms' maintainers, some of whom do not have the
cycles or interest to maintain these things.

- The maintainers of the other platform groups do not get counted
as reviewers of the Drivers drivers that their platforms use.

So, separate all the driver files from the MCUX platforms, and add the
relevant people who have an interest in maintaining the Drivers, including:

- At least one maintainer of each platform group, and
- The NXP contributors who are highly active in maintaining
  and reviewing the NXP drivers in upstream Zephyr.

Another two problems this PR fixes:

- The platforms of the other NXP groups are still falling under the MCUX
  group. Exclude the platforms of the other NXP groups from MCUX group.
  MCUX group will still be the default group for unsorted NXP platforms.

- Add a few file paths to some of these groups to cover a few missed
  files, and add description properties of the NXP groups.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-01-22 15:25:53 -05:00
Anas Nashif 5df0cf1701 MAINTAINERS: add wildcard for ITE drivers
Include ITE drivers in ITE platforms area.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-22 14:48:01 -05:00
Jonathan Rico 52a44eb19b MAINTAINERS: Add HoZHel to "Bluetooth HCI"
They are actively contributing to Bluetooth HCI drivers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-22 13:26:34 -06:00
Jonathan Rico cbdc91f7a3 MAINTAINERS: Add "Bluetooth HCI" section
Split out the HCI drivers from the main Bluetooth sections.
The contributors to those are usually silicon vendors.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-22 13:26:34 -06:00
Dawid Niedzwiecki ea630294d3 logging: add flag to skip source info
Add a flag to skip printing the source info.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-01-22 14:05:11 -05:00
Seppo Takalo bf872870ea net: lwm2m: Fix segfault on failed bootstrap
If bootstrap fails, RD client will call lwm2m_engine_stop()
which will close the context.
The socket loop, however still contains a call to
hint_socket_state(context, NULL) which has a null pointer now.

Fix the segfault by allowing nullpointer on hint_socket_state().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-01-22 17:25:02 +00:00
Seppo Takalo f96c766fd8 tests: lwm2m: Rename engine to observation
"engine" directory contained tests for observation
so rename it.
There is separate "lwm2m_engine" directory that contains
tests for the engine itself.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-01-22 18:22:43 +01:00
Markus Swarowsky 54a938a67a doc: services: tfm: Update version 2.0.0 in overview
Update the mention of the "currently integrated" version of TFM to match
the latest upgrade.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2024-01-22 18:22:33 +01:00
Vinayak Kariappa Chettimada 4158d9523e Bluetooth: Controller: Fix extended scanning data length assertion
Fix assertion due to LLL scheduling of auxiliary PDU
reception was not considered in the ULL when checking for
accumulated data length exceeding the supported maximum scan
data length. This caused the auxiliary context to be release
while LLL was still active with scheduled PDU reception.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-22 16:55:09 +01:00
Yong Cong Sin 8262766a0a tests: lib: devicetree: api: fix reg addr mismatch for test-mtd@ffeeddcc
Fix unit address and first address in 'reg' (0x0) don't match
for /test/test-mtd@ffeeddcc.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-22 15:49:53 +00:00
Greter Raffael 7bcd0699e6 gen_isr_tables: Add meaningful error message
When using direct isrs, a vector table is needed. However, if none is
present , i.e. `CONFIG_GEN_IRQ_VECTOR_TABLE=n`, this script failed. The
given error message was not helpful (`'NoneType' has no len()`).
This change makes it clearer, where to look for the problem.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2024-01-22 15:28:39 +01:00
Pisit Sawangvonganan 78faf5eb8e drivers: gnss: quectel_lcx6g: fix compilation error when CONFIG_PM_DEVICE=y
Fixes a compilation error in quectel_lcx6g driver when CONFIG_PM_DEVICE=y.
Corrects the function call in quectel_lcx6g_suspend from
'modem_chat_run_script_run' to 'modem_chat_run_script'.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-22 14:08:58 +00:00
Mustafa Homsi e51c47bf43 Bluetooth: Controller: Fix regression in BT_CTLR_USED_PPI_CHANNELS
Fix regression in BT_CTLR_USED_PPI_CHANNELS introduced
in commit e39d98302d ("Bluetooth: Controller: nRF53:
Cleanup dppi and dppi resources file").

Signed-off-by: Mustafa Homsi <mustafa.homsi@rivieh.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-01-22 14:31:12 +01:00
Fabian Blatz 7cc46e6948 modules: lvgl: Update CMakeLists for 8.3.11
Update CMakeLists to include new files, sort existing ones.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-01-22 14:02:40 +01:00
Fabian Blatz 2a11c64876 manifest: update LVGL to v8.3.11
Related to zephyrproject-rtos/lvgl#47

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-01-22 14:02:40 +01:00
Sandip Dalvi 68bea80111 net: ipv6: Add APIs to check ipv6 address is site local and global
Add APIs to check the IPv6 address is site local or is global.

Signed-off-by: Sandip Dalvi <sandip.dalvi@nxp.com>
2024-01-22 13:09:23 +01:00
Emil Gydesen aef39f6923 Bluetooth: BAP: Fix issue with setting invalid iso data path
BAP would always set up the ISO data path in both directions,
even for unidirectional CIS. This meant that in the
unconfigured direction, the data path configuration data
would all be 0, which causes issues on some controllers.

The new refactored approach implemented by this commit
will always ensure that the data path is setup correctly,
and that we only set the data path in one direction for
unidirectional CIS. The unset path will use the default
ISO path of HCI and transparant format, which should always
be allowed by a controller.

This is building on the requirement in BAP that all streams in
a unicast group shall be QoS configured at the same time. This
ensures that before any streams in the CIG has been connected,
they have all been configured.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-01-22 13:09:16 +01:00
Henrik Brix Andersen e4c3f30feb doc: releases: migration-guide: 3.6: list removal of can_get_max_bitrate_t
Add a note about the removal of the optional can_get_max_bitrate_t callback
from the CAN controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 4340724fd0 drivers: can: use common accessor for getting maximum supported bitrate
Use a common accessor for getting the maximum supported bitrate of a CAN
controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 0875a752c1 tests: drivers: can: api: fix uninitialized variable warning.
Fix a warning about unitialized variable. The test will be skipped in this
code path.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00
Henrik Brix Andersen 766ce3c1e2 drivers: can: fake: add common configuration and data structures
Add common configuration and data structures to the fake CAN driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-22 13:09:09 +01:00