Commit graph

83521 commits

Author SHA1 Message Date
Jamie McCrae 3c34ca6fb9 cmake: modules: configuration_files: Force set app config dir
Forces setting the cached APPLICATION_CONFIG_DIR variable so that
it gets updated with the absolute path instead of reverting back
to the relative path which then causes problems when sourcing
other files, e.g. app.overlay

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-01 17:44:59 +02:00
Casper Jørgensen 2ad0c90e87 mgmt: mcumgr: smp_dummy: Add missing conditional end bracket
Compiling smp_dummy.h for C++ is currently
not possible due to a missing end curly bracket.

This commit add the missing end bracket on the same
condition as the start bracket is included.

Signed-off-by: Casper Jørgensen <casperej@gmail.com>
2023-09-01 17:44:49 +02:00
Rubin Gerritsen faee29c229 Bluetooth: Shell: Only print valid ISO data
The application gets notified about both valid and invalid data.
As data arrives every SDU interval, we would like to only print the
valid data to avoid the shell being flooded with logs.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-09-01 17:44:39 +02:00
Jamie McCrae ad981acc1b cmake: version: Fix example comment
Fixes a missing parameter from the comment

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-01 17:44:28 +02:00
Jamie McCrae 95349eae2b mcuboot: Use tweak version for final signing version field
Includes the application VERSION-file designated tweak version
for the build number field when signing MCUboot images.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-09-01 17:44:28 +02:00
Mykola Kvach c5619cd001 doc: release: 3.5: add notes about changes related to fs subsystem
Add support of mounting littlefs on the block device from the shell/fs.
Add alignment parameter to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-09-01 17:44:15 +02:00
Dmytro Semenets 8b33da03f3 fs: shell: littlefs: add support of block devices
For flash device, littlefs should be located at the partition.
Current implementation of the fs shell is hardcoded for the flash device
and the compilation fails if STORAGE_PARTITION isn't defined in the
device tree.
Add options for block dev support. This allows to mount littlefs on the
block device from the shell, and also removes the compile time
dependency on STORAGE_PARTITION, if CONFIG_FS_LITTLEFS_BLK_DEV is set.

Fix mounting of littlefs blk device. lfs_mount stucks in case when the
read/prog buffer less than SDMMC block size, because it can cause memory
corrupt, for example, look into function 'card_read_blocks' how it writes
data to read buffer in case when buffer isn't aligned. With default
config we have 32 bytes in the read buffer but trying to write
'block_size' to it and get memory corrupt, the same issue will be in
case when the read buffer is aligned.

This is an incremental improvement, ideally, someone should implement
selection of the storage dev from the shell args.

Co-authored-by: Mykola Kvach <mykola_kvach@epam.com>
Signed-off-by: Dmytro Semenets <dmytro_semenets@epam.com>
2023-09-01 17:44:15 +02:00
Mykola Kvach 26c9721b67 fs: littlefs: add alignment arg to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro
Add alignment parameter to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro, it
speeds up read/write operation for SDMMC devices in case when we align
buffers on CONFIG_SDHC_BUFFER_ALIGNMENT, because we can avoid extra copy
of data from card bffer to read/prog buffer. See, how 'card_read_blocks'
function works.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
2023-09-01 17:44:15 +02:00
Johan Hedberg e3d5f5072f doc: redirects: Add redirects for renamed Intel boards
The ehl_crb and rpl_crb boards directories were renamed to intel_ehl and
intel_rpl respectively.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-09-01 17:40:30 +02:00
Andrei Emeltchenko db7dced87c net: wifi_utils: Add missing break
Add missing break statement.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-01 16:37:34 +02:00
Andrei Emeltchenko 2e3694c94f tests: modem: Fix using wrong size of char array
Convert pointer to string literal to array of char so that sizeof()
can correctly calculate size. Currently sizeof(msg) is effectively
sizeof(char *).

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-01 16:37:34 +02:00
Steve Boylan 85cbc7a96e drivers: spi: spi_pico_pio: Add basic support for SPI via PIO
Add fundamental feature support for RP2040 PIO SPI peripherals.
This commit implements synchronous transfer with 8-bit MSB
format.  Using PIO allows any GPIO pins to be assigned the roles
of CS, CLK, MOSI, and MISO.

Optional features not implemented yet:

  - Interrupt based transfer
  - DMA transfer
  - Slave mode
  - Varying word size
  - 3-wire SPI support
  - LSB-first

Updated in response to review comments.
Further updates from second round of review.
Rename spi_pico_pio.c source to match zephyr/MAINTAINERS.yml
Remove unnecessary initialization code.
Resolve merge conflicts

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2023-09-01 16:36:41 +02:00
Umar Nisar 31a6594212 drivers: loapic: add device tree support for loapic
As per #26393, Local APIC is using Kconfig based option for
the base address. This patch adds DTS binding support in the driver,
just like its conunter part I/O APIC.

Signed-off-by: Umar Nisar <umar.nisar@intel.com>
2023-09-01 16:36:18 +02:00
Gerard Marull-Paretas a4858c40ec scripts: build: elf_parser: _DEVICE_STRUCT_HANDLES_OFFSET is optional
It is only available if CONFIG_DEVICE_DEPS=y, so the ZephyrElf class
would fail to load if it does not treat _DEVICE_STRUCT_HANDLES_OFFSET as
optional.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-01 15:50:32 +02:00
Pavel Vasilyev 78d9ebb51d tests: Bluetooth: tester: Change mesh nrf board to nrf52840dk_nrf52840
Mesh tester doesn't fit into nrf52dk_nrf52832.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-09-01 15:09:07 +02:00
Daniel Leung 2d78cb74bd cmake: modules/FindGnuLd: cache variable GNULD_VERSION_STRING
This changes to cache variable GNULD_VERSION_STRING across cmake
runs. This variable is used to determine whether -Wl,-no-pie is
being passed to linker. However, if cmake is run multiple times
without clearing the build directory, GNULD_VERSION_STRING was
lost and the script falsely assumed the linker could not take
this argument, and thus omitting it during linking. Depending on
the host, it would warn on something like this:

  /usr/bin/ld.bfd: app/libapp.a(main.c.obj):
      warning: relocation in read-only section
      `.text._posix_zephyr_main'
  /usr/bin/ld.bfd: warning: creating DT_TEXTREL in a PIE

To fix this, simply caches GNULD_VERSION_STRING so it can be
used during subsequent cmake runs.

Fixes #61725

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-09-01 09:02:38 -04:00
Alberto Escolar Piedras 69643d575d tests drivers.flash.common.default: Fix allow list
qemu_x86 was listed as an integration platform but not in the
allow list causing twister to fail:

Error found:
tests/drivers/flash/common/drivers.flash.common.default
on qemu_x86 (Not in testsuite platform allow list but is one
of the integration platforms)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-01 08:59:49 -04:00
Carles Cufi a7b0ce614a release: Introduce a migration guide
Instead of documenting API changes, deprecations, additions and
deletions in the main release notes, create a new specific document to
help users migrate from one release to another one.

This new document has only two sections:

- Required changes
- Recommended changes

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Co-authored-by: Benjamin Cabé <kartben@gmail.com>
2023-09-01 14:05:46 +02:00
Alberto Escolar Piedras 4f0b2a0bf6 tests lwm2m_rd_client: Allow only on native_posix
This test is too dependent on the exact order of events,
and known to fail in most platforms but native_posix.
To mitigate the issue and avoid blocking development
due to failed CI tests, let's only allow the test in
native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-01 13:59:12 +02:00
Huifeng Zhang b38e1cd62a boards: fvp_baser_aemv8r_aarch32: disable d-cache
Disable d-cache on the fvp_baser_aemv8r_aarch32 platform because there
are some issues when d-cache is enabled for now.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-01 13:23:26 +02:00
Huifeng Zhang af2ecf4051 boards: fvp_baser_aemv8r: enable cache_state_modelled
Let FVP_BaseR_AEMv8R simulate the operation of cache-related.

This will slow the speed of FVP_BaseR_AEMv8R but it can obtain realistic
simulation results as much as possible. So the timeout_multiplier needs
to be increased.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-01 13:23:26 +02:00
Huifeng Zhang 1b9c824f0b arch: arm64: arm_mpu: enable d-cache
Enable d-cache at the stage of the EL1 initialization and fix some cache
coherence issues.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-01 13:23:26 +02:00
Huifeng Zhang acfa9a06c9 boards: fvp_baser_aemv8r: adjust the base address of device_region
Change the base address of device_region to 0x9a000000 to avoid overlay
with the flash region.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-01 13:23:26 +02:00
Huifeng Zhang 4eee1e8172 arch: arm64: arm_mpu: optimize ram region attribute
Ram, ram_text and ram_ro regions will be accessed by all CPUs, so that
setting them to INNER_SHAREABLE is more reasonable.

'rbar' occupies 6 bits, correct it to 6.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-09-01 13:23:26 +02:00
Jonathan Rico 434ea2b2ff Bluetooth: hci_rpmsg: flush the logs before locking CPU
The logs were not visible when an assert fired on the controller and
`CONFIG_BT_HCI_VS_FATAL_ERROR` was not set.

Putting the logs in panic mode before entering the infinite loop fixes
that.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-09-01 13:23:17 +02:00
Emil Gydesen 0617b2a5e5 Bluetooth: Audio: Add struct cast to BT_AUDIO_CODEC_QOS
Add a cast to struct bt_audio_codec_qos for the macro so
that the returned value can used for e.g. sizeof or
similar.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-01 13:23:09 +02:00
Hake Huang 903a79431a tests: driver: flash_default limited on tier one boards
remove mcux test scenario, which is overlapped with default
limit test to boards listed in the boards list

fixing: #62067

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2023-09-01 13:22:42 +02:00
Mariusz Skamra 0197d1154a Bluetooth: audio: lc3: Fix build error
This fixes build error caused by redundant comma without expression
lc3.h:269:74: error: expected expression before ',' token
  269 |          (_max_frames_per_sdu)))),                         \
      |

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-09-01 13:22:36 +02:00
Francois Ramu 4e070a0867 drivers: sensor: stm32 Vref sensor calibration on 12bit
The Calibration value of the VRef on stm32U5 is acquired on 14Bit by ADC1
and should be adjusted on 12bit becasue the resolution is 12bit
in this stm32_vref driver.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-09-01 13:22:24 +02:00
Ali Hozhabri be5cf2ddb9 driver: bluetooth: hci: fix potential "block forever" issue
Interrupt is enabled before reset is released to make sure that the
first IRQ edge is captured, and rx thread can process it.

Remove delay in spi_open as it was redundant due to the "sem_initialised"
semaphore.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-09-01 13:22:08 +02:00
Ali Hozhabri ef1f6417ff boards: shields: x_nucleo_idb05A1: Fix chip select active state
Set also controller data delay to zero, as it is not needed in BlueNRG-MS.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-09-01 13:22:08 +02:00
Ali Hozhabri 6d9f2a9143 drivers: bluetooth: hci: spi: Revert to edge sensitive interrupt. (#59459)
Solved also a mutex issue with SPI access.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2023-09-01 13:22:08 +02:00
Andrei Emeltchenko 60e8d9d859 tests: btp_bap: Fix using wrong index
Fix using cig_id instead of index i

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-01 09:55:05 +02:00
Daniel DeGrasse 299689716e samples: ipc: openamp: update build documentation
Update build documentation for openamp sample, to reflect that sysbuild
is required when building this sample. Sysbuild is needed to build both
core images in one step.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-09-01 09:54:38 +02:00
Alberto Escolar Piedras 9c0b12947e tests: interrupt util: Fix for native/posix targets
This utility header was accessing directly the interrupt
controller HW models, but those are not an interface one
can expect to not change, or to be avaliable in different
targets.
Instead we change it to use the APIs we have a contract
about, that is, the ones all POSIX arch boards are
expected to provide.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-01 09:54:27 +02:00
Alberto Escolar Piedras cefe57f1e3 arch POSIX: Add two missing prototypes to header
The posix_soc_if.h header includes all functions
one can expect any native board will provide.
These two functions (to set and clear an interrupt
from SW) were missing, but they are also required.
Add them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-09-01 09:54:27 +02:00
Emil Gydesen 76e35635b6 Bluetooth: Audio: Rename codec qos framing
Rename BT_AUDIO_CODEC_QOS_[UN]FRAMED to
BT_AUDIO_CODEC_QOS_FRAMING_[UN]FRAMED and give a name
to the enum, which is then used by the
struct bt_audio_codec_qos.

The rename was needed as we had a codec_qos initializer of the
same name, so the values were renamed to avoid duplicated
macro names.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-09-01 09:54:18 +02:00
Andrei Emeltchenko 2fabcb4bf2 scripts: build_grub: Correct grub build script
Update script since old build script is not working anymore.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-09-01 09:53:56 +02:00
Anisetti Avinash Krishna 235ff29567 boards: x86: intel_adl: Added support for RTC
Added RTC support for ADL platform

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-01 09:52:43 +02:00
Anisetti Avinash Krishna 9d5b799bed dts: x86: intel: alder_lake: Added RTC instance
Modified counter instance to support both counter and RTC.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-09-01 09:52:43 +02:00
Sreeram Tatapudi 09a07e42c0 drivers: cat1: Updates to support latest version of HAL/PDL
- Refactoring to support latest versions of HAL/PDL

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2023-09-01 09:52:25 +02:00
Kenneth J. Miller 044de03d57 drivers: serial: stm32: Fix flawed runtime config check
Replace incorrect and limited runtime parity/data bits conditional
configuration with build-time logic using BUILD_ASSERT. This allows for
more flexible UART configurations, while preventing invalid DTS
configurations at build-time.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kenneth J. Miller 5217a17214 drivers: serial: stm32: Consolidate UART config
Move overlapping UART parameter configuration to new
uart_stm32_parameters_set function. This function is called by
uart_stm32_configure upon application/subsystem configuration, and
uart_stm32_registers_configure upon (re-)initialization of driver
instances.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kenneth J. Miller 31a6e31cee drivers: serial: stm32: Refactor for PM handling
Move clock enable and register configuration to their own functions in
preparation for later uart_stm32_reinit function that will use these in
addition to uart_stm32_init.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kenneth J. Miller c8ffeb47f7 drivers: serial: stm32: Add persistent uart_config struct
Add static uart_config struct to init macro with corresponding pointer
as uart_stm32_config struct member. This struct will store boot and
runtime UART configuration for reinitialization upon exiting low-power
modes, where register contents might be lost.

Remove hw_flow_control, parity, and baud_rate from uart_stm32_config and
uart_stm32_data structs, respectively, as the need for these is now
obviated by the presence of the uart_config struct, which contains
equivalent members.

Add default baudrate, parity, stop, and data bits constants, used to
initialize the uart_config struct, in case the corresponding UART DT
properties are not set.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kenneth J. Miller bde1cd8d38 drivers: serial: stm32: Move boot-time config to data
Move reset configuration from uart_stm32_data to
const uart_stm32_config struct, as this is set once at boot and isn't
modified during runtime.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kenneth J. Miller 2531d70ad2 drivers: serial: stm32: Make header file self-contained
Move select include directives from source to header file, as these pull
data types required by the struct definitions contained within it.

This promotes a more modular file structure.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-09-01 09:51:55 +02:00
Kai Vehmanen 5689916a70 soc: xtensa: intel_adsp: cavs: fix assert on L3_MEM_BASE_ADDR
The assert on L3_MEM_BASE_ADDR is incorrect, we need must convert
to uncached before use.

Fixes: ffd2121c65 ("soc: xtensa: intel_adsp: cavs: fix
  power_down_cavs() signature")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-31 17:43:47 -04:00
Kai Vehmanen 34ea488da9 intel_adsp: ace20_lnl: add ALH DAI support
Add missing definitions for ALH DAIs. Keep the same FIXME
reminder in the comments we have for ACE1.5 that explains
the background of these definitions.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-08-31 17:43:16 -04:00
Maciej Perkowski fb9a6af700 scripts: west_commands: Allow passing source dir when looking for test
Before, only following way of getting test-item build was supported:
`west build -b <BOARD> -T <PATH_TO_SOURCE/TEST_NAME>`
This commit allows to also call it by:
`west build -b <BOARD> <PATH_TO_SOURCE> -T <TEST_NAME>`

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-08-31 12:06:18 -07:00