Introduce a new API function in the sdmmc_stm32 driver that allows
applications to access the Card Specific Data (CSD) register of the
SD/MMC card. This functionality, already available in the SPI-based SD
and MMC subsystems, was previously missing from the STM32 SDMMC driver.
This enhancement enables use cases such as verifying the correct SD card
during manufacturing, ensuring that OEMs use the specified SD card, and
preventing mismatches.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
Move the helper file arm_mpu_mem_cfg.h, which translates the values
of the Kconfig symbols CONFIG_FLASH_SIZE and CONFIG_SRAM_SIZE to size
definitions to be used during MPU setup, from a Cortex-M-specific
include directory to the Cortex-agnostic zephyr/arch/arm/mpu directory,
as:
- the contents of this header file are not dependent on the target being
an ARMv7M, only ARMv8M is excluded, but the contents are identical
for the ARMv7/8 Cortex-R MPU implementation,
- the header file zephyr/arch/arm/mpu/arm_mpu.h, included within
arm_mpu_mem_cfg.h, is also compatible with both Cortex-M and Cortex-R,
the distinction between the two implementations takes place at an
even lower level,
- several ARMv7/8 Cortex-R targets now reference this header file in their
MPU region setup (Xilinx ZynqMP, TI K3, Renode cortex_r8_virtual) while
so far referencing it in an ARMv7 Cortex-M-specific include directory.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
This reverts commit 3462a489f0 that
was marked as hotfix and merged despite reservations from
ARC maintainer
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Added sys_read64 and sys_write64 functions for 64-bit memory operations,
similar to sys_read32 and sys_write32.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The BT_FIXED_PASSKEY Kconfig option is being deprecated, and is replaced
by BT_APP_PASSKEY. The reason for the deprecation is an upcoming
errata, ES-24489, which mandates that a new passkey shall be generated
for each pairing procedure.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds the BT_APP_PASSKEY Kconfig, which allows the application to provide
passkeys for pairing using the new `app_passkey()` callback.
This is an alternative to BT_FIXED_PASSKEY, which will be deprecated in
a later commit.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Add missing OTGHS_SEL macro to STM32WBA clock header. This macro applies
only to certain SoCs of STM32WBA6x series.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adjusted GET_ARG_N and GET_ARGS_LESS_N to use UTIL_CAT instead of simple
concatenation. This allows to use a macro as the argument N instead of
only numbers.
Adjusted the unit tests to showcase this.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Allow the emulator to be set to an arbitrary UTC time, instead of being
locked to reporting the current system uptime as UTC.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Provide an escape hatch from the GNSS API requirement that a device
be active to run the configuration `get` functions. This is useful in
the context of an emulator device to query how other software modules
have configured the GNSS.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add an option for the GNSS fix state reported by the emulated GNSS modem
to be manually configured by test code, instead of being hardcoded to
always achieve a fix of hardcoded parameters after 5 seconds.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move cpu_load to lib/os, as this functionality on its own does not
justify being a subsystem on its own.
Fixes#95498
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Updated Doxygen for sensor_decoder_api.get_frame_count().
* Reworded grammar
* Changed channel to chan_spec to reflect data type
* Changed return value from ENOTSUP to EINVAL to be consistent with
sensor_decoder_api.decode()
Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
Hashing takes an input buffer, and writes the result in a separate
output buffer. Therefore, the input can be marked as constant, so that
constants can be supplied directly to the hashing context without any
intermediate copy, and without having to perform a type-unsafe cast
from (const uint8_t *) to (uint8_t *)
Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
- add clock_init function to initialize clock sources according
devicetree settings
- finish basic clock api function
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Adds a new kconfig CONFIG_MEM_DOMAIN_HAS_THREAD_LIST so that
only the architectures requiring to keep track of threads in
memory domains will have the necessary list struct inside
the memory domain structs. Saves a few bytes for those arch
not needing this.
Also rename the struct fields to be most descriptive of what
they are.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds support for the USB device binding for MCTP. Binding created based on
the DMTF specification for USB Transport Binding. The overall design of
this binding follows the existing UART and I2C+GPIO bindings that already
exist in Zephyr.
Signed-off-by: Eric Ocasio <eric.ocasio@nxp.com>
To enable quality-of-service (QoS) applications, allow filters to modify
the priority of an incoming packet. This allows that processing can be
done on tc-queue-threads with different priorities.
Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
Instead of user trying to figure out what is the amount of file /
socket descriptors in the system, let the various subsystems etc.
specify their need using a Kconfig option. The build system will
then add these smaller values together and set a suitable file
descriptor count in the system.
This works the same way as the heap size calculation introduced
in commit 3fbf12487c
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add a callback for the periodic script result so that applications have
a way of detecting dead links.
Signed-off-by: Jordan Yates <jordan@embeint.com>
These represent the outputted frequencies of the AUXPLL of
different settings set in the device tree set using dt-bindings
in nrf-auxpll.h. This is added to remove the need for 'magic numbers'
in drivers and tests.
Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
This parameter no longer needs to be configured at the SoC level in
the declarations of the GEM controller instances (used to require
different values for the Zynq-7000 and the ZynqMP) as the value matching
the current target SoC is now being read at run-time from a design
configuration register.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Add the function `bt_hfp_hf_query_list_of_current_calls()` to support
users to query current call list.
Add the callback `bt_hfp_hf_cb::query_call` to notify the received
current calls.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add new flag to allow to select normal non-cacheable memory.
This is needed for armV7 to be able to configure non cacheable
memories with "normal" attribute instead of "device" attribute.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Moved the MSI init after the LSE init to respect the initialization flow
of the MSI PLL mode that need LSE to be enabled and ready.
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
The HDC302X sensor driver is added,
you can use this driver to read temperature and humidity.
Also set an offset, upper and lower limits to get warned
when temperature or humidity get out of band.
The sensor is build for ultra low power applications.
Signed-off-by: COUSSEMENT Stijn <stijn.coussement@psicontrol.com>
The max30101 sensor driver doesn't support triggers.
Add `.trigger_set` API and corresponding Kconfig and
device tree parameters. Add `SENSOR_CHAN_AMBIENT_LIGHT`
and `SENSOR_TRIG_OVERFLOW`.
Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
Implement Modem Status Command(MSC) and a per DLC flow
control by using it.
Send flow control signals when our input buffer don't fit
full frame anymore.
Stop TX if we have received from controls on MSC.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add missing inclusion of stddef.h and stdbool.h to respectively define
size_t and bool types used in some cache.h function declarations.
This change prevents build errors like:
.../include/zephyr/arch/cache.h:105:41: error: unknown type name 'size_t'
105 | int arch_dcache_flush_range(void *addr, size_t size);
| ^~~~~~
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Replace `sizeof(unsigned long)` with `PMPCFG_STRIDE` (defined as
`__riscv_xlen / 8`) for dimensioning PMP configuration register arrays
(`pmpcfg_regs`).
The size of PMP configuration registers should be derived directly from
the target architecture's XLEN. Using `sizeof(unsigned long)` can cause
size mismatches, particularly with static analysis tools like SonarQube.
These tools might assume a host-specific size for `unsigned long`,
leading to spurious out-of-bounds access warnings when analyzing code
for different RISCV base architectures (e.g., RV32 vs. RV64).
This change ensures the array sizing is correctly and consistently tied
to the target's register width (XLEN).
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Apparently some compiler may expect the fields initialized in a certain
order when there are anonymous fields in a struct.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:
Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#
Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
for devices larger than 16MB
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Document the ownership contract and callback semantics for L2CAP
transmission buffers:
- Extend tx_queue documentation in bt_l2cap_le_chan to explain SDU/PDU
storage, callback handling, and transmission order semantics
- Document bt_l2cap_create_frag responsibilities regarding callback
invocation after HCI Number of Completed Packets or on disconnect
- Document bt_l2cap_send_pdu callback contract: invoked exactly once
after transmission completes or with -ESHUTDOWN on disconnect
These documentation additions clarify the requirements for proper
buffer lifecycle management and callback invocation throughout the
L2CAP transmission path.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Previously, the `sigev_notify_function` field was missing from
`struct sigevent`. Additionally, `sigev_notify_attributes` were
incorrectly named `sigev_thread_attr`.
Add it back to ensure that we are able to support realtime signals.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
In order to avoid warnings, declare `union sigval` ahead of
`struct sigevent` and declare `siginfo_t` ahead of `struct sigaction`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A previous typo went undetected that declared a type-defined
`sigevent_t`, which is obviously incorrect, since it is only specified as
`struct sigevent`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
A previous typo went undetected that declared a type-defined
`timespec_t`, which is obviously incorrect, since it is only specified as
`struct timespec`.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
C11 requires `<time.h>` to define `struct timespec`, so do not define
it when C11 is already known.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Avoid redefining `time_t` by always including the definition from
`<time.h>`, since the C library may use something other than `long`.
This is still safe according to the specification, since it explicitly
states:
> Inclusion of the <signal.h> header may make visible all symbols from
> the <time.h> header.
For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
These additions enhance the flexibility of the MIPI DSI host configuration
for STM32U5 series, enabling finer control over the DSI PLL and PHY
settings.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
When compiling with C++ enabled (CONFIG_CPP), add an unused member to
prevent an empty struct; this makes the struct size the same for both C
and C++.
Fixes the following warnings:
In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:32:
In file included from include/zephyr/kernel_structs.h:29:
In file included from include/zephyr/arch/structs.h:29:
include/zephyr/arch/riscv/structs.h:11:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
11 | struct _cpu_arch {
| ^
In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:36:
In file included from include/zephyr/arch/cpu.h:25:
In file included from include/zephyr/arch/riscv/arch.h:18:
include/zephyr/arch/riscv/thread.h:68:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
68 | struct _thread_arch {
| ^
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Add initial support for Nuvoton NuMaker-M333x SoC series,
including basic initialization and device tree includes.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
The function `log_backend_std_get_flags` was not documented.
Create a doxygen style documentation for it.
Signed-off-by: Kiara Navarro <knavarro@paltatech.com>