Compare commits

...

2124 commits

Author SHA1 Message Date
Daniel Leung
b7b4de8afe uart: refactor internal bits from public API header file
This refactors internal bits out of the public API header file
and into its own file. This includes:

* Driver API struct which is only used by driver implementations
  but not by users of API.
* Inline implementations of various APIs.
* Inline z_impl_*.

These are implementation details that do not need to live within
the public API header file. This de-clutters the public header
file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-26 14:47:01 +00:00
Adam Kondraciuk
be1f40547f soc: nordic: nrf54h: disable IRQ before PM config
IRQs must be disabled before starting any procedures to prepare
for low-power states.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Adam Kondraciuk
e786c1f849 dts: arm: nordic: Add power states for nRF54H20
Add `idle` and `s2ram` power states for nRF54H20 cpuapp and cpurad.
Also the substate `idle_cache_disable` added.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Adam Kondraciuk
9b252855fd soc: nordic: Add LRCCONF management
Due to the possibility of simultaneous accesess to LRCCONF registers,
additional management is required.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Dominik Kilian
d5262b2113 modules: hal_nordic: Allow app mem from net core in serialized 802.15.4
Currently, the serialization module for 802.15.4 enabled
the network core without giving it access to application
core memory in trusted execution mode. This commit
grands this access.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-11-26 14:46:47 +00:00
Tomi Fontanilles
4b9c58806b tests: portability: cmsis_rtos_v2: do not disable 64-bit timeouts
Some code that automatically gets embedded on some platforms relies
on having `CONFIG_TIMEOUT_64BIT` enabled.
Do not force disabling that Kconfig option in the test configuration,
as that will make the test fail to compile on those platforms.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-11-26 14:46:38 +00:00
Robin Kastberg
a63926d44a cmake: linker_script: update common-ram.cmake
CMAKE_LINKER_GENERATOR common-ram.cmake is out of date.
This updates it to keep it up to date with common-ram.ld

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-26 14:46:24 +00:00
Karsten Koenig
a4fcd5e9e0 dts: bindings: arm: nordic: tddconf: Add etrbuffer
Introduce etrbuffer in the tddconf bindings to support flexible
placement in the memory map.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2024-11-26 14:45:22 +00:00
Simon Hein
61f2b117a9 SCA: Get options file value for sysbuild invokation
Get eclair specific option file variable via zephyr_get.
This is also needed if the sca is invoked with sysbuild so it uses
the intended file.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-11-26 14:45:09 +00:00
Tomasz Moń
cb1e7d6b6b nrf_usbd_common: Do not trigger DMA in low power mode
DMA transfers do not execute when the USBD peripheral is in Low Power
mode. Make sure that there is no DMA active transfer when entering Low
Power mode and that new DMA transfers are not started when in Low Power
mode because the transfer won't ever finish.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-26 14:45:01 +00:00
Tomasz Moń
4dfae0b0d1 drivers: udc_nrf: Handle Suspend and Resume in thread
Low Power mode can only be entered when there are no active DMA
transfers. Move the Suspend and Resume processing to thread to allow
waiting for the DMA available semaphore in USB Suspend handler.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-26 14:45:01 +00:00
Dominik Ermel
e04f6d0e84 tests: flash_map: Fix tests configurations
Kconfig that enables integrity check has been moved to
test configurations that test it.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-26 14:44:54 +00:00
Andrej Butok
fd5df64454 samples: smp_svr: Add frdm_mcxn947 to allow list for USB and UDP
Adds frdm_mcxn947 to the smp_svr sample allow list,
for overlay-udp.conf and usb.overlay.

Signed-off-by: Andrej Butok <Andrey.Butok@nxp.com>
2024-11-26 14:44:38 +00:00
Pieter De Gendt
f475f3c8cc ci: compliance: Exclude ClangFormat
Stop running ClangFormat in CI as it confuses (first time) contributors
more than it helps.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 14:44:29 +00:00
Sean Nyekjaer
08a8e4c79f boards: others: candlelightfd: add board picture
Provide a picture of the candlelightFD board

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-11-26 14:44:21 +00:00
Chaitanya Tata
7658adf758 root: Remove temp file
Commit e512151474c("manifest: hal_nordic: Pull nRF Wi-Fi removal")
mistakenly added a temporary local file.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-26 14:44:07 +00:00
Pieter De Gendt
d2a6e9d701 scripts: ci: tags: Add zephyr-keep-sorted check
The tag entries should be sorted, add zephyr-keep-sorted check and sort
accordingly.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 14:43:47 +00:00
de19a13c34 runners: add minichlink
This commit adds a runner wrapper for the 'minichlink' program which
offers a free, open mechanism to use the CH-LinkE programming dongle for
the CH32V003.

https://github.com/cnlohr/ch32v003fun/tree/master/minichlink

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
ab66361f4d boards: add ch32v003evt
This commit adds support for the CH32V003EVT board which features a
32-bit general-purpose RISC-V MCU.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
ee8990e2e0 drivers: add the gpio driver for wch ch32v003
This commit adds the gpio driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
ef475cbf71 drivers: add the pfic interrupt controller
This commit adds the pfic interrupt controller driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
01a9061d67 drivers: add the ch32v00x usart driver
This commit adds the usart driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
7e810abc05 drivers: add the ch32v00x systick driver
This commit adds the systick driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
c1c0413eed drivers: add the ch32v00x clock controller
This commit adds the clock driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
6d3348bd83 drivers: add ch32v00x pinctrl support
This commit adds the pinctrl driver for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
936c78e8ba soc: add wch_ch32v003 soc files
This commit adds the soc support for WCH CH32V003.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
ab3fb336c4 dts: add the ch32v003 dtsi
This commit adds the dtsi and bindings for the WCH CH32V003 which is a
32-bit general-purpose RISC-V MCU.

Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
Dhiru Kholia
9e2867a76d west: add the hal_wch
This is used for WCH chips including the CH32V003.

Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
2024-11-26 14:41:46 +00:00
Jilay Pandya
6d87bd65ae drivers: stepper: fix fake stepper controller cid issues
Fix: Write to const-qualified field. (WRITE_CONST_FIELD)
- #81915, #81920, #81922, #81924, #81932, #81940, #81941
- #81946, #81947, #81959, #81961, #81970, #81973, #81977

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-26 10:37:35 +00:00
Jilay Pandya
92fce644e5 drivers: stepper: tmc5041: fix cid issues
fix cid issues related to unchecked return values.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-26 10:37:27 +00:00
Chen Xingyu
de1643d8fb net: mqtt: Fix error of size_t formatting with PRIu16
This addresses the following warning building with `CONFIG_64BIT=y`:

    error: format '%hu' expects argument of type 'int', but argument X has
    type 'size_t' {aka 'long unsigned int'}

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-11-26 10:37:20 +00:00
Ivan Iushkov
75fc0a0776 Bluetooth: Host: deprecate bt_le_set_auto_conn()
bt_le_set_auto_conn() function is not working as
expected. Also, it doesn't have any test coverage
and any usage in sample applications.
The function is deprecated
Fixes #81597

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-11-26 10:37:12 +00:00
Arkadiusz Balys
a53cb73587 boards: nordic: Rearrange ram0x regions.
The ram0x partitions seem to be not compliant with nRF54H20
architecture and it causes that in the application dts overlay file
it is difficult to extend cpuapp_ram0x_region without modifying
whole layout.

It is better to place cpurad_ram0x_region at the beginning at
2f010000 address and then cpuapp_ram0x_region right after that.
Thanks to that, if the application needs to have more than 256 kB
of RAM, in the application dts overlay file, a user can increase
cpuapp_ram0x_region size up to 2f0be000.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-11-26 10:37:06 +00:00
Khoa Nguyen
6dd7e14942 boards: renesas: add missing properties for spi node
Add missing "pinctrl-names" and "status" properties for
the spi1 node in ek_ra8m1.dts to able to test spi_loopback
on ek_ra8m1

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-26 10:36:55 +00:00
Khoa Nguyen
0fd6c97f98 drivers: spi: Add condition check for close before open spi
Add condition check for close before open to prevent
invalid pointer access

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-26 10:36:55 +00:00
Jamie McCrae
b4e9806462 boards: nordic: nrf9131ek: Remove PINCTRL
Removes PINCTRL setting which is not needed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-26 10:36:39 +00:00
Pieter De Gendt
520deb32cb cmake: Remove deprecated global CSTD property
Remove the global CSTD property as it has been deprecated for 2 releases.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 10:36:33 +00:00
Pieter De Gendt
85b991af5a tests: bindesc: reading: Remove usage of deprecated global CSTD
Replace global CSTD property with kconfig options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 10:36:33 +00:00
Krzysztof Chruściński
eae3891303 tests: drivers: uart: uart_elementary: Add runtime PM configuration
Add configuration that uses device runtime PM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 10:36:21 +00:00
Krzysztof Chruściński
13ed9e4210 drivers: serial: nrfx_uarte: Fix runtime PM for interrupt driven API
TX part of interrupt driven API was not calling PM device runtime
API. Additionally, when txstopped occurred after poll out it was
not handled correctly.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 10:36:21 +00:00
Chaitanya Tata
60dbb6fa4f modules: hostap: Move Enterprise configs under Enterprise
These are only for Enterprise.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-26 10:36:11 +00:00
Chaitanya Tata
9e63357355 modules: hostap: TLS is only needed for Enterprise
Move TLS MbedTLS wrapper to Enterprise only.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-26 10:36:11 +00:00
Chaitanya Tata
6316e40053 modules: hostap: Fix indentation
Cmake uses spaces (2) as the indentation.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-26 10:36:11 +00:00
Marvin Ouma
9211abcde6 tests: posix: common: separate posix xsi system logging to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves syslog into a singular
testsuite at tests/posix/xsi_system_logging app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-26 08:45:43 +01:00
Jordan Yates
91e006cb7c sensor: bme280: bme280_wait_until_ready timeout
Add a timeout to the `bme280_wait_until_ready` loop to ensure that we
never get stuck in this loop even if the bus enters an error condition.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-26 08:45:29 +01:00
Anas Nashif
ba5330e2ac ci: twister: for correctness, rename DAILY -> WEEKLY
We run on a weekly basis, not daily.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 08:45:16 +01:00
Anas Nashif
088670d605 ci: twister: report filter suites in weekly run
For analysis purposes, report filtered in weekly run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 08:45:16 +01:00
Pieter De Gendt
43b112a309 scripts: west_commands: runners: Fix jlink unbound cmd
Commit e2a32d8b0ca596afeae48739c43817f693720a88 introduced an unbound
cmd issue for jlink flashing.

Fixed by moving cmd assignment outside of condition.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-26 08:45:06 +01:00
Anas Nashif
f90ce01d4a kernel: sched: use arch_current_thread instead of _current
_current is deprecated, use arch_current_thread()
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-25 19:06:57 -05:00
Valerio Setti
95aaa97dc3 mbedtls: add Kconfig to select the number of key slot in PSA Crypto core
Adding new CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT to select the number
of key slots in PSA Crypto core. The default value is 16. Be aware
that key slots consume RAM memory even if unused, so the proper value
should be a compromise between the number of slots required by
the application and the available RAM in the system.

This commit also:
- updates tests/crypto/secp256r1/mbedtls.conf to showcase how to
  use this new symbol to reduce RAM footprint.
- tests/bsim/bluetooth/mesh/overlay_psa.conf to support all the
  keys used in the test.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-26 00:12:56 +01:00
Valerio Setti
2f6ea8ed77 mbedtls: add Kconfig symbol CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS
Adding the Kconfig symbol CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS
to allow Mbed TLS's PSA Crypto core to use static key buffers
to store key's material. This helps reducing heap memory
usage and, potentially, it also discard code implementing
heap memory management if there's no other module in the build
that makes use of it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-26 00:12:56 +01:00
Valerio Setti
f0944a2b4d manifest: mbedtls: include patch for static key slots
Update the Mbed TLS revision so as to take in a patch which
allows to use static key slot buffers for the PSA Crypto core
instead of dynamic (i.e. heap based) ones.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-26 00:12:56 +01:00
Lucas Tamborrino
cdbd2b5558 soc: espressif: Add hardware initialization
Bring hardware initialization to zephyr code base.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-11-26 00:12:45 +01:00
Emil Dahl Juhl
2df905dc2c samples: led: lp5569: demo write_channels
Add a simple demonstration of the led_write_channels api on the lp5569
driver sample.
The demonstration simply turns on all of the channels with a single call to
led_write_channels. Then the same is done for turning off the channels.
Thus, it doesn't add much visually, but it shows the usage of the api.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-11-26 00:12:37 +01:00
Emil Dahl Juhl
d6ac9e8424 drivers: led: lp5569: implement write_channels api
The lp5569 has multiple pwm outputs, and thus implementing the
write_channels api to set multiple values in a single call makes sense.

Implement the write_channels function with a basic range check on the
channel range.
Since the lp5569 supports auto-increment, all of the channels can be
written in one i2c transfer, starting from the pwm register of the
start_channel.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-11-26 00:12:37 +01:00
Emil Dahl Juhl
45744b436f drivers: led: lp5569: enable auto-increment
The lp5569 controller supports auto-increment for its registers. This is by
default enabled in the chip, but the driver actively disabled it.

Since auto-increment is useful for writing multiple consecutive registers,
enable the feature. The driver, however, doesn't perform such consecutive
writes and thus the existing behavior is not altered.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-11-26 00:12:37 +01:00
Andy Ross
b3ff9ae82b kernel/sched: Optimize handling for suspend(_current)
k_thread_suspend() is an async API intended to stop any thread in any
state from any context.  Some apps just want to use it to "suspend
myself", which is a much (!) simpler operation.  Detect that specific
usage as a performance case.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-26 00:12:28 +01:00
Daniel Leung
22de29e768 soc: intel_adsp/ace: put syscall helpers in vector code section
This puts the syscall helpers into the vector code section, and
is a tiny TLB optimization. Before this, worst case scenario is
that there would 2 instruction TLB misses when both the syscall
helpers and the vector code pages are not in TLB cache. With
this change, there would be at most 1 instruction TLB miss as
now the syscall helper and the vector code (which includes
exception handling code and xtensa_do_syscall()) are now in
the same page, and the same TLB entry.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-26 00:12:18 +01:00
Anas Nashif
b207035851 tests: add integration_platforms and misc optimizations
Add integration_platforms to many tests that use platform_allow to
manage scope of pull_request CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-26 00:12:07 +01:00
Winston Arrocena
51708a760f boards: st: dts: fix slot0_partition address error
The B_L4S5I_IOT01A Discovery kit does not boot up when using --sysbuild.
The error is caused by slot0_partition which is assigned an address of
0x1000 which overlaps with the boot_partition. Setting the address to
0x10000 fixed it.

Signed-off-by: Winston Arrocena <we.arrocena@gmail.com>
2024-11-26 00:11:54 +01:00
Fin Maaß
1e3b106435 drivers: ethernet: phy_mii rename functions
rename internal reg_* functions.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-26 00:11:43 +01:00
Martin Åberg
b88d0bf8c7 soc: Enable SVT on GR716A by default
GR716A has limited instruction memory capacity. Enabling SVT
saves 3.5 KiB.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-11-25 21:53:55 +01:00
Martin Åberg
fbd9dd4526 SPARC: Add support for single-vector trapping (SVT)
This adds support for the single-vector trapping (SVT) model, defined by
SPARC-V8 Embedded (V8E) Architecture Specification. SVT is available in
most LEON processors.

With single-vector trapping enabled, all traps are vectored through a
single trap vector (TBR.A) rather than one 16-byte entry for each trap
type. This improves memory utilization because the full 4 KiB trap table
is not needed.

This implementation uses a two-level of lookup table to find the handler
for the trap type (0..255).
- Execution time is constant.
- Condition flags are preserved.
- The implementation footprint is 60 bytes .text and 284 bytes .rodata.
  For comparison, a non-SVT table is always 4096 .text.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-11-25 21:53:55 +01:00
Jean-Christophe Pince
dd5874b924 jlink: custom flashing support
Allows to use a custom flashing script with jlink runners.

Signed-off-by: Jean-Christophe Pince <jean.christophe.pince@qorvo.com>
2024-11-25 21:53:43 +01:00
Andries Kruithof
bb3bab7a34 Bluetooth: Audio: implement the distribute broadcast code procedure
Implemenation of the distribute broadcast code CAP procedure, as well
as unittesting

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-25 21:52:53 +01:00
Ian Morris
37fcadc6b3 boards: renesas: da14695_dk_usb: added mikrobus node labels
Added mikrobus_header, mikrobus_i2c, mikrobus_spi and mikrobus_serial
node labels to da14695_dk_usb device tree board definition, allowing
compatible shield boards to be used. Also fixed minor issues with
pin assignment and header labelling.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-25 21:52:34 +01:00
Emil Gydesen
322b177549 samples: Bluetooth: Reduce heap for hci_ipc
Reducing the heap requirement for the hci_ipc sample from
8KiB to 4KiB. It has been tested in various configurations to
work with 2300, but 4KiB was used to provide some leeway for
future updates.

The heap requirement is not documented, and it is unclear why
values lower than 2300 (not exact number) won't boot, and should
be investigated further.

Memory has become a very scarce resource for especially the ISO
builds for the nRF5340, which is why this is getting reduced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 21:52:15 +01:00
Kai Vehmanen
a14ae39e74 driver: ssp: remove use of out-of-tree CONFIG_INTEL_MN
The SSP driver has odd dependency to outside definition of
CONFIG_INTEL_NM. This is in practise tied to SSP hardware
version and always enabled for SSP block version 1.0.

Use the new SSP_IP_VER define to replace the CONFIG_INTEL_MN
preprocssor checks. Also modify the board test case to
remove the obsolete config setting.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-11-25 21:51:56 +01:00
Anas Nashif
5b29fff725 tests: workqueue: avoid filters
Use Kconfig to configure watchdog instead of using expensive filters.

Also disable CONFIG_TEST_HW_STACK_PROTECTION for this test so we do not
have to create special cases.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-25 21:51:36 +01:00
Anas Nashif
a8b788d344 tests: mem_map: reduce runtime filters
Improve CI performance improving filtering and coverage selection.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-25 21:51:36 +01:00
Matthias Alleman
e7c353bf14 posix: fpu: Fix compiler error when enabling fpu on posix boards
Enabling CONFIG_FPU and CONFIG_FPU_SHARING requires the
definition of `arch_float_disable` and `arch_float_enable`.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2024-11-25 21:50:58 +01:00
Ahmed Zamouche
305ceba920 drivers: eth: enc28j60: Misc fixes
- Bank select mask should be 0x03:

| b7    | b6    | b5    | b4     | b3    | b2   | b1     | b0     |
|------:|------:|------:|-------:|------:|-----:|-------:|-------:|
| TXRST | RXRST | DMAST | CSUMEN | TXRTS | RXEN | BSEL1  | BSEL0  |

See  **REGISTER 3-1: ECON1: ETHERNET CONTROL REGISTER 1**

- ENC28J60_BIT_PHCON2_HDLDIS should be 0x0100

|b15| b14   |b13   |b12|b11|b10    |b9|b8     |b7|b6|b5|b4|b3|b2|b1|b0|
|--:|------:|-----:|--:|--:|------:|-:|------:|-:|-:|-:|-:|-:|-:|-:|-:|
| - |FRCLNK |TXDIS |r  |r  |JABBER |r |HDLDIS |r |r |r |r |r |r |r |r |

see **REGISTER 6-5: PHCON2: PHY CONTROL REGISTER 2**

- remove duplicate definitions

ENC28J60Data Sheet:
https://ww1.microchip.com/downloads/en/DeviceDoc/39662c.pdf

Signed-off-by: Ahmed Zamouche <ahmed.zamouche1@assaabloy.com>
2024-11-25 17:43:57 +01:00
Jerzy Kasenberg
1d4b1ade43 tests: drivers: spi: Fix nrf52840 overlay
spi-max-frequency was missing in overlay

Now it's set to 8 MHz as per datasheet

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-11-25 17:43:48 +01:00
Jerzy Kasenberg
75d3f45d5a tests: drivers: spi: spi_slave: Fix memory corruption
This fixes memory corruption of delayable work when
tests executes unsupported function.

When test (e.g. only_rx_in_chunks) is executed it starts
delayed work for master functionality (with 10 ms delay).
Later when slave function is tried and reports that
function is unsupported, test is terminated (task ends)
but work is still scheduled.

When next test starts it clears work that is already
scheduled:

static void before(void *not_used)
{
	ARG_UNUSED(not_used);

	memset(&tdata, 0, sizeof(tdata));

this leads to memory corruption and system work queue
tries to remove work but it never does since head/next
pointers are zeroed at that time.

This just adds after function that cancels work
regardless if it was scheduled or not.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-11-25 17:43:48 +01:00
Alvis Sun
c9a95ddbdd drivers: i3c: npcx: add npcx i3c target driver
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Alvis Sun
9976f8a8a9 dts: i3c: npcx: add target mode property and port configuration
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Alvis Sun
f517929a11 include: i3c: npcx: remove unnecessary soc functions.
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Alvis Sun
bb03d1a472 include: i3c: target_device: add target driver buffer mode
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-11-25 17:43:41 +01:00
Chaitanya Tata
e512151474 manifest: hal_nordic: Pull nRF Wi-Fi removal
Pulls PR that removed nRF Wi-Fi.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
b8cab9e144 drivers: wifi: Fix blobs handling
The blobs are now part of nrf_wifi module, and remove the manual check
and add verifying the blobs and their integrity using helper function.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
da26d02d63 nrf_wifi: Move shim files from driver to module
The shim files should be part of the Zephyr module directory within
Zephyr, as they are coupled with the module implementation which os OS
agnostic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
459f972785 drivers: nrf_wifi: Remove OSAL code handling
This is now taken care by the Zephyr module shim.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
180df6675e modules: nrf_wifi: Add a new module for nRF70 Wi-Fi
This is a Zephyr shim for the nrf-wifi module.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
f7dc9f82d2 drivers: nrf_wifi: Fix the path to OSAL code
The OSAL code now lives in it's own repo nrf_wifi.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
139ce48c8b nrf_wifi: Fix the directory name
Following the naming convention add an underscore and update path in the
maintainers file too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Sean Nyekjaer
0950aa47b1 boards: others: add candleLightFD USB to CAN FD adapter board
Add support for the open-hardware candleLight FD USB to CAN FD board.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-11-25 17:43:27 +01:00
Jamie McCrae
7857599bf8 tests: mgmt: mcumgr: os_mgmt_info: Fix return type
Fixes returning a define from a different enum which throws an
error with clang

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-25 17:43:17 +01:00
Marek Matej
410e929459 boards: Remove defconfig value
Remove ENTROPY_GENERATOR defconfig as it is pulled in automatically when
needed.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-25 17:43:10 +01:00
Emil Gydesen
96b487186f Bluetooth: ISO: Removed unused pool and funcs/macros
The iso_tx_pool was unused because all the functions
and macros that used it were unused.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 17:42:59 +01:00
Trung Hieu Le
2ff984a888 drivers: video: sw_generator: Disable the driver if a real camera presents
Do not enable the video sw generator if a real camera is present. This
helps to save some spaces and to avoid unrelated code going
into the built image.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-11-25 17:42:49 +01:00
Krzysztof Chruściński
114d9b34e2 soc: nordic: nrf53: Update default value of NRF53_SYNC_RTC
Most likely there is no point of synchronizing RTC if net core is
not enabled. Same for the bootloader.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-25 17:42:39 +01:00
Mahesh Mahadevan
bda04093fb boards: frdm_mcxn947: Delete enable of GPIO5 clock
There is no bit to enable GPIO5 clock in the clock control
register.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-25 17:42:25 +01:00
Adam Wojasinski
c36b3c0296 MAINTAINERS: fix area Networking issue assignment
Replacing "area: Networking" with "area: PTP" to prevent from
including myself in issues and PRs that are related to every
piece of Networking code. Insted I'll be included only in PTP
related issued/PRs.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-11-25 14:46:23 +01:00
Lothar Felten
f982d180ad boards: lilygo: ttgo_t8s3: initial support
adds initial support for Lilygo TTGO T8-S3 board

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-11-25 14:43:01 +01:00
Ali Hozhabri
4875f29b65 west.yml: Update hal_stm32
Modify west.yaml to update hal_stm32.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
bdef48fde2 boards: st: Enable BLE for nucleo_wb09ke & nucleo_wb05kz
Enable BLE feature for Nucleo-WB09KE and Nucleo-WB05KZ.

Dedicate 32KB and 8KB at the end of flash memory to storage partition on
Nucleo-WB09KE and Nucleo-WB05KZ respectively.

Add ble tag to the both devices yaml file.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
b2d4c2e2b1 soc: stm32: stm32wb0x: Disable BT_AUTO_PHY_UPDATE & BT_AUTO_DATA_LEN_UPDATE
Put the default value for BT_AUTO_PHY_UPDATE and BT_AUTO_DATA_LEN_UPDATE
to "n" at SOC level since they cause "controller busy" due to starting
several parallel BLE procedures during connection by
"perform_auto_initiated_procedures" function. At the moment, ST controller
does not support parallelism, i.e. host should not initiate a new procedure
before previous one is completed.

Disable CONFIG_BT_HCI_ACL_FLOW_CONTROL at SOC level.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
c8d034cf0b soc: stm32: stm32wb0x: Dedicate RAM section for BLE part
Dedicate RAM section on STM32WB0x for BLE part based on the number
of radio tasks and device type.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
9e26341a61 dts: arm: st: wb0: Add BLE feature to STM32WB0x at SOC level
Add BLE feature to STM32WB0x series at SOC level.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
d42fc7ae21 drivers: bluetooth: hci: Add Bluetooth HCI driver for STM32WB0x
Add Bluetooth HCI driver for STM32WB0x series.

Modify CMakeLists.txt to compile the driver based on its kconfig parameter.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
5c753c0fbf dts: bindings: bluetooth: Add yaml file required by STM32WB0x HCI driver
Add a yaml file required by STM32WB0x bluetooth HCI driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
944963933a bluetooth: Kconfig: Introduce Kconfig parameter for STM32WB0x series
Introduce Kconfig parameter for STM32WB0x HCI Bluetooth driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Mario Paja
73bd431293 samples: dac: add arduino_giga_r1 overlay
This PR adds arduino giga r1 overlay in the dac sample.
Arduino Giga R1 has a 3.5mm audio jack connected to the
dac.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2024-11-25 14:42:39 +01:00
Marcio Ribeiro
65547044e6 drivers: touch/rtc/wdt: esp32: fix conflict among device drivers
allows use of touch_sensor, rtc_counter, and wdt simultaneously by enabling
ESP_INTR_FLAG_SHARED when calling esp_intr_alloc()

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-11-25 14:42:32 +01:00
Ryan McClelland
f5946a546d manifest: update cmsis-dsp to v1.16.2
Update cmsis-dsp module to v1.16.2

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-25 14:42:07 +01:00
TOKITA Hiroshi
88149afff7 soc: raspberrypi: Drop PINCTRL from Kconfig.defconfig
The `Kconfig.defconfig` is not good place for put `select PINCTRL`.
Drop `select PINCTL` from `Kconfig.defconfig` and add it at each
driver's Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 14:42:01 +01:00
Ryan McClelland
1e47b6a2b9 kernel: fix K_SEM_DEFINE type-limits warning
A warning could be generated when compiling with -Wtype-limits. This
works around the warning which could happen if initial_count is 0 and
count_limit is K_SEM_MAX_LIMIT.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-25 14:41:51 +01:00
Jordan Yates
4e7feddd87 tests: bsim: support snippets
Support specifying a snippet when compiling bsim applications.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-25 14:41:43 +01:00
Jordan Yates
b13985d806 boards: nrf_bsim: add default soc_secure_mem_read
Add the default implementation of `soc_secure_mem_read` from
`nordic/common/soc_secure.h`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-25 14:41:43 +01:00
Marek Matej
2dc2cdea75 dts: espressif: Add flash size options to partition tables
Update the partition table list with 16MB and 32MB options.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-25 14:41:33 +01:00
Emil Gydesen
b535f18240 Bluetooth: Audio: Fix incorrect ret doc for cfg_meta_get_lang
The function does not return the language, but rather stores
the lang in the provided lang param.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 14:41:21 +01:00
Emil Gydesen
83677f551f Bluetooth: Shell: Set conn to NULL before bt_conn_le_create
bt_conn_le_create logs a warning if the provided conn is
non-NULL which was the case here. Simply set it to
NULL as it is a local variable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 14:41:14 +01:00
Jeppe Odgaard
c9dc58178a drivers: adc: adc_ad559x: implement double range option
Optionally write to ad559x register bit which increases ADC input range
from 0V to 2 x Vref.

Create an ADC API per instance since the double range option and thus
`ref_internal` is instance specific.

The functionality has been tested via double range DAC and wiring IO1 and
IO3:
```
$ dac setup ad5593dac 1 12
$ adc ad5593adc resolution 12
$ adc ad5593adc channel id 3
$ dac write_value ad5593dac 1 0
$ adc ad5593adc read 3
read: 1
$ dac write_value ad5593dac 1 1024
$ adc ad5593adc read 3
read: 1021
$ dac write_value ad5593dac 1 2048
$ adc ad5593adc read 3
read: 2044
$ dac write_value ad5593dac 1 3072
$ adc ad5593adc read 3
read: 3069
$ dac write_value ad5593dac 1 4095
$ adc ad5593adc read 3
read: 4091
```

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
Jeppe Odgaard
57626655df dts: bindings: adc: ad559x: add double range option
Add boolean option to use 2 x voltage reference as upper ADC input range.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
Jeppe Odgaard
c6aafd7eb5 drivers: dac: ad559x: implement double range option
Optionally write to ad559x register bit which increases DAC output range
from 0V to 2 x Vref.

The functionality has been tested on AD5593r.
The voltage at 4095 has been measured to 5.01 volts.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
Jeppe Odgaard
d34f56c175 dts: bindings: dac: ad559x: add double range option
Add boolean option to use 2 x voltage reference as upper DAC output range.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
Jeppe Odgaard
8933e6cefa drivers: ad559x: fix mfd_ad559x_i2c_read_reg
Reading a register requires 0x70 to be ORed with the register address.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-11-25 12:17:00 +01:00
TOKITA Hiroshi
b7badee6aa tests: drivers: build_all: audio: Add config for st,mpxxdtyy
Add configuration to add `st,mpxxdtyy` to build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
TOKITA Hiroshi
0bc0dd7767 tests: drivers: build_all: audio: Add i2c-devices to build test
Add build tests for the following devices.

- ti,tas6422dac
- ti,tlv320dac

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
TOKITA Hiroshi
0cbfd2a75e drivers: i2s: Add dummy driver for vnd,i2s
Add dummy driver for "vnd,i2s" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
TOKITA Hiroshi
6394b261ec drivers: audio: wm8904: Fix missing default y in AUDIO_CODEC_WM8904
The `default y`, which is coupled with
`depends on DT_HAS_WOLFSON_WM8904_ENABLED` to link the settings with
DeviceTree, which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-25 12:16:53 +01:00
Pieter De Gendt
32c59004bf doc: develop: modules: Add a section about package managers
Add a description and example on how modules can describe pip
dependencies.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 12:16:43 +01:00
Pieter De Gendt
6d103d73a4 doc: gsg: Update with west packages command for pip
Update the entry where Python dependencies are installed, use
west packages.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 12:16:43 +01:00
Pieter De Gendt
2ad915284b scripts: west_commands: Add packages command
Add a new west command as helper for package management of Zephyr
and modules.

The first package manager to get supported is pip, where west projects
can list individual packages or requirements files in their module file.

A convenience --install argument is added to install the packages instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 12:16:43 +01:00
Hou Zhiqiang
91593fc899 soc: nxp: imx95: A55: enable SDK cache driver
Enable the SDK cache driver for A core.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-11-25 12:16:33 +01:00
Yangbo Lu
962b0bcac4 drivers: ethernet: phy_mii: add link down log
It's expected there is log info for both link up and link down.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-11-25 12:16:28 +01:00
Gerard Marull-Paretas
e6b24df0af soc: nordic: nrf54h: gpd: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
Gerard Marull-Paretas
fa46eec157 drivers: gpio: nrf: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
Gerard Marull-Paretas
4036d6edb3 drivers: pinctrl: nrf: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
Carles Cufi
b06bf51459 boards: nrf54l15dk: Enable tests and samples for the L05 and L10
This is a follow-up to 21475774fc,
extending the number of tests and samples that use the new L05 and L10.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-25 10:08:07 +01:00
Khoa Nguyen
992db7d1e8 samples: drivers: counter: Support test alarm for RA6, RA4, RA2
Add overlay to support test alarm for:
ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1,
ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra2a1.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 10:07:37 +01:00
Khoa Nguyen
109c00ee6d boards: renesas: Add counter doc for RA6, RA4, RA2
Add doc for AGT counter for:
ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1,
ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra2a1.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 10:07:37 +01:00
Khoa Nguyen
b1daa13109 dts: arm: renesas: Add AGT counter support for RA6, RA4, RA2
- Add dts node to support AGT counter for:
ra6-cm4, ra6-cm33 (eccept r7fa6e2bx),
ra4-cm4, ra4-cm33 (eccept r7fa4e2b93cfm),
ra2xx.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 10:07:37 +01:00
Emil Gydesen
420cafc1f5 samples: Bluetooth: ISO: Update conn and adv intervals
Update the connection and advertising intervals of the
broadcast and connected ISO samples (including benchmark
samples) to work better with the selected SDU intervals
and the resulting ISO intervals.

For the ISO connected benchmark the order of CIG and ACl
has changed, so that we create the CIG before connecting
the ACL for the purpose of providing as much information
as possible to the controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-25 10:07:30 +01:00
Dino Li
40c95e34b8 it8xxx2/shi: wrap pm policy state get/put
When CONFIG_ASSERT is enabled, assertion for unbalanced state lock
get/put is triggered. This commit leverages shi drivers from other
SoCs to resolve the assertion.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-11-25 10:07:20 +01:00
Pieter De Gendt
bf2db7afc0 python: Format and sort imports
ruff check --select I001 --fix applied to all python files that had
this as only issue.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-25 10:07:13 +01:00
Wilfried Chauveau
85f36aae51 boards: twister: update boards' twister metadata files
Following the update of the schema, this updates all boards with the new
structure.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-11-25 08:31:28 +01:00
Wilfried Chauveau
7cc70f01f1 scripts: twisterlib: Enable multiple simulator support in twister
This change introduces the ability in twister to select which
emulation/simulation tool to use on the command line.

If none is specified, it will select the first in the list.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-11-25 08:31:28 +01:00
Grzegorz Swiderski
f0646d3da4 edtlib: Express Node.matching_compat and Node.binding_path as @property
This simplifies the code and makes it clearer that both properties are
defined in terms of the Binding object matched to a given DT node.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-25 08:31:18 +01:00
Jakub Michalski
43f917111b posix: add pthread specific data deallocation test
This commit adds test to assert that thread specific data is deallocated
on thread termination.

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2024-11-25 08:31:08 +01:00
Jakub Michalski
044b702b90 posix: fix pthread thread specific data cleanup
It was never deallocationg pthread_key_data nor it was removing the node
with it from list

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2024-11-25 08:31:08 +01:00
Daniel Leung
3d3ffa2c05 soc: intel_adsp/ace30: do not map 0x0
The MMU mapping in SoC covers 0x0 which prevents catching NULL
pointer accesses. Since there are no hardware registers at
the very first page of memory, we move the starting point one
page later.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-25 08:30:57 +01:00
Dino Li
e59289d899 soc/it8xxx2: disable USB debug path at default
This change disables USB debug path at default, in order to prevent SoC
from entering debug mode when there is signal toggling on GPH5/GPH6.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-11-25 08:30:48 +01:00
Maochen Wang
9f72e651b5 hostap: fix Matter over Wi-Fi build warning
Fix the build warning that 'method may be used uninitialized' when
build Matter over Wi-Fi.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-25 08:30:43 +01:00
Maochen Wang
30763cfc4a drivers: wifi: nxp: default use hostapd AP
For NXP Wi-Fi, default use hostapd based AP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-25 08:30:38 +01:00
Maochen Wang
b18541768b hostap: distinguish suppliant AP and hostapd AP
To make AP related code/config more clear and clean, use
CONFIG_WIFI_NM_WPA_SUPPLICANT_AP for supplicant based AP case,
and use CONFIG_WIFI_NM_HOSTAPD_AP for hostapd based AP case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-25 08:30:38 +01:00
Chris Friedt
2a1fa8e4c7 tests: posix: getopt: move filter to testcase.yml common area
Similar to #81766, move the filter to the common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-25 01:02:50 +01:00
Chris Friedt
b0352db95c tests: posix: rwlocks: move filter to testcase.yml common area
Similar to #81766, move the filter to the common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-25 01:02:50 +01:00
Khoa Nguyen
8d7ae89c23 tests: drivers: spi: Support test spi_loopback for RA6, RA4, RA2
Add overlay and add config to support test spi_loopback for:
ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, ek_ra6e2,
fpb_ra6e1, fpb_ra6e2, ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra4e2,
ek_ra2a1.

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 01:02:35 +01:00
Khoa Nguyen
c8077e3552 boards: renesas: Add SPI support for Renesas RA6, RA4, RA2
- Add SPI support for ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4,
ek_ra6m5, ek_ra6e2, fpb_ra6e1, fpb_ra6e2, ek_ra4e2, ek_ra4m2,
ek_ra4m3, ek_ra4w1, ek_ra2a1

- Add SPI support doc for these board

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 01:02:35 +01:00
Tri Nguyen
2e2cf835ed dts: arm: renesas: Add SPI support for RA6, RA4, RA2
Add device node support SPI driver for ra6-cm4, ra6-cm33,
ra4-cm4, ra4-cm33, ra2xx MCU

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 01:02:35 +01:00
Khoa Nguyen
c312b322ad drivers: spi: Add support SPI driver for Renesas RA6, RA4, RA2
- Add SPI driver support for RA
- RA2A1 not support slave select keeping level so disable it
in Kconfig

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-25 01:02:35 +01:00
Brandon Allen
4f46b38843 docs: kernel: iterable_section: add #include to linker example
if you do not include #include <zephyr/linker/iterable_sections.h>
you will get a build error

Signed-off-by: Brandon Allen <bwallen1997@outlook.com>
2024-11-25 01:02:03 +01:00
Yong Cong Sin
b1def7145f arch: deprecate _current
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Yong Cong Sin
1a752e8a35 arch: riscv: implement ARCH_HAS_CUSTOM_CURRENT_IMPL with GP
Implement `arch_curr_thread()` & `arch_set_curr_thread()`
with the global pointer (GP) register.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Yong Cong Sin
d26c712258 arch: add new interfaces to set/get the current thread of current CPU
Add the following arch-specific APIs:
- arch_curr_thread()
- arch_set_curr_thread()

which allow SMP architectures to implement a faster "get current
thread pointer" than the default provided by the kernel. The 'set'
function is required for the 'get' to work, more on that later.

When `CONFIG_ARCH_HAS_CUSTOM_CURRENT_IMPL` is selected, calls to
`_current` & `k_sched_current_thread_query()` will be redirected to
`arch_curr_thread()`, which ideally should translate into a single
instruction read, avoiding the current
"lock > read CPU > read current thread > unlock" path in SMP
architectures and thus greatly improves the read performance.

However, since the kernel relies on a copy of the "current thread"s on
every CPU for certain operations (i.e. to compare the priority of the
currently scheduled thread on another CPU to determine if IPI should be
sent), we can't eliminate the copy of "current thread" (`current`) from
the `struct _cpu` and therefore the kernel now has to invoke
`arch_set_curr_thread()` in addition to what it has been doing. This
means that it will take slightly longer (most likely one instruction
write) to change the current thread pointer on the current
CPU.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Ilya Tagunov
9f2a7a7ca2 lib: libc: arcmwdt: avoid double definition of clock_t and clockid_t
The clock_t and clockid_t types are already defined in ARC MWDT headers,
so they should not be defined again in Zephyr headers.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
80a9b12a50 include: posix: remove an unreachable clockid_t definition
The clockid_t definition in question is not reachable anymore
because at least one of _CLOCKID_T_DECLARED and __clockid_t_defined
macros is already defined by that point, always making the check fail.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
390a7f8950 lib: libc: arcmwdt: move ssize_t definition from the toolchain header
Until POSIX layer decoupling is done, we still need the size_t type
definition across the codebase, but it should come through sys/types.h
and not through toolchain-specific headers.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
9d229e5c18 tests: lib: c_lib: add the proper dependency for asctime_r and ctime_r
As the test uses reentrant time functions like asctime_r or ctime_r,
it should select POSIX_C_LANG_SUPPORT_R. Otherwise there are build
failures observed with the default test configuration if these
functions are not provided by the toolchain.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
1f5fbe231a kconfig: assume the host libc provides POSIX reentrant functions
This change is needed to avoid including Zephyr-specific implementations
of POSIX reentrant functions while building natively. One can safely
assume that the host libc indeed provides its own implementations of
the said functions.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
c8511c1ea0 lib: libc: arcmwdt: add declarations for reentrant time functions
ARC MWDT library does not contain implementations for the reentrant
POSIX time functions, so common Zephyr implementations end up being
used instead. However, there are no declarations, so we just add them
here, unguarded, until a better place is found.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Ilya Tagunov
de18565e2a lib: libc: arcmwdt: replace the fileno macro
The fileno macro defined in ARC MWDT headers conflicts with the fileno()
function defined in lib/posix/options/device_io.c. We should undefine it
and replace with a POSIX-compliant declaration and a weak definition.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-23 20:12:02 -05:00
Dominik Ermel
eb4f2fb44a drivers/flash/nrf_rram: Add get_size implementation.
Commit adds flash_get_size callback to the driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
383bcc790c drivers/flash/soc_flash_nrf_mram: Add get_size implementation
Commit adds flash_get_size callback to the driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
021ef9e5c3 tests/flash/common: Set test device size for NRF platforms
Set expected size for nrf platforms.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
a6ef37ca8e drivers/flash/spi_nor: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
b4a9f1d67a drivers/flash/flash_sam: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
6efba38e97 drivers/flash/flexspi_x25um51345g: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
9a162e0b79 drivers/flash/flexspi_nor: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
6a06c10f3f drivers/flash/gecko: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
31dcaa2611 drivers/flash/stm32_qspi: Add flash_get_size
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
f39940b86c drivers/flash/at45: Add flash_get_size API call
The commit adds implementation of flash_get_size to the flash driver.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
8acf0a1ecf drivers/flash/nrf_qspi_nor: Add flash_get_size API call
The commit adds implementation of get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
b0584b7d08 drivers/flash/nrf: Add flash_get_size API call
The commit adds implementation of flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
6298fed7d4 drivers/flash/flash_simulator: Add flash get_page_size API call
The commit adds implementation of flash_get_size,

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
c03f256fba tests/drivers/flash: Add test case for flash_get_size
Add flash_get_size commit and Kconfig option for test to set the
expected size of device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
852c992da5 tests/drivers/flash_api: Flash API tests
The commit adds test for flash_get_size.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Dominik Ermel
13fa2331da drivers/flash: Flash API: device size getter
The commit adds flash_get_size  API functions.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-23 15:30:10 +01:00
Manuel Martin
93541e21a4 drivers: display: gc9x01x: fix correct mipi buffer size
mipi api allows only buffers where pitch is equal to width.
buffers with smaller width get split into multiple transmissions
but mipi buffer size was set incorrectly.

Signed-off-by: Manuel Martin <martiman89+github@gmail.com>
2024-11-23 15:29:15 +01:00
James Roy
72d34496dc subsystem: bluetooth: Fix uninitialized variable
Fix uninitialized sec_idx variables scanned by Coverity.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-23 15:29:03 +01:00
Pieter De Gendt
86a8dacaa1 scripts: west_commands: Fix MissingProgram import
MissingProgram should be exported in __all__.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-23 15:28:33 +01:00
Daniel DeGrasse
3d6dde4832 doc: releases: migration-guide-4.1: document change to mipi-dbi binding
Document change to mipi-dbi device binding, and provide users with
example of how to transition to the new mipi-mode property.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-23 02:01:47 +01:00
Daniel DeGrasse
c565c2c6f6 drivers: mipi-dbi: use string for mipi-mode property
Use a string for the mipi-mode property over an integer value, as this
significantly improves the readability of the MIPI DBI device binding.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-23 02:01:47 +01:00
Josuah Demangeon
d6b8912ad9 scripts: ci: check_compliance: ruff: avoid mixing stdout and stderr
The python subprocess call had a stdout=subprocess.PIPE parameter that
redirects standard output to a pipe, and a stderr=subprocess.STDOUT
parameter that redirected stderr to the pipe. This mixed JSON and
non-JSON output together, and issued an exception. Fixing with
stderr=subprocess.DEVNULL to ignore standard error and only keep the
JSON output.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-23 02:01:28 +01:00
Daniel DeGrasse
c6cf9b9e8b drivers: mipi_dbi: mipi_dbi_nxp_lcdic: fix reset pulse calculation
Reset pulse count can be up to 512 before we would be unable to support
it using the peripheral. Use a uint32_t for the count, so that even long
reset pulses will still be calculated correctly. Add code to warn about
reset pulse requests that are too long.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 22:47:36 +00:00
Daniel DeGrasse
c0e5769a52 drivers: mipi_dbi: mipi_dbi_nxp_lcdic: allow config of timer bases
The NXP LCDIC peripheral contains two internal timers, with configurable
periods. These times are used to determine delays within the peripheral,
such as the reset and tearing enable signal delays. Allow these periods
to be set within the devicetree for the peripheral.

Raise the period where required for display drivers that need a value
other than the reset setting

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 22:47:36 +00:00
TOKITA Hiroshi
2e66ce193c include: dt-bindings: misc: nordic: Fix include-guard
The implementation of include-guard is incomplete, so I fixed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-22 22:47:30 +00:00
Benjamin Cabé
f24cb62579 usbc: fix typo in shell usage string
statuc->status

Authored-By: Markus Becker <Markus.Becker@tridonic.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-22 22:47:23 +00:00
Florian Weber
7adeac1b12 drivers: i2c: tca9544a
Extend tca954x (tca9546a, tca9548a) driver to support tca9544a i2c MUX.
(different bitmask and flag for enable bit in register)

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2024-11-22 22:47:17 +00:00
Joakim Andersson
2fe54b4476 include: gpio: Add isr_ok to interrupt configure API
Add isr_ok property to the interrupt configure API.
For level-triggered interrupt the interrupt may have to be disabled
until a thread context can process it and clear the interrupt trigger.

The function is documented as returning an error if it would block.
Drivers in zephyr already do this, so if this is not ISR safe function
then they need to be fixed.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-11-22 22:47:07 +00:00
Miika Karanki
d851bb9e86 modules: lz4: add configurability
- Add possibility to disable functions that use heap. This is to
  reduce code size and prevent accidental use of heap.

- Add possibility to compile xxhash library, "Extremely Fast Hash
  algorithm" in. It might be sometimes needed as a standalone,
  but especially lz4frame requires it.

- Add possibility to compile also hc and lz4frame modules. The
  config options include possibility to configure will heap or
  stack be used. Defaults are set according to lz4's current
  defaults.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2024-11-22 22:46:59 +00:00
Martino Facchin
054d60fb1c video: gc2145: fix set_fmt()
Trivial fix for bound check

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
2024-11-22 13:04:22 -06:00
Rex Chen
b4035e83d4 net: wifi: shell: add enterprise support for sap
Add EAP-TLS, EAP-PEAP-MSCHAPv2, EAP-PEAP-GTC, EAP-TTLS-MSCHAPv2,
EAP-PEAP-TLS, EAP-TLS-SHA256 enterprise wpa2 and wpa3 suiteb
support for sap.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-11-22 13:03:53 -06:00
Fin Maaß
ef9cc18fcf mgmt: hawkbit: don't require HWINFO
don't require HWINFO, when HAWKBIT_CUSTOM_DEVICE_ID.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-22 13:02:29 -06:00
Anas Nashif
5fc66f67b9 ci: twister: capture branch when publishing results
This way we can filter by branches in the dashboard.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Anas Nashif
1c6066baea ci: twister: prep: add a more vebose name
Expand onn the workflow name

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Anas Nashif
aba2274fae ci: twister: publish only main branch jobs
This workflow is wrongly being triggered by pushed to branches.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 13:01:24 -06:00
Daniel DeGrasse
cc8ab68432 doc: migration-guide-4.1: add note about PORT pinctrl compatible change
Add note about compatible change for NXP PORT IP. Also, update
references to the DT compatible within board docs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 13:01:02 -06:00
Daniel DeGrasse
42cc35f941 soc: nxp: consolidate nxp port pinctrl headers
NXP PORT IP instantiations often have different features absent, IE
input buffer, open drain, or slew rate support. Check if the relevant
PCR register bitmasks are defined in the common pin control file, and
define the bitmasks to 0x0 (no effect) if they are not. This allows us
to further consolidate the pinctrl_soc.h headers for SOCs using the PORT
IP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 13:01:02 -06:00
Daniel DeGrasse
a36c7ddb36 drivers: pinctrl: rename nxp,kinetis-pinctrl to nxp,port-pinctrl
The NXP PORT pinmuxing peripheral is reused across the MCX, S32, and
Kinetis lines. Rename the compatible from the family-specific
nxp,kinetis-pinctrl to a more generic nxp,port-pinctrl to reflect the
actual name for the IP block used within reference manuals.

Update the NXP HAL revision to include a change to use the new Kconfig
name for the PORT pinctrl driver

Update the MAINTAINERS.yml path, as there are no longer any NXP drivers
matching the string "drivers/*/*kinetis*

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-22 13:01:02 -06:00
Marek Matej
78c1def4db boards: esp32xx: Use common partition tables
* Replace copies of fixed-partitions nodes in related boards by
referencing the apropriate partition table from the available list.
* For better reference the `partitions_*.dtsi` file has boot offset,
purpose and the flash size encoded in the file name. Default flash size
is considered to be 4MB.
* Added the flash size node for the boards which are not based on the
module.
* Removed flash size registry from the esp32.*common.dtsi

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-22 17:45:24 +01:00
Maochen Wang
407259462c hostap: use the correct config for EAP_SERVER
Should use EAP_SERVER and EAP_SERVER_IDENTITY as the correct config,
for the WPS case of AP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-22 17:44:08 +01:00
Maochen Wang
13f473d7eb hostap: add WPS PBC and PIN for AP mode
add WPS PBC and PIN for AP mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-22 17:44:08 +01:00
Erwan Gouriou
358396e831 samples: subsys: nvs: stm32 overlays fixup
Don't try to delete partitions that doesn't exist anymore

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
555d97ea3d tests: drivers: flash: common: Remove stm32 specific test
It's same test as "default", but more restrictive target wise.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
201a0b6ba9 test: drivers: flash: common: Copied size can't exceed page.size
flash_copy() is performed on a page.size span but following flash_read()
verification step is performed on EXPECTED_SIZE length (512).

This doesn't work on devices where page.size is lower than EXPECTED_SIZE,
such as STM32L1 where page size is 256.

To fix this, perform verification on the smalest value between page.size
and EXPECTED_SIZE.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
3583492890 boards: st: nucleo_f429zi: Rework flash partition
STM32F4 series flash layout is as follows:
    	{.pages_count = 4, .pages_size = KB(16)},
    	{.pages_count = 1, .pages_size = KB(64)},
    	{.pages_count = 7, .pages_size = KB(128)}

Since NVS subsys requires 2 sectors of max 32K in total, provide a
flash partition which respects this constraint using 2 of the 16K sectors
in the beginning of the layout.

Provide a compatible flash partition usable with mcuboot, but keep the
storage partition commented as its usage is not compatible with use w/o
mcuboot enabled (in this case main image starts as offset 0 which conflicts
with storage partition).

Note that it isn't possible either to get main image starting directly
in the 128K sectors w/o bootloader as boot flash address can't be
configured.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
73126c1f48 tests: psa: its: Extend Timeout
These tests could be long on slow targets


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
5d2547564a boards: st: nucleo_l152re: Rework storage partition
NVS susbsystem requires a slot covering 2 sectors of flash, which
should be at minimum 8K on L1 series which provides 4K sectors.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
6fa0bf47b6 boards: st: nucleo_g07xrb: Rework storage partition
NVS susbsystem requires a slot covering 2 sectors of flash, which
should be at minimum 4K on G0 series which provised 2K sectors.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
ffcaabe84a boards: st: disco_l475_iot1: Rework flash partition
Rework flash partition to provide a storage partition and 2 image slots.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
cc4b384ad2 boards: st: b_l4s5i_iot01a: Rework flash partition
Rework flash partition to make use of the whole 2M of flash.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Erwan Gouriou
8da1aa13fc boards: st: nucleo_f207zg: Rework flash partition
STM32F2 series flash layout is as follows:
	{.pages_count = 4, .pages_size = KB(16)},
	{.pages_count = 1, .pages_size = KB(64)},
	{.pages_count = 7, .pages_size = KB(128)}

Since NVS subsys requires 2 sectors of max 32K in total, provide a
flash partition which respects this constraint using 2 of the 16K sectors
in the beginning of the layout.

Provide a compatible flash partition usable with mcuboot, but keep the
storage partition commented as its usage is not compatible with use w/o
mcuboot enabled (in this case main image starts as offset 0 which conflicts
with storage partition).

Note that it isn't possible either to get main image starting directly
in the 128K sectors w/o bootloader as boot flash address can't be
configured.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-22 17:43:54 +01:00
Vladislav Pejic
aad4c69068 drivers: sensor: adxl367: Added RTIO stream
Updated ADXL367 driver with RTIO stream functionality.
RTIO stream is using both FIFO threshold and FIFO full triggers.
Together with RTIO stream, RTIO async read is also implemented.
Supported FIFO_CHANNEL configurations:
- XYZ
- X
- Y
- Z
- XYZT
- XT
- YT
- ZT
Configurations with external ADC are currently not supported.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-11-22 17:43:36 +01:00
Vinayak Kariappa Chettimada
398b91543f samples: Bluetooth: hci_ipc: Fix Newton's Cradle, reduce RAM usage
The required ISO Tx buffers have to match the Read Buffer
Size values, otherwise the difference in the value cause a
similar amount of buffers to be stalled in the IPC driver.

Use reduced HEAP size to make room for increase in RAM
usage.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Vinayak Kariappa Chettimada
98130afd0a tests: bsim: Bluetooth: Fix simulation length be greater than wait time
Fix some test simulation length be greater than wait time.
These tests completed within 12 seconds, 15 second wait
time is a good value with included margin and a 20 second
simulation time.

These tests failed on this PR CI.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Vinayak Kariappa Chettimada
9df4b548ba Bluetooth: Controller: Ext Adv Auxiliary PDUs with ticks_slot_window
Add implementation for Extended Advertising Auxiliary PDUs
to use ticks slot window feature.

This will allow the periodic scheduling of AUX_ADV_IND PDUs
to drift upto 10 ms advertising delay minus the ticks_slot
time reservation of the AUX_ADV_IND PDU when overlapping
with other states/roles that cannot be moved around, to
avoid skipping them.

Having an active Extended Advertising simultaneously with
an ISO Synchronized Receiver or Connected ISO connection
will now have less ISO SDU loss when using 10 ms ISO
intervals.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Vinayak Kariappa Chettimada
b838b17755 Bluetooth: Controller: Introduce ticker reschedule with drift
Introduce ticker reschedule with drift so that role like
AUX_ADV_IND can start after overlapping states and roles
using time reservations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Vinayak Kariappa Chettimada
ec39d6257e Bluetooth: Controller: Fix to reschedule before overlap when yielding
Fix to reschedule before overlap and be collision resolved
in the next periodic interval for tickers using slot window
yield.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-22 17:43:04 +01:00
Francois Ramu
22b6839981 samples: sensor: sensors for trigger without trigger
Exclude stm32 platforms with accel0 or magn0
for running the samples/sensor for trigger
as their sensor driver does not have trigger set.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-22 17:42:32 +01:00
Francois Ramu
2e2396ded1 boards: st: Fix memory mapping and size for STM32L4plus
Align the total SRAM size for STM32L47x/L48x/L49x/L4Ax
boards. Those MCUs with up to 320 Kbytes SRAM:

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-22 17:42:25 +01:00
Francois Ramu
4864481499 dts: arm: st: Fix memory mapping and size for STM32L4plus
Split and fix the total SRAM size for STM32L4Px/L4Qx/L4Rx/L4Sx
device. Those MCUs with up to 640 Kbytes SRAM:
This is 640KB for the STM32L4Rxxx and STM32L4Sxxx devices :
• 192 Kbytes SRAM1 + 64 Kbytes SRAM2 + 384 Kbytes SRAM3
This is 320KB for the STM32L4P5xx and STM32L4Q5xx devices :
• 128 Kbytes SRAM1 + 64 Kbytes SRAM2 + 128 Kbytes SRAM3

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-22 17:42:25 +01:00
Francois Ramu
fb152f458b boards: st: Fix memory mapping and size for STM32L47x/8x/9x/ax
Align the total SRAM size for STM32L47x/L48x/L49x/L4Ax
boards. Those MCUs with up to 320 Kbytes SRAM:
    • 96 Kbytes SRAM1 and 32 Kbyte SRAM2 on STM32L47x/L48x.
    • 256 Kbyte SRAM1 and 64 Kbyte SRAM2 on STM32L49x/L4Ax

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-22 17:42:25 +01:00
Francois Ramu
2eb875618b dts: arm: st: Fix memory mapping and size for STM32L47x/8x/9x/ax
Split and fix the total SRAM size for STM32L47x/L48x/L49x/L4Ax
device. Those MCUs with up to 320 Kbytes SRAM:
• 96 Kbytes SRAM1 and 32 Kbyte SRAM2 on STM32L47x/L48x.
• 256 Kbyte SRAM1 and 64 Kbyte SRAM2 on STM32L49x/L4Ax
The sram0 node at address 0x20000000 and sram1 at address 0x10000000

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-22 17:42:25 +01:00
Jukka Rissanen
5531692bcc tests: net: socket: udp: Add IP_LOCAL_PORT_RANGE socket option tests
Make sure that the IP_LOCAL_PORT_RANGE socket option works
as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 17:42:08 +01:00
Jukka Rissanen
b0b20229b0 net: sockets: Add support for IP_LOCAL_PORT_RANGE socket option.
Add support for IP_LOCAL_PORT_RANGE socket option. The option
supports both IPv4 and IPv6 sockets although the type is IPPROTO_IP.

The option can be used to enforce the ephemeral port number selection
to be in certain range.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 17:42:08 +01:00
Maochen Wang
bb276802ae MAINTAINERS: Add MaochenWang1 as a collaborator to Wi-Fi
Have contributed regularly to Wi-Fi, please see following:
https://github.com/zephyrproject-rtos/zephyr/pulls?q=is%3Apr+is%3Aclosed+author%3AMaochenWang1

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-22 17:41:21 +01:00
Aymeric Aillet
dd446a724f soc: renesas: rcar: Remove CONFIG_PINCTRL
Remove CONFIG_PINCTRL from rcar defconfig files
Fixes: #78619

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-11-22 17:41:02 +01:00
Aymeric Aillet
d41ce536c5 drivers: rcar: Select CONFIG_PINCTRL
Select PINCTRL for drivers: pwm, sdhc, serial

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2024-11-22 17:41:02 +01:00
Pieter De Gendt
7f0f28fecc ruff: Remove resolved excluded linter issues
All linter issues in scripts/west_commands/runners are fixed and can be
removed from the exclusion list.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
336c7dadac scripts: west_commands: runners: Fix line-too-long (E501)
Wrap long lines to max 100 characters.

See https://docs.astral.sh/ruff/rules/line-too-long/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
775db0e63a scripts: west_commands: runners: Fix f-string (UP032)
Replace .format() calls with f-strings.

See https://docs.astral.sh/ruff/rules/f-string/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
bf7f41d880 scripts: west_commands: runners: Sort and format imports (I001)
Apply sorting and formatting rules on imports.

See
https://docs.astral.sh/ruff/rules/unsorted-imports/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
93457b42f9 scripts: west_commands: runners: Fix unused/deprecated imports (F401/UP035)
Remove some imports that are no longer needed.

See
https://docs.astral.sh/ruff/rules/unused-import/
https://docs.astral.sh/ruff/rules/deprecated-import/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
acb2eaacbd scripts: west_commands: runners: Fix non-pep604-annotation (UP007)
Replace Optional types with the | operator.

https://docs.astral.sh/ruff/rules/non-pep604-annotation/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
907a0db599 scripts: west_commands: runners: Fix non-pep585-annotation (UP006)
Use standard library variants for list, dict, tuple, set

See https://docs.astral.sh/ruff/rules/non-pep585-annotation/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
523015b6ef scripts: west_commands: runners: raise-without-from-inside-except (B904)
Pass exceptions up the chain.

See https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
f7902bc817 scripts: west_commands: runners: Fix bare except (E722 & B904)
Catch explicit exceptions and pass them them to the ValueError

See
https://docs.astral.sh/ruff/rules/bare-except/
https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
1e1c7f7c16 scripts: west_commands: runners: Fix mutable-argument-default (B006)
Do not use mutable default arguments.

See https://docs.astral.sh/ruff/rules/mutable-argument-default/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
8055145ad3 scripts: west_commands: runners: Fix super-call-with-parameters (UP008)
Simplify super() calls.

See https://docs.astral.sh/ruff/rules/super-call-with-parameters/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
07342d9b81 scripts: west_commands: runners: Fix if-with-same-arms (SIM114)
Simplify if statements with same arms.

See https://docs.astral.sh/ruff/rules/if-with-same-arms/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
cd02de5df9 scripts: west_commands: runners: Fix reimplemented-builtin (SIM110)
Convert for loop to use any().

See https://docs.astral.sh/ruff/rules/reimplemented-builtin/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
0f54805faa scripts: west_commands: runners: Fix suppressible-exception (SIM105)
Use contextlib to suppress an error.

See https://docs.astral.sh/ruff/rules/suppressible-exception/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
df794b5493 scripts: west_commands: runners: Conditional import
Convert except: pass statement so the conditional import results in a
NoneType.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
7f72dd3a0f scripts: west_commands: runners: Fix f-string-missing-placeholders (F541)
Constant strings should not be f-strings.

See https://docs.astral.sh/ruff/rules/f-string-missing-placeholders/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
c0d08e5212 scripts: west_commands: runners: Fix not-is-test (E714)
Make the "not is" more readable.

See https://docs.astral.sh/ruff/rules/not-is-test/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
02fac6e1c0 scripts: west_commands: runners: Fix multiple statements on one line (E701)
Place if and conditional statements on separate lines.

https://docs.astral.sh/ruff/rules/multiple-statements-on-one-line-colon/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
3a55e8a52f scripts: west_commands: runners: Fix set-attr-with-constant (B010)
Do not use setattr for constants.

See https://docs.astral.sh/ruff/rules/set-attr-with-constant/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
e42d30ef6c scripts: west_commands: runners: Fix printf-string-formatting (UP031)
Replace printf-style string format.

See https://docs.astral.sh/ruff/rules/printf-string-formatting/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
d562731096 scripts: west_commands: runners: Fix redundant-open-modes (UP015)
Don't pass default open mode.

See https://docs.astral.sh/ruff/rules/redundant-open-modes/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
fc5286fe25 scripts: west_commands: runners: Fix useless-object-inheritance (UP004)
Remove object inheritance.

See https://docs.astral.sh/ruff/rules/useless-object-inheritance/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
dbaf01ef28 scripts: west_commands: runners: Ignore open file without ctx (SIM115)
Add noqa to a complex statement with multiple open/close statements.

See https://docs.astral.sh/ruff/rules/open-file-with-context-handler/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
2e39674344 scripts: west_commands: runners: Fix needless-bool (SIM103)
Return the result instead of the if statements.

See https://docs.astral.sh/ruff/rules/needless-bool/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
d397b01338 scripts: west_commands: runners: Fix collapsible-if (SIM102)
Combine multiple nested if statements.

See https://docs.astral.sh/ruff/rules/collapsible-if/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
133665e55a scripts: west_commands: runners: Fix unused-import (F401)
Removed unused import.

See https://docs.astral.sh/ruff/rules/unused-import/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
ddbba0ef4c scripts: west_commands: runners: Fix mixed-spaces-and-tabs (E101)
Use spaces for indentation.

See https://docs.astral.sh/ruff/rules/mixed-spaces-and-tabs/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
a48e37608f scripts: west_commands: runners: Ignore missing abstract decorator (B027)
The empty function is intentional.

https://docs.astral.sh/ruff/rules/empty-method-without-abstract-decorator/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
e8294b4590 scripts: west_commands: runners: Fix assert-false (B011)
Prefer AssertionError instead of assert False.

See https://docs.astral.sh/ruff/rules/assert-false/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
25be1501ab scripts: west_commands: runners: Fix pylint unbound issues
Variables are possibly unbound, initialize to None.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Pieter De Gendt
aae018be87 scripts: west_commands: runners: Remove obsolete pylint ignores
These ignores were added with an older version of pylint and are
either removed or ignored by default.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-22 17:40:37 +01:00
Anas Nashif
1f17c761e5 ci: test_plan: call with --no-detailed-test-id
add --no-detailed-test-id to call of test_plan. Was missed in previous
commit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 17:40:25 +01:00
Anas Nashif
c14b022bea ci: twister: add --no-detailed-test-id
Switch to short test identifier in reporting.
Part of a series of changes to improve reporting and remove duplication
and clutter when running twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-22 08:27:16 -05:00
Dmitrii Golovanov
e11aecaed5 twister: fix Ztest C++ test names extraction from ELF
Fix Ztest test function name extraction from ELF symbols
for C++ compiled binaries where symbol names need additional
'demangling' to match with corresponding test names.

The `c++filt` utility (part of binutils) is called for
demangling when it is needed.

Twister test suite extension and adjustment.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-22 08:26:59 -05:00
Dmitrii Golovanov
18451bca44 doc: twister: Update test naming and application diagram
Update Test Application diagram as well as Test Scenario and
Test Case naming conventions to make them more clear and aligned
to Ztest suite name included as a part of Test Case name.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-22 08:26:59 -05:00
Dmitrii Golovanov
a72244f2d0 twister: ztest: harness: Fix missed TestCase statuses
Fix a problem of Ztest suite names not taken into account by Twister
to identify a TestCase, so in some situations a Ztest test's status
was not assigned to the proper TestCase and it remains 'None'
whereas the actual status value lost, eventually the resulting total
execution counters not correct.

The issue was observed in these situations:
 * Ztest application with multiple test suites having same test names.
 * Ztest suite is 'skipped' entirely on execution with all its tests.

The proposed solution extends Twister test case name for Ztest to
include Ztest suite name, so the resulting identifier looks like:
   `<test_scenario_name>.<ztest_suite_name>.<ztest_name>`

The above naming scheme now requires ztest_suite_name part to be
provided for `--sub-test` command line option.

Testcase identifiers in twister.json and testplan.json will also
include ztest_suite_name component.

The Twister Ztest(Test) Harness is improved to track all state changes
known from the test application's log for Ztest suites and test cases,
so now it parses log output from a Ztest application more scurpulously.
Regular expressions to match log records are extended and optimized
to compile them only once and, in some cases, fixed (suite summary).

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-22 08:26:59 -05:00
Lucien Zhao
74d1f60faf boards: mimxrt1180_evk: Enable PWM for RT1180 EVK
Enables PWM for RT1180 EVK. Tested with sample led_pwm

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-22 08:26:32 -05:00
Lucien Zhao
18a2a63a25 dts: arm: nxp: rt118x: add flexpwm instances
add 4 flexpwm instances
update clock driver to adapt flexpwm clock structure

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-22 08:26:32 -05:00
Dominik Kilian
81bb231fd0 ipc: icbmsg: Reduce block alignment to 32-bits
The ICBMsg backend divides its memory into
blocks. Each block is aligned to data cache
alignment. Is it not required, since adjacent
blocks has the same data flow direction (either
read-only or write-only). This commit changes
it to 32-bits making wasted memory significantly
reduced.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-11-22 08:26:22 -05:00
Martino Facchin
4fe6d47683 boards: arduino_nicla_vision: fix hardware information
The board shares many features with other Arduinos based on STM32H747
(like the HSE in bypass mode).
Once https://github.com/zephyrproject-rtos/zephyr/pull/76542 is merged,
PF1550 support should be added too to allow switching IO voltage
from 3v3 to 1v8

Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
2024-11-22 08:26:15 -05:00
Filip Kokosinski
585fb2a61b boards/arduino/portenta_h7: enable USART1 on M4
Right now, USART1 is enabled on the M7 target variant by default, leaving
M4 without a UART to use; this is the way this port was originally
contributed.

Since then, USB was enabled on M7, changing the console backend from USART1
to USB CDC ACM; the M4 target was left unchanged.

This commit enabled USART1 on the M4 variant and disabled it on the M7
variant, so that the M4 variant can use it as its console backend.

Note that, for the M4 variant, USART1 has been assigned to `zephyr,console`
and `zephyr,shell-uart` since this port was contributed, even though USART1
was always disabled on M4.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-22 08:25:54 -05:00
Benedikt Schmidt
b4893c46ce drivers: fpga: use defaults in iCE40 binding
Replace the DT_INST_PROP_OR statements with defaults
in the devicetree binding of the iCE40.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-22 08:25:44 -05:00
Chen Xingyu
1dd6d0db67 tests: subsys: mgmt: Fix warning of size_t formatting with %.*s
This addresses the following warning building with `CONFIG_64BIT=y`:

    error: field precision specifier '.*' expects argument of type 'int',
    but argument X has type 'size_t' {aka 'long unsigned int'}

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-11-22 08:25:31 -05:00
Chen Xingyu
bb94c63fa2 samples: subsys: ipc: Fix warning of size_t formatting with %.*s
This addresses the following warning building with `CONFIG_64BIT=y`:

    error: field precision specifier '.*' expects argument of type 'int',
    but argument X has type 'size_t' {aka 'long unsigned int'}

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-11-22 08:25:31 -05:00
Chen Xingyu
50f23500b8 net: Fix warning of size_t formatting with %.*s
This addresses the following warning building with `CONFIG_64BIT=y`:

    error: field precision specifier '.*' expects argument of type 'int',
    but argument X has type 'size_t' {aka 'long unsigned int'}

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-11-22 08:25:31 -05:00
Andrej Butok
ae5609aef2 samples: smp_svr: Move bluetooth tag to bt_tests
Move "bluetooth" tag and harness from the common section
of the smp_svr sample.yaml file to "bluetooth" specific test cases.

Signed-off-by: Andrej Butok <Andrey.Butok@nxp.com>
2024-11-22 08:23:18 -05:00
Chris Friedt
932e8708b1 tests: posix: single_process: correct typo and filter
What looks to be a copy-paste typo was not caught in
code review.

Change .rwlocks to nothing and move the filter to the
common area.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-22 08:22:30 -05:00
Johan Hedberg
da713a2b86 doc: release-notes-4.1: Mention removal of deprecated HCI API
Mention the removed deprecated Bluetooth HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Johan Hedberg
30d1d0e526 Bluetooth: Host: Remove deprecated HCI driver API
Remove the deprecated HCI driver API which was provided by the hci_driver.h
header file. The deprecation happened in Zephyr 3.7, so the API can now be
removed for Zephyr 4.1.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Johan Hedberg
3063f18942 Bluetooth: Host: Remove unnecessary hci_driver.h includes
None of these files actually use anything from the hci_driver.h header
file.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-22 11:37:12 +01:00
Alberto Escolar Piedras
4558056f81 tests/bsim: Also runtime test the UART drivers for the nrf54l15
To increase coverage.

Note that we call twister separatedly for this target, due to the 54l15
overlays using UARTE20 which is indexed in simulation as "2", but as
the nrf52833 does not have 3 instances. So "-uart2_loopback" is not
a valid option for a 52833 executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
9c386cab93 tests uart_pm: Enable for nrf54l15bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
eec736355c tests uart_mix_fifo_poll: Enable for nrf54l15bsim
Enable this test in the simulated nrf54l15 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
dd2f4117e3 tests uart_async_api: Enable in nrf54l15bsim//cpuapp
Enable this test in the simulated nrf54l15 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
890f13426e doc boards nrfbsim: Mention the UARTE as supported for nrf54l15
Include in the list of supported peripherals the UARTE for the
simulated nrf54l15

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Alberto Escolar Piedras
ca46c7c816 boards nrfbsim: Enable UART(E) peripherals for nrf54l15bsim
The HW models now support this peripheral for this target.
Let's enable it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-22 11:34:30 +01:00
Jukka Rissanen
c2802618df tests: net: socket: tcp: Add min_flash to the test config
Add minimum flash requirement to the tests. This will effectively
exclude nrf5340dk/nrf5340/cpuapp/ns as it does not have
enough flash for the application.

Fixes #81608

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-22 11:33:52 +01:00
Yong Cong Sin
45ebd390cf arch: riscv: reg: include required header
Include `zephyr/sys/util.h` for the `STRINGIFY()` macro.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-22 11:32:22 +01:00
Emil Lindqvist
067a35f2fb display: stm32: implement display_get_framebuffer API
This commit implements the display_get_framebuffer API function in
the STM32 LTDC display driver

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-11-22 11:31:24 +01:00
Anas Nashif
28796076d8 tests: kernel: common: optimize filters
Optimize filters and remove build_on_all, this option is already used in
the synchronization sample which has more coverage on small platforms.

Since we only build, it does provide basic sanitcheck for the kernel as
well.

This reduces testplan on PRs and push events by almost 1000 entries that
would only be built or filtered at runtime.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-21 19:22:35 -05:00
Benedikt Schmidt
b0a1dddde3 drivers: fpga: fix waveform for iCE40 configuration in SPI mode
The datasheet of the iCE40 specifies that there should be a leading and
trailing clocks phase during its configuration with SPI. Due to the
limitations of the SPI interface, and probably also due to a lock of
support for such a feature for instance in the STM32 SPI peripheral,
this is achieved with additional SPI transfers before and after the
actual image. Unfortunately, this by default also affects the slave
select GPIO, which has to stay high during these phases.
This fixes this behaviour via not passing the slave select GPIO
to the SPI driver and manipulating this GPIO manually.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-21 19:22:20 -05:00
Mahesh Mahadevan
21d0a3b699 tests: pwm: Add support for SCTimer PWM on FRDM-MCXN947
Add overlay files to enable test of PWM over SCTimer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Mahesh Mahadevan
488e4bbf5f boards: frdm_mcxn947: Add SCTimer support
Add support for SCTimer

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Mahesh Mahadevan
12486ca7e2 dts: mcxn947: Add SCTimer support
Add SCTimer node

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 19:22:07 -05:00
Krzysztof Chruściński
f235ddb2cf tests: drivers: uart: async_api: Add uart120 instance to nrf54h20dk
Add second instance to be tested on nrf54h20dk. uart120 is a fast UARTE
which works on fixed pin locations. It is not available for cpuppr core.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
d2b69a4ec7 tests: drivers: uart: async_api: Rework for multi instance
Rework the test to be able to run on multiple instances.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
bc007fd53b tests: drivers: uart: async_api: Add missing static keyword
Multiple variable in the test were missing static keyword.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Krzysztof Chruściński
760bba6d24 drivers: serial: nrfx_uarte: Fix pin retention
b6d45423c6 Added support for pin retention but it was added
only to the case when device PM is used. There is another mode
in which UARTE is disabled when idle (low power mode) and in
that case pin retention must also be added.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-21 20:12:13 +01:00
Hongquan Li
41e33573e8 drivers: wifi: esp_at: Fix serial receive interrupt can't exit
If a character is received immediately after modem_iface_uart_init called,
the modem_iface_uart_isr function will not read the data in the serial port
fifo register as the context has not been registered at this time,
which will result in the program not being able to exit the interrupt,
so the context should registered before the serial port is initialised.

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-11-21 20:12:00 +01:00
Benedikt Schmidt
53ae195f0d drivers: fpga: replace runtime checks with buildtime asserts in iCE40
Replace NULL checks for the set and clear registers with BUILD_ASSERTs
in the iCE40 device instantiation.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-21 20:11:47 +01:00
Emil Gydesen
07b7802460 doc: Bluetooth: Audio: Shell: Make shell docs a bit more consistent
Make the headers of the audio shell documentation files consistent.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 20:11:13 +01:00
Emil Gydesen
b20784dfbb docs: Bluetooth: Move documentating for shell out of API
The API directory really isn't the best place for shell
documentation, which isn't API.

Created a new directory for Bluetooth shell documentation
and moved the ISO and LE Audio docs in there.

The existing bluetooth-shell.rst file was also split into
several new files, so that it follows the same structure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 20:11:13 +01:00
Jukka Rissanen
39889c0023 net: if: Do not report error if we are already in promisc mode
If we are already in promiscuous mode, then do not report error
in that case.

Fixes #81605

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-21 20:11:01 +01:00
Pieter De Gendt
f05deb1aa4 python: Format trivial files where only newlines were missing
Apply formatting on files that only needed adding newlines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-21 20:10:51 +01:00
Muhammad Waleed Badar
9a804572a3 samples: rtc: Generic RTC sample
This sample app set and read date/time from the Real-Time Clock.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2024-11-21 14:49:19 +01:00
Dominik Ermel
77ebf82b3e storage: flash_map: Don't generate flash area when no device
Change in default flash map generation, where partitions hanging of
disabled devices will not have flash area generated.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-21 14:48:44 +01:00
Chaitanya Tata
bbfb546e57 modules: hostap: Add external crypto support
Add an option for platforms or forks to provide their own hostap
compatible crypto implementation. This may include proprietary or
platform specific stuff that may or may not be upstreamed to Zephyr.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-21 14:48:14 +01:00
Grzegorz Chwierut
e0bd7e7c87 twister: Allow sharing hardware platform between variants
Extended hardware map to share a single board between variants.
To run tests for different variants on the same board
without re-configuring the hardware map file for each variant,
one can use a `platform` atribute as a list of names.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-11-21 14:48:03 +01:00
Emil Gydesen
b4f3763c31 tests: Bluetooth: Audio: Use same recv_cb for all tests
This commit changes the BSIM tests to use the same recv callback
for all tests. The purpose of this is to reduce code duplication
and make it easier to maintain the tests.

This also changes the recv_cb so that in case of any error we log
the most recently received SDU, which should provide more
information about why a test failed in case of RX error.

PBP had to be updated a bit to support the audio_stream
struct.

Also modifies a check and log in bap_stream that was less than
helpful to determine if it was the stream or the endpoint that
was NULL.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 14:47:49 +01:00
Seppo Takalo
bc4f026ea9 net: lib: coap_client: Const pointers in request
CoAP client does not modify any of the members, so
change all pointers to const.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
2066cf6a3d net: lib: coap_client: Release non-confirmable requests
Non-confirmable CoAP requests need lifetime tracking as well
so we can free the structure after a timeout.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
6c169668e9 net: lib: coap_client: Fix timeout for separate response
When waiting for response after receiving the empty Ack, client
actually used way too timeout.
CoAP timeout only holds the timeout value in ms. t0 is the starting time.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
23345d203e tests: coap_client: Add test for non-confirmable request
Add test for sending multiple non-confirmable requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
d64748cc52 tests: coap_client: Refactor tests
Refactor tests to be a bit shorter, so its easier to read
and copy-paste for a new testcase

All idioms like "ret = somecall(); zasser.." are replaced with just
"zassert_ok(some_call());"

Commonly used structures are global and initialized once.

To avoid cross-test side-effects, suite_after-function is added
to cleanup all requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Seppo Takalo
34a6d5a5dc tests: coap_client: Proper slow-down
Use real-time scheduler with 100x speedup, so timeouts are
accurate enough, but still fast for tests to run.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-21 14:47:38 +01:00
Matthias Hauser
035251d7da boards: we: Add board orthosie1ev
Added new board file of Wurth Electronic board Orthosie-I

Signed-off-by: Matthias Hauser <matthias.hauser@we-online.de>
2024-11-21 14:47:02 +01:00
Omkar Kulkarni
b160063efb Tests: Bluetooth: mesh_shell: Update prj.conf
Updates and aligns the project config file to enable usage of multiple
keys so that users are not required to manually update the project
config file for testing most common mesh scenarios requiring multiple
netkeys and appkeys.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-11-21 14:46:47 +01:00
Omkar Kulkarni
95fff388ba Bluetooth: Mesh: Shell: Align commands
Aligns subnet bridge related commands according to conventions used for
rest of the shell commands. Also updates documentations to reflect the
change.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-11-21 14:46:31 +01:00
James Roy
ae256e1f6c boards: openisa: Remove CONFIG_PINCTRL from the boards defconfig
Removed 'CONFIG_PINCTRL' from openisa board defconfig.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-21 14:46:19 +01:00
Ilya Tagunov
36c9777be8 llext: fix unaligned access for ARC
We hit some unaligned access faults running our internal tests.
Not every 32-bit instruction is 32-bit aligned; some are 16-bit aligned.
Make all reads and writes potentially unaligned to be on the safe side.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-21 14:46:08 +01:00
Fin Maaß
d18f4256ee drivers: fpga: fix log level
Use CONFIG_FPGA_LOG_LEVEL for the fpga
log modules.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-21 11:02:23 +00:00
Erwan Gouriou
2d81351517 drivers: ethernet: stm32: Use MDIO API only if enabled by DTS
Not all STM32 series support Zephyr MDIO API yet, while the API is enabled
by default.
To preserve compatibility, put MDIO API related code under the condition
of "st,stm32-mdio" compatible enablement.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-21 11:02:14 +00:00
Pierrick Guillaume
f716973785 init: fix soc and board hooks doxygen comments
Documentation for *init_hooks were not generated on doc website.
This was due to ill-formed doc-strings for those hooks.

Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
2024-11-21 11:02:07 +00:00
Chris Friedt
b85e1981c3 west: runners: update the rtt implementation for openocd
Previously, rtt start would always fail because the target
(i.e. firmware) had not been started.

```
Info : rtt: Searching for control block 'SEGGER RTT'
Info : rtt: No control block found
```

When the command is 'rtt', run the binary via gdb before calling
'rtt start'. Firmware calls `SEGGER_RTT_Init()` shortly after
init which allows OpenOCD to find the RTT control block.

Similarly, only start the 'rtt server' after calling
'rtt start' to avoid any potential race conditions
internally within OpenOCD.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-21 11:01:55 +00:00
Chris Friedt
9a8ae21a3c west: runners: openocd: mitigate pylint R0201 warning
Previously, there was a warning that the to_num() method can
(and probably should) be unbound from OpenOcdBinaryRunner.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-21 11:01:55 +00:00
Chris Friedt
c71e339773 west: runners: jlink: print RTT server port
Similar to how print_gdbserver_message() prints GDB server info
when "west debug" is run, print RTT server info when "west rtt"
is run.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-21 11:01:55 +00:00
Chris Friedt
d6f32bb339 cmake: flash: update cmake to support rtt target
Add support for the rtt target so that users can run

`west build -p auto -b <board> -t rtt <app>`

similarly to the way that users can now do so with the debug
target, since the rtt target is supposed to be used in a similar
way.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-21 11:01:55 +00:00
Sebastian Głąb
f0eba33258 samples: boards: nordic: coresight_stm: Test STM dictionary mode
Extend STM logger test.
Use nrfutil trace to decode STM logs in dictionary mode.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-11-21 11:01:43 +00:00
Carles Cufi
21475774fc boards: nordic: nRF54L15DK: Add basic support for the L05 and L10 ICs
The nRF54L05 and nRF54L10 are identical to the nRF54L15 except for their
memory sizes. Add support for emulating those ICs on the nRF54L15DK.
This commit only adds support for the main application core. Support for
the FLPR core may be added later.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
1b84958f5a boards: nordic: nrf54l15dk: Rename the board common file
Use the rather logical convention for the name that is applied to other
Nordic boards: <board>_common.dtsi for definitions that are common to
the board itself (LEDs, buttons, etc).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
e78832034f soc: nordic: Introduce the nRF54L05 and nRF54L10
These two new ICs are variants of the nRF54L15 with different memory
sizes:

- nRF54L05: 500KB RRAM, 96KB RAM
- nRF54L10: 1022KB RRAM, 192KB RAM
- nRF54L15: 1524KB RRAM, 256KB RAM

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
0b3a15016b soc: nordic: nRF54L: Consolidate common Kconfig options
There are many common options to all ICs of the 54L series. Consolidate
them in a single entry so that they do not need to be re-typed for each
SoC series member.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Alberto Escolar Piedras
4294814a23 Bluetooth: Controller: nRF: Support MDK 8.68
TASK_SHUTDOWN was deprecated in newer SOCs and now removed
in MDK 8.68 (nrfx 3.9.0)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Alberto Escolar Piedras
ef55d65449 manifest: Update nRF hw models to version compatible with nrfx3.9
Update the HW models module to:
3cfca0192ff84da919e9bc7978bcc2239cd6a395

This includes 2 changes:
* 3cfca01 UART: Model more accurately TASKS_FLUSH behaviour
* 25cbd28: 54L15: Change CLOKPOWER IRQ line (MDK 8.68, nrfx 3.9.0)

    WARNING! This change breaks backwards compatibility with SW
    which expected this line to be 270 for 54L15 devices,
    and therefore with MDKs < 8.68 & nrfx < 3.9.0.
    This change requires updating to the MDK >=8.68 and nrfx >=3.9.0
    if building using the 54L15 models.
    52 and 53 models are not affected.

    Change the CLOCK_POWER interrupt line from 270 to 261.
    This has changed in the latest MDK (8.68) and the new
    value is used in the latest nrfx (3.9.0) drivers.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Alberto Escolar Piedras
30f0d85fa0 manifest: Update nRF hw models to latest
Update the HW models module to:
42737c8ec8485987c7c9b0262b136de623e1ded2

Including the following:
42737c8 TIMER: Support devices without TASK_SHUTDOWN nrfx3.9 MDK 8.68
5fe6873 54 UARTE: Add frametimeout functionality
dc086d7 UARTE: Add basic 54 support
b046745 UARTE: Support better not having UART functionality
1c5f58c README: Mention the nRF54L15 models cover the L10 and L05
597c7d0 TEMP: Also build hal replacement for 54 and define NRF_TEMP_NS/S
fb2ca83 Makefile: Let's build libraries (specially HAL) as pic
200a1e3 Makefiles: move some common options to common snippet

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
e92323f0c4 manifest: hal_nordic: Update to nrfx 3.9.0
See https://github.com/zephyrproject-rtos/hal_nordic/pull/257.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Håvard Reierstad
0b35b38ef5 Bsim: Bluetooth: Mesh: Add multicast bridge tests
Adds two new tests for the Subnet Bridge feature, testing group and
virtual addresses as destinations. The tests are based on the existing
`brg_simple.sh` test, with the addition of a new node and a new subnet
to make sure that messages are bridged to multiple subnets, but only
subnets that have a corresponding entry in the bridging table.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-21 09:25:11 +01:00
Håvard Reierstad
77e017306e Bsim: Bluetooth: Mesh: Rename/refactor send_ra
Renames `bt_mesh_test_send_ra` to `bt_mesh_test_send_data` and changes
the corresponding callback funciton as it is used outside of the replay
attack tests, and can be used to send custom data. The function is
extended to accept a UUID parameter to allow sending data to virtual
addresses.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-21 09:25:11 +01:00
Lothar Felten
e7c3434685 boards: lilygo: ttgo_lora32: enable SDHC support
device tree:
enable support for the SDHC controller to use the micro SD card slot

documentation:
- added instructions for SD card and OLED samples
- added links to code samples

defconfig:
added CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y to
ttgo_lora32_esp32_procpu_defconfig

The chip on the board is a ESP32 chip revision 1.
The board will not boot, it displays the following warning at boot:

I (35) boot: chip revision: v1.0
E (38) boot: You are using ESP32 chip revision (1) that is unsupported.
While it may work, it could cause unexpected behavior or issues.
E (50) boot: Proceeding with this ESP32 chip revision is not recommended
unless you fully understand the potential risk and limitations.
E (62) boot: If you choose to continue, please enable the
'CONFIG_ESP32_USE_UNSUPPORTED_REVISION' in your project configuration.
E (73) boot: HW init failed, aborting

In order to prevent a boot loop, CONFIG_ESP32_USE_UNSUPPORTED_REVISION=y
was added to the defconfig.

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-11-21 09:21:56 +01:00
Kai Vehmanen
58df2533bb drivers: dma: intel-adsp-hda: coding style fix
Align to coding style and use braces for all if blocks.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-11-21 09:21:04 +01:00
Kai Vehmanen
1bafbf4f1d drivers: dma: intel-adsp-hda: optimize L1 exit handling in ISR
Use the existing 'atomic' bitmask to speed up ISR processing for
CONFIG_DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT. This bitmask is used
to track enabled DMA channels.

In the common case, only a few DMA channels are active and low
channels are allocated first. Take advantage of this and not
iterate over all DMA channels of all all host devices. Rather
break out as soon as L1 exit handling is done for all enabled
channels.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-11-21 09:21:04 +01:00
Emil Gydesen
ccfd16e2c2 doc: releases: Add BT LE audio Kconfig options to migration guide
Add the list of affect Kconfig options to the migration guide.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
7a72280d01 Bluetooth: HAS: Change select UTF8 to depends on
Change the select to a depends on for the Kconfig options
for HAS and HAS_CLIENT.

This is an effort to reduce the number of selects used by
LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
c4fbe38219 Bluetooth: BAP: Depend on BT_PER_ADV_SYNC instead of select
Change the select of BT_PER_ADV_SYNC and BT_EXT_ADV to
depends on. This is an effort to reduce the use of
select for Kconfig options.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
4c86a5cc8d Bluetooth: BAP: Depend on BT_PAC_{SNK,SRC} instead of select
Modify ASCS and BAP Broadcast sink to depend on the PAC options
instead of selecting them.

Since Kconfig does not support "depends on X if Y",
a select for PAC_{SRC,SNK} is used depending on
ASCS_ASE_{SRC,SNK}.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
c0f86011cb Bluetooth: BAP: Depend on BT_ISO_SYNC_RECEIVER instead of select
The BAP Kconfigs option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
d22c7b0cf2 Bluetooth: BAP: Depend on BT_ISO_BROADCASTER instead of select
The BAP_BROADCAST_SOURCE Kconfig option now depends on
BT_ISO_BROADCASTER instead of selecting it.

This is an effort to reduce the use of select in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
9b653540b8 Bluetooth: BAP: Use def_bool instead of select for BT_AUDIO_RX/TX
Remove the selects and use  def_bool for BT_AUDIO_RX and
BT_AUDIO_TX.

This is part of an effort to reduce select in Kconfig.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
df6b5981bf Bluetooth: Audio: depends on GATT instead of select
Modify the Kconfig options to depend on the GATT
features rather than selecting them.

This is part of an effort to reduce the amount of
selects we use in LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Emil Gydesen
6f86adbc0d Bluetooth: BAP: Use def_bool instead of select for BT_BAP_UNICAST
Remove the selects from BT_BAP_UNICAST_SERVER and BT_BAP_UNICAST_CLIENT
and use a def_bool for BT_BAP_UNICAST.

This is part of an effort to reduce select in Kconfig.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-21 09:19:47 +01:00
Daniel DeGrasse
c071e27e2d boards: fix dependency for LV_COLOR_SWAP_16 to use configdefault
Use configdefault when enabling LV_COLOR_SWAP_16 within boards and
shield definitions, to avoid OR'ing the dependencies for the Kconfig
symbol. Otherwise, a user manually selecting LV_COLOR_DEPTH will
encounter build errors as LV_COLOR_SWAP_16 may be enabled when
LV_COLOR_DEPTH_16 is not selected

Fixes #81546

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-21 09:19:19 +01:00
Yong Cong Sin
027c79add7 doc: posix: option_groups: add section for POSIX_FILE_SYSTEM_R
Add section for POSIX_FILE_SYSTEM_R which contains only `readdir_r()`.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-21 09:18:09 +01:00
Dhruv Menon
20678f9ad5 doc: i2c: Update I2C specification link
The prior link to the I2C specification was broken and no longer
accessible. Updated the link to a valid and current URL

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2024-11-21 09:17:50 +01:00
Jakub Rzeszutko
1aaf08f7f1 lib: shell: replace strtol with strtoul in cmd_load for address parsing
Addresses in cmd_load() should always be unsigned. Previously, strtol()
was used, which is limited to signed long values, causing issues with
addresses >= 0x80000000. This commit replaces strtol() with strtoul(),
ensuring proper handling of the full 32-bit address space.

Fixes #81343

Signed-off-by: Aaron Fontaine <aaron.fontaine@dojofive.com>
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2024-11-21 09:17:08 +01:00
Mahesh Mahadevan
76b6e6b1d7 MAINTAINERS: Update maintainer for release notes
Update to the 4.1 Release managers

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-21 09:14:29 +01:00
Volodymyr Fialko
0d66091cce riscv: pmp: don't reconfigure modes
Previously PMP was avaible only with Multithreading, since it's now
available without MT - add extra checks to prevent user/kernel mode
reconfiguration.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 16:04:15 -05:00
Lucien Zhao
850d471b95 boards: nxp: mimxrt1180_evk: add flexspi1 support
USE_HYPERRAM macro defined shouldn't be placed under
CONFIG_BOOT_FLEXSPI_NOR.

Add flexspi1 pinmux pinctrl and flash partitions

Add flash partitions and correct flash parameter.

This commit was tested with samples: flash_shell on cm33/cm7 cores

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-20 16:00:02 -05:00
Lucien Zhao
6463dd610d drivers: clock_control:: Update ccm_rev2 clock driver for RT118X
flexspi_clock_set_freq can be applied for RT118X series.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-20 16:00:02 -05:00
Lucien Zhao
bfc607e38d dts: arm: nxp: rt118x: add flexspi instance support
add flexspi2 and rename flexspi1 to flexspi to adapt
flexspi.c driver under soc/nxp/rt118x folder.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-20 16:00:02 -05:00
Lucien Zhao
a8f5958c78 soc: nxp: imxrt: imxrt118x: add flexspi support
add flexspi.c file to get flexspi clock rate.

Enable flexspi1 clock if don't boot from flash.

Use custom fixed mpu_regions.c file to config MPU for CM7

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-20 16:00:02 -05:00
Federico Di Gregorio
1f5a1b50fa boards: opta: ADC support
A valid device tree configuration is provided for the ADCs of the 8 input
channels and the sample adc_dt works out of the box. Obviously this is
not the only possible configuration but it provides a good template for
further customization without the need to lookup the ADC GPIOs and
connections in the schematics.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Federico Di Gregorio
f8ab959d7e boards: opta: RS485 support
This set of changes enables the RS485 hardware connected to usart3 and
provides some overlays that allow for easily running the modbus
rtu_client and rtu_server samples on Opta.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Federico Di Gregorio
32309f8124 boards: opta: device tree cleanup
Some changes to cleanup and clarify some device tree nodes:

* removed wrong sdram2 definition
* added all internal flash slots accessible from M4
* added all internal flash slots accessible from M7
* removed CONFIG_UART_LINE_CTRL because not needed by USB CDC ACM

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Federico Di Gregorio
cf45ab85d2 boards: opta: ethernet reorganization
This set of changes reorganize the ethernet configuration by removing the
use a regulator to enable the PHY: the correct GPIO pin is set in code
only if the network has been configured via CONFIG_NET_L2_ETHERNET.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-11-20 15:59:53 -05:00
Valerio Setti
516886be1b mbedtls: MBEDTLS_ENTROPY_POLL_ZEPHYR default on if MBEDTLS_ENTROPY_C
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to
poll some entropy source to gather data that will then be
processed by CTR/HMAC-DRBG modules. This means that in most
of the cases, once MBEDTLS_ENTROPY_C is enabled then also
MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was
done manually until now, as the long list of samples/tests
demonstrate.

This commit solves this dependency by defaulting
MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as
MBEDTLS_ENTROPY_C is set. As a consequence, all manual
enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests
are removed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Valerio Setti
08bd9c72bd mbedtls: use CSPRNG whenever possible as PSA random source
The main problem of MBEDTLS_PSA_CRYPTO_LEGACY_RNG is that it
brings in some legacy modules (entropy + ctr_drbg/hmac_drbg)
which means extra ROM/RAM footprint.
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG instead simply calls to the
CSPRNG which makes it definitely smaller.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Valerio Setti
ac6d834272 mbedtls: auto-select MBEDTLS_CIPHER_AES_ENABLED when built-in in PSA
Auto-select MBEDTLS_CIPHER_AES_ENABLED when AES support is requested
through PSA (i.e. CONFIG_PSA_WANT_KEY_TYPE_AES) and the PSA support is
provided through Mbed TLS itself (i.e. CONFIG_MBEDTLS_PSA_CRYPTO_C).

This mimic what happens in Mbed TLS at build time: if AES support
is required through PSA, but there's no one else providing it
(i.e. no TF-M in Zephyr) then provide this support through legacy
AES module.

This is useful in samples/tests so that the user can simply use the
PSA_WANT symbol to ask for AES support in PSA crypto and then tune
the AES features (ex: CONFIG_MBEDTLS_AES_ROM_TABLES) without the need
to also define CONFIG_MBEDTLS_CIPHER_AES_ENABLED.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Tarang Raval
31eee15fcd dts: arm: rpi_pico: remove #define from dts
Removing direct #define usage in the DTSI file and converting these
definitions to use a dt-bindings header instead.

Relocates the RPI_PICO_DEFAULT_IRQ_PRIORITY definition to a DTSI file and
introduces an override.dtsi file. The override file is used when no other
override file is present, allowing for better flexibility and compliance
with Zephyr’s DTS structure.

Fixes: #79719

Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
2024-11-20 15:59:03 -05:00
Declan Snyder
9863dc9fd8 drivers: nxp_enet: Add get_config for ipv6 chksum
Previously, ipv6 being disabled was a dependency of the hw acceleration
of the checksums for the nxp enet driver, because this ethernet has an
errata causing icmpv6 checksum to not be supported. Now, there is a new
config type in ethernet api for checksum types, so we can re-enable
hardware acceleration for ipv6 by implementing this type in the
get_config api in this driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-20 15:58:47 -05:00
Marvin Ouma
91749dfeb3 tests: posix: common: separate posix xsi streams to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves stropts into a singular
testsuite at tests/posix/xsi_streams app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-20 15:58:26 -05:00
Daniel Leung
55ad66a30c tests: ztest/base: fix incorrect userspace filtering
The filter here should be used to filter for capability:
whether the platform configuration supports userspace. And if
it does support userspace, we then enable CONFIG_TEST_USERSPACE
(and thus CONFIG_USERSPACE) for testing. We should not be
filtering for whether userspace is enabled, but should really
be filtering for whether userspace is supported.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-20 15:58:15 -05:00
Daniel Leung
df4883ad23 tests: thread_error_case: fix incorrect userspace filtering
The filter here should be used to filter for capability:
whether the platform configuration supports userspace. And if
it does support userspace, we then enable CONFIG_TEST_USERSPACE
(and thus CONFIG_USERSPACE) for testing. We should not be
filtering for whether userspace is enabled, but should really
be filtering for whether userspace is supported.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-20 15:58:15 -05:00
Marek Matej
98d0a2bb34 soc: espressif: esp32c6 split cached area
Split the cached area and assign both parts IROM and DROM meaning. This
is necessary to overcome the esptool section merging issues.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-20 15:58:07 -05:00
James Roy
aeaf32aada stm32: Fix wrong binding target for RTC_SEL in stm32u0
Change the stm32u0 clock from CSR_REG to BDCR_REG.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-20 15:57:52 -05:00
Marcin Niestroj
538753d51b boards: st: nucleo_h533re: configure SPI on Arduino headers
This allows to use the board right away with samples and shields depending
on Arduino SPI.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-20 15:57:34 -05:00
Martin Stumpf
50509c34cc lvgl: Flush thread can have preemptive priority
The LVGL flush thread was hard-coded to be cooperative.
For long-running actions like data transfer to the display,
this is problematic as it might block high-frequency actions like
USB or input events.

Hence, make it configurable to be preemptive, and rename it to match the
similar Kconfig values like CONFIG_SDL_THREAD_PRIORITY.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-20 15:57:21 -05:00
Chaitanya Tata
0f1f01f9f4 net: l2: wifi: Fix the minimum value
802.11 doesn't have specific constraints, it just says that listen
interval should be >=0 and it a 2 byte field.

3 as a typical DTIM value from nRF chipsets, so, remove the hardware
specific line and just set a failure.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-20 15:57:06 -05:00
Chaitanya Tata
c5585af4c4 wifi: Add units to listen interval
Listen interval as per 802.11 has units as "beacon intervals" i.e., 1
means 1 beacon interval duration (or short beacon interval duration if
short beacon is enabled).

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-20 15:57:06 -05:00
Dhruv Menon
e6ea761cd7 doc: nxp: Update image of mimxrt1062_fmurt6
The prior image was of poor quality, making it difficult to interpret.
Updated the image with a higher-quality version.

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2024-11-20 15:56:55 -05:00
Alberto Escolar Piedras
f79d879d50 tests: Thread-Metric: Fix filter description
Correct the description of why we exclude the POSIX arch

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-20 15:56:16 -05:00
Anas Nashif
c1b8cd7db1 ci: twister_prep: do not double check for event
We already do the check for the job.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
5b51632103 ci: twister: fix setting of output for workflow_call
Fix setting of output variables of workflow_call.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
0c88010d0d Reapply "ci: twister: use workflow_call for prep job"
This reverts commit fd4c7bbbc2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Anas Nashif
dc14a212eb ci: twister: check event using correct context
Check for event using correct github context.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 15:53:58 -05:00
Yong Cong Sin
6843240196 drivers: intc: plic: use per-instance spinlock
Instead of doing an `irq_lock()`, use per-instance spinlock instead.

Refactored out an unlocked version of `local_irq_is_enabled`
from `riscv_plic_irq_is_enabled()` to achieve that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-20 08:26:02 -05:00
Volodymyr Fialko
1310856348 tests: riscv: test PMP stack guards
Test if PMP protected regions prevents write access.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
2024-11-20 08:25:49 -05:00
Volodymyr Fialko
9eee2eaee6 riscv: pmp: enable stackguard without multithreading
Without multithreading only two stacks present: ISR and main.
As any stack they also could overflow, so it make sense to add stack
guard for them also.

Remove stack guard dependency on multithreading and mark
`Z_RISCV_STACK_GUARD_SIZE` bytes at the beginning of stack as read-only
region with PMP entry.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
2024-11-20 08:25:49 -05:00
Noemie Gillet
2253a26c10 drivers: nsos: support for AF_PACKET
Handle AF_PACKET family.

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-20 08:24:08 -05:00
Noemie Gillet
10bb61ee7d drivers: nsos: support for AF_UNIX
Handle AF_UNIX family sockets for NSOS offloaded driver
Note that the size of struct sockaddr_un is done conditionnaly based on
CONFIG_NET_NATIVE_OFFLOADED_SOCKETS
Also, NET_SOCKADDR_PTR_MAX_SIZE needs to be updated only if
CONFIG_NET_SOCKETS_PACKET is not set. Otherwise, for a AF_PACKET socket,
a struct net_context variable can be corrupted, as local would have be on
16 bytes instead of 20 bytes.

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-20 08:24:08 -05:00
cyliang tw
355d032baa boards: nuvoton: numaker: Drop PINCTRL from board defconfig
To remove CONFIG_PINCTRL from board side for numaker boards.
The Drivers using Pinctrl should be turning Pinctrl on
instead of the responsibility of the board.

Fixes #78619

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-11-20 08:23:58 -05:00
Andi Gerl
9c2421444b net: lwm2m: add set_socketoptions cb to pull context LwM2M context
The pull context LwM2M client's set_socketoptions callback is currently
unused and can't be set by a user. Add a public API to set the
pull context's client's set_socketoptions callback.

Signed-off-by: Andi Gerl <andi.gerl@exacttechnology.com>
2024-11-20 08:23:44 -05:00
Jerzy Kasenberg
e6c9e9a2dd i2c: target: eeprom_target: Fix buffer write
When larger buffer index was introduced only function:
eeprom_target_write_received() was updated to handle
address-width = 16

This adds the same functionality when buffered API is used,
enabled by CONFIG_I2C_TARGET_BUFFER_MODE.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-11-20 08:23:37 -05:00
Mahesh Mahadevan
2894c765a2 github: Update security page for v4.0.0 release
Updates the GitHub security page with the current supported versions
after the v4.0.0 release.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-20 08:23:14 -05:00
Anas Nashif
1c596b8b77 boards: mps3_corstone300_fvp_ns: disable twister
Disable board temporarily as it fetches code from external repositories.

Related issue #81656

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-20 08:22:52 -05:00
Guennadi Liakhovetski
cbb6199e67 LLEXT: no repeated linking with inline relocations
When linking and relocations are performed on the ELF object itself
with no copying, also global binding linking can break references.
Disable linking globally for such cases.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-20 10:17:06 +00:00
Guennadi Liakhovetski
827909b7b9 LLEXT: Xtensa: don't generate FLIX commands
The LLEXT linker for Xtensa cannot relocate FLIX commands, disable
them in extensions only until we have a solution. Note, that this
only affects extensions, the main Zephyr binary is still built with
FLIX commands.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-20 10:17:06 +00:00
Mara Furland
30fa48558e boards: qorvo: add DWM3001CDK support
Add support for the decawave DWM3001C board from qorvo

Signed-off-by: Mara Furland <mara@fur.land>
2024-11-20 10:16:58 +00:00
Lingao Meng
6d6d4565d3 kernel: workq: Fix function format to avoid CI Warning
formating

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-20 10:15:20 +00:00
Lingao Meng
836fa88cbd kernel: work: Add missing ASSERT for args
Add missing ASSERT for dwork & queue.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-20 10:15:20 +00:00
Lingao Meng
2a3b28a3f5 kernel: work: Remove meanless foreach for work
Since call this function both in
```C
	k_spinlock_key_t key = k_spin_lock(&lock);

	bool need_flush = work_flush_locked(work, flusher);

	k_spin_unlock(&lock, key);
```

So, there are no flag_get change.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-20 10:15:20 +00:00
Jakub Wasilewski
8e881959a4 boards: hifive_unmatched: add support for S7 and U74 targets
Add `hifive_unmatched//s7` (earlier selected by default, using
`hifive_unmatched`) and `hifive_unmatched//u74` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
2423c87d54 boards: hifive_unleashed: add support for E51 and U54 targets
Add `hifive_unleashed//e51` (earlier selected by default, using
`hifive_unleashed`) and `hifive_unleashed//u54` targets.

Define work-area for other 4 cores in openocd.cfg

Update twister platform white/black lists, to support new targets

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
84434ba006 arch: riscv: add Kconfig option for imprecise FPU state tracking
According to the RISC-V Instruction Set Manual: Volume II, Version 20240411
(Section 3.1.6.6), some implementations may choose to track the dirtiness
of the floating-point register state imprecisely by reporting the state to
be dirty even when it has not been modified. This option reflects that.

Also add a filter in `tests/arch/riscv/fpu_sharing/` based on imprecise
FPU state tracking

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
Jakub Wasilewski
939e94076d boards: hifive_unleashed: switch zephyr SRAM region from DDR to L2LIM
Switch from `ram0` to `l2lim` in `zephyr, sram` in board DTS

Add `l2lim` in `support/hifive_unleashed.resc` and targets l2lim
as a work-area in `openocd_hifive_unleashed.cfg`

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-20 10:15:03 +00:00
TOKITA Hiroshi
43db55a79b drivers: clock_contrl: Remove renesas,ra-clock-generation-circuit driver
Remove the renesas,ra-clock-generation-circuit driver, which is no longer
needed after migrating to the FSP-based implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
f0219c35da drivers: pinctrl: Remove renesas,ra-pinctrl driver
Remove the renesas,ra-pinctrl driver, which is no longer
needed after migrating to the FSP-based implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
8fe5544948 boards: arduino: uno_r4: remove CONFIG_PINCTRL from defconfig of uno_r4
This PR fixes #78619 for the Arduino UNO R4 Minima/Wifi board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
ffe6099fed boards: arduino: uno_r4: Migrate to FSP
Update configuration for migrate to FSP

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
6376ee15be boards: mikroe: clicker_ra4m1: Migrate to FSP
Update configuration for migrate to FSP

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
183273ed3f dts: arm: renesas: ra4: Use renesas,ra-cgc-pclkblock driver
Switch the clock controller driver to renesas,ra-cgc-pclkblock
which can be used with FSP.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
397c48a13e dts: arm: renesas: ra4: Use renesas,ra-pinctrl-pfs driver
Switch the pinctrl driver to renesas,ra-pinctrl-pfs which can be
used with FSP.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
af2021ea4c soc: renesas: ra: ra4m1: Adapts the Option Setting Memory to FSP.
Since the Option Setting Memory area is set in FSP, the Kconfig value
switches between using the FSP implementation or the existing
Option Setting Memory implementation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
TOKITA Hiroshi
c968d4eb81 soc: renesas: ra: ra4m1: Migrate to FSP-based configuration
Change to use FSP to integrate with other Renesas RA series.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-20 10:14:41 +00:00
Anas Nashif
3364a35f05 Revert "irq: multilevel: compile 3rd level IRQ APIs only when enabled"
This reverts commit 2152b8e414.

This commit is breaking CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 22:40:13 -05:00
Anas Nashif
c3b2f44173 ci: testplan: do not deal with arch changes
This is generating lots of duplication and unnecessary builds when
multiple arches are being changed. Let's stick to basic coverage which
should be enough for PRs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 22:25:18 -05:00
Jordan Yates
b8360ad5ee sys_clock: extra time defines
Add additional time defines to round out the `SEC_PER_*` family.
These are easier to type than `SEC_PER_MIN * MIN_PER_HOUR` and
`SEC_PER_MIN * MIN_PER_HOUR * HOUR_PER_DAY`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-19 20:05:08 -05:00
Alberto Escolar Piedras
d703d9077f doc: 4.1 release & migration guide: Add native deprecation
Mention that CONFIG_NATIVE_APPLICATION &
CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT have been deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-19 20:04:55 -05:00
Alberto Escolar Piedras
b77d896ff6 boards native_sim: Deprecate CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT
This option existed only to make the transition from native_posix to
native_sim easier. As native_posix is going to be removed in v4.2
we deprecate this option now, so it will also be removed.

We also switch this option to default to false already now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-19 20:04:55 -05:00
Alberto Escolar Piedras
c4b7b684dc boards native: Deprecate CONFIG_NATIVE_APPLICATION
This option is used in tree only by native_posix, which is deprecated
and being replaced by native_sim. But may be used also in out of tree
targets.
As part of the native_posix deprecation, and therefore the lack of
testing this feature would have in the future, we are also deprecating
this option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-19 20:04:55 -05:00
Yong Cong Sin
2152b8e414 irq: multilevel: compile 3rd level IRQ APIs only when enabled
This revert the idea of 3fa7d78 from #78845.

The 3rd level IRQ APIs won't compile when
CONFIG_3RD_LEVEL_INTERRUPT_BITS=0.

Updated testcase accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-19 20:04:32 -05:00
Sylvio Alves
fecf909a2a revert "boards: m5stack/m5stack_cores3: disable in twister"
This reverts commit 410c8a57e0 so that
m5stack_cores3 can be tested properly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-19 20:03:55 -05:00
Sylvio Alves
d2a0c3315e boards: m5stack_cores3: update documentation
Modify this board docs to meet latest changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-19 20:03:55 -05:00
Sylvio Alves
6672e673b3 boards: m5stack_cores3: fix board configuration
This board has a few issues handled by this PR:
- Fix DTS entries to meet necessary flash partitions
- Fix wrong kconfig entries realted to SoC model

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-19 20:03:55 -05:00
Anas Nashif
fd4c7bbbc2 Revert "ci: twister: use workflow_call for prep job"
This reverts commit ac08acafdd.

Pull requests not working as expected.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 19:49:21 -05:00
Anas Nashif
2f0fcdf81c ci: twister: do not fail if there are no artifacts
Do not fail if we can't download any artifacts, i.e. when job is
cancelled.

Only publish on push/schedule

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 19:49:21 -05:00
Pieter De Gendt
1be5c157d9 scripts: ci: check_compliance: Add python lint/format check
Add a compliance test using ruff, for both linting and formatting of
newly added python files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-19 18:36:54 -05:00
Pieter De Gendt
973eaff5a2 scripts: ci: Add ruff configuration files
Add a baseline toml file for current rule violations, and a default
configuration file.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-19 18:36:54 -05:00
Pieter De Gendt
4db97b5bb6 scripts: Add helper scripts for ruff baseline excludes
Add simple scripts to convert ruff check and ruff format output to
toml exclude sections.

These sections can be used to ignore baseline violations for an existing
codebase.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-19 18:36:54 -05:00
Pieter De Gendt
05c6517fc9 scripts: ci: check_compliance: Add support for end line and column
Reporting or annotating issues can be done on a range rather than a
single line.

Add support for end line and end column.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-19 18:36:54 -05:00
Lucien Zhao
95448ba21d boards: nxp: mimxrt1180_evk: set lptmr1 status as OK
set lptmr1 status as OK
test counter_basic_api passed on cm33/cm7 cores

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-19 18:36:31 -05:00
Lucien Zhao
e5ee95893c dts: arm: nxp: rt118x: add lptmr instances
Config/Enable lptmr1/2/3 clock
Add 3 lptmr instances for RT118X

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-11-19 18:36:31 -05:00
Bryce Wilkins
dacc462bbd west.yml: segger: RTT control block init mode Kconfigs
Kconfig options for RTT control block initialization and linker
section were added in #53569, however the Zephyr west.yml was not
updated to incorporate the Segger repository changes to make use
of the new Kconfig options.

This fixes that.

Signed-off-by: Bryce Wilkins <bryce.wilkins@gmail.com>
2024-11-19 18:35:45 -05:00
Daniel DeGrasse
71c80932a9 tests: drivers: build_all: display: fix conflicting nodelabels
Some nodelabels in the display build_all test overlay lacked a "test"
prefix, causing test failures on boards that also define displays with
this nodelabel. Prefix these nodes with "test" to resolve this issue.

Fixes #81610

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-19 18:35:32 -05:00
Benjamin Cabé
83356e924a doc: doxygen: improve formatting for kconfig alias
\verbatim is not giving the right output as we need an inline literal.
Switch to \c instead.

Fixes #81595.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-19 18:35:18 -05:00
Anas Nashif
71bb882221 tests: cpp: remove obsolete target
nrf54h20dk@0.8.0/nrf54h20/cpuapp was dropped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 18:21:19 -05:00
Tomasz Moń
e3acf5fa04 drivers: udc_nrf: handle overwritten Set Address commands
USBD peripheral automatically handles Set Address command which can
lead to state mismatch between USB stack and the host. Keep track of
device address and issue fake Set Address commands on mismatch.

This fixes default vs addressed state mismatch that can occur due to
sufficently high SETUP handling latency. The state mismatch was most
commonly seen as SET CONFIGURATION failure when the enumeration happened
during periods with increased latency.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-19 18:12:04 -05:00
Tomasz Moń
54dc01153c usb: device_next: check wIndex on Set Address
Set Address behavior is not specified when wValue is greater than 127,
or if wIndex or wLength are non-zero. USB stack did check wValue and
wLength but didn't care about wIndex value. Extend the check so non-zero
wIndex also results in STALL response.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-11-19 18:12:04 -05:00
James Roy
e569dfe175 doc: build: dts: Fix incorrect rst tag
Replaced incorrect ':c:func:' tag for devicetree macro
with ':c:macro' tag.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-19 18:10:16 -05:00
Krzysztof Chruściński
0852af215b drivers: pinctrl: nrf: Optimize access to gpd service
Request and release global power domain only once during setup
of pins. Request and release involves communication over IPC and
it should be avoided if possible. For example if there are 4 pins
(like in UART) where GPD is requested we can limit number of
request/release operations fourfold.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 18:09:47 -05:00
DineshKumar Kalva
749192a9fb Board: amd : add board support for the Audio DSP on ACP_6_0 soc.
Create a acp_6_0_adsp board support for
the Audio DSP on ACP soc.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
2024-11-19 17:53:11 -05:00
DineshKumar Kalva
173cc387a0 soc: amd: acp_6_0: add support for AMD ACP_6_0 soc.
Add a common part for AMD board ACP_6_0_ADSP.

Add support for ACP_6_0_ADSP BOARD,
which represents ACP_6_0 soc.

This has a 1 Xtensa HiFi5 core, with 200-800MHz
1.75 MB HP SRAM / 512 KB IRAM/DRAM,
1 x SP (I2S, PCM), 1 x BT (I2S, PCM), 1 x HS(I2S, PCM), DMIC as
audio interfaces.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
2024-11-19 17:53:11 -05:00
DineshKumar Kalva
eb9eff7018 west: sign: add support for AMD acp_6_0_adsp board.
Add support for signing acp_6_0 SOF with Zephyr images with rimage.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
2024-11-19 17:53:11 -05:00
DineshKumar Kalva
f64f36cb01 CODEOWNERS: add codeowner for SOF with Zephyr on AMD ACP_6_0.
Add myself and basavaraj as codeowners for ACP_6_0 related files
for SOF with Zephyr OS.

Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
2024-11-19 17:53:11 -05:00
Krzysztof Chruściński
662f412a35 tests: drivers: uart: async_api: Add nrf54h20 cpuppr
Add configuration for nrf54h20dk/nrf54h20/cpuppr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 17:52:33 -05:00
Neil Chen
e5f0075dc6 board: frdmmcxc444: Add uart support
Add UART configuration and pin control. Set state to disabled,
as it serves as alternative to default LPUART0 or as second
uart only.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-19 17:52:25 -05:00
Sergei Ovchinnikov
55c6a0eaa5 drivers: sensor: npm1300_charger: expose VBUS status
Add possibility to retrieve VBUS status of the nPM1300 charger through
its sensor APIs. Updated shields/npm1300_ek sample to use the new API.

Signed-off-by: Sergei Ovchinnikov <sergei.ovchinnikov@nordicsemi.no>
2024-11-19 17:51:13 -05:00
Pisit Sawangvonganan
d81a8d452e drivers: ethernet: w5500: improve type consistency
Improve type safety and consistency by adjusting variable and
parameter types to avoid signed/unsigned comparisons and implicit casts.

Moreover, explicit casts were applied when converting from
`size_t` to `uint16_t`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-19 17:50:58 -05:00
Pisit Sawangvonganan
82e2709ed8 drivers: ethernet: w5500: make ethernet_api as const
This change marks `w5500_api_funcs`, an instance of
the `ethernet_api`, as `const`.

By using `const`, we ensure immutability, leading to usage of only
`.rodata` and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-19 17:50:58 -05:00
Nazar Palamar
6172092730 test: arm: irq: Add overlays files for Infineon boards
Changed interrupt priority for GPIO, default 6 is not suitable for
for the ZERO_LATENCY_IRQS function used in this test.
used in this test.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-11-19 17:50:44 -05:00
Nazar Palamar
697efe8b50 Infineon: board: Add CONFIG_GPIO to defconfigs
Add CONFIG_GPIO from defconfigs for Infineon boards.

Revert pull/81377, which affect some ble samples which
used GPIO.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-11-19 17:50:44 -05:00
Daniel DeGrasse
35f6c4922e dts: bindings: timer: move a few counter bindings to correct location
A few bindings in the timer directory (for kernel timing sources) were
being used for counters (which can have alarms set, and have a distinct
API). Move these bindings to the counters directory.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-19 17:50:04 -05:00
Anas Nashif
ac08acafdd ci: twister: use workflow_call for prep job
Use workflow_call to allow for different type of nodes depending on
event.

On push, we do not need to use zephyr runners, GH runners are enough and
are much faster to deploy and start.

This resolves an issue where push jobs will have to be queued for a
longer time waiting for the prep step, once the prep step is done, we
will have to wait one more time in the queue for requested nodes.

This should speed up execution of push events in CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 17:48:11 -05:00
Anas Nashif
0a8b16693f ci: twister: split publishing results out of main workflow
Move publishing data to ES to a workflow_run step. This way we can
change the main workflow to use pull_request instead of
pull_request_target.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 17:48:11 -05:00
Adrian Warecki
903b7cf9b6 mm: tlb: Add a mmu support in update page flags function
Platforms that support mmu require memory page access flags to be set in
both tlb and mmu. Add mmu flag update in sys_mm_drv_update_page_flags
function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-11-19 16:23:52 +01:00
Adrian Warecki
e4a9503706 mm: tlb: Improve the context saving function
Attempt to invalidate cache for an unmapped address results in cpu
exception for the ptl platform. Perform cache invalidation after
translation activation in tlb. Add address mapping in mmu for platforms
that have it.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-11-19 16:23:52 +01:00
Adrian Warecki
750212c2a9 mm: tlb: Remove ARG_UNUSED macro invocation
The flags parameter in the sys_mm_drv_map_page function is used, so the
ARG_UNUSED macro invocation is unnecessary. Remove this macro usage to
clean up the code and improvs code readability and maintainability.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-11-19 16:23:52 +01:00
Håvard Reierstad
b38773f14b Bluetooth: Mesh: Use net xmit params for bridge
Makes sure that the Network Transmit state is used when using a Subnet
Bridge.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-19 10:12:19 -05:00
Håvard Reierstad
665a555e75 Bluetooth: Mesh: Use relay bufs/pool for brg_cfg
Adds support for using relay buffers and advertising set for the subnet
bridge feature, even if the relay feature is disabled.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-19 10:12:19 -05:00
Krzysztof Chruściński
d231b459df drivers: misc: coresight: Enable log colors for STMESP logging
Allow coloring of error and warning messages decoded by the ETR
decoder.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 10:12:05 -05:00
Krzysztof Chruściński
9917ea4fe6 logging: formatting: Allow coloring in custom cases
In order to support error and warning message coloring
LOG_BACKEND_SHOW_COLOR must be set. Allow setting it for
customized cases.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 10:12:05 -05:00
Fabian Kainka
c6b663e50b drivers: modem: initialize variables to avoid warn
The variables 'first' and 'next' in function 'stats_buffer_list_first()'
and 'stats_buffer_list_next()' were potentially used uninitialized.

Depending on the compiler and target architecture, this can lead to
different behavior, including warnings or errors when using strict
warning flags.

By initializing these pointers to 'NULL', we ensure consistent and
expected behavior across all toolchains and configurations.

Signed-off-by: Fabian Kainka <kainka@cognid.de>
2024-11-19 10:04:58 -05:00
Nikodem Kastelik
5f6fc8ad5d soc: nordic: nrf54l: tune configuration of DCDC regulator
DCDC regulator on nRF54L may not always works as intended.
Tune the fix addressing that.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:04:43 -05:00
Nikodem Kastelik
b7fb1012b0 soc: nordic: nrf54l: fix configuration of DCDC regulator
DCDC regulator on nRF54L may not always works as intended.
Apply a fix addressing that.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:04:43 -05:00
Nikodem Kastelik
17a81280b2 soc: nordic: nrf54l15: fix APPROTECT handling
To configure APPROTECT on nRF54L15 different set of MDK symbols
must be used. Additionally, nRF54L15 does not support loading
APPROTECT configuration from the UICR in runtime.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:01:07 -05:00
Anas Nashif
cfd5469dc1 ci: do not pull babblesim in twister test workflow
No need to pull babblesim and nrf_hw_models when doing twister testing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 09:57:13 -05:00
Anas Nashif
01ff1de91a ci: testplan: resolve board files when testing with targets
When using the -p option, changes to boards are irrelevant. This is true
in the clang workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-19 09:54:28 -05:00
Johann Fischer
1687e192b5 samples: usb: add new WebUSB sample
Add a WebUSB sample that uses the new USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Johann Fischer
6ee1358519 usb: device_next: support BOS descriptor with vendor request code
Platform capability descriptors such as MSOSv2 or WebUSB BOS have a
vendor request code that is used by the host to perform vendor-specific
requests. Add a convenient way to define and register a platform
capability descriptor with a vendor request node.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Johann Fischer
34f42d6c71 usb: device_next: support vendor request with recipient device
Allow the user to register a vendor request node identified by the
vendor code (bRequest) and containing two callbacks to handle the vendor
request. The device stack uses the vendor request node to call the
vendor request callbacks when it receives a request of type Vendor,
recipient Device, and bRequest value equal to the vendor code.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Johann Fischer
2d90df407f samples: usb: add samples function to setup USB device only
Add a function similar to sample_usbd_init_device(), but one that does
not initialize the device. It allows the application to set additional
features, such as additional descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-19 09:53:29 -05:00
Anthony Wertz
a1474a9868 drivers: audio: dmic_nrfx_pdm: change log level in PDM read
Currently the dmic_nrfx_pdm read implementation treats a timeout as an
error, in that a logging error message is produced when no PDM data is
available. However, for non-(or minimally-)blocking applications this is
normal behavior. Classified this way, the logger is flooded with error
messages unnecessarily, unless the log level is changed for the dmic
module, which is not desirable.

This modification simply changes the log-level to debug so the
application user can then decide whether or not a failed read needs to
produce an error message.

Signed-off-by: Anthony Wertz <awertz@pm.me>
2024-11-19 09:53:20 -05:00
Rafał Kuźnia
e18410944e modules: hal_nordic: add NRFX_GPPI config
The nrfx_gppi module is an abstraction over nrfx_ppi and nrfx_dppi
drivers. It now has a Kconfig option that is separate from nrfx_dppi and
by default it enables all PPI/DPPI instances, if available.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Rafał Kuźnia
40d9dae867 modules: hal_nordic: rework resource reservations
The resource reservation definitions were moved to a separate header
file.

The PPIB and DPPI channel and group resources can now be statically
allocated for each individual instance.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Rafał Kuźnia
bf66012544 modules: hal_nordic: Enable nrfx_ppib drivers
The new nrfx_ppib driver can now be enabled, when the corrensponding
device tree node has the okay status.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Rafał Kuźnia
61d72936cb dts: nordic: 54l: Add PPIB device tree nodes and bindings
Added a binding description for the PPIB peripheral and added the device
tree nodes of the PPIB instances to the nRF54L15 and nRF54L20.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Rafał Kuźnia
d6007690de manifest: update hal_nordic revision
The hal_nordic revision was updated to bring in NRFX v3.8.0.

Aligned the uses of single-instance API to use multi-instance instead.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Declan Snyder
b070da7c33 dts: nxp,mcux-edma: Convert compats to prop
Convert the numerous revision compatibles to a DT property for the
revision called nxp,version (inspired from a linux DT property from
st called st,version on their DMA).

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-19 09:52:57 -05:00
Khoa Nguyen
8e46d26106 drivers: i2c: Add config I2C for EK-RA8D1 and MCK-RA8T1
Add config support I2C for EK-RA8D1 and MCK-RA8T1.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-11-19 09:52:44 -05:00
Tri Nguyen
c8938737c0 drivers: i2c: Support for RA6 devices
Add devices node that support I2C for RA6 boards

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
2024-11-19 09:52:44 -05:00
Henrik Brix Andersen
110c81f2f7 boards: others: add candleLight USB to CAN 2.0B adapter board
Add support for the open-hardware candleLight USB to CAN 2.0B board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-19 09:52:35 -05:00
Emil Gydesen
8e017ebff3 tests: Bluetooth: Audio: Increase RX buf count for bsim
The tests were using the default of 1 which is very low,
especially when we might have multiple RX streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-19 09:52:28 -05:00
Yishai Jaffe
a40e900970 boards: stm32f4_disco: Add pwm leds
Add four PWM leds for stm32f4_disco in order to run the
samples/basic/fade_led application.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-11-19 09:52:09 -05:00
Djordje Nedic
918cbc5146 soc: Move up SRAM definitions for stm32h56/7x
This moves the SRAM definitions for STM32H56/7x chips up to the top
level since they are common to all of them.

Signed-off-by: Djordje Nedic <nedic.djordje2@gmail.com>
2024-11-19 09:52:02 -05:00
Lingao Meng
b54f49cb8c Bluetooth: Mesh: Fix proxy advertising set sending Mesh messages
When start to sending proxy advertising, will also process in
send_pending_adv, but the bt_mesh_adv_get_by_tag will directly return
buffer from bt_mesh_adv_queue or bt_mesh_relay_queue, which case
mesh messages sent on different sets, can cause peer replay attack.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-19 09:51:51 -05:00
Piotr Kosycarz
6056a9237f soc: nordic: add configuration for nrf54h20 flpr core
To properly execute erase, recover and reset.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-19 09:51:43 -05:00
Krzysztof Chruściński
581c55496d pm: device_runtime: Fix bitfields misuse
PM_DEVICE_FLAG_ISR_SAFE is an enum and it must be converted to
a bit mask before masking with flags.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-19 09:51:14 -05:00
Jens Rehhoff Thomsen
b478ffe2ef Bluetooth: host: Fix bug in disconnected handling
When disconnected only the first empty slot in the disconnected_handles
array should be updated.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-11-19 09:50:41 -05:00
Jamie McCrae
5b28751bf4 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  eb942067989569f9cf319b087d0bb16b16effd86

Brings following Zephyr relevant fixes:
  - eb942067 Allow bootstrapping for multiple images
  - d59ae346 boot_serial: Support sha256, sha384 and sha512
  - bcffc62c boot: bootutil: boot_record: Fix issue with saving
    image data
  - 099f4284 boot: zephyr: Add fallback for overhead calculation
    when auto fails
  - ab014436 boards: mcxn947_qspi: fix mcuboot partition allocation
  - bd7423d1 boot: zephyr: Add warning on default key file usage
  - a03c95f6 doc: remove repetition
  - 040fc42a boot/zephyr: Load image to RAM on single loader
  - 84c68ace boot/zephyr: Add
    CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOAD
  - 77d911f4 boot/bootutil: Add
    MCUBOOT_SINGLE_APPLICATION_SLOT_RAM_LOAD mode
  - 0c721da7 boot/bootutil: Split RAM load code to its own file

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-19 09:50:25 -05:00
Fabrice DJIATSA
94a6ed68a1 dts: arm: st: c0: add spi node in dtsi file
- stm32cO11/31 share the same spi peripheral

- include stm32_dma header to be able to configure
spi with dma config macros (STM32_DMA_PERIPH_TX,...)
in dts

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-11-19 09:50:08 -05:00
Jilay Pandya
6098b2f673 drivers: stepper: tmc5041: use tmc5xxx generalized macros
This commit refactors tmc5041 driver to use tmc5xxx generalized macros

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-19 09:49:53 -05:00
Jilay Pandya
f3a868ad90 drivers: stepper: tmc5xxx: generalized macros for tmc5xxx
This commit generalizes macros which are common to tmc5xxx drivers

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-19 09:49:53 -05:00
Benjamin Cabé
2cef2781be doc: releases: expose draft 4.1 release notes + migration guide in toc
Update toctrees to show 4.1 documents in the release page

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-19 09:49:11 -05:00
Alberto Escolar Piedras
93c03214fa tests: Thread-Metric: Filter properly native targets
There is more native targets than native_sim and native_posix.
Let's exclude them all by architecture.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-19 08:52:05 -05:00
Jan Faeh
2efc8598e3 drivers: sensor: SCD4x Add driver
This adds support for Sensirion's SCD4x co2 sensor.

Signed-off-by: Jan Faeh <jan.faeh@sensirion.com>
2024-11-18 19:38:10 -05:00
Jilay Pandya
428db04fd5 doc: migration-guide: 4.1: rename gpio-stepper compatible
add entry in migration guide 4.1 about renaming of compatible from
zephyr,gpio-steppers to zephyr,gpio-stepper

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Jilay Pandya
f04f924d52 MAINTAINERS: Add collaborators in stepper drivers
- bjarki-andreasen
- dipakgmx
- fabiobaltieri
- faxe1008

This commit adds dipakgmx as collaborator in stepper drivers

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Jilay Pandya
1e142b0001 drivers: stepper: shell: fix null pointer check
This commit introduces null pointer check in print_callback

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Jilay Pandya
195c2c1360 drivers: stepper: fix stepper_set_event_callback c prototype and definition
This commit fixes incorrect c prototype and defintion of
stepper_set_callback to stepper_set_event_callback

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Jilay Pandya
843625a29b drivers: stepper: change gpio-stepper dt-compatible
This commit changes compatible of gpio-stepper in driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Jilay Pandya
df3b76b55a drivers: stepper: gpio: introduce power down coils function
power down coils when gpio stepper is disabled

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-18 19:37:37 -05:00
Peter Mitsis
9e7d182375 doc: Update licensing page
Updates the licensing page to indicate that the thread_metric
benchmark uses the MIT license.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-18 19:32:02 -05:00
Peter Mitsis
95a97fd287 tests: Port Thread-Metric benchmark from ThreadX
Ports the Thread-Metric suite of benchmarks from ThreadX to Zephyr.
This makes it easier for others to run these benchmarks with the
best set of configuration options for their board so that
they can better compare Zephyr performance to another RTOS.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-18 19:32:02 -05:00
Eric Ackermann
c9ce311aaa drivers: dma: Add Xilinx AXI DMA driver
The Xilinx AXI DMA Controller is commonly used in FPGA designs.
For example, it is a part of the 1G/2.5G AXI Ethernet subsystem.
This patch adds a driver for the Xilinx AXI DMA that supports
single MM2S and S2MM channels as well as the control and status
streams used by the AXI Ethernet subsystem.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2024-11-18 19:31:20 -05:00
Reto Schneider
057528b894 docs: dma: Fix typo and grammar
This fixes the spelling of the word expected, ads a missing comma.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-11-18 19:31:10 -05:00
Reto Schneider
0841bcff78 docs: dma: Explicitly allow reconfiguration
This explicitly documents that a configured DMA channel can be
reconfigured.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-11-18 19:31:10 -05:00
Florian Grandel
becd9e5b92 scripts: dts: edtlib: fix type docs
The return type of 'uint8-array' properties was not yet documented.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-11-18 19:30:57 -05:00
Florian Grandel
be4acee09a scripts: dts: edtlib: type hints
Adds type hints to functions that were not yet typed.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-11-18 19:30:57 -05:00
Florian Grandel
0f1549c575 scripts: dts: edtlib: simplification
Small refactorings to simplify code and improve method encapsulation.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-11-18 19:30:57 -05:00
Florian Grandel
4bd584cf21 scripts: dts: edtlib: improve Node encapsulation
Moves several node-specific operations inside the Node class to improve
its encapsulation, remove a monkey patch and access to internal methods
and fields.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-11-18 19:30:57 -05:00
Daniel Leung
d3695c3284 tests: CONFIG_TEST_USERSPACE selects CONFIG_USERSPACE
CONFIG_TEST_USERSPACE should select CONFIG_USERSPACE as they
should be enabled together. It is no use to enable userspace
tests without enabling userspace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 19:30:50 -05:00
TOKITA Hiroshi
2bb0a504a7 include: dt-bindings: gecko: Correct include-guard
Both `include/zephyr/dt-bindings/pinctrl/gecko-pinctrl.h` and
`include/zephyr/dt-bindings/pinctrl/gecko-pinctrl-s1.h` define
`ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_GECKO_PINCTRL_H_`
to prevent duplicate inclusion.

Changed it to `ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_GECKO_PINCTRL_S1_H_`
in `include/zephyr/dt-bindings/pinctrl/gecko-pinctrl-s1.h` side.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-18 19:30:41 -05:00
TOKITA Hiroshi
c144ebf723 include: intertupt_controller: esp32: Correct include-guard
Both `include/zephyr/drivers/interrupt_controller/intc_esp32.h` and
`include/zephyr/drivers/interrupt_controller/intc_esp32c3.h`
define `ZEPHYR_INCLUDE_DRIVERS_ESP_INTR_ALLOC_H__` to prevent
duplicate inclusion, so it cannot be properly prevented.

Change to a file path name-based definition.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-18 19:30:41 -05:00
TOKITA Hiroshi
3f870b316f include: dma: smartbond: Correct include-guard
Both `include/zephyr/drivers/dma/dma_smartbond.h` and
`include/zephyr/dt-bindings/dma/dma_smartbond.h` define `DMA_SMARTBOND_H_`
to prevent duplicate inclusion, so it cannot be properly prevented.

Change to a file path name-based definition.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-18 19:30:41 -05:00
Pisit Sawangvonganan
3a6e36d548 drivers: serial: stm32: make poll-out function to pass data by value
Passing data by value is more efficient in this context. As such,
revise `poll_out_fn` and `uart_stm32_poll_out_visitor` to accept
the `out` argument by value instead of by address.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-18 19:30:17 -05:00
Jukka Rissanen
bffa312ea6 net: context: Fix the connect check for IPv4
Make sure that we cannot connect to IPv4 multicast or broadcast
destination address for a TCP socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
624f28cb65 tests: net: socket: udp: Add IP_MULTICAST_IF set/get testing
Add tests that verify that IP_MULTICAST_IF socket option
set/get works as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
d3bac7047d net: socket: Add support for IP_MULTICAST_IF option
Allow user to set the network interface for multicast sockets
of type SOCK_DGRAM.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
056a3d3242 net: if: Add helper to return the first IPv4 address for iface
This is helper is only needed in socket multicast interface selection
where we need to get one address from the interface so that it will
tell (when getsockopt() is used), the interface IPv4 address where
multicast packets will be sent. This is private function which is not
needed in public headers so place the prototype to net_private.h file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
0bd6f3b3f0 net: if: Fix source interface select for IPv4 address
Do the selection same way as in IPv6 so that if user supplies
unspecified destination address, the default interface is selected
the same way.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
51763d834b tests: net: socket: udp: Add IPV6_MULTICAST_IF set/get testing
Add tests that verify that IPV6_MULTICAST_IF socket option
set/get works as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
7bf9f599b1 drivers: net: loopback: Allow tests to control address swapping
Some of the network tests require that source and destination
addresses are not swapped so allow test to control the address
swapping from the test.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Jukka Rissanen
96d4f84a52 net: socket: Add support for IPV6_MULTICAST_IF option
Allow user to set the network interface for multicast sockets
of type SOCK_DGRAM.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 19:29:58 -05:00
Dane Wagner
2f3a70ea4e drivers: i2c: Call correct I2C device definition macros
If CONFIG_I2C_STATS is enabled, the device state for all I2C controller
drivers must contain the I2C stats. This space is allocated by calling
Z_I2C_INIT_FN as part of the device definition; this is done automatically
when using I2C_DEVICE_DT_DEFINE instead of DEVICE_DT_DEFINE. If space
for statistics is not properly allocated but CONFIG_I2C_STATS is enabled,
an unexpected write to memory outside of the stats region may occur on
an I2C transfer. This commit uses I2C_DEVICE_DT_DEFINE or
I2C_DEVICE_DT_INST_DEFINE for all in-tree SPI controller drivers that do
not already.

Signed-off-by: Dane Wagner <dane.wagner@gmail.com>
2024-11-18 19:29:42 -05:00
Alberto Escolar Piedras
a785548df6 bluetooth: CTS: Fix includes to avoid build error with some libCs
Remove unnecessary include in header and source file.

gmtime_r() is an extension to the C library, and therefore one
needs to explicitly ask for its prototype to have it exposed.
This is done by defining _POSIX_C_SOURCE so let's do so.

These two changes fix build errors with some libCs.
Tested with pico, newlib, minimal and the host glibc.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-18 19:29:32 -05:00
Laurentiu Mihalcea
4789820722 dma: remove isr-ok tag from channel request and release
The channel filter and release functions can be used by some
DMA drivers to perform blocking operations (i.e: allocating,
de-allocating channel resources). In such scenarios, the
channel request and release functions become unsuitable for usage
inside ISRs. Drop the `isr-ok` tag and add comments regarding this
behavior being driver-dependent.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-11-18 14:03:39 -05:00
Laurentiu Mihalcea
513aa787a4 dma: add channel release callback
This is useful for releasing channel resources "allocated" during
channel request. These resources can refer to enabled IRQs, PDs,
etc...

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-11-18 14:03:39 -05:00
Jianxiong Gu
4a2f89bcc6 drivers: tcpc: ps8xxx: Remove unreachable return
Remove unreachable return in ps8xxx_tcpc_vconn_discharge.

Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
2024-11-18 14:03:23 -05:00
Marcin Niestroj
7d63646d35 shields: seeed_w5500: new shield
Support "W5500 Ethernet Shield" manufactured by Seeed Studio.

[1] https://www.seeedstudio.com/W5500-Ethernet-Shield.html

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-18 14:03:08 -05:00
Robin Kastberg
6532c2f0bb kernel: make z_is_idle_thread_entry take code ptr
This is causing errors on IAR toolchain.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-18 14:02:56 -05:00
Anas Nashif
27d918e699 tests: cpp: remove non-existing target
nrf54h20dk@0.8.0/nrf54h20/cpurad was recently removed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-18 14:02:45 -05:00
Zihao Gao
1b8ad2cf40 Bluetooth: AVRCP: allow to parse unit info resposne.
Add AVRCP handler for UNIT INFO responses.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
498f81e45f Bluetooth: AVCTP: add error handling for fragmented message.
Fragmented AVCTP message is not supported now. Therefore
A error message is printed.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
5d322350b4 Bluetooth: AVCTP: check buffer length before use.
The buffer length shall be validated before extracting
Transaction ID and C/R field.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
3e2244d634 Bluetooth: AVRCP: fix bitfield issue.
The bit order can be incorrect when use bit field definition.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
9af026dcbf Bluetooth : AVRCP: allow to receive an AVRCP message.
This patch received an AVRCP message and remove timeout timers.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
4c932b4b80 Bluetooth: AVCTP: allow to receive an AVCTP message.
This patch received an AVCTP message and forward to the
upper layer, e.g., AVRCP.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
e0f1fb0bb6 Bluetooth: Shell: add command to obtain unit info
This patch allow to acquire the unit info of the remote device.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
3d9cf59fdd Bluetooth: AVRCP: allow to create and send AVRCP unit message
This patch defines the message format for AVCTP unit message.
This is the first out of the four types of commands and can be
used by the CT to obtain the unit info from the TG device.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
3a045fbeea Bluetooth: AVCTP: allow to create and send AVCTP message
This patch defines the message format for general AVCTP.
They would be further called by AVRCP layer.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
36acb89803 Bluetooth: AVRCP: add shell tools for AVRCP functions.
Only the basic functions for establishing an AVCTP connection
are provided at this stage.
An BR/EDR ACL connection is necessary before AVRCP function.
Register callbacks before utilizing AVRCP.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
4e0dc39e71 Bluetooth: AVRCP: Add SDP attributes.
This patch add SDP records for both CT and TG role.

The SDP attribute would be registered according to the configuration.

OBEX and Browsing commands are optional and yet not supported.

SDP registration is implemented at AVRCP level to simplify the
workload of the upper layer. We assume the App can have limited
knowledge on SDP structures.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
70b415dab6 Bluetooth: AVRCP: Implemation of AVRCP.
This patch implementing avrcp.c
New Kconfig BT_AVRCP is provided to enable this layer.
BT_AVRCP_TARGET and BT_AVRCP_CONTROLLER are then
provided to enable one of the two roles independently.
avrcp.h shows the APIs for the upper layer.

Only connection and disconnection interfaces are provided in this patch.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Zihao Gao
27f71b044a Bluetooth: AVCTP: Implementation of AVCTP.
This patch implementing avctp.c
New Kconfig BT_AVCTP is provided to enable this layer.
avctp_internal.h shows the APIs for the upper layer, i.e., AVRCP.

Only connection and disconnection interfaces are provided in this patch.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2024-11-18 13:19:07 -05:00
Georgij Cernysiov
d52438f435 drivers: clock_control: stm32h7: disable PLLs before configuration
Disable every PLL before configuration. That allows
an application to reconfigure PLLs after a bootloader
configuration.

Don't disable the PLL clock if it is used by (Q|O)SPI
when executing from external memory. That will lead
to a stall.

Note: when (Q|O)SPI runs from PLL, the bootloader
dictates the clock configuration. There is no clock
reconfiguration support for memory map mode in
(Q|O)SPI drivers.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-11-18 13:19:00 -05:00
Filip Kokosinski
0edc89c63b dts/x86: use proper unit-address values
This commit changes the way some x86 devicetree set the unit-address values
of memory nodes. Before the change, they were always set to `0`. After the
change, they are derived from the `DT_DRAM_BASE` macro to match the first
address specified by the reg property.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-18 13:18:53 -05:00
Pieter De Gendt
d37ae60751 scripts: west_commands: zephyr_ext_common: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
76864957fd scripts: west_commands: export: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
14f9164ee1 scripts: west_commands: twister_cmd: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
dd4747ff32 scripts: west_commands: shields: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
f8ec1c8a00 scripts: west_commands: completion: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
a74c9be593 scripts: west_commands: boards: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
d3ecdd9b5b scripts: west_commands: blobs: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
efe3d46531 scripts: west_commands: bindesc: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Pieter De Gendt
45a3b6b731 doc: develop: west: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-18 13:18:42 -05:00
Emil Gydesen
0fa9701a26 Bluetooth: Tester: Added flag parameter to CAP stop cmd
Added a flag parameter so that it is possible
to use the bt_cap_initiator_unicast_audio_stop to perform
disable+stop without releasing the streams by setting the
RELEASE flag.

This allows us to use the bt_cap_initiator_unicast_audio_stop
function to just disable streams without releasing them,
as that is requested by some PTS tests such as
CAP/INI/UST/BV-40-C.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-18 13:18:32 -05:00
Daniel Leung
7ea6da0521 boards: intel_adsp/ace30: enable building with Zephyr SDK 0.17.0
Zephyr SDK 0.17.0 adds the toolchain for the Intel Audio DSP
ACE 3.0 platforms. We can now add the bits to enable building
the boards with SDK 0.17.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 13:18:22 -05:00
Daniel Leung
b889360b36 tests: posix/common: set CONFIG_MAX_THREAD_BYTES=3
Boards intel_adsp/ace30/ptl* needs more for thread objects.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 13:18:22 -05:00
Daniel Leung
74817cbc2c tests: mem_map: do not run on Intel Audio DSP SoCs
Amend the filtering so that the normal mem_map (with exec) test
is not going to run on Intel Audio DSP SoCs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 13:18:22 -05:00
Daniel Leung
06e6a84b1d tests: copy intel_adsp_ace30_ptl.conf to *_sim.conf
With the rename of intel_adsp/ace30_ptl to intel_adsp/ace30/ptl,
the "sim" variant no longer inherit the base configuration. So
make a copy of the .conf file to explicitly target the sim
variant.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 13:18:22 -05:00
Fin Maaß
cf4a398477 drivers: flash: spi_nor: add option for 4byte opcodes
some flashes support special opcodes
for 4-byte addressing, that can be used
without switching to 4-byte mode.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-18 13:18:08 -05:00
Emil Gydesen
1f55b8d8a4 tests: Bluetooth: Tester: Increase conn interval
Increase the conn interval from 30 to 60 for more stability
in test with multiple lower testers (up to 3).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-18 13:18:00 -05:00
Sylvio Alves
c7a592b3e0 soc: esp32c6: add Wi-Fi support
Enables Wi-Fi support.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-18 13:17:54 -05:00
Martin Stumpf
5d4f4acc7d docs: add release notes for #81184
Added release notes for PR #81184.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
7c24bd8520 samples: drivers: display: adjust alpha handling
ARGB8888 values all had alpha '0x00' (=transparent).
Changed them to '0xFF' and added a transparency test patch in the middle
of the screen.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
b816a2926d drivers: display_sdl: fix incorrect color conversion
Non-alpha colors were converted to colors with `0x00` alpha, which makes
them fully transparent.

The correct way would be to add a `0xff` alpha, which this change does.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
02d562e9b8 drivers: display_sdl: add alpha support
While the driver was already capable of processing `ARGB8888` data,
it did not actually show the alpha value in any way.

This change adds a checkerboard background that shows transparent
regions.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
86a126dba4 samples: modules: lvgl: fix integer overflow
`lv_task_handler()` returns a `uint32_t`, but `k_msleep` takes a
`int32_t`.

If no timer exists, `lv_task_handler()` returns `UINT32_MAX` to indicate
that we should wait forever. However, this gets auto-cast to `-1`,
indicating to `k_msleep` to not wait at all, creating a busy loop.

Hence, a clamping to `[0, INT32_MAX]` is required.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
Martin Stumpf
3eae0201c8 samples: modules: lvgl: add screen_transparency sample
Adds a sample that renders the simple `hello world` LVGL demo
with a transparent background, to demonstrate ARGB8888 framebuffer
capabilities.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-18 13:17:43 -05:00
David Schneider
ded2e0ba4a drivers: udc_stm32: set address only for standard device requests
Any request 5 did set the address even if it's a non standard
request like vendor specific requests.

Signed-off-by: David Schneider <schneidav81@gmail.com>
2024-11-18 13:17:31 -05:00
Chris Friedt
8ac483fdd4 scripts: west_commands: core: run netcat with check_call()
Netcat (nc) does not handle SIGINT. It silently ignores it.

We cannot use run_client(), given that the pydoc for
run_client() specifically contains "Run a client that
handles SIGINT".

Instead, use check_call(), which correctly handles Ctrl+C.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-18 13:17:21 -05:00
Daniel Leung
01f8e0fa2d demand_paging: eviction: add kconfig CONFIG_EVICTION_TRACKING
This adds a new kconfig for eviction algorithm which needs page
tracking. When enabled, k_mem_paging_eviction_add()/_remove()
and k_mem_paging_eviction_accessed() must be implemented.
If an algorithm does not do page tracking, there is no need to
implement these functions, and no need for the kernel MMU code
to call into empty functions. This should save a few function
calls and some CPU cycles.

Note that arm64 unconditionally calls those functions so
forces CONFIG_EVICTION_TRACKING to be enabled there.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-18 13:16:44 -05:00
Franciszek Pindel
eb24920093 dts: x86: intel: alder_lake: Add second core
Alder Lake have at least 2 cores. Both boards using this SoC
(up_squared_pro_7000 and adl) are configured with
MP_MAX_NUM_CPUS=2, so dts should contain at least one more core.

Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
2024-11-18 13:16:35 -05:00
Ludvig Jordet
1f9baa3ac3 Bluetooth: Host: Refactor legacy adv creation
This fixes #78721 which was introduced in PR #44686, which changed (and
renamed) `adv_new_legacy`/`adv_get_legacy` to return an existing
`bt_dev.adv` if it existed. This caused a problem, where the existing
adv then would be used to start advertising, and if this fails (because
the adv is already advertising, for instance), `bt_le_adv_start` would
erroneously delete the adv, making the host lose the context for the adv
which still is advertising.

Before PR #44686, this would not happen, because `bt_le_adv_start` would
return early when `adv_new_legacy` returned `NULL` and never reach the
delete call.

I have refactored this to make responsibilities a bit more clear:
`adv_create_legacy` now does 1 thing: create an ext adv and assign as
the legacy advertiser. This mirrors `bt_le_adv_delete_legacy` which does
the opposite. I have implemented error codes to match the behavior that
PR #44686 was made to implement.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2024-11-18 13:16:27 -05:00
Jamie McCrae
2f800cea8f soc: Remove re-defining some defined types
Removes re-defining some Kconfigs that are already defined
e.g. in arch

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-18 07:41:23 -05:00
Dario Binacchi
ed48de2583 boards: st: stm32f429i_disc1: doc: re-work flashing section
The patch modifies the "Programming and Debugging" and "Flashing" sections
to make the documentation clearer and consistent with what is reported for
other ST boards.

Suggested-by: Abderrahmane Jarmouni <git@jarmouni.me>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-11-18 07:26:17 -05:00
Dario Binacchi
3f6978e913 boards: st: stm32f429i_disc1: doc: support LTDC hardware
The building and flashing of the drivers/display and subsys/display/lvgl
examples confirmed that the LTDC peripheral is supported.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-11-18 07:26:17 -05:00
Dario Binacchi
7bca40cced boards: st: stm32f429i_disc1: doc: fix flashing info
The commit e17e54c48f ("boards: stm32: add flashing with stm32cubeprog
for all") did not update the documentation regarding the flashing
section, which no longer uses the OpenOCD runner by default.

Fixes: e17e54c48f
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2024-11-18 07:26:17 -05:00
Jukka Rissanen
247941f79d net: ipv6_fragment: Data in one frag must be multiple of 8
After we take the true MTU into account, we need to send proper
number of bytes (multiple of 8) in one IPv6 fragment.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
4c37d5a7bd tests: net: ipv6_fragment: Add PMTU testing
Enable PMTU so that we test it with IPv6 fragmentation code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
19f9ce5622 net: ipv6_fragment: Add PMTU support
If PMTU is enabled, then use the MTU value from it instead of always
using network interface MTU.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
265828634d tests: net: ipv4_fragment: Make test to run faster
Shorten the timeouts so that the tests are run in 6 second instead
of 15 seconds.

Use only native_sim for the tests so that the tests are run without
any extra delays.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
bdd5001e5b tests: net: ipv4_fragment: Add PMTU testing
Enable PMTU so that we test it with IPv4 fragmentation code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
b6618e8a53 net: ipv4_fragment: Add PMTU support
If PMTU is enabled, then use the MTU value from it instead of always
using network interface MTU.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
3d39cbd24d tests: net: pmtu: Add IPV6_MTU socket option tests
Make sure we can use IPV6_MTU socket option from application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
9fb09da21a net: Add support for IPV6_MTU IPv6 socket option
Add IPV6_MTU IPv6 socket option and implement getsockopt() and
setsockopt() calls for the option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
74fc23872d tests: net: pmtu: Add IP_MTU socket option tests
Make sure we can use IP_MTU socket option from application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
a818839186 net: Add support for IP_MTU IPv4 socket option
Add IP_MTU IPv4 socket option and implement getsockopt()
call for the option. The IP_MTU option does not support
setsockopt() call.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
fad10f7370 net: shell: events: Set the command mask correctly
Set the commands to monitor correctly. Before this change some
events were missed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
f0172e7fce net: shell: events: Print PMTU event values
Print the changed PMTU value and IP address in the event monitor.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
ee497c3108 tests: net: pmtu: Add network event tests for pmtu
Verify that the PMTU changed events are generated and we can
catch them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
02ccb0e523 net: pmtu: Send net_mgmt event for changed path MTU
Send a network management event for a changed path MTU value.
Both IPv4 and IPv6 have their own events as we cannot mix these
because how the network event numbering space is implemented.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
55e582635f tests: net: pmtu: Add IPv4 specific PMTU TCP tests
Allow tests to check whether a IPv4 TCP connection MTU is changed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
9dba02f8f4 net: ipv4: Add PMTU support
Catch "Destination Unreachable" ICMPv4 messages and update PMTU for
a given destination IPv4 address.
Use that PMTU when sending data to the destination.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
d178eb2908 net: stats: ipv4: pmtu: Add Path MTU Discovery statistics
Add information about PMTU related packets received/sent/dropped
for IPv4.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
ab0ddc0bbe net: shell: Add pmtu command to the net-shell
Show information whether PMTU is enabled or not.
Show pmtu destination cache content with "net pmtu"
command. The "net pmtu flush" can be used to clear the
cache.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
281c4ac742 tests: net: pmtu: Add IPv6 specific PMTU TCP tests
Allow tests to check whether a IPv6 TCP connection MTU is changed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
e7e3afcd01 net: ipv6: Add PMTU support
Catch "Packet Too Big" ICMPv6 messages and update PMTU for
a given destination IPv6 address.
Use that PMTU when sending data to the destination.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
84b135e226 net: ipv6: Print verdict information
Print more cases when the packet is dropped, and also print
the upper layer verdict for the packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
026f88481d net: stats: ipv6: pmtu: Add Path MTU Discovery statistics
Add information about PMTU related packets received/sent/dropped
for IPv6.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
67c004d707 tests: net: pmtu: Add tests for path MTU discovery
Add initial tests for generic part of PMTU discovery code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Jukka Rissanen
3da2629715 net: ip: pmtu: Add generic IP PMTU Discovery support
This adds generic code that can be used by both IPv4 and IPv6
Path MTU Discovery mechanism. The actual PMTU support for each
protocol family is in subsequent commits.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-18 07:26:07 -05:00
Manuel Argüelles
15d357df87 soc: nxp: s32k: make the SoCs SEGGER RTT capable
SEGGER RTT is supported for NXP S32K1 and S32K3 devices.

Fixes #74702

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-11-18 07:25:40 -05:00
Yong Cong Sin
ea23856336 drivers: intc: plic: remove incorrect arch_proc_id() usage
The `arch_proc_id()` returns the hartid of a CPU, which may not start
from zero. The way that it's used as an index to access `save_irq[]`
array is wrong, use `arch_curr_cpu()->id` instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-18 07:25:31 -05:00
Chris Friedt
93a9a0966e tests: posix: common: mitigate warning for qemu_arc_em
Previously, twister would fail due to a warning being escalated to
an error because CONFIG_NET_TEST was set.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-18 07:24:52 -05:00
Anas Nashif
a732379d62 tests: display: cfb: fix filtering
Test was marked build only with filters in each scenario looking for
sdl-dc which is only available on native_sim, so cut the chase and use
platform_only to narrow things down to native_sim directly instead of
building the world to get information we already know.

reduces build/run time from 78s to 17s on invocation of twister with
default options, saves a ton more when running twister with --all.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-18 07:24:12 -05:00
Chaitanya Tata
f537cf311d drivers: nrfwifi: Remove passing unused flag
This flag is now unused in OSAL as it takes the input via the API.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-17 19:06:34 -05:00
Kapil Bhatt
62e06a5072 drivers: wifi: Fix offloaded raw TX feature flags
Pass passive scan and offloaded raw tx feature flags to OSAL.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-11-17 19:06:34 -05:00
Fabio Baltieri
13a2f42d50 input: kbd_matrix: implement stable poll period support
Implement a new stable-poll-period-ms property to specify a new (slower)
polling rate for when the matrix is stable.

The keyboard thread can eat up a surprisingly high amount of cpu cycles in
busy waiting if the specific hardware implementation happen to have a
particularly slow settle time, but high frequency polling is really only
needed when debouncing.

The new property allow slowing down the polling rate when the matrix is
stable (either key pressed but none to be debounced or idle in the case
of the gpio implementation with no interrupts), this allows reducing the
overall cpu time taken by the keyboard scanning thread when keys are
persistently pressed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-17 19:06:15 -05:00
Anas Nashif
410c8a57e0 boards: m5stack/m5stack_cores3: disable in twister
Do not run this board with twister. Temporary fix while we wait for a
fix.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-17 19:05:32 -05:00
Jamie McCrae
a6cca606db mgmt: mcumgr: transport: smp_lorawan: Update downlink function
Updates the function to account for a change in the arguments

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-11-17 17:15:10 -05:00
Håvard Reierstad
68361eacfa Bluetooth: Host: Fix unsafe ccc cast
Changes the implementation of `bt_gatt_is_subscribed` to use the
attribute read method instead of casting the user data pointer when
extracting the CCC Attribute Value.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-16 15:56:57 -05:00
Håvard Reierstad
43149c1056 Bluetooth: host: refactor bt_gatt_is_subscribed
Refactors `bt_gatt_is_subscribed` by changing a CHECKIF to an if
statement to avoid undefined behavior if CHECKIFs are "disabled".
Uses sizeof(a uint8_t) instead of 1 to avoid magic numbers.
Initializes `properties` to 0 to avoid undefined behavior.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-16 15:56:57 -05:00
Aaron Ye
f7b2638165 soc: ambiq: enable the TPIU clock source
This commit enables the TPIU clock source in Apollo3 and
Apollo4 soc initialization if LOG_BACKEND_SWO is used.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Aaron Ye
fe3c0ecb53 boards: ambiq: enable the ITM in Ambiq boards
This commit defines the default pinctrl of ITM for Apollo3 and
Apollo4 EVB. Also configures the default SWO frequency.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Aaron Ye
390f8329b4 dts: arm: ambiq: add ITM node for Apollo series
This commit adds the ITM node for Ambiq Apollo3 and Apollo4
series devicetree.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Jonathon Penix
2493123758 cmake: lld: Remove duplicate -fuse-ld=lld
-fuse-ld=lld is currently specified twice through the baremetal property
(in cmake/linker/lld/linker_flags.cmake) and TOOLCHAIN_LD_FLAGS (in
cmake/linker/lld/target.cmake). This doesn't really harm anything as
it isn't duplicated on the link line (and specifying it multiple times
wouldn't hurt even if it was), but it also doesn't really help anything.

-fuse-ld isn't baremetal-specific and setting it via TOOLCHAIN_LD_FLAGS
will cover this case anyway, so remove this duplicate.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-11-16 15:56:42 -05:00
Sudan Landge
c99243c8ce arch: arm: cleanup of soc flags in arch
What is changed?

Use CMSIS SystemCoreClock via a dedicated flag instead of using
soc flags.

Why do we need this change?

This change is part of cleaning soc specific code out of arch folder.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-11-16 15:56:11 -05:00
Bjarki Arge Andreasen
14117b453d pm: policy: separate default policy and events
The default policy currently directly references the private
variable next_event from policy_events.c to then convert the cycle
of said event (if exists) to a kernel tick in the future, something
policy_events.c already implements and exposes through
pm_policy_next_event_ticks().

Additionally, the implementation of pm_policy_next_state() in
policy_default.c already gets the nearest kernel tick, wherein
the next event has already been accounted for in, see
implementation of pm_system_suspend().

This commit removes the redundant and layer violating computation
if the tick of the next event from policy_default.c and updates
the test test_pm_policy_events to not use default policy to
determine if pm_policy_next_event_ticks() is correct.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:56:02 -05:00
Jukka Rissanen
8070e7ca6d tests: net: conn_mgr_monitor: Increase the sleep between states
The short sleep (10ms) was not enough any more. Increase the sleep
to 100ms so that system stabilizes between checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen
185269d86e net: shell: ipv6: Print information about SLAAC addresses
Print information in "net ipv6" command how the SLAAC addresses
are generated. There is the default legacy EUI-64 method (RFC 4862) or
the stable method described in RFC 7217.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen
3a5c6c54c1 tests: net: ipv6: Add tests for stable IIDs
Add tests that verify that stable IIDs generate a proper IPv6
interface identifier described in RFC 7217.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen
94177a200e net: ipv6: Add support for stable IID addresses
This implements support for RFC 7217 which describes a method
to have stable IPv6 Interface Identifiers to be used with IPv6
Stateless Address Autoconfiguration (SLAAC). The stable IIDs are used
to provide enhanced privacy so that an IPv6 address configured using
this method is stable within each subnet, but the corresponding
Interface Identifier changes when the host moves from one network
to another. This method is meant to be an alternative to generating
Interface Identifiers based on hardware (MAC) addresses,
such that the benefits of stable addresses can be achieved without
sacrificing the security and privacy of users.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jamie McCrae
c9f3690ed4 kconfig: Remove deprecated option BOOTLOADER_SRAM_SIZE
Removes BOOTLOADER_SRAM_SIZE which was deprecated with Zephyr 3.6

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 15:55:42 -05:00
Yves Vandervennet
11f18c7340 boards: lpcxpresso55s69: enable multicore debugging
- Refactoring of the cmake code so LinkServer can be invoked with the
correct switches.
 - Documentation update

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:55:34 -05:00
Yves Vandervennet
7b29b66bd5 west: linkserver: change the default port number for semihost
LinkServer manages port numbers for gdb and semihost as separate linear
sequences when invoked to debug multi-core applications, e.g the
gdb-server instance for cpu0 will have the default GDB port 3333 and the
next gdb-server instance will be assigned the port 3334. The latter will
conflict with the default port for semihost which is 3334.

This patch changes the default port for semihost to 8888.
Port numbers can be changed when invoking the linkserver runner.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:55:34 -05:00
Marcin Szymczyk
26973bd054 snippets: nordic-*: support custom boards
Apply overlays for custom boards, based on already supported SoCs.

Fixes #77639.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-11-16 15:55:27 -05:00
James Roy
28238d03ad devicetree: Add DT_HAS_ALIAS macro
Add 'DT_HAS_ALIAS' macro to verify node alias existence.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-16 15:55:10 -05:00
Aleksander Wasaznik
3734268f90 Bluetooth: host: Remove useless alloc_buf_cb in test
The alloc_buf callback is not used when `seg_recv` is set, so it is
never called in this test. Remove it.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-16 15:55:02 -05:00
Corey Wharton
76bceb9ed2 kernel: mem_slab: always validate memory address on free
Allowing an invalid address to be "freed" when asserts are disabled
is dangerous and can lead to a very hard class of bugs (and potential
security issues) to troubleshoot. This change always validates the
address before adding it to the free list and calls k_panic() if
asserts are not enabled.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-11-16 15:54:56 -05:00
Ioannis Damigos
e330b55f81 soc/da1469x: Update sys_arch_reboot() function
Update sys_arch_reboot() function

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-11-16 15:54:45 -05:00
Daniel Leung
a6c1f80f46 tests: benchmarks/latency: limit CPU to 1 for Intel ADSP ACE
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-16 15:54:36 -05:00
Alexander Kozhinov
e68c7f2f73 boards: arm: nucleo_h745zi_q
add fdcan1, fdcan2 and usb_fs DT configurations

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-11-16 15:54:27 -05:00
Torsten Rasmussen
cc488787ea cmake: source dedicated linker library properties for native builds
Native builds uses system libraries per default.
Instead of handling this in each linker_libraries.cmake files, then the
check for native build is moved one level up and for native build a
dedicated linker_libraries_native.cmake is sourced.

This simplifies the linker_libraries.cmake files as they no longer need
to check for native builds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-11-16 15:28:20 -05:00
Torsten Rasmussen
d2896df821 cmake: set minimal C++ linker properties in minimal C++ CMake impl
The property based toolchain integration allows a cleaner design by
letting the toolchain define its properties and values and let CMake
implementation of Zephyr provided C and C++ libraries adjust those
properties when minimal C or C++ libraries are used.

This commit moves handling of C++ linker library properties into
the minimal C++ CMake implementation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-11-16 15:28:20 -05:00
Guennadi Liakhovetski
44d96a2668 LLEXT: add llext_section_offset() to replace llext_find_section()
Now that section header cache is persistent, it can be used for
finding sections. Add a new function, similar to llext_find_section()
to use it and deprecate llext_find_section().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
c714f0e148 LLEXT: preserve section headers
Move cached section headers to struct llext from struct llext_loader
to preserve them after llext_load() returns.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
e2d8daae16 LLEXT: Xtensa: add a Kconfig option to enable -fPIC
Currently when building LLEXT for Xtensa we use the -fPIC compiler
option, but this cannot be used when using detached sections in
extensions. Add a Kconfig option to switch between the two
compilation modes and switch -fPIC off when building relocatable
(partially linked) ELF binaries.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
4f0cb90c59 LLEXT: fix advanced uses of detached sections
When detached sections are used, STB_GLOBAL relocations also have to
be processed depending on the relocation type. This commit unified
STB_GLOBAL and STB_LOCAL flows by making them use the same relocation
type parser, adds support for R_XTENSA_GLOB_DAT and R_XTENSA_JMP_SLOT
type relocations on Xtensa and fixes STT_SECTION address calculation
for such sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
2b3666109e LLEXT: fix detached section cache synchronisation
Detached sections are used in situ without being copied to or
referenced from ext->mem[] LLEXT region arrays. Their caches must be
synchronised accordingly.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
ce32eea24a LLEXT: Xtensa: fix logging level
Use the same logging level as in the rest of LLEXT.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski
ec02b815a7 LLEXT: (cosmetic) reduce the scope of a variable
Move a variable calculation inside the block, where it is actually
used.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Lukasz Majewski
835cbad6cc drivers: ethernet: lan865x: Avoid writing PLCA node count when nodeID not 0
The newest AN1760 application note - Revision F (DS60001760G - June 2024)
is recommending to not write the node count to PLCA_CTRL1 register when
the node is not the PLCA coordinator (i.e. its ID is not zero).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-11-16 15:27:45 -05:00
Lukasz Majewski
3ea491cb1c drivers: ethernet: lan865x: Update initial setup guidelines (from AN1760)
This patch brings update of the procedure to initially configure the
LAN865x devices. It follows setup guidelines from newest AN1760 [*].

The values from "TABLE1" on the [*] must be written to the device in the
indicated order with recommended values.

This was not the case previously, as first values from in-flash allocated
(const) table were written and only afterwards calculated configuration
parameters (cfgparams) were updated.

With this patch the lan865x_conf[] table is allocated in-RAM, so
placeholder values can be updated and it can be written at once at the
end of configuration process.
Its single entry has been reduced from 8B to only 4B. Moreover, moving
it out of flash saves 512B of flash memory.

Note:
[*] - AN1760 Revision F (DS60001760G - June 2024)

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-11-16 15:27:45 -05:00
Yves Vandervennet
04dee0025f boards: frdm_k22f: enable linkserver`
- add linkserver arguments in board.cmake
 - update documentation

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:27:39 -05:00
Jamie McCrae
0c7433dcaa boards: Remove PINCTRL from some boards
Removes lines from defconfig files having PINCTRL in them

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 15:27:31 -05:00
Andries Kruithof
f1f78682d9 Bluetooth: Audio: API for the distribute broadcast code procedure
Define the API for the distribute broadcast code CAP procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-16 15:27:10 -05:00
Adam Cavender
a68a0a4a5b bluetooth: host: Update FAE table type for HCI commands
Update FAE table type from array of uint8_t to int8_t. From Vol 6.0,
Part B, section 2.4.2.52: "The ChFAE field contains the per-channel
mode-0 FAE table of the local Controller. Every per-channel mode-0
FAE value is represented by an 8-bit signed integer"

Signed-off-by: Adam Cavender <adam.cavender@nordicsemi.no>
2024-11-16 15:27:04 -05:00
Fin Maaß
fbea2ceba3 samples: net: cloud: aws_iot_mqtt: remove redundant kconfig
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR is on
by default, if the device supports that, so there is no need
to enable it explicit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Fin Maaß
3231b993ae samples: net: cloud: aws_iot_mqtt: use auto init
use auto init for networking, dhcp and sntp.
This simplifys the code of this sample by using the
auto init feature of the networking stack.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Fabio Baltieri
d6013e7044 input: it8xxx2_kbd: add a kso-ignore-mask property
The it8xxx2_kbd KSO pins can be used as both keyboard scan and GPIO. By
default the keyboard scanning driver controls the output level of all
the KSO signals from 0 to (col-size - 1), meaning that any line in
between used as GPIO is going to have its output value overridden.

Add a kso-ignore-mask property to the keyboard scan driver to allow
specifiying extra pins that should not be controlled by the driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-16 15:26:49 -05:00
Noemie Gillet
4355d07fcd test: posix: timer: fix format
change { 0 } to {0}

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Noemie Gillet
cbec9a342b test: posix: add test_one_shot__SIGEV_SIGNAL testcase
increase test coverage for newly added code

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Noemie Gillet
a214ddb2c9 posix: fix one-time timer for SIGEV_SIGNAL
For SIGEV_SIGNAL, the function zephyr_timer_wrapper() is the handler
between kernel and posix layer.
Here, for one-time timer, reload is equal to 0 and function returns.
As a consequence, handler function was never called.

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Ryan McClelland
37784442f8 tests: drivers: build_all: uart: add uart interrupt driven
Add CONFIG_UART_INTERRUPT_DRIVEN for building the uart driver

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-16 15:26:24 -05:00
Ryan McClelland
36772a8889 drivers: serial: cdns: fix interrupt driven uart
The tx fifo empty interrupt is a edge driven interrupt, so if it
is already empty then and the interrupt is enabled, it will not
fire so the isr needs to be triggered manually for the callback.

This also removes the unnecessary interrupt locking in the isr and
removes the receiver timeout interrupt.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-16 15:26:24 -05:00
Pisit Sawangvonganan
df24d0114c drivers: can: sja1000: reduce number of frame->id pointer dereferences
Refined `can_sja1000_read_frame` and `can_sja1000_write_frame` by
reducing `frame->id` pointer dereferences.
Using a local `id` variable aims to improve efficiency, given
the frequent execution of this code in CAN applications.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 15:25:55 -05:00
Emil Gydesen
f9b5de2d0a tests: Bluetooth: Tester: Set conn = NULL in btp_gap
bt_conn_le_create logs an error if the provided conn is
not NULL. This small change cleans up the log a bit to
avoid the warning.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:25:41 -05:00
Andrej Butok
92273c5754 samples: smp_svr: add common sysbuild true
Adds sysbuild: true to the common section,
to build the project using sysbuild.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-16 15:25:03 -05:00
Emil Gydesen
75f5f71200 tests: Bluetooth: Tester: Redefine service IDs as hex
Everything else is defined as hex, so it makes sense to
be consistent. This will also make it easier to find the
service IDs in the logs that primarily already log
commands and events as hex.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:24:08 -05:00
Emil Gydesen
9a5fa367ba tests: Bluetooth: Tester: Format BTP cmd/evt/rsp logs as hex
Since the values are defined as hex, e.g. 0x82, it is easier
to compare with the log if they also log them as such.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:24:08 -05:00
Ian Morris
44477ad732 drivers: serial: fix renesas ra8 sci_b uart hardware flow control enable
Fixed typo in Renesas RA8 SCI_B UART configuration that was preventing
hardware flow control from being enabled.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-16 15:23:24 -05:00
Chris Friedt
9504034733 sys: util: use BITS_PER_BYTE macro instead of the magic number 8
Obviously, everyone knows that there are 8 bits per byte, so
there isn't a lot of magic happening, per se, but it's also
helpful to clearly denote where the magic number 8 is referring
to the number of bits in a byte.

Occasionally, 8 will refer to a field size or offset in a
structure, MMR, or word. Occasionally, the number 8 will refer
to the number of bytes in a 64-bit value (which should probably
be replaced with `sizeof(uint64_t)`).

For converting bits to bytes, or vice-versa, let's use
`BITS_PER_BYTE` for clarity (or other appropriate `BITS_PER_*`
macros).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-16 15:22:35 -05:00
Jilay Pandya
5032d8ede8 drivers: stepper: add common helper header for tmc5xxx functions
This commit adds a common helper header for tmc5xxx driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-16 15:22:24 -05:00
Henrik Brix Andersen
3825c852e8 boards: fysetc: add FYSETC UCAN USB to CAN 2.0B adapter board
Add support for the open-source FYSETC UCAN USB to CAN 2.0B board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-16 15:22:10 -05:00
Henrik Brix Andersen
7f5351bc45 dts: bindings: vendor-prefixes: add fysetc
Add Shenzhen Fuyuansheng Electronic Technology Co., Ltd. devicetree vendor
prefix (https://www.fysetc.com/).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-16 15:22:10 -05:00
Adrian Gielniewski
9fd9e231df net: openthread: Add platform message management
* Add CONFIG_OPENTHREAD_PLATFORM_MESSAGE_MANAGEMENT to allow enabling
message management by the platform.
* Add implementation of `otPlatMessagePoolInit`, `otPlatMessagePoolNew`
and `otPlatMessagePoolFree`.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
2024-11-16 15:21:20 -05:00
Gerard Marull-Paretas
a706461ea9 snippets: add serial-console
Add a new snippet to enable serial console. Even though most Zephyr
boards enable this by default, the same is not true for many real
boards, where enabling UART can increase power consumption. Having
this snippet may become handy on such scenarios. We could also
consider cleaning up upstream boards by just enabling this snippet
by default.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:14 -05:00
Gerard Marull-Paretas
40a73ec96e snippets: rtt-console: fix README issues
- Title underline too long
- Remove redundant how-to-use snippet bit, this can be documented
  generically for all snippets instead of repeating it everywhere.
- Snippet does not redirect anything.
- RTT does not require HW support for console.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:00 -05:00
Gerard Marull-Paretas
ce4ce9986a snippets: rtt-console: do not disable SERIAL
There's no point in disabling serial when enabling RTT. They are
not incompatible between each other.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:00 -05:00
Ren Chen
06f4213e6b driver: spi: support it8xxx2 spi driver
This commit adds the it8xxx2 spi driver support.

Tested with:
- west build -p always -b it8xxx2_evb samples/drivers/spi_flash

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-11-16 15:20:51 -05:00
Neil Chen
02027365f1 boards: nxp/frdm_mcxn236: Support MRT for NXP frdm_mcxn236 board
Enabled the MRT at the board level for mcxn236.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 15:20:31 -05:00
Neil Chen
7e1f754f02 dts: arm/nxp: Add mrt nodes to NXP MCXN23x dtsi file
Add mrt nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 15:20:31 -05:00
Yishai Jaffe
b44ab89c4c samples: sensor: die temperature polling: remove redundant configuration
rpi_pico.conf only adds CONFIG_ADC=y which already exists in the
prj.conf so it's redundant and can be removed.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-11-16 15:20:24 -05:00
Tom Burdick
2b5012a5d9 kernel: Move run queue initialization
Move the initialization of the priority q for running out of sched.c to
remove one more ifdef from sched.c. No change in functionality but
better matches the rest of sched.c and priority_q.h such that the
ifdefry needed is done in in priority_q.h.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-11-16 15:20:15 -05:00
Pieter De Gendt
794dd05459 scripts: ci: check_compliance: Keep UNDEF list sorted
Keep the UNDEF_KCONFIG_ALLOWLIST list sorted, as mentioned in the
comment.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 15:20:03 -05:00
Pieter De Gendt
5d49d5c00c scripts: ci: check_compliancy: Add zephyr-keep-sorted regex support
To support checking for sorted blocks of multi-line text add
an optional regex pattern for the KeepSorted compliance check.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 15:20:03 -05:00
Hakan Jansson
8e4dc4e7fa boards: infineon: cyw920829m2evk_02: set openocd target handle
Openocd target cyw20829 does not define _TARGETNAME which is used by
default by the openocd west runner when using CONFIG_DEBUG_THREAD_INFO.

This is similar to the issue previously addressed for STM32H7:

Link: https://github.com/zephyrproject-rtos/zephyr/issues/45778

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-11-16 15:19:44 -05:00
Matt Rodgers
2eda6df48a net: lib: http_server: add option to use ALPN
Web browsers don't support HTTP Upgrade mechanism to upgrade to HTTP2.
Instead, HTTP2 is supported only over TLS, and ALPN is used to negotiate
the protocol to be used.

This commit adds the supported HTTP protocols to the ALPN list, so that
web browsers can use HTTP2 with the server.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-11-16 15:19:36 -05:00
Simon Hein
d4da23e3c3 sca: Add cmake options file for tool configuration
Add a cmake file which uses the cmake options feature
and include it inot the sca.cmake file to set up and describe
the options for the ECLAIR tool.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-11-16 15:18:57 -05:00
Simon Hein
22ce16d17b doc: sca: Add Bugseng eclair documentation
Add the documentation for the eclair from Bugseng
with the pre configuration for the zephyr project.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-11-16 15:18:57 -05:00
Simon Hein
e0db9ce948 sca: Add ECLAIR sca cmake implementation
Add the ECLAIR calls for the zephyr cmake environment to call
ECLAIR while the firmware is build by replacing the actual compiler
call and setup the eclair environment and call the compiler through
the eclair.

The Integration accepts a kconfig file for configuring the
analysis and the generation of the reports. The path of the
kconfig file should be provided via the variable ECLAIR_CONFIG.

db_generation.ecl has be created and introduced instead of
reports.ecl because the report generation is handled by the
sca.cmake directly.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-11-16 15:18:57 -05:00
Simon Hein
4c7d86a8b5 sca: Add ECLAIR SCA configuration files.
Add the Eclair configuration files, which are needed to
configure the static code analysis tool for the zephyr
coding guidelines.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-11-16 15:18:57 -05:00
Furkan Akkiz
9bb46e6417 samples: drivers: Add MAX78002EVKIT sample overlay files
Enable counter/alarm sample for MAX780002EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
ee1d4da864 tests: Add MAX78002EVKIT test overlay files
Enable following tests for MAX78002EVKIT:
 - tests/drivers/adc/adc_api
 - tests/drivers/counter/counter_basic_api
 - tests/drivers/dma/chan_blen_transfer
 - tests/drivers/dma/loop_transfer
 - tests/drivers/flash/common
 - tests/drivers/gpio/gpio_basic_api
 - tests/drivers/i2c/i2c_target_api
 - tests/drivers/pwm/pwm_api
 - tests/drivers/spi/spi_loopback
 - tests/drivers/w1/w1_api

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
4488728822 boards: adi: Add MAX78002EVKIT board
Add MAX78002EVKIT board.
For more information about this board please check
https://www.analog.com/

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
9c98ab7b73 dt-bindings: dma: Add MAX78002 DMA binding file
Add MAX78002 binding file for DMA slots.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
f42568ca7b soc: adi: Add the MAX78002 SoC
Added MAX78002 Kconfig and dts files.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
1b194393ce drivers: clock control: Add IPLL and EBO clocks for MAX32 MCUs
MAX78002 SoC has IPLL and EBO clocks. Added these clocks for MAX78002.
Updated ERFO clock with '_OR' option because MAX78002 doesn't have it.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Furkan Akkiz
c47523c1c4 manifest: Update hal_adi to add MAX78002 SoC
Added MAX78002 SoCs' files to the hal_adi repository. This commit
fetches it.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-11-16 15:09:57 -05:00
Reto Schneider
7c31369f51 MAINTAINERS: Cover Si32 pinctrl dt binding header
Without this change, `get_maintainer.py path ...` did not return a SiM3U
specific maintainer information when querying for
include/zephyr/dt-bindings/pinctrl/si32-pinctrl.h.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-11-16 15:09:46 -05:00
Gang Li
f8acf35ddc drivers: wifi: nxp: fix build failure after disabling 802.11ax
Fixed build error, when disabling 802.11ax, if-else does not match.
Fixes #81117

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-11-16 15:09:22 -05:00
Carles Cufi
9643ca20e9 nordic: Remove the nRF54H20 Engineering B
The production version of the nRF54H20 SoC is now available, so remove
the initial Engineering B (EngB) preview version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 15:09:14 -05:00
Carles Cufi
5cb8d6c5b4 boards: nordic: Remove v0.8.0 of the nRF54H20 DK
The nRF54H20 Development Kit version 0.8.0 is no longer supported, given
that they should have all been replaced by 0.9.x.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 15:09:14 -05:00
Damian Krolik
11b6bd0ab1 net: openthread: support Wake-up End Device without CSL receiver
Make it possible to enable Wake-up End Device feature with
CSL receiver disabled (to receive wake-up frames on MED).

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-11-16 15:09:07 -05:00
Damian Krolik
de9519127b net: openthread: add wake-up end device support
Add Kconfig option to enable the Wake-up End Device role.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Co-authored-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-11-16 15:09:07 -05:00
Damian Krolik
8ce12aaa04 net: openthread: add wake-up coordinator support
Add Kconfig option `OPENTHREAD_WAKEUP_COORDINATOR` to enable
the Wake-up Coordinator role. Implement API to set Coordinated
Sampled Transmitting sample time and period for a driver that supports
`IEE802154_OPENTHREAD_HW_CST` capability.

The feature is be enabled on with ieee802154_nrf5 driver with option
by setting default value of CONFIG_IEEE802154_NRF5_CST_ENDPOINT.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Co-authored-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-11-16 15:09:07 -05:00
Damian Krolik
c9dbce36c0 drivers: ieee802154_nrf5: cabability IEE802154_OPENTHREAD_HW_CST
The new Kconfig option `IEEE802154_NRF5_CST_ENDPOINT` is added.
When it is enabled, then capability `IEE802154_OPENTHREAD_HW_CST`
is supported by the ieee802154_nrf5 driver and allows to set the
CST period and CST expected transmission time point.
This feature is an OpenThread-specific extention to the
ieee802154_nrf5 driver.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Co-authored-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-11-16 15:09:07 -05:00
Damian Krolik
242498e6be net: openthread: add capability IEEE802154_OPENTHREAD_HW_CST
The new capability `IEEE802154_OPENTHREAD_HW_CST` is added.
The option MAY be implemented as an extension to IEEE 802.15.4
drivers allowing to inject CST related Information Elements.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Co-authored-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-11-16 15:09:07 -05:00
Troels Nilsson
fa3bfa5453 Bluetooth: Controller: Add margin to ISOALs time offset
To ensure payloads are delivered in time for the first subevent
in framed BIS, ISOAL now enforces a (configurable) margin of
the calculated time offset

Without this margin, it has been observed that a broadcaster
can end up consistently missing the first subevent in every third
event in a 7.5 ms ISO with a 10 ms SDU interval

The margin is a conservative 2 ms by default, but can likely be
set a lot lower for most implementations and HWs

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-11-16 15:08:59 -05:00
Lauren Murphy
99a5236b40 llext: add support for arc
Adds compiler flag(s) and some architecture-specific relocations
for ARC. No userspace support, doesn't support all relocations.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-11-16 15:08:51 -05:00
Sadik Ozer
18853d026a tests: drivers: counter: Enable counter RTC test for MAX32 MCUs
This commit enables counter RTC test for MAX32 MCUs.

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-11-16 15:08:43 -05:00
Okan Sahin
0253a1054c boards: adi: max32: Enable counter RTC
This commit enables counter RTC for following boards

- MAX32662 EVKIT
- MAX32655 EVKIT
- MAX32655 FTHR
- MAX32666 FTHR
- MAX32666 EVKIT
- MAX32670 EVKIT
- MAX32672 FTHR
- MAX32672 EVKIT
- MAX32690 EVKIT

Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Okan Sahin <okan.sahin@analog.com>
2024-11-16 15:08:43 -05:00
Sadik Ozer
5e38168f0c drivers: counter: Add MAX32xxx counter RTC driver
Common RTC counter driver for MAX32xxx MCUs.
Time of day alarm is used to generate interrupt.
The resolution of time of day interrupt is 1Hz.
Subsecond alarm interrupt not works it does not meet
zephyr counter driver requirement, so that not used.

To use as wakeup source wakeup-source parameter shall be
defined as below

&rtc_counter {
    status = "okay";
    wakeup-source;
};

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-11-16 15:08:43 -05:00
Okan Sahin
b4d1076ab2 dts: arm: adi: Add counter RTC instance to MAX32xxx
This commit instantiates counter RTC on MAX32xxx MCUs.

Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Okan Sahin <okan.sahin@analog.com>
2024-11-16 15:08:43 -05:00
Ian Morris
fd96edcd28 boards: renesas: ek_ra8m1: added pmod node labels
Added pmod_serial and pmod_header node labels to EK-RA8M1 device
tree board definition, allowing compatible shield boards to be used.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-16 15:08:36 -05:00
Kenneth Witham
e19838d157 net: mqtt-sn: Update MQTT-SN Publisher Sample with Gateway Discovery
Fixes: #78010
This commit adds the "Gateway Advertisement and Discovery" process
to the MQTT-SN Publisher Sample application.

Signed-off-by: Kenneth Witham <kennywitham4@gmail.com>
2024-11-16 15:08:27 -05:00
Kenneth Witham
cc33fd685f net: mqtt-sn: Update MQTT-SN Unit Tests
Fixes: #78010
This commit adds tests for the "Gateway Advertisement and Discovery"
process. This includes tests for handling SEARCHGW, GWINFO, and ADVERTISE
as well as manually adding a Gateway for use. Gateway pruning when
missing ADVERTISE messages is also tested.

Signed-off-by: Kenneth Witham <kennywitham4@gmail.com>
2024-11-16 15:08:27 -05:00
Kenneth Witham
aa9c9228d4 net: mqtt-sn: Add Gateway Advertisement and Discovery process support
Fixes: #78010
This commit implements the "Gateway Advertisement and Discovery" process
defined in section 6.1 of the MQTT-SN specification.
This includes breaking changes to the transport interface and the default
included UDP interface implementation as support for UDP multicast
messages is added as implemented by the Paho MQTT-SN Gateway.

Signed-off-by: Kenneth Witham <kennywitham4@gmail.com>
2024-11-16 15:08:27 -05:00
Chun-Chieh Li
d716f54bbf drivers: usb_c: numaker: update UTCPD.VBSCALE register field
This follows update of UTCPD.VBSCALE register field. It supports:
- "divide-20": External VBUS voltage divider circuit should be 1/20
               for EPR application. The divided voltage compares with
               200mV to set or clean VBUS Present bit.
- "divide-10": External VBUS voltage divider circuit should be 1/10
               for SPR application. The divided voltage compares with
               400mV to set or clean VBUS Present bit.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-11-16 15:08:18 -05:00
Bjarki Arge Andreasen
9df88e62fc samples: boards: nordic: add nrf_sys_event sample
Add sample for nrf system events.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:08:11 -05:00
Bjarki Arge Andreasen
3e6d6033bb soc: nordic: add fn for setting constlat mode
Nordic SoCs implement an event system, for which the system can
optimize for low latency/high power or low power.

Add soc level implementation of reference counted API which will
optimize for low latency if any part of the system requires it.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:08:11 -05:00
Bjarki Arge Andreasen
05529584a9 dts: common: nordic: nrf54l15: add power peripheral
Add power peripheral to nrf54l15.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:08:11 -05:00
Jakub Wasilewski
cfdaa91ff6 drivers: eeprom: add mb85rsm1t fram support
Add a driver for the MB85RSM1T FRAM chip.

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-11-16 15:08:01 -05:00
Laurentiu Mihalcea
f754e09dcd dma: dma_nxp_edma: drop the hal-cfg-index property
The HAL configuration binding can be done dynamically based on the
IP's address space. The `hal-cfg-index` property is more tied to
software rather than hardware so remove it as an attempt to clean
up the binding.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-11-16 15:07:45 -05:00
Dino Li
7c2478e547 espi/it8xxx2: supports host command interrupt requested by custom opcode
Enables or disables host command interrupt when
ECUSTOM_HOST_SUBS_INTERRUPT_EN opcode is requested.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-11-16 15:07:38 -05:00
Chew Zeh Yang
0facdd834f boards: ambiq: apollo4p: Add USB nodes
Add USB node to apollo4p and apollo4p_blue qualifier, and apollo4p_evb
and apollo4p_blue_kxr_evb board to enableUSB support on the MCU and
its EVB.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-11-16 15:07:29 -05:00
Chew Zeh Yang
659582b06f drivers: udc_ambiq: Implemented UDC driver for apollo4p
Added implementation for udc_ambiq with its required Kconfig and
CMakelist updates.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-11-16 15:07:29 -05:00
Chew Zeh Yang
97187bee6a dt-bindings: apollo4p: add ambiq usb binding
Added ambiq-usb bindings needed by udc_ambiq.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-11-16 15:07:29 -05:00
Chew Zeh Yang
b0f4cf6511 boards: ambiq: add user button
Added user button for apollo4p_blue_kxr_evb and apollo4p_evb

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-11-16 15:07:29 -05:00
Olivier Lesage
fc8d9425c1 bluetooth: samples: Add samples showing basic channel sounding features
These samples demonstrate how to use the bluetooth 6.0 channel
sounding APIs. A basic distance estimation algorithm is included.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-11-16 15:07:20 -05:00
Jan Kowalewski
42889628a9 drivers: i2c: Introduce I2C timeout for SAM0
Adds configurable timeout for I2C transactions for SAM0 SoCs.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 15:07:11 -05:00
Sven Ginka
fe4215462d soc: sensry: udma, pad renaming
Before that fix the names for UDMA could be misleading.
With that fix the namespace is clear and easy to follow.
Same applies for peripheral addresses and pad config.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-11-16 15:06:43 -05:00
Alan Yang
795644f8f3 MAINTAINERS: update information of Nuvoton NPCM Platform
Update 'Nuvoton NPCM Platform': 'files' section.

Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2024-11-16 15:06:25 -05:00
Alan Yang
bf8181bbb1 soc: nuvoton: Enable npcm clock control driver
Enable npcm clock control driver in npcm4.

Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2024-11-16 15:06:25 -05:00
Alan Yang
cae35c2a1e boards: nuvoton: support npcm clock driver
Support npcm clock driver on npcm400_evb.

Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2024-11-16 15:06:25 -05:00
Alan Yang
af5794fec2 dts: arm: nuvoton: add npcm mdc and pcc instances
Add npcm miscellaneous device control and power and clock control
instances.
Add device tree bindings for npcm power and clock control.

Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2024-11-16 15:06:25 -05:00
James Chiang
bfa1e36789 drivers: clock_control: add npcm clock control driver
Add npcm clock control driver.

Signed-off-by: James Chiang <cpchiang1@nuvoton.com>
Signed-off-by: Joseph Liu <kwliu@nuvoton.com>
Signed-off-by: Alan Yang <tyang1@nuvoton.com>
2024-11-16 15:06:25 -05:00
Felipe Neves
9542166589 drivers: mbox: add IVSHMEM based mbox driver
Add initial support of the mailbox driver based
on the inter VM shared memory mechanism similar
as the existing IPM driver.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-11-16 15:05:34 -05:00
Francois Ramu
abfd712cec samples: boards: stm32 power lptim adjusted to 15 seconds
Gives an example where the timeout value is 15seconds,
the prescaler of 8 can let the LPTIM count from 0 to 16 seconds
with LSE

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-16 15:05:26 -05:00
Francois Ramu
27bb4961b3 drivers: stm32 lptim driver with a exact LPTIM timeout value
With this change, the LPTIM counter will be able to set
its timeout to the st,timeout value. So that system can
sleep for that period without interruption.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-16 15:05:26 -05:00
Anas Nashif
dfa170e909 tests: cmsis_nn: reduce architecture scope
Filters already only allow arm and native, so exclude everything else
very early and reduce churn and build time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-16 15:01:55 -05:00
Anas Nashif
a505078c60 tests: cmsis_dsp: reduce architecture scope
Filters already only allow arm and native, so exclude everything else
very early and reduce churn and build time.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-16 15:01:55 -05:00
Timothy Keys
e976a01bed Bluetooth: Host: Unit test for bt_le_cs_set_valid_chmap_bits
Add coverage of the bt_le_cs_set_valid_chmap_bits function to unit tests

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-11-16 14:58:14 -05:00
Timothy Keys
97399d4027 Bluetooth: Host: Remove code causing build error
This code is redundant and causes a build error if called more than
once.

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-11-16 14:58:14 -05:00
Timothy Keys
59126aca7e Bluetooth: Host: Fix spelling mistakes in cs.h
Fix a spelling mistake in the enum bt_le_cs_procedure_phy, and various
mistakes in comments.

Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
2024-11-16 14:58:14 -05:00
Nils Bosbach
2506d599a3 drivers: interrupt_controller: do not set sgi type
The GICD_ICFGR0 register is read only because SGIs are always
edge-triggered.

Signed-off-by: Nils Bosbach <bosbach@ice.rwth-aachen.de>
2024-11-16 14:57:44 -05:00
Benedikt Schmidt
5aa835c66b drivers: fpga: simplify load mode selection of iCE40
Replace the enum for load modes for the iCE40 with a boolean flag,
as there are only two options:
- SPI: default, which should be used whenever possible
- GPIO bitbang: workarorund, in case a low-end microcontroller is used

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-16 14:57:36 -05:00
Raffael Rostagno
834fa11e6b drivers: gpio: esp32: Add input/output enable flags
Flags added allow keeping a pin as input/output by not disabling
the output buffer when configuring it as an input and by not
disabling input enable when configuring it as output. This can
be useful to implement signal diagnosis or for testing purposes.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-16 14:57:29 -05:00
Lars-Ove Karlsson
e7c74e8f30 tests: kernel: fpu_sharing Fixed missing struct defs for ARM
Added empty fp register structs for ARM combinations not handled,
i.e. any ARM without a fpu.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-11-16 14:57:17 -05:00
Aaron Ye
0439cbc29c drivers: bluetooth: hci: add close function for Ambiq Apollo3x
This commit adds the bt_hci_driver.close function for Ambiq
Apollo3x SoC. Also update the hal_ambiq revision including
the necessary support.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 14:57:06 -05:00
Fin Maaß
8646a6c289 net: ethernet: arp: extend error log
If a gateway is not set for a interface,
also log the destination address.

Also print the interface index instead of the
interface pointer.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 14:56:57 -05:00
Emil Gydesen
8386929944 tests: Bluetooth: Tester: Log conn changes
Log the address and the err/reason values in the connected
and disconnect callbacks.

Since these values are not part of the BTP events it is
difficult to follow the order and reason why disconnects
happen when debugging.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:51 -05:00
Alberto Escolar Piedras
6d53e376cb tests/bsim/bluetooth/ll: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras
5da8eb3e9f tests/bsim/bluetooth/host: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Alberto Escolar Piedras
4c8ee78b76 tests/bsim/bluetooth/audio: Increase EXECUTION_TIMEOUT where needed
Increase the EXECUTION_TIMEOUT (real time timeout at which the test
will be killed), so we have more margin for CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:56:43 -05:00
Emil Gydesen
dc6630d5f5 samples: Bluetooth: PBP: Source: Fix advertising data
The sample had a few off-by-ones in the code, which caused access
to invalid data.

Fixed by setting the right buffer sizes and the right AD length
fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:56:30 -05:00
Guennadi Liakhovetski
ae8c373314 LLEXT: fix a needless allocation
When CONFIG_LLEXT_STORAGE_WRITABLE is selected and .pre_located is
set, the BSS section is allocated by the user too, no need to
allocate it internally.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 14:56:23 -05:00
Marvin Ouma
7e8ee25479 tests: posix: common: separate posix rwlocks tests into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves rwlocks into a singular
testsuite at tests/posix/rwlocks app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:16 -05:00
Marvin Ouma
f7633a55aa tests: posix: common: separate posix semaphores tests into standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves semaphore into a singular
testsuite at tests/posix/semaphores app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:56:09 -05:00
Krzysztof Chruściński
ed5ce47437 drivers: serial: nrfx_uarte: Fix RX path without low power modes
RX FIFO flushing on RXTO event should only be performed when
UARTE peripheral might be disable during inactivity and that
happens when low power modes is enabled or when device runtime
PM is used. Flushing was incrementing flush_cnt which was not
used (flushed data is not copied to the next buffer) which
was causing data loss and invalid RX data length reporting.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-16 14:55:43 -05:00
Pisit Sawangvonganan
effe4bbf95 fb: cfb_shell: remove dev null check
Remove `dev` null check as `DEVICE_DT_GET` ensures compile-time
initialization.
Refer to commit 6eb371f (fb: initialize devices at compile time)

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan
cff8b6092e fb: cfb_shell: use shell_strtol in cmd_set_kerning
Switch from using direct `strtol` calls to `shell_strtol`.
This change leverages the extensive error handling provided
by `shell_strtol`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan
06e0b2d1d6 fb: cfb: remove unnecessary NULL check and NULL assignment
Since the `fb` pointer is always assigned to `char_fb`, there is no need
for a `NULL` check. Additionally, removed setting `fb->buf` to `NULL` in
`cfb_framebuffer_init` as it will be overwritten by subsequent operations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Pisit Sawangvonganan
b7fe2a0bf9 fb: cfb: avoid multiple strlen calls in draw_text
Added `len` to store the result of `strlen(str)` to avoid
multiple calls to `strlen` in the `for-loop`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 14:53:57 -05:00
Marvin Ouma
ab601ae05c tests: posix: common: separate posix single process into a standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves confstr, sysconf and uname into
a singular testsuite at tests/posix/single_process app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 14:53:42 -05:00
Mikhail Kushnerov
a995d9d76f kernel: fix k_sleep in no multi-threading mode
Fix k_sleep implementation for no multi-threading mode.

Absolute value of timeout expiration was fed to the k_busy_wait()
function instead of delta value. That caused bug like incrementing of
sleep time in geometric progression (while actual function argument is
constant) during program running.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-11-16 14:07:41 -05:00
Mark Inderhees
c9d6c4c744 compiler: for xtensa add libgcc support
In order to compile with C++ exception handling for xtensa, the libgcc
location needs to be known. This change uses the same logic from gcc's
target.cmake to query the compiler for libgcc location and add the lib
to the include list.

Signed-off-by: Mark Inderhees <markind@meta.com>
2024-11-16 14:07:30 -05:00
Neil Chen
2de5e601a7 boards: frdm_mcxc444: Add lptmr support
Support lptmr for NXP frdm_mcxc444 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 14:07:17 -05:00
Yong Cong Sin
e0ce096b91 tests: benchmarks/sched: limit CPU to 1 for Intel ADSP ACE
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Yong Cong Sin
927420a423 tests: sched: Add busy threads for SMP
The sched benchmark is designed for systems with a single
CPU. Otherwise, the timestamps would be wrong when the partner
thread is scheduled on another CPU, i.e. negative values:

```
unpend   63 ready   62 switch -16562 pend 18937 tot 2500 (avg  928)
```

When the system allows for multiple CPUs, spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:07:08 -05:00
Maxime Vincent
b77c50d7b8 soc: arm: nxp: lpc55xx flexcomm 3->7 clock init
Add clock init for FlexComm 3,4,5,6,7 in case they
are enabled in DeviceTree

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-11-16 14:06:54 -05:00
Jamie McCrae
73f3f7dbef soc: gd: gd32: Remove setting Kconfig in wrong place
This Kconfig should not be set from here

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Jamie McCrae
557a2c6cbd soc: nxp: imx: imx8m: Remove wrong Kconfig setting
Removes setting a Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Jamie McCrae
6bc6e4e5c2 soc: mediatek: mtk_adsp: Fix wrong hwmv2 Kconfigs
Fixes Kconfigs for hwmv2 being defined in the wrong files

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 14:06:37 -05:00
Krzysztof Chruściński
bedb7e16c3 tests: kernel: timer: timer_behavior: Adjust TIMER_TEST_SAMPLES
Adjust default number of test samples which is based on SRAM size.
Test is using 8*TIMER_TEST_SAMPLES and with previous defaults for
the device with 64k RAM it was using 56k of test data leaving only
8k RAM and that was easily not enough. Adjust conditions to
take less samples when SRAM_SIZE is equal to the threshold.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-16 14:06:28 -05:00
Erwan Gouriou
4a94a33164 drivers: i2c: stm32: LL API C filers are not required
From some reason, STM32 I2C drivers selected the compilation of
C files of the I2C LL API.
This is actually not required, so remove this dependency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-16 14:06:21 -05:00
Pieter De Gendt
2ee5a24417 scripts: ci: check_compliance: Simplify line number in loop
Use the builtin enumerate function rather than a manual variable.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 14:06:12 -05:00
Emil Gydesen
8703381764 Bluetooth: Host: Add conversion macros from ms to various units
Add conversion macros from milliseconds to various units.
The purpose of these macros is to make it more clear/easier
for users to set and read values using milliseconds rather
than the various BT units which may be in 0.625, 1.25 or 10ms
units.

This is especially useful when comparing related values using
different units, such as advertising interval (0.625ms units)
and periodic advertising interval units (1.25ms units).

Users will have to be aware that these macros can provide slightly
different values than what is provided, if the provided values
do not match the units.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 14:06:03 -05:00
Alberto Escolar Piedras
0d249ecd23 tests/bsim: Also runtime test the UART drivers for the nrf5340
To increase coverage.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
7065b4628b doc boards nrfbsim: Mention the UARTE as supported for nrf5340
Include in the list of supported peripherals the UARTE for the
simulated nrf5340

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
5321941a5d tests uart_pm: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
51053cce11 tests uart_mix_fifo_poll: Enable for nrf5340bsim
Enable this test in the simulated nrf5340 and provide
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
dd13fa0c47 tests uart_async_api: Enable in nrf5340bsim//cpuapp
Enable this test in the simulated nrf5340 by providing
an appropriate overlay.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
a7abf80064 boards nrfbsim: Enable UART(E) peripherals for nrf5340bsim
The HW models now support this peripheral for these targets.
Let's enable them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
3418305eb8 doc boards nrfbsim: Mention the GPIO & GPIOTE as supported
Include in the list of supported peripherals the GPIO
and GPIOT for both the nrf5340 and nrf54l15

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
da01758908 tests gpio_get_direction: Enable for nrf5340bsim
Enable this test by providing an overlay for the nrf5340bsim
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
14c096ff38 tests gpio_basic_api: Enable for nrf5340bsim
Enable this test, and provide overlays, in the nrf5340bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay),
for the cpunet:
---- shorts_config.txt
short 1.1 1.2
----
And this for the cpuapp:
---- shorts_config.txt
short 3.1 3.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
8bd0a2525c tests gpio_hogs: Enable for nrf5340bsim
Enable this test, and provide overlays, for the nrf5340bsim.
Both for the app and net core.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
d0746f1177 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf5340bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
990fc4c130 tests gpio_get_direction: Enable for nrf54l15bsim
Enable this test by providing an overlay for the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
fb5ee609a0 tests gpio_hogs: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
1b1d3ca5d5 tests gpio_basic_api: Enable for nrf54l15bsim
Enable this test, and provide overlays, in the nrf54l15bsim

Note this test specs 2 GPIO pins to be shorted. This can be done
for the simulation target by calling zephyr.exe with the option
`-gpio_conf_file=shorts_config.txt`
Where  that file would contain this one line (for the provided overlay)
---- shorts_config.txt
short 1.1 1.2
----

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
4b890bc7b5 boards nrfbsim: Enable GPIO & GPIOTE peripherals for nrf54l15bsim
The HW models now support these pheripherals, let's enable them

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Alberto Escolar Piedras
0efbca30a5 manifest: Update nRF hw models to latest
Update the HW models module to:
aeef3db9fa9e4b9d12b3bbec44f9cedc8fcb7d9c

Including the following:
aeef3db GPIO & GPIOTE: Improve notes and documentation
93549c4 UART: Fix command line parameter description
dbab746 nrf_hack: Add a few missing peripherals
4b1a61b 53 UARTE: Correct subscribe sideeffects function name
197e9cf docs: UART can be used now for 5340 in Zephyr
dc18d14 53: GPIO+TE: Add app core instances
b236c08 GPIO+TE: Add to 5340's netcore
7a621f6 GPIO: Clarify function description
1a2e1e4 GPIO+TE: Build for 54L
d121db4 nrf_gpio hal: Add new nrf_gpio_port_pin_{in,out}put_set
9bc41ce GPIOTE: Connect to DPPI
7141042 GPIOTE: Add simple support for PORT.SECURE & NONSECURE
dc930ba GPIOTE: Support having or not sense functionality per instance
a07180d GPIO: Support multiple GPIOTEs
14bdce5 GPIO: Collect status in single struct
b91da53 GPIOTE: Add support for N interrupt lines
9963424 GPIO & GPIOTE: Generalize to N instances
7379c23 GPIO+TE: Fix indentation
8d691c6 Add SPU registers stub
dd68ca9 Add NFCT register stub
cf2cc5b HW_models: NHW_NVMC: fix buffer read validation
f3db727 zephyr: module.yml: add `depends` field
09fc98f CMakeLists: remove trailing whitespace

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 14:05:52 -05:00
Yong Cong Sin
ad7f3a9a0c soc: andestech: refactor out soc_early_init_hook() from pma.c
Refactor out the `soc_early_init_hook()` function from `pma.c` to
`soc.c` which is always compiled so that it can be extended to run
other init functions easily in the future. Then, restore the function
in `pma.c` to `pma_init()`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin
01b69e9c22 soc: andestech: run pma_init_per_core() with soc_per_core_init_hook()
The function `pma_init_per_core()`, as its name suggest, should be
run from every core, so call it from `soc_per_core_init_hook()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin
de347a4e07 init: support per-core init hook
Allow SoC to implement their custom per-core initialization function by
selecting `CONFIG_SOC_PER_CORE_INIT_HOOK` and implement
`soc_per_core_init_hook()`.

Signed-off-by: Maxim Adelman <imax@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00
Yong Cong Sin
cc0796ab86 soc: andestech: soc_per_core_init_hook() shouldn't return value
The `soc_per_core_init_hook()` function now has `void` type after
da118b9, so it should just return without any value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 14:04:25 -05:00
Piotr Zierhoffer
b05136fc06 x86: Add intel,x86_64 compat to all x86-64 platforms
This will help distinguish 64 and 32-bit platforms by tooling, following
the pattern visible in e.g. RISC-V.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-11-16 14:04:12 -05:00
Piotr Zierhoffer
12a27f31a1 intel: Explicitly set x86 compat in intel_ish5 and lakemont
Those dtsi are a base for a range of 32-bit platforms. Setting this
compatible makes it easier to distinguish all 32-bit x86 platforms.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>

y
2024-11-16 14:04:12 -05:00
Piotr Zierhoffer
8f14d08bf5 x86: Divide Intel Atom CPU compatible to x86 and x86_64
atom.dtsi enforces "intel,x86", but it doesn't help us discern if the
platform is 32 or 64-bit. We do that for example in RISC-V and it's
useful from the tooling perspective.

Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-11-16 14:04:12 -05:00
Damian Nikodem
f556a76081 driver: ssp: Refactor SSP driver to use SSP_IP_VER for version checks
This commit updates the SSP driver to use the newly defined
SSP_IP_VER macros for IP version checks instead of relying
on CONFIG_SOC_* macros. The change ensures better readability
and maintainability by centralizing the IP version definitions
and comparisons.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-11-16 14:04:01 -05:00
Tomasz Leman
5cf2cb6a37 soc: intel_adsp: ace: Use DT macros instead of hardcoded values
Replace hardcoded register addresses and values in
asm_memory_management.h with Devicetree (DT) macros for LPSRAM
power-down operations. This change ensures that register addresses and
bank counts are dynamically obtained from the Devicetree, improving code
portability and reducing the risk of errors due to manual updates.

- Removed hardcoded LSPGCTL address definitions.
- Updated m_ace_lpsram_power_down_entire macro to use DT_NODELABEL to
  fetch LPSRAM bank count and control register address
- Adjusted bit field extraction logic to align with the updated register
  information from the Devicetree.

This commit aligns with the ongoing effort to utilize Devicetree for
hardware abstraction and to facilitate easier maintenance and updates to
the codebase.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
946aeaa7e8 soc: intel_adsp: ace: Remove obsolete HPSRAM power change macro
Remove the m_ace_hpsram_power_change macro from asm_memory_management.h
as it is no longer used after refactoring the power_down function to
utilize the new m_ace_hpsram_power_down_entire macro. This cleanup helps
to reduce code complexity and maintainability.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
2d997082fc soc: intel_adsp: ace: Update power_down to use new HPSRAM power-down macro
Refactor the power_down function to utilize the newly introduced
m_ace_hpsram_power_down_entire macro for shutting down the entire
HPSRAM. This change simplifies the power-down process by replacing the
previous segment-based power gating mask approach with a single boolean
flag that indicates whether the entire HPSRAM should be disabled.

The function signature of power_down has been updated to accept the new
boolean flag, and the corresponding call sites have been modified to
pass the flag based on the CONFIG_ADSP_POWER_DOWN_HPSRAM Kconfig option.

Additionally, the assembly code has been cleaned up to remove the
now-obsolete hpsram_mask array and related logic.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
f447d10b0a soc: intel_adsp: ace: Add macro to power down entire HPSRAM
Introduce a new assembly macro, m_ace_hpsram_power_down_entire, which
utilizes Zephyr Devicetree macros to power down the entire HPSRAM on
Intel ADSP ACE platforms.

This macro dynamically retrieves the HPSRAM bank count and control
register address from the Devicetree, streamlining the power-down
process. The macro is designed to iterate over all HPSRAM banks and
issue a power down command to each, ensuring a complete shutdown of the
HPSRAM when required by the system's power management policy.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
e0977dccd8 dts: xtensa: intel: Add hsbcap register node for ADSP ACE platforms
This commit introduces the L2 Memory Capabilities (hsbcap) register node
to the Devicetree specifications for Intel ADSP ACE platforms. The
hsbcap register provides information on the general capabilities
associated with the L2 memory, which is critical for system
configuration and resource management. The hsbcap node has been added to
the Devicetree source files for ACE 1.5 (MTPM), ACE 2.0 (LNL), and ACE
3.0 (PTL) platforms.

In addition, the DFL2MM_REG macro in adsp_memory.h has been updated to
use the Devicetree node label for hsbcap, ensuring a consistent and
maintainable approach to accessing this register across the codebase.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
f810b5d292 soc: intel_adsp: ace: Clean up macro indentation in power_down.S
This commit improves the readability of the power_down.S assembly file
by standardizing the indentation of the preprocessor definitions.

No functional changes have been made; this is purely a cosmetic update
to the code formatting.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
Tomasz Leman
095bc56a57 soc: intel_adsp: ace: Ensure TLB entry for HW registers during power-down
This commit addresses an issue on platforms with an MMU where a
LoadStoreTLBMissCause exception occurs when accessing hardware registers
during the power-down process. The exception arises when attempting to
access the IPC register after HPSRAM has been powered down, leading to a
double exception: LoadStoreTLBMissCause followed by
InstrPIFDataErrorCause.

To resolve this, we preload the IPC register before shutting down
LPSRAM. This change prevents the double exception by ensuring that the
page table entries are correctly managed in the TLB before HPSRAM is
powered down and allowing the power-down sequence to complete
successfully.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-11-16 14:03:50 -05:00
romain pelletant
bea68273d5 lorawan: replace booleans by atomic flags
ADR status and devtime updated flags merged into an atomic bits array.
Related to Issue #55072

Co-authored-by: Jan Kowalewski <jkowalewski@cthings.co>

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 14:03:36 -05:00
romain pelletant
ae0c1b72cf lorawan: add devicetime request support
Add devicetime request support.
Update lorawan sample
Related to Issue #55072

Co-authored-by: Jan Kowalewski <jkowalewski@cthings.co>

Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 14:03:36 -05:00
romain pelletant
866905fd6a lorawan: change downlink callback
Change downlink callback to transport data using flags.
Related to Issue #55072

Co-authored-by: Jan Kowalewski <jkowalewski@cthings.co>

Signed-off-by: romain pelletant <romainp@kickmaker.net>
Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-11-16 14:03:36 -05:00
Maksim Drachov
91d3eb9107 soc: atmel: fix wait state value
The datasheet specifies that 2 wait states are required at 48 MHz.

Signed-off-by: Maksim Drachov <maksim.drachov@outlook.com>
2024-11-16 14:03:27 -05:00
Philip-Dylan Gleonec
8084111e54 boards: shields: add adafruit adalogger featherwing
Add definition for the Adafruit Adalogger Featherwing. This shield
compatible with the Adafruit Feather family is equipped with an SD card
slot and a PCF8524 RTC.

This work is based on the Adafruit Data Logger shield definition.

Signed-off-by: Philip-Dylan Gleonec <philip-dylan@gleonec.bzh>
2024-11-16 14:03:16 -05:00
Sreeram Tatapudi
0a9c0f4017 soc: infineon: Support for power management on 20829
- Initial changes in board, dts, and soc files to support
 system power management

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-11-16 14:03:04 -05:00
Andriy Gelman
041f9821ca drivers: xmc4xxx_uart: Delay transmit interrupt until byte is sent out
Generate the Tx service request after the symbol is shifted out of the
UART. This is useful when the UART is connected to an RS485 transducer
which has a separate transmit enable gpio/line. Hence it's important
to know when the transmission actually finishes so that the drive
enable line can be disabled.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-11-16 14:02:43 -05:00
Peter Ujfalusi
a8ac02f9ad drivers: dma: intel-adsp-gpdma: Account for LLPL wrapping
In case the LLP wraps we need to re-read the LLPU to make sure we return
the correct value.

Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-11-16 14:02:35 -05:00
Jan Faeh
22945254ef drivers: sensor: STS4x Add driver
This adds support for Sensirion's STS4x temperature sensor.

Signed-off-by: Jan Faeh <jan.faeh@sensirion.com>
2024-11-16 14:02:15 -05:00
Meir Komet
5595f66851 multi_heap: introduce support for realloc()
Add support for realloc (and realloc_aligned) into the multi heap lib,
where the buffer sent in will either be reused (maybe shrinked),
or enlarged by allocating on any of the matching heaps of the multi heap.

Signed-off-by: Meir Komet <mskomet1@gmail.com>
2024-11-16 14:02:07 -05:00
Zhang Xingtao
0cf866037d boards: xtensa: add M5Stack CoreS3 support
Initial support for M5Statck CoreS3 development board.

Signed-off-by: Zhang Xingtao <zhxt@live.cn>
Co-authored-by: Benjamin Cabé <kartben@gmail.com>
Co-authored-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-16 14:01:42 -05:00
Mathieu Choplain
f27323a45d arch: arm: cortex_m: pm_s2ram: add support for all architectures
Extend the ARM M-profile suspend-to-RAM implementation to be compatible
with all versions of the M-profile supported by Zephyr: ARMv6-M, ARMv7-M,
and ARMv8-M Baseline.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-11-16 14:00:44 -05:00
Mathieu Choplain
18f41aa63c arch: arm: cortex_m: pm_s2ram: wrap context save/restore in macros
Wrap the CPU register save/restore operations (GPR and special registers)
in macros to make core logic simpler to follow. This is also a preparatory
step to introduce ARMv6-M and ARMv7-M support.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-11-16 14:00:44 -05:00
Mathieu Choplain
041714cb37 arch: arm: cortex_m: pm_s2ram: use macros to access struct __cpu_context
Use macros to wrap the interaction between the assembly code and the
struct __cpu_context. This helps making the assembly more readable.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-11-16 14:00:44 -05:00
Mathieu Choplain
7dd7dffe33 arch: arm: cortex_m: pm_s2ram: ignore xPSR
Remove all xPSR-related registers from struct __cpu_context, and the
associated save/restore code in S2RAM code, as they are not needed:

* EPSR and IPSR are read-only - they cannot be "restored"
* Bits N, V, Z, C, V, Q, and GE (if DSP Extension is implemented) of APSR
  could be restored, but this is not needed as the AAPCS indicates these
  bits to be "undefined on entry to or return from a public interface"

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-11-16 14:00:44 -05:00
Adrien Leravat
1d6a89d26e tests: drivers: sensor: add hc-sr04 tests
Add automated build and functional tests for the HC-SR04.

Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
2024-11-16 14:00:34 -05:00
Adrien Leravat
9df661ea1a drivers: sensor: hc-sr04: add driver
Add a simple driver for the HC-SR04 ultrasonic distance sensor.

Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
2024-11-16 14:00:34 -05:00
Andries Kruithof
6d187ba882 Bluetooth: Audio: Bablesim tests for CAP broadcast reception stop
Implement a babblesim test for the CAP broadcast reception stop
procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-16 14:00:25 -05:00
Steve Boylan
d0aced304b drivers: spi: RPi Pico PIO SPI code size and byte order.
Use minimized PIO code for 3-wire operation.

Input and output buffers are conventionally stored in bus byte order.
For 16 and 32 bit transfers, this is effectively big-endian, so
txbuf and rxbuf need to be read as such.  Those pointers also need
to be declared uint8_t * instead of void *.
In addition, tx_count and rx_count are based on dts, and refer to
whole transfers (8, 16, or 32 bits), not bytes.

Added rpi_pico.overlay to samples/sensor/magn_polling to demonstrate
32-bit word size, and updated the README.rst to make it independent
of the specific sensor.

Clean up compliance check failures.
Fix typos.
Synchronize 3-wire TX and RX cycles.
Simplify state machine synchronization
Minimize SPI bus delay time in 3-wire mode
Move clock delay to PIO code and remove k_sleep

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2024-11-16 14:00:16 -05:00
Øyvind Rønningstad
782f0b2a4a west.yml: Update zcbor from 0.9.0 to 0.9.1
This is just a README update, so no changes are needed in Zephyr.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-11-16 13:52:08 -05:00
Teresa Zepeda Ventura
7ec8c8e753 boards: adafruit: add initial support for feather m4 express
The Adafruit Feather M4 Express is a compact, lightweight
ARM development board with an onboard mini NeoPixel, 2 MiB
of SPI flash, charging status indicator and user LEDs, USB
connector, 21 GPIO pins and a small prototyping area.

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-11-16 13:51:45 -05:00
Thomas Stranger
e6664e38ba samples: sensor: ds18b20: updates to reflect analog maxim acquisition
Links and the manufacturer name are updated from maxim to analog.

After the acquisition of Maxim Integrated the documentation
of these devices has been moved to the analog.com website.
Redirects exist, so they are not broken yet,
but we should not rely on that.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-11-16 13:51:38 -05:00
Thomas Stranger
d0816a1a60 drivers: w1: updates to reflect analog maxim acquisition
Links and the manufacturer name are updated from maxim to analog
for the 1-wire subsystem and the related ds18b20 sensor.

After the acquisition of Maxim Integrated the documentation
of these devices has been moved to the analog.com website.
Redirects exist, so they are not broken yet,
but we should not rely on that.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-11-16 13:51:38 -05:00
Jukka Rissanen
2188387dd3 samples: net: mdns_responder: Increase interface name len for VLAN
In this sample, VLAN has longer interface name so increase it to max.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Jukka Rissanen
f95ab280fb net: shell: dns: Print DNS server with network interface
If network interface is specified in the DNS server, then send
the queries to the server via the network interface. Print this
information in the server list.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Jukka Rissanen
6c95daf0ae net: dns: Bind DNS server to a network interface
Allow user to specify a network interface in the DNS server
list. User can append "%" and network interface name to the
DNS server to use this. If the network interface is mentioned
in the server list, then the DNS queries are sent via this network
interface.
For example setting the interfaces like this:
   192.0.2.2%eth1
   [2001:db8::2]:5353%ppp0

would cause the DNS queries to sent to 192.0.2.1 via eth1 in the first
example, and to 2001:db8::2 via ppp0 in the second example.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Jukka Rissanen
5f3e6212af net: utils: Port parsing failure in net_ipaddr_parse()
If trying to parse a string like 192.0.2.2:80/foobar and
setting the length to 12 which means to parse the IP address
and port, the parsing failed because it used one extra character
from the string. This issue was not present if the input string
was terminated after the port number.

Add a test case to catch this problem.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:51:27 -05:00
Dominik Ermel
06c0b764cc tests: flash_map: Move SHA test to separate test scenario
The commit moves SHA calculation to separate test scenario, so that
it can be run separately from other flash map tests.
This reduces flash wear by not running basic flash map tests each
time different SHA backend is tested.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-16 13:51:18 -05:00
Dominik Ermel
dd93bce0b9 tests: flash_map: Reduce flash wear in test_flash_area_get_sectors
Remove needless writes/read and erase in flash_area_get_sectors test
scenario, by replacing it with comparison with layout directly obtained
from device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-16 13:51:18 -05:00
Thomas Stranger
501f07fe53 drivers: sensor: sensirion: sht4x: update measurement duration
Update the measurement durations for the sht4x sensors
in accordance with the datasheet revision 6.6 (2024-04).

These timings have been updated by sensirion in rev 3 of
the datasheet.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-11-16 13:51:10 -05:00
Pisit Sawangvonganan
c120ffb31d bluetooth: shell: avoid multiple strlen calls
Add `len` to store the result of `strlen(addr_arg)` to avoid
multiple calls to `strlen` within the `for-loop` in
`cmd_scan_filter_set_addr`.
While the performance impact may be minimal in a shell context,
storing `strlen(addr_arg)` in `len` ensures a single call,
making the code more predictable and consistent.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 13:50:58 -05:00
Vijay Hiremath
3f95fd4349 eSPI: NPCX/ITE: Enable conditional virtual wire valid bit check
On the new Intel SoC, the "Valid" bit of the Virtual Wire is set only for
Virtual Wires that undergo changes. This behavior differs from previous
generations. Therefore, to maintain backward compatibility, a conditional
check for the virtual wire valid bit is added for processing the virtual
wire level.

Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
2024-11-16 13:50:50 -05:00
Emil Gydesen
7e7e1aa719 Bluetooth: BAP: Fix CONFIG_BT_BAP_BASS_MAX_SUBGROUPS include issue
There were a few cases where CONFIG_BT_BAP_BASS_MAX_SUBGROUPS was
used in structs in the public header files. Unfortunately using
a Kconfig for an array size will cause include issues if the
file is included without the Kconfig being available.

For now add and use a new #define value that will be 0 if
CONFIG_BT_BAP_BASS_MAX_SUBGROUPS is not defined.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 13:50:25 -05:00
Keith Packard
c759b8ac3d libc/picolibc: Split hooks into separate files
This splits the picolibc helper functions into separate files instead of
smashing them all together.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-11-16 13:50:16 -05:00
Piotr Kosycarz
e4b830fe7a tests: drivers: sensor: temp_sensor: enable for nrf54l15dk
Incorrectly removed during transfer pdk->dk.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-16 13:44:48 -05:00
Piotr Kosycarz
51c5bc7667 tests: drivers: gpio: gpio_basic_api: enable for nrf54l15dk
Incorrectly removed during transfer pdk->dk.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-16 13:44:48 -05:00
Jukka Rissanen
5b007183d0 tests: posix: headers: net: Convert to use zexpect
Use zexpect instead of zassert so that the failed tests do not
stop the test execution but we run all the tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
d1e42fc147 tests: posix: headers: net: Add test for ipv6_mreq
The "struct ipv6_mreq" is supported so enable the tests for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
8f49925a0f tests: posix: headers: net: Add various IPv6 address check macros
Add these Posix specified IPv6 address checking macros

IN6_IS_ADDR_UNSPECIFIED
IN6_IS_ADDR_LOOPBACK
IN6_IS_ADDR_MULTICAST
IN6_IS_ADDR_LINKLOCAL
IN6_IS_ADDR_SITELOCAL
IN6_IS_ADDR_V4MAPPED
IN6_IS_ADDR_MC_NODELOCAL
IN6_IS_ADDR_MC_LINKLOCAL
IN6_IS_ADDR_MC_SITELOCAL
IN6_IS_ADDR_MC_ORGLOCAL
IN6_IS_ADDR_MC_GLOBAL

and tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
606eeed8c9 tests: posix: headers: net: Add INADDR_BROADCAST definition
Add INADDR_BROADCAST definition and a test for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
f2d58c4e18 tests: posix: headers: net: Mark unicast/multicast hops supported
Both the IPV6_UNICAST_HOPS and IPV6_MULTICAST_HOPS are supported
so add tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
96795f0b6c tests: posix: headers: net: Add IPv6 join/leave group
The IPV6_JOIN/LEAVE_GROUP corresponds to IPV6_ADD/DROP_MEMBERSHIP
definitions so define the former and add tests for them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
5216b52477 tests: posix: headers: net: Add check for in6addr_any variable
The in6addr_any is a global symbol that can be used when any
address (all zero bits) is being referenced.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
Jukka Rissanen
8776ae316c tests: posix: headers: net: sin6_scope_id is supported
The Posix documentation uses sin6_scope_id for scope id and
we support that already.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 13:44:35 -05:00
James Roy
9e5d4084b1 style: Inconsistent macro name changed
Fix incorrect header file pre-macro name in
'include/zephyr/devicetree.h'.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-16 13:44:12 -05:00
Emil Gydesen
c32210b003 Bluetooth: Host: ID: Log resolve list conflicts
In case of conflicts when calling bt_id_find_conflict
there was no way to easily determine what conflicted.

This is a rare occurance, but has happened when testing
against PTS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 13:43:59 -05:00
Mark Inderhees
1993ea019b build: support newlines in syscall decls
Some auto formatters will wrap long lines of code and insert newlines
that are part of function decls outside of arguments. This change strips
out all newlines so syscall typename regex function as expected.

Signed-off-by: Mark Inderhees <markind@meta.com>
2024-11-16 13:43:51 -05:00
Yong Cong Sin
70abb6077d tests/benchmarks: latency_measure: add qemu_riscv_64_smp board
Add `qemu_riscv64/qemu_virt_riscv64/smp` to the list of
integration_platforms.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-16 13:38:37 -05:00
Marcin Niestroj
60dba52859 boards: st: nucleo_h533re: add arduino_{gpio,serial} supported tags
This allows to build samples by twister which depend on 'arduino_gpio'
and/or 'arduino_serial'.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-16 13:38:18 -05:00
Marcin Niestroj
79bc3d1de5 samples: dap: drop 'sample.dap.bulk.nrf'
'nrf52840dk/nrf52840' is already listed under "generic" 'sample.dap.bulk',
so keeping 'sample.dap.bulk.nrf' has no value. The only difference is
dependency on 'gpio' instead of 'arduino_gpio', but
'nrf52840dk_nrf52840.overlay' references arduino header gpios only.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-16 13:38:07 -05:00
Jilay Pandya
6a0d7351d5 drivers: sensor: fcx_mldx5 fix string_overflow issue
This commit fixes Copy into fixed size buffer (STRING_OVERFLOW) by checking
the cmd_data_len

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-16 13:38:00 -05:00
Djordje Nedic
5c4f7d9e82 soc: Fix missing mem.h include in stm32h562
This caused failed builds due to the missing DT_SIZE_K(x) macro.

Signed-off-by: Djordje Nedic <nedic.djordje2@gmail.com>
2024-11-16 13:37:52 -05:00
Jilay Pandya
cebd1c78e8 drivers: sensor: emul_bmi160: fix cid 215232
This commit fixes the issue of Null pointer dereferencing

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-16 13:37:42 -05:00
Tarang Raval
532c775787 board: silabs: slstk3701a: add i2c2 node
Enable the I2C2 node on the EFM32GG11 SLSTK3701A board

Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
2024-11-16 13:37:28 -05:00
Benedikt Schmidt
7918c921d5 drivers: fpga: always check state of CDONE during configuration of iCE40
Turn the assert into an if-statement to ensure that CDONE is always
checked during the configuration of an iCE40.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-16 13:37:16 -05:00
Juha Sunnari
51bc60e142 logging: frontends: stmesp: alternate message output option
Add an alternate message output option in which messages are
ended with an additional zero data byte with marker and timestamp.
Can be used to maintain compatibility with certain decoders.

Signed-off-by: Juha Sunnari <juha.sunnari@nordicsemi.no>
2024-11-16 13:37:02 -05:00
Alberto Escolar Piedras
84dc9a1721 lib/cpp: Remove deprecated CONFIG_CPP_STATIC_INIT_GNU
This option was replaced with CONFIG_STATIC_INIT_GNU
2 releases ago in 6e977ae2d5

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 13:36:37 -05:00
Fabio Baltieri
6342eff58b led: add a struct led_dt_spec and some _dt wrapper APIs
Add a struct led_dt_spec to hold an LED device and index pointer, some
initializer and wrapper APIs.

This allows simpler LED usage, such as:

static const struct led_dt_spec led = LED_DT_SPEC_GET(DT_NODELABEL(led0));
led_on_dt(&led);
led_off_dt(&led);

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-16 13:36:27 -05:00
Daniel DeGrasse
0ea212918f cmake: extensions: use INTERFACE_SOURCES as property for code relocation
In order to enable code relocation, we use a custom target
(code_data_relocation_target), and add files we wish to relocate, as
well as which sections should be relocated to the COMPILE_DEFINITIONS
property for the target.

This approach has been fragile, because COMPILE_DEFINITIONS can also be
added to for all targets using `add_definitions`. This means if another
part of the project uses `add_definitions` and
CONFIG_CODE_DATA_RELOCATION is on, a warning will appear about the
"file" not being found. The "file" of course, is just the definition
added by `add_definitions`.

To work around this, switch to overloading the INTERFACE_SOURCES
property. This property should be a bit more robust, because nobody else
will add sources to the code_data_relocation_target.

However, this approach has the downside that the CMake documentation
pstates targets created with `add_custom_target()` (which the
code_data_relocation_target is) do not have an INTERFACE scope for
their sources- so while this approach works, it is not officially
supported by CMake

Fixes #60220

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-16 13:35:36 -05:00
Martin Stumpf
abc296ff65 drivers: display: display_sdl: implement display_show
Adds frame synchronization to every frame.
This prevents frame tearing.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-16 13:35:17 -05:00
Martin Stumpf
2e0687cfd2 generic: add frame_incomplete where missing
The newly introduced `frame_incomplete` flag of
`display_buffer_descriptor` needed to be added at several places to
avoid uninitialized memory.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-16 13:35:17 -05:00
Martin Stumpf
05bb8d9504 lvgl: add frame_incomplete information to display_write
In frames with multiple writes (officially supported through
`CONFIG_LV_Z_VDB_SIZE`) the display needs to be signalled that the
current frame is over and the content should be displayed.
This allows displays to present the UI without tearing artifacts.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-16 13:35:17 -05:00
Martin Stumpf
2bdffc6818 display: add frame_incomplete to display_buffer_descriptor
Introduces support for double-buffered/latched displays.
Currently, every write has to be presented to the user immediately,
which negates the advantage of latched displays to prevent frame tearing.

Now, GUI managers can indicate whether the current `display_write` call
is the last call of the frame or not, allowing displays to group writes
to a single present.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-11-16 13:35:17 -05:00
Jordan Yates
8b69b79279 tests: fuel_gauge: test negative current
Validate that the SBS fuel gauge driver returns the expected values for
negative currents (discharging).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-16 13:35:03 -05:00
Jordan Yates
8345775de0 fuel_gauge: sbs_gauge: fix negative currents
Fix negative currents being read as extremely high currents due to
unsigned variable use.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-16 13:35:03 -05:00
Yong Cong Sin
9c3482b1d5 arch: riscv: smp: allow other IPI implementation
The currently IPI implementation assumes that CLINT exists in the
system, however, that might not be the case as IPI can be implemented
with PLIC that supports software-triggering as well, such as the Andes
NCEPLIC100.

Refactor the CLINT-based IPI implementations into `ipi_clint.c`, and
create Kconfig that selects the CLINT implementation when
`sifive-clint0` exists and enabled, otherwise default to
`RISCV_SMP_IPI_CUSTOM` which allows OOT implementation. This also
makes way for the upstreaming of non-clint IPI implementation later.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-16 13:34:10 -05:00
Tarang Raval
bb7319e7f2 drivers: sensor: ina219: remove redundant error check
The function ina219_set_msr_delay always returns zero, indicating success.
Therefore, the error check on its return value is unnecessary and can be
removed.

Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
2024-11-16 13:33:34 -05:00
Seppo Takalo
b3f3bce23e net: lib: coap_client: Add API to cancel specific request
Add a new API to cancel just one, or mathing requests,
instead of cancelling all ongoing requests.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
f0c6efe798 net: lib: coap_client: Stop polling on unneeded sockets
poll() only for sockets that have traffic ongoing or have some lifetime
left.
On socket failures during a poll(), stop listening for the socket.
Application can recover by reconnecting the socket.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
f72d634826 net: lib: coap_client: All error cases should be reported to callback
When the client fails when parsing the response and we stop proceeding,
we should report that to the application.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
c0eb260c2c net: lib: coap_client: Drop duplicate MID only after responding with Ack
Even if we receive duplicate confirmable message, we should still
respond with the Ack. Just don't deliver the second callback.

This is achieved by moving the MID deduplication to after Ack handling.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
48434a3c1b net: lib: coap_client: Return -errno from send_request()
Return the -errno when zsock_sendto() or zsock_recvfrom() fails, so
rest of the code can deal with return values, instead of separately
comparing errno and return value.


Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
a1368a7ff7 net: lib: coap_client: Drop duplicate responses
When response is already handled, don't forward anymore responses
to the client application.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
934c74f26e net: lib: coap_client: Don't match zero length tokens
If our internal structure is cleared, don't match tokens.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
7b0cce4418 net: lib: coap_client: Parse incoming MID only once
Incomming Message-ID is already parsed, use it as a parameter to
get_request_with_mid().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
41ee35ae8b net: lib: coap_client: Don't clear internal structures on response
When response is received and handled, don't just clear the structure
but instead mark it as ongoing=false.
So if we later on receive a duplicate response for it, we can still
respond with Ack or Rst.

This is achieved by using release_internal_request() when we don't
expect any response for it and reset_internal_request() when we really
fill up a new request.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
107dc9b96d tests: coap_client: Add testcase for receiving RST
When server responds with CoAP RESET, we should inform the
client and stop the request.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
05a6ba678e tests: coap_client: Add testcase for observation
Add test for ongoing observation and cancellation.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
237b26c44a tests: coap_client: Test for operating on socket while another fails
CoAP client should be able to push data through functioning socket
while another sockets is failing or reporting poll() errors.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
fc51fa491f tests: coap_client: Add testcase for Ack failure
Add testcase where sending Ack to incomming Confirmable message fails.
This should be reported to application as now the server is unaware
that transmission have succeeded, so we cannot thread it as success.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
5559a520c9 tests: coap_client: Improve retry testcases
Add testcases for testing client's retry behaviour.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
120aabbb8f tests: coap_client: Add test when separate response is lost
Test a scenario where Ack is received but the actual response
is not coming.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
83bc1fcb46 tests: coap_client: Add test for duplicate response
Add test where we receive same UDP packet twice.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Seppo Takalo
ca67f51170 tests: coap_client: Improve socket stubs
* Use sys_rand_get() and seed the CoAP library, so our MIDs are
  random.
* Set socket events per socket, so we don't accidentally receive
  on wrong socket
* Reply with correct tokens

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-11-16 13:33:28 -05:00
Daniel DeGrasse
0be5dcd25d arch: arm: add MPU definitions for all flash and SRAM region sizes
Add definitions for all possible flash and SRAM region sizes for ARMv7
MPU. Also, correct some of the SRAM size checks to use <= instead of ==,
to be consistent with the remainder of the file

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-16 13:33:15 -05:00
Declan Snyder
6d1a3bb36e boards: rd_rw612_bga: Move FCB in tree
Move the FCB to be in tree for this board instead of in the NXP HAL.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-16 13:32:48 -05:00
Maximilian Deubel
9bed2b7a98 scripts: logging: dictionary: Add support for size_t %z format specifier
This patch adds support for the size_t %z format specifier to the
dictionary parser.
It's the correct format to use for size_t types in modern C,
but it's not supported in python directly.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-11-16 13:32:22 -05:00
Nidhal BEN OTHMEN
92a7ddfb56 boards: st: Update nucleo_wba55cg dts file
Update nucleo_wba55cg dts file to use pinctrl dtsi file of WBA55
instead of WBA52.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2024-11-16 13:32:13 -05:00
Pieter De Gendt
175bfb4bc9 tests: net: lib: lwm2m: interop: Fix strip-with-multi-characters (B005)
All strip functions remove any of the provided characters instead of a
prefix/suffix. This is likely a bug.

See https://docs.astral.sh/ruff/rules/strip-with-multi-characters/

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-16 13:32:02 -05:00
Marcin Niestroj
8f14c68660 boards: st: nucleo_u5a5zj_q: configure PD14 as SPI1 nCS
ST ZIO connector is Arduino Uno compatible. Arduino SPI pins are placed on
D10-D13 pins, where D10 is SPI nCS pin. This pin is connected with PD14 of
STM32U5A.

According to schematics of this Nucleo board [1]:

  Due to muxing constrainte, the SPI_NSS is not available as an alternate
  on this IO, so this pin is affected with an I/O function to do the Chip
  Select

This means that software control of GPIO is needed to make use of this SPI
interface on regular SPI signals on Arduino connector. Reconfigure
SPI1 (used as Arduino SPI) interface to account for that.

Note that previously configured PE12 is only available on ST ZIO and ST
Morpho connectors, not on Arduino connector.

Update documentation as well, which was referencing PA4 as nCS signal (used
on some other Nucleo boards).

[1] https://www.st.com/resource/en/schematic_pack/mb1549-u5a5ziq-c04-schematic.pdf

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-11-16 13:31:53 -05:00
Andrej Butok
a730d9abad boards: nxp: fix s26ks512s0 flash write-block-size
- Sets s26ks512s0 flash write-block-size to correct 256KB.
- Optimizes MCUboot partitions to fit the correct write-block-size.

Fixes #80284

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-16 13:31:35 -05:00
Jamie McCrae
ed8f613e55 cmake: dts: Use temporary file for dts.cmake
Uses a temporary file for dts output then uses CMake to copy to the
correct file if it has changed. This prevents a ping-pong issue when
sysbuild is used of configuring and building cycle when nothing has
changed and there is sysbuild code which loads in the devicetree
data from an image

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 13:31:02 -05:00
Alberto Escolar Piedras
2324d5daa1 doc nrf54l15bsim: Clarify the L10 and L05 are also covered
Clarify that one can simulate equally well the nRF54L10 and L05
variants with this target.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 13:30:49 -05:00
Alberto Escolar Piedras
5e6c28bfa3 doc nrf54l15bsim: Remove experimental warning
This target simulated is reasonably tested.
Let's stop warning about it being experimental.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-16 13:30:49 -05:00
Marvin Ouma
05196e38a9 tests: posix: common: separate posix barriers to standalone test
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves barrier into a singular
testsuite at tests/posix/barriers app directory.

Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
2024-11-16 13:30:36 -05:00
Nidhal BEN OTHMEN
a199f7f9d3 tests: bluetooth: tester: Fix bluetooth tester for nucleo_wba55cg
Fix compilation error by specifying usart1 to be used for uart-pipe.
Add a board-specific configuration file to disable the console,
so, the usart1 will be used only for bluetooth and to specify
the BT_HCI_TX_STACK_SIZE.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2024-11-16 13:29:39 -05:00
Anas Nashif
cfc232fa32 twister: stats: fix platform stats
Fix wrong reporting about where testcases were executed.

We have:

INFO    - 1130 of 1130 executed test cases passed (100.00%) on 0 out of
total 860 platforms (0.00%).

which is obviously wrong.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-16 13:29:23 -05:00
Carles Cufi
a3cc532221 actions: manifest: check additional metadata in projects
See https://github.com/zephyrproject-rtos/action-manifest/pull/14.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 13:28:58 -05:00
Mahesh Mahadevan
0006ba8ee3 release: Zephyr v4.0.99
Set the version to v4.0.99

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-16 13:40:34 +01:00
Mahesh Mahadevan
8469084dfa release: Zephyr v4.0.0
Set the version to v4.0.0

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 17:27:32 -06:00
Mahesh Mahadevan
c5b27d948a doc: release: Finalize v3.7.0 release notes and migration guide
Remove working draft status from the 4.0.0 release notes and
migration guide.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 17:27:32 -06:00
Mahesh Mahadevan
95633cf68c doc: release: Add v4.0.0 to the list of supported releases
Add v4.0.0 to the list of supported releases.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 17:27:32 -06:00
Mahesh Mahadevan
5c31f61d51 doc: release-notes-4.0: Update the DAC section
This incorrectly had references to timers and watchdog
related items.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 15:09:56 -08:00
Jilay Pandya
955d7974d5 docs: release notes: add 80875 to known issues
add #80875 to known issues in release notes 4.0.0.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-15 16:32:41 -06:00
Mahesh Mahadevan
91c3768b25 doc: release-notes-4.0: Release notes cleanup
1. Move deprecated items to the deprecated section.
2. Fixed a portion of a sentence that was deleted.
3. Miscellaneous cleanup.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-15 16:03:40 -06:00
Andrzej Głąbek
c7a1b53f82 doc: release-notes-4.0: Add a few Nordic related entries and an ADC one
Add notes for Nordic HAL and other nRF related stuff plus one more ADC
entry.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-11-15 16:03:40 -06:00
Flavio Ceolin
659eec8d85 doc: release-notes-4.0: Add CVE-2024-11263 info
Add CVE-2024-11263 to release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-15 13:03:16 -06:00
Flavio Ceolin
7aa7e894bc doc: security: Disclose CVE-2024-11263
Disclose information about published CVE

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-15 13:03:16 -06:00
Benjamin Cabé
275f44730e doc: releases: re-arrange API Changes section
some entries were not properly put under either
Removed or Deprecated section. This commit
fixes that.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
c1d150934a doc: releases: use correct compatible for zephyr.gpio-steppers
The current name of the compatible is zephyr,gpio-steppers

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
2be735c558 doc: releases: fix galaxycore,gc2145 compatible
fix typo in compatible name

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
7fa0d83966 doc: releases: drop empty subsections from migration guide
Drop sections with no updates

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
657229f72e doc: releases: fix typos in MCUboot section
Fix minor typos

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
36ccae904d doc: releases: drop empty lib/subsystems subsections
Drop sections with no updates

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
a3978892c3 doc: releases: drop empty driver subsections
Drop sections with no updates

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
8f0a4bd323 doc: releases: fix Devicetree spelling
Spell Devicetree with a capital D

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Benjamin Cabé
c4b00f7bea doc: releases: add more release highlights for 4.0
This adds a few more entries to hopefully complete the list of
4.0 highlights.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-15 13:03:02 -06:00
Chris Friedt
1bf22569fc doc: release-notes-4.0: add posix api release notes
Add POSIX API release notes for new features and enhancements
since v3.7.0 .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-15 11:10:20 -06:00
Chris Friedt
95f4912e72 doc: posix: options: correct anchor for thread safe functions
Previously, the anchor for `_POSIX_THREAD_SAFE_FUNCTIONS` was
`posix_thread_safe_functions` but it should have been
`posix_option_thread_safe_functions`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-15 11:10:20 -06:00
Yves Vandervennet
214837fa2b doc: release: NXP contribution
Adding NXP's contributions to v4.0

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-15 11:09:10 -06:00
Gerson Fernando Budke
d71d4c0e80 drivers: rtc: sam: Fix missing function
The #64939 introduced a few convenience function like
rtc_utils_validate_rtc_time. However the PR did not replace all
occurrences which result on a build error. This add the missing
header include to remove a building warning and replace the old
function by the new one.

Fixes #81454

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-15 11:08:58 -06:00
Alberto Escolar Piedras
24c2c43bcd boards nrf52_bsim: Fix sample used as example
Let's fix the sample used in the example. The peripheral_hr and
central_hr are meant to be run with each other.
Let's also use the :zephyr:code-sample: directive to refer to the
samples so we get a link.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-15 08:10:08 -06:00
Ahmed Adel
8034de73d5 doc: services: debugging: Remove unwanted reference link
Remove unwanted reference link to the section (Usage)
in ARM Coresight Trace Deformatter that shows up in
the main Debugging documentation page, by lowering
the level of (Usage) heading from ##### to *****

The commit also has a typo fix.

Signed-off-by: Ahmed Adel <a.adel2010@gmail.com>
2024-11-15 08:09:53 -06:00
Jilay Pandya
a482884751 doc: release: doc stepper API as major enhancement
Add entry in "Major enhancements with this release include:" for
stepper device driver subsystem.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-15 08:09:39 -06:00
Lukasz Mrugala
7092335c11 doc: Add information on Twister Statuses
Currently, Twister Statuses are only useful for
the initiated, save for the very basics.
This is in opposition to the fact
that they are the main thing end users take into
account when checking their Twister run reports.

In order to make Statuses more useful for the end user,
a new documentation page has been created,
elucidating the full meaning of all Statuses.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-11-15 08:09:28 -06:00
Jilay Pandya
5f418f506c docs: contribute: documentation: generation: fix missing doc
fix the path where the user has to be in order to execute make html-fast

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-14 20:37:45 -06:00
McAtee Maxwell
2fe4a37f38 Documentation: Update documenation for Infineon boards
-Update formatting and contents of index.rst for cy8ckit_062s4
	-Update formatting and contents of index.rst for cy8ckit_064s0s2_4343w
	-Update formatting and contents of index.rst for cy8cproto_062_4343w
	-Update formatting and contents of index.rst for cy8cproto_063_ble
	-Update formatting and contents of index.rst for xmc45_relax_kit
	-Update formatting and contents of index.rst for xmc47_relax_kit
	-Change all instances of "PSoC" to "PSOC" for infineon platforms

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2024-11-14 20:36:38 -06:00
Flavio Ceolin
422a41ddc1 MAINTAINERS: Add Bjarki as pm co-maintainer
Add bjarki-andreasen as second maintainer for power management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-14 20:36:21 -06:00
Mark Holden
94c1079560 arch: arm: Don't use STKALIGN mask on ARMv8-M Baseline
The STKALIGN mask is not present for CONFIG_ARMV8_M_BASELINE as
well as CONFIG_ARMV8_M_MAINLINE. So filter out that check when
setting the sp for ARM core dumps.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-11-14 17:27:17 -06:00
Nazar Palamar
7e1b00d35e Infineon: board: remove CONFIG_GPIO from defconfigs
Remove CONFIG_GPIO from defconfigs for Infineon boards.
Applications, drivers will enable GPIO if need.

Added 'select GPIO' from spi/Kconfig.ifx_cat1
Added 'select GPIO' from wifi/infineon/Kconfig.airoc

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-11-14 17:27:06 -06:00
Nazar Palamar
44aa6f11a6 cy8ckit_062_ble: board: moved uart-6 to common dts for m4
Moved uatr6 to common dts for m4

- cm0 uses uart-5 in ver 0.0.0 and uart-5 in ver 1.0.0 (for
using of Arduino headers).

- cm4 by default uses uart-2 (for ver 0.0.0 and ver 1.0.0)

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-11-14 17:27:06 -06:00
Phi Bang Nguyen
c872b49ab0 doc: release-notes-4.0: Add tracked issue for video-interface bindings
Add link to the track the migration to the new video-interfaces
bindings.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-11-14 12:41:36 -06:00
Phi Bang Nguyen
da8de0945a doc: release-notes-4.0: Add fixed chicken-egg issue on NXP RT10xx
Add the chicken-egg issue on init order for the camera pipeline on NXP
RT10xx platforms

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-11-14 12:41:36 -06:00
Phi Bang Nguyen
3dff1a0a6f doc: release-notes-4.0: Add camera colorbar pattern test
This is added via PRs #79337 and #79263 to automatically check if a
colorbar pattern generated by a camera pipeline is correct or not.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-11-14 12:41:36 -06:00
Benjamin Cabé
4ddef9fc0f boards: lilygo: adopt new zephyr:board directive and role
This updates the documentation of all the LilyGO boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-14 12:41:19 -06:00
Ricardo Rivera-Matos
a88af572f4 doc: releases: 4.0: Adds Haptics notes
Introduces haptics subsystem and DRV2605 support in the release notes.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2024-11-14 12:41:09 -06:00
Bjarki Arge Andreasen
2f81bbbdf8 doc: release: doc comparator API as major enhancement
Add entry in "Major enhancements with this release include:" for
comparator device driver subsystem.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-14 12:40:59 -06:00
Johann Fischer
d0ea9d5243 doc: release-notes-4.0: add release notes for USB
Add release notes for USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-14 12:40:50 -06:00
Luca Burelli
07df2c5d5e soc: sensry: sy1xx: add support for LLEXT build
The linker script for this SoC was not including the LLEXT section
definitions when CONFIG_LLEXT was enabled. This patch adds the
necessary include directive to the linker script and fixes the build
issue identified by CI.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-14 11:01:27 -06:00
Aksel Skauge Mellbye
7f8b531d4c drivers: serial: gecko: Fix build error on Series 0
Series 0 does not have the TXIDLE status flag. The closest equivalent is
TXC, but it isn't set until the first transmission completes, and is
therefore not safe to use in PM suspend without also separately keeping
track of whether the driver has ever initiated a transmission. For now,
disable the TXIDLE check on devices that don't support it as a minimal
fix for the observed build error. This is effectively equivalent to
reverting the addition of PM support for these devices only. Since these
devices don't have a low-power system timer implementation anyway, the
lack of PM handling does not hurt anything.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-11-14 11:01:17 -06:00
Luca Burelli
876b44d150 soc: mediatek: mt8195_adsp: add support for LLEXT build
The linker script for this SoC was not including the LLEXT section
definitions when CONFIG_LLEXT was enabled. This patch adds the
missing include directive to the linker script.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-14 11:01:07 -06:00
Fabio Baltieri
f7ff83079f github: west_cmds: add missing anytree package
Add missing anytree package, runners started to fail on it:

../pylib/twister/twisterlib/runner.py:60: in <module>
    from anytree import Node, RenderTree
E   ModuleNotFoundError: No module named 'anytree'

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-14 09:51:06 -05:00
Laurentiu Mihalcea
c0a0e6a388 doc: release-notes-4.0: add release notes for firmware subsystem
Includes notes on SCMI's introduction.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-11-13 21:14:05 -06:00
TOKITA Hiroshi
9e51f1a754 drivers: sensor: mmc56x3: Fixed an error in include-guard
Fixed definitions duplicated with those in
`include/zephyr/drivers/sensor/tsl2591.h`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-13 19:11:25 -08:00
TOKITA Hiroshi
241c7b3fb7 arch: arc: Fixed an error in include-guard
Fixed definitions duplicated with those in
`include/zephyr/arch/xtensa/arch_inlines.h`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-11-13 19:11:25 -08:00
Yong Cong Sin
408c151282 tests: arch: riscv: make sure that gp reg can't be corrupted
Add a test to make sure that the `gp` global pointer register used for
relative addressing when `CONFIG_RISCV_GP` is enabled can't be
corrupted by a rogue user thread.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-13 19:08:54 -08:00
Yong Cong Sin
e30db2d53f arch: riscv: reset global pointer on exception
Reset the gp on exception entry from u-mode to protect the kernel
against a possible rogue user thread.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-13 19:08:54 -08:00
Yong Cong Sin
de3a845612 arch: riscv: add macro to access hardware registers
Add macros to read / write hardware registers.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-13 19:08:54 -08:00
Jimmy Zheng
d267402404 tests: drivers: build_all: eeprom: fix label name conflict
Renamed the label of 'ti_tmp116_eeprom@0' node because 'eeprom' label name
already exists in some boards, such as adp_xc7k/ae350, bytesensi_l,
same54_xpro.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-11-13 19:08:41 -08:00
Mahesh Mahadevan
d9bfdaf996 bluetooth: kconfig: Remove deprecated config
Remove deprecated Kconfig BT_MESH_PROV_DEVICE

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-13 19:08:29 -08:00
Mahesh Mahadevan
7498329d59 random: remove deprecated rand32.h
Header file was kept for 2 releases, time to remove it.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-13 19:08:11 -08:00
Anas Nashif
9f5ef47184 ci: twister: also report filtered instances
For statistical purposes and to improve over all coverage, report
filtered suites so we can see trends in elasticsearch and act on them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-13 20:04:04 -05:00
Sylvio Alves
40cd35e56d west.yml: espressif: fix mcuboot assert in hal
Espressif contains mcuboot calls for loading image.
This fixes the way assert call is included in that scenario.

Fixes #81351

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-13 13:36:27 -06:00
David Brown
44e0edcf1b submanifests: optional: rust: Limit build targets
Brings in a change in the v4.0-branch branch to limit the targets that
rust tests are run on to those that have been tested.  This will avoid a
large number of failure in the nightly build on platforms that aren't
expected to work.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-11-13 13:36:17 -06:00
Daniel DeGrasse
dee76a7907 boards: nxp: mimxrt1170_evk: document flash support for EVKB
Flash support for RT1170 EVKB was fixed with cfb7322107 (drivers: flash:
flash_mcux_flexspi: add support for W25Q512NW-IQ/IN). Document this
support in the board page.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-13 13:36:00 -06:00
Pisit Sawangvonganan
1175f57640 doc: fix typo in multiple directories before v4.0.0 release
Utilize a code spell-checking tool to scan for and correct spelling errors
in various files within the `doc` directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-13 13:35:49 -06:00
Declan Snyder
1a5ae376a3 doc: release-notes-4.0: Add DT 4.0 notes
Add release notes for DT area for zephyr 4.0.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-13 09:15:49 -06:00
Akshay James
b93a51ae78 doc: fix typo in blackpill_f401cc docs
Fix the text and links where it mentions 'blackpill_f401ce' instead
of 'blackpill_f401cc'.

Signed-off-by: Akshay James <akshayjames95@gmail.com>
2024-11-13 09:15:00 -06:00
IBEN EL HADJ MESSAOUD Marwa
db6589f780 Revert "drivers: ethernet: eth_stm32_hal"
This reverts commit 0036b8bf21.

The reverted commit causes a compile error with the STM32F2 because
there are some variables used in the file eth_stm32_hal that are
not defined in the HAL module of the STM32F2 series,
such as 'ETH_RX_DESC_CNT' and 'HAL_ETH_MII_MODE'

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-11-13 09:13:23 -06:00
IBEN EL HADJ MESSAOUD Marwa
1721454266 Revert "drivers: ethernet: eth_stm32_hal_priv.h"
This reverts commit fbeda5959d.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-11-13 09:13:23 -06:00
Jamie McCrae
996b8a63e7 mgmt: mcumgr: Remove deprecated function smp_add_cmd_ret
Removes a function that was deprecated in Zephyr 3.4

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-13 09:08:18 -06:00
Jamie McCrae
55e7cc659c doc: Fix renamed ARM MPS* board targets
Fixes some board target names that have changed or were not
updated for hwmv2

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-13 09:08:09 -06:00
Declan Snyder
c1398250e9 drivers: nxp_enet: Check link state in iface init
Still mark the iface as down after ethernet_init, but then actually
check the link state and initialize carrier appropriately

This fixes the case where, the phy driver doesn't give a callback after
iface init due to the link already being up, there was no change from
the phy driver perspective, so callback  wouldn't happen, and therefore
the interface could remain marked as down after boot even if carrier is up.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-13 09:07:59 -06:00
Declan Snyder
0da16f7ec6 drivers: nxp_enet: put phy cb before iface init
This commit moves one function before another, to make the diff of the
next commit clearer of what it's doing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-13 09:07:59 -06:00
Anas Nashif
049b243b51 twister: stats: use anytree to create summary
Do not create the tree structure manually, use anytree instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
a43a67e3a3 twister: stats: fix suite statistics
suite stats were not correct, a mixup between skipped and filtered
suites was leading to inconsistent numbers. This is now fixed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
b578fa5b2a twister: stats: more renames skipped -> filtered
Additional variable renames leading to confusion between skipped and
filtered.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
d69d14aac6 twister: stats: skipped_configs -> filtered_configs
Rename variables leading to confusion between skipped and filtered
suites.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
61aefee3ad twister: stats: skipped testcases are part of selected group
Count skipped cases as part of selected group in stats.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
1647b46a07 twister: stats: remove double counting of statuses
We have been double counting some statuses, remove to get the stats
right.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
eddb0b77a3 twisters: tests: adapt twister testsuite
Adapt tests for new changes in twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
7e23b35c33 twister: stats: 'Executed test cases' -> 'Completed test cases'
Built tests are not executed, change column title.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
950dccc5bb twister: status inconsistencies are now warnings
Do not report status issues as errors, very confusing and developer end
up looking at the wrong thing, instead, treat those as warnings and
count them and report them at the end.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
5ad5b95fde twister: remove verbose debug message about adding platforms
This is very verbose and very long sometimes getting the way when trying
to debug a problem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
11447e4463 twister: stats: not run tests are also part not executed summary
Add notrun tests to the count of non-executed tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
64f950420a twister: do not report filtered cases in summary
It is confusing to report filtered testcases as  testcases that were
selected but not exexuted. If they are filtered, then there should not
be considered as selected.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
81af36202b twister: use consistent language for test configurations
In the summary, use "configurations" instead of instances.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Anas Nashif
c394a27d77 twister: count filtered testcases as such, not as skipped
When a suite is filtered, its testcases are also filtered and not
skipped.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 18:05:16 -06:00
Jeremy Bettis
b1f42f2e71 drivers: Fix uninitialized variable warning.
In GCC 14.2.0, the keyvariable in usb_dc_ep_write is detected to be used
before initialization, even though this usage should be safe.

Fix by initializing the key variable to 0, and making the 2 if
statements explicitly checking the same value.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2024-11-12 15:58:47 -06:00
Ioannis Damigos
135214d844 driver/dma_smartbond: Fix driver initialization when PM_DEVICE is set
Fix DMA driver initialization when PM_DEVICE is set.
Don't put PM policy state lock if it is not active.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-11-12 15:49:26 -06:00
Ioannis Karachalios
a66c070598 drivers: counter: Fix unbalanced policy state lock
This commit should deal with fixing unbalanced policy state locks.
When PM and PM_DEVICE are declared, default state, policy locks
should be given only when  active.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-11-12 15:48:20 -06:00
Ryan McClelland
88fb090b7f doc: release: add release notes for I3C for v4.0.0
add release notes for I3C for zephyr v4.0.0

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-12 13:21:35 -08:00
Aksel Skauge Mellbye
092fd18d5b doc: release-notes-4.0: Add Silabs notes
Add noteworthy additions for Silabs socs, boards and drivers.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-11-12 15:15:53 -06:00
Daniel DeGrasse
37c9cf22ce doc: release-notes-4.0: add release notes for SD subsystem
No significant changes have been made to the SD subsystem since 3.7. Add
a note documenting this for the 4.0 release.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-12 15:14:33 -06:00
Daniel DeGrasse
4606e1cfe5 doc: release-notes-4.0: add SDHC release notes
Add release notes for SD host controllers for 4.0

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-12 15:14:33 -06:00
Daniel DeGrasse
5ef6e46010 doc: release-notes-4.0: add release notes for disk
Add release notes for the disk driver subsystem

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-12 15:14:33 -06:00
Daniel DeGrasse
00f08ba004 doc: release-notes-4.0: add release notes for display
Add release notes for displays for 4.0 release

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-12 15:14:19 -06:00
Daniel DeGrasse
d9745bd36d doc: release-notes-4.0: add MIPI-DBI release notes
Add release notes for MIPI-DBI capturing significant changes since 3.7

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-12 15:14:07 -06:00
Josuah Demangeon
db4dc5b450 doc: releases: 4.0: Add LVGL capture sample to Video
The LVGL pull request was started before v3.7 release but merged
after, so needs to be included in v4.0 release notes. This was an
omission in commit 467f31190e.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-12 12:16:40 -06:00
Jordan Yates
35295f3663 zbus: observervation -> observation
Fix a typo in the doxygen and service documentation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-12 12:15:55 -06:00
Flavio Ceolin
81491df4ac doc: release/4.0: Crypto driver notes
Add information about TinyCrypt shim driver deprecation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-12 12:15:36 -06:00
Fabian Blatz
db9ba1865a doc: release: 4.0: Add lvgl notes
Add release notes section about lvgl and the added sample.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-11-12 12:15:24 -06:00
Maochen Wang
d9ef4b7e69 manifest: Update hal_nxp to fix psa_crypto_init failure
The MBEDTLS_PSA_ACCEL_xxx macro means it will not enable the SW/Builtin
implementation of the feature. The PSA_WANT_xxx macro means it will
enable the PSA-API usage of the feature, and can use SW or HW
acceleration. If enable the MBEDTLS_PSA_ACCEL_xxx macros, during
psa_crypto_init, mbedtls_psa_hash_setup will failed, as the macro
MBEDTLS_PSA_BUILTIN_ALG_SHA_512 is undefined. Remove the marco of
MBEDTLS_PSA_ACCEL_xxx can enable maco MBEDTLS_PSA_BUILTIN_ALG_xxx,
and fix the supp_psa_crypto_init fail and Wi-Fi connection failed issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-12 09:58:18 -06:00
Sylvio Alves
0cbb92c2c8 boards: heltec: fix kconfig cpu entry name
Minimum heap pool should be always set for the board
in order to enable internal drivers/subsystems to work.

It is currently not defined for APPCPU due to typo in
board's Kconfig, possibly causing build failures.

Fixes #81218

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-12 09:58:04 -06:00
Maureen Helm
27fca4d24f doc: release: Add ADI notes for v4.0.0
Adds release notes for new ADI drivers and notable changes introduced
since the last release.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-11-12 09:57:53 -06:00
Maureen Helm
782247bc6a doc: release: Add sensor notes for v4.0.0
Adds release notes for notable changes and new sensor drivers introduced
since the last release.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-11-12 09:57:53 -06:00
Jukka Rissanen
0ab7ecf038 doc: release-notes-4.0: Add notes for Wi-Fi
Added release notes for Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-12 09:57:41 -06:00
Declan Snyder
3b16920ada doc: release-notes-4.0: Add ethernet/mdio notes
Add release notes for ethernet and mdio drivers for 4.0

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-12 09:57:28 -06:00
Robert Middleton
05ad0ae8fd doc: develop: tools: Add STM32CubeIDE directions
Add directions on using STM32CubeIDE for developing Zephyr.

Signed-off-by: Robert Middleton <robert.middleton@rm5248.com>
2024-11-12 09:57:15 -06:00
Anas Nashif
79f742f252 doc: tests: remove page about deprecated ztest APIs
Remove leftover page about deprecated ztest APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-12 09:56:54 -06:00
Dat Nguyen Duy
65511eacf9 drivers: dma_mcux_edma: utilize correct macros for edma v3
Utilize correct macros for edma v3

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-11-11 17:53:07 -06:00
Duy Nguyen
7f4cab95b3 doc: release notes v4.0: Renesas RA addition
Update noteworthy support of Renesas RA driver for 4.0 release

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-11-11 17:52:57 -06:00
Flavio Ceolin
a19fb8e122 doc: security: Add CVE under embargo
Add an entry to CVE-2024-10395

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-11 17:52:48 -06:00
Flavio Ceolin
1aba3ce280 doc: release/4.0: Add CVE under embargo
Add information about CVE under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-11 17:52:48 -06:00
Dan Kalowsky
c50777a843 VERSION: bump for 4.0.0-rc3
Update the VERSION file to reflect the taggingg for v4.0.0-rc3 release

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
2024-11-09 04:26:19 -06:00
Pieter De Gendt
373ed89e4b doc: release: 4.0: Add nanopb 0.4.9 update
Add section for nanopb and upstream sync.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-08 22:31:17 -06:00
Pieter De Gendt
0775b507b5 submanifests: optional: Bump nanopb to 0.4.9
Sync upstream and get the latest tagged version 0.4.9.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-11-08 22:31:17 -06:00
Erwan Gouriou
8025c8473b doc: Migration guide v4.0: STM32 additions
STM32 noteworthy additions for 4.0 release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-08 22:29:51 -06:00
Erwan Gouriou
4e50521a22 doc: release notes v4.0: STM32 additions
Gathers STM32 noteworthy additions for 4.0 release.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-08 22:29:51 -06:00
Flavio Ceolin
429d2e79b1 docs: release/4.0: Info about TinyCrypt
Add an information about upcoming TinyCrypt deprecation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-08 22:29:08 -06:00
Flavio Ceolin
f81c20d088 Revert "tinycrypt: deprecate the library"
This reverts commit 5e225e0c8b.

Based on #79931 and TSC discussions, it was decided that TinyCrypt
will be deprecated *AFTER* 4.0.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-11-08 22:29:08 -06:00
Marek Matej
207da3ad15 doc: espressif: Add missing images
Update and add missing Espressif board images.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 22:28:30 -06:00
Ryan McClelland
c58c130b48 drivers: sensor: default_rtio_sensor: fix limited range warning
`chan_type` is defined as a `uint16_t`. This makes checking if it is
< 0 always false. A warning is shown with -Wtype-limits. Remove the
check as it is unnecessary.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-08 22:28:08 -06:00
Jukka Rissanen
04d8b7c595 net: sockets: Cleanup socket properly if POSIX API is enabled
The sock_obj_core_dealloc() was not called if close() is called
instead of zsock_close(). This happens if POSIX API is enabled.

Fix this by calling zvfs_close() from zsock_close() and then
pass the socket number to zsock_close_ctx() so that the cleanup
can be done properly.

Reported-by: Andreas Ålgård <aal@ixys.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-08 15:56:39 -06:00
Declan Snyder
92d0287813 drivers: spi_mcux_lpspi: Fix DMA path on RT
Apparently, the previous change to fix the chip select only works on
some newer revisions of the LPSPI, and the behavior is different on
older parts like RT. For now put some #ifdef to keep the fixed CS on
MCXN but have the old behavior on RT and other platforms.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-08 15:56:06 -06:00
Bernardo Perez Priego
b6b8eeedf0 serial: mchp_xec: Fix uart_xec_irq_tx_complete function
This function is only checking for current byte being transmitted.
This patch ensures that function returns `1` until TX is disabled and
no byte is being transmitted.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2024-11-08 15:55:52 -06:00
Dong Wang
431c34039a tests: debug/coredump: Change to call k_panic() for ISH SoCs
ISH SoCs have zero-address memory mapped to I2C0 controller.
Coredump cannot be triggered by zero-address access.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-11-08 15:55:36 -06:00
Peter Mitsis
aeaddd70b7 tests: Fix IRQ locking in sched benchmark
Corrects an issue that was introduced when the interrupt
locking/unlocking was added to the 'sched' benchmark by
unlocking the interrupts before the context switch done by
k_yield(), but after the call to z_unpend_first_thread().

Fixes PR #81050

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-08 15:55:23 -06:00
Simon Maurer
18818c15cd openamp: resource table: fixes resource table for ram_console section
in commit 1cd37f21f3 the global ram console buffer was replaced
with a pointer. This didn't work with the OpenAMP resource table
anymore (#75656).

Signed-off-by: Simon Maurer <mail@maurer.systems>
2024-11-08 15:55:11 -06:00
Karun Kumar Eagalapati
02c8a5a80c manifest: Update hal_nordic
Updated manifest to include fix for incorrect display of scan
results when APs have EAP and PMF enabled.

Fixes #80995

Signed-off-by: Karun Kumar Eagalapati <karun.kumar@nordicsemi.no>
2024-11-08 15:54:59 -06:00
Hongquan Li
c5fa9af235 drivers/wifi/nrfwifi: Add buffer for discard bytes
Some spi drivers do not allow the send buffer
and receive buffer to be empty at the same time,
if this happens it will cause the spi to be unable
to communicate with the nrf7002, so add the receive
buffer for the discard byte in the spim_xfer_rx.

Fix #80686

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-11-08 14:01:23 -06:00
Andrew Feldhaus
a2e920cf96 drivers: rtc: rtc_ds1307: Fix corruption of SECONDS register
We read/modify/write the CH/SECONDS register at initialisation to clear
only the Clock Halt bit and only if it is set.

The previous implementation zeroes the entire register unconditionally at
initialisation, which wipes the SECONDS fields.

Fixes #77354.

Signed-off-by: Andrew Feldhaus <github@feldhaus.co.uk>
2024-11-08 13:58:10 -06:00
Franciszek Pindel
9c94ee5346 include/zephyr: Use ROMABLE_REGION for LMA in .last_ram_section
Currently RAMABLE_REGION is used for both virtual address (VMA)
and a load address (LMA). It results in wrong LMA for some platforms.
This commits adds using ROMABLE_REGION for LMA.

Signed-off-by: Franciszek Pindel <fpindel@antmicro.com>
2024-11-08 13:57:42 -06:00
Raymond Lei
a6466249a9 drivers: dma: edma: Put the TCD pool in DTCM by default
To reduce the latency of CPU accessing/modifying SW TCD content, it
better to put TCD pool to DTCM by default.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-08 13:57:29 -06:00
Raymond Lei
209cb8157a drivers: serial: lpuart: Enable SG mode of LPUART
New implemented eDMA loop SG mode can be used to lpuart driver to fix
the conflict of "Done" bit issue which cause uart_async_api test failed
when SG mode is enabled.

Also, this loop SG mode works well even with a high bandrate(test done
on 2000000bps).
Fixes: #78291

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-08 13:57:29 -06:00
Raymond Lei
7145295a4a Drivers: driver: i2s: Use eDMA loop SG mode
I2S speed test failed because of "Invalid destination address" issue By use
eDMA loop SG mode, this issue is fixed.

Fixes: #70777

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-08 13:57:29 -06:00
Raymond Lei
dfb1652dec drivers: dma: edma: eDMA loop SG mode support
Existing dynamic SG mode have some issues which cause uart sync api and
I2S speed test failed.

These issues are: a wrong "Done" bit issue found on UART async api
test. An invalid destination address issue found on I2S speed
test. By introducing loop SG mode, these issues are all fixed.

Some data structures are different between eDMA and eDMA V4, use
different macros defined in SDK driver for each of them.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-08 13:57:29 -06:00
Raymond Lei
fddc009f58 drivers: dma: edma: Pending length calculation incorrect
Pending length should be mainloop count multiply NBYTES of minor loops.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-08 13:57:29 -06:00
Simon Moser
a77d499e2d doc: fix body length in SMP UART transport
In the description of the partial-final frame of the SMP UART transport
specification was a typo in the maximum allowed raw body size. The size
must not be larger than MTU - 5 because there are 5 bytes occupied by
total length (2), frame termination (1) and crc (2).

Signed-off-by: Simon Moser <simon.github@mailbox.org>
2024-11-08 13:57:18 -06:00
Zak Portnoy
32b1140066 mgmt: smp: shell: Respond on uart shell device when changed at runtime
Responses are currently set to the shell device that was configured
in the device tree.

The shell_uart driver allows for changing it's device during runtime
which leads to a situation where we recieve packets on one device
and respond on another.

This patch causes smp_shell_tx_raw to use the shell_uart device

Signed-off-by: Zak Portnoy <zakportnoy@gmail.com>
2024-11-08 13:57:09 -06:00
Luca Burelli
50ab6953c2 linker: llext: avoid modifying current address in linker script snippet
The linker script snippet that places the llext_no_syscall_impl section
has the unfortunate side effect of overwriting the current linker
address. This can lead to unexpected behavior of the caller script.

Saving the current address before defining the section and restoring it
afterwards avoids this issue.

Fixes #81136.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-08 13:56:57 -06:00
Robert Lubos
ebac6f2f21 doc: release-notes: Add 4.0.0 release notes for networking
Add 4.0.0 release notes for networking.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-08 13:56:46 -06:00
Ioannis Karachalios
7c5c459440 drivers: memc: Fix various APS6404 device issues
This commit deals with fixing various issues that prevents
the device from being built. In specific:

1. Fix default timing macro definitions to build with
an MSPI controller, other than AMBIG.
Add macro definition for MSPI_PORT.
2. Timing settings should be applied only when MSPI_TIMING
is defined. Otherwise, the APS6404 initialization routine
will fail with -EIO.
3. Similarly, use MSPI_XIP and MSPI_SCRAMBLE to apply XIP
and SCRAMBLE device settings, respectively (optimization).
4. MEMC_INIT_PRIORITY is assigned higher priority than
MSPI_INIT_PRIORITY which results in compiler error as
APS6404 device initialization depends on its underlying
MSPI bus controller.
5. The 'acquire' subroutine should be compiled when PM_DEVICE
is used (suppress compiler warning).

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-11-08 13:56:31 -06:00
Benjamin Cabé
dc2c13bebd doc: ci: Build documentation on board documentation changes
Adds glob expression triggering CI for *all* changes in boards'
documentation, not just those matching the "*.rst" pattern since there
can also be images being changed without any other change on RST files.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-08 11:40:58 -06:00
Francois Ramu
c7cbe91760 drivers: i2c: stm32 I2C V2 handles i2c_target processed_cb return code
Check the return code of the i2c_target_read/write callback function
is 0 before continuing the transmit/receive operation on I2C target
When Transmitting: 0 if data has been provided, then continue
When address matches: 0 if the write is accepted or
if more data can be requested depending on the transfer direction.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-08 11:38:02 -06:00
Jukka Rissanen
fe56ce5a1c net: ipv6: fragmentation: Drop the packet if fragmentation fails
If we could not fragment the IPv6 packet, then drop it and do
not try to send it. Let the upper layer re-send the packet if
needed. It is causing more trouble if we try to send the packet
and not honor the MTU setting.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-08 11:37:49 -06:00
Jukka Rissanen
414316379a net: ipv4: fragmentation: Drop the packet if fragmentation fails
If we could not fragment the IPv4 packet, then drop it and do
not try to send it. Let the upper layer re-send the packet if
needed. It is causing more trouble if we try to send the packet
and not honor the MTU setting.

Fixes #81021

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-08 11:37:49 -06:00
Chaitanya Tata
9561a0ac76 drivers: nrfwifi: Fix recovery for SAP
nRF70 recovery relies on power-management feature which isn't applicable
for SAP, so, we keep seeing false recovery causing interface restart.

Disabled recovery for SAP to fix the issue.

Fixes #81130.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-08 11:37:31 -06:00
Maochen Wang
f1572b988b manifest: Update hostap to fix ECSA issue
Update hostap to fix ECSA issue that warning log and
current_mode is not updated.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-08 11:37:18 -06:00
Marcus Penate
72534b83e4 net: lib: sntp_simple: Handle responses from previous iterations
SNTP simple runs request iterations with exponential backoff.
If the net interface is a slower connection (ie. CAT M1 modems)
then the request will be sent but the response may take time to
be received, thus causing a timeout and another request to be sent.
Because of the nature of UDP and the fact that the same socket
(source IP/port combo) is being used for both requests, a delayed
response to the first request can be received as the response to the
second request, causing -EINVAL to be returned when the timestamps
mismatch (see subsys/net/lib/sntp/sntp.c). The solution provided
retries receiving the response when the timestamp is mismatched
(without sending an additional request).

Signed-off-by: Marcus Penate <marcus.penate@ellenbytech.com>
2024-11-08 11:37:02 -06:00
Emil Gydesen
4d8acdf9ed doc: Fix VMWare type in autopots-linux
It is called VMWare and not WMWare.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-08 11:36:41 -06:00
Emil Gydesen
58c3940a6b doc: autopts-linux: Add troubleshooting for window opening and closing
Refactored the structure of the troubleshooting section so it
is more similar to how e.g. the ArchWiki lists troubleshooting
entries, which makes it easier to search for and separate
each entry.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-08 11:36:41 -06:00
Emil Gydesen
e89a5d10ef doc: Update Virtualbox steps for autopts-linux
The exisitng documentation was out of date and
possibly not working.

Added a section on how to use NAT and port forwarding.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-08 11:36:41 -06:00
Emil Gydesen
397b5cbcd9 doc: Use correct RST headings in autopts-linux.rst
The documentation guidelines have a specified order of
header underlines that this file did not follow.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-08 11:36:41 -06:00
Raffael Rostagno
38a70cc1fd tests: drivers: spi: esp32c6: Fix overlay configuration for loopback
Fixes overlay configuration to allow running the test on CI without
externally connecting two pins.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-08 11:36:21 -06:00
Raffael Rostagno
c4b7903828 pinctrl: esp32c6: Fix for input/output enable flags
Fix missing input/output enable flags on pinctrl macro, which
wouldn't allow for driver to see and apply flags configuration
made in the device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-08 11:36:21 -06:00
Marek Matej
a8ab8b49f2 samples: drivers: IPM fixes
Updates and fixes to support IPM sample on ESP32:

- fix IPM sample code for APPCPU and PROCPU
- align with memory layout, add flash awarenes
- shell commands to stop/start APPCPU
- reorganize overlays

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Marek Matej
ed1179713c soc: esp32s3: AMP support
Updates and fixes to support APPCPU.
- fix ld scripts
- fix and update memory layout
- fix build issues
- fix sysbuild

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Marek Matej
82eb8a1fb6 drivers: clock_control: amp clock fix
Avoid APPCPU to interact with a clock settings.
Fix warning when LOG_LEVEL_DBG.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Marek Matej
93121879cf boards: esp32s3: AMP support and fixes
Fix missing flash and code partition.
Add missing dts entries and use common partition tables to all related
non-Espressif boards, previously ommited.
Add uart1 node in pinctrl for APPCPU.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Marek Matej
f3e70fdd75 dts: esp32s3: shm nodes update
Align the shared memories with the memory.h layout.
Reorder nodes to show memory related nodes together.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Marek Matej
1cf44557c5 manifest: update hal_espressif
Fetch latest features to support fixes.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-11-08 11:36:09 -06:00
Daniel DeGrasse
fc3ebac704 samples: drivers: display: make platform names fully qualified
Twister's extra arguments feature only works correctly if the fully
qualified platform name is given, which was not the case. Make all
platform names for the shield testcase fully qualified to resolve this.

Fixes #80876

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-08 11:35:58 -06:00
Daniel DeGrasse
d565f6e62a samples: drivers: display: remove lpc54114 from shield test
LPC54114 does not define arduino_header nodelabel, so it cannot be
supported by the shield test within the display sample. Replace with
mimxrt1010_evk, which is supported.

Fixes #80876

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-08 11:35:58 -06:00
Håvard Reierstad
42ae483795 Bluetooth: Host: Ensure only connected peers affect _bt_gatt_ccc.value
The doc on `_bt_gatt_ccc.value` specifies that only connected peers
contribute to that value. But before this change, it was computed from
all entries in `_bt_gatt_ccc.cfg`, which include bonded but not
connected peers when `CONFIG_BT_SETTINGS_CCC_LAZY_LOADING` is set.

Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-08 11:35:42 -06:00
Dmitrii Golovanov
d7fe3d1a75 tests: crypto: tinycrypt: Fix premature Ztest end
Don't use TC_END_RESULT() to report Ztest's result prematurely.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-08 11:35:22 -06:00
Declan Snyder
e8cf9601c1 drivers: flash: mcx: Clear cache after erase
Cache needs to be cleared after erase in order to read back erased
values correctly.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-08 09:29:11 -06:00
Dmitrii Golovanov
e3ec702196 tests: drivers: ipm: Fix drivers.ipc.mailbox
Fix 'drivers.ipc.mailbox' test suite to restore and improve
its testing functionality:

 * fix printf() redirection through IPM console.

 * fix and check the dummy driver initialization.

 * specify correct Twister harness type (Console)
   and use matching patterns to recognize the expected
   console output.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-08 09:28:50 -06:00
Thomas Stranger
3ca53ac518 doc: release notes: add 1-wire release notes for 4.0
Add 1-Wire related release notes for Zephyr v4.0.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-11-08 09:27:37 -06:00
Emilio Benavente
c06ecf9a50 soc: nxp: mcxw: Update IRQ Size for MCXW to remove reserved IRQ
The FRDM_MCXW71 Platform has a reserved IRQ as its
last IRQ, this test was using this IRQ to
test an interrupt and would not fire. This change
ensures the test does not use the reserved IRQ.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-11-08 09:26:43 -06:00
Mahesh Mahadevan
9861a6a7c1 drivers: flexspi_nor: Fix Flash failures seen on FRDM-MCXN947
The flash_flexspi_nor_check_jedec() checks the lower 16-bits of
the manufacturer ID and installs a custom LUT table.
Add an exception to check for the whole 32-bits so we do not
accidentally install custom LUT for flash devices that do not
support this LUT table.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-11-08 09:26:24 -06:00
Daniel Leung
a8c3025de2 MAINTAINERS: remove duplicate soc/cdns/dc233c
This removes the duplicate soc/cdns/dc233c paths from the Xtensa
arch.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-08 09:26:08 -06:00
Daniel DeGrasse
2ad01d966b modules: hal: nxp: update to include fix for CACHE64_GetInstanceByAddr()
CACHE64_GetInstanceByAddr() function was asserting when an instance was
requested for an invalid address that the CACHE64 controller does not
manage. This behavior is not correct, as the CACHE64 management
functions check to see if the instance number returned by this function
is out of range (and if so, simply return without modifying the cache).

This assertion was causing a failure within the USDHC driver, which
performs a cache clean/invalidate for tx/rx transfers within the HAL
layer. When a transfer was run using a data buffer not in the CACHE64
address range, this assertion failed and caused the application to crash

Fixes #80901

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-08 09:25:55 -06:00
James Roy
e7c34367cf doc: build: dts: Fix incorrect rst tag
Replaced incorrect ':c:func:' tag for devicetree macro
with ':c:macro' tag.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-08 09:25:41 -06:00
Vinayak Kariappa Chettimada
525ba389bc tests: Bluetooth: tester: Workaround Bus Fault in nRF53x using full RAM
Workaround failing autopts weekly run due to tester
application having Bus Fault in the nRF53 NET core hci_ipc
firmware at startup.

Having atleast 32 bytes free in nRF53x hci_ipc sample to
avoid Bus Fault when Zephyr Kernel does SYSINIT calls.

Reduce supported ISO Broadcaster instance and ISO TX buffer
counts in the Controller hci_ipc firmware.

Add sysbuild support for tester application so that the
build is CI verified.

sysbuild commandline for LE audio PTS testing:

  # west build --sysbuild -b nrf5340_audio_dk/nrf5340/cpuapp
    -d build/tester tests/bluetooth/tester
    -DEXTRA_CONF_FILE="overlay-le-audio.conf"

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-08 09:25:28 -06:00
Emilio Benavente
3018ff7a4d dts: arm: nxp: Updating the ram size for the MCXW71
Updating the SRAM space for the MCXW71 SOC.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-11-08 09:25:04 -06:00
Emilio Benavente
5c9d6f1dba tests: lib: cmsis_dsp: transform: Update Ram Size
Updating the minimum Ram Size for failing tests
that require more ram memory for heap allocations.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-11-08 09:25:04 -06:00
Erwan Gouriou
b2c9db7606 boards: st: stm32l5: Fix TF-M by restricting Libc malloc aera
By default, libc malloc allocated area is using all available RAM.
For some yet unknown reason, this conflicts with TF-M resulting in a
Hard Fault before jumping in the non secure application.

For now, define a Libc malloc area defined to 2048 which is the default in
some other typical applications (ARMv7 targets enabling USERSPACE).

Fixes #77847

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-11-08 09:24:55 -06:00
Emil Gydesen
7c40b071e4 Bluetooth: CSIP: Fix off-by-one in in lock restore
If the lock request was rejected by a set member we should
restore any previously written logs in reverse order.

However there was a off-by-one error in
csip_set_coordinator_write_lock_cb which caused us to attempt to
release member[1] instead of member[0] if member[1] was the
one that rejected the lock request.

Additionally, the lock_set_complete would be called
prematurely before we get the response from the restore
request.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-08 09:24:43 -06:00
Anas Nashif
5776436136 tests: shell: limit build only config tests
Limit build_only config tests to one platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-08 09:24:31 -06:00
Hui Bai
67980643d7 net: wifi: Fix 11k command errors
Add condition check so that the 11k flag will be updated for set
operation only.
Fix print log error when getting 11k status.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-11-07 18:42:15 -08:00
Peter Mitsis
41064c8e1d tests: Add objcore to latency_measure testcase.yaml
Adds the object core configuration to the latency_measure benchmark's
testcase.yaml file as there have been requests for it.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-11-07 18:42:03 -08:00
Chaitanya Tata
fd7fc17810 net: wifi: Fix strings for missing enumerations
Enumerations were extended but respective strings were not added.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-07 18:41:53 -08:00
Chris Desjardins
862af5e903 fs: Fix null pointer exception caused by async fs_unmount
The mp pointer is in fs_file_t and fs_dir_t so if the fs pointer is made
NULL then subsequent file I/O operations will cause a NULL pointer
exception. Removing the mount point from the list is threadsafe and
should be sufficient.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-11-07 18:06:58 -06:00
Francois Ramu
f781d7a26f soc: st: stm32U5/L5 series also have SWO line
Add the SWO trace output to the stm32H5/H7RS/L5/U5/WB series

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-07 18:05:07 -06:00
Daniel DeGrasse
e516a2219b boards: shields: rk055hdmipi4ma0: increase DSI clock for RT1160
Increase target DSI clock frequency for the RT1160, as the DSI
peripheral requires a faster clock to account for the DSI packets that
must be sent outside of video mode frames.

This fix was previously applied for the RT1170, but is also needed for
the RT1160 SOC as they use the same DSI IP.

Fixes #78299

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-07 18:04:53 -06:00
Chaitanya Tata
073f68d248 drivers: nrfwifi: WAR for performance regression
With the newly introduced settling time for PLLS, we are seeing a peak
performance drop of 3Mbps in Zperf benchmarks, and also other
performance tests are also impacted.

This settling time was introduced based on observations in lab and not
because of any real problem or bug reported, so, for now, use zero
settling time (same as earlier) till we fully investigate and understand
the impacts and need.

Fixes #80951.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-07 18:04:44 -06:00
Emil Gydesen
6c79fdf2ca Bluetooth: BAP: Fix bad state check for broadcast sink
The state check used != instead of == to very that it entered
the streaming state for all streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-07 18:04:34 -06:00
Declan Snyder
6984fd87a3 drivers: eth_nxp_enet: use net_if_carrier_off init
Use net_if_carrier_off during iface init instead of net_eth_carrier_off,
to immediately mark net if as down

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-07 18:04:18 -06:00
Declan Snyder
39f32eac37 doc: twister: Clarify that the minimums are rough
There is no way to know for sure the size of an image built for a test,
given that zephyr can build for so many different architectures,
platforms, software supports, etc. So it should be clear that the filter
for min_ram and min_flash on the twister testcases is an estimate, and
not a strictly well known value.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-07 18:04:08 -06:00
Grixa Yrev
91a59e7e15 soc: nxp: imxrt: exclude mpu_regions.c when ARM_MPU disabled
When option ARM_MPU is disabled exclude soc\nxp\imxrt\mpu_regions.c.
It is needed to remove constraints of SRAM and FLASH size.
Fixes #70920

Signed-off-by: Grixa Yrev <GrixaYrev@yandex.ru>
2024-11-07 11:07:04 -08:00
Jordan Yates
60442a221a modules: segger: remove mutex locking
Remove mutex locking in favour of the standard IRQ locking mechanism.
The primary problem with the mutex implementation is that mutex locking
is forbidden in ISR's. This means that any logging from an interrupt
context (e.g. LOG_PANIC in an exception handler), will itself trigger
another assertion due its attempt to use a mutex.

Furthermore, mutexes are a relatively heavyweight locking scheme, which
doesn't necessarily make sense in the context of extremely short locking
periods that would be expected from RTT.

This change aligns Zephyr with the default RTT locking scheme, which
uses interrupt masking to perform access control.

Resolves #79403.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-11-07 11:06:45 -08:00
Robin Kastberg
580e93e9b4 arm: tests: kernel: fix bug in fatal_exception test
In ARM architectures the entry_cpu_exception_extend calls
svc #0 when trying to generate a `K_ERR_CPU_EXCEPTION`, however
z_arm_svc calls z_do_oops with a stack frame only, and gets the
reason from `r0`. This means that the test working was just lucky
and running it with another compiler (or setting the value of r0
before the svc #0 call, made the test fail).

Cortex-A/R 32-bit architectures was doing a BKPT, this works better
but will not be a hard exception when debugger is attached.

I switched all the Cortex 32-bits to the ARM specified undefined
instruction.

Also RISC-V has a designated unimp instruction that should be used to
guarantee trap.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-07 11:06:34 -08:00
Daniel Leung
eb9fc642b9 xtensa: remove mem_domain excess padding
The ptables field in arch_mem_domain for Xtensa has excessive
padding as it is incorrectly marked with needing page size
alignment. This is simply a pointer and not the actual page
table so there is no need for that alignment. So remove it.

Fixes #71896

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-07 11:06:23 -08:00
Daniel Leung
0e9376ebff tests: thread_error_case: no ICOUNT for qemu/xtensa/dc233c/mmu
For some weird reasons, enabling ICOUNT would result in some
tests crashing QEMU. So disable ICOUNT.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-07 11:06:23 -08:00
Anas Nashif
ac162b041a intel_adsp: set exec for simulator targets
Set exec in combination with custom simulator to all for correct
test/envionment evaluation.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-07 11:06:10 -08:00
Anas Nashif
52f9a129b5 twister: custom simulator needs an exec defined
custom simulator needs an executable defined, or else we will have tests
marked runnable with nothing to run them which would result in an
error/warning.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-07 11:06:10 -08:00
Nicolas Pitre
8232440bb1 doc: release: 4.0: mention LLEXT for ARM64
Mention LLEXT for ARM64.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-11-07 09:08:02 -08:00
Chaitanya Tata
4ae6520c3a drivers: nrfwifi: Fix passing of RAW scan results flag
The CONFIG_ prefix should be removed when passing to OSAL code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-07 09:00:35 -08:00
Jun Lin
69e85b25fe board: npcx: remove CONFIG_PINCTRL from defconfig of npcx boards
The CONFIG_PINCTRL is removed from the board's defconfig files.
Drivers which use pin control function should add "select PINCTRL"
in their Kconfig files.

Fixes #78619

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-11-07 08:59:14 -08:00
Gerard Marull-Paretas
faf075a9d4 soc: nrf54h: gpd: use callback to fetch nrfs async result
Busy-waiting for the result of the nrfs service calls can stall, so
let's use a callback that flags a semaphore instead. Since the API is
supposed to be callable in the context of pre-kernel, fallback to
busy-wait on that scenario.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-07 08:57:45 -08:00
Gerard Marull-Paretas
d22c209c4b doc: release-notes-4.0: add device changes
Not much happening here, just some LLEXT related changes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-07 08:57:34 -08:00
Gerard Marull-Paretas
654303cd73 doc: release-notes-4.0: add relevant pinctrl changes
Add relevant changes for the pinctrl area.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-07 08:57:34 -08:00
Gerard Marull-Paretas
e5602f859e doc: release-notes-4.0: add relevant regulator changes
Add notable changes to the regulator drivers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-07 08:57:34 -08:00
Nicolas Pitre
6b0e259d27 doc: release/4.0: more bits about demand paging
Mention SMP and demand mapping.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-11-07 08:57:20 -08:00
Fabio Baltieri
2a250af793 doc: release: 4.0: add Input release notes
Add Input subsystem release notes.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-07 08:57:04 -08:00
Johan Lafon
2b5ee0ca91 drivers: display: ssd1322: fix only part of the image being diplayed
Only the first chunk of the desired image is displayed repeatedly over
the screen height (at least on an NHD-2.7-12864WDW3 display). Fix it
by computing the internal mono01 to 4bit grayscale conversion buffer
size correctly so it can fit the entire image.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2024-11-07 08:35:02 -06:00
Johan Lafon
a140dd3de9 drivers: display: ssd1322: fix low and uneven pixel brightness
In case more than one segment per pixel is required, only part of the
segments were written resulting in low and uneven pixel brightness (at
least on NHD-2.7-12864WDW3). Fix it by writing all required segments.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2024-11-07 08:35:02 -06:00
Johan Lafon
b92bd6d345 drivers: display: ssd1322: fix never returning call to display_write
A call to the write API function was never returning as we were trapped
into an infinite loop. This was caused by the pixel_count pointer not
being incremented properly.

Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
2024-11-07 08:35:02 -06:00
Arif Balik
10fa1eab50 drivers: clock: fix STM32_PERIPH_BUS_MIN for STM32U0
`STM32_PERIPH_BUS_MIN` is not the minimum bus address in `stm32u0_clock.h`

Signed-off-by: Arif Balik <arifbalik@outlook.com>
2024-11-07 08:34:34 -06:00
Maximilian Deubel
4f85ce6eda dp: swdp_bitbang: fix missing reset pin error
This patch fixes an issue where the reset pin is used even when it's
not given.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-11-07 08:33:18 -06:00
Emil Gydesen
4331b5fe77 tests: Bluetooth: PBP: Fix adv data for PBP BSIM test
The test had a few off-by-ones in the code, which caused access
to invalid data.

Fixed by setting the right buffer sizes and the right AD length
fields.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-07 08:33:03 -06:00
Raymond Lei
2696220bee soc: nxp: imxrt11xx: Typo in clock initialization of usb2
a typo in usb2 clock initialization which impact the function of usb2.
fixes: #81027

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2024-11-07 08:32:51 -06:00
Benedikt Schmidt
035b139f64 drivers: fpga: add checks for optional properties of iCE40
Add checks in the GPIO bitbang mode to avoid a fault for missing
configuration in the devicetree.
Fixes #80850

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-07 08:32:42 -06:00
Benjamin Cabé
c6cc7a17e5 samples: drivers: video: fix shield name
The capture to LVGL sample is using an incorrect name for the
weact_ov2640_cam_module shield

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-07 08:32:33 -06:00
Luca Burelli
33def3036a drivers/flash/soc_flash_mcux: adjust alignment logic
The current alignment logic does not work as expected if given unaligned
values, resulting in a skip of the first word. The length also has to
take into account the starting address: for example, asking for 2 bytes
at offset 3 should actually check 8 bytes.

This patch adjusts the logic so that it always includes the first and
the last word of the input area.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-07 08:32:14 -06:00
Luca Burelli
20cd3a3f09 drivers/flash/mcux: fix flash_read() operation on LPC55S36
As other targets in the LPC55xxx series, the LPC55S36 has a Flash
controller that raises ECC errors when reading erased pages directly.
To avoid this, there is special code for this platform that calls the
HAL FLASH_IsFlashAreaReadable() function. However, this in turn calls a
function at an hardcoded address in ROM that _always_ causes an
instruction fault, making the situation worse.

This patch reworks the read operation to use the FLASH_Read() HAL
function for this target to gracefully handle error conditions and
properly emulate accesses to erased pages. The preprocessor is required
since some targets do not define the FLASH_Read() function.

Fixes: #80325

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-07 08:32:14 -06:00
Andries Kruithof
5a03d3f51c Bluetooth: Audio: Fix description for broadcast_code callback
Small mismatch between the actual procedure name and the name as
described in the doxygen documentation for the bap set broadcast
code procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-07 08:32:04 -06:00
Henrik Skreslet
e254a7f3c8 modem: cmux: added validation of cmux frame length
Validates cmux frame length and drops it if its larger
than the receive buffer

Signed-off-by: Henrik Skreslet <henrik.skreslet@gmail.com>
2024-11-07 08:31:48 -06:00
Gaofeng Zhang
c3466b14d0 manifest: Update hal_nxp to fix hang when board reset
Update hal_nxp to fix hang when board reset

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-11-06 18:57:47 -08:00
Fabio Baltieri
5155c0e820 doc: release: add a step to verify that the tag is signed
Add an extra "git show" step to the release process to verify that the
key has been indeed signed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-06 18:52:51 -08:00
Riadh Ghaddab
f556826c83 doc: release: 4.0: add notes on ZMS
Add notes about the new storage system ZMS

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-11-06 18:52:39 -08:00
Benjamin Cabé
4300a4c33b doc: boards: esp32: fix XIAO-ESP32S3 build instructions
fix wrong board target in build command snippets

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 16:41:21 -06:00
Sylvio Alves
85f9940e14 doc: release: 4.0: Add Espressif changes.
Adds notes on Espressif changes to this release.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Sylvio Alves
07fd5600a9 kconfig: fix typo and help description.
Fix typo and re-phrase help description to improve it.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Sylvio Alves
41b3cd77df docs: boards: xiao_esp32s3: migrate board name to new directive
Update board name to meet zephyr:board model.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-06 16:40:30 -06:00
Josuah Demangeon
467f31190e doc: release: 4.0: Add video driver and video API updates
Add entries for video driver contributed or enhanced.
Add entries for video APIs introduced or modified.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-11-06 16:40:13 -06:00
Daniel Leung
d4b1302387 doc: release/4.0: add bits about serial
This adds some bits about serial/UART in the migration
and release notes for 4.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-06 16:39:55 -06:00
Daniel Leung
6fb8157ee4 doc: release/4.0: add bits about demand paging
This adds some bits about demand paging in release note
for 4.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-06 16:39:55 -06:00
Sumit Batra
e0d1e5973d mdio: fmurt6: dts: Enable the parent node of mdio
mdio_enet_nxp driver accesses the registers of its parent node Ethernet MAC
This commit enables this node in mimxrt1062_fmurt6 board's device tree.
This also fixes Issue #80881

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-11-06 16:39:32 -06:00
Grzegorz Swiderski
8fc161f820 west: runners: nrf: Check for missing UICR
On nRF54H and nRF92, booting certain cores requires programming a UICR,
which is normally generated using nrf-regtool. This should be considered
an optional dependency, because we do not wish to force non-Nordic users
to install it just to work with Zephyr, or just for build-only tests.

When nrf-regtool is not installed, a CMake warning will be displayed,
but people ignore warnings all the time. As the last line of defense,
check for missing UICR in the nrfutil flash runner, to prevent our users
from unintentionally programming unbootable firmware. Show a fatal error
specifically if CONFIG_NRF_REGTOOL_GENERATE_UICR=y, yet no UICR exists.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-06 16:39:09 -06:00
Benjamin Cabé
ce02d0c0fc doc: releases: Complete documentation release notes for 4.0
This completes the existing "Documentation" section of the release notes
for 4.0 by documenting the various changes/improvements implemented
during the last development cycle.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 16:38:49 -06:00
Szymon Janc
2f6a65c8a4 test: bluetooth: Update ICS to TCRL 2024-2
GAP PAST (and BAP) tests were also enabled since controller support is
under review.

This also adds bqw file which is exported draft project from
Qualification Workspace.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-11-06 17:38:36 -05:00
Anas Nashif
8a824f307d mips: tracing: add switched_out trace point
add missing switched_out trace point.

Partially fixes #76057

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-06 14:43:27 -06:00
Christophe Dufaza
b0b278503f Revert "edtlib: fix "last modified" semantic for included ... specs"
[1] was introduced to get more valuable answers from
the PropertySpec.path API, which is supposed to tell
in which file the property's specification was "last modfied".

Further work on related issues [2] showed that the
approach chosen in [1] is dead end: we need to first rethink
how bindings (and especially child-bindings) are initialized.

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit b3b5ad8156.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza
c58d6761bc edtlib: tests: cover basics of filtering inherited properties
Use-case "B includes I includes X":
- X is a base binding file, specifying common properties
- I is an intermediary binding file, which includes X
  without modification nor filter
- B includes I, filtering the properties it chooses
  to inherit with an allowlist or a blocklist

Check that the properties inherited from X via I
are actually filtered as B intends to,
up to the grandchild-binding level.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza
0b946dfc01 Revert "edtlib: test "last modified" semantic for ... specs"
This unit test was added to cover the change introduced by [1].

Further work on related issues [2] showed that the chosen approach
is dead end.
We're reverting all changes made in [1].

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit 70eaa61cb0.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Christophe Dufaza
308b568219 Revert "edtlib: test filters set by including bindings"
This unit test was added specifically to cover a regression
reported by the CI while working on [1].

Further work on related issues [2] showed that:
- [1] and [2] are dead end: we need to first rethink
  how bindings (and especially child-bindings) are initialized
- the inclusion mechanism supported by Zephyr deserves more systematic
  testing in edtlib if we want to work with confidence

The approach we choose is to:
- revert all changes made in [1]
- from there, systematically add unit tests as we address
  the issues we identified (or the additional features we need)
  one after the other

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit 33bb3b60d9.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-11-06 14:43:19 -06:00
Daniel Kampert
ec10d56fbb drivers: rtc: rv8263-c8: Alarm reworking
- Fix typos for alarm field identification
- Fix a bug where an alarm interrupt starts
update interrupts
- Rework interrupt code to reduce code size
and complexity

Signed-off-by: Daniel Kampert <danielkampert@kampis-elektroecke.de>
2024-11-06 14:43:10 -06:00
Xiaoli Ji
e20c095eee soc: nxp: imxrt118x: update MPU configuration
fixes: #80721
Updated mpu region address to secure address.

Signed-off-by: Xiaoli Ji <xiaoli.ji@nxp.com>
2024-11-06 14:43:00 -06:00
Emil Gydesen
1f1e4afa4f Bluetooth: CSIP: Handle disconnects while in procedure
If a device disconnects while we are in a procedure then
get_next_active_instance would return a service instance pointer
with the `conn` set to NULL.

The issue was caused by the set_info being potentially memset
when the device that disconnected was the one that held the
set_info pointer.
The solution is to not use a pointer, but rather a copy of the
set_info, so that the active.set_info value is still valid
after a disconnect.

Since the set_info is not longer a pointer to a specific
set_info from one of the members, the logs have been updated
as well, as the pointer of the active.set_info is useless
for debugging.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-06 14:42:51 -06:00
Johan Hedberg
b710167f1b Bluetooth: drivers: Rename IPM to IPC
This bus type was originally created for what's today the ipc.c HCI driver.
Since this type hasn't yet been synced with BlueZ, rename it for
consistency, however leave the old define to not break backwards
compatibility with existing DT bindings (there are several more that use
"ipm" than ipc.c).

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-06 14:42:19 -06:00
Johan Hedberg
af3dac2131 Bluetooth: drivers: Sync bus types with BlueZ
The authoritative source of these values is BlueZ:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/lib/hci.h#n38

Update our values with the above. The IPM definiton doesn't exist in
BlueZ, but should be added there to make sure we don't get out of sync
again.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-06 14:42:19 -06:00
Henrik Brix Andersen
d5c88d6576 doc: releases: 4.0: add EEPROM release notes
Add EEPROM related release notes for Zephyr v4.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 14:41:52 -06:00
Henrik Brix Andersen
f5090110da doc: releases: 4.0: add CAN release notes
Add CAN related release notes for Zephyr v4.0.0.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 14:41:52 -06:00
Chaitanya Tata
87a9363fa7 drivers: nrfiwif: Enable recovery by default
This is needed to ensure Wi-Fi can always be used.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 14:41:44 -06:00
Dominik Ermel
756affe2eb doc: releases: 4.0: Add release notes for Flash and Storage
Update of release notes in areas related to Storage and Flash.
Additionally two known Stream Flash issues have been added to
Know Issue section.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-06 14:41:35 -06:00
Benjamin Cabé
d342f9e0c2 doc: releases: introduce release notes and migration guide docs for 4.1
This introduces the release notes and migration guide for 4.1.0 earlier
than we typically do, so that people have a placeholder to start adding
content as they line up pull requests for 4.1.
The two documents are currently orphan and not visible from the main
documentation as this would confuse users of 4.0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 14:41:25 -06:00
Benjamin Cabé
99b1c2a912 doc: releases: rework linkage to old release notes/migration guides
Move the link to old release notes and migration guides to the bottom of
the document

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-06 14:41:25 -06:00
Daniel DeGrasse
6023d6a142 arch: common: fix copy for ramfunc region during XIP init
ramfunc region is copied into RAM from FLASH region during XIP init. We
copy from the loadaddr of the region, and were previously loading to the
symbol __ramfunc_start. This is incorrect when using an MPU with
alignment requirements, as the __ramfunc_start symbol may have padding
placed before it in the region. The __ramfunc_start symbol still needs
to be aligned in order to be used by the MPU though, so define a new
symbol __ramfunc_region_start, and use that symbol when copying the
__ramfunc region from FLASH to RAM.

Fixes #75296

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-06 10:19:08 -08:00
Ha Duong Quang
6984237c06 arch: arm: core: cortex_a_r: enable the VFP unit on boot for FPU_SHARING
The FPU is already disabled by the z_arm_svc function when the first
thread starts. Therefore, disabling the FPU at boot is unnecessary for
lazy FPU; instead, it must be enabled to handle floating-point instructions
before the lazy FPU works.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-11-06 10:18:59 -08:00
Mark Holden
8bd4f244b0 coredump: ARM: Ensure sp in dump is set as gdb expects
Gdb is typically able to reconstruct the first two frames of the
failing stack using the "pc" and "lr" registers. After that, (if
the frame pointer is omitted) it appears to need the stack pointer
(sp register) to point to the top of the stack before a fatal
error occurred.

The ARM Cortex-M processors push registers r0-r3, r12, LR,
{possibly FPU registers}, PC, SPSR onto the stack before entering the
exception handler. We adjust the stack pointer back to the point
before these registers were pushed for preservation in the dump.

During k_oops/k_panic, the sp wasn't stored in the core dump at all.
Apply similar logic to store it when failures occur in that path.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-11-06 10:17:59 -08:00
Robin Kastberg
5d52e39a52 random: random_timer.c Remove __GNUC__ ifdef
Remove an old __GNUC__ ifdef

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-11-06 10:11:58 -08:00
Emil Gydesen
3a39ca1e7e samples: Bluetooth: BAP: Add missing return in stream_is_streaming
Add missing return before a `false`;.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-06 10:10:06 -08:00
Luca Burelli
ba58b066d4 west build: fix a leftover "log" reference in build.py
A recent commit changed all references to the global 'west.log' instance
(now deprecated) to the new WestCommand logging API, but another PR
merged in the same period added an extra instance that is now causing CI
to fail. Convert this last reference to the new API.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Luca Burelli
6c2bc2ff37 west build: warn about conditional flags in 'extra_configs'
The 'west build' command does not know about conditional flags (in the
format 'type:value:CONFIG_FOO=bar') in the 'extra_configs' argument of
Twister testcase.yaml files, and currently converts them to malformed
arguments that are silently ignored by cmake.

This change adds a check to 'west build' to clearly warn the user if the
'extra_configs' list contains conditional flags and provide a hint on
how to add them to the CMake command line.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:07:13 -08:00
Daniel DeGrasse
cbe07bcb92 Revert "drivers: display: elcdif: Modify interrupt enablement"
This reverts commit 206897658a.

We must keep the frame completion interrupt disabled until we send a new
frame to the eLCDIF, as the frame completion interrupt fires at each
vertical blank interval. If we keep it enabled, then the semaphore we
use to indicate the frame has been loaded by the eLCDIF will be posted
to when we do not have a frame queued, and calls to `display_write` will
return before the eLCDIF has actually loaded the new framebuffer.

Fixes #80590

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-06 10:06:47 -08:00
Michal Smola
593f4423ab samples: led: pwm: fix console harness regex
Led blinking period was made configurable and time unit changed
from sec to msec recently in the source code of the sample.
Console harness regex was not changed accordingly in sample.yaml.
Device testing fails when run with twister.
Change the regex to accept any period and change the units to msec.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-11-06 10:06:24 -08:00
Zheng Wu
f59e2477ba drivers: serial: fix potential overflow in fifo_fill and fifo_read
Change the type of num_tx/num_rx to avoid overflow.

Fixes #80599

Signed-off-by: Zheng Wu <ken4647@outlook.com>
2024-11-06 10:06:06 -08:00
Luca Burelli
de1e76fa4e tests/subsys/llext: fix coverage for readonly_mmu test
The test was not being run on arm64 and riscv because the filter was
incorrect. Properly fix the filter to run the test on all platforms
that have any kind of MMU enabled.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli
7427d1c85b tests/subsys/llext: cleanup memory protection options
Most of the tests in the LLEXT subsystem test suite run with memory
protection hardware (MPU/MMU) disabled, to avoid including memory domain
issues while testing the core functionality. Only a few tests need to
run with MPU/MMU enabled.

This patch simplifies the testcase.yaml by setting the memory protection
as disabled in a shared config file that is included by most tests.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli
184a2a65a2 tests/subsys/llext: update filtering logic
Restore Apollo boards now that the issue has been fixed.
Also remove extra CONFIG_SOC_SERIES_S32ZE filters, as they are already
covered by the 'platform_exclude' common section.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Luca Burelli
d33686fef7 tests/subsys/llext: Remove llext.simple.readonly_fs_loader
The fs_loader test is always executed in the main test source when
CONFIG_FILE_SYSTEM is set, and this is in turn enabled by per-board
config overlays. So there is no point in having a separate test case:
it is simply a duplicate of the "readonly" test.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-11-06 10:01:26 -08:00
Thao Luong
c66dcd52db drivers: Select PINCTRL for renesas RA drivers
Select PINCTRL for drivers: adc, i2c, pwm, serial and spi

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00
Thao Luong
56326e4677 soc: renesas: ra: Remove CONFIG_PINCTRL
Remove CONFIG_PINCTRL from ra defconfig files

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00
Thao Luong
75bc16f0a2 boards: renesas: Remove CONFIG_PINCTRL for RA boards
Remove CONFIG_PINCTRL from defconfig files of RA boards

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-11-06 09:59:32 -08:00
Chaitanya Tata
c0a84524cd drivers: nrfwifi: Fix the undefined macro usage
This works because undefined macro in conditional is treated as zero,
but could end up choosing the wrong divider.

Fix the macro with the new name.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 09:58:37 -08:00
Andrzej Głąbek
9bdb71fe55 tests: subsys: dfu: img_util: Increase stack size
Fix a problem with the test that manifested itself with a surprising
assertion failure at lib/utils/onoff.c:283. Apparently, due to the
stack being too small, some memory got accidentally overwritten.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-11-06 09:57:41 -08:00
Johan Hedberg
47562485e4 MAINTAINERS: Fix issues with Bluetooth HCI section
The primary header file was missing, and one of the labels was wrong.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-06 09:56:26 -08:00
Chaitanya Tata
9705fc06b4 [nrf fromlist] drivers: nrfwifi: Fix CSUM support
With introduction of Raw modes, nRF70 driver now advertises get_c
onfig OP, but doesn't implement all types.

This causes problems two-fold with checksum calculations:
  1. The "config" isn't uninitialized, so, every call returns differnet
     values. So, for UDP header checksum would be done and
     pkt->chksumdone would be set. But for IPv4 header checksum might be
     skipped.
  2. Even if we initialize to zero, then network stack gets all zeros
     and calculates checksum by itself rendering offload moot.

There is another problem in #1, as there is only single flag for pkt for
all checksum, nRF70 driver sees this and tells UMAC to skip checksum for
the entire packet. The design isn't coherent, and should be converted to
communicate per-type checksum status (some are filled by network stack
and some HW).

But as nRF70 support all checksum offloads, advertise all types for both
RX and TX.

Upstream PR #: 80882

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 09:54:12 -08:00
Chaitanya Tata
ae077b9475 manifest: hal_nordic: Pull logging level fix
Fix the noise during boot.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 09:54:12 -08:00
Chaitanya Tata
c86225384a drivers: nrfwifi: Add a NULL check for FMAC context
In case the driver UP fails, the FMAC context will be NULL, so, add a
NULL check in the DOWN.

Fixes a crash seen when working with unprogrammed OTP (no MAC) that
fails the interface UP.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 09:54:12 -08:00
Henrik Brix Andersen
c261bdf6fc MAINTAINERS: remove nonexistent GitHub user accounts
Remove nonexistent GitHub user accounts as reported by the
scripts/check_maintainers.py script.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 09:53:52 -08:00
Henrik Brix Andersen
97d6cd335c scripts: check_maintainers: add scripts for checking GitHub accounts
Add script for checking if maintainer and collaborator GitHub accounts
exist.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-11-06 09:53:52 -08:00
Robert Lubos
a597feafb8 test: net: lib: prometheus: formatter: Fix test flakiness
If a string is already present in the provided buffer,
prometheus_format_exposition() appends it instead of overwriting,
hence the buffer needs to be cleared on the test start, otherwise it
works by chance.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-11-06 09:53:29 -08:00
Maureen Helm
130c5c0002 tests: zbus: publish_stats: Fix for non-zero boot delay
Fixes the zbus publishing statistics test to account for a non-zero boot
delay, which is often used in hardware testing environments. This fixes
an assertion failure observed on multiple max32 boards in the adi board
farm.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-11-06 09:52:58 -08:00
Chaitanya Tata
5106a0407e boards: thingy53: Fix missing GPIOs
Status and request GPIOs are missing from the edge connector, add those
to fix Thingy53 + nRF7002EB build.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-06 09:52:47 -08:00
Ryan McClelland
952daca695 debug: symtab: fix ignored type qualifiers on func return type
const is ignored on the function return type. A warning is reported with
-Wignored-qualifers. Remove the ignored const.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-06 09:52:36 -08:00
Dmitrii Golovanov
7e1cd18be4 twister: Fix NOTRUN status
Fix Twister TestCase statuses left not assigned ('NONE') in these 'NOTRUN'
situations:

 * a test suite has `integration platform` which is not available to run.

 * `--cmake-only` execution.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-11-06 09:52:25 -08:00
Alberto Escolar Piedras
d4b7bf986c tests bsim bt audio: Increase execution timeout
These tests have been seen failing in CI due to the
real time execution timeout. Let's increase it so it does
not happen.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-06 09:40:16 +01:00
Stephanos Ioannidis
5c00d99f4b ci: Add '-specs' to ccache ignore option list
`-specs=` is an alternate form of `--specs=`, which is now used by the
Zephyr build system.

This commit adds `-specs=*` to the ccache ignore option list because, as
with `--specs=*`, ccache is unable to resolve the toolchain specs file path
and refuses to cache when this option is specified.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-11-06 11:26:32 +09:00
Raffael Rostagno
b9fc4cc415 drivers: pwm: ledc: esp32c2: esp32c6: Fix clock frequency
Fix clock frequency for both devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-05 15:25:21 -06:00
Raffael Rostagno
ba52c8c350 west.yml: Update for esp32c2/esp32c6 ledc clock fix
Update HAL for esp32c2/esp32c6 ledc clock fix

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-11-05 15:25:21 -06:00
Daniel DeGrasse
832e02daa6 doc: releases: migration-guide-4.0: add note about disk-name for SD/MMC
SD and MMC devices now require the disk-name property. Add a note to the
migration guide so that users know the recommended value to add for this
name for each disk driver type.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 15:25:10 -06:00
Daniel DeGrasse
07a8e3253a drivers: disk: mmc_subsys: remove CONFIG_MMC_VOLUME_NAME
Remove CONFIG_MMC_VOLUME_NAME, and set the disk name based on the
``disk-name`` property. This aligns with other disk drivers, and allows
for multiple instances of the mmc_subsys disk driver to be registered.

Add disk-name properties for all in tree definitions for the
mmc-subsys disk driver, and change all in tree usage of the disk name

Fixes #75004

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 15:25:10 -06:00
Daniel DeGrasse
a1dc0b8b3e drivers: disk: sdmmc_subsys: remove CONFIG_SDMMC_VOLUME_NAME
Remove CONFIG_SDMMC_VOLUME_NAME, and set the disk name based on the
``disk-name`` property. This aligns with other disk drivers, and allows
for multiple instances of the sdmmc_subsys disk driver to be registered.

Add disk-name properties for all in tree definitions for the
sdmmc-subsys disk driver, and change all in tree usage of the disk name

Fixes #75004

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 15:25:10 -06:00
Tomi Fontanilles
87bb0b9212 manifest: tf-m: update to 2.1.1
Update the TF-M repos to version 2.1.1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-11-05 15:24:57 -06:00
Lingao Meng
b9fbfc9a23 Bluetooth: Mesh: Introduce separate workq for ADV EXT
this PR is to make the host always send packets.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-11-05 15:24:31 -06:00
Daniel Baluta
646775bf9e manifest: hal_nxp: Pull in change to fix irqsteer mask computation
This fixes irq_steer channel mask index computation for i.MX8MP
platform.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-11-05 15:24:19 -06:00
Carles Cufi
94ad822a33 include: dt-bindings: regulator: nrf5x: Fix guards
Fix the include guard mismatch. Found building with clang.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-05 13:45:46 -06:00
Pavel Vasilyev
457a20c4a2 test: bsim: bluetooth: mesh: Wait until adv is actually sent
k_sleep may not be enough to let advertiser send the message. Instead we
should rely on the bt_mesh_send_cb.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-05 13:44:51 -06:00
Pavel Vasilyev
4c5c434ea2 bluetooth: mesh: adv: legacy: Check suspended flag in the adv thread
Instead of checking the `enabled` flag, check if BT_MESH_SUSPENDED is
set in the legacy advertiser thread. BT_MESH_SUSPENDED is set earlier
than advertiser is stopped and will prevent the advertiser send anything
earlier.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-05 13:44:51 -06:00
Vinayak Kariappa Chettimada
db967209ca Bluetooth: Controller: Fix spurious ISO Sync receiver stall
Fix spurious ISO Sync Receiver stall due to uninitialised
value accessed due to regression introduced by
commit 64faceea72 ("Bluetooth: controller: Stop Sync ISO
ticker when establishment fails").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-11-05 13:44:37 -06:00
Valerio Setti
7f5574817f jwt: remove TinyCrypt usage
As part of TinyCrypt deprecation process (#79566) this commit
removes usage of this library from the JWT subsystem and its
related tests.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
Valerio Setti
3d45ee7cb7 random: remove TinyCrypt usage
Following the deprecation of TinyCrypt (#79566) we remove
TinyCrypt usage in random generators. This basically only affects
the CTR-DRBG random generator which from now only will only make
use of Mbed TLS.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
Valerio Setti
f4b7d151c5 board: remove references to TinyCrypt
Following the deprecation of TinyCrypt (#79566) we remove tags
referring to it.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
Valerio Setti
adad8dc48a soc: remove usage of TinyCrypt in NXP SOCs
As for the IMX SOCs all the lines removed in this commit were
actually commented out so there's basically no change in code
behavior expected here.
The only affected SOCs family is therefore the Kinetis one.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
Valerio Setti
dbda4642cd drivers: crypto: deprecated TinyCrypt shim driver
As part of the deprecation process of TinyCrypt started in #79566,
this commit set the TinyCrypt based crypto shim driver as
deprecated.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-05 13:44:20 -06:00
The Nguyen
39015912d0 boards: renesas: doc: update supported feature on Renesas RA boards
Add information about CAN supported on these boards:
- ek_ra8m1
- ek_ra8d1
- mck_ra8t1

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-11-05 10:59:51 -06:00
Grzegorz Swiderski
c1776df8ae soc: nordic: dmm: Fix DMM_REG_ALIGN_SIZE macro when CONFIG_DCACHE=n
Make sure this expansion doesn't include `CONFIG_DCACHE_LINE_SIZE`,
which would be undefined and produce a build error.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-05 10:57:07 -06:00
Anas Nashif
9cabb89969 tests: drivers: display: fix filtering
Test was marked build only with filters in each scenario looking for
sdl-dc which is only available on native_sim, so cut the chase and use
platform_only to narrow things down to native_sim directly instead of
building the world to get information we already know.

reduces build/run time from 78s to 17s on invocation of twister with
default options, saves a ton more when running twister with --all.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-05 10:56:29 -06:00
David Leach
21f37c8bfd tests: counter: RW612 dts overlay support for basic_api tests
Remove memory spaces not needed for the counter_basic_api test.
Add frdm_rw612.overlay

Signed-off-by: David Leach <david.leach@nxp.com>
2024-11-05 10:56:00 -06:00
Daniel DeGrasse
0856ceed7b soc: nxp: imxrt: correct flexspi XIP check to avoid reclocking
RT11xx SOC init should check to see if the zephyr flash node is
set to a device on the FLEXSPI bus to determine if the part is running
in XIP mode. This check was incorrect, so the FLEXSPI was being
reclocked in XIP mode to 24 MHz. Fix this check so the FlexSPI is not
downclocked.

Fixes #75702

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 10:55:13 -06:00
Daniel DeGrasse
cfb7322107 drivers: flash: flash_mcux_flexspi: add support for W25Q512NW-IQ/IN
Add support for the W25Q512NW-IQ/IN with the FLEXSPI, using a custom
LUT table.

Fixes #80592

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-11-05 10:55:13 -06:00
Tomáš Juřena
0911003c11 boards: st: stm32h745i_disco: m7: Fix PHY address
According to the datasheet, the PHY address is 0x1. When changed to this
value the PHY id is correctly read.

Before:
```
[00:00:00.602,000] <err> phy_mii: No PHY found at address 0
```

After:
```
[00:00:00.051,000] <inf> phy_mii: PHY (1) ID 7C111
```

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-11-05 10:54:58 -06:00
Bjarki Arge Andreasen
145d04101d pm: policy: fix pm_policy_event_register arg
The pm_policy_event_register() API takes absolute cycles as the
second arg, like pm_policy_event_update(), but the arg is renamed
time_us and treated as a relative time in us rather than abs
cycles.

Fix implementation of pm_policy_event_register() to treat cycles
like pm_policy_event_update() and API docs suggest.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-05 10:54:41 -06:00
Duy Nguyen
639d9ae96f manifest: Update hal_renesas commit ID
Update hal renesas commit ID to resolve PLL clock
config issue

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-11-05 10:54:28 -06:00
Duy Nguyen
0a68d492e2 dts: renesas: Separate pll p q r into child node
The new update of clock device tree make the pll p q r clock
source cannot be choose by other node
This fix add 1 new dts binding for pll out p q r out line

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-11-05 10:54:28 -06:00
Kevin ORourke
4690689a36 drivers: ethernet: eth_stm32_hal: fix bus error after disconnect
In some circumstances the struct eth_stm32_tx_context object that was
allocated on eth_tx's stack is still referenced after the function exits.
This usually happens when the network is disconnected, depending on the
PHY hardware.

When the network is reconnected there will eventually be a call to
HAL_ETH_ReleaseTxPacket, which calls HAL_ETH_TxFreeCallback with the
(now invalid) pointer to the tx context. When HAL_ETH_TxFreeCallback
tries to dereference that pointer we get a bus error.

Fix this by allocating struct eth_stm32_tx_context objects from a
static array, similarly to how the buffers are allocated. This ensures
that they remain valid until the HAL is finished with them.

Fixes: #79037

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-11-05 10:54:16 -06:00
Benjamin Cabé
6bb0c092b5 doc: comparator: fix nested bullet list formatting
add missing newline for sub-list to render correctly

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-05 10:54:01 -06:00
Torsten Rasmussen
f2ea8506ae cmake: use CMake variable KERNEL_VERSION_CUSTOMIZATION for default value
Fixes: #80193

With #62395 the Zephyr kernel and app version customization values were
moved to target properties to allow Zephyr modules to adjust the values.

This had the consequence described by #80193 that version customization
using CMake arguments, `-D`, or CMakeList.txt toplevel file can no
longer be used for customizing the version.

To support both CMake variable as well as Zephyr module version
customization use-cases then this commit uses `zephyr_get()` to fetch
any CMake variable adjustments and uses the value for default property
setting. This allows users to set customized version while still allow
Zephyr modules to overrule this as intended with #62395.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-11-05 10:53:49 -06:00
Benjamin Cabé
2995eb79f1 doc: fix scrolling glitch causing search bar to be partially hidden
With the recent update to Sphinx RTD theme 3.0.0, a 19px-high element
that used to display the version number is not visible anymore, so the
JS code that hides the upper-left logo when scrolling down needs to be
adjusted to account for this change.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-05 10:53:34 -06:00
Chaitanya Tata
580707ed4d drivers: nrfwifi: Fixes from doc review
Help text fixes from doc-team.

Signed-off-by: Richa Pandey <richa.pandey@nordicsemi.no>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-05 10:53:24 -06:00
Johann Fischer
973f914b90 drivers: udc_nrf: fix enqueue of control IN transfer with length 0
If the direction of the last setup packet is not to the device but to
the host, then the transfer is not a status stage and should be queued.
This is not checked and prevents a zero length control IN transfer to
the host, e.g. used by the DFU class to indicate the end of the upload
process.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-05 10:53:11 -06:00
Johann Fischer
0c299e66a4 drivers: udc_kinetis: reset control endpoint busy flags
Reset control endpoint busy flags if configured and enabled, otherwise
it could mark the wrong buffer as busy after endpoint disable/enable.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-05 10:53:11 -06:00
Johann Fischer
6619d15662 doc: usb: update the USB device stack deprecation plans
Deprecation has been postponed one version.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-11-05 10:52:43 -06:00
Jukka Rissanen
3e1e2ea8ec net: wifi: mgmt: Use memcpy instead of strncpy
Using strncpy gives this warning

warning: 'strncpy' output may be truncated copying 32 bytes from
  a string of length 32 [-Wstringop-truncation]

 strncpy(roaming_params.neighbor_rep.neighbor_ap[idx].bssid_info,
         bssid_info,
         sizeof(roaming_params.neighbor_rep.neighbor_ap->bssid_info));

There is '\0' at the end of the allocated buffer so we can safely
use memcpy() here to avoid any warnings.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-05 10:52:29 -06:00
Jukka Rissanen
0a75809a8e net: wifi: mgmt: Check string length in sscanf
Make sure we are not able to overwrite string variables in sscanf
call. Allocate also one extra byte for null terminator character.

Fixes #80644

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-05 10:52:29 -06:00
Gerard Marull-Paretas
5249619f6a soc: nordic: nrf54h: gpd: fix compile warning when CONFIG_DEBUG=y
Usage of K_SPINLOCK with CONFIG_DEBUG=y seems to trigger a compiler
warning about request not always being initialized. Fallback to
k_spin_lock/unlock calls to fix this issue.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-05 14:46:15 +01:00
Lukasz Mrugala
4bb945300b scripts: twister: Python Version Guard
Twister shall now verify that the user does not
use an obsolete Python version. If user's Python
is deemed too old, it will raise a relevant error.
This check will also happen when running Twister
via west.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-11-04 17:24:24 -05:00
Benjamin Cabé
5c9b0a5a33 drivers: comparator: fix wrong @since tag
The Comparator API was introduced in 4.0, not 3.7

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-04 13:43:40 -06:00
Gerson Fernando Budke
0cc8f93e8a soc: atmel: Drop PINCTRL from Kconfig.defconfig
This Kconfig has wrongly been added to defconfig files. It is not the
right place for it. It has never been the right place for it. Drivers
that need it should select the symbol in their Kconfig entries. Drop
PINCTL from Kconfig.defconfig and add proper select at Kconfig.sam*.

Fixes #78619

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-04 13:43:26 -06:00
Henrik Brix Andersen
0bb5270f7b drivers: can: sam: fix sys_write32() arguments order
Fix the order of the arguments to sys_write32().

Fixes: #80750

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-04 13:43:03 -06:00
Jamie McCrae
cef75af6af doc: release: 4.0: Add MCUboot and other misc. updates
Adds notes on MCUboot changes to this release and some other
updates for boards/build system

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-04 13:42:23 -06:00
Philipp Steiner
ec7d0c8e6f doc: add missing Ethernet Support for Nucleo H563ZI & STM32H573I-DK
I recently found out, that the Ethernet support for the boards Nucleo
H563ZI and STM32H573I-DK is already available but it isn't mentioned
in the "Supported Features" section.

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2024-11-04 13:42:09 -06:00
Francois Ramu
a925d60cbd drivers: flash: stm32h7 flash driver reformat code
Apply clang-format to re-format the flash_stm32h7.c driver

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-04 13:41:46 -06:00
Francois Ramu
331423d8e3 drivers: flash: stm32H7 flash driver enable clock when defined
Not all the stm32H7 have a clock enable for their flash;
only the dual-core.
For the st,stm32h7-flash-controller with "clocks" property, the driver
will enable the flash clock bit in the corresponding RCC register.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-04 13:41:46 -06:00
Francois Ramu
5c529919ec dts: arm: st: stm32h7 with dual core have flash clock enable bit
Define the "clocks" property, for the flash "st,stm32h7-flash-controller"
node, only for the stm32H7 dual-core devices
which have the RCC bit 8 present in their RCC AHB3 register.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-04 13:41:46 -06:00
Jukka Rissanen
ec18ab1eda net: dns: Convert the query and answer to small case letters
Because we might get answers in capital letters, convert the answer
to small case letters and also make sure we send query in small case
latters. This makes sure that our query_hash is properly calculated
regardless of how the resolver gets the data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-04 13:41:17 -06:00
Jukka Rissanen
adeb28d147 net: dhcpv4: Fix DNS server list allocation
Allocate one extra pointer for the DNS server list so that
DNS resolving code can detect the end of the list.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-04 13:40:56 -06:00
Gerson Fernando Budke
52d21d7bf0 soc: gd32: Drop PINCTRL from Kconfig.defconfig
This Kconfig has wrongly been added to defconfig files. It is not the
right place for it. It has never been the right place for it. Drivers
that need it should select the symbol in their Kconfig entries. Drop
PINCTL from Kconfig.defconfig and add proper select at Kconfig.gd32.

Fixes #78619

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-11-04 13:40:42 -06:00
Benjamin Cabé
23fb3b77a2 doc: releases: Use :cve: role in security section
Adopte `:cve:` role to automatically link to CVE.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-03 17:30:21 -08:00
Benjamin Cabé
8beaf986fc doc: releases: Add list of added shields in 4.0 cycle
Adds the list of new shields for 4.0 release, sorted by vendor name.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-03 17:30:21 -08:00
Benjamin Cabé
12821f8ec6 doc: releases: Add list of added boards in 4.0 cycle
Adds the list of new boards for 4.0 release, sorted by vendor name.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-03 17:12:30 -08:00
Dan Kalowsky
e90c58a5b1 release: Zephyr 4.0.0-rc2
Bump the version file for RC2.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
2024-11-01 17:59:28 -07:00
Anas Nashif
d9bc0b60b9 arm: cortex_m: restore fix for loading z_arm_int_exit
This change was in the same commit previously reverted and seem to be
unrelated and should not be reverted.

Fixes the problem:

..... /swap_helper.S:432:(.text.z_arm_svc+0x26):
relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`z_arm_int_exit' defined in .text._HandlerModeExit section in
....core/cortex_m/libarch__arm__core__cortex_m.a(exc_exit.c.obj)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-01 16:13:58 -07:00
Anas Nashif
e646b7f3bb Revert "arch: arm: cortex_m: move part of swap_helper to C"
This reverts commit 773739a52a.

Fixes #80701

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-01 13:54:44 -05:00
Anas Nashif
7aa4032ac6 Revert "arch: arm: cortex_m: restore comment lost in translation"
This reverts commit 7d7616214b.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-01 13:54:44 -05:00
Lars-Ove Karlsson
aaeaef0a1c drivers: flash: Removed a __packed attribute from struct jesd216_bfp
The struct jesd216_bfp was declared as __packed but later in the code
the address of a member was given to a non-packed pointer, potentially
causing reading of wrong addresses, and causing warnings with the
IAR ICCARM compiler.

After studying the JEDEC documentation JESD216F.02, section
6.4.2 JEDEC Basic Flash Parameter Header: 2nd DWORD, the struct must
be aligned to 4 so __packed is not necessary, just 4 byte alignment.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-11-01 13:54:30 -05:00
Yong Cong Sin
a5555ab077 testsuite: coverage: fix typo in the CMakeLists.txt
`zephyr_BASE` should have been `ZEPHYR_BASE`, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-11-01 13:54:14 -05:00
Declan Snyder
495a374a0d drivers: ethernet: ksz8081: RMII override RNB part
I for the life of me do not know what is going on here with the RNB chip
but it seems this override must be set in order for the chip to work,
regardless of strap-in configuration, and if not set explicitly, the
value after a reset for these two bits will be seemingly random and
inconsistent. And it was working before by luck before removing a second
redundant reset in a recent commit, because apparently the register
was getting the opposite of the reset value according to the datasheet
which makes it work. The result of these bits after reset seem to vary
depending on host mcu, board, debugger, number of times reset, type of
reset, and with a pinch of random chance after keeping all variables
seemingly the same, so let's just set it to the value that works
explicitly, even if it doesn't make sense. The bit here doesn't have
clear documentation but it seems it's for using RMII regardless of the
strap in option, which is what we want to do anyways if we know the
interface type from DT, so I think it's fine, considering it is making
this driver work again.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-01 13:54:00 -05:00
Declan Snyder
96877736e4 drivers: ethernet: ksz8081: Fix reset times
500 ms reset time is only for software reset and comes from IEEE spec.
Datasheet mentions for hardware reset the assertion of the signal should
only need to be 500 us, and 100 us after deassert to wait to access
programming interface.

Also remove an unused macro.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-01 13:54:00 -05:00
Hake Huang
7b4d8cf9ce samples: sesnor: thermo: add harness_config for testing
add harness_config for console for testing

Signed-off-by: Hake Huang <hake.huang@oss.nxo.com>
2024-11-01 12:11:00 -05:00
Dominik Ermel
c6140b6f08 doc: release: 4.0: Add release note on fixing #80383
Release note update.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-01 12:10:33 -05:00
Gerard Marull-Paretas
969326bfff soc: nordic: nrf54h: disable PM_DEVICE_POWER_DOMAIN
It is enabled by default if we enable device PM, but we do not want
this, otherwise we get linker errors (PM subsys, fun guaranteed!).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
b6d45423c6 drivers: serial: nrfx_uarte: set/clear pins retention
When GPD is managed by pinctrl, pins retention needs to be controlled by
the driver to avoid glitches.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
77fc18327a soc: nordic: nrf54h: gpd: add API to set/clear pin retention
This API needs to be called by FAST peripherals before/after
disabling/enabling them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
5e8905bb94 scripts: checkpatch: add NRF_GPIO_Type to typedefs file
So that we do not get false warnings about consistent spacing around
'*'.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
56c5b1e2da drivers: gpio: nrfx: add support for ports with pad on FAST_ACTIVE1
This patch allows to _safely_ configure GPIO ports that have their pad
on FAST_ACTIVE1 domain.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
0b18f31246 modules: hal_nordic: bump regtool to 8.0.0
It is required for some pinctrl changes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
9925ec99fd drivers: pinctrl: nrf: add flag to signal the FAST_ACTIVE1 peripherals
This patch introduces a new flag to indicate if a peripheral belongs
to FAST_ACTIVE1 domain. This way, pinctrl knows when to request the
SLOW_ACTIVE domain (where CTRLSEL multiplexer resides).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
87a42a89cb soc: nordic: nrf54h: add SoC level API to request/release GPD
Add a new soc-level API that allows to manually request/release global
power domains.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
01e285c1ba dts: nordic: nrf54h20: add power domain information
So that it can be used to manually control certain power domains.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
a56a170b7e dts: nordic: nrf54h20: define global power domain
Add the global power domain entry. This domain is not memory-mapped
but controlled using NRFS services.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas
f3d29d6fd2 dts: bindings: power: add nordic,nrf-global-pd
Add binding for Global Power Domain found in nRF54Hx SoCs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Jukka Rissanen
c005997a0d samples: net: wifi: Update the AP-STA mode sample
Update the AP/STA mode README file to make it more generic.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-01 12:08:32 -05:00
Jukka Rissanen
d75b21058e samples: net: wifi: Relocate AP and STA wifi sample
The AT / STA wifi sample is generic so it does not need to be
located under espressif board directory. Following commit
will do additional changes to make the sample more generic.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-01 12:08:32 -05:00
Jukka Rissanen
5f4bb46f97 samples: net: wifi: Move wifi sample to under shell directory
Move samples/net/wifi application to samples/net/wifi/shell
as it has been used as a shell application before.
Following commits will add new wifi samples to this directory.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-01 12:08:32 -05:00
Andrej Butok
5c376ad24c samples: smp_svr: fix overlay-udp.conf build
- fixes overlay-udp.conf build for platforms without TRNG.
- adds TEST_RANDOM_GENERATOR, as for most network samples.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-01 09:57:09 -05:00
Johan Hedberg
d1a3f4f4fe Bluetooth: Host: Fix monitor UART selection
Most boards set zephyr,bt-mon-uart to point at the same device as
zephyr,console. It's still useful to have the possibility of having these
as two different devices, however it's useful to fall back to the UART
console in case a dedicated monitor UART hasn't been specified.

This also ensures that the fallback only happens if the console UART isn't
enabled, but a DT chosen property exists for it. Additionally, we now get a
user friendly error in case the Bluetooth UART monitor feature has been
enabled in Kconfig but there isn't a suitable UART available for it in
devicetree.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-11-01 09:56:52 -05:00
Jamie McCrae
4e77640874 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  f74b77cf7808919837c0ed14c2ead3918c546349

Brings following Zephyr relevant fixes:
  - f74b77cf imgtool: fix signing for fix-sig-pubkey public rsa
  - 439930ae boot_serial: Fix serial recovery for LPC55x and MCXNx

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-01 09:56:26 -05:00
Alberto Escolar Piedras
a8d28928ed boards: nrf54l15bsim doc: Clarify around entropy and crypto
Let's explicitly mention we are enabling the native_posix entropy
driver for this board (the real nrf54l15dk does not have an entropy
driver in Zephyr yet).
And correct a bit the wording around mbedtls as for the real target we
don't have mbedtls with HW acceleration.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-11-01 09:56:18 -05:00
Krzysztof Chruściński
3bf54a9e85 lib: os: cbprintf_packaged: Fix cbprintf_package_convert
When conversion is done in two steps (output length calculation
followed by the actual conversion), it was failing when helper
array for holding calculated string length from the first
conversion run was shorter than number of strings that were
supposed to be appended to the package. Fix by taking into
account strl_len to determine if length can be taken from the
array or need to be calculated again.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-01 09:56:03 -05:00
Krzysztof Chruściński
f82ffc9213 tests: lib: cbprintf_package: Extend test coverage
Add test for cbprintf_package_convert function which checks if
it correctly handles array that holds string lengths. When convert
function is used twice, at first to calculate size of the output
package and then to actually convert the package, array of string
lengths can be used to optimize operation by not calculating
string lengths twice. However, array may not be able to hold all
string lengths that are needed for that package. In that case,
string lengths that did not fit into the array will be calculated
twice, in both conversions.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-01 09:56:03 -05:00
Mert Vatansever
9cfd185ab0 tests: drivers: flash: Fix MAX32666 flash error
This commit fixes flash error by correcting flash size.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
2024-11-01 09:55:52 -05:00
Benjamin Cabé
f7ffadaf3d doc: hide main table of contents
Hide the main table of contents so that it doesn't show up in the actual
documentation index, only in the side bar. This helps keep the index
less cluttered and to the point.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-01 09:55:37 -05:00
Benjamin Cabé
96f07b832e doc: move less important information under the fold
Help make sure the most important documentation entry points are visible
without scrolling by moving less important information "under the fold".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-01 09:55:37 -05:00
Håvard Reierstad
0b88078b28 Bluetooth: host: Fix unsafe cast in is_subscribed
The current implementation casts the user data to the attribute value,
which makes an assumption about the user data. This commit changes the
implementation to use the attribute value read function when extracting
the characteristic properties.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-11-01 09:55:25 -05:00
Joel Hirsbrunner
8d07197d6d devicetree: Remove deprecated enum macro
Remove deprecated _ENUM_TOKEN and _ENUM_UPPER_TOKEN. These are
deprecated for over three years by now.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-11-01 09:55:11 -05:00
Mert Ekren
193eeaef0c drivers: pinctrl: max32: fix correct configuring drive strength
This commit fixes configuring pin drive strength in pinctrl driver.
Previously, there was a mismatch while filling pincfg and checking
pincfg drive strength field. This fix simplifies the operation and
avoids gpio driver header dependency.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
2024-10-31 14:18:38 -05:00
Lukasz Mrugala
9dc0af55e2 scripts: twister: Fix NOTRUN in test_only
When using the --build-only into --test-only
Twister setup, NOTRUN statuses were not properly rerun.

Now they are properly run again if runnable.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-31 14:18:17 -05:00
Seppo Takalo
1e5a537ade net: lib: coap_client: Remove unnecessary atomic variable
In receiving thread, continuing the loops is based on
has_ongoing_exchanges() so it does not need atomic
coap_client_recv_active variable.

When idling, it wakes from semaphore. But there was potential
deadlock when coap_client_schedule_poll() would not signal the
semaphore, if atomic variable was already showing that it runs.
Removing the atomic variable removes this deadlock.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
9c9dc9f760 tests: coap_client: Add tests for poll() errors
If we receive poll() error during a request, it must
be forwarded to application.

If instead receive poll() error later, it should not be
forwarded as it might be result of application closing the
socket.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
350d20e027 net: lib: coap_client: Send RST for unknown queries
When receiving unknown response, respond with CoAP Reset.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
1dc24872ce net: lib: coap_client: Remove duplicate token comparison
Response tokens are already compared in get_request_with_token().

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
e96e95b6f6 net: coap: Add API to send reset message
Add helper API to construct CoAP Reset message.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
1890dbd637 net: lib: coap_client: Fix reset handling
Fix handling of received CoAP reset.


Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
a14f083030 net: lib: coap_client: Use reset_internal_request() instead of flagging
It is error prone to flag separate booleans, so try to use
reset_internal_request() every time we release the internal request
structure.

Also refactor the reset_internal_request() so that we reset the
timeout value so it does not trigger again.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
623a1ffd52 net: lib: coap_client: Don't decrease retry counter on send() failure
If send() fails, we have not technically send the CoAP retry yet, so
restore the same pending structure, so our timeouts and retry counters
stay the same.

This will trigger a retry next time the poll() return POLLOUT, so we
know that we can send.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
6481b0ec6c net: lib: coap_client: Forward recv() errors to handling loop
Forward recv() errors to handle_poll(), so there is only one place to
handle error codes.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
4c6dd4c7b7 net: lib: coap_client: check poll() condition before retrying CoAP msg
Refactor the CoAP retry handling into the handle_poll() function,
so that we only try to send retries if the socket reports POLLOUT.

Also move the receiving into same loop, so when poll() reports POLLIN
we recv() the message and handle it before proceeding to other sockets.

Also fix tests to handle POLLOUT flag and add support for testing
multiple clients.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
46b7c84512 net: lib: coap_client: Release internal request when failed to send
When transmission of first request fails, reset the internal request
buffer as there is no ongoing CoAP transaction.

Application can deal with the failure.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Seppo Takalo
1ea569d776 net: lib: coap_client: Protect initialization with mutex
Protect global list of clients with mutex.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-31 14:17:58 -05:00
Chaitanya Tata
bb2f602b7e shields: nrf7002eb: Add missing SR RF switch GPIO
This causes a build error as nRF70 driver running on CPU APP needs this
when SR co-existence is enabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-31 14:17:31 -05:00
Chaitanya Tata
d137527f88 boards: nordic: Fix the label for nRF70 SR co-existence
The co-existence modules expect a common and fixed name, so, rename it
to avoid churn.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-31 14:17:31 -05:00
Filip Kokosinski
ecf308e8de dts/andes: adjust the sizes of PLIC nodes
This commit adjusts the sizes of the two PLIC nodes AE350 defines:
* `plic0` size is changed from `0x04000000` to `0x02000000`
* `plic_sw` size is changed from `0x04000000` to `0x00400000`

Without these change, `plic0` address space would overlap with `plic_sw`,
and with other memory-mapped peripherals.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-31 14:17:02 -05:00
Fabio Baltieri
63890e2526 arch: arm: cortex_m: add memory to the clobber list
Add "memory" to the clobber list"

From GCC 14 the compiler optimizes away memory accesses that do not
impact the asm block. Adding the memory to the clobber list lets the
compiler know that the memory state is to be preserved.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-31 14:16:48 -05:00
Fabio Baltieri
7015a0ee37 arch: arm: cortex_m: move _main in input list
Move the _main argument to the input list rather than the output one on
the asm block and change the spec to "r". The ASM block does not return,
so it does not make sense for it to expect any output.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-31 14:16:48 -05:00
Armin Kessler
78f688a3e7 scripts: twister: Fix serial_py referenced before assignment
This fixes `serial_py referenced before assignment` if `flash_before`
is set.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-10-31 14:16:36 -05:00
Armin Kessler
e31bf8bf50 scripts: twister: Add Espressif as manufacturer
Adds Espressif as manufacturer so that generation of HW-Map file is
possible

Signed-off-by: Armin Kessler <ake@espros.com>
2024-10-31 14:16:25 -05:00
Daniel Leung
cdb9166b81 cmake: toolchain/xcc,xt-clang: env vars for multiple cores
To use Xtensa toolchain, various environment variables must be
set so the executables can find necessary files and what core
to compile for. This becomes an annoyance when you have to
test multiple boards with different cores. You have to use
one set of environment variables per core. Twister cannot test
them all in one setting, and it is especially annoying doing
west builds. So enhance the environment variables handling so
that TOOLCHAIN_VER and XTENSA_CORE can be replaced by
TOOLCHAIN_VAR_<board> and XTENSA_CORE_<board> where <board>
is the normalized board target (think <board>.yaml). CMake
will then figure out the core ID for the toolchain to use.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-31 09:26:00 -05:00
Daniel Leung
59b2163eeb cmake: toolchain/xt-clang: force assembler ID to GNU
xt-clang uses GNU Assembler (xt-as) based on binutils. However,
CMake doesn't recognize it when invoking through xt-clang. This
results in CMake going through all possible combinations of
command line arguments while invoking xt-clang to determine
assembler vendor. This multiple invocation of xt-clang
unnecessarily lengthens the CMake phase of build, especially
when xt-clang needs to obtain license information from remote
licensing servers. So here forces the assembler ID to be GNU to
speed things up a bit.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-31 09:26:00 -05:00
Lukasz Mrugala
ff1857af55 scripts: twister: Enchance TestCase/Instance info and presentation
ExecutionCounter has been expanded and now hold i.a.
more information on the statuses of TestCases.
This information is now incorporated in relevant summaries
- runner.py and reports.py.
Layout of those was changed to present that
and previous information in a clear and concise way.

TestInstance execution counter now is more intuitive.
Instances filtered out before running are no longer included there.
Retries now properly reset the counter.

TestCases with None and other incorrect final statuses
are logged as errors, but do not
exit Twister with a nonzero exit code.
This is because None statuses, although incorrect,
are currently common.

Inconsistent spacing in ERROR and FAILED fixed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>

scripts: Dmitri fix

Fix of a problem noticed by Dmitri

Removed unnecessary additional spaces when
printing FAILED and ERROR status.
Now TwisterStatus.get_color is used more.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-31 09:24:18 -05:00
Damian Krolik
502c9ffb32 drivers: ieee802154_nrf5: skip Enh Ack conf for invalid short address
If the invalid short address (0xfffe) is specified,
configure the Enhanced Ack just for the extended address.
This is needed because Header IEs for Enhanced Ack must be
configured before the short address has been assigned to
the child.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-10-31 09:24:03 -05:00
Fengming Ye
91d9cc259d net: wifi: shell: add 80211R usage in connect command
Add 80211R fast BSS transition argument usage in connect command.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-31 09:23:48 -05:00
Anas Nashif
ac37ba8739 tests/samples: use platform_key on cmsis_rtos tests/samples
Coverage for cmsis rtos APIS should is provided using simulation, we
should not build those on every platform we have. Avoid failures due to
incompatiblities in requirements coming from various boards and also
reduce churn and noise during testing and CI.

Fixes #80215

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-31 09:23:30 -05:00
Emil Gydesen
5ebe1194be tests: Bluetooth: Tester: Fix use of uninitialized cig_id for CAP
The CAP tests used u_group->cig->index but the u_group->cig may
have been deleted when the stream is released, which meant
that u_group->cig == NULL when e.g. unicast_stop_complete_cb
was called and that could cause failing tests as the index
would just be a uninitialized value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-31 09:23:16 -05:00
Piotr Krzyzanowski
74a5599ac8 samples: sensor: qdec: change pins used for qdec nrf54h20dk
Change pins that are used for qdec nrf54h20dk to align with shield
(loopbacks) used in internal CI. This change is needed to start
qdec driver power management testing.

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2024-10-31 09:22:58 -05:00
Andreas Huber
075d5d3009 net: mqtt: Fix missing close function
If POSIX_API is not configured the close function is not available.
Use zsock_close instead.

Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
2024-10-31 09:22:44 -05:00
Anas Nashif
fad8a1ff31 intel_adsp: fix new style twister configuration
Missed a few keys while moving to the new style twister.yaml file for
the intel_adsp platform. Add those back.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-31 09:22:30 -05:00
Phi Bang Nguyen
8d1a7026c5 samples: video: capture: Fix floating point logging issue
The default frame rate is printed as a floating point number. Without
enabling CONFIG_REQUIRES_FLOAT_PRINTF, it is not printed at all. Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-31 09:22:11 -05:00
Vukan Turkulov
124aae3876 doc: specify thread safety for each data structure
The documentation of "Kernel/Data Structures" incorrectly
states that 'all provided structures are uniformly unsynchronized;
access to them is not threadsafe by default'.
In reality, some of them are threadsafe and some are not.
This might discourage users from using threadsafe data structures
where applicable, or mislead users into adding unnecessary locks.

This proposal addresses the issue by specifying thread safety
for each provided data structure.
My assessment of thread safety is based purely on source code analysis;
hence an expert verification would be appreciated.

Signed-off-by: Vukan Turkulov <vukant@gmail.com>
2024-10-30 18:45:33 -07:00
Riadh Ghaddab
6cc28c78b7 MAINTAINERS: add ZMS maintainer
Add myself "rghaddab" as maintainer to the ZMS storage system as I am
the author of this new storage solution

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-30 18:44:30 -07:00
Nicola Ochsenbein
14852f5b6e MAINTAINERS: remove maintainer FatFs
Remove ox11 as maintainer and remove the FatFs reentrant subgroup

Signed-off-by: Nicola Ochsenbein <nici.ox11@gmail.com>
2024-10-30 18:44:18 -07:00
Reto Schneider
743761d7d1 scripts: Fix CMake spelling
As per its creators, CMake is written with a capital "M".

The initial reason for this change is that I want Twister to print
"ERROR : CMake build failure" instead of "ERROR : Cmake build failure".

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 16:32:24 -05:00
Timon Skerutsch
054bd850f0 doc: gsg: Add second note about different Linux distributions
The initial note about the install guide for different distributions
can be easily overlooked. Add a second note to make it more prominent
in the first step.

Signed-off-by: Timon Skerutsch <zephyr@diodes-delight.com>
2024-10-30 16:32:03 -05:00
Daniel DeGrasse
e075569646 boards: nxp: add documentation for SEGGER SystemView support with ECC
SOCs using ECC require the SEGGER RTT control block address to be
provided to the tooling, as the SEGGER tools will not scan the memory
range of ECC ram. Add documentation making this clear to boards with
these SOCs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-30 16:31:39 -05:00
Riadh Ghaddab
99b7080aba MAINTAINERS: add myself rghaddab to collaborators of Flash
Add myself to the collaborator list of flash to contribute to the work
of enhancement of flash API

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-30 16:31:24 -05:00
Daniel Leung
38825c0ac5 tests: timer_behavior: use fabs() instead of abs()
abs() takes integer as argument but time_diff_us is of double.
So use fabs() instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-30 16:31:15 -05:00
Daniel Leung
cc5adf2e92 tests: timer_behavior: change sqrtf() to sqrt()
sqrtf() is used for floats but the argument and resulting
variable are both doubles. LLVM would complain about
implicit conversion from float to double. So use sqrt()
instead as it is used with doubles.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-30 16:31:15 -05:00
Sa Sasu
5dc5fa5ee2 scripts: print the file name when decode syscall
the script shows an incorrect file name, I check the wrong file first, then
I find the script did not print the current reading file name.

Fix this to prevent others from wasting their time on this.

The new error message:

```
[1/179] Generating syscalls.json, struct_tags.json
Error decoding zmk/.../altera_msgdma.c (included in zephyr/.../ethernet.c)
```

Signed-off-by: Sa Sasu <i@sasa.su>
2024-10-30 14:30:55 -05:00
Pieter De Gendt
fa29a07526 doc: develop: west: Add alias documentation
Add documentation and examples for west aliases.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-30 14:30:31 -05:00
Jonathon Penix
e020f31fdb cmake: libc: minimal: Avoid linking against other libc implementations
The minimal libc is currently built as a zephyr_library and will be
included in the final link line as such. However, the c_library property
will still be set as "-lc" (for most linkers) and will be added to the
link line. This effectively requires that a separate libc implementation
be available in the toolchain and makes it possible to accidentally pull
from the non-minimal libc.

This doesn't seem desirable, so try to prevent this by clearing the
c_library property if we are using the minimal libc.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-10-30 14:29:37 -05:00
Dominik Ermel
d7765ccae7 tests/stream_flash: Disable SPI_NOR on nrf54l devices
The stream flash test has been written with SoC internal
storage in mind and its simplified structure does not take
into account possibility of existence of devices with
different erase characteristics, at run time.
The commit fixes the test failing with Nordic bords that
have CONFIG_SPI_NOR=y set by default, which made test
to behave like device with erase capability has been tested.

The commit sets CONFIG_SPI_NOR=n for nrf54l devices.

Fixes #79181

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-30 14:29:13 -05:00
Jacob McClellan
39042dc9cc logging: Initialize 'chosen' pointer in z_log_msg_claim_oldest to NULL
Fixes a compiler warning 'chosen' may be uninitialized when later
dereferenced

Signed-off-by: Jacob McClellan <mcclellanjacob@meta.com>
2024-10-30 14:28:52 -05:00
Jeroen Broersen
f889c1abab net: lwm2m: Add TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 to cipher list
Add TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 to the list for use with x509
certificates. The LWM2M v1.1 specification says that a LWM2M client
which used X509 certificates must support this ciphersuite and
additional ciphersuites may be supported.

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-10-30 14:27:40 -05:00
Emil Gydesen
3a8ce6efb4 tests: Bluetooth: tester: Add logging of messages for BTP
Add log statements for each command, event and response
for debugging purposes.

Tests do not send enough of these to clutter the IUT logs
and it is useful for debugging to more easily determine
what command triggered a function call or when the
responses and events are sent to the AutoPTS client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-30 14:27:23 -05:00
Benjamin Cabé
3c83604b84 doc: extensions: check dead zephyr_file/zephyr_raw links
Add a check to ensure that all zephyr_file/zephyr_raw links are pointing
to valid paths in the current zephyr tree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Benjamin Cabé
14d0a19cc2 doc: fix occurrences of broken zephyr_file: links
In preparation of adding a check for dead references, this commit fixes
currently broken zehpyr_file: links.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-30 09:43:50 -07:00
Chaitanya Tata
92985011b6 drivers: nrfwifi: Fix memory leak in TX path
During secure association, if we get any data packets from the
networking stack (as we switch off the dormancy) then they will be
dropped till the 802.1x port is authorized, but with recent changes the
corresponding network buffer isn't freed causing a memory leak.

Handle this case and free the network buffer (Using an OSAL API though
it's Zephyr to avoid duplication and also getting access to "struct
nwb");

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-30 09:43:41 -07:00
Fin Maaß
83c3b1c708 drivers: flash: spi_nor: simplify defines
simplify defines by using `DT_INST_**_OR` macros.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-30 09:43:18 -07:00
Fin Maaß
27aeabb5b2 drivers: flash: spi_nor: fix config struct
lots of values from the DT where not set corretly, if
`CONFIG_SPI_NOR_SFDP_RUNTIME` was
enabled. This fixes it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-30 09:43:18 -07:00
Reto Schneider
0cf71d9624 samples: drivers: crypto: Make clang-format happy
Without this, check_compliance.py suggests to run clang-format on the
changed code lines.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 09:43:00 -07:00
Reto Schneider
09dc9dcb0d samples: drivers: crypto: Align buffers
This change extends what e1e19732bc
(samples: drivers: crypto: Aligned AES key) has started: For certain
architectures (i.e. Si32), the alignment of the used buffers is
important as the AES HW engine uses DMA and inherits its restrictions.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 09:43:00 -07:00
Reto Schneider
83345401d6 samples: drivers: crypto: Improve memory alignment
Commit e1e19732bc (samples: drivers:
crypto: Aligned AES key) introduced the alignment for the key. According
to the commit message, the intention was to align the variable at 32 bit
boundaries. For this reason, passing 32 to __aligned seems like an
error, as its argument is denoted in byte and not bits.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-30 09:43:00 -07:00
Artur Wilczak
9cce72daa1 boards: Fix to accommodate for slowly tests on UP2
To accommodate for some slow tests on up2.
For example: tests/arch/x86/info/arch.x86.info.userspace
Execution time of this test is close to 55s and sometimes
above up to the 60s.
Related issue: #80134

Signed-off-by: Artur Wilczak <arturx.wilczak@intel.com>
2024-10-30 08:58:19 -05:00
James Roy
050fa718c8 style: Inconsistent macro names changed
Fix incorrect header file pre-macro names in
'include/zephyr/shell' and 'include/zephyr/task_wdt'.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-30 08:55:36 -05:00
James Roy
3c1fb41136 style: Inconsistent macro names changed
Fix incorrect header file pre-macro names in
'include/zephyr/app_memory', 'include/zephyr/display'
and 'include/zephyr/mgmt'.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-30 08:55:36 -05:00
Gerson Fernando Budke
b46e176704 mgmt: mcumgr: stat: Fix stat_mgmt_list behavior
The MCUmgr statistics only work correctly when selecting
MCUMGR_SMP_LEGACY_RC_BEHAVIOUR option. Checks the option
flag on the stat_mgmt_list and fix the behavior.

Fixes: 80476

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-10-30 08:55:23 -05:00
Carles Cufi
2fd8cc8d88 linker: lto: Remove experimental label
LTO support was added with Zephyr 3.6.0, and it has been used in
production with Nordic devices for a long time. Remove the experimental
label to mark it ready for production.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-30 08:55:06 -05:00
Anas Nashif
2c43d7fe76 twister: oot soc: set soc_root using Path
Set soc_root using Path to avoid wrong generated path in the list of
soc_roots and other roots read from module.yml file

Fixes #80531

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-30 08:54:49 -05:00
Jamie McCrae
f277631b60 sysbuild: Add missing option for MCUboot encryption support
Adds a missing 'default y' for the Kconfig option indicating that
encryption is supported with the current configuration

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-30 08:54:33 -05:00
Tomi Fontanilles
f380fcc52f drivers: modem_cellular: fix handling of +C*REG answers
`+C*REG:` may be received as AT read command answer
or unsolicited notification.
Their syntax differs, and even the overall parameter count varies
depending on what `<n>` is used in the `AT+CEREG=` write command.

To handle all cases properly, check the parameter count and
the presence of the `<tac>` parameter (which is a string and
thus begins with `"`) to figure out what is the position of `<stat>`.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-30 08:54:17 -05:00
Alberto Escolar Piedras
a30e41f4d7 manifest: Update bsim to version v2.4
Main changes since v2.3:
* Support for immediate RSSI measurements during abort reevaluations
* Several minor improvements in the base components, including
  tolerating better under-setup docker images, improved C++
  compatibility, a new sanity check for problematic user provided
  sim_ids, and other minor improvements.

Note: Like before, bsim remains fully backwards compatible

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-30 08:54:04 -05:00
Filip Kokosinski
b17156692f tests/kernel/device: add missing #power-domain-cells in overlays
This commits defines the `#power-domain-cells` properties for fakedomain
nodes in the HiFive Unmatched devicetree overlay file.

Without this change, this tests fails to build for the `hifive_unmatched`
Zephyr target.

Fixes #80503.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-30 08:53:49 -05:00
Jordan Yates
c22233a1af net: nsos_sockets: free allocated socket on close
Free the socket object allocated in `nsos_socket_create` when closing
the socket.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-30 01:21:18 +00:00
Raffael Rostagno
303c7d7e69 soc: dts: esp32c3: esp8685: Add files to indicate support
Add SoC dtsi files to indicate support/compatibility with ESP32C3.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-29 16:04:02 -07:00
Daniel DeGrasse
d3fac0b7fe soc: nxp: mcx: do not select HAS_SEGGER_RTT unless segger module is present
Do not select HAS_SEGGER_RTT unless the segger module is present. This
avoids a Kconfig error when SEGGER's debug module is not present in the
west manifest

Fixes #80529

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-29 16:02:57 -07:00
Stephanos Ioannidis
cd9ddc95a8 arch: arm: cortex_a_r: Fix mrc/mcr instruction usage
The coprocessor number in ARM `mrc` and `mcr` instructions must be prefixed
with `p`.

GNU assembler allows specifying coprocessor number without the `p` prefix;
but, LLVM assembler is more picky about this and prints out "invalid
instruction" error otherwise.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-29 16:02:16 -07:00
Ian Morris
adced0c29b drivers: serial: fix renesas ra sci uart hardware flow control enable
Fixed typo in Renesas RA SCI UART configuration that was preventing
hardware flow control from being enabled.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-29 16:01:38 -07:00
Raffael Rostagno
0d1a788e38 samples: wifi: esp32c2: esp8684: Remove config files
Remove wifi sample config files for esp32c2/esp8684, as device
isn't able to run it after memory layout update.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-29 14:19:06 -05:00
Raffael Rostagno
dbebc9983a tests: wifi: esp32c2: esp8684: RAM adjustment config
RAM adjustments to fit smaller SRAM availability on ESP32C2/ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-29 14:19:06 -05:00
Fin Maaß
b8999973d3 drivers: spi: litex: add flush of rx buffer
this flushes the rx buffer before the
start of a new transaction. It is needed
because the litex bios is not always
reading the rx buffer.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-29 14:18:41 -05:00
Anas Nashif
6261e2a673 Revert "kernel: banner: Expose tainted builds"
This reverts commit 6d4031f96c.

Those makes majority of builds og platforms with blobs tainted although
the blob were not used or compiled in. So it is very misleading.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-29 14:17:21 -05:00
Johan Carlsson
a3530d6a43 drivers: spi: mcux_flexcomm: use rxignore bit instead of dummy read.
when no rx data need to be read set the rxignore bits.
with this change the dma setup is faster and no unnecessary
dummy writes are done to memory.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-10-29 14:16:56 -05:00
Johan Carlsson
ff5afd8a9a drivers: spi: mcux_flexcomm: wait for specific dma tx status.
when sending multiple bytes only the DMA_STATUS_COMPLETE
status is interesting. otherwise the semaphore will be signaled twice.

Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
2024-10-29 14:16:36 -05:00
David Leach
46042f73cf soc: nxp: lpc55s69: Fix part number typo
There is a typo in the part number list for LPC55S69. The
LPC55S69JET98 should be LPC55S69JEV98.

Fixes #80541

Signed-off-by: David Leach <david.leach@nxp.com>
2024-10-29 14:16:16 -05:00
Hao Luo
022c8ee1af drivers: gpio: ambiq: fix port status get error
It's not possible to get pinconfig of specific pin
in ambiq_gpio_port_get_raw function, change to use
OR value of RD and WT registers for one group of gpio.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-29 09:34:30 -07:00
Gerard Marull-Paretas
4e5df113c5 dts: nordic: remove clock-frequency from all i2c nodes
Device driver now defaults to I2C_BITRATE_STANDARD if not specified.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-29 09:27:05 -07:00
Gerard Marull-Paretas
92c3495493 drivers: i2c: nrfx_twi[m]: default to I2C_BITRATE_STANDARD
Instead of forcing a definition in Devicetree. Right now, SoC DT files
contain this default, but it should not be part of SoC DT files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-29 09:27:05 -07:00
Bjarki Arge Andreasen
fc4f385e82 boards: shields: nrf7002ek: align with nrf700x split interface
Add variant for the coex interface and move the coex interface out
if the wifi/control interface variants.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-29 09:25:18 -07:00
Bjarki Arge Andreasen
1dc1d5be5f boards: shields: nrf7002eb: align with nrf700x split interface
Exclude the coex interface if the coex variant of the nrf7002eb
is selected instead of adding the interface alongside the
wifi/control interface.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-29 09:25:18 -07:00
Bjarki Arge Andreasen
e23de8bf74 boards: nordic: nrf7002dk: align with nrf700x split interface
Remove the unused coex interface from the cpuapp of the nrf7002dk
nrf5340 SoC.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-29 09:25:18 -07:00
Bjarki Arge Andreasen
c48c0ed0b8 dts: bindings: wifi: split nrf700x coex and wifi models
The nrf7000, nrf7001 and nrf7002 expose a coex hardware interface
which is independent from the wifi/control interface (spi and
control pins)

These interfaces where previously combined into a single model. This
is incompatible with the actual usage of the interfaces where one
core may interact only with the coex interface, and another with the
wifi/control interface.

This commit moves the coex interface, commonly described in
"nordic,nrf70-coex.yaml", out of the wifi/control models
"nrf700<variant>-<bus>.yaml" to its own models
"nrf700<variant>-coex.yaml"

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-29 09:25:18 -07:00
Nik Schewtschuk
328e4a5039 soc: espressif: esp32s3: Adjust BOOTLOADER_DRAM_SEG_LEN for worst case
Larger image partitions require more space in DRAM due to
the increase in .bss.sector_buffers.
Each sector in .bss.sector_buffers consumes 16 bytes.
In the worst case scenario, such as with the ESP32S3 N32R8V,
which has 32 MB of flash and most likely 12 MB image partition,
an addition of 0xc000 should be sufficient to accommodate this.

Signed-off-by: Nik Schewtschuk <nikita.schewtschuk@smartmechatronics.de>
2024-10-29 09:24:55 -07:00
Alberto Escolar Piedras
2af45d1d78 subsys/bluetooth/host/keys.h: Add include guard and required include
This header requires bluetooth.h but was not including it itself.
Due to this we had 2 tests failing to build.
Let's just include the dependencies to this header instead of
relaying on users including the dependencies dependencies in
the right order.

Also, let's add an include guard as in a test this header was
included twice leading to weird build errors.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-29 09:24:13 -07:00
Alberto Escolar Piedras
14e870d8d3 tests/bluetooth/host/keys/bt_keys_get_addr: Correct mock prototypes
In 82d8f09de1
the bt_conn_foreach prototype was changed, but these unit tests
kept using the old prototype which leads to a build warning.
Let's fix the prototype in the tests.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-29 09:24:13 -07:00
Stephanos Ioannidis
e1389fa2cf ci: doc-publish-pr: Improve workflow security
Improve workflow security.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-29 21:48:50 +09:00
Gang Li
14478cafa6 hostap: fix the issue of HE IE in beacon when disabled 11AX
Add WIFI_NM_WPA_SUPPLICAT_11AX Kconfig to enable or disable 11AX.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-10-29 07:11:33 -05:00
Khoa Nguyen
b56d6e670e drivers: counter: fix AGT renesas prefix properties
- Modify the macro in source code AGT to get the right data from
device tree
- Modify name of agt node

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-10-29 07:11:04 -05:00
Krzysztof Chruściński
da53adfc56 drivers: serial: uart_async_to_irq: Fix uart_irq_tx_complete
uart_irq_tx_complete is implemented by z_uart_async_to_irq_irq_tx_ready
which changed recently (5bd53b6e2) to return positive value that may be
bigger than 1. uart_irq_tx_complete shall not return value bigger
than 1.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-29 07:10:08 -05:00
Simon Tomschik
1647ad5c0a timing: fix ARM Cortex-M timing functions wrap-around issue
Added casts to uint32_t in arch_timing_cycles_get() to handle the
wrap-around of the 32-bit cycle counter correctly.

Signed-off-by: Simon Tomschik <simon.tomschik@askgroup.global>
2024-10-29 07:09:34 -05:00
Dimitrije Lilic
5ee9d7a869 driver: sensor: adxl345: Bug fix for q31_t conv
This is a bug fix for adxl345_accel_convert_q31 functions.
Functions are used to convert samples received from
sensor to q31_t format when RTIO stream is used.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-29 07:09:13 -05:00
Sudan Landge
5030938b78 arm: linker: fix: incorrect __kernel_ram_start
What is changed?
arch32 related changes in linker script made in commit
ad71901490
are reverted.

Why do we need this change?
The main intention of the previous commit was to fix the
broken ci for aarch64.
There was no issue reported for aarch32 and changes were made for
consistency.
However, it looks like keeping the `__kernel_ram_start`
outside of the bss section works differently for different boards.
For fvp_baser_aemv8r arch32, _bss_start points to _rom_region_end and
__kernel_ram_start points to some region between _rom_region_start and
_rom_region_end which leads to test failure.
While for other board like v2m_musca_b1, _bss_start and
__kernel_ram_start are same.
The linker scripts might need a cleanup to avoid issues because of
these inconsistncies however, till we understand this better,
we need to revert this change.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-29 07:08:21 -05:00
Reto Schneider
f23318fa9c doc: project: Fix collaborator reference
Commit 52e8b1058c (doc: project: clarify
WG member eligibility) broke the link to the collaborator section by
using nested inline markup, which is currently not supported:

https://docutils.sourceforge.io/FAQ.html#is-nested-inline-markup-possible

As the various workarounds are not recommended by Docutils, this change
simply ends the bold formatting before the link.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-29 07:08:09 -05:00
Andreas Huber
27d93f8b6c net: ipv4: Fix ARP probe check in address conflict detection
The second condition needs to check ARP probes only

The ACD is not properly implemented as described in RFC5227 ch. 2.1.1
The implementation incorrectly detects an IP conflict, if an ARP request
is received for the target IP.
The reason is that the current implementation checks for ARP requests
instead of ARP probes.

Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
2024-10-29 07:07:59 -05:00
Tahsin Mutlugun
94f307ab75 arch: xtensa: rename processor state save and restore calls
_xtos_pso_savearea and _xtos_core_restore_nw have been renamed to
xthal_pso_savearea and xthal_core_restore_nw in recent Xtensa
toolchains. Rename them in reset_vector.S to prevent linker errors
when building Zephyr with Xtensa toolchain.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-10-29 07:07:42 -05:00
Krzysztof Chruściński
ee1cbf063c drivers: serial: nrfx_uart: Fix poll_out for low baudrates
uart_poll_out had 1 ms timeout which is too short for lower baudrates.
Increase to 10 ms.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-29 07:07:27 -05:00
Riadh Ghaddab
46e1635773 fs: zms: multiple fixes from previous PR review
This resolves some addressed comments in this PR
https://github.com/zephyrproject-rtos/zephyr/pull/77930

It adds as well a section in the documentation about some
recommendations to increase ZMS performance.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-29 07:07:13 -05:00
Flavio Ceolin
ea0a211d6f net: http_server: Fix possible buffer underrun
Avoid possible underruns when an url is shorter than a handled
extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-29 07:06:50 -05:00
Tran Van Quy
afce5329f7 doc: boards: renesas: update board image name with the board name
Align Renesas board image name with board name

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-10-28 16:01:48 -07:00
Anas Nashif
b417524b66 twister: cleanup notrun tests with -M
Cleanup notrun tests with the -M option. This is used in the weekly
build and fails because devices will run out of space.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-28 15:58:23 -07:00
Alberto Escolar Piedras
3810fd3742 doc: release: 4.0: Add two more notes on the native targets
Add two more relevant notes regarding the native targets.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-28 12:20:00 -07:00
Jonas Remmert
a0b8908fda release-notes: add phyBOARD-Nash i.MX93
Add entry to release-notes as a follow-up to #76975.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-10-28 12:18:21 -07:00
Johann Fischer
5cdabfa902 include: usb: add API version
Add API versions to all relevant USB headers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-28 12:17:32 -07:00
Gerard Marull-Paretas
b5a87c7aca bluetooth: audio: bap: fix Doxygen issue
Doxygen was getting confused when expanding @kconfig (verbatim block
within []).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-28 12:16:16 -07:00
Gerard Marull-Paretas
a258ab32d1 doc: doxygen: remove rst utilities
We no longer render Doxygen content in Sphinx after the removal of
breathe, so let's remove rst related aliases from Doxyfile. Also adjust
some headers that contained rst content.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-28 12:16:16 -07:00
Lucas Mathias Balling
a673316b4f doc: releases: Add note for PAST support
Change adds a release note informing about the addition of
PAST support in the Controller.

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-28 12:16:02 -07:00
Babak Arisian
c90301300a MAINTAINERS: Add babrsn to Bluetooth Audio
I have contributed the following PRs:
https://github.com/zephyrproject-rtos/zephyr/pull/80000
https://github.com/zephyrproject-rtos/zephyr/pull/79360
https://github.com/zephyrproject-rtos/zephyr/pull/78846
https://github.com/zephyrproject-rtos/zephyr/pull/78751
https://github.com/zephyrproject-rtos/zephyr/pull/74950
https://github.com/zephyrproject-rtos/zephyr/pull/74946
https://github.com/zephyrproject-rtos/zephyr/pull/73845
https://github.com/zephyrproject-rtos/zephyr/pull/72849

and am attending the weekly LE Audio Zephyr meetings.

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-10-28 12:12:51 -07:00
Benjamin Cabé
8334ca2a85 doc: porting_guide: encourage the use of webp for board images
It's already mentioned in the board.tmpl template file as well as in
documentation writing guidelines so fix this leftover and make sure
people contributing boards aim for webp format as it helps with file
size while supporting transparency.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-28 12:12:25 -07:00
Dan Kalowsky
9f93dede36 VERSION: bump for 4.0.0 rc1
Update the VERSION file to reflect the tagging for 4.0.0rc1 release.

Signed-off-by: Dan Kalowsky <dkalowsky@amperecomputing.com>
2024-10-27 20:53:58 -05:00
Sylvio Alves
5678512fe8 soc: esp32s3: move cache mode call
Removed unused function declaration.
Added missing include.
Move Cache_Susped_DCache() call to proper
function configuration call.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
02fc5e3f66 soc: esp32s3: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
05b462a907 soc: esp32s2: add cache mode disabled option
Update data cache mode to work when data cache
is set to 0KB.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
279f4b8aec soc: esp32s2: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
a1a6e8a1a3 soc: esp32c6: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
be9574e482 soc: esp32c3: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
412921b594 soc: esp32c2: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
876a893018 soc: esp32: update linker files
Add new wifi sections into iram area.
Add new functions to iram area.
Remove unused entries.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
685c6e42b8 driver: ble: add custom espressif kconfig
Adds ESP32 custom configurations for BLE driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
a70741bc82 west.yml: update hal_espressif to latest version
- Update GDMA and ADC drivers and remove deprecated entries.
- Rebased hal_espressif to latest bump sync.
- Added ESP Timer and Radio common config values

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Sylvio Alves
b5c53d6ac4 wifi: esp32: move kconfig to driver area
Make sure all kconfig related to Wi-Fi is
in its driver area.
This commit also removes esp_timer_init() call
from Wi-Fi driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-27 20:53:48 -05:00
Carles Cufi
45fbc31a3f modules: hal_nordic: Require nrf-regtool 7.0.0
Some upcoming changes require this version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-27 14:30:33 -07:00
Vinayak Kariappa Chettimada
23f03dcd84 samples: Bluetooth: hci_uart hci_ipc configuration update
Updates to project configuration extras to build with
Zephyr Controller.

Configure for 2 broadcast audio sources in 2 groups,
2 unicast audio source in 1 group and, 2 audio sinks
for 1 group for both broadcast and unicast usecases.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
7f4bfdfd63 samples: Bluetooth: hci_uart(_3wire)/hci_ipc: Enable PAST feature
Enabled Periodic Advertising Sync Transfer feature in the
Bluetooth Low Energy HCI Controller samples.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
14d5b8d63d samples: Bluetooth: hci_uart_3wire: Align Kconfigs with hci_uart
Align Kconfig values used with bt-ll-sw-split Controller as
same used in hci_uart sample.

Relates to commit 2c6306d099 ("Bluetooth: Controller:
BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU")'.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
9a8b1b1d72 Bluetooth: Controller: Fix compile error when BT_CTLR_PRIVACY disabled
Fix compile error when BT_CTLR_PRIVACY is disabled. Compile
error seen building hci_uart sample for nrf54l15dk.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
742ffd5b16 Bluetooth: Controller: Fix compile error missing lll_df_types include
Fix compile error due to missing lll_df_types include.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
bb4c44153b samples: Bluetooth: broadcaster_multiple: Refactor for reuse
Refactor the sample so that multiple advertising setup can
be reused in other sample if required. Bluetooth enable can
be in the sample that reuses the advertising setup.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
7048b0fa4b samples: Bluetooth: iso_broadcast: Fix buf alloc timeout
Fix buf alloc timeout to 20 millisecond as the sent callback
can have a latency that is upto twice the ISO interval.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
eb180052bb samples: Bluetooth: iso_broadcast: Restrict max stream sync
Restrict possible maximum stream synchronization to
implementation defined 2 stream, as structure declarations
in the implementation is limited to 2.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Vinayak Kariappa Chettimada
906ae3591c Bluetooth: Controller: Fix ISO Sync Receiver BIS payload dereferencing
Fix incorrect use of BIS indices to dereference the payload
array, instead correctly use synchronised stream indices.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-27 20:26:35 +00:00
Håkon Amundsen
26603cefaf dts: update memory map and remove ext-uicr
Extended UICR will not be used as its configurations will be merged
with the UICR registers in NVR.

Memory maps changes are needed to align with pre compiled
firmware.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2024-10-27 16:20:25 +01:00
Carles Cufi
d73fda80a6 ci: Switch to CI image v0.27.4
This commit updates the CI workflows to use the CI image v0.27.4, which
includes nrf-regtool v7.0.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-27 16:20:25 +01:00
Alessandro Manganaro
4b4bba4fa4 soc: st: stm32: stm32wbax: STM32WBA Cube 1.4.1 integration
Removed unnecessary pure HAL stm32 functions

Headers cleanup

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-10-27 01:08:47 +02:00
Alessandro Manganaro
13f1200e77 soc: st: stm32: stm32wbax: Files renaming
Files renaming done to better isolate zephyr related
functions from stm32 hal related functions

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-10-27 01:08:47 +02:00
Mathieu Choplain
5e7009a120 tests: adc: adc_api: add overlay for Nucleo-WB05KZ
Add an overlay to the test to allow build for this board (needed for CI).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
59b469725b tests: adc: adc_api: add overlay for Nucleo-WB09KE
Add an overlay to the test so that it can run on STM32WB0 series hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
5dd9fda746 boards: st: wb0: add ADC to supported feature set
Add ADC to supported feature set on existing STM32WB0 boards.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
27c2c62c64 dts: arm: st: wb0: add ADC node
Add Device Tree node corresponding to STM32WB0 series ADC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
c86f0ac6f3 drivers: adc: stm32: add STM32WB0 ADC
Add driver for ADC in STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
189d021128 dts: bindings: adc: add STM32WB0 ADC
Add DT binding for STM32WB0 series ADC.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Mathieu Choplain
51412b5875 soc: st: stm32wb0: make SMPS mode visible to drivers
Make the SMPS_MODE define visible from drivers by moving it to soc.h

This define is for example used by the ADC driver to determine if sampling
should be synchronized with the SMPS clock.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Patryk Biel
4670181986 boards: seeed: Add support for XIAO ESP32S3 Sense
The Seeed Studio XIAO ESP32S3 Sense board is a board based on the XIAO
ESP32S3 board with a soldered B2B connector that allows to connect
an extension board with a camera sensor, microphone and the sdcard slot.

Signed-off-by: Patryk Biel <pbiel7@gmail.com>
2024-10-26 19:57:51 +02:00
Torsten Rasmussen
c4fcf56e76 doc: extend board porting guide with new board extend feature
Extend the board porting guide with documentation on the new board
extend feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Grzegorz Swiderski
276c1fc4a0 scripts: Undo Board.{dir -> directories[0]} renames
`Board.dir` can be used in place of `Board.directories[0]` for brevity.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Grzegorz Swiderski
a1f3f882fd scripts: list_boards: Reintroduce Board.dir as @property
In the `Board` class, the `dir` member was renamed to `directories`,
both to indicate that it is now a list (in HWMv2 with board extensions)
and to reflect the addition of the `BOARD_DIRECTORIES` CMake variable.
Considering that the build system also keeps the `BOARD_DIR` variable,
and for the sake of backwards compatibility and brevity, it should be
useful to retain `Board.dir` in Python as well, symmetrically.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Jamie McCrae
33e70b32dc scripts: list_hardware: Do not check qualifiers for run once config
Removes validating the qualifiers for flash run once configuration
as files may be present that contain information for qualifiers
that are not present in a single repository but are spaced out in
other repositories, or might be optional

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Jamie McCrae
a04dfc4ece scripts: west_commands: run: Add priority to run once config
Adds an optional priority parameter to the flash runner run once
configuration which allows for deciding upon which file should
ultimately be used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Torsten Rasmussen
f3151571ba tests: add twister tests for CMake board and SoC extension
This commit adds new tests for verifying the functionality of the board
and SoC extension feature.

It does so by defining:
- A new CPU cluster on an existing SoC
- Two new board variants on top of an existing board

The new board variants are defined on top of the existing `native_sim`
board, so that the following native_sim board targets are available for
the test.
Existing board targets:
- native_sim/native
- native_sim/native/64

Extended board targets:
- native_sim/native/one
- native_sim/native/64/two

The new CPU cluster is defined for the existing `an521` SoC.
Existing CPU Clusters on an521:
- cpu0
- cpu1

New CPU Cluster:
- cputest

For SoC tests the mps2 board is used.
This means that for testing, the following board targets using the an521
SoC are:
- mps2/an521/cpu0
- mps2/an521/cpu1
- mps2/an521/cputest

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Torsten Rasmussen
98b186c110 cmake: scripts: support SoC extension
Fixes: #72374

Support extending an existing SoC with new CPU clusters.

This commit introduces the following changes to allow an SoC to be
extended out-of-tree.

The SoC yaml schema is extended to support an extend field which
will be used to identify the SoC to be extended with extra CPU clusters.

A SoC 'a_soc' can be extended like this:
> socs:
>   extend: a_soc
>   cpuclusters:
>     - name: extra_core

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Torsten Rasmussen
536d34fa7a cmake: scripts: support board extension
Fixes: #69548

Support extending an existing board with new board variants.

This commit introduces the following changes to allow a board to be
extended out-of-tree.

The board yaml schema is extended to support an extend field which
will be used to identify the board to be extended.

A board 'plank' can be extended like this:
> board:
>   extend: plank
>   variants:
>     - name: ext
>       qualifier: soc1

For the rest of the build system this means that there is no longer a
single board directory.
The existing CMake variable BOARD_DIR is kept and reference the
directory which defines the board.
A new CMake variable BOARD_DIRECTORIES provides a list of all
directories which defines board targets for the board.
This means the directory which defines the board as well as all
directories that extends the board.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Torsten Rasmussen
e2f5ac01c7 cmake: cleanup hwm_v2.cmake module code
Cleanup the Kconfig generating code in hwm_v2.cmake by moving common
logic inside the kconfig_gen() helper function.

This prepares the code for board extension feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-26 17:14:06 +02:00
Aleksander Wasaznik
47325f8df5 Bluetooth: Host: Test L2CAP -EINPROGRESS feature
The test implementation is based on a copy of the HFC multilink test.
The test verifies that the stack respects the reference counting of SDU
buffers when the L2CAP -EINPROGRESS feature is used.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-26 17:13:45 +02:00
Aleksander Wasaznik
abeca24702 Bluetooth: testlib: Add BT_TESTLIB_ADDR_LE_RANDOM_C0_00_00_00_00_
This is shorthand for random static addresses. It's similar to
`bt_addr_le_from_str`, but is a macro that results in an object literal,
making it more versatile and less verbose.

This macro only gives access to the first 255 random static addresses,
but this ought to be enough addresses for testing.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-26 17:13:45 +02:00
Aleksander Wasaznik
5f89a6b8f1 Bluetooth: Host: Add BT_TESTING trace event for ACL pool destroy
This is needed for a test to catch a double-free.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-26 17:13:45 +02:00
Aleksander Wasaznik
70ad45d4d9 Bluetooth: Host: Upgrade log severity for L2CAP user error
For ease of development, we should log the event as an error.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-26 17:13:45 +02:00
Aleksander Wasaznik
200de7c00a Bluetooth: Host: Fix bt_l2cap_chan_ops.recv -EINPROGRESS
Fix discrepancy in reference management between calls to
`bt_l2cap_chan_ops.recv` when the application returns `-EINPROGRESS`.

There are two call sites, `l2cap_chan_le_recv_sdu` and
`l2cap_chan_le_recv`, that were inconsistent.

`l2cap_chan_le_recv_sdu` moves the reference, and this patch updates
`l2cap_chan_le_recv` to do the same.

This behavior is also now documented.

This bug has existed since the introduction of this feature in
3151d26572.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-26 17:13:45 +02:00
Anas Nashif
7066c40afc twister: also convert platform names from the hardwaremap
Convert platform names from the hardware map to full target names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-26 13:41:55 +02:00
Anas Nashif
e90559f0da twister: fix platform filter when loading plan from file
if alias or shorthand name is provided on the command line, we need
convert this to complete target name for the filters to work.

Fixes #80332

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-26 13:41:55 +02:00
Anas Nashif
625246f241 twister: --device-testing always implies --filter runnable
--device-testing implies runnable tests, this was the case before the
rework and was missed in one spot, so instead do that directly in the
argument parser.

Fixes #80428

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-26 13:41:43 +02:00
Dominik Ermel
7b701a40d5 tests: fs: fcb: Make fixed endmarker test optional
The commit splits default FCB scenario into one with endmarker
enabled, the original one, and one with disabled.
This allows to test the FCB in cases when CONFIG_FCB_ALLOW_FIXED_ENDMARKER
is set and not set.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-26 11:31:25 +02:00
Hao Luo
1e5cdb110a drivers: spi: Add SPI device support for Apollo3 SoCs
This commit adds spi device support for Apollo3 SoCs.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-26 11:31:11 +02:00
Pieter De Gendt
c2b6bcc660 scripts: west_commands: build: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:59 +02:00
Pieter De Gendt
8b0edb2b22 scripts: west_commands: sign: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:49 +02:00
Pieter De Gendt
46cc7a054d scripts: west_commands: spdx: Remove deprecated west.log
The global state west.log is deprecated, replace with WestCommand
logging.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-26 11:30:29 +02:00
Savent Gate
4e879ab518 drivers: watchdog: wdt_dw: add missing header
Needs zephyr/irq.h to compile it.

Signed-off-by: Savent Gate <savent_gate@outlook.com>
2024-10-26 11:30:18 +02:00
Daniel Baluta
4f88301bc9 drivers: sai: Use 0x0 as clock id if none is provided
We use the name cell at a given index to retrieve
a clock's id.

But not all clocks provide a name cell, so use 0x0 as clock-id
for these situations.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-10-26 11:30:07 +02:00
Jilay Pandya
0687522cd4 drivers: stepper: introduce invert-direction property to gpio-stepper
This commit introduces invert-direction property to gpio-stepper

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-10-26 11:29:57 +02:00
Jilay Pandya
367f853a4c drivers: stepper: rename compatible of gpio-stepper
This commit fixes minor copyright issues and corrects the compatible of
gpio-stepper with the vendor name as zephyr

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-10-26 11:29:57 +02:00
Alberto Escolar Piedras
9a50c10b34 drivers/wifi/winc1500: Fix build warnings with 64bit targets
Fix a set of warnings like:
drivers/wifi/winc1500/wifi_winc1500.c:332:25: error: cast from pointer
to integer of different size [-Werror=pointer-to-int-cast]
  332 |         SOCKET socket = (int)context->offload_context;

when int and void* do not have the same size, by casting the content
of context->offload_context to intptr_t which is whichever integer
size matches the pointer size.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-26 11:29:46 +02:00
Ben Booher
4a8a035bd7 drivers: sensor: dacx3608: add broadcast register for synchronized output
The dacx3608 line supports a broadcast register so all configured channels
can output a singular value, simultaneously. This drastically reduces I2C
overhead when using multi-channel control. An API addition was necessary
to support a global broadcast channel number. The API addition does not
break the write_value() implementation for other DAC drivers in the repo.
This change is based on an out-of-tree driver developed internally to
handle this use case.

Alternative to the API change, could be a KConfig option or device tree
entry. Also, no support for the Broadcast channel was added to the
channel_setup() implementation - this may or may not be confusing. I
believe it makes sense to maintain explicit setup calls for each channel
intended to be configured.

Signed-off-by: Ben Booher <benbooher@pull-repo.com>
2024-10-26 03:59:35 +01:00
Andries Kruithof
f268bfa419 Bluetooth: Audio: shell command for broadcast reception stop
Implement the shell command for the CAP procedure
'broadcast reception stop'

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-10-26 03:59:04 +01:00
Emilio Benavente
58b8d38cab boards: nxp: frdm_mcxn947: Enabled IRTC Driver.
Enabling the IRTC Driver for the frdm_mcxn947 board cpu0.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-26 03:58:48 +01:00
Emilio Benavente
97b73b3234 dts: arm: nxp: Added IRTC Binding.
Added IRTC Binding Support.
Applied Binding support for MCXN94x Devices.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-26 03:58:48 +01:00
Emilio Benavente
4d77aa1eff drivers: clock_control: syscon: Added Clock support for IRTC.
Added Clock Support code for the MCXN947 when IRTC is enabled.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-26 03:58:48 +01:00
Emilio Benavente
ca3041f11a drivers: rtc: Added IRTC Driver Support.
Added NXP IRTC Driver support and binding.
This driver is expected for users needing
Time Date info in their application.
The driver additionally has an alarm mode that
can be enabled to fire an intterupt when the time
and alarm values match.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-26 03:58:48 +01:00
Sudan Landge
f2e115cca3 arch: arm: fix null pointer dereference check test
What is changed?
Updated the condition thats prevents mpu config for null dereference.
Added a new check so that mpu is configured for null dereference if
devicetree contains a memory-region node with:
 - node address starting at 0
 - size covered by the node is more than the null dereference page
   size (0x400) and
 - contains a memory-attr

Why is the change needed?
The check relied on flash base address to align with 0 for
configuring the mpu for null dereference but, a device tree
could have a flash starting at an address other than 0 and
still need the mpu config for null dereference.
The new extra check provides a way to connfigure mpu for
null dereference even if flash base address is not 0.

Note, though this change helps with mpu config for new boards having
flash address other than 0, this change does not change existing
behaviour for existing boards.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-26 03:58:05 +01:00
Sudan Landge
caa7226157 boards: mps3: Add support for corstone310/an555
What is changed?
 - Added a new mps3 board an555 for the soc corstone310.
   The qualifier to build/run application with board mps3/an555 is
   `mps3/corstone310/an555` for secure and
   `mps3/corstone310/an555/ns` for non-secure.
 - Added FVP variant to enable FVP testing with corstone310
   and it uses the ARM FVP `FVP_Corstone_SSE-310`.
   The qualifier to build/run application with FVP is
   `mps3/corstone310/an555fvp` for secure and
   `mps3/corstone310/an555fvp/ns` for non-secure.

Why do we need this change?
 - This enables FVP support and testing for corstone310.
 - A separate FVP variant was added for AN555 because, the TFM board
   used for non-secure variant differs for FPGA and FVP.
   TFM board `arm/mps3/corstone310/an555` should be used when testing
   AN555 with FVP and `arm/mps3/corstone310/fvp` should be used when
   testing with AN555 FPGA.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-26 03:58:05 +01:00
Sudan Landge
3092d96e5b boards: mps3: Add support for corstone300/an552
What is changed?
 - Added a new mps3 board an552 for the soc corstone300.
   The qualifier to build/run application with board mps3/an552 is
   `mps3/corstone300/an552` for secure and
   `mps3/corstone300/an552/ns` for non-secure.
 - Added FVP variant to enable FVP testing with corstone300
   and it uses the ARM FVP `FVP_Corstone_SSE-300_Ethos-U55`.
   The qualifier to build/run application with FVP is
   `mps3/corstone300/fvp` for secure and
   `mps3/corstone300/fvp/ns` for non-secure.
 - Note: the qualifier to build/run application with board mps3/an547
   is now changed to
   `mps3/corstone300/an547` for secure and
   `mps3/corstone300/an547/ns` for non-secure.

How is it changed?
 - Moved common code from mps3/an547 to corstone300.
 - Renamed soc for an547 to corstone300 and added
   a new soc corstone300/an552.

Why do we need this change?
 - This enables FVP support and testing for corstone300.
 - SOC/qualifier for mps3/an547 was renamed to reduce code redundancy
 - A separate FVP variant was added for AN552 because, the TFM board
   used for non-secure variant differs for FPGA and FVP.
   TFM board `arm/mps3/corstone300/fvp` should be used when testing
   AN552 with FVP and `arm/mps3/corstone300/an552` should be used when
   testing with AN552 FPGA.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-26 03:58:05 +01:00
Bill Waters
abca729367 driver: pwm: infineon: cyw920829m2evk_02 pwm
- Enable PWM for the cyw920829m2evk_02 board

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2024-10-26 03:57:41 +01:00
Raffael Rostagno
5e3fe2765a tests: counter: overlays: Files cleanup
Moving overlay files from boards to socs as cleanup of
redundant configs.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-26 03:57:23 +01:00
Raffael Rostagno
891b946bc6 tests: counter: rtc: Change clock source for precision
Clock source is changed from RC_SLOW to RC_FAST_D256 in order
to improve clock precision and avoid tests failing due to
lower precision of RC clock (around 10%).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-26 03:57:23 +01:00
Raffael Rostagno
d33b8f6314 drivers: counter: rtc: esp32: Limit minimum time for set_alarm
Include value of 30 us as not valid to set alarm for RTC counter.
Change included to allow RTC timer to be properly set to use
RC_FAST_D256 as clock source.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-26 03:57:23 +01:00
Chaitanya Tata
7d696f5b69 drivers: nrfwifi: Fix label name
The label is used for both positive and negative cases, so, should be
called "out".

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-26 03:57:12 +01:00
Chaitanya Tata
2ea25ea238 drivers: nrfwifi: Fix regulatory domain regression
Recent WPA supplicant changes have broken nRF regulatory support,
implement the new set/get country WPA supplicant ops.

WPA supplicant: Regulatory SET through WPA supplicant, GET is direct to
the driver

Scan only: SET and GET direct calls to the driver

Fixes #79916.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-26 03:57:12 +01:00
Maureen Helm
fac21acc6b samples: sensor: Add adxl362 streaming and trigger configurations
Adds adxl362 streaming and trigger configurations to accelerometer
samples for profiling the performance impact of adding rtio support to
max32 spi and adxl362 accelerometer drivers.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-26 03:56:58 +01:00
Maureen Helm
9ca3826abf drivers: sensor: adi: Set trigger thread name
Sets the trigger thread name for all adi sensor drivers to more clearly
identify the thread when tracing or debugging.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-26 03:56:58 +01:00
Reto Schneider
17d9e75e3b bluetooth: shell: Test BT_CTLR_DTM
This ensures that enabling BT_CTLR_DTM does not break the compilation of
the Bluetooth shell.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-26 03:55:41 +01:00
Reto Schneider
f64747b792 bluetooth: shell: Fix includes
This allows to build the shell with BT_CTLR_DTM and/or BT_CTLR_ADV_EXT
enabled.

The issues has been introduced by commit
bf897cf941 (Bluetooth: Shell: Restructure
shell files).

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-26 03:55:41 +01:00
Benjamin Lindqvist
f8a7035c0a net: coap_client: signal socket error to user
Before this patch, any unexpected socket error during poll (caused by
LTE disconnects for instance) would lead to a infinite loop because the
error state was never cleared, handled or even signaled to the user.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2024-10-26 03:55:20 +01:00
Vladislav Pejic
832bbd8030 driver: sensor: adxl372: Bug fix for q31_t conv
This is a bug fix for adxl372_accel_convert_q31 function.
Function is used to convert samples received from
sensor to q31_t format when RTIO stream is used.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-26 03:54:23 +01:00
Krzysztof Chruściński
9ccaf9b5bd drivers: serial: nrfx_uarte: Minor code size optimization
Optimize function which enables UARTE peripheral. It is called
only when interrupts are locked so data->flags does not require
atomic operation. Use standard logical operations so save few
bytes.

Simplify uarte_disable_locked.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
7e94fca0bd drivers: serial: nrfx_uarte: Use legacy shim by default
So far new platforms did not use legacy shim but it shall
be now a default uart shim for all platforms.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
68903ca8dd drivers: serial: nrfx_uarte: Improve RX FIFO flushing workaround
Improved a workaround. When FIFO is not empty then FLUSHRX
task will generate RXSTARTED event to indicated that DMA transfer
was started. This property can be used to detect when FIFO was
not empty and workaroud a HW bug where RX.AMOUNT register is not
updated after flushing empty FIFO.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
3ce19da43b drivers: serial: nrfx_uarte: Add runtime PM
Add runtime PM to the driver. When asynchronous or interrupt
driven API is used, there are 3 independent paths for enabling
the device: RX, TX and TX poll_out. TX poll_out requires special
handling because number of poll_out calls does not need to much
number of TXSTOPPED interrupts. To handle that special flag is
added. For standard RX and TX is simpler.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
cfc87dab75 drivers: serial: nrfx_uarte: Remove unused element from a structure
Remove aborted flag from uarte_async_rx structure. Flag is not
used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
Krzysztof Chruściński
a98bde993e drivers: serial: nrfx_uarte: Add missing closing bracket
A code ifdefed by UARTE_BAUDRATE_RETENTION_WORKAROUND was missing a
closing bracket. It was missed because CI did not compile any target
that is applying this workaround and enables code compilation.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-26 03:54:11 +01:00
David Brown
5969a10c30 drivers: pwm: rpi_pico: Convert clk calculations to fixed-point
Remove the use of floating point to calculate in
`pwm_rpi_get_cycles_per_sec` to fixed point calculations that result in the
same value.  There is still a division here, which is somewhat slow still,
but the end result about twice fast for the whole path through the led pwm
code.

Even better would be to cache these values, since there is no interface in
this driver to change the configuration past init time.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-10-25 18:11:14 -07:00
Maochen Wang
c1670f945b manifest: Update hal_nxp to add wifi related change
Update hal_nxp to add wifi related change

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-25 18:10:27 -07:00
Reto Schneider
618d44164a bluetooth: Remove migration hints
Zephyr 3.7.0 has been released and it is time to remove the migration
code added in 9cf07bbdb5 (bluetooth:
Rename rpmsg HCI driver and sample to ipc).

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-25 17:37:53 -07:00
Arif Balik
25272ae5ed samples: button: add comment for input subsys
We wanted to redirect users who wants a debounced driver #78813

Signed-off-by: Arif Balik <arif.balik@enda.com>
2024-10-25 17:36:54 -07:00
Henrik Brix Andersen
82c7f43275 boards: weact: usb2canfdv1: fix broken link
Fix broken link to the usb2canfdv1 default board configuration file.

Fixes: 25d9fc118f

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-10-25 17:34:25 -07:00
Øyvind Rønningstad
5049ac48c0 zcbor: Kconfig: Clarify docs for the ZCBOR_STOP_ON_ERROR config
Specify that it must also be enabled in code.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-10-25 22:47:53 +01:00
Phil Hindman
09574e68eb fs: littlefs: Gracefully fail when static buffers are too small
The cache_size and lookahead_size are set at compile time using the
CONFIG_FS_LITTLEFS_CACHE_SIZE and CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE values
from Kconfig, or from the cache-size and lookahead-size properties in a
'zephyr,fstab,littlefs' compatible in the devicetree.  Those values are
also used to statically allocate buffers that are pointed at by the
read_buffer, prog_buffer, and lookahead_buffer members of the lfs_config
structure.

At runtime, when using a block device, the cache_size and lookahead_size
are updated to be multiples of the underlying block device's block_size,
which may make them bigger than the original size used to allocate the
static buffers. Log an error and fail the operation when this occurs.

Signed-off-by: Phil Hindman <phindman@xes-inc.com>
2024-10-25 22:45:55 +01:00
Dominik Ermel
87ce37f7c4 storage/stream_flash: Make context const where not modified
The commit sets const qualifier struct stream_flash_ctx *ctx parameter
of Stream Flash API calls:
  stream_flash_bytes_written
  stream_flash_progress_save
  stream_flash_progress_clear

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-25 22:45:33 +01:00
Dominik Ermel
23805301b0 tests/storage/stream_flash: Add erase range check test
The commit adds test for stream_flash_erase_page range check.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-25 22:45:14 +01:00
Dominik Ermel
8714c172ed storage/stream_flash: Fix range check in stream_flash_erase_page
Added check where stream_flash_erase_page checks if requested
offset is actually within stream flash designated area.

Fixes #79800

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-25 22:45:14 +01:00
Declan Snyder
0d36622b05 doc: Fix dt_chosen_has_compat doc
Missing a parameter in this function documentation

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 22:44:51 +01:00
Gerson Fernando Budke
6a179996c3 soc: sam0: Speed-up xosc32 initialization
The current selected start-up time takes 8 seconds to initialize.
When xosc32 is used as main clock reference it blocks the whole
initializarion of the system by that amount of time. This patch
relax that condition setting the initialization time to 62ms.

Fixes #79949

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-10-25 22:44:35 +01:00
Flavio Ceolin
2ff2526c5c reports: footprint: Print footprint output
Both ram and rom reports print their outputs in the console
and publish their reports in json.

footprint is wrapper to generate both reports but it is currently
not printing their outputs in the console nor given any feedback to
the user that those reports were generated.

Change it to behave like the others reports allowing the user to see them
and / or redirect to a file if they want.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-25 22:44:07 +01:00
Emil Gydesen
1dd59ea203 Bluetooth: Audio: Remove BT_AUDIO_BROADCAST_CODE_SIZE
Removed the LE Audio specific definition and instead
refer to the value defined by iso.h as it is ISO/Core
that defines this size, and not BAP/Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-25 22:43:40 +01:00
Carles Cufi
0705a6301c west: runners: nrf: Add support for the suit manifest starter
With the recent introduction of the SUIT manifest starter binary blob,
it is now possible to use it with the nRF54H20 during the flashing
procedure in order to provide a valid SUIT manifest to the system.

This PR introduces the code that handles programming the SUIT manifest
starter, as well as a new --suit-manifest-starter command-line option.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-25 22:43:19 +01:00
Alberto Escolar Piedras
faba6325e9 modules/hostap: Fix size_t print format specifier
The format specifier for size_t is zu.
Using d only works when int and size_t are the same
underlying type which is not the case for 64bit systems,
which leads to a build warning in this case.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-25 22:43:01 +01:00
Jukka Rissanen
ea099b039f tests: net: wifi: Disable native/64 from tests
There are issues with 64 bit compilation in hostap so disable
native_sim/native/64 board from the tests. The board will be
enabled again after updating the hostap from upstream and fixing
the issues.

Fixes #80437

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 22:42:28 +01:00
Lars Knudsen
c966eac722 Bluetooth: Shell: Fix missing RX QoS param and MSE check
The bis_iso_qos.rx was missing in param sent in bt_iso_big_sync

Also, MSE = 0 is valid (fixed error check)

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-25 12:55:32 -05:00
Daniel DeGrasse
20e313496c dts: arm: nxp_mcxn94x: fix support for NS mode
Fix build error for MCXN94X devicetree for nonsecure mode

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-25 18:54:40 +01:00
Declan Snyder
4773975a6b scripts: Add dt_compat_any_has_prop value param
Add optional value parameter to dt_compat_any_has_prop
kconfig preprocessor function, which puts an additional constraint on
the truth of the function in that the property value must match the
parameter value.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:53:27 +01:00
Rubin Gerritsen
3023e76371 snippets: Add snippet for the Zephyr Bluetooth Controller
By defining this snippet it becomes simpler to build an application
for the Zephyr Bluetooth Controller in environments
where this is not enabled in device tree by default.

It removes the need for adding boilerplate overlay files
to applications.

Also, we would be able to add this snippet by default for
samples and tests where it is required to use the zephyr
link layer.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-10-25 12:52:33 -05:00
Declan Snyder
5f51b0acba boards: frdm_mcxw71: Enable ADC and tests/sample
Enable LPADC on the FRDM_MCXW71 and add overlays for tests and sample

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
c1affb981d drivers: regulator_nxp_vref: Clear UTRIM on init
Reset value of this register is supposed to be 0 but I noticed on some
chip, it was not resetting to 0 on system reset, don't know why, but
this supposedly redundant clear is fine for now.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
4b3d88e82e soc: nxp: MCXW71: Add LPADC node + clocking
Add DT entry and default clocking for ADC0 on MCXW71.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
66ae0096a2 boards: frdm_mcxw71: Enable VREF
Enable VREF for frdm_mcxw71 board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
7d2f0b8476 soc: mcxw71: Add VREF node and clocking
Add VREF node and clocking to MCXW71 SOC.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
3853fb20b3 dts: nxp_lpc_lpadc: Make clk props optional
These properties should eventually be removed from this binding as they
have been introduced to control soc specific clock trees and don't
correlate to anything in the IP, but for now just make them not required
and remove them from DT for SOCs that don't even use them.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
a196ba564f dts: nxp: rename lpadc nodes to adc
Follow DT spec name recommendation, name the nodes "adc" instead of
lpadc.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
Declan Snyder
e4deb46ba1 dts: nxp_vref: Add current compensation prop
Add DT property to enable current compensation feature of NXP VREF.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-25 18:52:10 +01:00
TOKITA Hiroshi
7f4c948729 MAINTAINERS: soburi takeover RaspberryPi Pico maintainer from yonsch
I am taking over the maintainer role of the Raspberry Pi Pico platform.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-25 12:51:54 -05:00
Daniel DeGrasse
23d253727c boards: nxp: frdm_rw612: correct max frequency for WS25Q512JV
WS25Q512JV can only run at 104MHz at 3.3V, unless the read parameter
bits are changed. Since we don't reprogram these currently, reduce max
frequency to safe value

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-25 18:51:45 +01:00
Daniel DeGrasse
6bc73df06b drivers: flash: flash_mcux_flexspi: add support for W25Q512JV
Add support for the W25Q512JV with the FLEXSPI, using a custom
LUT table.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-25 18:51:45 +01:00
Vladislav Pejic
527c1f5356 driver: sensor: adxl362: Bug fix for q31_t conv
This is a bug fix for adxl362_temp_convert_q31 and
adxl362_accel_convert_q31 functions.
Functions are used to convert samples received from
sensor to q31_t format when RTIO stream is used.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-25 12:51:31 -05:00
Alberto Escolar Piedras
28edb220cd tests: Support targeting unit_testing with and without qualifier
For tests that support both targeting unit_testing and
other targets, we check in the cmake code the BOARD variable.
Let's allow users to set this to either of unit_testing
or unit_testing/unit_testing so it behaves like for other
tests.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-25 18:51:10 +01:00
Alberto Escolar Piedras
9ceeb9bfef tests/ztest/fail: Fix yaml description
Fix filtering done in
22c3438f1b
Otherwise we end up with tests defined twice, as a .unit and .zerphyr
variant but both run in normal builds, and none for unit tests.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-25 18:51:10 +01:00
Alberto Escolar Piedras
99d7161e34 tests/ztest/fail: fix board name
Use full board name in cmake file.
Akin to the fix done in
https://github.com/zephyrproject-rtos/zephyr/pull/80270/
following the changes from
https://github.com/zephyrproject-rtos/zephyr/pull/77250/

Note after the Zephyr cmake code has been run the BOARD
variable is split into BOARD BOARD_QUALIFIERS,
where BOARD does not contain the qualifiers anymore
(see cmake/modules/boards.cmake for more info).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-25 18:51:10 +01:00
Jukka Rissanen
6fb34733b5 samples: net: echo_server: Avoid warning about truncated writing
The truncation is not possible in practice but add suitable cast to
avoid the warning.

samples/net/sockets/echo_server/src/tcp.c:297:54: warning:
 ‘%d’ directive output may be truncated writing between 1 and 10 bytes
 into a region of size 5 [-Wformat-truncation=]
  297 |               snprintk(name, sizeof(name), "tcp4[%d]", slot);
      |                                             ^~~~~~~~~~

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 12:50:54 -05:00
Jukka Rissanen
b29534f0e3 samples: net: echo_server: Add websocket console test
Make sure that the websocket console is build tested.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 12:50:54 -05:00
Jukka Rissanen
074b5f2ca0 shell: backend: websocket: Fix socket service creation
The NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC() macro was changed
earlier but the compilation error was missed. Fixing the macro
call.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 12:50:54 -05:00
Jukka Rissanen
34bb8cb35c logging: backend: websocket: Avoid uninit variable warning
The ret variable might be used uninitialized.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 12:50:54 -05:00
Jukka Rissanen
c225b02ad5 logging: backend: websocket: Add missing header file
The log_backend_ws.h include file was missing which caused
build issues.

Fixes #80392

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-25 12:50:54 -05:00
Cla Mattia Galliard
6f99b6d0e4 drivers: ethernet: phy: phy_mii: log remove excess newlines
Remove excess newlines from log output in phy_mii.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2024-10-25 12:50:38 -05:00
Lars Knudsen
09546ff3e3 Bluetooth: Shell: Set err to 0 before shell_strtoul
The value of err was not initialized to 0 prior
to calling shell_strtoul, which only sets err
on actual error.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-25 12:50:23 -05:00
Fin Maaß
cd3dcf788a net: socket: service: mark as unstable
As the socket service API is currently used by mutiple applications
(dhcpv4 server, dns, telnet), it should be marked as unstable,
according to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-25 18:50:07 +01:00
Lars Knudsen
c15f8edd60 Bluetooth: Shell: Fix iso sync timeout range check
Using BT_ISO_SYNC_TIMEOUT_MIN and BT_ISO_SYNC_TIMEOUT_MAX now.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-25 12:49:38 -05:00
Vinayak Kariappa Chettimada
7a7cfd0d64 cmake: gcc/ld: Fix LTO warnings
Fix the following warnings:
[255/261] Linking C executable zephyr/zephyr_pre0.elf
lto-wrapper: warning: using serial compilation of 8 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more
information
[260/261] Linking C executable zephyr/zephyr.elf
lto-wrapper: warning: using serial compilation of 8 LTRANS jobs
lto-wrapper: note: see the '-flto' option documentation for more
information

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-25 18:49:07 +01:00
Mathieu Choplain
31fea97e05 tests: dma: loop_transfer: add overlay for Nucleo-WB09KE
Add an overlay to the test so that it can run on STM32WB0 series hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
35835f8d47 tests: dma: chan_blen_transfer: add overlay for Nucleo-WB09KE
Add an overlay to the test so that it can run on STM32WB0 series hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
c3e522d918 boards: st: wb0: add DMA to supported feature set
Add DMA to supported feature set on existing STM32WB0 boards.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
0e1f80500c dts: arm: st: wb0: add DMA and DMAMUX nodes
Add device tree nodes corresponding to DMA and DMAMUX peripherals to
STM32WB0 series DTSI.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
764ce97b2f drivers: dma: stm32: add support for STM32WB0
Add support for STM32WB0 series in the relevant drivers and Kconfig.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
c532702d76 drivers: dma: dmamux_stm32: remove unused SO and RGO functions
Functions related to synchronization inputs and request generators were
present in the DMAMUX driver, despite being completely unused.
Remove them for compatibility with WB0 which lacks this hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
ade5e78928 dts: bindings: dma: make DMAMUX IRQ optional
Remove the "required: true" attribute from the STM32 DMAMUX binding.
This is required for STM32WB0 series where the DMAMUX has no interrupt line

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Mathieu Choplain
d2410f54e0 dts: arm: st: wb0: use STM32_CLOCK everywhere
PR #79683 missed a few nodes introduced while it was under review.
Replace the remaining raw values with STM32_CLOCK in WB0 DTSI files.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-25 14:22:06 +02:00
Bartlomiej Buczek
8cd361a51a samples: boards: nordic: system_off: Update README.
Update DK naming - NRF54L15PDK is deprecated.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-25 14:10:30 +02:00
Aksel Skauge Mellbye
545e9334f7 drivers: bluetooth: hci: silabs: Configure radio for sleep
If PM is enabled, the radio must be configured to synchronize its
protocol timer with the low frequency timer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-25 14:09:57 +02:00
Aksel Skauge Mellbye
8fc5514a94 soc: silabs: Only initialize HFXO Manager if HFXO is enabled
Only initialize the HFXO Manager HAL driver if the HFXO is enabled in
DeviceTree, the device uses SYSRTC for timekeeping, and Power Manager
is enabled. HFXO Manager integrates with the Sleeptimer HAL driver for
SYSRTC to autonomously wake the HFXO prior to Sleeptimer wakeup from
deep sleep. It is not needed on devices that don't have HFXO-SYSRTC
integration, and it is not needed if the application doesn't use deep
sleep.

Add missing call to init_hardware() prior to init().

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-25 14:09:36 +02:00
Aksel Skauge Mellbye
00378b56ec drivers: serial: gecko: Add device power management
Add basic device power management to USART driver. The initial
implementation only ensures that the TX FIFO is flushed before
allowing the system to go to sleep by polling the TXIDLE status
register.

This fixes an issue where the last 1-2 characters would be lost
if transmitted immediately before going to deep sleep.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-25 14:09:00 +02:00
Dmitrii Golovanov
e0b748e1ab ci: footprint: extend data transform on all applications
In addition to 'footprints' application data, execute transformation
step for all other applications listed in `plan.txt` to upload their
memory footprint reports to the ELK storage as well.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-25 14:08:18 +02:00
Dmitrii Golovanov
a2c193374c ci: footprint: fix nrf5340dk/nrf5340/cpuapp board name
Fix nrf5340dk/nrf5340/cpuapp board name to align with HWMv2 changes
and resolve build error for its footprint data collection.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-25 14:08:18 +02:00
Fredrik Danebjer
f970b066d2 Bluetooth: audio: Add possibility to use static broadcast id
Removed the generation of broadcast id inside the stack. It is now up
to the application to generate this by itself. The CAP sample has
been modified to allow either a static broadcast, or a random one.
All of this is handled in the application.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-10-25 14:07:25 +02:00
Olivier Lesage
7e72d46e2e bluetooth: host: Add helper function for parsing PCTs
The 12-bit signed values for the results of PBR are a bit
cumbersome, so this adds a helper function to make it easier to work
with the HCI formatted steps.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-25 14:06:25 +02:00
Olivier Lesage
635d03b7e0 bluetooth: host: Unit tests for bt_le_cs_step_data_parse
Add unit tests for bt_le_cs_step_data_parse.
Also exit early (without calling the function pointer) if the next
step would seem to read out of bounds.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-25 14:06:25 +02:00
Jens Rehhoff Thomsen
7d83419b6f Bluetooth samples: Add multi subgroup support
Add multi subgroup support for the broadcast sink sample

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-10-25 14:05:04 +02:00
Jens Rehhoff Thomsen
5a728825b7 Bluetooth samples: Increase codec meta data size
To improve broadcast sink sample robostness the max codec meta data
size configuration is increased to reflect the meta codec data sizes
seen for sources in market.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-10-25 14:05:04 +02:00
Jens Rehhoff Thomsen
32a719ae12 Bluetooth samples: Fix BIS index mask variable
For the BIS index mask variable used in broadcast sink sample
bit 0 is now BIS index 1.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-10-25 14:05:04 +02:00
Jens Rehhoff Thomsen
5b44edc4eb Bluetooth samples: Fix wrong SDU size check
Just a typo in broadcast sink sample main code.
'<' changed to '>' in if statement.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-10-25 14:05:04 +02:00
Nils Bosbach
94baef654c drivers: gpio: gpio_iproc: fix reg write
The sys_write32 function expects a value as the first parameter and the
memory location where the value should be written as the second parameter.

Signed-off-by: Nils Bosbach <bosbach@ice.rwth-aachen.de>
2024-10-25 14:04:35 +02:00
Krzysztof Chruściński
a04c1db9a4 tests: drivers: uart: uart_async_api: Add nrf54l15dk//cpuapp overlay
Add overlay for nrf54l15dk/nrf54l15/cpuapp target.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-25 14:02:03 +02:00
Emil Gydesen
16605585c0 Bluetooth: Audio: Add bt_audio_data_get_val
Add a generic function to retrieve any data based on an
assigned numbers type. This function can in theory be
used for any data type, and not just LE Audio types, but
since it relies on bt_audio_data_parse it was made
specificially for LE Audio.

The function can be used in cases where
bt_audio_codec_cfg_get_val, bt_audio_codec_cfg_meta_get_val,
bt_audio_codec_cap_get_val or
bt_audio_codec_cap_meta_get_val (or their derivation)
are not easily applicable due to the type constrainst.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-25 14:01:42 +02:00
Jamie McCrae
efd60dfaaf doc: release: 4.0: Add note on LoRaWAN MCUmgr transport
Adds a note that this transport has been added

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-10-25 14:00:48 +02:00
Jamie McCrae
d9312524eb tests: mgmt: mcumgr: Add transport_lorawan test
Adds a test to ensure that the LoRaWAN MCUmgr transport builds with
all options enabled and all options disabled

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-10-25 14:00:48 +02:00
Jamie McCrae
973ba91487 mgmt: mcumgr: transport: Add LoRaWAN MCUmgr SMP transport
Adds a transport that uses LoRaWAN for receiving and responding
to messages

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-10-25 14:00:48 +02:00
Ian Morris
62d706e3b3 dts: arm: renesas: ra: ra6: added missing io ports
Additional IO ports (6,7 and 8) are availble on the r7fa6m4af3cfb
variant of the RA6M4 Microcontroller.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-25 13:59:13 +02:00
Adam Kondraciuk
59629d0039 soc: nordic: s2ram: Align s2ram marking procedures
Rework Nordic specific S2RAM marking procedures.
The S2RAM marking procedures must not disrupt the stack due to
the TLS pointer not yet being initialized during their execution.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-25 13:58:37 +02:00
Adam Kondraciuk
474d4c3249 arch: arm: cortex_m: pm_s2ram: Rework S2RAM mark functions
The S2RAM procedure requires marker checking after reset.
Such checking is performed on very early stage of the system initialization
and must ensure that the stack is not used due to the TLS pointer which is
not initialized yet.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-25 13:58:37 +02:00
Sungwoo Kim
88de2711ca Bluetooth: userchan: fix buffer overflow in hci_packet_complete()
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
2024-10-25 13:54:36 +02:00
Emil Gydesen
98805a29f5 Bluetooth: BAP: Add BT_AUDIO_RTN_PREF_NONE
Add BT_AUDIO_RTN_PREF_NONE which indicates no preference from
the server for number of retransmissions chosen by the client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-25 13:54:11 +02:00
Hui Bai
71b9d8ad66 hostap: More fixes to crypto=none compilation
The aes_unwrap() and aes_decrypt() functions were missing
if CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE is enabled.
Add missing C files to fix this.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Hui Bai
14d08ccbc3 manifest: Update hostap repo
Update hostap repo in west.yml

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Hui Bai
aaebe38db9 net: Increase net_mgmt task priority
Originally, the net_mgmt task priority is very low. Based on roaming
implementation, roaming is triggered in net_mgmt task. When running UDP
test while doing roaming, the net_mgmt task won't have much chance to
run and roaming can't be triggered.
Increase it to 3, which is same value of supplicant task.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Hui Bai
83812f213f modules: hostap: add 11k/v/r roaming support
Added new ops and events in glue layer to support roaming.
Added new flag WIFI_NM_WPA_SUPPLICANT_ROAMING to control roaming
feature.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Hui Bai
91ec46e961 modules: hostap: add IEEE80211R support
Add 80211R support in hostap.
Add cmd wifi connect option '-R' to enable 80211R.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Hui Bai
7c167c67c3 modules: hostap: add 11k cmd support
Add 11k cmds support. User can issue 11k cmds to enable/disable 11k and
send Neighbor Report Request packet.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-10-25 13:53:49 +02:00
Pisit Sawangvonganan
3ca71c94df drivers: serial: ra_sci: add missing break in callback_adapter
Added missing `break` statement in `uart_ra_sci_callback_adapter`
for the `UART_EVENT_RX_COMPLETE` case.
Without it, `async_evt_rx_err()` would be called, which is not
the desired operation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-25 13:50:55 +02:00
Pisit Sawangvonganan
f44690795f drivers: serial: ra_sci: revise switch-case in callback_adapter
Unified switch-case usage in `uart_ra_sci_callback_adapter` to use
`break` instead of `return`.
Typically, a `break` is used in switch-case statements unless an early
return is necessary, in which case `return` is appropriate.

For this case, using a `break` statement is the more suitable choice.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-25 13:50:55 +02:00
Torsten Rasmussen
189e875906 doc: change plank.yaml to plank_<qualifiers>.yaml
The board file used by twister is the normalized board target and not
just the board name.

Indicate this by changing plank.yaml to plank_<qualifiers>.yaml in the
board porting guide.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-25 13:49:31 +02:00
The Nguyen
95cc5f53b8 drivers: can: initial support for Renesas RA CANFD
Add support for CAN driver running on Renesas RA CANFD

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-10-25 08:55:17 +02:00
Jordan Yates
e876c5d487 boards: remove HCI_SPI defaults
The `HCI_SPI` symbol is now automatically selected from devicetree,
removing the need for board specific defaults.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-25 08:55:07 +02:00
Jordan Yates
573c18f42a bluetooth: hci: dedicated symbols for SPI variants
Add dedicated Kconfig symbols for the two SPI backend variants. This
allows enabling the symbols by default from devicetree, and cleans up
the cmake logic.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-25 08:55:07 +02:00
Phi Bang Nguyen
5e41249ddf drivers: video: csi: Add NXP copyright
The CSI is an NXP IP and the driver has been very much changed
by NXP, so add NXP copyright to it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
a738613dcf drivers: video: csi: Increase init priority
The CSI needs to be initialized BEFORE the camera sensor to provide
clock to the camera sensor. It is now possible to do so as direct
reference to the sensor via phandle is now removed. There will be
no check failure on the init order anymore when compiling.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
59e253ed4a drivers: video: csi: Drop source device phandle reference
The peer remote device "source_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
1dd96ba9f9 drivers: video: csi: Remove obsolete comment
Remove the obsolete comment about the init order of the CSI and the
camera sensors (e.g. mt9m114) which is not true anymore.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
5bbaffe7c3 drivers: video: csi: Add support for changing frame rate
Add support for changing frame rate

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
29f38b81e2 include: video: Add an utility function to get bytes per pixel
As getting bytes per pixel of a pixel format is a very common operation,
add an utility function for it instead of repeating the same codes in
different drivers.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
8053b722af drivers: video: mipi_csi2rx: Add support for changing frame rate
Add support for changing frame rate.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Trung Hieu Le
a182394725 drivers: video: mipi_csi2rx: Set clocks according to pixel rate
Instead of fixing csi2rx clock frequencies, set them according to the
pixel rate got from the camera sensor.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Farah Fliss
a40505148c drivers: video: mipi_csi2rx: Add set_ctrl callback
Add set_ctrl callback to propagate controls to the sensor.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
f82b0d5681 drivers: video: mipi_csi2rx: Drop sensor device phandle reference
The peer remote device "sensor_dev" can be retrieved from the
remote-endpoint-label. Direct reference via phandle is not needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
901f022cdb drivers: video: mipi_csi2rx: Get data lanes number from devicetree
Get number of data lanes from device tree instead of hard-coding it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
317f050116 boards: shields: nxp_btb44_ov5640: Add some endpoint properties
The ov5640 camera driver now supports both MIPI CSI2 (DPHY) and DVP
modes. It is in MIPI CSI2 mode in this overlay. Add bus-type property
for this. In this mode, data-lanes property is required as well.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
c1627d2819 dts-bindings: video: csi: Use video interfaces bindings
Switch to use the new video interfaces bindings

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
328f40fddb dts-bindings: video: mipicsi2rx: Use video interfaces bindings
Switch to use the new video interfaces bindings

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
30604a8a76 dts-bindings: video: ov5640: Use video interfaces binding
Switch to use the new video interfaces binding

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
43569d9ab1 dts-bindings: video: mt9m114: Use video interfaces binding
Switch to use the new video interfaces binding

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Phi Bang Nguyen
b2ec8313b3 dts-bindings: video: ov7725: Use video interfaces binding
Switch to use the new video interfaces binding

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-25 08:54:57 +02:00
Radim Lipka
d207ee976d modules: hal_nxp: osa: Remove deprecated OSA API
New location of current OSA API available in
/hal/nxp/mcux/mcux-sdk/components/osa

Signed-off-by: Radim Lipka <Radim.Lipka@nxp.com>
2024-10-25 08:54:18 +02:00
Mahesh Mahadevan
f05dc7115a samples: sensor: Add support for temperature sensor on FRDM_MCXN947
Add support for the P3T1755 temperature sensor on the FRDM MCXN947
board.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Mahesh Mahadevan
630d99ca9c boards: frdm_mcxn947: Add I3C support
Add support for I3C1 on frdm_mcxn947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Mahesh Mahadevan
3dc3f6e938 dts: nxp_mcxn94x: Add I3C nodes
Add the I3C nodes for nxp_mcxn94x

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Mahesh Mahadevan
513ead82dd drivers: clock: Update the NXP Syscon driver for MCUX
Update the code for MCUXN947 I3C support

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Mahesh Mahadevan
38f06aa4bf drivers: sensor: p3t1755: Driver for NXP digital temperature sensor
Added driver for the NXP P3T1755 digital temperature sensor.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-25 08:53:56 +02:00
Neil Chen
712637f4be boards: nxp/frdm_mcxn236: Support LPTMR for NXP frdm_mcxn236 board
Support LPTMR for NXP frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-25 08:53:39 +02:00
Neil Chen
d4783f119d dts: arm/nxp: Add LPTMR nodes to NXP MCXN23x dtsi file
Add LPTMR nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-25 08:53:39 +02:00
James Roy
b443929f49 drivers: esp32: Fix esp_wifi_drv strncpy warning
Add '\0' to the end of the ssid to prevent warnings
or segmentation errors.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-25 08:53:26 +02:00
James Roy
ad9c3c39ad net: wifi: Fix ssid member byte size in wifi core structure
Change the bytes occupied by the ssid member in the wifi structure
to 'WIFI_SSID_MAX_LEN + 1' so that it can eliminate the
'-Wstringop-truncation' warning.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-25 08:53:26 +02:00
Krzysztof Chruściński
d480093cd6 tests: drivers: uart: async_api: Use custom long buffer for nrf54h20
nrf54h20dk_nrf54h20_cpurad by default has less RAM dedicated for
DMA transfers and default 1k buffer cannot be used for
uart_async_long_buf case. Use custom value.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-25 08:53:15 +02:00
Krzysztof Chruściński
d612982b14 tests: drivers: uart: async_api: Make long buffer configurable
One of the test case is performing long transfers using 1k buffers.
For some targets there may be not enough RAM to perform such
transfers. Make long buffer length configurable.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-25 08:53:15 +02:00
Luca Burelli
528493194b lpcxpresso55s36: Improve debug documentation
The LPC55S36 board has an integrated MCU-Link debug probe, not an
LPC-Link2. Also, it is now possible to directly use the stock CMSIS-DAP
mode with the `linkserver` runner.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-25 08:53:01 +02:00
David Leach
eb45e49a02 tests: mcuboot: remove twr_kv58f220m from allowed list.
mcuboot is not supported on twr_kv58f220m. Removing from
allowed list.

Fixes #78951

Signed-off-by: David Leach <david.leach@nxp.com>
2024-10-25 08:52:44 +02:00
Michal Smola
f99e0c6d7b soc: nxp mcxc: add has segger rtt in Kconfig
HAS_SEGGER_RTT Kconfix symbol is missing in NXP MCXC series Kconfig.
Add the symbol to fix and enable Segger RTT samples.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 08:52:34 +02:00
Chaitanya Tata
cef6b69a39 net: lib: capture: Fix build error
The CONFIG_ prefix was missed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-25 08:52:22 +02:00
Charles Dias
7128e33796 samples: drivers: video: capture_to_lvgl: add menu and update the YAML
Add the Kconfig menu to the sample configuration.
Update sample.yaml by adding the shield configuration.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-10-25 05:12:25 +01:00
Charles Dias
31093d24a7 boards: shields: add suport for weact_ov2640_cam_module
Add support for WeAct Studio MiniSTM32H7xx OV2640 camera sensor.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-10-25 05:12:25 +01:00
Michal Smola
c76b984aae samples: usb: Exclude frdm_mcxc242 platform from dfu sample
frdm_mcxc242 does not support MCUboot. Exclude the platform from dfu
sample.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Michal Smola
361d0ba247 boards: frdm_mcxc242: Add usb support
mcxc242 has usb device capability. Add usb to board documentation and
to the yaml file. Enable and configure it in board dts.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Michal Smola
4f4020344c dts: nxp mcxc: Add usb configuration
USB configuration is missing in Devicetree for NXP MCX C series.
Add the configuration to common and SoC specific dtsi file.
Delete usb node for SoCs without USB support.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Michal Smola
8ad3c99dab soc: nxp mcxc: Enable usb clock
USB clock is not enabled for NXP mcxc series. Enable it.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Michal Smola
13e0b1fa2b drivers: usb: Use VREG only if present for NXP Kinetis usb
Some NXP socs with Kinetis USB do not have USB voltage regulator.
It causes build error in USB samples.
Fix it by enabling and disabling the voltage regulator only if
present.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Michal Smola
e84cfa5095 dts: usb: Add no-voltage-regulator property to nxp,kinetis-usbd binding
Some NXP SoC's do not have USB voltage regulator present.
Add property to indicate it. Negative logic is used, because
the regulator is present in great majority of SoC's, and thus the new
property can be added only for SoC's without the regulator.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-25 05:11:44 +01:00
Daniel Leung
91f509b984 llext: rename symbol struct identifiers with SLID
Similar to commit aeec014cbe, this
renames the identifiers to have prefix of "__llext_sym_name_"
instead of having suffix of "_sym_name" in LLEXT symbol tables
for SLID-enabled applications. This is needed to avoid confusing
the gen_device_deps.py script as it searches for objects (e.g.
__device_dts_ord_*) by matching name stems without regard to
suffixes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-25 05:10:50 +01:00
Raffael Rostagno
03dc880aa6 drivers: counter: esp32: Clang run
Clang run on driver for formatting

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-25 00:04:25 +01:00
Raffael Rostagno
4be1897519 drivers: counter: systimer: esp32c2: Fix clock parameters
Fix clock source frequency for systimer and GP timer.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-25 00:04:25 +01:00
IBEN EL HADJ MESSAOUD Marwa
cf367686f6 drivers: ethernet: eth_stm32_hal: Correct indentation
Adjusted indentation to follow consistent coding standards.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
IBEN EL HADJ MESSAOUD Marwa
eff9a87a7a drivers: ethernet: eth_stm32_hal: Use the compatible st_stm32h7_ethernet
Replace "CONFIG_SOC_SERIES_STM32H7X || CONFIG_SOC_SERIES_STM32H5X"
by the compatble st_stm32h7_ethernet

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
IBEN EL HADJ MESSAOUD Marwa
d0751148c1 dts: Introduce stm32h7 ethernet compatible
Add stm32h7 ethernet compatible "st,stm32h7-ethernet",
used also for stm32h5.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
IBEN EL HADJ MESSAOUD Marwa
ca768581c8 drivers: ethernet: eth_stm32_hal: Remove V1 code for H7/H5 series
Remove the V1 code for STM32H7 and STM32H5 series

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-10-24 22:04:21 +01:00
Laczen JMS
237a18928b settings: add note to documentation
Add information about commit priority to settings documentation.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-10-24 22:04:07 +01:00
Laczen JMS
6e451b66a4 settings: add release note for commit prio
Add release note for added settings commit priority

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-10-24 22:04:07 +01:00
Laczen JMS
435587d368 settings: Add test for settings commit priority
Add a test to validate settings commit priority

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-10-24 22:04:07 +01:00
Laczen JMS
95fa167e45 settings: introduce priority for commit
A priority is introduced to allow scheduling of commit routines.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2024-10-24 22:04:07 +01:00
Henrik Brix Andersen
54545254d9 tests: tests: drivers: can: timing: enable full timing test on usb2canfdv1
Enable the full range of CAN timing tests on the WeAct USB2CANFDV1 board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-10-24 22:02:53 +01:00
Henrik Brix Andersen
25d9fc118f boards: weact: add USB2CANFDV1 board support
Add support for the WeAct Studio USB2CANFDV1, a dedicated USB to CAN FD
adapter board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-10-24 22:02:53 +01:00
Maximilian Deubel
d56e22d425 tests: net: wifi_credentials: restrict to native_sim
Adjust the testcase.yaml files to only allow running on native_sim.
These tests use mocking and are not meant to run on embedded platforms.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-24 22:02:28 +01:00
Daniel DeGrasse
3d4f83aaac drivers: wifi: eswifi: fix casts for 64 bit pointers
The eswifi driver uses an integer to identify the socket used for each
connection, which must be cast to and from a `void *`. This causes
warnings on 64 bit platforms, as precision is lost when casting from a
`void *` to `int`. Use a `intptr_t` type to store the socket value to
resolve this warning. Also, fix a function signature for the `accept_cb`
to use `size_t` instead of `int` for the length

Fixes #80242

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 12:25:04 -05:00
Henrik Brix Andersen
1e83368d88 tests: drivers: can: api: fix misunderstood use of ESI flag
Fix the test for sending frames with the CAN_FRAME_ESI flag set. Sending
frames with this flag set in software is never allowed.

Fixes: 8023a58c2a

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-24 18:02:26 +02:00
Alberto Escolar Piedras
1c7540883f boards nrf_bsim: Add NVIC_GetPendingIRQ() equivalent
Add a substitute for NVIC_GetPendingIRQ()

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Alberto Escolar Piedras
c4e6ec89a7 boards nrf_bsim: Provide IRQ_PRIO_LOWEST
Some apps use it, so let's provide it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Alberto Escolar Piedras
15a7819a9b manifest: Update nRF hw models to latest
Update the HW models module to:
aca798cf7cf0c5dc1fd89c66cf62670051feb8d0

Including the following:
* aca798c IRQ controller: Add missing prototype
* 4f108bc IRQ controller: Add API to check if int is pending
* a514448 MDK: provide replacement for SystemCoreClock*

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Alberto Escolar Piedras
6ffbb8c728 native_simulator: Get latest from upstream
Align with native_simulator's upstream main
51b27b67addd0073dc86e3d83f492c5cac5c3361

Which includes:
* 51b27b nsi_utils: Add macro for weak declarations

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:01:50 +01:00
Riadh Ghaddab
3c4fcaa2c0 doc: zms: add documentation for ZMS
This adds the documentation for the Zephyr Memory Storage system.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-24 16:57:12 +01:00
Riadh Ghaddab
fb7dae77ef samples: fs: zms: add a sample app for ZMS storage system
This adds a user application that shows the usage of ZMS
The sample app shows three main functions of ZMS:
- read/write/delete key/value pairs
- fill all storage and delete it
- calculate free remaining space

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-24 16:57:12 +01:00
Riadh Ghaddab
004d6d6adc tests: fs: zms: add testsuite for ZMS storage
List of added tests :
- zms.test_delete
- zms.test_zms_cache_collission
- zms.test_zms_cache_gc
- zms.test_zms_cache_hash_quality
- zms.test_zms_cache_init
- zms.test_zms_corrupted_sector_close_operation
- zms.test_zms_corrupted_write
- zms.test_zms_full_sector
- zms.test_zms_gc
- zms.test_zms_gc_3sectors
- zms.test_zms_gc_corrupt_ate
- zms.test_zms_gc_corrupt_close_ate
- zms.test_zms_mount
- zms.test_zms_write

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-24 16:57:12 +01:00
Riadh Ghaddab
d4e246dfa1 fs: introduce ZMS a new Memory storage system
ZMS is the abreviation of Zephyr Memory Storage.
It is a storage developed to target especially the non erasable devices.

The new memory storage system inherit from the NVS storage multiple
features and introduce new ones :
* Inherited features :
 - light key-value based storage
 - cache for entries
 - Wear Leveling of flash memory
 - Resilience to power failures
* New features :
 - cycle counter for non erasable devices (instead of erase emulation)
 - Keys up to 32-bit
 - Built-in support of CRC32 for data
 - Small size data (<= 8 bytes) integrated within entries

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-10-24 16:57:12 +01:00
Grzegorz Swiderski
96f08d53a4 drivers: adc: nrfx_saadc: Use CONFIG_NRF_PLATFORM_HALTIUM
Apply it in a few more locations that were missed in
5a4655f69f.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Grzegorz Swiderski
b3b0c63ad9 soc: nordic: Enable VPR launcher on nRF54H20 EngB
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Grzegorz Swiderski
bcf6a91689 logging: stmesp: Do not append strings on nRF54H20 EngB VPRs
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Grzegorz Swiderski
0379424b43 modules: hal_nordic: nrfs: Enable DVFS service on nRF54H20 EngB
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Grzegorz Swiderski
3f221f9577 modules: hal_nordic: Disable 802.15.4 temp update on nRF54H20 EngB
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Grzegorz Swiderski
41f53b2091 drivers: cache: Enable LINEADDR workaround on nRF54H20 EngB
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Troels Nilsson
e07076df87 tests: Bluetooth: Add BSim tests with BT_CTLR_SCAN_AUX_USE_CHAINS
Add overlay setting CONFIG_BT_CTLR_SCAN_AUX_USE_CHAINS for advx
and bis tests

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-10-24 16:55:35 +01:00
Troels Nilsson
eab3f49247 Bluetooth: Controller: Introduce scan_aux_chain context
Introduces the concept of ll_scan_aux_chain, that allows for
keeping track of several advertising chains with a minimal
overhead. This replaces using several scan aux sets each with
an associated ticker IDs

Only one ticker is used for following chains; This is achieved
by having the scheduled chains in a sorted list and restarting
the ticker when the first in the list expires

EVENT_DONE_EXTRA_TYPE_SCAN_AUX now includes a pointer to the lll
structure to identify which chain to flush (to avoid race
conditions)

New implementation is hidden behind a config for now (defaults
to off): BT_CTLR_SCAN_AUX_USE_CHAINS

Other minor changes:
- rx_incomplete node pointer was moved to ll_sync_set
- data_len removed from ll_sync_set (it uses the chains instead)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-10-24 16:55:35 +01:00
Janco Kock
2ed67e9841 drivers: ethernet: enc424j600: change mac addr runtime
Add ability to change mac address at runtime using net mgmt config call

Signed-off-by: Janco Kock <jancokock@gmail.com>
2024-10-24 17:54:08 +02:00
Iuliana Prodan
9f0c618c45 samples: add number crunching using optimized library sample
This sample executes some mathematical functions
that can be used for audio processing like
filtering (Fast Fourier Transform (FFT)) or
echo cancellation (Least Mean Square (LMS) filter algorithm).

This is an example that demonstrates how to include a proprietary
static library into the Zephyr build system.
The library is in an out of tree location.

To use this sample, with an out of tree library, one needs to define
an environment variable LIB_LOCATION.
If that is not defined, a default Zephyr API is used instead.

By default it uses CMSIS-DSP backend for math operations.
In README one can find more information.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-24 17:52:40 +02:00
Tobias Pisani
66af846010 drivers: ti: bq274xx: Do not wait for device on init when lazy-loading
Before communicating with the device, the driver needs to wait 300ms. This
moves all communication with the device from init to configure, such
that this delay can be avoided on startup by using zephyr,lazy-load.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-10-24 17:52:30 +02:00
Alberto Escolar Piedras
b9ab52fc5d MAINTAINERS: Add rugeGerritsen to BT host and ISO as collaborator
Add Rubin Gerritsen as collaborator to the BT host and BT ISO.
He has been very active in these areas.
See for more info:
https://github.com/zephyrproject-rtos/zephyr/issues/80233

List the host collaborators in alphabetical order while at it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 17:52:19 +02:00
Reto Schneider
e399bcc98a samples: drivers: crypto: Support SiM3Uxx
This is needed to allow testing the SiM3U implementation using Twister.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 17:52:05 +02:00
Reto Schneider
7dc6dd9b8a boards: silabs: sim3u1xx_dk: Enable crypto support
Using the HW acceleration is much faster than either Mbed TLS or
tinycrypt.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 17:52:05 +02:00
Reto Schneider
1790eda851 drivers: crypto: Add initial SiM3U1xx support
This driver makes use of the hardware AES acceleration, using DMA
transfers.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 17:52:05 +02:00
Reto Schneider
de04a0e7cd dts: arm: silabs: sim3u: Add crypto support node
This is needed for Si32 crypto driver support.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 17:52:05 +02:00
Reto Schneider
71214ae576 dts: bindings: crypto: Add initial Si32 binding
This is needed for Si32 crypto driver support.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 17:52:05 +02:00
Yassine El Aissaoui
d4ea3010ee west.yml: update hal_nxp to reference MCXW71 blob addition
Reference MCXW71 blob addition.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-24 17:51:58 +02:00
Lingao Meng
dc55305116 Samples: Bluetooth: Fix where the TX thread no longer be sent out
When ever `unack_queue_len` changed, should raise signal
`tx_queue_change` to let's tx_thread known queue changed.

Fixed the situation where the TX thread may no longer be sent out

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-10-24 17:51:50 +02:00
Hubert Guan
57723cf405 dts: arm: st: Refactor DTSI files to use macro
Replaces raw hex codes by using STM32_CLOCK macro

Signed-off-by: Hubert Guan <hguan@ucsb.edu>
2024-10-24 17:51:42 +02:00
Hubert Guan
79cf84c6f4 dts: arm: st: Add include to stm32mp157
Fixes error where STM32_CLOCK macro isn't recognized.

Signed-off-by: Hubert Guan <hguan@ucsb.edu>
2024-10-24 17:51:42 +02:00
Hubert Guan
e382969f3b include: zephyr: dt-bindings: clock: Rename domain clock selection macro
Rename from STM32_CLOCK to STM32_DOMAIN_CLOCK since it conflicts with
new macro name.

Signed-off-by: Hubert Guan <hguan@ucsb.edu>
2024-10-24 17:51:42 +02:00
Hubert Guan
d2273c02df include: zephyr: dt-bindings: clock: Define STM32_CLOCK macro
Define new macro for reading and writing convenience.

Signed-off-by: Hubert Guan <hguan@ucsb.edu>
2024-10-24 17:51:42 +02:00
TOKITA Hiroshi
22ad205919 doc: gsg: Add a note about setting udev rules
Added a note that udev rules must be configured in Linux environments.
Reformatted text accordingly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-24 17:51:34 +02:00
TOKITA Hiroshi
ae74e87c38 doc: gsg: Host-Tools is only provide for Linux
Host-Tools are only included in the SDK for Linux,
so revised the description.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-24 17:51:34 +02:00
TOKITA Hiroshi
492f84d8b0 doc: gsg: Updating SDK installation instructions to using west sdk
SDK installation has been simplified by introducing the `west sdk`
command. I updated the documentation to use this.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-24 17:51:34 +02:00
Rafael Laya
16218018d7 drivers: regulator: Linter pass to unit test
Linter pass makes CI happy and keeps code compliant
with the stylistic guidelines of the project

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com.com>
2024-10-24 17:51:25 +02:00
Rafael Laya
e542dde890 drivers: regulator: add tests for get_max/min voltage
Adds unit tests to make sure get_max and get_min voltage
remain healthy

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com.com>
2024-10-24 17:51:25 +02:00
Rafael Laya
cda19bdab6 drivers: regulator: API to get max regulator voltage
There is already a get_min_voltage() API, so let us add
an API to also query the max voltage

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com.com>
2024-10-24 17:51:25 +02:00
Benjamin Cabé
a4adfc72d3 boards: sifive: adopt new zephyr:board directive and role
This updates the documentation of all the SiFive boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
367f4eb143 boards: element14: adopt new zephyr:board directive and role
This updates the documentation of all the Element14 boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
04e259ca98 boards: cdns: adopt new zephyr:board directive and role
This updates the documentation of all the Cadence boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
5666e93f60 boards: franzininho: adopt new zephyr:board directive and role
This updates the documentation of all the Franzininho boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
cf3665eda4 boards: ct: adopt new zephyr:board directive and role
This updates the documentation of all the CThings boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
bcfbcc00af boards: qemu: adopt new zephyr:board directive and role
This updates the documentation of all the Qemu boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
f2c2cc334d boards: weact: adopt new zephyr:board directive and role
This updates the documentation of all the WeAct boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
dc271263d4 boards: others: adopt new zephyr:board directive and role
This updates the documentation of all the "others" boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3e0bf34a94 boards: contextualelectronics: adopt new zephyr:board directive and role
This updates the documentation of all the Contextual Electronics boards
to use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
834c3878ca boards: raspberrypi: adopt new zephyr:board directive and role
This updates the documentation of all the Rasperry Pi boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1a56594957 boards: dptechnics: adopt new zephyr:board directive and role
This updates the documentation of all the DPTechnics boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
f5e3535759 boards: sc: adopt new zephyr:board directive and role
This updates the documentation of all the Space Cubics boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
41066b5f73 boards: seco: adopt new zephyr:board directive and role
This updates the documentation of all the SECO boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
aa2082142a boards: qorvo: adopt new zephyr:board directive and role
This updates the documentation of all the Qorvo boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3835f9ceaf boards: firefly: adopt new zephyr:board directive and role
This updates the documentation of all the Firefly boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
11e2be4a1b boards: ronoth: adopt new zephyr:board directive and role
This updates the documentation of all the Ronoth boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3b7e9175ec boards: khadas: adopt new zephyr:board directive and role
This updates the documentation of all the Khadas boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
47ca8b2782 boards: gaisler: adopt new zephyr:board directive and role
This updates the documentation of all the Gaisler boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0e9013b261 boards: croxel: adopt new zephyr:board directive and role
This updates the documentation of all the Croxel boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
dc6c34918c boards: ebyte: adopt new zephyr:board directive and role
This updates the documentation of all the EBYTE boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
b67ed0b1d7 boards: raytac: adopt new zephyr:board directive and role
This updates the documentation of all the Raytac boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
77163e0eff boards: kincony: adopt new zephyr:board directive and role
This updates the documentation of all the Kincony boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
5aa80dfae6 boards: renode: adopt new zephyr:board directive and role
This updates the documentation of all the Renode boards to
use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0df51eaf10 boards: segger: adopt new zephyr:board directive and role
This updates the documentation of all the Segger boards to
use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
841f8a6a62 boards: ti: adopt new zephyr:board directive and role
This updates the documentation of all the Texas Instruments boards to
use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0af1a9946b boards: snps: adopt new zephyr:board directive and role
This updates the documentation of all the Synopsis boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
ed7e6b103f boards: longan: adopt new zephyr:board directive and role
This updates the documentation of all the Longan boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
ba09b12735 boards: silabs: adopt new zephyr:board directive and role
This updates the documentation of all the Silicon Labs boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
b715a977ba boards: bytesatwork: adopt new zephyr:board directive and role
This updates the documentation of all the bytesatwork boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
200ff9ec57 boards: bcdevices: adopt new zephyr:board directive and role
This updates the documentation of all the Blue Clover Devices boards to
use the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
23f5e3e97e boards: aconno: adopt new zephyr:board directive and role
This updates the documentation of all the Aconno boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
97ba4ca553 boards: atmel: adopt new zephyr:board directive and role
This updates the documentation of all the Atmel boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
d1bfc3f915 boards: witte: adopt new zephyr:board directive and role
This updates the documentation of all the Witte boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
e28c1ccb10 boards: wemos: adopt new zephyr:board directive and role
This updates the documentation of all the Wemos boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1a3565dd11 boards: we: adopt new zephyr:board directive and role
This updates the documentation of all the Wurth Elektronik boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
c45a1441b2 boards: waveshare: adopt new zephyr:board directive and role
This updates the documentation of all the WaveShare boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
33985678a6 boards: vngiotlab: adopt new zephyr:board directive and role
This updates the documentation of all the VNG boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
f0165f29f5 boards: vcc-gnd: adopt new zephyr:board directive and role
This updates the documentation of all the VCC-GND boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
4662af0b7c boards: udoo: adopt new zephyr:board directive and role
This updates the documentation of all the UDOO boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
d2072f0502 boards: toradex: adopt new zephyr:board directive and role
This updates the documentation of all the Toradex boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1e895fedab boards: telink: adopt new zephyr:board directive and role
This updates the documentation of all the Telink boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
4f2511e91e boards: technexion: adopt new zephyr:board directive and role
This updates the documentation of all the Technexion boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0452f92bba boards: tdk: adopt new zephyr:board directive and role
This updates the documentation of all the TDK boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
466c1390e6 boards: starfive: adopt new zephyr:board directive and role
This updates the documentation of all the StarFive boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
a43009079f boards: st: adopt new zephyr:board directive and role
This updates the documentation of all the STM32 boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3f6f4ca393 boards: ruuvi: adopt new zephyr:board directive and role
This updates the documentation of all the Ruuvi boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
a38b648b84 boards: rak: adopt new zephyr:board directive and role
This updates the documentation of all the RAK Wireless boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
2df21ce76a boards: quicklogic: adopt new zephyr:board directive and role
This updates the documentation of all the Quicklogic boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
c4389076f5 boards: pine64: adopt new zephyr:board directive and role
This updates the documentation of all the Pine64 boards to use
the new `zephyr:board::` directive.
Also drops the "leaflet" image which really isn't adding any value.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3f1d066cdd boards: particle: adopt new zephyr:board directive and role
This updates the documentation of all the Particle boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
6205a387bb boards: panasonic: adopt new zephyr:board directive and role
This updates the documentation of all the Panasonic boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
bcdeda52be boards: openisa: adopt new zephyr:board directive and role
This updates the documentation of all the openISA boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
e8bf2a36f0 boards: olimex: adopt new zephyr:board directive and role
This updates the documentation of all the Olimex boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
d885957fe8 boards: nxp: adopt new zephyr:board directive and role
This updates the documentation of all the NXP boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
a17d854004 boards: nuvoton: adopt new zephyr:board directive and role
This updates the documentation of all the Nuvoton boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
769ec72a7c boards: mxchip: adopt new zephyr:board directive and role
This updates the documentation of all the MXChip boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
ba419a6705 boards: mikroe: adopt new zephyr:board directive and role
This updates the documentation of all the MikroElektronika boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
8f790bbe28 boards: microchip: adopt new zephyr:board directive and role
This updates the documentation of all the Microchip boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
dfde943ceb boards: makerdiary: adopt new zephyr:board directive and role
This updates the documentation of all the MakerDiary boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
4e99eed2fc boards: madmachine: adopt new zephyr:board directive and role
This updates the documentation of all the MadMachine boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
e86dc65ced boards: m5stack: adopt new zephyr:board directive and role
This updates the documentation of all the M5Stack boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
97e6092d22 boards: innblue: adopt new zephyr:board directive and role
This updates the documentation of all the innblue boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
33e55f2c7c boards: infineon: adopt new zephyr:board directive and role
This updates the documentation of all the Infineon boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
2a23cc45b0 boards: holyiot: adopt new zephyr:board directive and role
This updates the documentation of all the Holyiot boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
de03e63a2f boards: heltec: adopt new zephyr:board directive and role
This updates the documentation of all the Heltec boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0bc32420d4 boards: hardkernel: adopt new zephyr:board directive and role
This updates the documentation of all the HardKernel boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
fe1ecd4182 boards: google: adopt new zephyr:board directive and role
This updates the documentation of all the Google boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
702f89a49f boards: gd: adopt new zephyr:board directive and role
This updates the documentation of all the GigaDevice boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1645147c7f boards: gardena: adopt new zephyr:board directive and role
This updates the documentation of all the Gardena boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0ff3f0d364 boards: ezurio: adopt new zephyr:board directive and role
This updates the documentation of all the Ezurio boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
f0ec6ada1d boards: espressif: adopt new zephyr:board directive and role
This updates the documentation of all the Espressif boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1aa45f77d6 boards: electronut: adopt new zephyr:board directive and role
This updates the documentation of all the Electronut boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
4de10f353e boards: efinix: adopt new zephyr:board directive and role
This updates the documentation of all the Efinix boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1a9568a22c boards: dragino: adopt new zephyr:board directive and role
This updates the documentation of all the Dragino boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
3d8271f328 boards: blues: adopt new zephyr:board directive and role
This updates the documentation of all the Blues boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
2e83e295b0 boards: beagle: adopt new zephyr:board directive and role
This updates the documentation of all the BeagleBoard boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
aaccb6323f boards: bbc: adopt new zephyr:board directive and role
This updates the documentation of all the BBC boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
233d264e53 boards: atmarktechno: adopt new zephyr:board directive and role
This updates the documentation of all the Atmark boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
c357d01aab boards: aspeed: adopt new zephyr:board directive and role
This updates the documentation of all the Aspeed boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
02974bd2bb boards: amd: adopt new zephyr:board directive and role
This updates the documentation of all the AMD boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
0a5b760934 boards: ambiq: adopt new zephyr:board directive and role
This updates the documentation of all the Ambiq boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
9c6bd0ee86 boards: altr: adopt new zephyr:board directive and role
This updates the documentation of all the Altera boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
05c4c7abff boards: alientek: adopt new zephyr:board directive and role
This updates the documentation of all the Alientek boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
1b29273248 boards: adi: adopt new zephyr:board directive and role
This updates the documentation of all the Analog Devices boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
599e0625e3 boards: adafruit: adopt new zephyr:board directive and role
This updates the documentation of all the Adafruit boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
77a35d835a boards: actinius: adopt new zephyr:board directive and role
This updates the documentation of all the Actinius boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Cabé
23c43f1716 boards: 01space: adopt new zephyr:board directive and role
This updates the documentation of all the 01space boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 17:51:15 +02:00
Benjamin Björnsson
0d9aa5a68c drivers: watchdog: wdt_counter: Fix overflow warning
Cast variable to uint64_t to ensure the multiplication is
performed using 64-bit arithmetic. Resolves static code
analysis warning from Coverity.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2024-10-24 17:51:08 +02:00
Aksel Skauge Mellbye
8d4fa7be0b soc: silabs: Remove counter dependency for pm
Power Manager no longer requires the Counter driver. This seems to have
been a hack to get the Sleeptimer HAL included in the build, as the
Sleeptimer is the real dependency of the Silabs Power Manager HAL.

Since Sleeptimer is now used for the OS timer, this hack is not needed.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-24 17:51:01 +02:00
Aksel Skauge Mellbye
51194bf03f soc: silabs: Default to sleeptimer for OS timer on Series 2
Disable BURTC timer in board defconfigs, as it's no longer used.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-24 17:51:01 +02:00
Aksel Skauge Mellbye
da6ddc92cd drivers: timer: silabs: Add sleeptimer timer driver
Add OS timer implementation making use of the Sleeptimer HAL.
Sleeptimer integrates tightly with the Silabs Power Manager HAL,
and must be used as the OS timer to achieve optimal power consumption
when using the radio.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-24 17:51:01 +02:00
Aksel Skauge Mellbye
f302daf67a dts: arm: silabs: Describe RTC timers correctly
The DT node "stimer0" represented two different hardware timers,
RTCC and SYSRTC. Use the correct peripheral names for the nodes.
Add interrupt names and missing interrupt numbers.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-24 17:51:01 +02:00
Gerard Marull-Paretas
578008cd47 pm: policy: allow using latency API in standalone mode
This option allows using the pm_policy_latency* APIs to gather latency
requirements on systems that do not support PM (e.g. systems whithout
CPU idle states). Because the API has a subscription mechanism, it can
be useful to perform system-level adjustments based on latency
requirements gathered from multiple system components.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-24 17:50:44 +02:00
Gerard Marull-Paretas
6f4bb118a8 pm: policy: split policy APIs implementations
policy.c has grown organically, it contained many independent pieces of
code. This patch splits each logical unit into its own C file, making it
easier to browse the code.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-24 17:50:44 +02:00
Alberto Escolar Piedras
a5e3a33b39 ipc: icmsg & icbmsg: Fix alloc_tx_buffer() doxygen description
The return values were not correct, and the parameters descriptions
were not too easy to understand.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-24 13:15:35 +01:00
Chaitanya Tata
f840f660a4 samples: wifi: Fix missing CONFIG for the option
Missed adding CONFIG_ to the configuration option.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-24 13:15:25 +01:00
Chaitanya Tata
3098c484cb drivers: nrfwifi: Fix a build error
The defines should explicitly be passed to nordic HAL as they dont' use
the CONFIG_ prefix.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-24 13:15:25 +01:00
Chaitanya Tata
f6b60bd057 manifest: hal_nordic: Pull fix for build errors
Few build errors due to bugs in previous commits.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-24 13:15:25 +01:00
Vinayak Kariappa Chettimada
af0aeb33fc tests: bsim: Bluetooth: Test 1ms connection interval support
Test 1ms connection interval support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
abfe5f17a9 Bluetooth: Controller: 1 ms connection
1 ms connection interval support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
e7799d4977 Bluetooth: Controller: Separate Tx/Rx frame spacing
Separate Tx/Rx frame spacing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
cbae5d5f3f tests: bsim: Bluetooth: Deferred ACL Tx transmission setup
Added test to verify deferred ACL Tx transmission setup,
such that GATT discovery completes with least latency and
GATT notifications can be received earliest after connection
establishment.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
2ab1671af1 Bluetooth: Controller: Introduce deferred ACL Tx packet transmission
Introduce deferred ACL Tx packet transmission setup by radio,
so that an enqueued ACL Data packet can be transmitted with
the shortest latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
ba1def1a34 Bluetooth: Controller: Add radio timer ISR usage support
Add radio timer ISR usage support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
d9f890bfdf Bluetooth: Controller: Defines for radio timer capture/compare indices
Add defines for radio timer capture and compare indices used
in the nRF Radio HAL implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Vinayak Kariappa Chettimada
7db7edae3c Bluetooth: Controller: Minor updates to code comments
Minor updates and correction to code comments.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-24 13:15:20 +01:00
Adam Kondraciuk
245aee4a8b tests: drivers: timer: nrf_grtc: run GRTC tests on nRF54L20
Run GRTC tests for nRF54L20 platform.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-24 13:15:11 +01:00
Ricardo Rivera-Matos
b64c69f84b regulator: cp9314: Drops B0 silicon support
Removes support for B0 revision silicon. The B0 revision is no longer
recommended for use in host-controlled applications and there are no
users of this driver implementing B0 silicon in their final design.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
2b3ed7016f regulator: cp9314: Adds support for HW I2C Lock feature
Adds support for the control port write-lock feature introduced in
revision B1. The write-lock feature minimizes the risk of spurious
I2C writes flipping sensitive bits during device operation by blocking
writes to some or all of the register map.

If desired, the write-lock must be set in hardware by biasing PGPIO2
appropriately and setting the cirrus,hw-i2c-lock flag in the devicetree
entry.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
a684c36e77 dts: bindings: cp9314: Adds cirrus,hw-i2c-lock property
Documents cirrus,hw-i2c-lock property in the devicetree bindings. This
flag indicates that the control port write-lock was enabled in hardware
via the PGPIO2 pin.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
6843faaf69 regulator: cp9314: Adds support for B1 CHIP_REV
Adds support for revision B1 silicon when checking CHIP_REV. This
silicon revision introduces the hardware I2C lock.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
63acbef33f regulator: cp9314: Changes CHIP_REV log message to debug level
Changes the log level for the CHIP_REV log message from INFO to DBG.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
7fb2e707a2 regulator: cp9314: Prints CHIP_REV info after switch case
Moves the CHIP_REV log message after the CHIP_REV switch case. Printing
the log message after allows for the print to be reused for multiple
CHIP_REV cases.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Ricardo Rivera-Matos
f885c8ada3 regulator: cp9314: Uses FIELD_GET to read CHIP_REV
Use FIELD_GET macro to grab CHIP_REV bitfield. This change improves
the readability of the source code and does not change functionality.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-10-24 14:08:36 +02:00
Jiafei Pan
0f6d6b2ef2 drivers: gicv3: add distributor safe configuration
In case of multiple OSes running on different CPU Cores which share the
same GIC controller, need to avoid the distributor re-configured to avoid
crash the OS has already been started.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-10-24 14:08:07 +02:00
Scott Worley
4fa5fc3b4c drivers: pinctrl: mec5: Microchip MEC5 HAL based pinctrl driver
Add a pinctrl driver for Microchip MEC5 HAL based chips.
The driver removes the YAML enum "no change" property
value from the driver strength and slew rate properties.
Update the shared header file in mec soc common folder to
use a different Z_PINCTRL_STATE_PINCFG_INIT for MEC5.
Modifications to legacy MEC172x XEC PINCTRL will be in
a future PR.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-10-24 14:07:31 +02:00
Aksel Skauge Mellbye
d12de2d6b4 soc: silabs: Add soc_prep_hook() for Series 2
CMSIS SystemInit is not used in Zephyr. Implement the functionality
that isn't already done by Zephyr startup using soc_prep_hook().

The reason the lack of TrustZone init did not create immediately obvious
issues previously is that SMU faults can only happen if the SMU clock is
enabled.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-24 14:07:25 +02:00
Jonas Remmert
4dc2f6fd1c boards: PHYTEC: phyboard_polis: remove mimx8mm prefix
For easier recognition PHYTEC boards have been prefixed with the SoC name.
As the new hardware model includes the SoC and cpu, this prefixing is not
needed anymore. All PHYTEC eval boards have an individual and unique name
and can be found easily via this name.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-10-24 14:07:18 +02:00
Jonas Remmert
2ec5fb4a4b boards: PHYTEC: phyboard_pollux: remove mimx8mp prefix
For easier recognition PHYTEC boards have been prefixed with the SoC name.
As the new hardware model includes the SoC and cpu, this prefixing is not
needed anymore. All PHYTEC eval boards have an individual and unique name
and can be found easily via this name.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-10-24 14:07:18 +02:00
TOKITA Hiroshi
00c5ff77f1 tests: lib: gui: lvgl: Remove explicitly enabled CONFIG_DUMMY_DISPLAY
The CONFIG_DUMMY_DISPLAY is now enabled in conjunction with devicetree,
So, no need to be explicitly enabled.
Remove the setting.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-24 14:07:11 +02:00
TOKITA Hiroshi
7c076a4d5e samples: drivers: display: Remove explicitly enabled CONFIG_DUMMY_DISPLAY
The CONFIG_DUMMY_DISPLAY is now enabled in conjunction with devicetree,
So, no need to be explicitly enabled.
Remove the setting.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-24 14:07:11 +02:00
TOKITA Hiroshi
868e99aefb drivers: display: dummy: Enable config if dummy-dc device available
Enabling the configuration if there is a valid `dummy-dc`
node on the device tree.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2024-10-24 14:07:11 +02:00
Reto Schneider
67cb174241 drivers: dma: si32: Prevent configuration of in-use DMA channel
As per Zephyr DMA documentation, dma_config() must not be done on a
running channel.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 14:07:03 +02:00
Reto Schneider
4d3f6a3145 drivers: dma: si32: Improve start and stop logic
As per dma_stop() documentation, the implementation has to not just stop
the transfer, but also to disable the channel. Before this commit, only
the transfer has been stopped.

Same goes for dma_start(). This also allows the enabling of a channel to
be removed from dma_si32_config().

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-24 14:07:03 +02:00
Abderrahmane Jarmouni
d32c58b8cf tests: subsys: pm: power_mgmt: fix incorrect use of OVERLAY_CONFIG
Replace OVERLAY_CONFIG with CONF_FILE since no-device-pm.conf
contains an alternative configuration to the one in prj.conf

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-24 14:06:54 +02:00
Abderrahmane Jarmouni
94b000591d tests: testcase.yaml: replace deprecated OVERLAY_CONFIG w\ EXTRA_CONF_FILE
Replace some OVERLAY_CONFIG that were missed in a pervious PR.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-24 14:06:54 +02:00
Abderrahmane Jarmouni
8785b184e6 samples: subsys: shell: devmem_load: fix incorrect use of OVERLAY_CONFIG
Replace OVERLAY_CONFIG with CONF_FILE since the file in question
contains an alternative configuration to the one in prj.conf
as clearly stated in the sample doc
'If you use poll you should also use `prj_poll.conf` instead of
`prj.conf`.'

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-24 14:06:54 +02:00
Abderrahmane Jarmouni
3a4dbd4a73 samples: sample.yaml: replace deprecated OVERLAY_CONFIG w\ EXTRA_CONF_FILE
Replace some OVERLAY_CONFIG that were missed in a pervious PR.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-24 14:06:54 +02:00
Abderrahmane Jarmouni
05e73a009f samples: subsys: fs: littlefs: move stm32_blk.conf
Move stm32_blk.conf ouside of 'boards' as this folder is meant to
contain only board-specific devicetree overlays and Kconfig fragments.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-24 14:06:54 +02:00
Torsten Rasmussen
ff6be0586b cmake: support range for find_package(Zephyr-sdk)
Fixes: #80200

CMake `find_package(<package> <version>)` support the use of ranges,
like `1.0.0...4.0.0`.

Update the FindZephyr-sdk.cmake module to support this.
This allows looking up the Zephyr SDK with an upper boundry, for example
`find_package(Zephyr-sdk 0.16...<0.17)`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-24 14:06:45 +02:00
Piotr Kosycarz
4c83883152 samples: subsys: ipc: ipc_service: icmsg: adjust timeout
30 sec is enough.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-10-24 14:05:09 +02:00
Piotr Kosycarz
795cd8678c samples: drivers: mbox: adjust timeout
30 sec is enough.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-10-24 14:05:09 +02:00
Michal Smola
60aeab3579 samples: die temperature polling: Enable sample for frdm_mcxc242
Die temperature polling sample is not enabled for frdm_mcxc242 board.
Add devicetree overlay and Kconfig configuration for the sample to
enable it.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-24 14:05:00 +02:00
Michal Smola
ab3bf82efe drivers: sensor: nxp kinetis temp: Remove depends on kinetis
Remove Kconfig dependency on SOC_FAMILY_KINETIS as the temperature
sensor is available also on MCX family.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-24 14:05:00 +02:00
Michal Smola
2e22e8c1da dts: nxp mcxc: Add die temperature measurement
Die temperature measurement is not configured in devicetree
for NXP MCX C series.
Add die temperature measurement configuration.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-24 14:05:00 +02:00
Michal Smola
da6310c96c soc: mcxc: Enable bandgap buffer for on die temperature measurement
Bandgap voltage is used for on die temperature measurement. Bandgap
buffer has to be enabled explicitly to get correct tempearature.
Enable the buffer if TEMP_KINETIS is selected.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-24 14:05:00 +02:00
Tjaž Vračko
5183620949 doc: wifi: Fix typo in wifi.rst
WPA2-PSK-256 is supported, not WPA3-PSK-256, which does not exist.

Signed-off-by: Tjaž Vračko <tjaz@irnas.eu>
2024-10-24 14:04:52 +02:00
Pieter De Gendt
1759967597 scripts: west_commands: runners: Fix jlink is_ip
Commit f987e8c6f0a49b04a1184b1a36612612482e3d24 introduced a regression
where the is_ip check fails if no --id is passed as an argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-24 14:04:44 +02:00
Krzysztof Chruściński
1689eaf6a4 tests: drivers: spi: spi_error_cases: Improve nrf54h20dk cpuppr
Rework overlays and add sysbuild/vpr_launcher folder to allow standard
test configuration for nrf54h20dk cpuppr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-24 09:29:39 +02:00
Krzysztof Chruściński
949566f829 tests: drivers: spi: spi_controller_peripheral: Add nrf54h20dk cpuppr
Rework existing nrf54h20dk overlays to allow adding of
nrf54h20dk//cpuppr target.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-24 09:29:39 +02:00
Krzysztof Chruściński
f20b595dfe tests: drivers: spi: loopback: Add nrf54h20dk cpuppr
Add configuration for nrf54h20dk//cpuppr target.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-24 09:29:39 +02:00
Krzysztof Chruściński
20c34ea092 tests: drivers: spi: spi_loopback: Add nrf54h20dk cpurad
Add overlay for nrf54h20dk cpurad.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-24 09:29:39 +02:00
Krzysztof Chruściński
614e7d5399 tests: drivers: spi: loopback: Configurable large buffer
In order to allow fiting test in targets with smaller memory make
large buffer configurable through Kconfig.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-24 09:29:39 +02:00
Declan Snyder
28ec98a54a boards: frdm_mcxw71: Enable FlexCAN
Enable FlexCAN on MCXW71.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-24 09:29:31 +02:00
Declan Snyder
df95a86bc3 soc: nxp: mcxw71: Add FlexCAN node/clocking
Add node and enable clock for the FlexCAN module on MCXW71.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-24 09:29:31 +02:00
Daniel DeGrasse
a3d2b865f8 samples: net: wifi: add support for building NXP WiFi
Add support for building NXP WiFi. Since the driver typically requires
binary blobs, enable CONFIG_NXP_WIFI_BUILD_ONLY_MODE for this testcase.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
e6fc2be803 net: l2: wifi: add explicit dependency on "app" target for pem headers
Generated PEM headers need to be created before we build the WiFi shell
when WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE is enabled, so add an
explicit dependency on the app target to be certain these headers are
created

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Maochen Wang
a5ec0bd20f samples: wifi: fix build warning of DIV_ROUND_UP redefined
Remove CONFIG_MBEDTLS_HAVE_TIME_DATE, which will cause that mbedtls
include Zephyr time.h and leads to 'DIV_ROUND_UP' redefined warning.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-24 09:29:21 +02:00
Maochen Wang
6f2517807e hostap: fix build error when WPS enabled
Fix build error of multiple definition of `dh5_init' in
crypto_mbedtls_alt.c when WPS enabled.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
7bc316ba3c drivers: wifi: nxp: add CONFIG_NXP_WIFI_BUILD_ONLY_MODE for CI testing
Add CONFIG_NXP_WIFI_BUILD_ONLY_MODE, which allows the NXP WiFi driver to
be built without a binary blob. The built application will not be
functional, but this enables continuous integration to run upstream.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
8ea2c4f692 drivers: wifi: nxp: remove unused nxp_wifi_uap_status function
Remove unused function `nxp_wifi_uap_status`.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
4703fb0707 drivers: wifi: nxp: remove non-existent TWT fields
Remove references to TWT fields that did not exist, to resolve a build
error.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
452770f9e9 modules: hostap: remove set_btwt API
set_btwt API implementation is not complete. Remove the structure
definition and implementation from the NXP WiFi driver to fix a build
error.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Daniel DeGrasse
db271a7392 modules: hostap: remove ap_bandwidth API
ap_bandwidth API implementation is not complete. Remove the structure
definition and implementation from the NXP WiFi driver to fix a build
error.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-24 09:29:21 +02:00
Maochen Wang
088e4c571c manifest: Update hal_nxp to add Wi-Fi driver
Update hal_nxp to add Wi-Fi driver code.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-24 09:29:21 +02:00
Neil Chen
a10ce8e833 samples: drivers: display: add board to the display testcase
Add platform:frdm_mcxn236:SHIELD=lcd_par_s035_8080 to the display testcase

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-24 09:28:58 +02:00
Neil Chen
f5f3efada2 boards: nxp: frdm_mcxn236: Support flexio and lcd_par_s035
Support flexio and lcd_par_s035 for NXP frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-24 09:28:58 +02:00
Neil Chen
c597523515 dts: arm/nxp: Add flexio nodes to NXP MCXN23x dtsi file
Add flexio nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-24 09:28:58 +02:00
Declan Snyder
8c9d7b624c boards: nxp: rw: Enable sctimer
Enable sctimer on RW612 boards

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-24 09:28:49 +02:00
Declan Snyder
bd9cba897b dts: nxp: rw6xx: Add sctimer node
Add node for sctimer to RW SOC DTS

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-24 09:28:49 +02:00
Benjamin Cabé
a30270668d dts: bindings: vendor-prefixes: fix UP Bridge the Gap typo
s/brige/bridge/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-24 05:44:23 +01:00
Jamie McCrae
7609a17dc3 mgmt: mcumgr: grp: zephyr_basic: Add missing FLASH_MAP dependency
Adds a missing dependency, this command requires it to erase the
storage area

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-10-24 05:43:42 +01:00
Gerard Marull-Paretas
1b0840e910 drivers: pwm: nrf_sw: always default to yes
There's no need to add conditions to CONFIG_PWM_NRF_SW, because it is
already conditioned to DT status. Right now, if any system uses both
normal PWM and "SW PWM", it needs to manually enable the driver
Kconfig.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-24 03:47:23 +01:00
Gang Li
0d2f23f251 net: wifi: Fix the ap config command using the sta interface
The "wifi ap config" command uses the station interface via
net_if_get_first_wifi(), and should use the ap interface.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-10-24 03:46:37 +01:00
Dominik Kilian
cbaafe209c boards: nordic: ipc: added dcache alignement
The nRF54 and nRF92 chips has data cache, which means
the ICMsg and ICBMsg must be configured to follow required
cache alignment of the shared memory.
The `dcache-alignement` needs to be defined for that.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-24 03:45:35 +01:00
Florian Weber
1a89d4b13e drivers: sensor: akm09918: make submit function more unblocking
The driver now does not wait for the completion of a measurement
in the submit function.
Instead it schedule the fetch and the completion of the
submission queue entry as delayed work to the system work queue.

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2024-10-23 15:35:35 -05:00
Michael Arnold
3b6555a992 runners: jlink: Make port selectable for J-Link IP
If multiple J-Links with IP support are used,
they can be selected with different ports.
The actual implementation is just using the default port.
Make the port selectable with <ip>:<port>.

Signed-off-by: Michael Arnold <marnold@baumer.com>
2024-10-23 15:34:25 -05:00
Jilay Pandya
d172847da5 drivers: sensor: adi: ltc2990 init trigger measurement
This commit triggers measurement during sensor initialization

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-23 15:33:56 -05:00
Sean Madigan
e4fa386882 soc: nordic: nrf53: SOC_NRF53_CPUNET_ENABLE should not depend on !BT
The previous changes in
https://github.com/zephyrproject-rtos/zephyr/pull/74304
assumed that because this is also handled in
`bt_hci_transport_setup` that it shouldn't be done on
initialisation too.

However, if someone wants to develop their own app which
uses BT and also wants to enable the CPUNET by default this
KConfig should be available to them.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-10-23 15:32:59 -05:00
Benjamin Cabé
a2ecead78a boards: rakwireless: Use proper vendor prefix as board folder
hwmv2 established a convention that boards live in a folder named after
the vendor prefix.
RAK Wireless boards apparently missed the memo :)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 15:31:48 -05:00
Benjamin Cabé
074c0492ce doc: guidelines: add target-notes instructions and example
.. target-notes:: is a useful directive that needs to explicitly be
included for a "References" section to really be useful. This commit
updates the doc guidelines accordingly to help ensure that future docs
are using it correctly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 15:30:44 -05:00
Benjamin Cabé
fa0b17e4b1 doc: samples: add target-notes directive where missing
For the "References" section to be useful, it needs to include a call to
the target-notes directive, which is the one that actually generates the
list of references made in the current document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 15:30:44 -05:00
Benjamin Cabé
bbdf72f015 doc: boards: add target-notes directive where missing
For the "References" section to be useful, it needs to include a call to
the target-notes directive, which is the one that actually generates the
list of references made in the current document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 15:30:44 -05:00
The Nguyen
0e7c64e2ee samples: net: prometheus: add filter to not build with Renesas RA FSP
Exclude CONFIG_HAS_RENESAS_RA_FSP as Renesas RA HAL has build error
with MbedTLS and Socket enabled
Description in https://github.com/zephyrproject-rtos/zephyr/issues/80121

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-10-23 15:29:41 -05:00
Audun Korneliussen
7da4f4d9cd driver: regulator: npm1300: fix build warning
regulator_npm1300_init() generated uninitialized variable warning.
Fix this by being consistent in the error checking in underlying function.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-10-23 15:29:00 -05:00
Carles Cufi
b9058e8d18 boards: nordic: nRF54L15 DK: Update note
The note had become obsolete, point instead to Nordic's product and
documentation pages.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-23 15:28:01 -05:00
Bartlomiej Buczek
dfbcea777a tests: drivers: adc_accuracy: add calibration before sampling
Calibrate adc before taking measurement.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
557b5bda9a tests: drivers: adc_accuracy: parametrize expected accuracy
On nrf boards expected accuracy from ref voltage is 64 instead of 32.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
008f8babac tests: drivers: adc_api: change second channel gain for nrf54.
It will increase test coverage for adc driver, no test uses
ADC_GAIN_2_3 setting yet.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
108f6cdf3a tests: adc_accuracy: add overlay for nrf54l15dk.
Add overlay and enable test for nrf54l15dk.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
d4c8b358fa tests: adc_accuracy: Add overlay for nrf54h20dk.
Add overlay and enable test for nrf54h20dk.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
dc9a9dcf40 tests: adc_accuracy: Add overlay for nrf52840dk.
Add overlay and enable test for nrf52840dk.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:17 +02:00
Bartlomiej Buczek
da81490034 tests: drivers: adc: add adc_error_cases tests.
Tests are checking error codes returned from adc_read() and
adc_channel_setup() used with invalid configurations.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-23 17:02:07 +02:00
Dominik Kilian
8d99393530 doc: ipc: Add detailed protocol specs for ICBMsg backend
The details of how the ICBMsg communication is done, are hidden
inside the source code. This specification adds details about
the ICBMsg protocol.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-23 17:01:54 +02:00
Dominik Kilian
7574602108 doc: ipc: Add detailed protocol specs for ICMsg backend
The details of how the ICMsg communication is done, are hidden
inside the source code. This specification adds details about
the ICBMsg protocol.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-23 17:01:17 +02:00
Chaitanya Tata
78f5821b37 modules: hostap: Add a config option for WPA control timeout
WPA control interface timeout is hardcoded to 10s, add a configuration
option to remove the hardcode, this is needed sometimes as a workaround
e.g., crypto taking too long to complete the request.

Work around for #79834, increase the default from 10 to 15s, in positive
case this will have no impact.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
3cf8b09a9a manifest: hostap: Pull compile error fixes
This is related to work on #79973 which creates build tests
for hostap with different configurations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
3f8828d827 tests: net: wifi: Add build test for various config combinations
Try to compile test wifi with various configuration combinations.
This is trying to catch simple compilation issues in the PRs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
ec21dab31a hostap: Avoid warning of different enum mapping
Even if the enum contains the same values, the values might
change if the wpa_supplicant sources change or Zephyr values
change. In order to avoid weird errors later and prevent the
following warning, add a conversion functions for the enums.

modules/hostap/src/supp_api.c:1172:23: warning: implicit conversion
from enumeration type 'enum mfp_options' to different enumeration
type 'enum wifi_mfp_options' [-Wenum-conversion]
                status->mfp = ssid->ieee80211w; /* Same mapping */

modules/hostap/src/supp_api.c:1190:30: warning: implicit conversion
from enumeration type 'enum wpas_mode' to different enumeration
type 'enum wifi_iface_mode' [-Wenum-conversion]
                status->iface_mode = ssid->mode;

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
c9b8365f6d hostap: Add needed include files to fix compilation
The "enum wpa_msg_type" was not found by default so add needed
include files to get the definitions.

modules/hostap/src/supp_main.h:61:57: warning: ‘enum wpa_msg_type’
   declared inside parameter list will not be visible outside of
   this definition or declaration
   61 | void wpa_supplicant_msg_send(void *ctx, int level,
                                     enum wpa_msg_type type,
                                     const char *txt,

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
6ac4e9c3b7 hostap: Remove not found hostapd functions
Both the supplicant_set_btwt() and supplicant_ap_bandwidth() are
not found in Zephyr sources so remove them.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
980a352d39 hostap: Fix crypto=none compilation
If CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE is enabled, there
are lot of missing functions reported during linking.
Add missing C files to the compilation to fix this.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
e9ec7a23a3 hostap: Enterprise mode needs sha1-internal.c
Without this there is an error

modules/lib/hostap/src/crypto/fips_prf_internal.c:47: \
    undefined reference to `SHA1Transform'

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
33bc6f05c8 hostap: Fix compilation error when enterprise support is enabled
The code was missing ")" when checking crypto support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
6827ec0d93 hostap: P2P needs EAPOL to select it
The P2P support needs EAPOL support in order to avoid a compilation
error about missing eap field in wpa_ssid struct.

modules/lib/hostap/wpa_supplicant/wpa_supplicant.c:5102:65:
 error: ‘struct wpa_ssid’ has no member named ‘eap’
 5102 |      eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap)) {

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
0edb64db5f hostap: Add ip-addr.c compilation to the build
The functions in ip-addr.c are needed in more places than just
for hostapd so add it unconditionally to the build.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
18275f84d7 hostap: Fix hostapd AP compilation error
The supplicant_ap_status() is only available if
CONFIG_WIFI_NM_HOSTAPD_AP is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Jukka Rissanen
5c5f3b0b51 hostap: Remove extra IEEE8021X_EAPOL as it was mentioned twice
The CONFIG_IEEE8021X_EAPOL was in the Kconfig file twice so
remove the extra entry.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-23 17:00:45 +02:00
Emil Gydesen
fb6c4427b8 Bluetooth: Audio: Add helpers for broadcast name
Added helper functions to set and get broadcast name
for codec capabilities and codec configs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 16:54:28 +02:00
TOKITA Hiroshi
67db7fb232 MAINTAINERS: Add build_all test files for crypto, disk and w1
Add build_all to `files:` entry to crypto, disk and w1.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-23 16:54:15 +02:00
TOKITA Hiroshi
0845fbda7f tests: drivers: build_all: w1: Add zephyr,w1-serial to build test
Add configuration for `zephyr,w1-serial` to enable build test

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-23 16:54:15 +02:00
TOKITA Hiroshi
06eaf05bc8 tests: drivers: build_all: w1: Add i2c-devices build test
Add build tests for following devices.

- maxim,ds2482-800
- maxim,ds2484
- maxim,ds2485

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-23 16:54:15 +02:00
TOKITA Hiroshi
317405c01d tests: drivers: build_all: Add a build_all test for disk
The test targets the following devices at this time.

- zephyr,sdmmc-disk
- zephyr,mmc-disk

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-23 16:54:15 +02:00
TOKITA Hiroshi
60002865c7 tests: drivers: build_all: Add a build_all test for crypto
The test targets the following devices at this time.

- atmel,ataes132a

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-23 16:54:15 +02:00
Henrik Brix Andersen
cd543887f4 ci: build samples/cpp/hello_world as part of the multiplatform test
Build the C++ version of the Hello, World sample as part of the
multiplatform (build) test in CI.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-23 16:54:07 +02:00
Lucas Mathias Balling
01872642f4 Bluetooth: Audio: Fix PAST support for bap_scan_delegator
Fixed PAST support for bap_scan_delegator

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-23 16:53:58 +02:00
Lucas Mathias Balling
533a75dff4 tests: Bluetooth: bsim tests for Periodic Sync Transfer
Implemented:
  * Central sync to broadcaster, connects to peripheral and
    transfers sync. Peripheral Syncs to PA
  * Broadcaster acting Central connects to peripheral
    and transfers sync. Peripheral sync to PA
  * Moved previous bis tests to test_bis.c and
    new PAST tests was added in test_past.c

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-23 16:53:58 +02:00
Lucas Mathias Balling
cb0e3a7646 Bluetooth: Controller: Implement PAST support in ULL
Implement PAST support in ULL and fixed test after changed
dependencies in ull_sync_internal.c

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-23 16:53:58 +02:00
Lucas Mathias Balling
c7ffce3eb2 tests: Bluetooth: LLCP unittests for Periodic Sync Procedure
Added LLCP PDU Periodic Sync Indication unittests

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-23 16:53:58 +02:00
Lucas Mathias Balling
39fcf02181 Bluetooth: Controller: Implement Periodic Sync Procedure
Adding PDU flow for Periodic Sync Indication

Signed-off-by: Lucas Mathias Balling <lutb@demant.com>
2024-10-23 16:53:58 +02:00
Emil Gydesen
2dc1113a94 Bluetooth: CAP: Add support for handling ASE errors
If we get an error/rejection from the CAP acceptor when
performing the Unicast Audio Start or Stop procedure then
we need to abort the procedure and let the application determine
what the next step is.

This change triggered a corner case when connecting to multiple
CAP acceptors as the CAP initiatior. This was also fixed as part
of this.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 16:53:44 +02:00
Emil Gydesen
756f5f940c Bluetooth: BAP: Disallow bt_bap_stream_stop when CIS is not connected
When the CIS for a BAP stream is not connected, we cannot truly
be in the disabling state (the only state the stop operation
can be performed by the unicast client).

The reason for this is that if the CIS is disconnected, then
the ASCS server shall transition to the QoS Configured state
regardless of whether it has received a receiver stop ready
command from the unicast client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 16:53:44 +02:00
Babak Arisian
7f820d59c0 Bluetooth: Audio: Update SCAN_DELEGATOR dependency to GATT_DYNAMIC_DB
Changed dependency of the BT_BAP_SCAN_DELEGATOR to GATT_DYNAMIC_DB
from 'select' to 'depends on' and solved all loop dependencies
caused by this change.

Fixes #79108

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-10-23 16:53:37 +02:00
Krzysztof Chruściński
b6f7eac00a logging: Fix LOG_IMMEDIATE_CLEAN_OUTPUT
There was a kconfig option used in v1 logging to get clean
output in the immediate mode. It was lost during the transition
to v2 but Kconfig remained. Adding spin_lock to log processing
to ensure that log messages are not interleaved in the output
in the immediate mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-23 16:53:30 +02:00
Emil Gydesen
25c993e5b7 Bluetooth: Host: Remove implicit conversions of own_addr_type
Remove implicit conversions and assignment to the
own_addr_type variables.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 16:53:23 +02:00
Emil Gydesen
da2e8c3c96 Bluetooth: Add and use missing own_addr_type defines
The own_addr_type used for various HCI commands sometimes
had a BT_HCI_OWN_ADDR_* type value or a BT_ADDR_* type
value. Those are 2 different value spaces, and if the public
address types would ever change, it would start have incorrect
behavior.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 16:53:23 +02:00
Jimmy Zheng
6a3550e106 samples: drivers: mbox: fix adp_xc7k/ae350 configuration and overlay
This commit fixes the following issues for adp_xc7k/ae350
  1. Incorrect copyright due to copy-paste error
  2. Separate RAM region for the host and remote clusters
  3. Allocate hart 0 for host and hart 1 for remote cluster
  4. Use mbox channel 9, 10 for the sample, leaving channel/irq source
     1 ~ 8 for ae350 8-core IPI

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jimmy Zheng
6658b9c02c drivers: mbox: rework andes mbox plic to leverage intc_plic driver
Andes MBOX PLIC-SW use the same hardware as intc_plic driver. Reworked
mbox_andes_plic_sw implementation to leverage the intc_plic driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jimmy Zheng
6caf803a41 dts: bindings: mbox: rename plic-sw to mbox-plic-sw
Renamed andestech,plic-sw to andestech,mbox-plic-sw because the mbox node
is based on the PLIC interrupt controller node instead using the plic
hardware directly.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jimmy Zheng
f4fe84e112 soc: andestech: ae350: support 2 PLIC instances (PLIC, PLIC-SW)
Andes AE350 integrates 2 PLICs in the platfrom, one for external interrupt
and another for IPI. Adusted Kconfig for total IRQ numbers and support 2
aggregators in the 2nd level interrupt controller.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jimmy Zheng
6d6c87b9fe dts: riscv: andes: rename plic-sw node to interrupt controller
The plic-sw is the same hardware as the plic interrupt contoller and should
be used with intc_plic driver instead of separate mbox driver.

Renamed plic-sw node from "mbox: mbox-controller@e6400000" to
"plic_sw: interrupt-controller@e6400000".

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jimmy Zheng
da99144891 soc: andestech: linker.ld: fix incorrect padding of rom_mpu_padding
The rom_mpu_padding section is incorrect NAPOT padding for the address of
__rodata_region_end when ROM_BASE is not 0x0, because __rom_region_start
is set to the offset of rom_start section.

Fixed this by use "__rom_region_start = ABSOLUTE(.);" to keep both
__rodata_region_end and __rom_region_start are absolute address.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-10-23 16:53:13 +02:00
Jamie McCrae
9e1b3bbb65 sysbuild: images: bootloader: kconfig: Limit encryption
Limits selecting the encryption option to MCUboot operating modes
that support it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-23 16:53:05 +02:00
Armando Visconti
00c119776b sample: board: STWIN.box: add ilps22qs sensor data stream
Add ilps22qs data streaming.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Armando Visconti
f43816279c boards: st: steval_stwinbx1: add ilps22qs support
Add support to ILPS22QS barometer.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Armando Visconti
5be36eef47 drivers/sensor: lps2xdf: add ilps22qs support
The ILPS22QS is an ultra-compact piezoresistive absolute pressure sensor
which functions as a digital output barometer, supporting dual full-scale
up to user- selectable 4060 hPa. The device delivers ultra-low pressure
noise with very low power consumption and operates over an extended
temperature range from -40 °C to +105 °C.

(https://www.st.com/en/mems-and-sensors/ilps22qs.html)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Armando Visconti
4c3606a3bf drivers/sensor: lps2xdf: Fix typo in Kconfig
Change I2C into I3C as it is a typo.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Armando Visconti
71bb3f7ade drivers/sensor: lps2xdf: add API to configure interrupt
Add a generic lps2xdf_config_int() API to configure device interrupt
mode, and implement the specific routines for lps22df and lps28dfw.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Armando Visconti
8fab391d3f drivers/sensor: lps2xdf: (Fix) move API inside CONFIG_LPS2XDF_TRIGGER
Move api_lps2xdf_handle_interrupt() API inside the CONFIG_LPS2XDF_TRIGGER
ifdef, because it should be defined only in that case.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-10-23 16:52:57 +02:00
Karol Lasończyk
19252bdc3d tests: drivers: i2s: Add overlay to support nRF54L15 DK
Add overlay to support nRF54L15 DK.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-10-23 16:52:49 +02:00
Jamie McCrae
ece5581433 boards: rpi: Fix selection of symbol
Fixes selection of a symbol that was done in a defconfig file,
when actually it should be done in a Kconfig file as a dependency
for the board

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-23 16:52:36 +02:00
Babak Arisian
58d5032685 Bluetooth: Audio: add create_sink_by_name for the broadcast sink shell
Add create_sink_by_name command that scans for broadcast sources
with BT_DATA_BROADCAST_NAME matching the name given to the shell
command.

Fixes #70837

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-10-23 16:51:56 +02:00
Johan Stridkvist
50c47b0175 samples: Bluetooth: hci_ipc: Fix issue using icbmsg in bsim
Add call to Z_SPIN_DELAY() to avoid issue in bsim where
time does not progress in loop causing other threads to
starve.

Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
2024-10-23 16:51:48 +02:00
Tomasz Moń
19955f6478 drivers: udc_dwc2: Reduce TxFIFO0 allocation size
DWC2 peripherals can have TxFIFO sizes configured to any value between
16 and 32768. The value configured during synthesis is the maximum value
the software can program. Designs that give full flexibility configure
the TxFIFO sizes to value equal to total SPRAM size.

Currently DWC2 driver does not have prior knowledge about the endpoints
used within available configurations and has to come up with TxFIFO0
value up front. The original approach was to use MAX(16, max allowed).
locations. Because DWC2 peripheral cannot have TxFIFO0 with size lower
than 16 locations, always the max allowed was used. This logic prevented
any IN endpoint other than EP0 on designs that have TxFIFO0 size set to
total SPRAM size.

Change the logic to MIN(2 * 16, max allowed) to have sufficient memory
available on flexible designs and allow simultaneous operation if
possible (i.e. when maximum TxFIFO0 size is at least 32).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-23 16:51:38 +02:00
Maureen Helm
dc9e0cbedb doc: tracing: Use SystemView RTT tracing snippet
Refactors the SystemView tracing documentation to use the rtt-tracing
snippet.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-23 16:51:12 +02:00
Maureen Helm
36d8131e07 samples: tracing: Use SystemView RTT tracing snippet
Refactors the SystemView sample configuration to use the rtt-tracing
snippet.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-23 16:51:12 +02:00
Maureen Helm
b95cb4e137 snippets: Add SystemView RTT tracing snippet
Adds a new snippet to enable tracing with SEGGER SystemView and RTT.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-23 16:51:12 +02:00
Tomasz Moń
94a6b82572 drivers: udc_dwc2: Handle IN events before OUT events
DWC2 otg OUT transfers are being used for SETUP DATA0, OUT Data Stage
packets and OUT Status Stage ZLP. On High-Speed it is possible for IN
Data Stage, OUT Status Stage ZLP and subsequent SETUP DATA0 to happen
in very quick succession, making all the three events appear at the same
time to the handler thread.

The handler thread is picking up next endpoint to handle based on the
least significant bit set. When OUT endpoints were on bits 0-15 and IN
endpoints were on bits 16-31, the least significant bit policy favored
OUT endpoints over IN endpoints. This caused problems in Completer mode
(but suprisingly not in Buffer DMA mode) that lead to incorrect control
transfer handling.

The choice between least significant bit first or most significant bit
first is arbitrary. Switching from least to most significant bit first
would have resolved the issue. It would also favor higher numbered
endpoints over lower numbered endpoints.

Swap the order of endpoints in bitmaps to have IN on bits 0-15 and OUT
on bits 16-31 to keep handling lower numbered endpoints first and
resolve the control transfer handling in Completer mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-23 16:51:02 +02:00
Jamie McCrae
aefda52e42 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  33de65cebaf78b306501a4195dc0ce4008315e1a

Brings following Zephyr relevant fixes:
  - 33de65c scipts: imgtool: bugfix #2096

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-23 16:50:47 +02:00
Johan Hedberg
393ecf4426 drivers: bluetooth: Rename Silabs HCI driver
Rename the Silabs HCI driver to hci_silabs_efr32.c to better indicate what
hardware it supports. Also rename the associated devicetree binding and
Kconfig options to be consistent with the new driver name.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-10-23 16:50:39 +02:00
Benjamin Cabé
c9b71045f8 doc: extensions: boards: Better handle unknown/other vendors
Boards under a folder that doesn't directly match a vendor prefix
incorrectly end up being categorized as "zephyr" since that's the only
prefix that is eventually found when navigating up the folder hierarchy.

This commits treats boards in the "others" and "native" folders as
special cases and associates them to an "Unknown/Other" category.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-23 16:50:30 +02:00
Kapil Bhatt
b8c18f5544 manifest: update hal_nordic revision for regularity domain
Update update hal_nordic revision for regularity domain changes.
Set regularity domain in umac command init.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-23 16:50:15 +02:00
Kapil Bhatt
7161a7a06a drivers: wifi: Add changes for regulatory domain
Add changes for offloaded raw tx regulatory domain.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-23 16:50:15 +02:00
Henrik Brix Andersen
e7db0f8aff drivers: can: clarify the meaning of minimum/maximum supported bitrates
Clarify the meaning of of minimum/maximum supported bitrates in the CAN
controller driver API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-23 11:42:43 +02:00
Jiafei Pan
76f514e5f5 boards: nxp mpu: update supported features and fix ram size
Updated imx8mm/n/p and imx93 Cortex-A Core supported features in board
yaml file, and also fixed ram size for the board.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-10-23 11:41:25 +02:00
Harry Jiang
1c18076752 boards: weact: mini_stm32h743: Fix flash size and partition size
Ensured flash size and partition size are specified in bytes
as required by the STM32 QSPI NOR driver.

Signed-off-by: Harry Jiang <explora26@gmail.com>
2024-10-23 11:40:56 +02:00
Sebastian Głąb
8023a58c2a tests: drivers: can: api: Add negative test for can_send()
Check error codes when sending invalid frames:
- too big data payload;
- wrong set of flags.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-10-23 11:40:34 +02:00
Sebastian Głąb
2616720ee2 tests: drivers: can: api: Add negative test for can_set_bitrate_data()
There is negative test for too high data bitrate.
Add test that checks too low data bitrate.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-10-23 11:40:34 +02:00
Sebastian Głąb
13fbac86eb tests: drivers: can: api: Add negative test for can_set_bitrate()
There is negative test for too high bitrate.
Add test that checks too low bitrate.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-10-23 11:40:34 +02:00
Sebastian Głąb
dbc8eaa535 tests: drivers: can: api: Add negative test for can_add_rx_filter()
Check that error is reported when CAN filter is added without
callback function.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-10-23 11:40:34 +02:00
Appana Durga Kedareswara rao
f087f528f8 boards: amd: kv260_r5: update the board cmake to use xsdb runner
Update the board cmake to use xsdb runner, If users would like to
use default xsdb.cfg then need to pass the fsbl.elf binary via
--fsbl option when using west flash or twister commands.

Usage:
1) west flash --runner xsdb --elf-file kv260_r5/zephyr/zephyr.elf
 --fsbl <path>/fsbl.elf
2) ./scripts/twister -p kv260_r5 --west-runner xsdb --device-testing
 --device-serial /dev/ttyUSB0 --west-flash="--fsbl=<path>/fsbl.elf"

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2024-10-23 11:34:24 +02:00
Appana Durga Kedareswara rao
99a998a161 scripts: west_commands: tests: add pytest for xsdb runner
Add pytest case for xsdb runner.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2024-10-23 11:34:24 +02:00
Appana Durga Kedareswara rao
1708837e7b runners: add support for xsdb (Xilinx System Debugger)
Add support for xsdb(Xilinx System Debugger) used with AMD's FPGA
and SOC platforms, it is a user-friendly, interactive, and scriptable
command line interface, by design choice it's expected that platforms
to have xsdb scripts present inside their platform code.

xsdb runner has bitstream and fsbl optional arguments, bitstream is
needed for fpga targets and fsbl is needed for SOC targets, added
support for both options.

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2024-10-23 11:34:24 +02:00
Fin Maaß
74266e5c5a doc: migration-guide: mention change of socket service callback
mention change of callback function for the socket service.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-23 11:32:21 +02:00
Fin Maaß
03a5f417d1 net: sockets: socket_service: remove k_work related code
remove k_work related code and change
the argument of the callback to `struct net_socket_service_event`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-23 11:32:21 +02:00
Fin Maaß
1f23e769c0 net: sockets: socket_service: optimize code
optimize code for the net socket service.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-23 11:32:21 +02:00
Fin Maaß
75d2a4dfcf lib: shell: net: sockets: service: don't show type
as the async type got removed, there is only
one type left, so no need to show that.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-23 11:32:21 +02:00
Fin Maaß
4fdcd229f2 net: sockets: remove reference to async socket service
remove reference to async socket service

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-23 11:32:21 +02:00
Kai Vehmanen
475878428c soc: intel_adsp: tools: cavstool.py: add RPL and ADL-N support
Add PCI device IDs for common Intel Raptor Lake variants and Alder Lake N.
These all have cAVS2.5 audio DSP.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-23 11:31:35 +02:00
Kai Vehmanen
7ad012d3bb soc: intel_adsp: tools: sort cAVS2.5 PCI DIDs in cavstool.py
Numerically sort the PCI DIDs for cAVS2.5 hardware. This follows
the convention in e.g. Linux and coreboot and eases maintainance. No
functional change.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-23 11:31:35 +02:00
Kai Vehmanen
2c79024b2f soc: intel_adsp: tools: cavstool.py: add PCI DIDs for Intel Arrow Lake
Add PCI device IDs for two Intel Arrow Lake variants.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-23 11:31:35 +02:00
Kai Vehmanen
8795a17fa2 soc: intel_adsp: tools: reword cavstool.py startup log message
The "Detected cAVS 1.8+ hardware" message is misleading as it implies
some version of Intel cAVS hardware has been found, while in fact this
script supports also other types of hardware, including Intel ACE.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-23 11:31:35 +02:00
Kai Vehmanen
52bd2ff9a6 soc: intel_adsp: tools: continue cavstool.py legacy cleanup
Clean up code documentation to drop references to platforms no longer
supported in the code. Continues the cleanup started in commit
086e4f84ed ("intel_adsp: cavstool: Remove
legacy code").

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-23 11:31:35 +02:00
Emil Gydesen
5965ffea86 Bluetooth: BAP: Dont discover ASE CP if ASE not found
Added a check in unicast_client_ase_discover_cb that if
no ASE was discovered, then it would stop the discovery
there instead of attempting to call
unicast_client_ase_cp_discover to discover the control point
which would not be useful to use anyhow.

This terminates the discovery earlier in case of the remote
side not supporting the audio direction we are discovering.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-23 11:27:17 +02:00
Andrew Davis
9d0da02fbd soc: ti: k3: Select PINCTRL in UART driver not Kconfig.defconfig
The default configuration for PINCTRL should not be set with
the other default configurations in .defconfig, instead select
a default value as part of defining the UART driver.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-23 11:23:18 +02:00
Prashanth S
ee67369b78 boards: beaglebone_ai64: Add BeagleBone AI-64
Add initial BeagleBone AI-64 support.

BeagleBone AI-64: https://www.beagleboard.org/boards/beaglebone-ai-64

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-23 11:23:18 +02:00
Prashanth S
963db42af7 soc: ti_k3: Add TI J721E SoC R5
Add initial SoC support for the TI J721E SoC series Cortex-R5 core.

TRM for J721e https://www.ti.com/lit/zip/spruil1
File: spruil1c.pdf

Signed-off-by: Prashanth S <slpp95prashanth@yahoo.com>
Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-23 11:23:18 +02:00
Hao Luo
05531647ee drivers: spi: remove unused variables
Removed unused variables to get rid of warning

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-23 11:19:56 +02:00
Alberto Escolar Piedras
b1610b847d tests fff_fake_contexts: fix board name
Use full board name in cmake file.
Akin to the fix done in zephyrproject-rtos#80270
zephyrproject-rtos#80270
following the changes from
zephyrproject-rtos#77250
In which twister now uses the full board name when calling cmake.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-23 11:19:45 +02:00
Alberto Escolar Piedras
b9ec4e5396 tests: ztest base: fix board name
Use full board name in cmake file.
Akin to the fix done in #80270
https://github.com/zephyrproject-rtos/zephyr/pull/80270/
following the changes from
https://github.com/zephyrproject-rtos/zephyr/pull/77250/
In which twister now uses the full board name when calling cmake.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-23 11:19:45 +02:00
Anas Nashif
39917ae5e6 tests: ztest: fix board name
Use full board name in cmake file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 22:47:21 -04:00
Vincent van der Locht
5cbd1f6c39 usb: device_next: cdc_acm: Prevent polling for buffer in TX
In case the host doesn't pull the new data from the endpoint, the work task
would schedule itself again delayed (at the max. priority). When there is
no terminal program or active application reading the endpoint this
results in a constant polling of the endpoint burning up to 5% of the
CPU cycles.

By using a atomic flag for tx busy, the polling is solved and changed into
a postponed execution of the next work task which saves up to 5% of
CPU cycles and allows a better real-time behavior for other tasks.

Secondly, if the TX interrupt is disabled but there is still data in the TX
FIFO (ring buffer), the implementation will continue to trigger subsequent
TX work and attempt to flush the data to the host.

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2024-10-22 22:46:59 -04:00
Swift Tian
744338f6ea drivers: mspi: fix incorrect DT macro used in controller emulator
DT_INST* should be used in MSPI_CONFIG or device tree value capture
will fail sliently and fall back to defaults.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-10-22 22:46:47 -04:00
Swift Tian
c9a1db6e7e tests: mspi: fix incorrect DT macro used in api test
DT macro should be used is DT_ENUM* for enum type bindings

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-10-22 22:46:47 -04:00
Pisit Sawangvonganan
17e62bc24b net: shell: ping: streamline parse_arg function by using shell_strtol
Switch from using direct `strtol` calls to `shell_strtol`.
This change leverages the extensive error handling provided
by `shell_strtol`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-22 22:46:36 -04:00
Pisit Sawangvonganan
edaf94ec37 net: shell: ping: correct argument count for net ping command
Since `<host>` is a mandatory argument, the (_mand, _opt) values
should be adjusted to 2 and 12, respectively.
Note that `_mand` includes the number of mandatory arguments,
including the command name (`ping` itself).

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-22 22:46:36 -04:00
Jilay Pandya
271aeaf5f9 tests: drivers: stepper: stepper_api: test cb user_data
This commit does the following:
1. tests set_callback and user_data
2. fixes the api as well as the drivers by passing user_data
back to the set callback

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-10-22 22:46:26 -04:00
James Roy
fdae4d2e4f include: zephyr: dsp: Inconsistent macro names changed
Fix incorrect header file pre-macro names in include/zephyr/dsp.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-10-22 22:46:09 -04:00
Daniel DeGrasse
497aa66b00 boards: nxp: mimxrt1020_evk: correct flash chip name
RT1020 EVK uses a IS25LP flash chip, not IS25WP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
e8e43b60eb drivers: flash: flash_mcux_flexspi_nor: add IS25LP support
IS25LP flash chips have a similar P[6:3] register to the IS25WP series,
and need the same workaround.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
43b07894c3 boards: fix max frequency for IS25WP flash chips
IS25WP flash chips support 133MHz only when P[6:3] is programmed, which
will not occur during the SFDP probe sequence used in the FlexSPI nor
driver. With the default P[6:3] value, the best frequency supported for
read instruction 0xEB is 104MHz, so set this for all boards using this
flash chip with the FlexSPI nor driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
7ca996234f drivers: flash: flash_mcux_flexspi_nor: fix IS25WP flash support
Some NXP boards program the read parameters bits (P[6:3]) within the
IS25WP flash device during init, which will result in JESD216 probe
commands failing (as the number of dummy cycles will be incorrect). Add
handling to force these volatile bits to their default value to the
flexspi flash driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
c410b020b5 drivers: flash: flash_mcux_flexspi: fix support for QE method 5
Quad enable method 5 reads status register 2 (one byte), but then writes
to 2 bytes to the status registers, so we need to shift the output
buffer in order to manage this correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
966b4339ee drivers: flash: flash_mcux_flexspi_nor: fix quad enable sequence
Writing the quad enable bit on flash chips typically requires a write
enable instruction be issued before writing the non-volatile status
register, and the flash may remain busy briefly after programming this
bit. Add code to send the WREN instruction, and to wait for the flash to
finish programming after writing the status register.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
e8a2832beb drivers: flash: flash_mcux_flexspi_nor: store probe lut in .data
Move the LUT used for probing to be stored in .data, instead of on the
stack. This reduces stack usage during probe by 192 bytes, which avoids
stack overflows that were occurring on some platforms.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-23 09:06:19 +09:00
Daniel DeGrasse
52d98498bc drivers: input: gt911: always set INT pin during probe
Even in cases where the alt-addr is set, we can still use the INT pin
during probe. Some boards require this, as if a reset GPIO is not
defined the INT pin may still need to be toggled in order to initialize
the GT911 IC correctly.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 19:04:59 -04:00
Stephanos Ioannidis
6b928de90c SDK_VERSION: Use Zephyr SDK 0.17.0
This commit updates ZEPHYR_SDK to point to the Zephyr SDK 0.17.0 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-22 19:04:37 -04:00
Stephanos Ioannidis
974c7d4229 ci: Switch to CI image v0.27.3
This commit updates the CI workflows to use the CI image v0.27.3, which
includes Zephyr SDK 0.17.0.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-22 19:04:37 -04:00
Stephanos Ioannidis
a93095626b tests: benchmarks: wait_queues: Increase test timeout to 120s
This commit increases the test timeout for the wait queue benchmark tests
to 120 seconds because these tests frequently hit the default timeout of 60
seconds during execution.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-22 19:04:37 -04:00
Anas Nashif
1c3b47e9ef twister: test udpates for new board handling
Updated tests for new board handling.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
1f913f5fe3 boards: intel_adsp: use one twister.yaml
Use one single twister configuration file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
dfc7860ab1 twister: rework board handling
We now use hwmv2 to list boards instead of relying on twister specific
config files.
One yaml files (twister.yaml for now) will have all the data needed for
all possible targets and variations of a board reusing most of the data
where possible and variations can override the top level data.

Twister keeps track of 'aliases' of boards and identifies that for
example native_sim is the same as native_sim/native, so either names
will be possible in both test yaml files or on the command line,
however, the reporting will always use the full name, so no there is no
confusion about what is being tested/built.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
f1bf24e4dd boards: other: stm32_min_dev: use one twister.yaml
Use twister.yaml  and fix revisions in board.yml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
8c67423849 tests: use full name for fvp_base_revc_2xaemv8a//smp/ns
no shortcuts allowed in test files

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
ea03011d1c tests: zbus: use full target name
Do not use shortcuts...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Anas Nashif
85d42bc7f1 board: mimxrt1060: fix revisions and add to board.yml
configure revisions in board.yml file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-22 18:31:09 -04:00
Luis Ubieda
1fdf6e64fb spi: sam: Refactor driver to use SPI RTIO common APIs
- Following similar approach followed on spi_mcux_lpspi driver.
- Enabling DMA by default when SPI RTIO is selected to favor
non-blocking transfers.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 18:30:24 -04:00
Vladislav Pejic
cfe64f7f1c drivers: sensor: adxl372: Updated driver with RTIO stream functionality
Updated ADXL372 driver with RTIO stream functionality.
RTIO stream is using both FIFO threshold and FIFO full triggers.
Together with RTIO stream, RTIO async read is also implemented.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-22 18:30:13 -04:00
Bartlomiej Buczek
9356999229 samples: boards: nordic: system_off: Add GRTC wakeup
Extend system_off sample to use GRTC timer as a wake up source.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-10-22 18:30:03 -04:00
Reto Schneider
f81c1de130 drivers: serial: Sort CMake and Kconfig files alphabetically
By sorting the lines alphabetically, merge conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-22 18:29:53 -04:00
David Missael Maciel
cddf01d5a0 samples: drivers: memc: enable support for FRDM_RW612
Enable support for FRDM_RW612 with memc driver sample, using attached
aps6404l PSRAM.

Signed-off-by: David Missael Maciel <davidmissael.maciel@nxp.com>
2024-10-22 18:29:42 -04:00
David Missael Maciel
05acc88f98 boards: nxp: frdm_rw612: add aps6404l PSRAM
Add entry for aps6404l PSRAM on frdm_rw612 board

Signed-off-by: David Missael Maciel <davidmissael.maciel@nxp.com>
2024-10-22 18:29:42 -04:00
David Missael Maciel
cc1266ad6a drivers: memc: add memc_mcux_flexspi_aps6404l driver
Add driver for aps6404l PSRAM, using FlexSPI MEMC driver interface.

Signed-off-by: David Missael Maciel <davidmissael.maciel@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
e8d9dec141 drivers: memc: memc_mcux_flexspi: allow setting ahb alignment boundary
Some instances of the FLEXSPI IP permit limiting AHB bus access so that
no memory access requests will straddle a page boundary. Add a property
to manage this setting.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
df18121526 drivers: memc_mcux_flexspi_is66wvq8m4: make addressShift unconditional
is66wvq8m4 PSRAM always requires the address to be left shifted by
5 bits, regardless of which FLEXSPI port it is on. Fix the addressShift
assignment to be unconditional

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Daniel DeGrasse
5b4e4cfb04 drivers: memc_mcux_flexspi: remove addr adjustment based on ADDRSHIFT
The ADDRSHIFT bit simply left shifts the address written to IPCR0[SFAR],
(or the address used for AHB access), by 5 bits before sending it to the
attached memory. This bit does not have an effect on the base address
used to access the flash/psram device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 18:29:42 -04:00
Tom Burdick
5bd0912c76 i2c: Drop transceive test, fix transfer call count
Transactions should result in a single transfer call not multiple
transfer calls. Transceive isn't supported by i2c and so the TXRX op
isn't validated for success anymore.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-10-22 18:29:34 -04:00
Tom Burdick
24762115d4 i2c: Fix default RTIO handler transactions
Transactions from RTIO should result in single calls to i2c_transfer.
This corrects the default handler to first count the number of
submissions in the transaction, allocate on the stack, and then copy
over each submission to an equivalent i2c_msg.

It also cleans up the helper functions to be infallible, taking only the
submission and msg to copy to.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-10-22 18:29:34 -04:00
Tom Burdick
fab01c0c44 i2c: Drop TXRX from default RTIO handler
TXRX is meant specifically to handle a full duplex bus like SPI, I2C is
half duplex meaning only read or write can be performed at once.

Drop TXRX as a supported operation code for the default I2C submission
path.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-10-22 18:29:34 -04:00
Dimitrije Lilic
86ed9811c4 drivers: sensor: adxl345: Updated ADXL345 drv RTIO stream & Trigger func
Updated ADXL345 driver with RTIO stream functionality.
Added Trigger intterupt functionality. RTIO stream is using
FIFO threshold.Together with RTIO stream, RTIO async read
is also implemented.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-22 18:29:22 -04:00
Michal Simek
35401fd7a9 MAINTAINERS: add myself to collaborators list
Add myself to collaborators list for Xilinx/AMD platforms and also
cover missing files and folders.

Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-10-22 18:29:10 -04:00
Evgeniy Paltsev
6d083cac7e Revert "arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK"
The commit introduced regression for hsdk4xd platform.
The hsdk4xd SoC setup from soc_early_asm_init_percpu need to be done
in early code before any C code execution.

The current approach has multiple issues
 - we call function (which can be easily implemented in C for
   this or other SoC) from the place where we haven't setup stack
   pointer (so we can't use stack) - which is very error-prone
 - we never return back from soc_reset_hook on hsdk4xd platform

So let's just revert it for now. If any other ARC SoC need to use
soc_reset_hook - than it can be implemented properly.

This reverts commit 8c32a82e47.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-10-22 18:28:37 -04:00
Marc Herbert
fe9bfe5335 doc: sign: minor rimage update following imgtool removal
Fixes commit 1df078158f ("doc: build: Add signing page") that removed
the `imgtool` section from the `sign.rst` page.

rimage configuration was designed in a very different way from imgtool
configuration. The rimage doc section was following the imgtool doc
section and constrating the two approaches. Now that the previous
imgtool doc section has just been removed, some words like "different"
and "instead" don't make sense anymore. Drop them.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-10-22 18:28:29 -04:00
Maureen Helm
4c77129995 boards: shields: Add EVAL-ADXL362-ARDZ accelerometer shield
Adds a new shield definition for the Analog Devices EVAL-ADXL362-ARDZ
accelerometer shield. This shield provides support for an ADI ADXL362
3-axis accelerometer over an Arduino SPI connector.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-22 18:27:55 -04:00
Dmitrii Golovanov
3d78524186 ci: footprint: Fix missing globstar
Add missing globstar wildcard option.

Set bash as default shell for the workflow.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-22 18:27:28 -04:00
Jordan Yates
69b73ebb0a samples: gnss: add timepulse support
Output the timestamp of the PPS timepulse when printing the fix
information, if the driver support the timepulse and it has started
toggling.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-22 20:42:30 +02:00
Jordan Yates
80e99dcb46 gnss: API for retrieving PPS timestamp
Add an API function for retrieving the timestamp of the latest PPS
timepulse at the highest resolution we have available, the kernel tick
count.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-22 20:42:30 +02:00
Dimitrije Lilic
2507752d7f tests: drivers: spi: spi_loopback: Support RTIO tests for APARD32690
Add overlay for APARD32690 board and add a new test case to
test RTIO functionalities of SPI MAX32 driver.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-22 20:42:20 +02:00
Dimitrije Lilic
15ec1f2016 driver: spi: MAX32 add RTIO support plus refactor
Implements the SPIO RTIO API. Refactors internal transcive
fucntios to work with both existing SPI API and RTIO functions.

When SPI_RTIO is enabled the spi_transcieve call translates
the request into an RTIO transaction placed in the queue
that device will execute.

Include the latest refacor changes of RTIO.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2024-10-22 20:42:20 +02:00
TOKITA Hiroshi
e78811bcd6 tests: drivers: build_all: ethernet: Add devices build tests
Add build tests for following devices.

- microchip,ksz8081
- realtek,rtl8211f
- nxp,tja1103
- microchip,lan865x

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-22 20:42:05 +02:00
TOKITA Hiroshi
96a17e2a0f drivers: ethernet: Add dummy driver for vnd,ethernet
Add dummy driver for "vnd,ethernet" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-22 20:42:05 +02:00
Jerzy Kasenberg
70364e8d46 boards: renesas: Smartbond: Add test supported feature usbd
Marks boards da1469x_dk_pro and da14695_dk_usb as supporting
new usb driver support

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-10-22 20:41:55 +02:00
Jerzy Kasenberg
d5a008dd3b drivers: usb: udc: add Smartbond UDC driver
Code adds Smartbond UDC driver to be used with
USB next stack.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-10-22 20:41:55 +02:00
Jerzy Kasenberg
0575c1a976 drivers: dma: smartbond: Fix power policy handling
Function dma_smartbond_set_channel_status() used incorrect
condition to release state lock.
In initialization function dma_smartbond_init() function
dma_smartbond_set_channel_status() was called for each DMA
channel and tried to release lock that was never taken.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-10-22 20:41:55 +02:00
Luis Ubieda
ca822d4e4b sensor: lm77: Add LM77 config as a subset of the main symbol
Following pattern used in other Kconfigs. This also addresses the CI
failure on previous run.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 20:41:43 +02:00
Luis Ubieda
9e45529438 tests: build_all: sensor: Add int-gpios to ICM42688
Required to use trigger modes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 20:41:43 +02:00
Luis Ubieda
d557ee36d5 sensor: tree-wide: Enforce dependency of int-gpios with Trigger feature
We need int-gpios defined to use trigger functionality. Enforced with
the Kconfig parameter.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-10-22 20:41:43 +02:00
Scott Worley
62d7db4d4d drivers: timer: mec5: Driver using Microchip RTOS timer as kernel tick
Timer driver using Microchip 32KHz based RTOS timer as the kernel
timer tick. The driver uses one of the 32-bit basic timers to
support the kernel's k_busy_wait API which is passed a wait
count in 1 us units. The 32-bit basic timer is selected by using
device tree chosen rtimer-busy-wait-timer set to the handle
of the desired 32-bit basic timer. If this driver is disabled,
the build system will select the ARM Cortex-M4 SysTick as the
kernel timer tick driver. The user should specify RTOS timer
as kernel tick by adding the compatible properity and setting
the status property to "okay" at the board or application level
device tree. The driver implements two internal API's for use
by the SoC PM. These two API's allow the SoC PM layer to disable
the timer used for k_busy_wait so the PLL can be disabled in
deep sleep. We used a custom API so we can disable this timer
in the deep sleep path when we know k_busy_wait will not be
called by other drivers or applications.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-10-22 20:41:32 +02:00
Aksel Skauge Mellbye
a11f0e6d8d soc: silabs: Separate Series 2 soc.c
Series 2 always uses the device init HAL, while Series 0/1 never do.
Create a separate soc.c for Series 2 to make both versions easier to read.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
cfccd11026 drivers: timer: gecko: Remove clock configuration
Clock setup is now done by the clock manager based
on device tree configuration.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
c6c3e194d9 boards: silabs: Remove clock configuration
Clock setup is now done by the clock manager based
on device tree configuration.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
955aca6c09 soc: silabs: Initialize clock manager HAL from DT
Swap from the deprecated device_init_* functions to clock manager
for clock tree configuration. Populate config headers using
device tree representation of clock tree and oscillator config.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
634976f535 dts: silabs: Add clock bindings and clock tree
Introduce bindings for Series 2 oscillators: HFRCODPLL, HFRCOEM23,
LFRCO and LFXO.

Add clock tree representation in devicetree `clocks` node.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
25e998fc04 soc: silabs: Enable device init on EFR32MG21
Switch EFR32MG21 to use the device init HAL. This makes the init sequence
the same as the rest of Series 2.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
046766573d soc: silabs: Derive SYS_CLOCK_HW_CYCLES_PER_SEC from DT
On Series 2, set the SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig option from
DeviceTree, rather than separately configuring it in board-level
defconfig.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
fff250c21d soc: silabs: Introduce family specific defconfig
Defconfig was only available at the vendor and series level,
make it possible to have family specific definitions too.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Aksel Skauge Mellbye
3d0909ed18 soc: silabs: Initialize DCDC from device tree
The DC-DC converter was unconditionally initialized with default
settings on Series 2. Add device tree binding and nodes, and guard
call to init function. Map DT options to config header from HAL.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-22 20:41:23 +02:00
Johan Hedberg
60462266e3 modules: hal_silabs: Move CMake and Kconfig to the main tree
Move the CMakeLists.txt and Kconfig files from the hal_silabs tree under
modules/hal_silabs in the main tree. This also includes all Zephyr shim
code from the hal_silabs tree.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-10-22 20:41:23 +02:00
Abderrahmane Jarmouni
c3fd40d59c boards: st: stm32h750b-dk: enable usart1
Enable USART1 that can be used with external periphs via Arduino pins.
LPUART1 can also be used on the same pins.
Tested with tests/drivers/uart_elementary

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-22 20:41:13 +02:00
Piotr Koziar
51e0130a74 ipc: icmsg: increase stack size of RX work queue thread
Increases default size of stack used by work queue RX thread
from 1024 to 1280 to avoid memory issues.

After adding the buffer with the default size of 128
that is allocated on the thread's stack (see #77552),
there is too little stack left during heavy stress.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-10-22 20:40:57 +02:00
Krzysztof Chruściński
0a54922ba7 lib: cbprintf: fix ubsan errors in cbvprintf_package (take 2)
First approach had to be reverted because it did not pass tests.
Take 2 attempts to use uintptr_t instead of a pointer and cast it
to the expected pointer when necessary.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-22 20:40:49 +02:00
Yves Vandervennet
adeeb10f4f board: mimxrt1170_evk: fix linkserver support to debug RAM images
- add ITCM definitions (for LinkServer) in board.cmake
- update of soc.c to support RAM images (stack pointer)
- doc update

Change applies to both versions of the MIMXRT1170 EVK

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-10-22 20:40:39 +02:00
Hao Luo
8b107ab5f1 drivers: i2c: add bus recovery
Added bus recovery support for ambiq i2c

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-22 20:40:29 +02:00
Stephanos Ioannidis
97a2f30757 thrift: Define module-wide _POSIX_C_SOURCE feature test macro
The Thrift library makes use of POSIX C functions such as ctime_r(), which
are not part of the ISO C standard.

This commit adds a Thrift module-wide `_POSIX_C_SOURCE` feature test macro
definition in order to ensure that the required POSIX C functions are
available when compiling the Thrift library.

Note that this was not caught earlier because Newlib and older versions of
Picolibc did not properly fence off some POSIX functions behind the feature
test macros.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-22 20:40:20 +02:00
Stephanos Ioannidis
871b558524 tests: thrift: Remove 'newlib' from test identifiers
The Thrift module tests were under the "newlib" namespace, presumably
because newlib was the default at the time of their introduction.

Since newlib is no longer the default libc and Thrift is not being tested
against multiple C libraries, this removes the libc type from the Thrift
test identifiers.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2024-10-22 20:40:20 +02:00
Grzegorz Swiderski
ff70e2f4c4 modules: hal_nordic: Integrate nrf-regtool 7.0.0
This new version introduces a new sub-command `uicr-compile`, which will
generate `uicr.hex` based on a new binary format required by an upcoming
release of Secure Domain Firmware (SDFW) closer to production.

Since this is a breaking change, and SDFW is not finalized yet, we need
to support two nrf-regtool versions for a short time, and use different
CLI invocations based on which version is installed. Hence, the minimum
required version is unchanged.

Additionally, retire CONFIG_NRF_REGTOOL_EXTRA_GENERATE_ARGS. There will
be no use for it moving forward.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-22 20:40:10 +02:00
Kapil Bhatt
0b11b39461 drivers: wifi: Add Kconfig option for passive scan
Add kconfig option for forced passive scan, It will use for
only scan only mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-22 20:40:01 +02:00
Neil Chen
98110e2946 tests: drivers: can: timing: enable full timing test on frdm_mcxn236
Enable the full range of CAN timing tests on the NXP FRDM-MCXN236 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-22 20:39:50 +02:00
Neil Chen
61336cf6fa boards: nxp/frdm_mcxn236: Support Flexcan for NXP frdm_mcxn236 board
Support Flexcan for NXP frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-22 20:39:50 +02:00
Neil Chen
bb7626220c dts: arm/nxp: Add Flexcan nodes to NXP MCXN23x dtsi file
Add Flexcan nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-22 20:39:50 +02:00
Sadik Ozer
d8753a119d tests: drivers: flash: Add MAX32690 boards overlay file
Enable flash driver test for MAX32690 boards.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Tahsin Mutlugun
ab49ba41d4 tests: drivers: flash: Add MAX32680EVKIT board overlay file
Enable flash driver tests for MAX32680EVKIT board.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-10-22 20:39:41 +02:00
Sadik Ozer
5aae75548c tests: drivers: flash: Add MAX32675EVKIT board overlay file
Enable flash driver test for MAX32675EVKIT board.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Sadik Ozer
ccd84905ad tests: drivers: flash: Add MAX32672 boards overlay file
Enable flash driver test for MAX32672 boards.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Sadik Ozer
931d89e6b8 tests: drivers: flash: Add MAX32670EVKIT board overlay file
Enable flash driver test for MAX32670EVKIT board.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Furkan Akkiz
198518df5b tests: drivers: flash: Add MAX32666 boards overlay file
Enable flash driver test for MAX32666 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-10-22 20:39:41 +02:00
Furkan Akkiz
b2b8957d80 tests: drivers: flash: Add MAX32662EVKIT board overlay file
Enable flash driver test for MAX32662EVKIT board.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-10-22 20:39:41 +02:00
Sadik Ozer
539a7a18d6 tests: drivers: flash: Add MAX32655 boards overlay file
Enable flash test for MAX32655 boards.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Mert Vatansever
f58a1993bd boards: arm: adi: Add flash in MAX32xxx boards driver list
Add flash in 'index.rst' and '.yaml' file of MAX32xxx boards.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
2024-10-22 20:39:41 +02:00
Maureen Helm
2f03561399 soc: adi: Extract max32 flashprog section to a dedicated linker script
Extracts the max32 flashprog linker section to a dedicated linker script
that is conditionally included only when the flash driver is enabled.
This prepares max32 soc family to set SOC_LINKER_SCRIPT directly to the
common arm cortex-m linker script.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-22 20:39:41 +02:00
Mert Vatansever
321f735f9f dts: arm: adi: Add binding file for MAX32xxx flash driver
This commit adds flash controller driver binding file.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
2024-10-22 20:39:41 +02:00
Mert Vatansever
d1678a51de drivers: flash: Add MAX32xxx flash driver
Support flash read, write, erase features.

Signed-off-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-22 20:39:41 +02:00
Emil Gydesen
afb7d961d2 tests: Bluetooth: tester: Add nRF5340 ADK as platform
Add support for building and running the BT tester on the
nrf5340_audio_dk.

This is copying the configuration used for the nRF5340 DK.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-22 20:39:30 +02:00
Michal Simek
7c809b9945 serial: xilinx: uartlite: switch to DT_INST_IRQN_BY_IDX
Use DT_*IRQN helper to get the IRQ number on systems with multi-level
interrupt configuration instead of IRQ number on particular interrupt
controller.

Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-10-22 20:39:12 +02:00
Jukka Rissanen
12dadf7a24 tests: net: pkt: Add build test for allocation statistics
Make sure we build test the allocation statistics.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-22 20:38:57 +02:00
Jukka Rissanen
d3fbc366ea net: shell: mem: Add net_pkt allocation statistics printout
The "net mem" command can show extra information for net_pkt
allocations.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-22 20:38:57 +02:00
Jukka Rissanen
67be3a166b net: pkt: Collect net_pkt allocation statistics
If CONFIG_NET_PKT_ALLOC_STATS is enabled, then "net mem" command
can show net_pkt allocation statistics like succeed / failed
allocation counts, average sizes and allocation time.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-22 20:38:57 +02:00
Chaitanya Tata
f7ef64df28 drivers: nrfwifi: Allow scan-only for all platforms
Though nRF7000 is a special Scan only chipset, scan only can work with
any nRF70 platforms, no need for this enforcement and we can keep things
flexible.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-22 20:38:48 +02:00
Declan Snyder
93a0a3a9ca MAINTAINERS: Devicetree: Match common bindings
In addition to matching zephyr, prefixed bindings, match common bindings
(assuming that common bindings are those that do not have any prefix)

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-22 20:38:39 +02:00
Jilay Pandya
bb0891431b doc: release notes: added stepper release notes
Added stepper controller support to release notes for release 4.0

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-22 20:38:30 +02:00
Jilay Pandya
87f85e4296 doc: stepper: update stepper documentation
This commit adds documentation about stepper api along
with some minor cleanups

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-22 20:38:30 +02:00
Daniel DeGrasse
e0fe1e4621 samples: drivers: display: consolidate testcase.yaml
Consolidate the testcase.yaml definition for the display sample where
possible to use a single testcase for all shields. This won't work for
all testcases, but helps avoid the pattern where a new testcase using
"platform-allow" is added for every shield/board combination that needs
to be run with this sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-22 20:38:20 +02:00
Sudan Landge
ad71901490 arm64: linker: fix: broken tests for fvp_aemv8r_aarch64
What is changed?
Twister tests and sample applications can now run successfully again
for `fvp_aemv8r_aarch64`.
`__kernal_ram_start` is also modified for cortex_m and cortex_a_r
to be consistent with aarch64 linker script and avoid such issue in
the future.

How is it changed?
Modified linker script to make sure that `__kernal_ram_start` to
`__kernal_ram_end` includes both, bss and data, sections as before.

Why do we need this change?
Twister tests and sample applications failed for `fvp_aemv8r_aarch64`
and it was found that commit #87f68b4dfed14eb08132fe9798fb209f1bed64f2
moved the bss section but missed moving the __kernal_ram_start to the
data section which resulted in a crash.

The change is tested with FVP_BaseR_AEMv8R version: 11.27.19.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-22 20:38:09 +02:00
Henrik Brix Andersen
9b00bf4359 snippets: rtt-console: enable console
Enable CONFIG_CONSOLE in the Segger RTT console snippet as this is a
dependency for CONFIG_RTT_CONSOLE.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-22 20:38:00 +02:00
Krzysztof Chruściński
6e653a96f7 tests: boards: nrf: qdec: Fix failing drivers.sensor.qdec.pm_runtime
Test was failing because after re-enabling QDEC there is an interrupt
REPORTRDY coming after some time. Test had k_msleep(100) added to
accomodate for that but it was added after sensor_sample_fetch and
should be added before so that sample with data from REPORTRDY event
is fetched so that next read is empty as expected.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-22 08:21:19 -04:00
Maximilian Deubel
a441492c7d tests: net: lib: wifi_credentials: add tests
This patch adds tests for the wifi_credentials library.

Both the main functions and the backend implementations are tested.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-22 08:21:04 -04:00
Maximilian Deubel
e7ce0f5dab net: lib: wifi_credentials: add connect-stored feature
This patch adds a feature to directly connect to stored Wi-Fi
credentials without having to compose the NET_MGMT commands yourself.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-22 08:21:04 -04:00
Maximilian Deubel
f6d305a529 net: lib: add wifi_credentials library
Upstream NCS's library for storing Wi-Fi credentials.
This library allows storage of Wi-Fi credentials
using different backends.
Either the Zephyr settings subsystem
or the PSA secure backend can be used.
For testing purposes, credentials can be defined statically.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Signed-off-by: Gregers Gram Rygg <gregers.gram.rygg@nordicsemi.no>
Signed-off-by: Kaja Koren <kaja.koren@nordicsemi.no>
Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-22 08:21:04 -04:00
Dmitrii Golovanov
b758e205b2 ci: footprint: Fix shopt not found
Use bash explicitly to have shopt available.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-22 14:16:03 +02:00
Hao Luo
a1cd2d6c83 drivers: pm: add pm_policy_state_lock for drivers
Added pm_policy_state_lock to prevent memory power
off during data transfer

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-22 14:14:34 +02:00
Declan Snyder
41580bdc07 drivers: i2s_mcux_sai: Clang format
Clang format to fix strange formatting, shortens the line count by 100

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-22 14:13:59 +02:00
Brandon Allen
bb24c83d70 net: lib: lwm2m: lwm2m_rw_senml_cbor: only assign time on get_s64() success
Currently GCC complains that temp64 may be used uninitialized in this
 function. Adds a check to ensure time is valid before assignining
 and fixes GCC warning.

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
2024-10-22 14:12:48 +02:00
Benjamin Cabé
b58b8964d3 boards: seeed: adopt new zephyr:board directive and role
This updates the documentation of all the Seeed Studio boards to use
the new `zephyr:board::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
ecb7c875dd doc: boards: extensions: introduce zephyr:board role and directive
A new zephyr:board:: Sphinx directive allows  to flag a documentation
page as being the documentation for a specific board, allowing to
auto-populate some of the contents, ex. by adding a board overview a la
Wikipedia, and later things like supported HW features, etc.

A corresponding :zephyr:board: role allows to link to a board doc page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
534990249d doc: boards: extensions: store board_catalog in Sphinx domain
Load the board catalog only once at build-inited time so that
it's cached and enabled things like boards, vendors, and socs
to eventually become first class Sphinx objects.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
f75f2bf5d9 doc: release: 3.7: sphinxlint fixes
Fixes typos in Sphinx roles

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
42354ccfce doc: scripts: boards: don't init pykwalify logging
This might be a leftover from a previous version but this is basically
silencing all Sphinx logs when generating the catalog from Sphinx -- not
good!

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
329f411196 doc: boards: extensions: add board name to catalog for convenience
This makes dictionary entries from the boards catalog more
self-contained as the name of the board is now included in the entry.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
15f0894b0f doc: boards: extensions: remove unused import
Make all Zephyr directives inherit from SphinxDirective

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Benjamin Cabé
04e6406edb doc: boards: extensions: store "raw" image path
Small change to the way image are stored in the catalog so that we know
where the source image is rather than anticipating on the final path
after build has happened. This allows to potentially reference the
source image from e.g. directives.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-22 14:11:27 +02:00
Nithin Ramesh Myliattil
b717488be2 bluetooth: BAS: add battery critical status char to bas service
Added the battery critical status char to bas service
as per bas_1.1 spec. Updated BSIM test for BAS service
to test the INDs of BAS critical characteristic.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-10-22 14:06:35 +02:00
Szymon Janc
298c01cb97 Bluetooth: Tester: Set ISO MTU to 310
This makes sure we always fit all configurations. Worst case is two
audio streams in 48_6 configuration in single ISO channel (2x155).

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-22 14:05:31 +02:00
Szymon Janc
5453acb9b7 Bluetooth: Tester: Fix BTP response for BAP Send Data command
struct btp_bap_send_rp is already fixed size and contain extra
response byte.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-22 14:05:31 +02:00
Szymon Janc
3e5472d4c3 Bluetooth: Tester: Send test data when entering streaming state
For now this seems to be required by PTS as there is not Upper Tester
action for this in Test Specification.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-22 14:05:31 +02:00
Andrzej Kuros
adf4e73d64 net: openthread: support Kconfig IEEE802154_SELECTIVE_TXCHANNEL
For transmit_message if the transmission is timed and underlying
driver supports `IEEE802154_HW_SELECTIVE_TXCHANNEL` then use
the selective txchannel feature for transmission.
This does not change the current `channel` at the moment of call,
the driver will transmit the message on the channel selected through
`net_pkt_set_ieee802154_txchannel` then (after receiving an ACK
if requested) it will return to the original channel.
When Kconfig option IEEE802154_SELECTIVE_TXCHANNEL is turned on,
the timed transmissions scheduled some time ahead on different
channel will not abort ongoing reception until the exact moment
of transmission comes.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-10-22 14:04:33 +02:00
Andrzej Kuros
30c449d9e6 drivers: ieee802154_nrf5: support IEEE802154_SELECTIVE_TXCHANNEL
The ieee802154_nrf5 supports the IEEE802154_SELECTIVE_TXCHANNEL
Kconfig option and advertises the IEEE802154_HW_SELECTIVE_TXCHANNEL
capability.
The ieee802154_nrf5 driver now allows to schedule timed transmission
requests with selective tx channel, that is set at the latest
possible moment. This improves reception performance when the
timed transmissions are requested.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-10-22 14:04:33 +02:00
Andrzej Kuros
2fbba82591 drivers: ieee802154: add Kconfig IEEE802154_SELECTIVE_TXCHANNEL
The Kconfig `IEEE802154_SELECTIVE_TXCHANNEL` is added along with
the new capability `IEEE802154_HW_SELECTIVE_TXCHANNEL`.
The new capability of the ieee802154 drivers allows to schedule
CSL transmissions as stated in IEEE 802.15.4-2020 chapter 6.12.2.7
CSL over multiple channels. The benefit of the new API is that
additional call to `ieee802154_radio_api::set_channel()` is not
required. The drivers will switch to the new channel as late as
possible for CSL transmissions thus will not interrupt any reception
that might be in progress until the very late moment when the
transmission actually starts.
This improves reception performance when CSL transmissions are used.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-10-22 14:04:33 +02:00
Wajdi ELMuhtadi
fb45c6d93a drivers: sensor: wsen_hids_2525020210002: add sensor driver
Add wsen_hids_2525020210002 driver with
the corrected name and compatibility with
the hal update as well as added new features.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-22 14:03:08 +02:00
Wajdi ELMuhtadi
5936125f0e manifest: hal_wurthelektronik: update to latest
Update hal_wurthelektronik to include latest sensor core drivers.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-22 14:03:08 +02:00
Vladislav Pejic
6d8ace9198 drivers: sensor: adxl362: Added RTIO stream
Updated ADXL362 driver with RTIO stream functionality.
RTIO stream is using both FIFO threshold and FIFO full triggers.
Together with RTIO stream, RTIO async read is also implemented.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-22 14:02:21 +02:00
Ren Chen
ea4f1b758c udc: it82xx2: emit SOF event
This commit emits SOF event.

Fixes: #76225

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
b61111a41a udc: it82xx2: enable RESUME interrupt
This commit enables RESUME interrupt mask.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
8bf7c1aa28 udc: it82xx2: clear the data seq bit when enabling non-ctrl IN endpint
This commit clears the data sequence bit when enabling non-control IN
endpoint.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
bbb2f9437d udc: it82xx2: correct the handling of the out endpoint
There is an issue where OUT data is not handled correctly when the
toatl length exceeds the MPS. This update fixes the control handling
for the OUT endpoint.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
1afe9e16a5 udc: it82xx2: fix issue with the unexpected setting of the ready bit
The ready bit is automatically cleared by hardware. When setting other
bits, there is a chance that the ready bit hasn't been cleared yet,
leading to unexpected USB transactions. This commit addresses this
isuue and locks irq for critical section to prevent racing condition.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Ren Chen
e64e189e61 udc: it82xx2: fix the fifo control issue
The IT82xx2 chip has three FIFOs shared across endpoint 1 to 15, and
the FIFO control register is configured based on the active endpoints.
However, there are some issues with FIFO control.

Firstly, when a TRANS_DONE interrupt occurs, the completion of the
transaction should be determined by the ready and enable bits of the
corresponding endpoint. Additionally, only one non-control IN endpoint
can access the IN FIFO at a time. The FIFO control register is selected
before writing data and cleared after the IN transaction is completed.

For OUT endpoints, all endpoint bits must be selected in the OUT FIFO
control register when the endpoint is enabled. This can result in fake
OUT tokens being detected if an interrupt is triggered by another FIFO.
To prevent this, an atomic out_fifo_state variable has been introduced
to handle the detection of fake OUT tokens.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-10-22 14:01:11 +02:00
Chekhov Ma
10ab352478 boards: imx93_evk: add overlay to connect user button to pcal6524
Apply this overlay to test RFU_BTN1 and RFU_BTN2 on PCAL6524.

The user buttons RFU_BTN1 and RFU_BTN2 is connected to i.MX 93 GPIO by
default, but can be changed to connect to onboard GPIO expander
PCAL6524. To do this, switch SW1006 to 0000, then switch SW1005 to 0101.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-10-22 14:00:28 +02:00
Chris Ruehl
a3f863e3f1 Drivers: Sensors: Bosch bmp390 merge into bmp388
Add support for Bosch bmp390 sensor, the drop in replacement for the
bmp388 with same register but different chip-id. This patch make use
of "bosch_bmp390" or "bosch_bmp388" and set the specific chip-id in a
data->chip-id variable, which then used to check against the register
value.

Additional, manual shift operation had been replaced with ENDIAN safe
macros and calibration values with target variable of int16_t add a
cast for it.

bmp388_spi: read register implementation wrong, fixed it.
tx-buffer must be <addr><dummy><dummy> in order to receive the
register value. Read registers in burst mode and have rx and tx
buffer same spi_buf to avoid clock stop and delay with nrf5.

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-10-22 13:58:33 +02:00
Stefan Schwendeler
8786436909 drivers: sensor: ntc_thermistor: adds support for VDD based ADC reference
The NTC thermistor implementation assumes a constant pull-up voltage
and that the ADC channel is measured against a reference voltage so that
the absolute voltage across the NTC can be calculated. Based on the
relationship of `pullup-uv` and this absolute NTC voltage, the resistance
of the NTC is calculated.

There are applications where the "pullup-uv" is not constant, but VDD.
Most ADCs support relative measurements against VDD. If `pullup-uv` is not
defined, the implementation assumes now that the ADC channel is configured
to use VDD as a reference and therefore no millivolt conversion is
required.

Signed-off-by: Stefan Schwendeler <Stefan.Schwendeler@husqvarnagroup.com>
2024-10-22 13:56:54 +02:00
Dominik Ermel
3a6a638ae3 storage/flash_map: Remove definition of SOC_FLASH_0_ID
The commit removes definitions of SOC_FLASH_0_ID and SPI_FLASH_0_ID.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-22 13:55:00 +02:00
Henrik Brix Andersen
185432c96d drivers: can: select CONFIG_PINCTRL where needed
Select CONFIG_PINCTRL for all CAN controllers drivers using pinctrl.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-21 18:54:27 -05:00
Ryan McClelland
42da6c9c82 drivers: i3c: shell: fix argc count for setmrl
There is the wrong argc count for the max ibi len for setmrl.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
f9ba776fb4 drivers: i3c: shell: fix typos for enec/disec/rstact errors
Fix typos for enec/disec/rstact typos.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
f17b15525b drivers: i3c: shell: fix kconfig def for ibi
Fix kconfig def for ibi where it is missing the CONFIG_.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
434bed5c6f drivers: i3c: shell: fix reference on pointer arg for null check
A reference was missing for checking for null on devices.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Ryan McClelland
0068b61672 drivers: i3c: shell: fixup typos
There were some copy and paste errors that were easily missed where the
wrong print out would happen of an argument with `info` and an extra
autocompelete would happen with the `speed` command.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-21 18:52:15 -05:00
Bjarki Arge Andreasen
3272db87a4 tests: drivers: comparator: add gpio_loopback test suite
Add test suite which uses GPIO loopback to produce a "very low" and
"very high" voltage at the positive input of the comparator using the
output of a GPIO. The negative input is set to a voltage between the
high and low output voltages of the GPIO using whichever internal
reference is available to the comparator.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-21 18:50:45 -05:00
Neil Chen
482d5182aa samples: sensor/mcux_lpcmp: Add LPCMP use case
Enable LPCMP use case on NXP frdm_mcxn236 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-21 18:50:00 -05:00
Neil Chen
9b532e3e7a boards: nxp/frdm_mcxn236: Support LPCMP for NXP frdm_mcxn236 board
Support LPCMP for NXP frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-21 18:50:00 -05:00
Neil Chen
e7743db7b4 dts: arm/nxp: Add LPCMP nodes to NXP MCXN23x dtsi file
Add LPCMP nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-21 18:50:00 -05:00
Chaitanya Tata
9a9f8998f9 drivers: nrfwifi: Remove non-existing member
Opriv was removed but the doxygen doc string was left.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
a21648d7e6 drivers: wifi: Clean up exit path
Fix couple of bugs in exit path:

- In case of calloc failure, return's without unlocking
- memory is freed outside lock, in case of a tiny window of race, this
  can cause a crash when this function is called from two threads.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
ea7d3bea93 drivers: wifi: Fix memory leak in regulatory processing
During Wi-Fi connection UMAC sends an unsolicited regulatory change
event but the driver code always assumes that this event is solicited
hence doesn't free the memory for the event.

Fix this by dropping the unsolicited event as it's not supported yet.

Fixes #79733.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
0baff426c4 manifest: hal_nordic: Pull the flag to identify unsolicited reg event
This flag can be used to drop unsolicited regulatory event as it's not
supported.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chaitanya Tata
f333e1f00f drivers: wifi: Add regulatory debug log
This log helps in identifing if the event is solicited or not.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-21 18:49:09 -05:00
Chris Friedt
d22a49536f drivers: devmux: use int instead of ssize_t for select_get()
Use int instead of ssize_t for select_get().

This eliminates the unnecessary need for POSIX types.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-21 18:48:18 -05:00
Jakub Zymelka
df201e4b4b samples: icbmsg: Change regex for no_multithreading test
Change regex for no_multithreading test version for nRF54L15 platform.
This needs to be changed because LOG is running in MINIMAL mode.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-10-21 18:43:22 -05:00
Dominik Kilian
131229b2c4 icbmsg: Allow deregistration of the endpoints
This is implementation of ICBMsg endpoint deregistration.
The underlying ICMsg instance and blocks are not affected by
deregistration, so it is possible to reuse the same address
during the re-registration of the same endpoint.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-21 18:43:22 -05:00
Ibe Van de Veire
bb76d22540 test: net: igmp: Cleanup asserts
Cleanup of existing asserts in the IGMP test.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-21 18:41:47 -05:00
Ibe Van de Veire
fa07b9fcf1 test: net: igmp: Add IGMP query test
Add functionality to test the IGMP query handling. This test should
prevent the IGMP logic from sending IGMPv3 messages to IGMPv2 queriers.
The test does now also check backwards compatability when IGMPv3 queries
are received but only IGMPv2 is enabled.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-21 18:41:47 -05:00
Krzysztof Chruściński
317de0c6de drivers: serial: nrfx_uarte: Add lock to uart_rx_disable
Add lock to fix race when uart_rx_disable is interrupted by RXTO
event which lead to driver state corruption.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
5eaafbaf99 drivers: serial: nrfx_uarte: Add workaround for BAUDRATE register
On uart120 BAUDRATE register is not retained when ENABLE=0 and
because of that BAUDRATE must be set after enabling. Add workaround
to the driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
7735302e06 drivers: serial: nrfx_uarte: Improve RX FIFO flush workaround
Add configurable magic byte instead of fixed 0xAA. In some cases, it
is known that certain bytes are less likely in the transmission and
picking specific magic byte may reduce probability of failure of
detection of the correct amount of flushed data.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
9517106899 drivers: serial: nrfx_uarte: Add support for DMM and cache
Add support for DMM which manages cache and dedicated memory spaces.
Added support for data cache for buffers which are not DMM managed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Krzysztof Chruściński
ec224fde28 boards: native: nrf_bsim: Add include path to common
Add include path to nordic/soc/nordic/common where some internal
headers for nordic devices are kept (e.g. dmm.h).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-21 18:40:57 -05:00
Declan Snyder
c01ccfe719 boards: frdm_mcxw71: Enable LPSPI
Enable LPSPI1 controller on frdm_mcxw71 and spi loopback test

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-21 18:39:49 -05:00
Declan Snyder
f28725e6d5 soc: mcxw71: Enable LPSPI
Add DTS nodes and SOC clocking for LPSPI

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-21 18:39:49 -05:00
Benjamin Cabé
c7f1f32ebe doc: css: fix styling of signatures
Sync the section of the custom.css dedicated to object
signatures with Godot custom CSS.

Fixes #80005.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-21 18:39:18 -05:00
Phil Hindman
eea128aa8d fs: shell: Allow retries after a mount failure
Clean up if the mount command fails, such as due to a typo in the mount
point name, so that it can be retried.

Signed-off-by: Phil Hindman <phindman@xes-inc.com>
2024-10-21 18:38:37 -05:00
Peter Mitsis
cedd36106b kernel: Begin abstracting out _sched_spinlock
In a uniprocessor system, _sched_spinlock may not need to be
held in all the same cases that it does in a multiprocessor
system. Removing those unnecessary usages can lead to better
performance on UP systems. In the case of uncontested taking
and giving of a semaphore, this can be as much as a +14%
performance gain.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-21 18:38:00 -05:00
Peter Mitsis
f6a76c32b7 kernel: inline z_unpend_first_thread()
Inlining z_unpend_first_thread() has been observed to give a
+8% and +16% performance boost to the thread_metric benchmark's
message processing and synchronization tests respectively.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-21 18:38:00 -05:00
Peter Mitsis
0bf44f2352 kernel: Re-order should_preempt() checks
Re-orders the checks in should_preempt() tests so that the
z_is_thread_timeout_active() check is done last.

This change has been observed to give a +7% performance boost on
the thread_metric benchmark's preemptive scheduling test.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-21 18:38:00 -05:00
Pieter De Gendt
73d04a4959 scripts: west_commands: tests: Keep runners list sorted
Sort list and add CI tags.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-21 18:36:10 -05:00
Pieter De Gendt
c22323fd51 scripts: west_commands: Keep runners list sorted
Sort the list and add check tags for CI.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-21 18:36:10 -05:00
Hake Huang
c215bb274f driver: arduino_gpio: mimxrt1010_evk arduino d9 defines
add D9 to arduino_gpio map, to avoid build error.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-21 18:35:21 -05:00
Aksel Skauge Mellbye
f7970025fd MAINTAINERS: Update patterns for Silabs platforms
Silabs maintainer patterns did not match drivers that have the
vendor prefix before the driver name, e.g. gecko_burtc_timer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-10-21 18:34:53 -05:00
Keith Packard
f98c4f6812 tests/libcxx: Check for newlib nano when testing that
Add a check for CONFIG_HAS_NEWLIB_LIBC_NANO in the
cpp.libcxx.glibcxx.newlib_nano test.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-10-21 18:34:40 -05:00
Gerhard Jörges
372b3a9b8d net: lib: http: add missing includes
filesystem includes, that are required by the static_fs_resource, were
missing.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-10-21 16:00:14 +02:00
Gerhard Jörges
fc30792b48 net: lib: http: add missing zsock_ prefix
the zsock_ prefix is missing at one setsockopt call

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-10-21 16:00:14 +02:00
Robert Lubos
2d0e7bc7d5 samples: net: http_server: Fix assertion on dynamic upload abort
The buffer pointer provided to the dynamic handler  should be verified
after checking the transaction status. In case upload was aborted and
underlying connection closed, the callback will get
HTTP_SERVER_DATA_ABORTED status w/o a pointer to any data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-21 15:58:59 +02:00
Reto Schneider
6d4031f96c kernel: banner: Expose tainted builds
Due to the (potentially) hard to understand effects of blobs, it seems
prudent to make their presence more noticeable.

With this change, whenever blobs are present in the Zephyr work space,
the hello world sample output looks like this:

> *** Booting Zephyr OS build (tainted) v3.7.0-4569-gd4f8765ef20e ***
> Hello World! esp32c3_devkitm/esp32c3

Before, it looked like this:

> *** Booting Zephyr OS build v3.7.0-4568-g69c47471d187 ***
> Hello World! esp32c3_devkitm/esp32c3

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-21 15:58:27 +02:00
Reto Schneider
7ba0ee6bca doc: blobs: Document startup notification
Due to the (potentially) hard to understand effects of blobs, it seems
prudent to make their presence more noticeable.

Hopefully, this will make it easier to identify issues (such as those
reported on GitHub) that have been observed on devices running a tainted
build.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-21 15:58:27 +02:00
Reto Schneider
d5559ff82b doc: blobs: Add missing period
A full sentence should be ended by a period.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-21 15:58:27 +02:00
Reto Schneider
bdea85c9cf doc: blobs: Remove superfluous spaces
While not visible in the rendered documentation, double spaces look bad
when reading plaintext file.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-21 15:58:27 +02:00
Filip Kokosinski
0a5b0abfcc soc/sifive/sifive-freedom: enable PMP by default on 64-bit SoCs
This commit enables PMP on 64-bit SoCs from the SiFive Freedom SoC series
by default.

This change is needed to e.g. run the Userspace Hello World demo.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-21 15:55:52 +02:00
Jordan Yates
f443363f16 i2c: nrfx_twim: native RTIO support
Add native support for RTIO to the TWIM hardware IP.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-21 15:53:05 +02:00
Jordan Yates
627be7d150 i2c: i2c_nrfx_twim: update callback context to dev
Change the callback context to the dev pointer instead of the data
pointer, as the dev pointer is needed by RTIO.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-21 15:53:05 +02:00
Jordan Yates
0218b36b4a i2c: i2c_nrfx_twim: extract common code
Extract code useful for an RTIO implementation to a separate file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-21 15:53:05 +02:00
Teresa Zepeda Ventura
6773f33445 drivers: spi: gecko: add new driver for SPI communication via EUSART
Added a new driver to support SPI communication via EUSART. Since the
Silabs EFR32MG24 family SoCs have only one USART, EUSART support is
necessary for implementing SPI functionality.

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-10-21 12:46:21 +02:00
Teresa Zepeda Ventura
33594595c9 boards: sparkfun: Add SPI support over EUSART in devicetree
Modified devicetree to integrate support for EUSART in pincontrol settings.

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-10-21 12:46:21 +02:00
Teresa Zepeda Ventura
b05eb43599 boards: sparkfun: Update board name in doc/index.rst
Fix board name in documentation file doc/index.rst

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-10-21 12:46:21 +02:00
Juliane Schulze
7adcebc675 vcnl36825t: add trigger capability
Adds trigger capability to the Vishay VCNL36825T sensor.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-10-21 12:41:12 +02:00
Thao Luong
a61484f7ad drivers: counter: Add AGT counter driver support for Renesas RA8
- boards: renesas: Add support for agt.
- drivers: counter: Add support for counter driver use agt
- dts: arm: Add support for agt.
- dts: bindings: Add support for agt counter driver.
- soc: renesas: Add support for agt counter driver.
- samples: drivers: counter: alarm: Add support for RA8

This is initial support with only basic functionality for counter
operation on Zephyr using AGT hardware, current support for
count source is limited to LOCO and PCLKB, other count source
like underflow signal external pin or AGTIO from another AGT
channel will be added in later support

Signed-off-by: Ha Nguyen <ha.nguyen.fz@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-10-21 12:41:00 +02:00
Tu Nguyen Van
55bcc4a576 tests: drivers: spi: enable test spi_loopback
enable test spi_loopback for dspi feature on s32z27x
devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-10-21 12:39:04 +02:00
Tu Nguyen Van
c82ad45683 dts: arm: nxp: add dspi support for S32Z27x
add dspi support for S32Z27x devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-10-21 12:39:04 +02:00
Tu Nguyen Van
81f889d297 soc: dts: pinctrl: support the configurations which apply for LVDS pads
support the configurations which apply for LVDS pads
+ termination resistor
+ current reference control
+ rx current boost

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-10-21 12:39:04 +02:00
Maureen Helm
05191ecad3 boards: adi: apard32690: Configure arduino spi pins
Configures pins for the SPI instance attached to the Arduino connector
to enable using this board with the eval_adxl372_ardz shield.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-21 12:36:53 +02:00
Maureen Helm
49a3f842bb boards: adi: apard32690: Configure arduino gpio pins
Configures pins for the GPIOs attached to the Arduino connector to
enable using this board with the eval_adxl372_ardz shield.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-21 12:36:53 +02:00
Maureen Helm
46b9b6bc20 boards: shields: Add EVAL-ADXL372-ARDZ accelerometer shield
Adds a new shield definition for the Analog Devices EVAL-ADXL372-ARDZ
accelerometer shield. This shield provides support for an ADI ADXL372
3-axis accelerometer over an Arduino SPI connector.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-21 12:36:53 +02:00
Alvis Sun
578fbca78d soc: nuvoton: reg: add i3c target registers and soc functions
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-10-21 12:36:21 +02:00
Alvis Sun
f522edb2f7 include: drivers: i3c: update comment
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-10-21 12:36:21 +02:00
Robin Kastberg
2ce0fd6172 soc: nxp: imxrt: MIMXRT1062 IVT needs to be FIRST
IMXRT1062 bootrom reads boothdr initial vector table
from 0x60001000. In the CMAKE scatter linker scripts we put multiple
sections at offset 0x1000 in the rom. In linkers other than LD, we are
not guaranteed a particular order when placing these.
If we specify FIRST we can count on the .ivt coming first. The other
positions aren't as crucial.

From IMXRT1060RM.pdf 9.7.1

> The location of the IVT is the only fixed requirement by the ROM.
> The remainder or the image memory map is flexible and
> is determined by the contents of the IVT.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-10-21 12:36:02 +02:00
Lukasz Maciejonczyk
0b7c5ad378 kconfig: openthread: Increase range for OPENTHREAD_CLI_MAX_LINE_LENGTH
This commit increases the range of value for the
OPENTHREAD_CLI_MAX_LINE_LENGTH option to the maximum allowed.

The previous range may have been insufficient for Openthread vendor CLI
commands.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2024-10-21 12:35:42 +02:00
Hao Luo
18dc21b44d drivers: adc: add adc disable to save power
Disables adc once conversion completes and enables
again before sampling

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-21 12:35:28 +02:00
Tomi Fontanilles
d6348cd22a mbedtls: update to 3.6.2
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.2
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-21 12:34:51 +02:00
Andrej Butok
6857a37d19 doc: Use EXTRA_CONF_FILE in .rst/.md files
Use EXTRA_CONF_FILE in documentation .rst/.md files,
that replaced deprecated OVERLAY_CONFIG since the Zephyr v3.4 release.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-21 12:34:38 +02:00
Marcio Ribeiro
98e0e65069 samples: input_dump: input_esp32_touch_sensor bugfix
.conf files added to enable INPUT_ESP32_TOUCH_SENSOR during sample build.
The absence of these files incorrectly prevented the input_dump sample
build from failing due to missing required hal files.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-21 01:46:59 +01:00
Marcio Ribeiro
d8c8d02115 drivers: input_esp32_touch_sensor: missing header file bugfix
Adds intc_esp32.h missing header file and remove unused code

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-21 01:46:59 +01:00
Marcio Ribeiro
c71197f82c manifest: esp32: update hal_espressif
Update hal_espressif revision to restore support to touch_sensor.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-21 01:46:59 +01:00
Carles Cufi
51c1e45301 soc: nordic: Remove the nRF54L15 EngA
The production version of the nRF54L15 SoC is now available, so remove
the initial Engineering A (EngA) preview version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-21 01:46:39 +01:00
Carles Cufi
cb47c62259 boards: nordic: Remove nRF54L15 PDK
The nRF54L15 Development Kit is now available, so remove the Preview
Development Kit (PDK).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-21 01:46:39 +01:00
Carles Cufi
c85e418eda boards: nordic: nrf54l15dk: Fix references to pdk
A bunch of copy-paste mistakes when adding the nRF54L15 DK added stale
references to the Preview DK (PDK).

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-21 01:46:39 +01:00
Reto Schneider
7b65bbe52e doc: pytest: Fix spelling of unlaunched
unlauched_dut is written wrongly - unlaunched_dut is correct.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-21 01:45:49 +01:00
5336 changed files with 135940 additions and 35247 deletions

3
.github/SECURITY.md vendored
View file

@ -8,9 +8,10 @@ updates:
- The most recent release, and the release prior to that.
- Active LTS releases.
At this time, with the latest release of v3.6, the supported
At this time, with the latest release of v4.0, the supported
versions are:
- v4.0: Current release
- v3.7: Current LTS
- v3.6: Prior release
- v2.7: Prior LTS

View file

@ -37,7 +37,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr

View file

@ -12,7 +12,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -107,13 +107,13 @@ jobs:
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
# check if we need to run a full twister or not based on files changed
python3 ./scripts/ci/test_plan.py --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
python3 ./scripts/ci/test_plan.py --no-detailed-test-id --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
# We can limit scope to just what has changed
if [ -s testplan.json ]; then
echo "report_needed=1" >> $GITHUB_OUTPUT
# Full twister but with options based on changes
./scripts/twister --force-color --inline-logs -M -N -v --load-tests testplan.json --retry-failed 2
./scripts/twister --no-detailed-test-id --force-color --inline-logs -M -N -v --load-tests testplan.json --retry-failed 2
else
# if nothing is run, skip reporting step
echo "report_needed=0" >> $GITHUB_OUTPUT

View file

@ -14,7 +14,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -34,7 +34,7 @@ jobs:
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
CCACHE_REMOTE_ONLY: "true"
# `--specs` is ignored because ccache is unable to resovle the toolchain specs file path.
CCACHE_IGNOREOPTIONS: '--specs=*'
CCACHE_IGNOREOPTIONS: '-specs=* --specs=*'
steps:
- name: Apply container owner mismatch workaround
run: |

View file

@ -38,7 +38,7 @@ jobs:
run: |
pip3 install setuptools
pip3 install wheel
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint clang-format unidiff sphinx-lint
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint clang-format unidiff sphinx-lint ruff
pip3 install west
- name: west setup
@ -79,7 +79,7 @@ jobs:
git log --pretty=oneline | head -n 10
# Increase rename limit to allow for large PRs
git config diff.renameLimit 10000
./scripts/ci/check_compliance.py --annotate -e KconfigBasic \
./scripts/ci/check_compliance.py --annotate -e KconfigBasic -e ClangFormat \
-c origin/${BASE_REF}..
- name: upload-results

View file

@ -42,6 +42,7 @@ jobs:
with:
files: |
doc/
boards/**/doc/
**.rst
include/
kernel/include/kernel_arch_interface.h

View file

@ -30,8 +30,12 @@ jobs:
- name: Load PR number
if: steps.download-artifacts.outputs.found_artifact == 'true'
run: |
echo "PR_NUM=$(<pr_num/pr_num)" >> $GITHUB_ENV
uses: actions/github-script@v7
with:
script: |
let fs = require("fs");
let pr_number = Number(fs.readFileSync("./pr_num/pr_num"));
core.exportVariable("PR_NUM", pr_number);
- name: Check PR number
if: steps.download-artifacts.outputs.found_artifact == 'true'

View file

@ -10,7 +10,7 @@ jobs:
check-errno:
runs-on: ubuntu-22.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
image: ghcr.io/zephyrproject-rtos/ci:v0.27.4
steps:
- name: Apply container owner mismatch workaround

View file

@ -26,8 +26,11 @@ jobs:
group: zephyr-runner-v2-linux-x64-4xlarge
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
defaults:
run:
shell: bash
strategy:
fail-fast: false
env:
@ -101,7 +104,7 @@ jobs:
python3 ./scripts/footprint/pack_as_twister.py -vvv \
--plan ./scripts/footprint/plan.txt \
--test-name='name.feature' \
./footprint_data/*/footprints/*/*/
./footprint_data/**/
- name: Upload to ElasticSearch
env:
@ -109,6 +112,7 @@ jobs:
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
ELASTICSEARCH_INDEX: ${{ vars.FOOTPRINT_TRACKING_INDEX }}
run: |
shopt -s globstar
pip3 install -U elasticsearch
run_date=`date --iso-8601=minutes`
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \

View file

@ -69,7 +69,7 @@ jobs:
elif [ "${{ runner.os }}" = "Windows" ]; then
EXTRA_TWISTER_FLAGS="-P native_sim --short-build-path -O/tmp/twister-out"
fi
./scripts/twister --force-color --inline-logs -T samples/hello_world -v $EXTRA_TWISTER_FLAGS
./scripts/twister --force-color --inline-logs -T samples/hello_world -T samples/cpp/hello_world -v $EXTRA_TWISTER_FLAGS
- name: Upload artifacts
if: failure()
@ -78,3 +78,4 @@ jobs:
if-no-files-found: ignore
path:
zephyr/twister-out/*/samples/hello_world/sample.basic.helloworld/build.log
zephyr/twister-out/*/samples/cpp/hello_world/sample.cpp.helloworld/build.log

View file

@ -26,7 +26,7 @@ jobs:
west init -l . || true
- name: Manifest
uses: zephyrproject-rtos/action-manifest@v1.3.1
uses: zephyrproject-rtos/action-manifest@v1.5.0
with:
github-token: ${{ secrets.ZB_GITHUB_TOKEN }}
manifest-path: 'west.yml'

146
.github/workflows/twister-prep.yaml vendored Normal file
View file

@ -0,0 +1,146 @@
name: Prepare For a Twister Run
on:
workflow_call:
outputs:
subset:
description: subset
value: ${{ jobs.prep_push.outputs.subset != '' && jobs.prep_push.outputs.subset || jobs.prep_pr.outputs.subset }}
size:
description: size
value: ${{ jobs.prep_push.outputs.size != '' && jobs.prep_push.outputs.size || jobs.prep_pr.outputs.size }}
fullrun:
description: fullrun
value: ${{ jobs.prep_push.outputs.fullrun != '' && jobs.prep_push.outputs.fullrun || jobs.prep_pr.outputs.size }}
jobs:
prep_pr:
if: github.repository_owner == 'zephyrproject-rtos' && github.event_name == 'pull_request_target'
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
outputs:
subset: ${{ steps.output-services.outputs.subset }}
size: ${{ steps.output-services.outputs.size }}
fullrun: ${{ steps.output-services.outputs.fullrun }}
env:
MATRIX_SIZE: 10
PUSH_MATRIX_SIZE: 20
DAILY_MATRIX_SIZE: 80
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TESTS_PER_BUILDER: 700
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: Clone cached Zephyr repository
continue-on-error: true
run: |
git clone --shared /repo-cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
run: |
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci,+optional
west config --global update.narrow true
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: Generate Test Plan with Twister
id: test-plan
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --no-detailed-test-id --pull-request -t $TESTS_PER_BUILDER
if [ -s .testplan ]; then
cat .testplan >> $GITHUB_ENV
else
echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV
fi
rm -f testplan.json .testplan
- name: Determine matrix size
id: output-services
run: |
if [ -n "${TWISTER_NODES}" ]; then
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
else
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
fi
size=${TWISTER_NODES}
echo "subset=${subset}" >> $GITHUB_OUTPUT
echo "size=${size}" >> $GITHUB_OUTPUT
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
prep_push:
if: github.repository_owner == 'zephyrproject-rtos' && (github.event_name == 'push' || github.event_name == 'schedule')
runs-on: ubuntu-22.04
outputs:
subset: ${{ steps.output-services.outputs.subset }}
size: ${{ steps.output-services.outputs.size }}
fullrun: ${{ steps.output-services.outputs.fullrun }}
env:
MATRIX_SIZE: 10
PUSH_MATRIX_SIZE: 20
DAILY_MATRIX_SIZE: 80
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TESTS_PER_BUILDER: 700
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: Determine matrix size
id: output-services
run: |
if [ "${{github.event_name}}" = "push" ]; then
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
size=${MATRIX_SIZE}
elif [ "${{github.event_name}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]"
size=${DAILY_MATRIX_SIZE}
else
size=0
fi
echo "subset=${subset}" >> $GITHUB_OUTPUT
echo "size=${size}" >> $GITHUB_OUTPUT
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT

53
.github/workflows/twister-publish.yaml vendored Normal file
View file

@ -0,0 +1,53 @@
name: Publish Twister Test Results
on:
workflow_run:
workflows: ["Run tests with twister"]
branches:
- main
types:
- completed
jobs:
upload-to-elasticsearch:
if: |
github.repository == 'zephyrproject-rtos/zephyr' &&
github.event.workflow_run.event != 'pull_request_target'
env:
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
runs-on: ubuntu-22.04
steps:
# Needed for elasticearch and upload script
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Download Artifacts
id: download-artifacts
uses: dawidd6/action-download-artifact@v6
with:
path: artifacts
workflow: twister.yml
run_id: ${{ github.event.workflow_run.id }}
if_no_artifact_found: ignore
- name: Upload to elasticsearch
if: steps.download-artifacts.outputs.found_artifact == 'true'
run: |
pip3 install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.
run_date=`date --iso-8601=minutes`
if [ "${{github.event.workflow_run.event}}" = "push" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--run-attempt ${{github.run_attempt}} \
--run-branch ${{github.ref_name}} \
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
elif [ "${{github.event.workflow_run.event}}" = "schedule" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--run-attempt ${{github.run_attempt}} \
--run-branch ${{github.ref_name}} \
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
fi

View file

@ -21,108 +21,7 @@ concurrency:
jobs:
twister-build-prep:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
outputs:
subset: ${{ steps.output-services.outputs.subset }}
size: ${{ steps.output-services.outputs.size }}
fullrun: ${{ steps.output-services.outputs.fullrun }}
env:
MATRIX_SIZE: 10
PUSH_MATRIX_SIZE: 20
DAILY_MATRIX_SIZE: 80
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TESTS_PER_BUILDER: 700
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: Clone cached Zephyr repository
if: github.event_name == 'pull_request_target'
continue-on-error: true
run: |
git clone --shared /repo-cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
if: github.event_name == 'pull_request_target'
run: |
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci,+optional
west config --global update.narrow true
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: Generate Test Plan with Twister
if: github.event_name == 'pull_request_target'
id: test-plan
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request -t $TESTS_PER_BUILDER
if [ -s .testplan ]; then
cat .testplan >> $GITHUB_ENV
else
echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV
fi
rm -f testplan.json .testplan
- name: Determine matrix size
id: output-services
run: |
if [ "${{github.event_name}}" = "pull_request_target" ]; then
if [ -n "${TWISTER_NODES}" ]; then
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
else
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
fi
size=${TWISTER_NODES}
elif [ "${{github.event_name}}" = "push" ]; then
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
size=${MATRIX_SIZE}
elif [ "${{github.event_name}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]"
size=${DAILY_MATRIX_SIZE}
else
size=0
fi
echo "subset=${subset}" >> $GITHUB_OUTPUT
echo "size=${size}" >> $GITHUB_OUTPUT
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
uses: ./.github/workflows/twister-prep.yaml
twister-build:
runs-on:
@ -130,7 +29,7 @@ jobs:
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -142,13 +41,13 @@ jobs:
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
CCACHE_REMOTE_ONLY: "true"
# `--specs` is ignored because ccache is unable to resolve the toolchain specs file path.
CCACHE_IGNOREOPTIONS: '--specs=*'
CCACHE_IGNOREOPTIONS: '-specs=* --specs=*'
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TWISTER_COMMON: ' --force-color --inline-logs -v -N -M --retry-failed 3 --timeout-multiplier 2 '
DAILY_OPTIONS: ' -M --build-only --all --show-footprint'
TWISTER_COMMON: '--no-detailed-test-id --force-color --inline-logs -v -N -M --retry-failed 3 --timeout-multiplier 2 '
WEEKLY_OPTIONS: ' -M --build-only --all --show-footprint --report-filtered'
PR_OPTIONS: ' --clobber-output --integration'
PUSH_OPTIONS: ' --clobber-output -M --show-footprint'
PUSH_OPTIONS: ' --clobber-output -M --show-footprint --report-filtered'
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
@ -230,6 +129,7 @@ jobs:
- if: github.event_name == 'push'
name: Run Tests with Twister (Push)
id: run_twister
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
@ -243,11 +143,12 @@ jobs:
- if: github.event_name == 'pull_request_target'
name: Run Tests with Twister (Pull Request)
id: run_twister_pr
run: |
rm -f testplan.json
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request --no-detailed-test-id
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.json ${TWISTER_COMMON} ${PR_OPTIONS}
if [ "${{matrix.subset}}" = "1" -a ${{needs.twister-build-prep.outputs.fullrun}} = 'True' ]; then
./scripts/zephyr_module.py --twister-out module_tests.args
@ -258,14 +159,15 @@ jobs:
- if: github.event_name == 'schedule'
name: Run Tests with Twister (Daily)
id: run_twister_sched
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${DAILY_OPTIONS}
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${WEEKLY_OPTIONS}
if [ "${{matrix.subset}}" = "1" ]; then
./scripts/zephyr_module.py --twister-out module_tests.args
if [ -s module_tests.args ]; then
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS}
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${WEEKLY_OPTIONS}
fi
fi
@ -306,42 +208,18 @@ jobs:
twister-test-results:
name: "Publish Unit Tests Results"
env:
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
needs: twister-build
needs:
- twister-build
runs-on: ubuntu-22.04
# the build-and-test job might be skipped, we don't need to run this job then
if: success() || failure()
steps:
# Needed for elasticearch and upload script
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Upload to elasticsearch
run: |
pip3 install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.
run_date=`date --iso-8601=minutes`
if [ "${{github.event_name}}" = "push" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
elif [ "${{github.event_name}}" = "schedule" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
fi
- name: Merge Test Results
run: |
pip3 install junitparser junit2html

View file

@ -24,7 +24,7 @@ jobs:
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
image: ghcr.io/zephyrproject-rtos/ci:v0.27.4
steps:
- name: Apply Container Owner Mismatch Workaround
@ -44,7 +44,8 @@ jobs:
west init -l . || true
# we do not depend on any hals, tools or bootloader, save some time and space...
west config manifest.group-filter -- -hal,-tools,-bootloader
west config manifest.group-filter -- -hal,-tools,-bootloader,-babblesim
west config manifest.project-filter -- -nrf_hw_models
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'

View file

@ -66,7 +66,7 @@ jobs:
- name: install pytest
run: |
pip3 install wheel
pip3 install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial
pip3 install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial anytree
- name: run pytest-win
if: runner.os == 'Windows'
run: |

1
.gitignore vendored
View file

@ -102,6 +102,7 @@ MaintainersFormat.txt
ModulesMaintainers.txt
Nits.txt
Pylint.txt
Ruff.txt
SphinxLint.txt
TextEncoding.txt
YAMLLint.txt

2079
.ruff-excludes.toml Normal file

File diff suppressed because it is too large Load diff

31
.ruff.toml Normal file
View file

@ -0,0 +1,31 @@
# Copyright (c) 2024 Basalte bv
# SPDX-License-Identifier: Apache-2.0
extend = ".ruff-excludes.toml"
line-length = 100
target-version = "py310"
[lint]
select = [
# zephyr-keep-sorted-start
"B", # flake8-bugbear
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
# zephyr-keep-sorted-stop
]
ignore = [
# zephyr-keep-sorted-start
"SIM108", # Allow if-else blocks instead of forcing ternary operator
"UP027", # deprecated pyupgrade rule
# zephyr-keep-sorted-stop
]
[format]
quote-style = "preserve"
line-ending = "lf"

View file

@ -598,6 +598,8 @@ add_custom_command(
COMMAND_EXPAND_LISTS
)
add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/zephyr/version.h)
zephyr_get(KERNEL_VERSION_CUSTOMIZATION SYSBUILD LOCAL)
set_property(TARGET version_h PROPERTY KERNEL_VERSION_CUSTOMIZATION ${KERNEL_VERSION_CUSTOMIZATION})
if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION)
add_custom_command(
@ -616,6 +618,8 @@ if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION)
app_version_h
DEPENDS ${PROJECT_BINARY_DIR}/include/generated/zephyr/app_version.h)
add_dependencies(zephyr_interface app_version_h)
zephyr_get(APP_VERSION_CUSTOMIZATION SYSBUILD LOCAL)
set_property(TARGET app_version_h PROPERTY APP_VERSION_CUSTOMIZATION ${APP_VERSION_CUSTOMIZATION})
endif()
# Unfortunately, the order in which CMakeLists.txt code is processed
@ -1035,14 +1039,6 @@ if(CONFIG_USERSPACE)
set(PROCESS_GPERF ${ZEPHYR_BASE}/scripts/build/process_gperf.py)
endif()
get_property(GLOBAL_CSTD GLOBAL PROPERTY CSTD)
if(DEFINED GLOBAL_CSTD)
message(DEPRECATION
"Global CSTD property is deprecated, see Kconfig.zephyr for C Standard options.")
set(CSTD ${GLOBAL_CSTD})
list(APPEND CMAKE_C_COMPILE_FEATURES ${compile_features_${CSTD}})
endif()
# @Intent: Obtain compiler specific flag for specifying the c standard
zephyr_compile_options(
$<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,cstd>${CSTD}>

View file

@ -133,6 +133,7 @@
/boards/arm64/intel_socfpga_agilex_socdk/ @siclim @ngboonkhai
/boards/arm64/intel_socfpga_agilex5_socdk/ @teikheng @gdengi
/boards/arm64/rcar_*/ @lorc @xakep-amatop
/boards/amd/acp_6_0_adsp/ @dineshkumar.kalva @basavaraj.hiregoudar
# All cmake related files
/doc/develop/tools/coccinelle.rst @himanshujha199640 @JuliaLawall
/doc/services/device_mgmt/smp_protocol.rst @de-nordic @nordicjm

View file

@ -17,13 +17,13 @@ osource "${APPLICATION_SOURCE_DIR}/VERSION"
# Shield defaults should have precedence over board defaults, which should have
# precedence over SoC defaults, so include them in that order.
#
# $ARCH and $BOARD_DIR will be glob patterns when building documentation.
# $ARCH and $KCONFIG_BOARD_DIR will be glob patterns when building documentation.
# This loads custom shields defconfigs (from BOARD_ROOT)
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
# This loads Zephyr base shield defconfigs
source "boards/shields/*/Kconfig.defconfig"
osource "$(BOARD_DIR)/Kconfig.defconfig"
osource "$(KCONFIG_BOARD_DIR)/Kconfig.defconfig"
# This loads Zephyr specific SoC root defconfigs
source "$(KCONFIG_BINARY_DIR)/soc/Kconfig.defconfig"
@ -448,6 +448,7 @@ config CODING_GUIDELINE_CHECK
config NATIVE_LIBC
bool
select FULL_LIBC_SUPPORTED
select TC_PROVIDES_POSIX_C_LANG_SUPPORT_R
help
Zephyr will use the host system C library.
@ -470,9 +471,11 @@ config NATIVE_APPLICATION
default y if ARCH_POSIX
depends on !NATIVE_LIBRARY
select NATIVE_BUILD
select DEPRECATED
help
Build as a native application that can run on the host and using
resources and libraries provided by the host.
resources and libraries provided by the host. This option is deprecated
and will be removed in Zephyr v4.3
config NATIVE_LIBRARY
bool
@ -536,11 +539,10 @@ config NO_OPTIMIZATIONS
endchoice
config LTO
bool "Link Time Optimization [EXPERIMENTAL]"
bool "Link Time Optimization"
depends on !(GEN_ISR_TABLES || GEN_IRQ_VECTOR_TABLE) || ISR_TABLES_LOCAL_DECLARATION
depends on !NATIVE_LIBRARY
depends on !CODE_DATA_RELOCATION
select EXPERIMENTAL
help
This option enables Link Time Optimization.
@ -1022,32 +1024,6 @@ config IS_BOOTLOADER
This option indicates that Zephyr will act as a bootloader to execute
a separate Zephyr image payload.
config BOOTLOADER_SRAM_SIZE
int "SRAM reserved for bootloader [DEPRECATED]"
default 0
depends on !XIP || IS_BOOTLOADER
depends on ARM || XTENSA
help
This option specifies the amount of SRAM (measure in kB) reserved for
a bootloader image, when either:
- the Zephyr image itself is to act as the bootloader, or
- Zephyr is a !XIP image, which implicitly assumes existence of a
bootloader that loads the Zephyr !XIP image onto SRAM.
This option is deprecated, users should transition to using DTS to set this, if needed.
To be removed after Zephyr 3.7 release.
config BOOTLOADER_SRAM_SIZE_DEPRECATED
bool
default y
select DEPRECATED
depends on BOOTLOADER_SRAM_SIZE != 0
depends on !XIP || IS_BOOTLOADER
depends on ARM || XTENSA
help
Non-prompt symbol to indicate that the deprecated BOOTLOADER_SRAM_SIZE Kconfig has a
non-0 value. Please transition to using devicetree.
config BOOTLOADER_BOSSA
bool "BOSSA bootloader support"
select USE_DT_CODE_PARTITION

View file

@ -314,12 +314,13 @@ Bluetooth HCI:
- HoZHel
files:
- include/zephyr/drivers/bluetooth/
- include/zephyr/drivers/bluetooth.h
- drivers/bluetooth/
- samples/bluetooth/hci_*/
- tests/bsim/bluetooth/hci_uart/
- dts/bindings/bluetooth/
labels:
- "area: Bluetooth Host"
- "area: Bluetooth HCI"
- "area: Bluetooth"
tests:
- bluetooth
@ -359,8 +360,9 @@ Bluetooth Host:
- alwa-nordic
collaborators:
- hermabe
- Thalley
- rugeGerritsen
- sjanc
- Thalley
- theob-pro
files:
- doc/connectivity/bluetooth/
@ -388,8 +390,10 @@ Bluetooth Host:
- doc/connectivity/bluetooth/img/ctlr*
- doc/connectivity/bluetooth/api/audio/
- doc/connectivity/bluetooth/api/mesh/
- doc/connectivity/bluetooth/api/shell/iso.rst
- doc/connectivity/bluetooth/api/controller.rst
- doc/connectivity/bluetooth/shell/classic/a2dp.rst
- doc/connectivity/bluetooth/shell/host/iso.rst
- doc/connectivity/bluetooth/shell/audio/
- samples/bluetooth/bap*/
- samples/bluetooth/cap*/
- samples/bluetooth/hap*/
@ -462,6 +466,7 @@ Bluetooth Audio:
- pin-zephyr
- niym-ot
- jthm-ot
- babrsn
files:
- subsys/bluetooth/audio/
- include/zephyr/bluetooth/audio/
@ -472,6 +477,7 @@ Bluetooth Audio:
- tests/bluetooth/tester/overlay-le-audio.conf
- tests/bluetooth/tester/src/audio/
- doc/connectivity/bluetooth/api/audio/
- doc/connectivity/bluetooth/shell/audio/
- samples/bluetooth/bap*/
- samples/bluetooth/cap*/
- samples/bluetooth/hap*/
@ -490,6 +496,7 @@ Bluetooth Classic:
collaborators:
- jhedberg
files:
- doc/connectivity/bluetooth/shell/classic/a2dp.rst
- subsys/bluetooth/common/
- subsys/bluetooth/host/classic/
- include/zephyr/bluetooth/classic/
@ -506,9 +513,10 @@ Bluetooth ISO:
collaborators:
- jhedberg
- kruithofa
- rugeGerritsen
files:
- include/zephyr/bluetooth/iso.h
- doc/connectivity/bluetooth/api/shell/iso.rst
- doc/connectivity/bluetooth/shell/host/iso.rst
- samples/bluetooth/iso_*/
- subsys/bluetooth/Kconfig.iso
- subsys/bluetooth/host/iso.c
@ -881,6 +889,7 @@ Devicetree:
- galak
files-regex:
- dts/bindings/.*zephyr.*
- dts/bindings/[^,]+$
files:
- scripts/dts/
- dts/common/
@ -915,6 +924,7 @@ Disk:
- subsys/sd/
- tests/subsys/sd/
- tests/drivers/disk/
- tests/drivers/build_all/disk/
- include/zephyr/sd/
- dts/bindings/sd/
- dts/bindings/mmc/
@ -1001,8 +1011,8 @@ Documentation Infrastructure:
Release Notes:
status: maintained
maintainers:
- dkalowsk
- mmahadevan108
- fabiobaltieri
- kartben
collaborators:
- kartben
files:
@ -1222,6 +1232,7 @@ Release Notes:
- samples/drivers/crypto/
- tests/crypto/
- doc/services/crypto/
- tests/drivers/build_all/crypto/
labels:
- "area: Crypto / RNG"
tests:
@ -1391,6 +1402,8 @@ Release Notes:
status: maintained
maintainers:
- de-nordic
collaborators:
- rghaddab
files:
- drivers/flash/
- dts/bindings/flash_controller/
@ -1578,9 +1591,7 @@ Release Notes:
- drivers.i3c
"Drivers: IEEE 802.15.4":
status: maintained
maintainers:
- fgrandel
status: odd fixes
collaborators:
- rlubos
- ankuns
@ -2070,6 +2081,11 @@ Release Notes:
status: maintained
maintainers:
- jilaypandya
collaborators:
- bjarki-andreasen
- dipakgmx
- fabiobaltieri
- faxe1008
files:
- drivers/stepper/
- include/zephyr/drivers/stepper.h
@ -2127,6 +2143,7 @@ Release Notes:
- include/zephyr/drivers/w1.h
- include/zephyr/drivers/sensor/w1_sensor.h
- tests/drivers/w1/
- tests/drivers/build_all/w1/
- samples/drivers/w1/
labels:
- "area: W1"
@ -2159,6 +2176,7 @@ Release Notes:
- rlubos
- kludentwo
- krish2718
- MaochenWang1
files:
- drivers/wifi/
- dts/bindings/wifi/
@ -2185,7 +2203,7 @@ Release Notes:
collaborators:
- sachinthegreen
files:
- drivers/wifi/nrfwifi/
- drivers/wifi/nrf_wifi/
- dts/bindings/wifi/nordic,nrf70.yaml
- dts/bindings/wifi/nordic,nrf70-qspi.yaml
- dts/bindings/wifi/nordic,nrf70-spi.yaml
@ -2293,18 +2311,6 @@ Filesystems:
tests:
- filesystem
"Filesystems: FatFs reentrant support":
status: maintained
maintainers:
- ox11
files:
- modules/fatfs/zfs_ffsystem.c
- tests/subsys/fs/fat_fs_api/src/test_fat_file_reentrant.c
labels:
- "area: File System"
tests:
- filesystem.fat
Formatted Output:
status: maintained
maintainers:
@ -2926,8 +2932,6 @@ Networking:
status: maintained
maintainers:
- jukkar
collaborators:
- fgrandel
files:
- doc/connectivity/networking/api/gptp.rst
- include/zephyr/net/gptp.h
@ -2994,14 +2998,12 @@ Networking:
- subsys/net/lib/ptp/
- samples/net/ptp/
labels:
- "area: Networking"
- "area: PTP"
tests:
- sample.net.ptp
"Networking: Native IEEE 802.15.4":
status: maintained
maintainers:
- fgrandel
status: odd fixes
collaborators:
- rlubos
- jukkar
@ -3043,6 +3045,7 @@ Networking:
collaborators:
- rlubos
- krish2718
- MaochenWang1
files:
- doc/connectivity/networking/api/wifi.rst
- include/zephyr/net/wifi*.h
@ -3141,6 +3144,7 @@ Power management:
status: maintained
maintainers:
- ceolin
- bjarki-andreasen
collaborators:
- nashif
- teburd
@ -3496,15 +3500,17 @@ Nuvoton NPCM Platforms:
- soc/nuvoton/npcm/
- boards/nuvoton/npcm*/
- dts/arm/nuvoton/
- drivers/*/*_npcm*
- include/zephyr/dt-bindings/*/npcm_*
labels:
- "platform: Nuvoton NPCM"
Raspberry Pi Pico Platforms:
status: maintained
maintainers:
- yonsch
collaborators:
- soburi
collaborators:
- yonsch
files:
- boards/raspberrypi/
- boards/adafruit/kb2040/
@ -3530,9 +3536,9 @@ Silabs Platforms:
- boards/silabs/
- dts/arm/silabs/
- dts/bindings/*/silabs*
- drivers/*/*_gecko*
- drivers/bluetooth/hci/slz_hci*
- drivers/*/*_silabs*
- drivers/*/*gecko*
- drivers/bluetooth/hci/hci_silabs_*
- drivers/*/*silabs*
labels:
- "platform: Silabs"
@ -3551,6 +3557,7 @@ Silabs SiM3U Platforms:
- drivers/*/Kconfig.si32
- dts/arm/silabs/sim3u*
- dts/bindings/*/*silabs,si32*
- include/zephyr/dt-bindings/pinctrl/*si32*
- soc/silabs/silabs_sim3/
labels:
- "platform: Silabs SiM3U"
@ -3673,7 +3680,7 @@ NXP Drivers:
- drivers/*/*.mcux
- drivers/*/*.nxp
- drivers/*/*nxp*
- drivers/*/*kinetis*
- drivers/*/*/*kinetis*
- drivers/misc/*/nxp*
- include/zephyr/dt-bindings/*/*nxp*
- include/zephyr/dt-bindings/*/*mcux*
@ -4074,8 +4081,12 @@ Xilinx Platforms:
collaborators:
- henrikbrixandersen
- ibirnbaum
- michalsimek
files:
- boards/amd/
- drivers/*/*xilinx*
- drivers/*/*xlnx*
- drivers/*/*zynq*
- dts/*/xilinx/
- dts/bindings/*/*xlnx*
- include/zephyr/*/*/*xlnx*
@ -4180,6 +4191,17 @@ Storage:
tests:
- storage
Storage ZMS:
status: maintained
maintainers:
- rghaddab
files:
- subsys/fs/zms/
- include/zephyr/fs/zms.h
- samples/subsys/fs/zms/
- tests/subsys/fs/zms/
- doc/services/storage/zms/zms.rst
Sysbuild:
status: maintained
maintainers:
@ -4796,6 +4818,8 @@ West:
"West project: hal_rpi_pico":
status: maintained
maintainers:
- soburi
collaborators:
- yonsch
files:
- modules/hal_rpi_pico/
@ -4814,7 +4838,7 @@ West:
- mnkp
- rettichschnidi
files:
- modules/Kconfig.silabs
- modules/hal_silabs/
labels:
- "platform: Silabs"
@ -4857,6 +4881,14 @@ West:
labels:
- "platform: TI"
"West project: hal_wch":
status: maintained
maintainers:
- nzmichaelh
- kholia
files:
- modules/hal_wch/
"West project: hal_wurthelektronik":
status: maintained
maintainers:
@ -5033,6 +5065,16 @@ West:
labels:
- "area: native port"
"West project: nrf_wifi":
status: maintained
maintainers:
- krish2718
- sachinthegreen
files:
- modules/nrf_wifi/
labels:
- "area: Wi-Fi"
"West project: open-amp":
status: odd fixes
collaborators:
@ -5219,6 +5261,8 @@ West:
maintainers:
- krish2718
- jukkar
collaborators:
- MaochenWang1
files:
- modules/hostap/
labels:
@ -5241,7 +5285,6 @@ Xtensa arch:
- boards/qemu/xtensa/
- boards/cdns/xt-sim/
- soc/cdns/dc233c/
- soc/cdns/dc233c/
- soc/cdns/xtensa_sample_controller/
- tests/arch/xtensa/
labels:

View file

@ -1 +1 @@
0.16.8
0.17.0

View file

@ -1,5 +1,5 @@
VERSION_MAJOR = 3
VERSION_MINOR = 7
VERSION_MAJOR = 4
VERSION_MINOR = 0
PATCHLEVEL = 99
VERSION_TWEAK = 0
EXTRAVERSION =

View file

@ -55,6 +55,8 @@ config ARM64
select ARCH_HAS_DIRECTED_IPIS
select ARCH_HAS_DEMAND_PAGING
select ARCH_HAS_DEMAND_MAPPING
select ARCH_SUPPORTS_EVICTION_TRACKING
select EVICTION_TRACKING if DEMAND_PAGING
help
ARM64 (AArch64) architecture
@ -694,6 +696,12 @@ config ARCH_SUPPORTS_ROM_START
config ARCH_SUPPORTS_EMPTY_IRQ_SPURIOUS
bool
config ARCH_SUPPORTS_EVICTION_TRACKING
bool
help
Architecture code supports page tracking for eviction algorithms
when demand paging is enabled.
config ARCH_HAS_EXTRA_EXCEPTION_INFO
bool
@ -1140,3 +1148,9 @@ config ARCH_HAS_CUSTOM_BUSY_WAIT
It's possible that an architecture port cannot or does not want to use
the provided k_busy_wait(), but instead must do something custom. It must
enable this option in that case.
config ARCH_HAS_CUSTOM_CURRENT_IMPL
bool
help
Select when architecture implements arch_current_thread() &
arch_current_thread_set().

View file

@ -262,7 +262,7 @@ config ARC_CURRENT_THREAD_USE_NO_TLS
RGF_NUM_BANKS the parameter is disabled by-default because banks syncronization
requires significant time, and it slows down performance.
ARCMWDT works with tls pointer in different way then GCC. Optimized access to
TLS pointer via _current variable does not provide significant advantages
TLS pointer via arch_current_thread() does not provide significant advantages
in case of MetaWare.
config GEN_ISR_TABLES
@ -383,9 +383,7 @@ config ARC_EXCEPTION_STACK_SIZE
endmenu
config ARC_EARLY_SOC_INIT
bool "Make early stage SoC-specific initialization [DEPRECATED]"
select SOC_RESET_HOOK
select DEPRECATED
bool "Make early stage SoC-specific initialization"
help
Call SoC per-core setup code on early stage initialization
(before C runtime initialization). Setup code is called in form of

View file

@ -34,3 +34,5 @@ add_subdirectory_ifdef(CONFIG_ARC_CORE_MPU mpu)
add_subdirectory_ifdef(CONFIG_ARC_SECURE_FIRMWARE secureshield)
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)
zephyr_library_sources_ifdef(CONFIG_LLEXT elf.c)

80
arch/arc/core/elf.c Normal file
View file

@ -0,0 +1,80 @@
/*
* Copyright (c) 2024 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/llext/elf.h>
#include <zephyr/llext/llext.h>
#include <zephyr/llext/loader.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/util.h>
LOG_MODULE_REGISTER(elf, CONFIG_LLEXT_LOG_LEVEL);
#define R_ARC_32 4
#define R_ARC_B26 5 /* AKA R_ARC_64 */
#define R_ARC_S25W_PCREL 17
#define R_ARC_32_ME 27
/* ARCompact insns packed in memory have Middle Endian encoding */
#define ME(x) (((x & 0xffff0000) >> 16) | ((x & 0xffff) << 16))
/**
* @brief Architecture specific function for relocating shared elf
*
* Elf files contain a series of relocations described in multiple sections.
* These relocation instructions are architecture specific and each architecture
* supporting modules must implement this.
*
* The relocation codes are well documented:
* https://github.com/foss-for-synopsys-dwc-arc-processors/arc-ABI-manual/blob/master/ARCv2_ABI.pdf
* https://github.com/zephyrproject-rtos/binutils-gdb
*/
int arch_elf_relocate(elf_rela_t *rel, uintptr_t loc, uintptr_t sym_base_addr, const char *sym_name,
uintptr_t load_bias)
{
int ret = 0;
uint32_t insn = UNALIGNED_GET((uint32_t *)loc);
uint32_t value;
sym_base_addr += rel->r_addend;
int reloc_type = ELF32_R_TYPE(rel->r_info);
switch (reloc_type) {
case R_ARC_32:
case R_ARC_B26:
UNALIGNED_PUT(sym_base_addr, (uint32_t *)loc);
break;
case R_ARC_S25W_PCREL:
/* ((S + A) - P) >> 2
* S = symbol address
* A = addend
* P = relative offset to PCL
*/
value = (sym_base_addr + rel->r_addend - (loc & ~0x3)) >> 2;
insn = ME(insn);
/* disp25w */
insn = insn & ~0x7fcffcf;
insn |= ((value >> 0) & 0x01ff) << 18;
insn |= ((value >> 9) & 0x03ff) << 6;
insn |= ((value >> 19) & 0x000f) << 0;
insn = ME(insn);
UNALIGNED_PUT(insn, (uint32_t *)loc);
break;
case R_ARC_32_ME:
UNALIGNED_PUT(ME(sym_base_addr), (uint32_t *)loc);
break;
default:
LOG_ERR("unknown relocation: %u\n", reloc_type);
ret = -ENOEXEC;
break;
}
return ret;
}

View file

@ -55,7 +55,7 @@ static bool z_check_thread_stack_fail(const uint32_t fault_addr, uint32_t sp)
{
#if defined(CONFIG_MULTITHREADING)
uint32_t guard_end, guard_start;
const struct k_thread *thread = _current;
const struct k_thread *thread = arch_current_thread();
if (!thread) {
/* TODO: Under what circumstances could we get here ? */

View file

@ -49,8 +49,8 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
__asm__ volatile("sync");
/* If _current was aborted in the offload routine, we shouldn't be here */
__ASSERT_NO_MSG((_current->base.thread_state & _THREAD_DEAD) == 0);
/* If arch_current_thread() was aborted in the offload routine, we shouldn't be here */
__ASSERT_NO_MSG((arch_current_thread()->base.thread_state & _THREAD_DEAD) == 0);
}
/* need to be executed on every core in the system */

View file

@ -16,9 +16,8 @@
#include <zephyr/arch/cpu.h>
#include <swap_macros.h>
#include <zephyr/arch/arc/asm-compat/assembler.h>
#if defined(CONFIG_SOC_RESET_HOOK)
GTEXT(soc_reset_hook)
#ifdef CONFIG_ARC_EARLY_SOC_INIT
#include <soc_ctrl.h>
#endif
GDATA(z_interrupt_stacks)
@ -113,8 +112,8 @@ done_icache_invalidate:
done_dcache_invalidate:
#ifdef CONFIG_SOC_RESET_HOOK
bl soc_reset_hook
#ifdef CONFIG_ARC_EARLY_SOC_INIT
soc_early_asm_init_percpu
#endif
_dsp_extension_probe

View file

@ -16,6 +16,7 @@
#include <ipi.h>
#include <zephyr/init.h>
#include <zephyr/irq.h>
#include <zephyr/platform/hooks.h>
#include <arc_irq_offload.h>
volatile struct {
@ -115,6 +116,11 @@ void arch_secondary_cpu_init(int cpu_num)
DT_IRQ(DT_NODELABEL(ici), priority), 0);
irq_enable(DT_IRQN(DT_NODELABEL(ici)));
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
/* call the function set by arch_cpu_start */
fn = arc_cpu_init[cpu_num].fn;

View file

@ -210,7 +210,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
#ifdef CONFIG_MULTITHREADING
void *z_arch_get_next_switch_handle(struct k_thread **old_thread)
{
*old_thread = _current;
*old_thread = arch_current_thread();
return z_get_next_switch_handle(NULL);
}
@ -227,16 +227,16 @@ void *z_arch_get_next_switch_handle(struct k_thread **old_thread)
FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
void *p1, void *p2, void *p3)
{
setup_stack_vars(_current);
setup_stack_vars(arch_current_thread());
/* possible optimizaiton: no need to load mem domain anymore */
/* need to lock cpu here ? */
configure_mpu_thread(_current);
configure_mpu_thread(arch_current_thread());
z_arc_userspace_enter(user_entry, p1, p2, p3,
(uint32_t)_current->stack_info.start,
(_current->stack_info.size -
_current->stack_info.delta), _current);
(uint32_t)arch_current_thread()->stack_info.start,
(arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta), arch_current_thread());
CODE_UNREACHABLE;
}
#endif
@ -336,7 +336,7 @@ int arc_vpx_lock(k_timeout_t timeout)
id = _current_cpu->id;
#if (CONFIG_MP_MAX_NUM_CPUS > 1) && defined(CONFIG_SCHED_CPU_MASK)
__ASSERT(!arch_is_in_isr() && (_current->base.cpu_mask == BIT(id)), "");
__ASSERT(!arch_is_in_isr() && (arch_current_thread()->base.cpu_mask == BIT(id)), "");
#endif
k_spin_unlock(&lock, key);
@ -355,7 +355,7 @@ void arc_vpx_unlock(void)
key = k_spin_lock(&lock);
#if (CONFIG_MP_MAX_NUM_CPUS > 1) && defined(CONFIG_SCHED_CPU_MASK)
__ASSERT(!arch_is_in_isr() && (_current->base.cpu_mask == BIT(id)), "");
__ASSERT(!arch_is_in_isr() && (arch_current_thread()->base.cpu_mask == BIT(id)), "");
#endif
id = _current_cpu->id;
k_spin_unlock(&lock, key);

View file

@ -29,7 +29,7 @@ size_t arch_tls_stack_setup(struct k_thread *new_thread, char *stack_ptr)
void *_Preserve_flags _mwget_tls(void)
{
return (void *)(_current->tls);
return (void *)(arch_current_thread()->tls);
}
#else

View file

@ -26,6 +26,8 @@
#include <v2/irq.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -33,6 +35,10 @@ extern "C" {
static ALWAYS_INLINE void arch_kernel_init(void)
{
z_irq_setup();
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}

View file

@ -14,5 +14,5 @@ SECTION_FUNC(text, __aeabi_read_tp)
/*
* TPIDRURW will be used as a base pointer point to TLS aera.
*/
mrc 15, 0, r0, c13, c0, 2
mrc p15, 0, r0, c13, c0, 2
bx lr

View file

@ -178,7 +178,7 @@ bool z_arm_fault_undef_instruction_fp(void)
* context because it is about to be overwritten.
*/
if (((_current_cpu->nested == 2)
&& (_current->base.user_options & K_FP_REGS))
&& (arch_current_thread()->base.user_options & K_FP_REGS))
|| ((_current_cpu->nested > 2)
&& (spill_esf->undefined & FPEXC_EN))) {
/*
@ -196,7 +196,7 @@ bool z_arm_fault_undef_instruction_fp(void)
* means that a thread that uses the VFP does not have to,
* but should, set K_FP_REGS on thread creation.
*/
_current->base.user_options |= K_FP_REGS;
arch_current_thread()->base.user_options |= K_FP_REGS;
}
return false;

View file

@ -62,7 +62,6 @@ static inline void z_arm_floating_point_init(void)
__set_CPACR(reg_val);
barrier_isync_fence_full();
#if !defined(CONFIG_FPU_SHARING)
/*
* FPEXC: Floating-Point Exception Control register
* comp. ARM Architecture Reference Manual, ARMv7-A and ARMv7-R edition,
@ -84,7 +83,6 @@ static inline void z_arm_floating_point_init(void)
*/
__set_FPEXC(FPEXC_EN);
#endif
#endif
}
#endif /* CONFIG_CPU_HAS_FPU */

View file

@ -12,6 +12,7 @@
#include "zephyr/cache.h"
#include "zephyr/kernel/thread_stack.h"
#include "zephyr/toolchain/gcc.h"
#include <zephyr/platform/hooks.h>
#define INV_MPID UINT32_MAX
@ -198,6 +199,10 @@ void arch_secondary_cpu_init(void)
*/
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
fn = arm_cpu_boot_params.fn;
arg = arm_cpu_boot_params.arg;
barrier_dsync_fence_full();

View file

@ -17,8 +17,8 @@
int arch_swap(unsigned int key)
{
/* store off key and return value */
_current->arch.basepri = key;
_current->arch.swap_return_value = -EAGAIN;
arch_current_thread()->arch.basepri = key;
arch_current_thread()->arch.swap_return_value = -EAGAIN;
z_arm_cortex_r_svc();
irq_unlock(key);
@ -26,5 +26,5 @@ int arch_swap(unsigned int key)
/* Context switch is performed here. Returning implies the
* thread has been context-switched-in again.
*/
return _current->arch.swap_return_value;
return arch_current_thread()->arch.swap_return_value;
}

View file

@ -70,7 +70,7 @@ SECTION_FUNC(TEXT, z_arm_do_swap)
#if defined(CONFIG_FPU_SHARING)
ldrb r0, [r2, #_thread_offset_to_user_options]
tst r0, #K_FP_REGS /* _current->base.user_options & K_FP_REGS */
tst r0, #K_FP_REGS /* arch_current_thread()->base.user_options & K_FP_REGS */
beq out_fp_inactive
mov ip, #FPEXC_EN
@ -126,7 +126,7 @@ out_fp_inactive:
* TPIDRURW is used as a base pointer to all
* thread variables with offsets added by toolchain.
*/
mcr 15, 0, r0, c13, c0, 2
mcr p15, 0, r0, c13, c0, 2
#endif
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
@ -152,7 +152,7 @@ out_fp_inactive:
#if defined(CONFIG_FPU_SHARING)
ldrb r0, [r2, #_thread_offset_to_user_options]
tst r0, #K_FP_REGS /* _current->base.user_options & K_FP_REGS */
tst r0, #K_FP_REGS /* arch_current_thread()->base.user_options & K_FP_REGS */
beq in_fp_inactive
mov r3, #FPEXC_EN
@ -336,12 +336,14 @@ _context_switch:
_oops:
/*
* Pass the exception frame to z_do_kernel_oops. r0 contains the
* exception reason.
* Pass the exception frame to z_do_kernel_oops.
*/
cps #MODE_SYS
mov r0, sp
cps #MODE_SVC
/* Zero callee_regs and exc_return (only used on Cortex-M) */
mov r1, #0
mov r2, #0
bl z_do_kernel_oops
b z_arm_int_exit

View file

@ -150,10 +150,12 @@ offload:
_oops:
/*
* Pass the exception frame to z_do_kernel_oops. r0 contains the
* exception reason.
* Pass the exception frame to z_do_kernel_oops.
*/
mov r0, sp
/* Zero callee_regs and exc_return (only used on Cortex-M) */
mov r1, #0
mov r2, #0
bl z_do_kernel_oops
inv:

View file

@ -198,8 +198,8 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
{
/* Set up privileged stack before entering user mode */
_current->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(_current->stack_obj);
arch_current_thread()->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(arch_current_thread()->stack_obj);
#if defined(CONFIG_MPU_STACK_GUARD)
#if defined(CONFIG_THREAD_STACK_INFO)
/* We're dropping to user mode which means the guard area is no
@ -208,13 +208,13 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
* which accounted for memory borrowed from the thread stack.
*/
#if FP_GUARD_EXTRA_SIZE > 0
if ((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) {
_current->stack_info.start -= FP_GUARD_EXTRA_SIZE;
_current->stack_info.size += FP_GUARD_EXTRA_SIZE;
if ((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) {
arch_current_thread()->stack_info.start -= FP_GUARD_EXTRA_SIZE;
arch_current_thread()->stack_info.size += FP_GUARD_EXTRA_SIZE;
}
#endif /* FP_GUARD_EXTRA_SIZE */
_current->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
_current->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_THREAD_STACK_INFO */
/* Stack guard area reserved at the bottom of the thread's
@ -222,23 +222,23 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
_current->arch.priv_stack_start +=
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
arch_current_thread()->arch.priv_stack_start +=
((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
_current->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
_current->arch.priv_stack_end =
_current->arch.priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE;
arch_current_thread()->arch.priv_stack_end =
arch_current_thread()->arch.priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE;
#endif
z_arm_userspace_enter(user_entry, p1, p2, p3,
(uint32_t)_current->stack_info.start,
_current->stack_info.size -
_current->stack_info.delta);
(uint32_t)arch_current_thread()->stack_info.start,
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
CODE_UNREACHABLE;
}
@ -304,7 +304,7 @@ EXPORT_SYMBOL(z_arm_thread_is_in_user_mode);
uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp)
{
#if defined(CONFIG_MULTITHREADING)
const struct k_thread *thread = _current;
const struct k_thread *thread = arch_current_thread();
if (thread == NULL) {
return 0;
@ -314,7 +314,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
#if (defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)) && \
defined(CONFIG_MPU_STACK_GUARD)
uint32_t guard_len =
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
/* If MPU_STACK_GUARD is not enabled, the guard length is
@ -377,7 +377,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
int arch_float_disable(struct k_thread *thread)
{
if (thread != _current) {
if (thread != arch_current_thread()) {
return -EINVAL;
}

View file

@ -40,54 +40,6 @@ LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#define EACD(edr) (((edr) & SYSMPU_EDR_EACD_MASK) >> SYSMPU_EDR_EACD_SHIFT)
#endif
/* Exception Return (EXC_RETURN) is provided in LR upon exception entry.
* It is used to perform an exception return and to detect possible state
* transition upon exception.
*/
/* Prefix. Indicates that this is an EXC_RETURN value.
* This field reads as 0b11111111.
*/
#define EXC_RETURN_INDICATOR_PREFIX (0xFF << 24)
/* bit[0]: Exception Secure. The security domain the exception was taken to. */
#define EXC_RETURN_EXCEPTION_SECURE_Pos 0
#define EXC_RETURN_EXCEPTION_SECURE_Msk \
BIT(EXC_RETURN_EXCEPTION_SECURE_Pos)
#define EXC_RETURN_EXCEPTION_SECURE_Non_Secure 0
#define EXC_RETURN_EXCEPTION_SECURE_Secure EXC_RETURN_EXCEPTION_SECURE_Msk
/* bit[2]: Stack Pointer selection. */
#define EXC_RETURN_SPSEL_Pos 2
#define EXC_RETURN_SPSEL_Msk BIT(EXC_RETURN_SPSEL_Pos)
#define EXC_RETURN_SPSEL_MAIN 0
#define EXC_RETURN_SPSEL_PROCESS EXC_RETURN_SPSEL_Msk
/* bit[3]: Mode. Indicates the Mode that was stacked from. */
#define EXC_RETURN_MODE_Pos 3
#define EXC_RETURN_MODE_Msk BIT(EXC_RETURN_MODE_Pos)
#define EXC_RETURN_MODE_HANDLER 0
#define EXC_RETURN_MODE_THREAD EXC_RETURN_MODE_Msk
/* bit[4]: Stack frame type. Indicates whether the stack frame is a standard
* integer only stack frame or an extended floating-point stack frame.
*/
#define EXC_RETURN_STACK_FRAME_TYPE_Pos 4
#define EXC_RETURN_STACK_FRAME_TYPE_Msk BIT(EXC_RETURN_STACK_FRAME_TYPE_Pos)
#define EXC_RETURN_STACK_FRAME_TYPE_EXTENDED 0
#define EXC_RETURN_STACK_FRAME_TYPE_STANDARD EXC_RETURN_STACK_FRAME_TYPE_Msk
/* bit[5]: Default callee register stacking. Indicates whether the default
* stacking rules apply, or whether the callee registers are already on the
* stack.
*/
#define EXC_RETURN_CALLEE_STACK_Pos 5
#define EXC_RETURN_CALLEE_STACK_Msk BIT(EXC_RETURN_CALLEE_STACK_Pos)
#define EXC_RETURN_CALLEE_STACK_SKIPPED 0
#define EXC_RETURN_CALLEE_STACK_DEFAULT EXC_RETURN_CALLEE_STACK_Msk
/* bit[6]: Secure or Non-secure stack. Indicates whether a Secure or
* Non-secure stack is used to restore stack frame on exception return.
*/
#define EXC_RETURN_RETURN_STACK_Pos 6
#define EXC_RETURN_RETURN_STACK_Msk BIT(EXC_RETURN_RETURN_STACK_Pos)
#define EXC_RETURN_RETURN_STACK_Non_Secure 0
#define EXC_RETURN_RETURN_STACK_Secure EXC_RETURN_RETURN_STACK_Msk
/* Integrity signature for an ARMv8-M implementation */
#if defined(CONFIG_ARMV7_M_ARMV8_M_FP)
#define INTEGRITY_SIGNATURE_STD 0xFEFA125BUL
@ -1112,9 +1064,7 @@ void z_arm_fault(uint32_t msp, uint32_t psp, uint32_t exc_return,
__ASSERT(esf != NULL,
"ESF could not be retrieved successfully. Shall never occur.");
#ifdef CONFIG_DEBUG_COREDUMP
z_arm_coredump_fault_sp = POINTER_TO_UINT(esf);
#endif
z_arm_set_fault_sp(esf, exc_return);
reason = fault_handle(esf, fault, &recoverable);
if (recoverable) {

View file

@ -14,6 +14,145 @@
#include <zephyr/arch/cpu.h>
#include <zephyr/arch/common/pm_s2ram.h>
/**
* Macro expanding to an integer literal equal to the offset of
* field `sr_name` in `struct __cpu_context`. This macro has to
* be implemented in C, because GEN_OFFSET_SYM provides offsets
* as C preprocessor definitions - there are not visible to the
* assembler.
*
* See also: `arch/arm/core/offsets/offsets_aarch32.c`
*/
#define CPU_CTX_SR_OFFSET(sr_name) \
___cpu_context_t_ ## sr_name ## _OFFSET
/**
* Macros used to save / load a special register in __cpu_context.
* These also have to be implemented in C due to CPU_CTX_SR_OFFSET.
*/
#define SAVE_SPECIAL_REG(sr_name, cpu_ctx_reg, tmp_reg) \
mrs tmp_reg, sr_name; \
str tmp_reg, [cpu_ctx_reg, # CPU_CTX_SR_OFFSET(sr_name)];
#define RESTORE_SPECIAL_REG(sr_name, cpu_ctx_reg, tmp_reg) \
ldr tmp_reg, [cpu_ctx_reg, # CPU_CTX_SR_OFFSET(sr_name)]; \
msr sr_name, tmp_reg;
/*
* The following macros could be written as assembler macros, but C is used
* for portability (assembler macro syntax may differ between toolchains).
*/
/*
* Pushes registers r4~r12 and lr on the stack.
* r0 is unmodified but other GPRs may be overwritten.
*/
#if !defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* `push` on ARMv6-M / ARMv8-M Baseline:
* only r0~r7 and lr may be pushed
*/
#define PUSH_GPRS \
push {r4-r7}; \
mov r1, r8; \
mov r2, r9; \
mov r3, r10; \
mov r4, r11; \
mov r5, r12; \
push {r1-r5, lr}
#else
/* `push` on ARMv7-M and ARMv8-M Mainline: no limitation */
#define PUSH_GPRS \
push {r4-r12, lr}
#endif /* !CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
/*
* Pops registers r4~r12 and lr from the stack
* r0 is unmodified but other GPRs may be overwritten.
*/
#if !defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* `pop` on ARMv6-M / ARMv8-M Baseline:
* can only pop to r0~r7 and pc (not lr!)
*/
#define POP_GPRS \
pop {r1-r6}; \
mov lr, r6; \
mov r12, r5; \
mov r11, r4; \
mov r10, r3; \
mov r9, r2; \
mov r8, r1; \
pop {r4-r7}
#else
/* `pop` on ARMv7-M and ARMv8-M Mainline: no limitation */
#define POP_GPRS \
pop {r4-r12, lr}
#endif /* !CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* Registers present only on ARMv7-M and ARMv8-M Mainline */
#define SAVE_FM_BP_REGS(cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(faultmask, cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(basepri, cpu_ctx, tmp_reg)
#define RESTORE_FM_BP_REGS(cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(faultmask, cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(basepri, cpu_ctx, tmp_reg)
#else
/* Registers not present: do nothing */
#define SAVE_FM_BP_REGS(cpu_ctx, tmp_reg)
#define RESTORE_FM_BP_REGS(cpu_ctx, tmp_reg)
#endif /* CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
#if defined(CONFIG_CPU_CORTEX_M_HAS_SPLIM)
/* Registers present only on certain ARMv8-M implementations */
#define SAVE_SPLIM_REGS(cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(msplim, cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(psplim, cpu_ctx, tmp_reg)
#define RESTORE_SPLIM_REGS(cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(msplim, cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(psplim, cpu_ctx, tmp_reg)
#else
/* Registers not present: do nothing */
#define SAVE_SPLIM_REGS(cpu_ctx, tmp_reg)
#define RESTORE_SPLIM_REGS(cpu_ctx, tmp_reg)
#endif /* CONFIG_CPU_CORTEX_M_HAS_SPLIM */
/*
* Saves the CPU's special registers in the `struct __cpu_context`
* pointed to by the `cpu_ctx` register.
* The `tmp_reg` register is overwritten as part of this process.
*/
#define SAVE_SPECIAL_REGISTERS(cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(msp, cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(psp, cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(primask, cpu_ctx, tmp_reg) \
SAVE_SPLIM_REGS( cpu_ctx, tmp_reg) \
SAVE_FM_BP_REGS( cpu_ctx, tmp_reg) \
SAVE_SPECIAL_REG(control, cpu_ctx, tmp_reg)
/*
* Restores the CPU's special registers from the `struct __cpu_context`
* pointed to by the `cpu_ctx` register.
* The `tmp_reg` register is overwritten as part of this process.
*
* N.B.: ISB at the end is required because "Software must use an ISB
* barrier instruction to ensure a write to the CONTROL register takes
* effect before the next instruction is executed."
*
* If this macro is modified, make sure CONTROL is always the last
* restored register, and that an ISB follows the MSR instruction.
*/
#define RESTORE_SPECIAL_REGISTERS(cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(msp, cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(psp, cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(primask, cpu_ctx, tmp_reg) \
RESTORE_SPLIM_REGS( cpu_ctx, tmp_reg) \
RESTORE_FM_BP_REGS( cpu_ctx, tmp_reg) \
RESTORE_SPECIAL_REG(control, cpu_ctx, tmp_reg) \
isb
_ASM_FILE_PROLOGUE
GTEXT(pm_s2ram_mark_set)
@ -26,7 +165,7 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
*
* r0: address of the system_off function
*/
push {r4-r12, lr}
PUSH_GPRS
/* Move system_off to protected register. */
mov r4, r0
@ -34,43 +173,14 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
/* Store CPU context */
ldr r1, =_cpu_context
mrs r2, msp
str r2, [r1, #___cpu_context_t_msp_OFFSET]
mrs r2, msplim
str r2, [r1, #___cpu_context_t_msplim_OFFSET]
mrs r2, psp
str r2, [r1, #___cpu_context_t_psp_OFFSET]
mrs r2, psplim
str r2, [r1, #___cpu_context_t_psplim_OFFSET]
mrs r2, apsr
str r2, [r1, #___cpu_context_t_apsr_OFFSET]
mrs r2, ipsr
str r2, [r1, #___cpu_context_t_ipsr_OFFSET]
mrs r2, epsr
str r2, [r1, #___cpu_context_t_epsr_OFFSET]
mrs r2, primask
str r2, [r1, #___cpu_context_t_primask_OFFSET]
mrs r2, faultmask
str r2, [r1, #___cpu_context_t_faultmask_OFFSET]
mrs r2, basepri
str r2, [r1, #___cpu_context_t_basepri_OFFSET]
mrs r2, control
str r2, [r1, #___cpu_context_t_control_OFFSET]
SAVE_SPECIAL_REGISTERS(/* ctx: */ r1, /* tmp: */ r2)
/*
* Mark entering suspend to RAM.
*/
bl pm_s2ram_mark_set
mov r1, lr
bl pm_s2ram_mark_set
mov lr, r1
/*
* Call the system_off function passed as parameter. This should never
@ -86,12 +196,14 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
/*
* Reset the marking of suspend to RAM, return is ignored.
*/
bl pm_s2ram_mark_check_and_clear
mov r1, lr
bl pm_s2ram_mark_check_and_clear
mov lr, r1
/* Move system_off back to r0 as return value */
mov r0, r4
pop {r4-r12, lr}
POP_GPRS
bx lr
@ -99,16 +211,13 @@ GTEXT(arch_pm_s2ram_resume)
SECTION_FUNC(TEXT, arch_pm_s2ram_resume)
/*
* Check if reset occurred after suspending to RAM.
* Store LR to ensure we can continue boot when we are not suspended
* to RAM. In addition to LR, R0 is pushed too, to ensure "SP mod 8 = 0",
* as stated by ARM rule 6.2.1.2 for AAPCS32.
*/
push {r0, lr}
bl pm_s2ram_mark_check_and_clear
cmp r0, #0x1
pop {r0, lr}
beq resume
bx lr
mov r1, lr
bl pm_s2ram_mark_check_and_clear
mov lr, r1
cmp r0, #0x1
beq resume
bx lr
resume:
/*
@ -116,44 +225,12 @@ resume:
*/
ldr r0, =_cpu_context
ldr r1, [r0, #___cpu_context_t_msp_OFFSET]
msr msp, r1
RESTORE_SPECIAL_REGISTERS(/* ctx: */ r0, /* tmp: */ r1)
ldr r1, [r0, #___cpu_context_t_msplim_OFFSET]
msr msplim, r1
ldr r1, [r0, #___cpu_context_t_psp_OFFSET]
msr psp, r1
ldr r1, [r0, #___cpu_context_t_psplim_OFFSET]
msr psplim, r1
ldr r1, [r0, #___cpu_context_t_apsr_OFFSET]
msr apsr_nzcvq, r1
ldr r1, [r0, #___cpu_context_t_ipsr_OFFSET]
msr ipsr, r1
ldr r1, [r0, #___cpu_context_t_epsr_OFFSET]
msr epsr, r1
ldr r1, [r0, #___cpu_context_t_primask_OFFSET]
msr primask, r1
ldr r1, [r0, #___cpu_context_t_faultmask_OFFSET]
msr faultmask, r1
ldr r1, [r0, #___cpu_context_t_basepri_OFFSET]
msr basepri, r1
ldr r1, [r0, #___cpu_context_t_control_OFFSET]
msr control, r1
isb
pop {r4-r12, lr}
POP_GPRS
/*
* Set the return value and return
*/
mov r0, #0
movs r0, #0
bx lr

View file

@ -22,20 +22,44 @@ __noinit _cpu_context_t _cpu_context;
*/
static __noinit uint32_t marker;
void pm_s2ram_mark_set(void)
void __attribute__((naked)) pm_s2ram_mark_set(void)
{
marker = MAGIC;
__asm__ volatile(
/* Set the marker to MAGIC value */
"str %[_magic_val], [%[_marker]]\n"
"bx lr\n"
:
: [_magic_val] "r"(MAGIC), [_marker] "r"(&marker)
: "r1", "r4", "memory");
}
bool pm_s2ram_mark_check_and_clear(void)
bool __attribute__((naked)) pm_s2ram_mark_check_and_clear(void)
{
if (marker == MAGIC) {
marker = 0;
__asm__ volatile(
/* Set return value to 0 */
"mov r0, #0\n"
return true;
}
/* Check the marker */
"ldr r3, [%[_marker]]\n"
"cmp r3, %[_magic_val]\n"
"bne exit\n"
return false;
/*
* Reset the marker
*/
"str r0, [%[_marker]]\n"
/*
* Set return value to 1
*/
"mov r0, #1\n"
"exit:\n"
"bx lr\n"
:
: [_magic_val] "r"(MAGIC), [_marker] "r"(&marker)
: "r0", "r1", "r3", "r4", "memory");
}
#endif /* CONFIG_PM_S2RAM_CUSTOM_MARKING */

View file

@ -1,6 +1,5 @@
/*
* Copyright (c) 2018 Linaro, Limited
* Copyright (c) 2023 Arm Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -34,8 +33,8 @@
int arch_swap(unsigned int key)
{
/* store off key and return value */
_current->arch.basepri = key;
_current->arch.swap_return_value = -EAGAIN;
arch_current_thread()->arch.basepri = key;
arch_current_thread()->arch.swap_return_value = -EAGAIN;
/* set pending bit to make sure we will take a PendSV exception */
SCB->ICSR |= SCB_ICSR_PENDSVSET_Msk;
@ -46,65 +45,5 @@ int arch_swap(unsigned int key)
/* Context switch is performed here. Returning implies the
* thread has been context-switched-in again.
*/
return _current->arch.swap_return_value;
}
uintptr_t z_arm_pendsv_c(uintptr_t exc_ret)
{
/* Store LSB of LR (EXC_RETURN) to the thread's 'mode' word. */
IF_ENABLED(CONFIG_ARM_STORE_EXC_RETURN,
(_kernel.cpus[0].current->arch.mode_exc_return = (uint8_t)exc_ret;));
/* Protect the kernel state while we play with the thread lists */
uint32_t basepri = arch_irq_lock();
/* fetch the thread to run from the ready queue cache */
struct k_thread *current = _kernel.cpus[0].current = _kernel.ready_q.cache;
/*
* Clear PendSV so that if another interrupt comes in and
* decides, with the new kernel state based on the new thread
* being context-switched in, that it needs to reschedule, it
* will take, but that previously pended PendSVs do not take,
* since they were based on the previous kernel state and this
* has been handled.
*/
SCB->ICSR = SCB_ICSR_PENDSVCLR_Msk;
/* For Cortex-M, store TLS pointer in a global variable,
* as it lacks the process ID or thread ID register
* to be used by toolchain to access thread data.
*/
IF_ENABLED(CONFIG_THREAD_LOCAL_STORAGE,
(extern uintptr_t z_arm_tls_ptr; z_arm_tls_ptr = current->tls));
IF_ENABLED(CONFIG_ARM_STORE_EXC_RETURN,
(exc_ret = (exc_ret & 0xFFFFFF00) | current->arch.mode_exc_return));
/* Restore previous interrupt disable state (irq_lock key)
* (We clear the arch.basepri field after restoring state)
*/
basepri = current->arch.basepri;
current->arch.basepri = 0;
arch_irq_unlock(basepri);
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
z_arm_configure_dynamic_mpu_regions(current);
#endif
/* restore mode */
IF_ENABLED(CONFIG_USERSPACE, ({
CONTROL_Type ctrl = {.w = __get_CONTROL()};
/* exit privileged state when returning to thread mode. */
ctrl.b.nPRIV = 0;
/* __set_CONTROL inserts an ISB which is may not be necessary here
* (stack pointer may not be touched), but it's recommended to avoid
* executing pre-fetched instructions with the previous privilege.
*/
__set_CONTROL(ctrl.w | current->arch.mode);
}));
return exc_ret;
return arch_current_thread()->arch.swap_return_value;
}

View file

@ -27,7 +27,6 @@ _ASM_FILE_PROLOGUE
GTEXT(z_arm_svc)
GTEXT(z_arm_pendsv)
GTEXT(z_do_kernel_oops)
GTEXT(z_arm_pendsv_c)
#if defined(CONFIG_USERSPACE)
GTEXT(z_arm_do_syscall)
#endif
@ -118,20 +117,125 @@ out_fp_endif:
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
mov r4, lr
mov r0, lr
bl z_arm_pendsv_c
mov lr, r4
/* Protect the kernel state while we play with the thread lists */
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
cpsid i
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
movs.n r0, #_EXC_IRQ_DEFAULT_PRIO
msr BASEPRI_MAX, r0
isb /* Make the effect of disabling interrupts be realized immediately */
#else
#error Unknown ARM architecture
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
ldr r1, =_kernel
ldr r2, [r1, #_kernel_offset_to_current]
/*
* Prepare to clear PendSV with interrupts unlocked, but
* don't clear it yet. PendSV must not be cleared until
* the new thread is context-switched in since all decisions
* to pend PendSV have been taken with the current kernel
* state and this is what we're handling currently.
*/
ldr r7, =_SCS_ICSR
ldr r6, =_SCS_ICSR_UNPENDSV
/* _kernel is still in r1 */
/* fetch the thread to run from the ready queue cache */
ldr r2, [r1, #_kernel_offset_to_ready_q_cache]
str r2, [r1, #_kernel_offset_to_current]
/*
* Clear PendSV so that if another interrupt comes in and
* decides, with the new kernel state based on the new thread
* being context-switched in, that it needs to reschedule, it
* will take, but that previously pended PendSVs do not take,
* since they were based on the previous kernel state and this
* has been handled.
*/
/* _SCS_ICSR is still in r7 and _SCS_ICSR_UNPENDSV in r6 */
str r6, [r7, #0]
#if defined(CONFIG_THREAD_LOCAL_STORAGE)
/* Grab the TLS pointer */
ldr r4, =_thread_offset_to_tls
adds r4, r2, r4
ldr r0, [r4]
/* For Cortex-M, store TLS pointer in a global variable,
* as it lacks the process ID or thread ID register
* to be used by toolchain to access thread data.
*/
ldr r4, =z_arm_tls_ptr
str r0, [r4]
#endif
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
/* Restore EXC_RETURN value. */
mov lr, r0
ldrsb lr, [r2, #_thread_offset_to_mode_exc_return]
#endif
/* Restore previous interrupt disable state (irq_lock key)
* (We clear the arch.basepri field after restoring state)
*/
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) && (_thread_offset_to_basepri > 124)
/* Doing it this way since the offset to thread->arch.basepri can in
* some configurations be larger than the maximum of 124 for ldr/str
* immediate offsets.
*/
ldr r4, =_thread_offset_to_basepri
adds r4, r2, r4
ldr r0, [r4]
movs.n r3, #0
str r3, [r4]
#else
ldr r0, [r2, #_thread_offset_to_basepri]
movs r3, #0
str r3, [r2, #_thread_offset_to_basepri]
#endif
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* BASEPRI not available, previous interrupt disable state
* maps to PRIMASK.
*
* Only enable interrupts if value is 0, meaning interrupts
* were enabled before irq_lock was called.
*/
cmp r0, #0
bne _thread_irq_disabled
cpsie i
_thread_irq_disabled:
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
push {r2,lr}
mov r0, r2
bl z_arm_configure_dynamic_mpu_regions
pop {r2,r3}
mov lr, r3
#endif
#ifdef CONFIG_USERSPACE
/* restore mode */
ldr r3, =_thread_offset_to_mode
adds r3, r2, r3
ldr r0, [r3]
mrs r3, CONTROL
movs.n r1, #1
bics r3, r1
orrs r3, r0
msr CONTROL, r3
/* ISB is not strictly necessary here (stack pointer is not being
* touched), but it's recommended to avoid executing pre-fetched
* instructions with the previous privilege.
*/
isb
#endif
ldr r4, =_thread_offset_to_callee_saved
adds r0, r2, r4
@ -149,6 +253,9 @@ out_fp_endif:
subs r0, #36
ldmia r0!, {r4-r7}
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* restore BASEPRI for the incoming thread */
msr BASEPRI, r0
#ifdef CONFIG_FPU_SHARING
/* Assess whether switched-in thread had been using the FP registers. */
tst lr, #_EXC_RETURN_FTYPE_Msk
@ -178,6 +285,30 @@ in_fp_endif:
isb
#endif
#if defined(CONFIG_MPU_STACK_GUARD) || defined(CONFIG_USERSPACE)
/* Re-program dynamic memory map */
push {r2,lr}
mov r0, r2 /* arch_current_thread() thread */
bl z_arm_configure_dynamic_mpu_regions
pop {r2,lr}
#endif
#ifdef CONFIG_USERSPACE
/* restore mode */
ldr r0, [r2, #_thread_offset_to_mode]
mrs r3, CONTROL
bic r3, #1
orr r3, r0
msr CONTROL, r3
/* ISB is not strictly necessary here (stack pointer is not being
* touched), but it's recommended to avoid executing pre-fetched
* instructions with the previous privilege.
*/
isb
#endif
/* load callee-saved + psp from thread */
add r0, r2, #_thread_offset_to_callee_saved
ldmia r0, {r4-r11, ip}
@ -300,6 +431,7 @@ _stack_frame_endif:
/* exception return is done in z_arm_int_exit() */
ldr r0, =z_arm_int_exit
bx r0
#endif
_oops:
@ -315,6 +447,7 @@ _oops:
mov r1, sp /* pointer to _callee_saved_t */
#endif /* CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
#endif /* CONFIG_EXTRA_EXCEPTION_INFO */
mov r2, lr /* EXC_RETURN */
bl z_do_kernel_oops
/* return from SVC exception is done here */
#if defined(CONFIG_EXTRA_EXCEPTION_INFO)

View file

@ -231,8 +231,8 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
{
/* Set up privileged stack before entering user mode */
_current->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(_current->stack_obj);
arch_current_thread()->arch.priv_stack_start =
(uint32_t)z_priv_stack_find(arch_current_thread()->stack_obj);
#if defined(CONFIG_MPU_STACK_GUARD)
#if defined(CONFIG_THREAD_STACK_INFO)
/* We're dropping to user mode which means the guard area is no
@ -241,13 +241,13 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
* which accounted for memory borrowed from the thread stack.
*/
#if FP_GUARD_EXTRA_SIZE > 0
if ((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) {
_current->stack_info.start -= FP_GUARD_EXTRA_SIZE;
_current->stack_info.size += FP_GUARD_EXTRA_SIZE;
if ((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) {
arch_current_thread()->stack_info.start -= FP_GUARD_EXTRA_SIZE;
arch_current_thread()->stack_info.size += FP_GUARD_EXTRA_SIZE;
}
#endif /* FP_GUARD_EXTRA_SIZE */
_current->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
_current->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->stack_info.start -= MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->stack_info.size += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_THREAD_STACK_INFO */
/* Stack guard area reserved at the bottom of the thread's
@ -255,18 +255,18 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
* buffer area accordingly.
*/
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
_current->arch.priv_stack_start +=
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
arch_current_thread()->arch.priv_stack_start +=
((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
_current->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
arch_current_thread()->arch.priv_stack_start += MPU_GUARD_ALIGN_AND_SIZE;
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#endif /* CONFIG_MPU_STACK_GUARD */
z_arm_userspace_enter(user_entry, p1, p2, p3,
(uint32_t)_current->stack_info.start,
_current->stack_info.size -
_current->stack_info.delta);
(uint32_t)arch_current_thread()->stack_info.start,
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
CODE_UNREACHABLE;
}
@ -379,7 +379,7 @@ void configure_builtin_stack_guard(struct k_thread *thread)
uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp)
{
#if defined(CONFIG_MULTITHREADING)
const struct k_thread *thread = _current;
const struct k_thread *thread = arch_current_thread();
if (thread == NULL) {
return 0;
@ -389,7 +389,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
#if (defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)) && \
defined(CONFIG_MPU_STACK_GUARD)
uint32_t guard_len =
((_current->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
((arch_current_thread()->arch.mode & Z_ARM_MODE_MPU_GUARD_FLOAT_Msk) != 0) ?
MPU_GUARD_ALIGN_AND_SIZE_FLOAT : MPU_GUARD_ALIGN_AND_SIZE;
#else
/* If MPU_STACK_GUARD is not enabled, the guard length is
@ -452,7 +452,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
int arch_float_disable(struct k_thread *thread)
{
if (thread != _current) {
if (thread != arch_current_thread()) {
return -EINVAL;
}
@ -522,7 +522,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
{
z_arm_prepare_switch_to_main();
_current = main_thread;
arch_current_thread_set(main_thread);
#if defined(CONFIG_THREAD_LOCAL_STORAGE)
/* On Cortex-M, TLS uses a global variable as pointer to
@ -586,9 +586,9 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
"mov r3, #0\n"
"ldr r4, =z_thread_entry\n"
"bx r4\n" /* We dont intend to return, so there is no need to link. */
: "+r" (_main)
: "r" (stack_ptr)
: "r0", "r1", "r2", "r3", "r4", "ip", "lr");
:
: "r" (_main), "r" (stack_ptr)
: "r0", "r1", "r2", "r3", "r4", "ip", "lr", "memory");
CODE_UNREACHABLE;
}

View file

@ -27,7 +27,7 @@ void z_impl_k_thread_abort(k_tid_t thread)
{
SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_thread, abort, thread);
if (_current == thread) {
if (arch_current_thread() == thread) {
if (arch_is_in_isr()) {
/* ARM is unlike most arches in that this is true
* even for non-peripheral interrupts, even though

View file

@ -28,8 +28,7 @@
*/
static inline uint64_t z_arm_dwt_freq_get(void)
{
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) || \
defined(CONFIG_SOC_SERIES_IMXRT6XX)
#if defined(CONFIG_CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK)
/*
* DWT frequency is taken directly from the
* System Core clock (CPU) frequency, if the
@ -104,7 +103,7 @@ timing_t arch_timing_counter_get(void)
uint64_t arch_timing_cycles_get(volatile timing_t *const start,
volatile timing_t *const end)
{
return (*end - *start);
return ((uint32_t)*end - (uint32_t)*start);
}
uint64_t arch_timing_freq_get(void)

View file

@ -101,8 +101,9 @@ void z_arm_fatal_error(unsigned int reason, const struct arch_esf *esf)
*
* @param esf exception frame
* @param callee_regs Callee-saved registers (R4-R11)
* @param exc_return EXC_RETURN value present in LR after exception entry.
*/
void z_do_kernel_oops(const struct arch_esf *esf, _callee_saved_t *callee_regs)
void z_do_kernel_oops(const struct arch_esf *esf, _callee_saved_t *callee_regs, uint32_t exc_return)
{
#if !(defined(CONFIG_EXTRA_EXCEPTION_INFO) && defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE))
ARG_UNUSED(callee_regs);
@ -110,6 +111,8 @@ void z_do_kernel_oops(const struct arch_esf *esf, _callee_saved_t *callee_regs)
/* Stacked R0 holds the exception reason. */
unsigned int reason = esf->basic.r0;
z_arm_set_fault_sp(esf, exc_return);
#if defined(CONFIG_USERSPACE)
if (z_arm_preempted_thread_in_user_mode(esf)) {
/*

View file

@ -37,6 +37,13 @@ BUILD_ASSERT((DT_FOREACH_STATUS_OKAY_NODE_VARGS(
NODE_HAS_PROP_AND_OR, zephyr_memory_region_mpu) false) == false,
"`zephyr,memory-region-mpu` was deprecated in favor of `zephyr,memory-attr`");
#define NULL_PAGE_DETECT_NODE_FINDER(node_id, prop) \
(DT_NODE_HAS_PROP(node_id, prop) && (DT_REG_ADDR(node_id) == 0) && \
(DT_REG_SIZE(node_id) >= CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE)) ||
#define DT_NULL_PAGE_DETECT_NODE_EXIST \
(DT_FOREACH_STATUS_OKAY_NODE_VARGS(NULL_PAGE_DETECT_NODE_FINDER, zephyr_memory_attr) false)
/*
* Global status variable holding the number of HW MPU region indices, which
* have been reserved by the MPU driver to program the static (fixed) memory
@ -470,7 +477,9 @@ int z_arm_mpu_init(void)
*/
#if defined(CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU)
#if (defined(CONFIG_ARMV8_M_BASELINE) || defined(CONFIG_ARMV8_M_MAINLINE)) && \
(CONFIG_FLASH_BASE_ADDRESS > CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE)
(CONFIG_FLASH_BASE_ADDRESS > CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE) && \
(!DT_NULL_PAGE_DETECT_NODE_EXIST)
#pragma message "Null-Pointer exception detection cannot be configured on un-mapped flash areas"
#else
const struct z_arm_mpu_partition unmap_region = {

View file

@ -83,17 +83,21 @@ GEN_OFFSET_SYM(_thread_stack_info_t, start);
*/
#if defined(CONFIG_PM_S2RAM)
GEN_OFFSET_SYM(_cpu_context_t, msp);
GEN_OFFSET_SYM(_cpu_context_t, msplim);
GEN_OFFSET_SYM(_cpu_context_t, psp);
GEN_OFFSET_SYM(_cpu_context_t, psplim);
GEN_OFFSET_SYM(_cpu_context_t, apsr);
GEN_OFFSET_SYM(_cpu_context_t, ipsr);
GEN_OFFSET_SYM(_cpu_context_t, epsr);
GEN_OFFSET_SYM(_cpu_context_t, primask);
GEN_OFFSET_SYM(_cpu_context_t, control);
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
/* Registers present only on ARMv7-M and ARMv8-M Mainline */
GEN_OFFSET_SYM(_cpu_context_t, faultmask);
GEN_OFFSET_SYM(_cpu_context_t, basepri);
GEN_OFFSET_SYM(_cpu_context_t, control);
#endif /* CONFIG_ARMV7_M_ARMV8_M_MAINLINE */
#if defined(CONFIG_CPU_CORTEX_M_HAS_SPLIM)
/* Registers present only on certain ARMv8-M implementations */
GEN_OFFSET_SYM(_cpu_context_t, msplim);
GEN_OFFSET_SYM(_cpu_context_t, psplim);
#endif /* CONFIG_CPU_CORTEX_M_HAS_SPLIM */
#endif /* CONFIG_PM_S2RAM */
#endif /* _ARM_OFFSETS_INC_ */

View file

@ -43,6 +43,15 @@ static ALWAYS_INLINE bool arch_is_in_nested_exception(const struct arch_esf *esf
return (arch_curr_cpu()->arch.exc_depth > 1U) ? (true) : (false);
}
/**
* @brief No current implementation where core dump is not supported
*
* @param esf exception frame
* @param exc_return EXC_RETURN value present in LR after exception entry.
*/
static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_t exc_return)
{}
#if defined(CONFIG_USERSPACE)
/*
* This function is used by privileged code to determine if the thread

View file

@ -20,6 +20,8 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_A_R_KERNEL_ARCH_FUNC_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_A_R_KERNEL_ARCH_FUNC_H_
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -28,6 +30,9 @@ extern "C" {
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
#ifndef CONFIG_USE_SWITCH

View file

@ -39,6 +39,54 @@ extern volatile irq_offload_routine_t offload_routine;
*/
#define AIRCR_VECT_KEY_PERMIT_WRITE 0x05FAUL
/* Exception Return (EXC_RETURN) is provided in LR upon exception entry.
* It is used to perform an exception return and to detect possible state
* transition upon exception.
*/
/* Prefix. Indicates that this is an EXC_RETURN value.
* This field reads as 0b11111111.
*/
#define EXC_RETURN_INDICATOR_PREFIX (0xFF << 24)
/* bit[0]: Exception Secure. The security domain the exception was taken to. */
#define EXC_RETURN_EXCEPTION_SECURE_Pos 0
#define EXC_RETURN_EXCEPTION_SECURE_Msk \
BIT(EXC_RETURN_EXCEPTION_SECURE_Pos)
#define EXC_RETURN_EXCEPTION_SECURE_Non_Secure 0
#define EXC_RETURN_EXCEPTION_SECURE_Secure EXC_RETURN_EXCEPTION_SECURE_Msk
/* bit[2]: Stack Pointer selection. */
#define EXC_RETURN_SPSEL_Pos 2
#define EXC_RETURN_SPSEL_Msk BIT(EXC_RETURN_SPSEL_Pos)
#define EXC_RETURN_SPSEL_MAIN 0
#define EXC_RETURN_SPSEL_PROCESS EXC_RETURN_SPSEL_Msk
/* bit[3]: Mode. Indicates the Mode that was stacked from. */
#define EXC_RETURN_MODE_Pos 3
#define EXC_RETURN_MODE_Msk BIT(EXC_RETURN_MODE_Pos)
#define EXC_RETURN_MODE_HANDLER 0
#define EXC_RETURN_MODE_THREAD EXC_RETURN_MODE_Msk
/* bit[4]: Stack frame type. Indicates whether the stack frame is a standard
* integer only stack frame or an extended floating-point stack frame.
*/
#define EXC_RETURN_STACK_FRAME_TYPE_Pos 4
#define EXC_RETURN_STACK_FRAME_TYPE_Msk BIT(EXC_RETURN_STACK_FRAME_TYPE_Pos)
#define EXC_RETURN_STACK_FRAME_TYPE_EXTENDED 0
#define EXC_RETURN_STACK_FRAME_TYPE_STANDARD EXC_RETURN_STACK_FRAME_TYPE_Msk
/* bit[5]: Default callee register stacking. Indicates whether the default
* stacking rules apply, or whether the callee registers are already on the
* stack.
*/
#define EXC_RETURN_CALLEE_STACK_Pos 5
#define EXC_RETURN_CALLEE_STACK_Msk BIT(EXC_RETURN_CALLEE_STACK_Pos)
#define EXC_RETURN_CALLEE_STACK_SKIPPED 0
#define EXC_RETURN_CALLEE_STACK_DEFAULT EXC_RETURN_CALLEE_STACK_Msk
/* bit[6]: Secure or Non-secure stack. Indicates whether a Secure or
* Non-secure stack is used to restore stack frame on exception return.
*/
#define EXC_RETURN_RETURN_STACK_Pos 6
#define EXC_RETURN_RETURN_STACK_Msk BIT(EXC_RETURN_RETURN_STACK_Pos)
#define EXC_RETURN_RETURN_STACK_Non_Secure 0
#define EXC_RETURN_RETURN_STACK_Secure EXC_RETURN_RETURN_STACK_Msk
/*
* The current executing vector is found in the IPSR register. All
* IRQs and system exceptions are considered as interrupt context.
@ -184,6 +232,43 @@ static ALWAYS_INLINE void z_arm_clear_faults(void)
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
}
/**
* @brief Set z_arm_coredump_fault_sp to stack pointer value expected by GDB
*
* @param esf exception frame
* @param exc_return EXC_RETURN value present in LR after exception entry.
*/
static ALWAYS_INLINE void z_arm_set_fault_sp(const struct arch_esf *esf, uint32_t exc_return)
{
#ifdef CONFIG_DEBUG_COREDUMP
z_arm_coredump_fault_sp = POINTER_TO_UINT(esf);
#if defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE) || defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
/* Gdb expects a stack pointer that does not include the exception stack frame in order to
* unwind. So adjust the stack pointer accordingly.
*/
z_arm_coredump_fault_sp += sizeof(esf->basic);
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
/* Assess whether thread had been using the FP registers and add size of additional
* registers if necessary
*/
if ((exc_return & EXC_RETURN_STACK_FRAME_TYPE_STANDARD) ==
EXC_RETURN_STACK_FRAME_TYPE_EXTENDED) {
z_arm_coredump_fault_sp += sizeof(esf->fpu);
}
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#if !(defined(CONFIG_ARMV8_M_MAINLINE) || defined(CONFIG_ARMV8_M_BASELINE))
if ((esf->basic.xpsr & SCB_CCR_STKALIGN_Msk) == SCB_CCR_STKALIGN_Msk) {
/* Adjust stack alignment after PSR bit[9] detected */
z_arm_coredump_fault_sp |= 0x4;
}
#endif /* !CONFIG_ARMV8_M_MAINLINE */
#endif /* CONFIG_ARMV7_M_ARMV8_M_MAINLINE || CONFIG_ARMV6_M_ARMV8_M_BASELINE */
#endif /* CONFIG_DEBUG_COREDUMP */
}
/**
* @brief Assess whether a debug monitor event should be treated as an error
*

View file

@ -20,6 +20,8 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_KERNEL_ARCH_FUNC_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_KERNEL_ARCH_FUNC_H_
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -53,6 +55,10 @@ static ALWAYS_INLINE void arch_kernel_init(void)
*/
z_arm_configure_static_mpu_regions();
#endif /* CONFIG_ARM_MPU */
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -727,7 +727,7 @@ static int configure_dynamic_mpu_regions(struct k_thread *thread)
*/
thread->arch.region_num = (uint8_t)region_num;
if (thread == _current) {
if (thread == arch_current_thread()) {
ret = flush_dynamic_regions_to_mpu(dyn_regions, region_num);
}
@ -795,7 +795,7 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
ret = configure_dynamic_mpu_regions(thread);
#ifdef CONFIG_SMP
if (ret == 0 && thread != _current) {
if (ret == 0 && thread != arch_current_thread()) {
/* the thread could be running on another CPU right now */
z_arm64_mem_cfg_ipi();
}
@ -810,7 +810,7 @@ int arch_mem_domain_thread_remove(struct k_thread *thread)
ret = configure_dynamic_mpu_regions(thread);
#ifdef CONFIG_SMP
if (ret == 0 && thread != _current) {
if (ret == 0 && thread != arch_current_thread()) {
/* the thread could be running on another CPU right now */
z_arm64_mem_cfg_ipi();
}

View file

@ -306,8 +306,9 @@ static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, u
}
}
#ifdef CONFIG_USERSPACE
else if ((_current->base.user_options & K_USER) != 0 && GET_ESR_EC(esr) == 0x24) {
sp_limit = (uint64_t)_current->stack_info.start;
else if ((arch_current_thread()->base.user_options & K_USER) != 0 &&
GET_ESR_EC(esr) == 0x24) {
sp_limit = (uint64_t)arch_current_thread()->stack_info.start;
guard_start = sp_limit - Z_ARM64_STACK_GUARD_SIZE;
sp = esf->sp;
if (sp <= sp_limit || (guard_start <= far && far <= sp_limit)) {
@ -434,7 +435,7 @@ void z_arm64_do_kernel_oops(struct arch_esf *esf)
* User mode is only allowed to induce oopses and stack check
* failures via software-triggered system fatal exceptions.
*/
if (((_current->base.user_options & K_USER) != 0) &&
if (((arch_current_thread()->base.user_options & K_USER) != 0) &&
reason != K_ERR_STACK_CHK_FAIL) {
reason = K_ERR_KERNEL_OOPS;
}

View file

@ -36,7 +36,7 @@ static void DBG(char *msg, struct k_thread *th)
strcpy(buf, "CPU# exc# ");
buf[3] = '0' + _current_cpu->id;
buf[8] = '0' + arch_exception_depth();
strcat(buf, _current->name);
strcat(buf, arch_current_thread()->name);
strcat(buf, ": ");
strcat(buf, msg);
strcat(buf, " ");
@ -125,7 +125,7 @@ static void flush_owned_fpu(struct k_thread *thread)
* replace it, and this avoids a deadlock where
* two CPUs want to pull each other's FPU context.
*/
if (thread == _current) {
if (thread == arch_current_thread()) {
arch_flush_local_fpu();
while (atomic_ptr_get(&_kernel.cpus[i].arch.fpu_owner) == thread) {
barrier_dsync_fence_full();
@ -260,15 +260,15 @@ void z_arm64_fpu_trap(struct arch_esf *esf)
* Make sure the FPU context we need isn't live on another CPU.
* The current CPU's FPU context is NULL at this point.
*/
flush_owned_fpu(_current);
flush_owned_fpu(arch_current_thread());
#endif
/* become new owner */
atomic_ptr_set(&_current_cpu->arch.fpu_owner, _current);
atomic_ptr_set(&_current_cpu->arch.fpu_owner, arch_current_thread());
/* restore our content */
z_arm64_fpu_restore(&_current->arch.saved_fp_context);
DBG("restore", _current);
z_arm64_fpu_restore(&arch_current_thread()->arch.saved_fp_context);
DBG("restore", arch_current_thread());
}
/*
@ -287,7 +287,7 @@ static void fpu_access_update(unsigned int exc_update_level)
if (arch_exception_depth() == exc_update_level) {
/* We're about to execute non-exception code */
if (atomic_ptr_get(&_current_cpu->arch.fpu_owner) == _current) {
if (atomic_ptr_get(&_current_cpu->arch.fpu_owner) == arch_current_thread()) {
/* turn on FPU access */
write_cpacr_el1(cpacr | CPACR_EL1_FPEN_NOTRAP);
} else {

View file

@ -1309,7 +1309,7 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
}
thread->arch.ptables = domain_ptables;
if (thread == _current) {
if (thread == arch_current_thread()) {
z_arm64_swap_ptables(thread);
} else {
#ifdef CONFIG_SMP

View file

@ -23,6 +23,7 @@
#include <zephyr/drivers/interrupt_controller/gic.h>
#include <zephyr/drivers/pm_cpu_ops.h>
#include <zephyr/arch/arch_interface.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/sys/barrier.h>
#include <zephyr/irq.h>
#include "boot.h"
@ -163,6 +164,10 @@ void arch_secondary_cpu_init(int cpu_num)
#endif
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
fn = arm64_cpu_boot_params.fn;
arg = arm64_cpu_boot_params.arg;
barrier_dsync_fence_full();
@ -235,7 +240,7 @@ void mem_cfg_ipi_handler(const void *unused)
* This is a no-op if the page table is already the right one.
* Lock irq to prevent the interrupt during mem region switch.
*/
z_arm64_swap_mem_domains(_current);
z_arm64_swap_mem_domains(arch_current_thread());
arch_irq_unlock(key);
}

View file

@ -159,15 +159,15 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
uint64_t tmpreg;
/* Map the thread stack */
z_arm64_thread_mem_domains_init(_current);
z_arm64_thread_mem_domains_init(arch_current_thread());
/* Top of the user stack area */
stack_el0 = Z_STACK_PTR_ALIGN(_current->stack_info.start +
_current->stack_info.size -
_current->stack_info.delta);
stack_el0 = Z_STACK_PTR_ALIGN(arch_current_thread()->stack_info.start +
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
/* Top of the privileged non-user-accessible part of the stack */
stack_el1 = (uintptr_t)(_current->stack_obj + ARCH_THREAD_STACK_RESERVED);
stack_el1 = (uintptr_t)(arch_current_thread()->stack_obj + ARCH_THREAD_STACK_RESERVED);
register void *x0 __asm__("x0") = user_entry;
register void *x1 __asm__("x1") = p1;

View file

@ -22,6 +22,8 @@
#include <kernel_arch_data.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -35,6 +37,10 @@ static ALWAYS_INLINE void arch_kernel_init(void)
#ifdef CONFIG_XEN
xen_enlighten_init();
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static inline void arch_switch(void *switch_to, void **switched_from)

View file

@ -9,6 +9,7 @@
SECTION_DATA_PROLOGUE(.ramfunc,,)
{
__ramfunc_region_start = .;
MPU_ALIGN(__ramfunc_size);
__ramfunc_start = .;
*(.ramfunc)

View file

@ -70,6 +70,7 @@ GTEXT(_Fault)
GTEXT(_k_neg_eagain)
GTEXT(z_thread_mark_switched_in)
GTEXT(z_thread_mark_switched_out)
/* exports */
GTEXT(__isr_vec)
@ -209,6 +210,9 @@ on_thread_stack:
#endif /* CONFIG_PREEMPT_ENABLED */
reschedule:
#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
jal z_thread_mark_switched_out
#endif
/*
* Check if the current thread is the same as the thread on the ready Q. If
* so, do not reschedule.

View file

@ -19,6 +19,8 @@
#include <kernel_arch_data.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -26,6 +28,9 @@ extern "C" {
#ifndef _ASMLANGUAGE
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -22,6 +22,8 @@
#include <kernel_arch_data.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -30,6 +32,9 @@ extern "C" {
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -23,7 +23,7 @@
int arch_swap(unsigned int key)
{
/*
* struct k_thread * _current is the currently running thread
* struct k_thread * arch_current_thread() is the currently running thread
* struct k_thread * _kernel.ready_q.cache contains the next thread to
* run (cannot be NULL)
*
@ -34,8 +34,8 @@ int arch_swap(unsigned int key)
#if CONFIG_INSTRUMENT_THREAD_SWITCHING
z_thread_mark_switched_out();
#endif
_current->callee_saved.key = key;
_current->callee_saved.retval = -EAGAIN;
arch_current_thread()->callee_saved.key = key;
arch_current_thread()->callee_saved.retval = -EAGAIN;
/* retval may be modified with a call to
* arch_thread_return_value_set()
@ -47,10 +47,10 @@ int arch_swap(unsigned int key)
posix_thread_status_t *this_thread_ptr =
(posix_thread_status_t *)
_current->callee_saved.thread_status;
arch_current_thread()->callee_saved.thread_status;
_current = _kernel.ready_q.cache;
arch_current_thread_set(_kernel.ready_q.cache);
#if CONFIG_INSTRUMENT_THREAD_SWITCHING
z_thread_mark_switched_in();
#endif
@ -66,9 +66,9 @@ int arch_swap(unsigned int key)
/* When we continue, _kernel->current points back to this thread */
irq_unlock(_current->callee_saved.key);
irq_unlock(arch_current_thread()->callee_saved.key);
return _current->callee_saved.retval;
return arch_current_thread()->callee_saved.retval;
}
@ -94,7 +94,7 @@ void arch_switch_to_main_thread(struct k_thread *main_thread, char *stack_ptr,
z_thread_mark_switched_out();
#endif
_current = _kernel.ready_q.cache;
arch_current_thread_set(_kernel.ready_q.cache);
#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
z_thread_mark_switched_in();

View file

@ -96,6 +96,25 @@ void posix_arch_thread_entry(void *pa_thread_status)
z_thread_entry(ptr->entry_point, ptr->arg1, ptr->arg2, ptr->arg3);
}
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
int arch_float_disable(struct k_thread *thread)
{
ARG_UNUSED(thread);
/* Posix always has FPU enabled so cannot be disabled */
return -ENOTSUP;
}
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
ARG_UNUSED(thread);
ARG_UNUSED(options);
/* Posix always has FPU enabled so nothing to do here */
return 0;
}
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
#if defined(CONFIG_ARCH_HAS_THREAD_ABORT)
void z_impl_k_thread_abort(k_tid_t thread)
{
@ -112,7 +131,7 @@ void z_impl_k_thread_abort(k_tid_t thread)
key = irq_lock();
if (_current == thread) {
if (arch_current_thread() == thread) {
if (tstatus->aborted == 0) { /* LCOV_EXCL_BR_LINE */
tstatus->aborted = 1;
} else {

View file

@ -12,6 +12,8 @@
#include <kernel_arch_data.h>
#include <zephyr/platform/hooks.h>
#ifndef _ASMLANGUAGE
#ifdef __cplusplus
@ -20,7 +22,9 @@ extern "C" {
static inline void arch_kernel_init(void)
{
/* Nothing to be done */
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -1,4 +1,5 @@
# Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com>
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
menu "RISCV Options"
@ -27,6 +28,16 @@ config RISCV_GP
global pointer at program start or earlier than any instruction
using GP relative addressing.
config RISCV_CURRENT_VIA_GP
bool "Store current thread into the global pointer (GP) register"
depends on !RISCV_GP && !USERSPACE
depends on MP_MAX_NUM_CPUS > 1
select ARCH_HAS_CUSTOM_CURRENT_IMPL
help
Store the current thread's pointer into the global pointer (GP) register.
When is enabled, calls to `arch_current_thread()` & `k_sched_current_thread_query()` will
be reduced to a single register read.
config RISCV_ALWAYS_SWITCH_THROUGH_ECALL
bool "Do not use mret outside a trap handler context"
depends on MULTITHREADING
@ -37,6 +48,31 @@ config RISCV_ALWAYS_SWITCH_THROUGH_ECALL
and most people should say n here to minimize context switching
overhead.
choice RISCV_SMP_IPI_IMPL
prompt "RISC-V SMP IPI implementation"
depends on SMP
default RISCV_SMP_IPI_CLINT if DT_HAS_SIFIVE_CLINT0_ENABLED
default RISCV_SMP_IPI_CUSTOM
config RISCV_SMP_IPI_CLINT
bool "CLINT-based IPI"
depends on DT_HAS_SIFIVE_CLINT0_ENABLED
help
Use CLINT-based IPI implementation.
config RISCV_SMP_IPI_CUSTOM
bool "Custom IPI implementation"
help
Allow custom IPI implementation.
When this is selected, the following functions must be provided:
- arch_sched_directed_ipi()
- arch_flush_fpu_ipi() if CONFIG_FPU_SHARING
- arch_spin_relax() if CONFIG_FPU_SHARING
- arch_smp_init()
endchoice # RISCV_SMP_IPI_IMPL
menu "RISCV Processor Options"
config INCLUDE_RESET_VECTOR
@ -311,7 +347,6 @@ endif #RISCV_PMP
config PMP_STACK_GUARD
def_bool y
depends on MULTITHREADING
depends on HW_STACK_PROTECTION
config PMP_STACK_GUARD_MIN_SIZE
@ -350,6 +385,15 @@ config NULL_POINTER_EXCEPTION_REGION_SIZE
endif # NULL_POINTER_EXCEPTION_DETECTION_PMP
config RISCV_IMPRECISE_FPU_STATE_TRACKING
bool "Imprecise implementation of FPU state tracking"
depends on FPU
help
According to the RISC-V Instruction Set Manual: Volume II, Version 20240411
(Section 3.1.6.6), some implementations may choose to track the dirtiness of
the floating-point register state imprecisely by reporting the state to be
dirty even when it has not been modified. This option reflects that.
endmenu
config MAIN_STACK_SIZE

View file

@ -17,6 +17,12 @@ if ((CONFIG_MP_MAX_NUM_CPUS GREATER 1) OR (CONFIG_SMP))
zephyr_library_sources(smp.c)
endif ()
if (CONFIG_SMP)
zephyr_library_sources(ipi.c)
zephyr_library_sources_ifdef(CONFIG_RISCV_SMP_IPI_CLINT ipi_clint.c)
endif()
zephyr_library_sources_ifdef(CONFIG_FPU_SHARING fpu.c fpu.S)
zephyr_library_sources_ifdef(CONFIG_DEBUG_COREDUMP coredump.c)
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)

View file

@ -158,33 +158,43 @@ static bool bad_stack_pointer(struct arch_esf *esf)
uintptr_t sp = (uintptr_t)esf + sizeof(struct arch_esf);
#ifdef CONFIG_USERSPACE
if (_current->arch.priv_stack_start != 0 &&
sp >= _current->arch.priv_stack_start &&
sp < _current->arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE) {
if (arch_current_thread()->arch.priv_stack_start != 0 &&
sp >= arch_current_thread()->arch.priv_stack_start &&
sp < arch_current_thread()->arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE) {
return true;
}
if (z_stack_is_user_capable(_current->stack_obj) &&
sp >= _current->stack_info.start - K_THREAD_STACK_RESERVED &&
sp < _current->stack_info.start - K_THREAD_STACK_RESERVED
if (z_stack_is_user_capable(arch_current_thread()->stack_obj) &&
sp >= arch_current_thread()->stack_info.start - K_THREAD_STACK_RESERVED &&
sp < arch_current_thread()->stack_info.start - K_THREAD_STACK_RESERVED
+ Z_RISCV_STACK_GUARD_SIZE) {
return true;
}
#endif /* CONFIG_USERSPACE */
if (sp >= _current->stack_info.start - K_KERNEL_STACK_RESERVED &&
sp < _current->stack_info.start - K_KERNEL_STACK_RESERVED
#if CONFIG_MULTITHREADING
if (sp >= arch_current_thread()->stack_info.start - K_KERNEL_STACK_RESERVED &&
sp < arch_current_thread()->stack_info.start - K_KERNEL_STACK_RESERVED
+ Z_RISCV_STACK_GUARD_SIZE) {
return true;
}
#else
uintptr_t isr_stack = (uintptr_t)z_interrupt_stacks;
uintptr_t main_stack = (uintptr_t)z_main_stack;
if ((sp >= isr_stack && sp < isr_stack + Z_RISCV_STACK_GUARD_SIZE) ||
(sp >= main_stack && sp < main_stack + Z_RISCV_STACK_GUARD_SIZE)) {
return true;
}
#endif /* CONFIG_MULTITHREADING */
#endif /* CONFIG_PMP_STACK_GUARD */
#ifdef CONFIG_USERSPACE
if ((esf->mstatus & MSTATUS_MPP) == 0 &&
(esf->sp < _current->stack_info.start ||
esf->sp > _current->stack_info.start +
_current->stack_info.size -
_current->stack_info.delta)) {
(esf->sp < arch_current_thread()->stack_info.start ||
esf->sp > arch_current_thread()->stack_info.start +
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta)) {
/* user stack pointer moved outside of its allowed stack */
return true;
}
@ -236,9 +246,9 @@ FUNC_NORETURN void arch_syscall_oops(void *ssf_ptr)
void z_impl_user_fault(unsigned int reason)
{
struct arch_esf *oops_esf = _current->syscall_frame;
struct arch_esf *oops_esf = arch_current_thread()->syscall_frame;
if (((_current->base.user_options & K_USER) != 0) &&
if (((arch_current_thread()->base.user_options & K_USER) != 0) &&
reason != K_ERR_STACK_CHK_FAIL) {
reason = K_ERR_KERNEL_OOPS;
}

View file

@ -36,8 +36,8 @@ static void DBG(char *msg, struct k_thread *th)
strcpy(buf, "CPU# exc# ");
buf[3] = '0' + _current_cpu->id;
buf[8] = '0' + _current->arch.exception_depth;
strcat(buf, _current->name);
buf[8] = '0' + arch_current_thread()->arch.exception_depth;
strcat(buf, arch_current_thread()->name);
strcat(buf, ": ");
strcat(buf, msg);
strcat(buf, " ");
@ -82,12 +82,12 @@ static void z_riscv_fpu_load(void)
"must be called with FPU access disabled");
/* become new owner */
atomic_ptr_set(&_current_cpu->arch.fpu_owner, _current);
atomic_ptr_set(&_current_cpu->arch.fpu_owner, arch_current_thread());
/* restore our content */
csr_set(mstatus, MSTATUS_FS_INIT);
z_riscv_fpu_restore(&_current->arch.saved_fp_context);
DBG("restore", _current);
z_riscv_fpu_restore(&arch_current_thread()->arch.saved_fp_context);
DBG("restore", arch_current_thread());
}
/*
@ -168,7 +168,7 @@ static void flush_owned_fpu(struct k_thread *thread)
* replace it, and this avoids a deadlock where
* two CPUs want to pull each other's FPU context.
*/
if (thread == _current) {
if (thread == arch_current_thread()) {
z_riscv_fpu_disable();
arch_flush_local_fpu();
do {
@ -213,7 +213,7 @@ void z_riscv_fpu_trap(struct arch_esf *esf)
/* save current owner's content if any */
arch_flush_local_fpu();
if (_current->arch.exception_depth > 0) {
if (arch_current_thread()->arch.exception_depth > 0) {
/*
* We were already in exception when the FPU access trapped.
* We give it access and prevent any further IRQ recursion
@ -233,7 +233,7 @@ void z_riscv_fpu_trap(struct arch_esf *esf)
* Make sure the FPU context we need isn't live on another CPU.
* The current CPU's FPU context is NULL at this point.
*/
flush_owned_fpu(_current);
flush_owned_fpu(arch_current_thread());
#endif
/* make it accessible and clean to the returning context */
@ -256,13 +256,13 @@ static bool fpu_access_allowed(unsigned int exc_update_level)
__ASSERT((csr_read(mstatus) & MSTATUS_IEN) == 0,
"must be called with IRQs disabled");
if (_current->arch.exception_depth == exc_update_level) {
if (arch_current_thread()->arch.exception_depth == exc_update_level) {
/* We're about to execute non-exception code */
if (_current_cpu->arch.fpu_owner == _current) {
if (_current_cpu->arch.fpu_owner == arch_current_thread()) {
/* everything is already in place */
return true;
}
if (_current->arch.fpu_recently_used) {
if (arch_current_thread()->arch.fpu_recently_used) {
/*
* Before this thread was context-switched out,
* it made active use of the FPU, but someone else
@ -273,7 +273,7 @@ static bool fpu_access_allowed(unsigned int exc_update_level)
z_riscv_fpu_disable();
arch_flush_local_fpu();
#ifdef CONFIG_SMP
flush_owned_fpu(_current);
flush_owned_fpu(arch_current_thread());
#endif
z_riscv_fpu_load();
_current_cpu->arch.fpu_state = MSTATUS_FS_CLEAN;

14
arch/riscv/core/ipi.c Normal file
View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2021 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <ipi.h>
#include <zephyr/kernel.h>
void arch_sched_broadcast_ipi(void)
{
arch_sched_directed_ipi(IPI_ALL_CPUS_MASK);
}

View file

@ -0,0 +1,97 @@
/*
* Copyright (c) 2021 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <ipi.h>
#include <ksched.h>
#include <zephyr/kernel.h>
#define MSIP_BASE 0x2000000UL
#define MSIP(hartid) ((volatile uint32_t *)MSIP_BASE)[hartid]
static atomic_val_t cpu_pending_ipi[CONFIG_MP_MAX_NUM_CPUS];
#define IPI_SCHED 0
#define IPI_FPU_FLUSH 1
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
unsigned int key = arch_irq_lock();
unsigned int id = _current_cpu->id;
unsigned int num_cpus = arch_num_cpus();
for (unsigned int i = 0; i < num_cpus; i++) {
if ((i != id) && _kernel.cpus[i].arch.online && ((cpu_bitmap & BIT(i)) != 0)) {
atomic_set_bit(&cpu_pending_ipi[i], IPI_SCHED);
MSIP(_kernel.cpus[i].arch.hartid) = 1;
}
}
arch_irq_unlock(key);
}
#ifdef CONFIG_FPU_SHARING
void arch_flush_fpu_ipi(unsigned int cpu)
{
atomic_set_bit(&cpu_pending_ipi[cpu], IPI_FPU_FLUSH);
MSIP(_kernel.cpus[cpu].arch.hartid) = 1;
}
#endif /* CONFIG_FPU_SHARING */
static void sched_ipi_handler(const void *unused)
{
ARG_UNUSED(unused);
MSIP(csr_read(mhartid)) = 0;
atomic_val_t pending_ipi = atomic_clear(&cpu_pending_ipi[_current_cpu->id]);
if (pending_ipi & ATOMIC_MASK(IPI_SCHED)) {
z_sched_ipi();
}
#ifdef CONFIG_FPU_SHARING
if (pending_ipi & ATOMIC_MASK(IPI_FPU_FLUSH)) {
/* disable IRQs */
csr_clear(mstatus, MSTATUS_IEN);
/* perform the flush */
arch_flush_local_fpu();
/*
* No need to re-enable IRQs here as long as
* this remains the last case.
*/
}
#endif /* CONFIG_FPU_SHARING */
}
#ifdef CONFIG_FPU_SHARING
/*
* Make sure there is no pending FPU flush request for this CPU while
* waiting for a contended spinlock to become available. This prevents
* a deadlock when the lock we need is already taken by another CPU
* that also wants its FPU content to be reinstated while such content
* is still live in this CPU's FPU.
*/
void arch_spin_relax(void)
{
atomic_val_t *pending_ipi = &cpu_pending_ipi[_current_cpu->id];
if (atomic_test_and_clear_bit(pending_ipi, IPI_FPU_FLUSH)) {
/*
* We may not be in IRQ context here hence cannot use
* arch_flush_local_fpu() directly.
*/
arch_float_disable(_current_cpu->arch.fpu_owner);
}
}
#endif /* CONFIG_FPU_SHARING */
int arch_smp_init(void)
{
IRQ_CONNECT(RISCV_IRQ_MSOFT, 0, sched_ipi_handler, NULL, 0);
irq_enable(RISCV_IRQ_MSOFT);
return 0;
}

View file

@ -163,6 +163,14 @@ SECTION_FUNC(exception.entry, _isr_wrapper)
lr t0, ___cpu_t_current_OFFSET(s0)
lr tp, _thread_offset_to_tls(t0)
/* Make sure global pointer is sane */
#ifdef CONFIG_RISCV_GP
.option push
.option norelax
la gp, __global_pointer$
.option pop
#endif /* CONFIG_RISCV_GP */
/* Clear our per-thread usermode flag */
lui t0, %tprel_hi(is_user_mode)
add t0, t0, tp, %tprel_add(is_user_mode)
@ -289,7 +297,7 @@ is_fp: /* Process the FP trap and quickly return from exception */
mv a0, sp
tail z_riscv_fpu_trap
2:
no_fp: /* increment _current->arch.exception_depth */
no_fp: /* increment arch_current_thread()->arch.exception_depth */
lr t0, ___cpu_t_current_OFFSET(s0)
lb t1, _thread_offset_to_exception_depth(t0)
add t1, t1, 1
@ -348,7 +356,7 @@ no_fp: /* increment _current->arch.exception_depth */
li t1, RISCV_EXC_ECALLU
beq t0, t1, is_user_syscall
#ifdef CONFIG_PMP_STACK_GUARD
#if defined(CONFIG_PMP_STACK_GUARD) && defined(CONFIG_MULTITHREADING)
/*
* Determine if we come from user space. If so, reconfigure the PMP for
* kernel mode stack guard.
@ -389,7 +397,7 @@ is_kernel_syscall:
addi t0, t0, 4
sr t0, __struct_arch_esf_mepc_OFFSET(sp)
#ifdef CONFIG_PMP_STACK_GUARD
#if defined(CONFIG_PMP_STACK_GUARD) && defined(CONFIG_MULTITHREADING)
/* Re-activate PMP for m-mode */
li t1, MSTATUS_MPP
csrc mstatus, t1
@ -500,7 +508,7 @@ do_irq_offload:
#ifdef CONFIG_USERSPACE
is_user_syscall:
#ifdef CONFIG_PMP_STACK_GUARD
#if defined(CONFIG_PMP_STACK_GUARD) && defined(CONFIG_MULTITHREADING)
/*
* We came from userspace and need to reconfigure the
* PMP for kernel mode stack guard.
@ -570,7 +578,7 @@ valid_syscall_id:
is_interrupt:
#ifdef CONFIG_PMP_STACK_GUARD
#if defined(CONFIG_PMP_STACK_GUARD) && defined(CONFIG_MULTITHREADING)
#ifdef CONFIG_USERSPACE
/*
* If we came from userspace then we need to reconfigure the
@ -716,7 +724,7 @@ no_reschedule:
mv a0, sp
call z_riscv_fpu_exit_exc
/* decrement _current->arch.exception_depth */
/* decrement arch_current_thread()->arch.exception_depth */
lr t0, ___cpu_t_current_OFFSET(s0)
lb t1, _thread_offset_to_exception_depth(t0)
add t1, t1, -1
@ -740,7 +748,7 @@ fp_trap_exit:
and t0, t2, t1
bnez t0, 1f
#ifdef CONFIG_PMP_STACK_GUARD
#if defined(CONFIG_PMP_STACK_GUARD) && defined(CONFIG_MULTITHREADING)
/* Remove kernel stack guard and Reconfigure PMP for user mode */
lr a0, ___cpu_t_current_OFFSET(s0)
call z_riscv_pmp_usermode_enable

View file

@ -348,8 +348,8 @@ static unsigned int global_pmp_end_index;
*/
void z_riscv_pmp_init(void)
{
unsigned long pmp_addr[5];
unsigned long pmp_cfg[2];
unsigned long pmp_addr[CONFIG_PMP_SLOTS];
unsigned long pmp_cfg[CONFIG_PMP_SLOTS / PMPCFG_STRIDE];
unsigned int index = 0;
/* The read-only area is always there for every mode */
@ -370,6 +370,7 @@ void z_riscv_pmp_init(void)
#endif
#ifdef CONFIG_PMP_STACK_GUARD
#ifdef CONFIG_MULTITHREADING
/*
* Set the stack guard for this CPU's IRQ stack by making the bottom
* addresses inaccessible. This will never change so we do it here
@ -396,6 +397,21 @@ void z_riscv_pmp_init(void)
/* And forget about that last entry as we won't need it later */
index--;
#else
/* Without multithreading setup stack guards for IRQ and main stacks */
set_pmp_entry(&index, PMP_NONE | PMP_L,
(uintptr_t)z_interrupt_stacks,
Z_RISCV_STACK_GUARD_SIZE,
pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
set_pmp_entry(&index, PMP_NONE | PMP_L,
(uintptr_t)z_main_stack,
Z_RISCV_STACK_GUARD_SIZE,
pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
#endif /* CONFIG_MULTITHREADING */
#else
/* Write those entries to PMP regs. */
write_pmp_entries(0, index, true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
@ -419,7 +435,6 @@ void z_riscv_pmp_init(void)
}
#endif
__ASSERT(index <= PMPCFG_STRIDE, "provision for one global word only");
global_pmp_cfg[0] = pmp_cfg[0];
global_pmp_last_addr = pmp_addr[index - 1];
global_pmp_end_index = index;
@ -454,6 +469,7 @@ static inline unsigned int z_riscv_pmp_thread_init(unsigned long *pmp_addr,
#ifdef CONFIG_PMP_STACK_GUARD
#ifdef CONFIG_MULTITHREADING
/**
* @brief Prepare the PMP stackguard content for given thread.
*
@ -511,6 +527,8 @@ void z_riscv_pmp_stackguard_enable(struct k_thread *thread)
csr_set(mstatus, MSTATUS_MPRV);
}
#endif /* CONFIG_MULTITHREADING */
/**
* @brief Remove PMP stackguard content to actual PMP registers
*/
@ -734,8 +752,8 @@ int arch_buffer_validate(const void *addr, size_t size, int write)
int ret = -1;
/* Check if this is on the stack */
if (IS_WITHIN(start, size,
_current->stack_info.start, _current->stack_info.size)) {
if (IS_WITHIN(start, size, arch_current_thread()->stack_info.start,
arch_current_thread()->stack_info.size)) {
return 0;
}
@ -750,7 +768,7 @@ int arch_buffer_validate(const void *addr, size_t size, int write)
}
/* Look for a matching partition in our memory domain */
struct k_mem_domain *domain = _current->mem_domain_info.mem_domain;
struct k_mem_domain *domain = arch_current_thread()->mem_domain_info.mem_domain;
int p_idx, remaining_partitions;
k_spinlock_key_t key = k_spin_lock(&z_mem_domain_lock);

View file

@ -7,11 +7,11 @@
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <ksched.h>
#include <ipi.h>
#include <zephyr/irq.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/arch/riscv/irq.h>
#include <zephyr/drivers/pm_cpu_ops.h>
#include <zephyr/platform/hooks.h>
volatile struct {
arch_cpustart_t fn;
@ -79,101 +79,8 @@ void arch_secondary_cpu_init(int hartid)
/* Enable on secondary cores so that they can respond to PLIC */
irq_enable(RISCV_IRQ_MEXT);
#endif /* CONFIG_PLIC_IRQ_AFFINITY */
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
riscv_cpu_init[cpu_num].fn(riscv_cpu_init[cpu_num].arg);
}
#ifdef CONFIG_SMP
#define MSIP_BASE 0x2000000UL
#define MSIP(hartid) ((volatile uint32_t *)MSIP_BASE)[hartid]
static atomic_val_t cpu_pending_ipi[CONFIG_MP_MAX_NUM_CPUS];
#define IPI_SCHED 0
#define IPI_FPU_FLUSH 1
void arch_sched_directed_ipi(uint32_t cpu_bitmap)
{
unsigned int key = arch_irq_lock();
unsigned int id = _current_cpu->id;
unsigned int num_cpus = arch_num_cpus();
for (unsigned int i = 0; i < num_cpus; i++) {
if ((i != id) && _kernel.cpus[i].arch.online &&
((cpu_bitmap & BIT(i)) != 0)) {
atomic_set_bit(&cpu_pending_ipi[i], IPI_SCHED);
MSIP(_kernel.cpus[i].arch.hartid) = 1;
}
}
arch_irq_unlock(key);
}
void arch_sched_broadcast_ipi(void)
{
arch_sched_directed_ipi(IPI_ALL_CPUS_MASK);
}
#ifdef CONFIG_FPU_SHARING
void arch_flush_fpu_ipi(unsigned int cpu)
{
atomic_set_bit(&cpu_pending_ipi[cpu], IPI_FPU_FLUSH);
MSIP(_kernel.cpus[cpu].arch.hartid) = 1;
}
#endif
static void sched_ipi_handler(const void *unused)
{
ARG_UNUSED(unused);
MSIP(csr_read(mhartid)) = 0;
atomic_val_t pending_ipi = atomic_clear(&cpu_pending_ipi[_current_cpu->id]);
if (pending_ipi & ATOMIC_MASK(IPI_SCHED)) {
z_sched_ipi();
}
#ifdef CONFIG_FPU_SHARING
if (pending_ipi & ATOMIC_MASK(IPI_FPU_FLUSH)) {
/* disable IRQs */
csr_clear(mstatus, MSTATUS_IEN);
/* perform the flush */
arch_flush_local_fpu();
/*
* No need to re-enable IRQs here as long as
* this remains the last case.
*/
}
#endif
}
#ifdef CONFIG_FPU_SHARING
/*
* Make sure there is no pending FPU flush request for this CPU while
* waiting for a contended spinlock to become available. This prevents
* a deadlock when the lock we need is already taken by another CPU
* that also wants its FPU content to be reinstated while such content
* is still live in this CPU's FPU.
*/
void arch_spin_relax(void)
{
atomic_val_t *pending_ipi = &cpu_pending_ipi[_current_cpu->id];
if (atomic_test_and_clear_bit(pending_ipi, IPI_FPU_FLUSH)) {
/*
* We may not be in IRQ context here hence cannot use
* arch_flush_local_fpu() directly.
*/
arch_float_disable(_current_cpu->arch.fpu_owner);
}
}
#endif
int arch_smp_init(void)
{
IRQ_CONNECT(RISCV_IRQ_MSOFT, 0, sched_ipi_handler, NULL, 0);
irq_enable(RISCV_IRQ_MSOFT);
return 0;
}
#endif /* CONFIG_SMP */

View file

@ -108,7 +108,7 @@ static void walk_stackframe(riscv_stacktrace_cb cb, void *cookie, const struct k
/* Unwind the provided exception stack frame */
fp = esf->s0;
ra = esf->mepc;
} else if ((csf == NULL) || (csf == &_current->callee_saved)) {
} else if ((csf == NULL) || (csf == &arch_current_thread()->callee_saved)) {
/* Unwind current thread (default case when nothing is provided ) */
fp = (uintptr_t)__builtin_frame_address(0);
ra = (uintptr_t)walk_stackframe;
@ -181,7 +181,7 @@ static void walk_stackframe(riscv_stacktrace_cb cb, void *cookie, const struct k
/* Unwind the provided exception stack frame */
sp = z_riscv_get_sp_before_exc(esf);
ra = esf->mepc;
} else if ((csf == NULL) || (csf == &_current->callee_saved)) {
} else if ((csf == NULL) || (csf == &arch_current_thread()->callee_saved)) {
/* Unwind current thread (default case when nothing is provided ) */
sp = current_stack_pointer;
ra = (uintptr_t)walk_stackframe;
@ -215,8 +215,10 @@ void arch_stack_walk(stack_trace_callback_fn callback_fn, void *cookie,
const struct k_thread *thread, const struct arch_esf *esf)
{
if (thread == NULL) {
/* In case `thread` is NULL, default that to `_current` and try to unwind */
thread = _current;
/* In case `thread` is NULL, default that to `arch_current_thread()`
* and try to unwind
*/
thread = arch_current_thread();
}
walk_stackframe((riscv_stacktrace_cb)callback_fn, cookie, thread, esf, in_stack_bound,
@ -280,7 +282,8 @@ void z_riscv_unwind_stack(const struct arch_esf *esf, const _callee_saved_t *csf
int i = 0;
LOG_ERR("call trace:");
walk_stackframe(print_trace_address, &i, _current, esf, in_fatal_stack_bound, csf);
walk_stackframe(print_trace_address, &i, arch_current_thread(), esf, in_fatal_stack_bound,
csf);
LOG_ERR("");
}
#endif /* CONFIG_EXCEPTION_STACK_TRACE */

View file

@ -132,28 +132,29 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
/* Set up privileged stack */
#ifdef CONFIG_GEN_PRIV_STACKS
_current->arch.priv_stack_start =
(unsigned long)z_priv_stack_find(_current->stack_obj);
arch_current_thread()->arch.priv_stack_start =
(unsigned long)z_priv_stack_find(arch_current_thread()->stack_obj);
/* remove the stack guard from the main stack */
_current->stack_info.start -= K_THREAD_STACK_RESERVED;
_current->stack_info.size += K_THREAD_STACK_RESERVED;
arch_current_thread()->stack_info.start -= K_THREAD_STACK_RESERVED;
arch_current_thread()->stack_info.size += K_THREAD_STACK_RESERVED;
#else
_current->arch.priv_stack_start = (unsigned long)_current->stack_obj;
arch_current_thread()->arch.priv_stack_start =
(unsigned long)arch_current_thread()->stack_obj;
#endif /* CONFIG_GEN_PRIV_STACKS */
top_of_priv_stack = Z_STACK_PTR_ALIGN(_current->arch.priv_stack_start +
top_of_priv_stack = Z_STACK_PTR_ALIGN(arch_current_thread()->arch.priv_stack_start +
K_KERNEL_STACK_RESERVED +
CONFIG_PRIVILEGED_STACK_SIZE);
#ifdef CONFIG_INIT_STACKS
/* Initialize the privileged stack */
(void)memset((void *)_current->arch.priv_stack_start, 0xaa,
(void)memset((void *)arch_current_thread()->arch.priv_stack_start, 0xaa,
Z_STACK_PTR_ALIGN(K_KERNEL_STACK_RESERVED + CONFIG_PRIVILEGED_STACK_SIZE));
#endif /* CONFIG_INIT_STACKS */
top_of_user_stack = Z_STACK_PTR_ALIGN(
_current->stack_info.start +
_current->stack_info.size -
_current->stack_info.delta);
arch_current_thread()->stack_info.start +
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
status = csr_read(mstatus);
@ -169,12 +170,12 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
#ifdef CONFIG_PMP_STACK_GUARD
/* reconfigure as the kernel mode stack will be different */
z_riscv_pmp_stackguard_prepare(_current);
z_riscv_pmp_stackguard_prepare(arch_current_thread());
#endif
/* Set up Physical Memory Protection */
z_riscv_pmp_usermode_prepare(_current);
z_riscv_pmp_usermode_enable(_current);
z_riscv_pmp_usermode_prepare(arch_current_thread());
z_riscv_pmp_usermode_enable(arch_current_thread());
/* preserve stack pointer for next exception entry */
arch_curr_cpu()->arch.user_exc_sp = top_of_priv_stack;

View file

@ -18,6 +18,8 @@
#include <kernel_arch_data.h>
#include <pmp.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -53,6 +55,9 @@ static ALWAYS_INLINE void arch_kernel_init(void)
#ifdef CONFIG_RISCV_PMP
z_riscv_pmp_init();
#endif
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -26,6 +26,12 @@ config NUM_IRQS
int
default 32
config SPARC_SVT
bool "Single-vector trapping"
help
Use Single-vector trapping (SVT). Defined by SPARC-V8 Embedded (V8E)
Architecture Specification and available in some LEON processors.
config SPARC_CASA
bool "CASA instructions"
help

View file

@ -13,8 +13,9 @@ zephyr_library_sources(
thread.c
window_trap.S
sw_trap_set_pil.S
trap_table_mvt.S
)
zephyr_library_sources_ifdef(CONFIG_SPARC_SVT trap_table_svt.S)
zephyr_library_sources_ifndef(CONFIG_SPARC_SVT trap_table_mvt.S)
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)
zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE tls.c)

View file

@ -12,6 +12,18 @@
GTEXT(__sparc_trap_reset)
SECTION_FUNC(TEXT, __sparc_trap_reset)
#ifdef CONFIG_SPARC_SVT
#ifdef CONFIG_SOC_SPARC_LEON
/* On LEON, enable single vector trapping by setting ASR17.SV. */
rd %asr17, %g1
set (1<<13), %g2
or %g1, %g2, %g1
wr %g1, %asr17
#else
#error "Don't know how to enable SVT on this SOC"
#endif
#endif
set __sparc_trap_table, %g1
wr %g1, %tbr
wr 2, %wim

View file

@ -61,7 +61,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
void *z_arch_get_next_switch_handle(struct k_thread **old_thread)
{
*old_thread = _current;
*old_thread = arch_current_thread();
return z_get_next_switch_handle(*old_thread);
}

View file

@ -0,0 +1,138 @@
/*
* Copyright (c) 2023 Frontgrade Gaisler AB
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This file contains the trap entry for SPARC operating with
* single-vector trap model, defined in SPARC V8E. The processor
* redirects execution to a single entry on any trap event. From
* there, two levels of look-up tables are used to find the trap
* handler.
*
* - Execution time is constant.
* - Condition flags are not modified.
* - Provides handler with PSR in l0, TBR in l6
* - This SVT implementation is less than 400 bytes long. (An MVT
* table is always 4096 bytes long.)
*
* See trap_table_mvt.S for information about SPARC trap types.
*/
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/sparc/sparc.h>
#ifdef CONFIG_IRQ_OFFLOAD
#define IRQ_OFFLOAD_HANDLER __sparc_trap_irq_offload
#else
#define IRQ_OFFLOAD_HANDLER __sparc_trap_fault
#endif
GTEXT(__sparc_trap_table)
GTEXT(__start)
SECTION_SUBSEC_FUNC(TEXT, traptable, __sparc_trap_table)
__start:
rd %psr, %l0
mov %tbr, %l6
and %l6, 0xf00, %l7
srl %l7, 6, %l7
set __sparc_trap_table_svt_level0, %l4
ld [%l4 + %l7], %l4
and %l6, 0x0f0, %l7
srl %l7, 2, %l7
ld [%l4 + %l7], %l4
srl %l6, 4, %l3
jmp %l4
and %l3, 0xf, %l3 /* Interrupt level */
__sparc_trap_svt_in_trap:
ta 0x00
nop
SECTION_VAR(RODATA, __sparc_trap_table_svt_tables)
.align 4
__sparc_trap_table_svt_level0:
.word __sparc_trap_table_svt_00
.word __sparc_trap_table_svt_10
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_80
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
.word __sparc_trap_table_svt_allbad
__sparc_trap_table_svt_00:
.word __sparc_trap_reset
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_window_overflow
.word __sparc_trap_window_underflow
__sparc_trap_table_svt_allbad:
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
__sparc_trap_table_svt_10:
.word __sparc_trap_fault
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
.word __sparc_trap_interrupt
__sparc_trap_table_svt_80:
.word __sparc_trap_svt_in_trap
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_flush_windows
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_sw_set_pil
.word __sparc_trap_fault
.word __sparc_trap_fault
.word __sparc_trap_fault
.word IRQ_OFFLOAD_HANDLER
.word __sparc_trap_fault
.word __sparc_trap_except_reason

View file

@ -17,6 +17,8 @@
#include <kernel_arch_data.h>
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -24,6 +26,9 @@ extern "C" {
#ifndef _ASMLANGUAGE
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
void z_sparc_context_switch(struct k_thread *newt, struct k_thread *oldt);

View file

@ -49,7 +49,7 @@ bool z_x86_check_stack_bounds(uintptr_t addr, size_t size, uint16_t cs)
{
uintptr_t start, end;
if (_current == NULL || arch_is_in_isr()) {
if (arch_current_thread() == NULL || arch_is_in_isr()) {
/* We were servicing an interrupt or in early boot environment
* and are supposed to be on the interrupt stack */
int cpu_id;
@ -64,7 +64,7 @@ bool z_x86_check_stack_bounds(uintptr_t addr, size_t size, uint16_t cs)
end = start + CONFIG_ISR_STACK_SIZE;
#ifdef CONFIG_USERSPACE
} else if ((cs & 0x3U) == 0U &&
(_current->base.user_options & K_USER) != 0) {
(arch_current_thread()->base.user_options & K_USER) != 0) {
/* The low two bits of the CS register is the privilege
* level. It will be 0 in supervisor mode and 3 in user mode
* corresponding to ring 0 / ring 3.
@ -72,14 +72,14 @@ bool z_x86_check_stack_bounds(uintptr_t addr, size_t size, uint16_t cs)
* If we get here, we must have been doing a syscall, check
* privilege elevation stack bounds
*/
start = _current->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = _current->stack_info.start;
start = arch_current_thread()->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = arch_current_thread()->stack_info.start;
#endif /* CONFIG_USERSPACE */
} else {
/* Normal thread operation, check its stack buffer */
start = _current->stack_info.start;
end = Z_STACK_PTR_ALIGN(_current->stack_info.start +
_current->stack_info.size);
start = arch_current_thread()->stack_info.start;
end = Z_STACK_PTR_ALIGN(arch_current_thread()->stack_info.start +
arch_current_thread()->stack_info.size);
}
return (addr <= start) || (addr + size > end);
@ -97,7 +97,7 @@ bool z_x86_check_stack_bounds(uintptr_t addr, size_t size, uint16_t cs)
__pinned_func
bool z_x86_check_guard_page(uintptr_t addr)
{
struct k_thread *thread = _current;
struct k_thread *thread = arch_current_thread();
uintptr_t start, end;
/* Front guard size - before thread stack area */
@ -233,7 +233,7 @@ static inline uintptr_t get_cr3(const struct arch_esf *esf)
* switch when we took the exception via z_x86_trampoline_to_kernel
*/
if ((esf->cs & 0x3) != 0) {
return _current->arch.ptables;
return arch_current_thread()->arch.ptables;
}
#else
ARG_UNUSED(esf);

View file

@ -207,7 +207,7 @@ void z_float_enable(struct k_thread *thread, unsigned int options)
/* Associate the new FP context with the specified thread */
if (thread == _current) {
if (thread == arch_current_thread()) {
/*
* When enabling FP support for the current thread, just claim
* ownership of the FPU and leave CR0[TS] unset.
@ -222,7 +222,7 @@ void z_float_enable(struct k_thread *thread, unsigned int options)
* of the FPU to them (unless we need it ourselves).
*/
if ((_current->base.user_options & _FP_USER_MASK) == 0) {
if ((arch_current_thread()->base.user_options & _FP_USER_MASK) == 0) {
/*
* We are not FP-capable, so mark FPU as owned by the
* thread we've just enabled FP support for, then
@ -278,7 +278,7 @@ int z_float_disable(struct k_thread *thread)
thread->base.user_options &= ~_FP_USER_MASK;
if (thread == _current) {
if (thread == arch_current_thread()) {
z_FpAccessDisable();
_kernel.current_fp = (struct k_thread *)0;
} else {
@ -314,7 +314,7 @@ void _FpNotAvailableExcHandler(struct arch_esf *pEsf)
/* Enable highest level of FP capability configured into the kernel */
k_float_enable(_current, _FP_USER_MASK);
k_float_enable(arch_current_thread(), _FP_USER_MASK);
}
_EXCEPTION_CONNECT_NOCODE(_FpNotAvailableExcHandler,
IV_DEVICE_NOT_AVAILABLE, 0);

View file

@ -132,9 +132,9 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
/* Transition will reset stack pointer to initial, discarding
* any old context since this is a one-way operation
*/
stack_end = Z_STACK_PTR_ALIGN(_current->stack_info.start +
_current->stack_info.size -
_current->stack_info.delta);
stack_end = Z_STACK_PTR_ALIGN(arch_current_thread()->stack_info.start +
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
#ifdef CONFIG_X86_64
/* x86_64 SysV ABI requires 16 byte stack alignment, which
@ -156,15 +156,15 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
* Note that this also needs to page in the reserved
* portion of the stack (which is usually the page just
* before the beginning of stack in
* _current->stack_info.start.
* arch_current_thread()->stack_info.start.
*/
uintptr_t stack_start;
size_t stack_size;
uintptr_t stack_aligned_start;
size_t stack_aligned_size;
stack_start = POINTER_TO_UINT(_current->stack_obj);
stack_size = K_THREAD_STACK_LEN(_current->stack_info.size);
stack_start = POINTER_TO_UINT(arch_current_thread()->stack_obj);
stack_size = K_THREAD_STACK_LEN(arch_current_thread()->stack_info.size);
#if defined(CONFIG_X86_STACK_PROTECTION)
/* With hardware stack protection, the first page of stack
@ -182,7 +182,7 @@ FUNC_NORETURN void arch_user_mode_enter(k_thread_entry_t user_entry,
#endif
z_x86_userspace_enter(user_entry, p1, p2, p3, stack_end,
_current->stack_info.start);
arch_current_thread()->stack_info.start);
CODE_UNREACHABLE;
}

View file

@ -421,7 +421,7 @@ void z_x86_tlb_ipi(const void *arg)
/* We might have been moved to another memory domain, so always invoke
* z_x86_thread_page_tables_get() instead of using current CR3 value.
*/
ptables_phys = k_mem_phys_addr(z_x86_thread_page_tables_get(_current));
ptables_phys = k_mem_phys_addr(z_x86_thread_page_tables_get(arch_current_thread()));
#endif
/*
* In the future, we can consider making this smarter, such as
@ -1440,7 +1440,7 @@ static inline void bcb_fence(void)
__pinned_func
int arch_buffer_validate(const void *addr, size_t size, int write)
{
pentry_t *ptables = z_x86_thread_page_tables_get(_current);
pentry_t *ptables = z_x86_thread_page_tables_get(arch_current_thread());
uint8_t *virt;
size_t aligned_size;
int ret = 0;
@ -1958,7 +1958,7 @@ int arch_mem_domain_thread_add(struct k_thread *thread)
* IPI takes care of this if the thread is currently running on some
* other CPU.
*/
if (thread == _current && thread->arch.ptables != z_x86_cr3_get()) {
if (thread == arch_current_thread() && thread->arch.ptables != z_x86_cr3_get()) {
z_x86_cr3_set(thread->arch.ptables);
}
#endif /* CONFIG_X86_KPTI */
@ -1980,8 +1980,9 @@ void z_x86_current_stack_perms(void)
/* Clear any previous context in the stack buffer to prevent
* unintentional data leakage.
*/
(void)memset((void *)_current->stack_info.start, 0xAA,
_current->stack_info.size - _current->stack_info.delta);
(void)memset((void *)arch_current_thread()->stack_info.start, 0xAA,
arch_current_thread()->stack_info.size -
arch_current_thread()->stack_info.delta);
/* Only now is it safe to grant access to the stack buffer since any
* previous context has been erased.
@ -1991,13 +1992,13 @@ void z_x86_current_stack_perms(void)
* This will grant stack and memory domain access if it wasn't set
* already (in which case this returns very quickly).
*/
z_x86_swap_update_common_page_table(_current);
z_x86_swap_update_common_page_table(arch_current_thread());
#else
/* Memory domain access is already programmed into the page tables.
* Need to enable access to this new user thread's stack buffer in
* its domain-specific page tables.
*/
set_stack_perms(_current, z_x86_thread_page_tables_get(_current));
set_stack_perms(arch_current_thread(), z_x86_thread_page_tables_get(arch_current_thread()));
#endif
}
#endif /* CONFIG_USERSPACE */

View file

@ -14,13 +14,17 @@
#include <stddef.h> /* For size_t */
#include <zephyr/platform/hooks.h>
#ifdef __cplusplus
extern "C" {
#endif
static inline void arch_kernel_init(void)
{
/* No-op on this arch */
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
static ALWAYS_INLINE void

View file

@ -8,6 +8,8 @@
#include <zephyr/kernel_structs.h>
#include <zephyr/platform/hooks.h>
#ifndef _ASMLANGUAGE
extern void z_x86_switch(void *switch_to, void **switched_from);
@ -27,7 +29,9 @@ extern void z_x86_ipi_setup(void);
static inline void arch_kernel_init(void)
{
/* nothing */;
#ifdef CONFIG_SOC_PER_CORE_INIT_HOOK
soc_per_core_init_hook();
#endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */
}
FUNC_NORETURN void z_x86_cpu_init(struct x86_cpuboot *cpuboot);

View file

@ -53,7 +53,7 @@ set(CORE_ISA_DM ${CMAKE_BINARY_DIR}/zephyr/include/generated/zephyr/core-isa-dM.
set(CORE_ISA_IN ${CMAKE_BINARY_DIR}/zephyr/include/generated/core-isa-dM.c)
file(WRITE ${CORE_ISA_IN} "#include <xtensa/config/core-isa.h>\n")
add_custom_command(OUTPUT ${CORE_ISA_DM}
COMMAND ${CMAKE_C_COMPILER} -E -dM -U__XCC__
COMMAND ${CMAKE_C_COMPILER} -E -dM -U__XCC__ ${XTENSA_CORE_LOCAL_C_FLAG}
-I${ZEPHYR_XTENSA_MODULE_DIR}/zephyr/soc/${CONFIG_SOC}
-I${SOC_FULL_DIR}
${CORE_ISA_IN} -o ${CORE_ISA_DM})

View file

@ -10,8 +10,18 @@
#include <zephyr/llext/loader.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(llext);
LOG_MODULE_DECLARE(llext, CONFIG_LLEXT_LOG_LEVEL);
/*
* ELF relocation tables on Xtensa contain relocations of different types. They
* specify how the relocation should be performed. Which relocations are used
* depends on the type of the ELF object (e.g. shared or partially linked
* object), structure of the object (single or multiple source files), compiler
* flags used (e.g. -fPIC), etc. Also not all relocation table entries should be
* acted upon. Some of them describe relocations that have already been
* resolved by the linker. We have to distinguish them from actionable
* relocations and only need to handle the latter ones.
*/
#define R_XTENSA_NONE 0
#define R_XTENSA_32 1
#define R_XTENSA_RTLD 2
@ -19,71 +29,126 @@ LOG_MODULE_DECLARE(llext);
#define R_XTENSA_JMP_SLOT 4
#define R_XTENSA_RELATIVE 5
#define R_XTENSA_PLT 6
#define R_XTENSA_ASM_EXPAND 11
#define R_XTENSA_SLOT0_OP 20
static void xtensa_elf_relocate(struct llext_loader *ldr, struct llext *ext,
const elf_rela_t *rel, uint8_t *text, uintptr_t addr,
uint8_t *loc, int type, uint32_t stb)
{
elf_word *got_entry = (elf_word *)loc;
switch (type) {
case R_XTENSA_RELATIVE:
/* Relocate a local symbol: Xtensa specific. Seems to only be used with PIC */
*got_entry += (uintptr_t)text - addr;
break;
case R_XTENSA_GLOB_DAT:
case R_XTENSA_JMP_SLOT:
if (stb == STB_GLOBAL) {
*got_entry = addr;
}
break;
case R_XTENSA_32:
/* Used for both LOCAL and GLOBAL bindings */
*got_entry += addr;
break;
case R_XTENSA_SLOT0_OP:
/* Apparently only actionable with LOCAL bindings */
;
elf_sym_t rsym;
int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset +
ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t));
if (!ret) {
ret = llext_read(ldr, &rsym, sizeof(elf_sym_t));
}
if (ret) {
LOG_ERR("Failed to read a symbol table entry, LLEXT linking might fail.");
return;
}
/*
* So far in all observed use-cases
* llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) was already
* available as the "addr" argument of this function, supplied
* by arch_elf_relocate_local() from its non-STT_SECTION branch.
*/
uintptr_t link_addr = (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) +
rsym.st_value + rel->r_addend;
ssize_t value = (link_addr - (((uintptr_t)got_entry + 3) & ~3)) >> 2;
/* Check the opcode */
if ((loc[0] & 0xf) == 1 && !loc[1] && !loc[2]) {
/* L32R: low nibble is 1 */
loc[1] = value & 0xff;
loc[2] = (value >> 8) & 0xff;
} else if ((loc[0] & 0xf) == 5 && !(loc[0] & 0xc0) && !loc[1] && !loc[2]) {
/* CALLn: low nibble is 5 */
loc[0] = (loc[0] & 0x3f) | ((value << 6) & 0xc0);
loc[1] = (value >> 2) & 0xff;
loc[2] = (value >> 10) & 0xff;
} else {
LOG_DBG("%p: unhandled OPC or no relocation %02x%02x%02x inf %#x offs %#x",
(void *)loc, loc[2], loc[1], loc[0],
rel->r_info, rel->r_offset);
break;
}
break;
case R_XTENSA_ASM_EXPAND:
/* Nothing to do */
break;
default:
LOG_DBG("Unsupported relocation type %u", type);
return;
}
LOG_DBG("Applied relocation to %#x type %u at %p",
*(uint32_t *)((uintptr_t)got_entry & ~3), type, (void *)got_entry);
}
/**
* @brief Architecture specific function for relocating shared elf
*
* Elf files contain a series of relocations described in multiple sections.
* These relocation instructions are architecture specific and each architecture
* supporting modules must implement this.
* @brief Architecture specific function for STB_LOCAL ELF relocations
*/
void arch_elf_relocate_local(struct llext_loader *ldr, struct llext *ext,
const elf_rela_t *rel, const elf_sym_t *sym, size_t got_offset)
void arch_elf_relocate_local(struct llext_loader *ldr, struct llext *ext, const elf_rela_t *rel,
const elf_sym_t *sym, size_t got_offset,
const struct llext_load_param *ldr_parm)
{
uint8_t *text = ext->mem[LLEXT_MEM_TEXT];
uint8_t *loc = text + got_offset;
int type = ELF32_R_TYPE(rel->r_info);
elf_word *got_entry = (elf_word *)(text + got_offset);
uintptr_t sh_addr;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION) {
elf_shdr_t *shdr = llext_peek(ldr, ldr->hdr.e_shoff +
sym->st_shndx * ldr->hdr.e_shentsize);
sh_addr = shdr->sh_addr ? : (uintptr_t)llext_peek(ldr, shdr->sh_offset);
sh_addr = shdr->sh_addr &&
(!ldr_parm->section_detached || !ldr_parm->section_detached(shdr)) ?
shdr->sh_addr : (uintptr_t)llext_peek(ldr, shdr->sh_offset);
} else {
sh_addr = ldr->sects[LLEXT_MEM_TEXT].sh_addr;
}
switch (type) {
case R_XTENSA_RELATIVE:
/* Relocate a local symbol: Xtensa specific */
*got_entry += (uintptr_t)text - sh_addr;
break;
case R_XTENSA_32:
*got_entry += sh_addr;
break;
case R_XTENSA_SLOT0_OP:
;
uint8_t *opc = (uint8_t *)got_entry;
xtensa_elf_relocate(ldr, ext, rel, text, sh_addr, loc, type, ELF_ST_BIND(sym->st_info));
}
/* Check the opcode: is this an L32R? And does it have to be relocated? */
if ((opc[0] & 0xf) != 1 || opc[1] || opc[2])
break;
/**
* @brief Architecture specific function for STB_GLOBAL ELF relocations
*/
void arch_elf_relocate_global(struct llext_loader *ldr, struct llext *ext, const elf_rela_t *rel,
const elf_sym_t *sym, size_t got_offset, const void *link_addr)
{
uint8_t *text = ext->mem[LLEXT_MEM_TEXT];
elf_word *got_entry = (elf_word *)(text + got_offset);
int type = ELF32_R_TYPE(rel->r_info);
elf_sym_t rsym;
int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset +
ELF_R_SYM(rel->r_info) * sizeof(elf_sym_t));
if (!ret) {
ret = llext_read(ldr, &rsym, sizeof(elf_sym_t));
}
if (ret)
return;
uintptr_t link_addr = (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) +
rsym.st_value + rel->r_addend;
ssize_t value = (link_addr - (((uintptr_t)got_entry + 3) & ~3)) >> 2;
opc[1] = value & 0xff;
opc[2] = (value >> 8) & 0xff;
break;
default:
LOG_DBG("unsupported relocation type %u", type);
return;
/* For global relocations we expect the initial value for R_XTENSA_RELATIVE to be zero */
if (type == R_XTENSA_RELATIVE && *got_entry) {
LOG_WRN("global: non-zero relative value %#x", *got_entry);
}
LOG_DBG("relocation to %#x type %u at %p", *got_entry, type, (void *)got_entry);
xtensa_elf_relocate(ldr, ext, rel, text, (uintptr_t)link_addr, (uint8_t *)got_entry, type,
ELF_ST_BIND(sym->st_info));
}

View file

@ -140,7 +140,7 @@ FUNC_NORETURN void arch_syscall_oops(void *ssf)
#ifdef CONFIG_USERSPACE
void z_impl_xtensa_user_fault(unsigned int reason)
{
if ((_current->base.user_options & K_USER) != 0) {
if ((arch_current_thread()->base.user_options & K_USER) != 0) {
if ((reason != K_ERR_KERNEL_OOPS) &&
(reason != K_ERR_STACK_CHK_FAIL)) {
reason = K_ERR_KERNEL_OOPS;

Some files were not shown because too many files have changed in this diff Show more