The TTC provides three independent hardware counters supporting
free-running and interval modes, accessed via MMIO registers.
This driver implements the Zephyr counter API, including start/stop,
read, alarm, and top value configuration. Alarm events are delivered
using match interrupts.
Dynamic IRQ connection is used to support platforms where multiple
TTC counter instances share the same interrupt line. Each IRQ is
registered only once at runtime, and the ISR dispatches pending
events to all TTC instances mapped to that interrupt, ensuring correct
handling for both shared and dedicated interrupt configurations.
Signed-off-by: Satya Sri <satyasri.katru@amd.com>
The BMI270 exposes an on-chip temperature sensor in registers
TEMPERATURE_0/1 (0x22/0x23). Add support for SENSOR_CHAN_DIE_TEMP so
applications can read it through the standard sensor API.
bmi270_init() now sets PWR_CTRL.temp_en, bmi270_sample_fetch() reads
the 16-bit value, and bmi270_channel_get() converts it using the
datasheet formula T = raw / 512 + 23 degrees C, returned in micro-
degrees through val1/val2.
Signed-off-by: Vignesh Pandian <vignesh@aerlync.com>
Rename CONFIG_STM32_MEMMAP to CONFIG_FLASH_STM32_NOR_MEMMAP for clarity
since it only concerns STM32 Flash drivers.
Same change is applied on MCUboot side upstream.
Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
Adding a binding property to enable speaker output and updating the
driver to support driving the speaker in addition to the headphone
outputs.
Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
Advanced scan ignored the configured dwell times because the
driver only updated local variables instead of the advanced scan
configuration structure. Set the active and passive channel times
on the advanced scan config directly.
Signed-off-by: Tejus Subramanya <ters@silabs.com>
Enable the GPIO subsystem when the driver is enabled if disconnect-gpios
are provided on a node with compatible `st,stm32-usb` or if an ULPI PHY
provides reset-gpios.
The second case should be handled at a generic level, but ULPI PHYs have
always been managed as part of the STM32 driver for historical reasons.
Since no SoC family other than STM32 seems to use ULPI PHYs, this code
remains vendor-specific for now.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when cd-gpios or pwr-gpios are used on
any STM32 SDMMC node and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when ce-gpios are used on any STM32 QSPI,
OSPI or XSPI node configured as MSPI controller and the corresponding
driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when reset-gpios or power-gpios are used on
any STM32 FMC node configured for usage as MIPI DBI host controller
and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the GPIO subsystem when reset-gpios are used on any STM32 QSPI,
OSPI or XSPI flash node and the corresponding driver is enabled.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use Zephyr's standard MMIO abstraction API by introducing
DEVICE_MMIO_NAMED_RAM/ROM(core) in the driver's data and
config structs, mapping the region at initialization time
with DEVICE_MMIO_NAMED_MAP, and routing all register accesses
through a uhc_dwc2_get_base() helper that calls DEVICE_MMIO_NAMED_GET.
These changes allows the driver to be useful on MMU-based
platforms like Broadcom BCM2711 SoC.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Allow the MCUX QTMR counter driver to use clock providers without a
named clock cell, such as fixed-clock.
Existing users with named clock cells keep the previous behavior.
Also use the filter-period devicetree property when configuring the
QTMR fault filter period.
Signed-off-by: Samuel Slesar <samuel.slesar@nxp.com>
Fix two issues in fpga_mpfs.c:
1. Remove invalid (uint8_t *) cast on format string literal.
sprintf() expects const char*, not uint8_t*. The cast suppresses
the implicit-function-declaration warning but is semantically wrong
and produces -Wint-conversion warnings on strict compilers.
2. Replace sprintf() with snprintf() to prevent potential buffer
overflow. The FPGA_design_ver buffer is 30 bytes and the formatted
string "Design Version : 0x%x" can reach 29 characters with a
full 32-bit value (0xffffffff), leaving no margin.
Signed-off-by: Srikanth Patchava <spatchava@meta.com>
Implement a driver for the ADC ADS1220.
Currently only the single shot mode is supported.
Origin: Original
Signed-off-by: Hasler Pauline <phasler@baumer.com>
The RX buffer was cleared only when a message was consumed by
ucpd_get_rx_pending_msg(). Receptions not passed to the TCPM layer
(GoodCRC, filtered SOP'/SOP'', BIST or an errored message) left
stale order-set and header bytes behind, which the next poll of
ucpd_get_rx_pending_msg() reported as a pending message.
Discard the buffer at the end of the RXMSGEND handler whenever
UCPD_EVT_RX_MSG was not set, so only delivered messages remain
readable.
Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
Three comment-only fixes found while auditing the arch interface:
- include/zephyr/arch/common/addr_types.h still carried the 'x86
address types' banner from before it was generalized into the
common arch headers.
- include/zephyr/arch/exception.h documented its callback typedefs
as exception_dump_hook_t and exception_drain_hook_t while the
actual typedef names are arch_exception_dump_hook_t and
arch_exception_drain_hook_t.
- intc_gicv3.c referenced z_arch_el3_plat_init, which does not
exist; the platform hook is named z_arm64_el3_plat_init.
No functional change.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is useful to reduce the size of mcuboot builds, so it can fit into the
16K bootloader flash area outside of the main flash, which many Silabs SoCs
have.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
The set_contrast function of the ST7567 display driver now expects a
contrast value in the range 0-255, instead of 0-63.
The driver now scales the value to the 6-bit range expected by the
controller.
CONFIG_ST7567_DEFAULT_CONTRAST has been updated.
Signed-off-by: Florian Moesch <florian.moesch@draeger.com>
The wifi_mgmt iface_status callback gained a struct net_if
pointer parameter, but esp_hosted_status was left with the old
signature, causing an incompatible pointer type error at driver
registration. Add the missing net_if parameter to match the
callback interface.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The power-on pulse re-powers a modem that returns to its default UART
rate, since AT+IPR is not persisted across a power cycle. When the host
UART was switched to CONFIG_MODEM_CELLULAR_NEW_BAUDRATE the two ends no
longer agree, so re-initialization runs at a mismatched rate and never
completes.
Revert the host UART to the original baudrate before pulsing the power
pin, mirroring the reset path (0ba20dd96c). Guarded by original_baudrate
so it is a no-op for modems that do not switch rate.
Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
Register sleep retention for HP I2C ports when peripheral power-down
is enabled, and hold pm_policy_state locks during transfers, bus
recovery, and target mode.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Adjust base_timestamp_ns backward from the trigger timestamp by
(N-1)*period so it reflects the time of the first FIFO sample,
matching the lsm6dsv16x reference implementation.
Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit f73d9b122431cd7bcfeb24b67c170241a1a61d98)
Update to avoid holding the spinlock before the blocking k_sem_take()
calls. Acquiring the spinlock only for the short register-write
sequences, allowing the ISR to fire and give the semaphores during the
blocking waits.
The check of "Context switching while holding lock" is introduced by
commit 5183fc5693 ("kernel: assert no spinlock is held on swap when
!USE_SWITCH")
Signed-off-by: Tony Han <tony.han@microchip.com>
Fixes a bug in the protimer counter driver where the top callback
was not being called when the top value was reached.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Modify existing Silicon Labs EFR32 driver and defconfigs
in order to support Coordinated Sampled Listening.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Add steps to remove stale metadata from Enhanced ACK path,
along with correctly using key identifier context.
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Use the `%zu` format specifier when printing `size_t` values instead of
`%u`. On 64-bit platforms, using an incorrect format specifier is
causing compiler warnings due to type mismatches.
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Rename the existing full-speed uhc quirk to the speed specific
espressif,esp32-usb-otg-fs compatible, that was introduced
in #111508.
Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
Pre-count FIFO frames for the requested channel and adjust
base_timestamp_ns backward from trigger time by (N-1)*period so it
reflects the time of the first sample, matching the lsm6dsv16x
reference implementation.
Fixes: #98720
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
(cherry picked from commit 750d08206d5ec13a7c171ede9cea00dcc8aab9f6)
Use LINKER_DT_NODE_REGION_NAME_TOKEN() when assigning the flash simulator
backing array section.
Using LINKER_DT_NODE_REGION_NAME() passes a quoted string into
Z_GENERIC_SECTION(), which produces a literal section named "FlashSim"
instead of FlashSim. The linker memory-region section matcher expects the
token form, so the array was not placed in the configured RAM region.
This is needed to be able to build with zephyr/llvm on some platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
DEVICE_API already includes const, with another const,
clang warns us about the double specifier.
Remove it to avoid the warning.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
DEVICE_API already includes const, with another const,
clang warns us about the double specifier.
Remove it to avoid the warning.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Adds support for the TI TLA2528 I2C ADC with GPIOs.
The TLA2528 is a 12-bit 8-channel ADC, where each channel can also be
configured as a GPIO in- or output in push-pull or open-drain.
Signed-off-by: Oliver Schmidhauser <oliver.schmidhauser@leica-geosystems.com>
Allow hl78xx_gnss_set_search_timeout() to update the GNSS search
timeout while a search is already in progress.
When GNSS is searching, a new timeout value now reschedules the
active timeout work item. Setting the timeout to 0 disables the
active search timeout. Additional timer cleanup is performed when
leaving the search state and when GNSS stop events are received.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add esp32c5 and esp32p4 support to the esp32 mailbox driver. The HP and
LP cores signal each other through the PMU software interrupt, the same
mechanism used on the esp32c6, with the esp32p4 LP interrupt status bit
handled per its register layout.
The esp32p4 LP core uses a multi-vectored interrupt controller that
jumps directly to the handler, so tag the LP PMU handler with
LP_CORE_ISR_ATTR so it saves and restores registers and returns with
mret; on the single-vector esp32c5 and esp32c6 the attribute is empty.
Also shrink the esp32p4 LP ulp_ram region so it stops before the shared
ulp_shm block that holds the mailbox coordination data, matching the HP
view and preventing the loader from clobbering it.
Mark the esp32c5 and esp32p4 mailbox nodes okay to match the other socs.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
On USCI the shallow buffer is not SPI FIFO buffers RX words.
The pipelined pattern can't work. So revised spi_numaker_usci_txrx.
More, USCI SPI only supports 4–16 bit words, not accepts 24/32.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
The value 2 of "phy-connection-type" is for "gmii" and it is misused
for "rgmii".
Fix the value the driver and update "phy-connection-type" from "gmii"
to "rgmii" in the dts file for sama7g54-ek board.
Signed-off-by: Tony Han <tony.han@microchip.com>
Keep the XTAL powered during sleep when it is the RTC_FAST source by
enabling the RTC_FAST_USE_XTAL sleep sub-mode, and align P4 clock init
(rc_fast bias) with the reference. Add a deep_sleep sample overlay.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix relative include paths after moving standalone modem drivers into
per-driver subdirectories.
Update legacy HL7800, Quectel BG9x, ST87Mxx, u-blox SARA R4, and WNC
M14A2A sources to include shared modem helper headers from the new
directory depth.
Also clean up the ST87Mxx Kconfig select ordering after the move.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Move standalone vendor modem drivers into per-driver subdirectories.
Relocate the legacy HL7800, Quectel BG9x, ST87Mxx, u-blox SARA R4, and
WNC M14A2A source and Kconfig files under dedicated directories. Rename
the SIMCOM Kconfig file to Kconfig.simcom for consistency with the other
driver directories.
Update the standalone modem CMake and Kconfig files to reference the new
paths.
This keeps the vendor_standalone directory organized and leaves the
expanded HL78XX driver in its own directory alongside the other modem
drivers.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
adxl362 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.
The memset and header initialization were also inside the loop body,
which zeroed previously decoded readings on each iteration. Split the
decode into separate SENSOR_CHAN_DIE_TEMP and accel loops, moving the
memset and header setup (base_timestamp_ns, shift) before each loop and
setting reading_count to the actual decoded sample count afterwards.
While here, fix two coupled bugs exposed once multiple readings are
reported:
- the temperature path memset used sizeof(struct sensor_three_axis_data)
on a struct sensor_q31_data buffer, zeroing past the end of the
smaller struct; use sizeof(struct sensor_q31_data) instead.
- sample_num was never incremented in the loop, so every reading was
given an identical timestamp_delta; increment it per decoded sample.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
adxl372 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.
Set reading_count to the actual decoded sample count after the loop
completes.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
adxl355 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.
Set reading_count to the actual decoded sample count after the loop
completes.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
adxl345 hardcoded reading_count = 1 despite its decode loop being
capable of filling multiple readings[] entries up to max_count.
Set reading_count to the actual decoded sample count after the loop
completes.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>