Commit graph

106680 commits

Author SHA1 Message Date
Josuah Demangeon
9e908b1b72 drivers: video: add emulated Imager driver and RX driver
Add a new implementation of a test pattern generator, with the same
architecture as real drivers: split receiver core and
I2C-controlled sub-device, with changes of video format in
"zephyr,emul-imager" leads to different data produced by
"zephyr,emul-rx".

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-12-05 20:00:21 -05:00
Josuah Demangeon
46a262ffe6 drivers: video: common: Add utilities to seek frmival/caps structures
Introduce a video_get_format_index() utility to help finding a caps
entry out of a given format. Introduce several utilities to seek and
apply frame intervals.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-12-05 20:00:21 -05:00
Francois Ramu
498138ecd4 doc: Migration guide v4.1: STM32 addition for the MCO
STM32 configuration for the MCO clock source and prescaler is done
by the DTS and no more by Kconfig (removed).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
17fcb33eae samples: boards: stm32 mco output control
This sample enables and configures the MCO1/2 output
for stm32 target boards.
MCO_PRE_DIV_n is defined by the stm32XX_clock.h

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
a103d63b8f include: binding defines division factor for stm32 MCO prescaler
Depending on the stm32 serie the MCO1/2 prescaler is a value
set in the CFGR register to divide the MCO output clock.
Use the same model based on the RefMan for other stm32 series
than stm32C0/F4/F7/H5/H7, once the MCO is in the DTS.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
f0ba72e210 drivers: clock_control: stm32 mco driver get define from DTS
Rely on the DTS to get the MCO input source clock and prescaler.
DTS configuration has been introduced and Kconfig method
deprecated two releases before and can be then safely removed.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
505e1e519f drivers: clock control: stm32 pll clock config for I2S
The stm32F41x have a PLLI2S M divider for their PLL I2S
but others like the stm32F401 or stm32F74x have the PLL M
divider from the main PLL : might affect the sysclock.
LL Function is the same for configuring the PLL I2S but
parameter could depends on the stm32 serie.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
f4152127ad dts: arm: stm32f411 compatible for PLL I2S
The stm32f411 and stm32f412 and stm32f446 have a PLLI2S
with a div M in front of the PLLI2S input.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Francois Ramu
8d6d7baf98 include: bindings: high speed clock for the stm32F1/F4 series
The stm32F4 serie has HSI and HSE clock possible clock sources
The stm32F1 also has an external HSE possible clock source

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-05 19:59:47 -05:00
Trung Hieu Le
64ce567f5d include: zephyr: sys: util: Add type check for macro DIV_ROUND_CLOSEST
Add type check to avoid comparing unsigned values with 0 which is always
true or false and can cause coverity issue.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-12-05 19:59:07 -05:00
Vinayak Kariappa Chettimada
27227c505f MAINTAINERS: Add cvinayak to Bluetooth HCI, Host and ISO
Contributed some of the following to HCI (UART) samples:
Vinayak Kariappa Chettimada (20):
 Bluetooth: hci_uart: reduce configured stack sizes
 samples: Bluetooth: Add configuration file for all controller features
 samples: Bluetooth: hci_rpmsg: Fix RAM overflow building for DF feature
 Bluetooth: Controller: Preliminary Central multiple CIS support
 samples: Bluetooth: hci_rpmsg/uart: Fix BT_CTLR_ISO_TX_BUFFER_SIZE
 Bluetooth: Controller: Fix connected ISO dynamic tx power
 Bluetooth: Controller: BT_CTLR_ISO_TX_BUFFER_SIZE from BT_ISO_TX_MTU
 samples: Bluetooth: hci_uart: Add preliminary support for nrf54l15pdk
 samples: Bluetooth: hci_uart: Use lower IRQ priority SoC peripherals
 samples: Bluetooth: hci_uart: Add preliminary DF support for nrf54l15pdk
 samples: Bluetooth: hci_uart/hci_ipc: CI coverage for nRF53+nRF21 FEM
 samples: Bluetooth: hci_uart: CI coverage for nRF5340dk cpuapp
 samples: Bluetooth: hci_uart: CI coverage for nRF52+nRF21 FEM
 samples: Bluetooth: hci_uart: CI coverage for nRF52840
 samples: Bluetooth: hci_uart: CI coverage for nRF52dk
 samples: Bluetooth: hci_uart: CI coverage for nRF52833 DF
 samples: Bluetooth: hci_uart(_3wire)/hci_ipc: Enable PAST feature
 samples: Bluetooth: hci_uart hci_ipc configuration update
 samples: Bluetooth: hci_uart hci_ipc configuration update
 Revert "Bluetooth: controller: remove refs to LLCP_LEGACY after rebase"

Contributed some of the following to Host:
Vinayak Kariappa Chettimada (2409):
 Bluetooth: SMP: Fix unaligned access usage fault.
 soc: Use nrf.h instead of nrf52.h and nrf52_bitfields.h
 Bluetooth: Fix race condition between ecc_send and ecc_task
 ...

Contributed some of the following to Host ISO:
Vinayak Kariappa Chettimada (2):
 Bluetooth: host: iso: Fix typo in hci_le_big_terminate
 Bluetooth: HCI: Rename to bt_hci_iso_sdu_hdr and bt_hci_iso_sdu_ts_hdr

and attends the weekly Bluetooth Zephyr meetings.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 19:58:42 -05:00
Jamie McCrae
3a6c4f5b80 Revert "ci: twister: add workaround until module test data is fixed [REVERTME]"
This reverts commit b8957692fc.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-05 19:58:30 -05:00
Jamie McCrae
efc610f6c0 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  5d6471bac184c8accaeeb0efcfad8dd35225a28d

Brings following Zephyr relevant fixes:
  - 5d6471ba zephyr: convert platform_allow to a list
  - 7cc60059 boot: zephyr: boards: nrf54l10 and nrf54l05 configs
  - 742978e7 boot: zephyr: Fix
    sample.bootloader.mcuboot.usb_cdc_acm_recovery
  - 39aab3d8 zephyr: Add CONFIG_MCUBOOT_CLEANUP_RAM

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-05 19:58:30 -05:00
Emil Gydesen
49a458e5aa tests: Bluetooth: Update PTS ICS with new spec versions
Added support for BAP 1.0.2, CSIS 1.01, PACS 1.0.2, PBP 1.0.1
Enabled support for extended adv in the LL (mandatory requirement)
Enabled support for multiple BIGs support in the LL.

Due to a bug in the BT qualification tool, the following
features are values in the .bqw file are manually added
<Feature>BAP 4/1</Feature>
<Feature>BAP 26/1</Feature>
<Feature>BAP 49/1</Feature>
<Feature>BAP 62/1</Feature>
<Feature>BAP 77/1</Feature>
<Feature>BAP 83/1</Feature>
<Feature>CSIP 3/1</Feature>
<Feature>CSIP 8/1</Feature>
<Feature>PBP 10/1</Feature>

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-05 16:13:55 -05:00
Pisit Sawangvonganan
aa1a38e2aa bluetooth: shell: refactor shell print to eliminate ctx_shell usage
This change aims to eliminate the dependency on `ctx_shell` in
the Bluetooth `host/shell/*`, making the code more maintainable.
Replaced `shell_*` functions that depended on `ctx_shell` with
the appropriate `bt_shell_*` functions.

The shell-less functions `bt_do_scan_filter_clear_name`, `bt_do_scan_off`,
and `bt_do_connect_le` were added so they can be called without `sh`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-05 22:10:54 +01:00
Pisit Sawangvonganan
471feb2094 bluetooth: shell: replace ctx_shell with sh where applicable
Limit the usage of `ctx_shell` to cases where printing requires it
and `sh` is not available.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-05 22:10:54 +01:00
Pisit Sawangvonganan
28ca65de1c bluetooth: shell: add bt_shell_private.c and bt_shell_private.h
Introduced `bt_shell_private.c` and `bt_shell_private.h` to provide
common functions for the Bluetooth `shell_wall_print`.
These functions are equivalent to `shell_fprintf`, `shell_info`,
`shell_print`, `shell_warn`, `shell_error` and `shell_hexdump`
but without requiring the `sh` parameter.

The cost of the newly added `bt_shell_fprintf_info` ... `_error` functions
will be negligible when there are many individual calls that need to pass
both the `sh` and `color` parameters each time.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-05 22:10:54 +01:00
Hake Huang
6996436ed6 tests: twister: add quit-on-failure option
in CI, we may need to quit if there is any failure
to save time, so add this --quit-on-failure so that
any failure will quit the test.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-12-05 22:10:28 +01:00
Neil Chen
557f7f906f doc: release-notes-4.1: Update note for NXP frdm_mcxn236
Add rtc enable note for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-05 22:10:12 +01:00
Neil Chen
e3ded63310 boards: nxp: frdm_mcxn236: Enabled IRTC Driver.
Enabling the IRTC Driver for the frdm_mcxn236 board.
Tested with example samples/drivers/rtc.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-05 22:10:12 +01:00
Neil Chen
a9ad62ba79 dts: arm/nxp: Add rtc nodes to NXP MCXN23x dtsi file
Add rtc nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-05 22:10:12 +01:00
Neil Chen
6553fd1346 boards: frdm_mcxc444: Add i2c support
Enable i2c and configure it to read accelerometer sensor on the board.
Test it using sample.sensor.accel_polling.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-05 22:09:54 +01:00
Dmytro Firsov
b3758a787c tests: kernel: exclude xenvm with GICv3 from device tests
The issue with mentioned test for GICv3 version of xenvm virtual
board is the same as for regular xenvm - device tree overlay for this
test overrides #address-cells and #size-cells property for original
device tree file (from 0x2 to 0x1), which leads to incorrect DT parsing
by actual Xen drivers. This causes build errors, so test should be
skipped for GICv3 platform too.

Same issue for regular xenvm was fixed by commit 40fe36669c ("tests:
kernel: exclude xenvm from device tests"). Issue for GICv3 appeared
after migrating to HWMv2.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2024-12-05 22:09:31 +01:00
Dmytro Firsov
c57771ea3f boards: xenvm: remove incorrect condition for Kconfig heap values
xenvm Kconfig contained incorrect name for board parameter. It led to
build issues - heap size was set incorrectly. Since whole file is
already placed under right Kconfig condition ("if BOARD_XENVM"), remove
incorrect parameter at all.

This issue was introduced by commit 8dc3f85622 ("hwmv2: Introduce
Hardware model version 2 and convert devices") due to the typo.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2024-12-05 22:09:31 +01:00
Łukasz Stępnicki
e57634e473 boards: nordic: nrf54h20dk: VPRs board runner config
Added basic support for west debug for nrf54h20
RISC-V cpus: nrf54h20_cpuppr and nrf54h20_cpuppr.
Note external jlink probe needs to be used.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2024-12-05 22:09:13 +01:00
Andy Ross
0632873fb3 soc/mt8196: Add interrupt routing support
The MT8196 device has a newer interrupt controller that acts like the
legacy ones once initialized (see intc_mtk_adsp.c).  But it has some
(only slightly) more complicated routing control that must be
initialized on reset, as the default is "don't deliver any interrupts
at all".  Previous versions of the device integration worked becuase
they relied on a SOF binary to be loaded at boot, but obviously that
doesn't work for a Zephyr-based SOF firmware image.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
6309c1b1a5 soc/mediatek/mbox: Enable IRQ
This driver forgot to enable its interrupt, but has been working
becuase Zephyr apps were always run in a context where the interrupt
controller had been initialized by a SOF binary at boot.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
4d6655983c soc/mediatek/mtk_adsp: Set XTENSA_CCOUNT_HZ
This got missed. Set it correctly for hygiene, though very few things
use it. There is a spot in SOF where it's helpful to have a number for
"fasted cpu clock rate" and this is the best candidate.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
da35377256 tests/boards/mtk_adsp: Handle protocol skew
Recent kernel drivers for some devices have swapped the mailbox device
used for replies.  It used to be that all commands in either direction
were sent on mbox0 and all replies on mbox1.  Now mbox0 handles
commands and replies for "DSP to Host" communication, and mbox1 is for
"Host to DSP".  Listen to both devices for our simple test.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
1ec2b1c68f soc/mediatek: Add back SOF-only entry point
I thought I was being clever letting the linker place the entry point
arbitrarily (since the hardware can set it to any value).

But it turns out that the upstream Linux SOF loader code is hard-wired
to start the DSP only at the first byte of SRAM, always, no matter
what entry point is listed in the rimage file.  So until/unless this
is fixed, we need to add a trampoline at the start of SRAM (and
frustratingly that needs to be 1024 bytes long becuase of the
alignment requirements of the vector table that follows it, sigh...)

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
00417b36bc soc/mediatek/adsp: Build zephyr.ri using rimage when available
This is mostly a cut/paste copy of similar code in intel_adsp and imx,
which sadly can't be shared given the way the design works.  Also
includes a bonus, slightly-passive-aggressive description of why that
is.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
82c5f548d9 scripts/west/sign: Auto-detect rimage ELF files
This code had a growing "enumerate all the platforms" wart.  In point
of fact only intel_adsp is special here.  Other rimage platforms don't
have a bootloader and use zephyr.elf directly.

Don't hard code platform names (especially since they aren't the same
as board/soc names!).  Just autodetect which scheme we have at
runtime.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Andy Ross
b07a0972be soc/mt8196: Set SDK toolchain name
This is in sdk-ng upstream now (not in the current release yet), so
set it up.

Signed-off-by: Andy Ross <andyross@google.com>
2024-12-05 22:08:55 +01:00
Pieter De Gendt
b2826aebbd drivers: display: display_ili9xxx: Allow multiple instances
The ili9xxx driver is used for multiple variants, but did not support
different ones at the same time.
Use unique variable names for each variant.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-05 22:08:37 +01:00
Dominik Ermel
5518bb46e6 drivers/flash/flexspi_x25um51345g: Fix broken support for get_size
Fix incorrectly implemented flash_get_size callback.

Fixes #82364

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-05 22:08:26 +01:00
Anas Nashif
bdd712480f manifest: sof: sync with upstream project
Update to sha bc08c9c60 and sync with latest upstream.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-12-05 22:08:15 +01:00
Chaitanya Tata
e73f13c798 manifest: hostap: Pull in hostap 2.11 upmerge changes
Pull hostap 2.11 upmerge changes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
bd510df5c5 manifest: hal_nxp: Pull Wi-Fi driver build fixes
The build fixes for NXP Wi-Fi driver to work with the latest hostap
upmerge.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
12b24be7cc modules: hostap: Fix the callback for EAPoL
The signature of callback and the callback function is now changed, so,
add a wrapper to convert b/w them.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
ff440ca597 modules: hostap: Fix DPP3 build failure
MbedTLS Crypto ALT implementation clearly states that DPP3 isn't
supported, remove DPP3 to fix a build error related to HPKE.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
3cda9ec517 modules: hostap: Fix build error with AP and WPA3
The comeback token functionality is now moved to a separate file.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
1551a1323d modules: hostap: Fix build error with upmerge
These files are now unconditiaonlly included, the defines within the
file takes care of both enable and disable of the feature.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Chaitanya Tata
6b8546dd03 hostap: Fix build after upmerge
Latest hostap (through upmerge) has intdocued a separate data
structure for signal info, so, fix the build errors. Also, fix the
variable rename for current TX rate.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Benjamin Cabé
c0be51df2f boards: waveshare: adopt new rp2040.dtsi location
This boards was merged before rp2040.dtsi changed location.
Update the include in its dts file accordingly

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-05 09:21:41 -05:00
Fin Maaß
0a2ad7ebfc MAINTAINERS: microchip mec platform: filter it
don't assign all microchip dts bindings to
Microchip MEC Platforms.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-05 15:19:02 +01:00
Audun Korneliussen
ab6bca66ac drivers: sensor: npm1300_charger: Updating of discharge current limit
Update discharge current limit property to be aligned
with the most recent npm1300 datasheet.
This affects the discharge current measurement calculation,
which needs to be scaled accordingly.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2024-12-05 15:18:23 +01:00
Vinayak Kariappa Chettimada
fbbde51853 Revert "test: bsim: bt: fix test scripts"
This reverts commit 18119e8f6e.

Audio tests are enabled back, but change to random number
seed is retained for the multiple identity test.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 15:18:11 +01:00
Vinayak Kariappa Chettimada
ab478f543c Revert "tests: bsim: comment out some failing AC tests"
This reverts commit 1320b3dd66.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 15:18:11 +01:00
Emil Gydesen
0851cb2772 tests: Bluetooth: CAP: Acceptor bsim test use ext_adv
Remove a duplicated advertising set in the CAP acceptor babblesim
test. The advertising set is configured in test_start_adv.

The BSIM test for the CAP acceptor used legacy instead
of extended advertising.

This also adds the required advertising data and validation
on the CAP initiator and CAP commander.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-05 15:18:11 +01:00
Vinayak Kariappa Chettimada
643ad148f1 Bluetooth: Controller: Fix reschedule for ticker that yield
Fix reschedule for ticker that yield such that reduce the
slot window after intersection to include required
ticks_slot, and we do not take the interval of the
colliding ticker provided every expiry increments the
interval by random amount of ticks. This is the case for
primary channel advertising.

Fixes commit e1cd5ba77f59 ("Bluetooth: Controller: Fix to
reschedule after overlap when yielding").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-05 15:18:11 +01:00