Commit graph zephyr/drivers
Author SHA1 Message Date
Camille BAUD
a16c10f4cc drivers: clock_control: Move handling of flash clock to flash driver
Handle flash clocking in the flash driver in a coherent way

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-23 17:36:21 -04:00
Camille BAUD
fc4fe0f14d drivers: pinctrl: Update BFLB pinctrl to handle SF controller
The organization has changed to have larger signal bitfield,
and handle sf pads swaps.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-23 17:36:21 -04:00
Mario Paja
c2d25196b0 drivers: i2s: stm32 sai fix wrong return
This change fixes wrong return

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-06-23 09:12:07 -04:00
Mario Paja
050012a4e2 drivers: i2s: stm32 sai implement config_get api
These changes add config_get api support

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-06-23 09:12:07 -04:00
Bill Waters
1133fccd6b drivers: i2c: infineon_pdl: use per-instance SCB config copy
The CAT1 PDL I2C driver mutated a single file-scope global
_i2c_default_config at run time (i2cMode, slaveAddress, slaveAddressMask
and ackGeneralAddr) from ifx_cat1_i2c_configure(). With more than one I2C
controller instance, one instance's configure() call could corrupt the
configuration of another, and the dev_config == 0 path read i2cMode back
from the shared global, potentially observing a value left behind by a
different instance.

Make _i2c_default_config a const read-only template and give each
device instance its own mutable copy (scb_config) in struct
ifx_cat1_i2c_data. The copy is seeded from the template in
ifx_cat1_i2c_init() before the first configure() call, and all reads and
writes in ifx_cat1_i2c_configure() now operate on the per-instance copy,
which is also passed to Cy_SCB_I2C_Init(). This keeps each controller's
mode and address state isolated while preserving the existing read-back
semantics on a per-instance basis.

Reset slaveAddressMask and ackGeneralAddr to their defaults in the
controller-mode branch of configure(). The PDL consults these slave-only
fields only in target mode, but because scb_config is now a persistent
per-instance copy, an earlier target configuration would otherwise leave
a stale 0xFE mask in the struct across a target-to-controller switch.

The Infineon SPI drivers were swept for the same pattern; they already
copy the SCB config into a local variable before mutating it, so no
change was needed there.

Built tests/drivers/i2c/i2c_api for
kit_pse84_eval/pse846gps2dbzc4a/m55 to confirm the driver compiles and
links.

Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-06-23 09:11:59 -04:00
Fin Maaß
c68308c3f5 drivers: i2c: rename i2c_is_reset_op into i2c_is_restart_op
rename i2c_is_reset_op into i2c_is_restart_op.
restart is the right name.
this function was only added after the last release,
so this is not a breaking change.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-23 09:11:27 -04:00
Nicolas Pitre
97fac4b782 kernel: mmu: remove LINKER_USE_PINNED_SECTION and __pinned_* tagging
CONFIG_LINKER_USE_PINNED_SECTION is the second half of the selective
kernel-pinning model removed in issue #108773. With the kernel image
now always resident at boot (previous commit), the __pinned_*
attribute family is a no-op: every page they would have segregated is
already pinned by z_mem_manage_init()'s whole-image loop, so the
tagging contract neither adds safety nor remains maintainable.

Drop it.

Mechanical removals:

* All ~219 in-tree uses of __pinned_text, __pinned_rodata,
  __pinned_data, __pinned_bss, __pinned_noinit, and __pinned_func
  across arch/x86, drivers/interrupt_controller, drivers/timer,
  arch/common, kernel, lib/libc, subsys/portability/posix, tests, and
  the syscall code generator (scripts/build/gen_syscalls.py).

* The assembly aliases PINNED_TEXT/RODATA/DATA/BSS/NOINIT used in
  arch/x86/core/ia32/*.S and drivers/interrupt_controller/
  intc_loapic_spurious.S become plain TEXT/RODATA/DATA/BSS/NOINIT.

* K_KERNEL_PINNED_STACK_DEFINE, K_KERNEL_PINNED_STACK_ARRAY_DEFINE,
  K_KERNEL_PINNED_STACK_ARRAY_DECLARE, K_THREAD_PINNED_STACK_DEFINE,
  and K_THREAD_PINNED_STACK_ARRAY_DEFINE are removed. The few
  in-tree callers (kernel/init.c, arch/arm/core/cortex_a_r/smp.c,
  arch/arm64/core/fatal.c, arch/rx/core/prep_c.c,
  arch/x86/core/prep_c.c, kernel/include/kernel_internal.h,
  tests/bluetooth/hci_uart_async) move to the corresponding
  non-pinned macros.

Machinery removals:

* Kconfig.zephyr drops CONFIG_LINKER_USE_PINNED_SECTION.
  qemu_x86_tiny and qemu_x86_atom_virt drop their =y overrides.

* include/zephyr/linker/section_tags.h drops the __pinned_* macro
  definitions (both arms). __isr collapses to an empty macro since
  its only purpose was to alias __pinned_func.

* include/zephyr/linker/sections.h drops PINNED_TEXT_SECTION_NAME,
  PINNED_BSS_SECTION_NAME, etc. and the bare PINNED_TEXT/RODATA/etc.
  forwarders, plus the _APP_SMEM_PINNED_SECTION_NAME constant.

* include/zephyr/linker/linker-defs.h drops the lnkr_pinned_*
  externs, the _app_smem_pinned_* externs, and the lnkr_is_pinned()
  / lnkr_is_region_pinned() inline helpers.

* include/zephyr/linker/utils.h drops the lnkr_pinned_rodata branch
  in linker_is_in_rodata().

* include/zephyr/linker/app_smem_pinned{,_aligned,_unaligned}.ld
  are deleted; cmake/linker/ld/target_configure.cmake stops
  configuring them.

* boards/qemu/x86/qemu_x86_tiny.ld and
  include/zephyr/arch/x86/ia32/linker.ld drop their pinned-section
  blocks and the now-redundant #ifndef CONFIG_LINKER_USE_PINNED_SECTION
  conditionals throughout the body. The
  LIB_KERNEL_IN_SECT / LIB_ARCH_X86_IN_SECT / LIB_ZEPHYR_IN_SECT /
  LIB_C_IN_SECT / LIB_DRIVERS_IN_SECT / LIB_SUBSYS_LOGGING_IN_SECT /
  LIB_ZEPHYR_OBJECT_FILE_IN_SECT / ZEPHYR_KERNEL_FUNCS_IN_SECT macros
  in qemu_x86_tiny.ld are deleted; they existed only to feed the
  pinned text/rodata/data/bss/noinit sections.

* kernel/mmu.c drops the mark_linker_section_pinned(lnkr_pinned_start,
  ...) call. The mark_linker_section_pinned() helper survives but is
  now gated only on CONFIG_LINKER_USE_BOOT_SECTION.

* arch/common/init.c and include/zephyr/arch/common/init.h drop
  arch_bss_zero_pinned(); arch/x86/core/ia32/crt0.S drops the call
  to it.

* arch/x86/core/userspace.c drops the eager k_mem_page_in() of the
  thread's privileged stack on user-mode entry. With the kernel
  image fully resident the stack is already mapped.

* arch/x86/gen_mmu.py drops map_region("lnkr_pinned") and the
  set_region_perms() calls for lnkr_pinned_text / lnkr_pinned_rodata.

* CMakeLists.txt drops the LINKER_USE_PINNED_SECTION block that
  generated APP_SMEM_PINNED_* variables and the
  pinned_partitions target property feeding gen_app_partitions.py.
  cmake/modules/extensions.cmake removes the PINNED_RODATA /
  PINNED_RAM_SECTIONS / PINNED_DATA_SECTIONS zephyr_linker_sources()
  location keywords and their snippet files.
  scripts/build/gen_app_partitions.py drops --pinoutput /
  --pinpartitions arguments and the pinned-output branch.
  subsys/testsuite/coverage/CMakeLists.txt drops its
  CONFIG_DEMAND_PAGING-conditional fork.

* scripts/build/gen_kobject_list.py drops the
  app_smem_pinned_start / _end fallback for kobject placement
  validation.

* tests/arch/x86/pagetables and tests/kernel/mem_protect/userspace
  drop their lnkr_pinned_text / lnkr_pinned_rodata branches.

* include/zephyr/arch/x86/ia32/arch.h folds IRQSTUBS_TEXT_SECTION
  to the unconditional ".text.irqstubs" form.

* tests/subsys/llext/src/syscalls_ext.c drops a stale comment about
  syscalls landing in .pinned_text.

Targeted retentions:

* arch/x86/core/bootargs.c keeps multiboot_cmdline and efi_bootargs
  in .noinit (was __pinned_noinit, which decayed to __noinit when
  LINKER_USE_PINNED_SECTION was unset). The multiboot and zefi loader
  paths write these buffers before Zephyr's BSS-zero step, so
  zeroing them at boot loses the cmdline.

* arch/x86/core/ia32/fatal.c keeps _df_esf and _df_stack in .noinit.
  They are scratch space written by the double-fault handler and have
  no zero-init requirement; keeping them in .noinit also preserves
  the historical post-noinit alignment that gen_mmu.py relies on
  (z_mapped_size is computed before CMake-injected iterable sections
  are appended to the linker script, so the post-noinit page padding
  is what keeps those sections within the mapped region).

* include/zephyr/arch/x86/ia32/syscall.h and
  include/zephyr/arch/x86/arch.h wrap the per-arch
  arch_syscall_invoke* / arch_is_user_context / arch_k_cycle_get_*
  implementations in @cond INTERNAL_HIDDEN. The public Doxygen
  contract lives on the prototypes in
  include/zephyr/arch/arch_interface.h; the per-arch implementations
  are internal. Without this, removing the __pinned_func attribute
  exposes the implementations to the doxygen-coverage delta check
  as 10 newly-undocumented APIs.

Documentation updates are deferred to a separate commit.

Issue: #108773

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-06-23 09:11:08 -04:00
Mohammad Massoudi
9189b14fd6 driver: video: sw_generator: Add H.264 support
Add optional H.264 test stream support to the video software generator.
Generate the Annex-B stream at build time with ffmpeg and copy one access
unit into each video buffer.

Signed-off-by: Mohammad Massoudi <m.massoudi32@gmail.com>
2026-06-23 09:10:47 -04:00
Adrian Bonislawski
dac9cb0cda drivers: dma: dw: keep default msize for zero burst length
find_msb_set() returns 0 for a 0 argument, so the unconditional
"find_msb_set(cfg->source_burst_length) - 1" underflowed msize to
UINT_MAX when source_burst_length was 0, clobbering the msize = 3
default set at declaration.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2026-06-23 07:06:05 -05:00
Gang Li
6c96791f5d drivers: wifi: nxp: relocate net_arp_prepare to ITCM
Move the hot functions to ITCM_TEXT (SRAM) to improve
throughput for UDP TX.
net_arp_prepare() is called on every IPv4 TX packet
from ethernet_send() for MAC address resolution.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2026-06-23 11:29:11 +02:00
Tom Burdick
4e6f624292 wifi: Airoc issue fixes
Some review showed there were some small issues in the airoc_wifi
driver. A duplicated semaphore give on error and a memory leak when not
releasing a buffer.

Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
2026-06-23 11:28:52 +02:00
Ričards Poriņš
aa9604b2f4 drivers: spi: sam: add 9-16 bit word size support
The SAM SPI peripheral natively supports 8-16 bit word sizes via
the SPI_CSR.BITS field, but the driver rejects anything other than
8-bit with -ENOTSUP.

Remove the 8-bit-only restriction and map word_size to the BITS
field. Add 16-bit-wide fast-path transfer functions (TX, RX, TXRX)
for word sizes > 8, where each word occupies a uint16_t in the
buffer. The spi_sam_fast_{tx,rx,txrx} wrappers added in the
previous commit now dispatch to the 8-bit or 16-bit variant based
on the configured word size.

This enables MIPI DBI Type C (3-wire 9-bit SPI) displays and other
peripherals that require non-8-bit word sizes on SAM MCUs.

Tested on SAM4S with a 9-bit SPI display (ILI9806 via MIPI DBI).

Signed-off-by: Ričards Poriņš <ricards.porins@gmail.com>
2026-06-23 11:28:12 +02:00
Ričards Poriņš
4878231789 drivers: spi: sam: factor fast paths through a wrapper
Rename spi_sam_fast_{tx,rx,txrx} to *_8 to make the 8-bit nature
explicit, and introduce thin wrappers with the original names that
take a device handle and delegate to the _8 variant. Update the
callers in spi_sam_{tx,rx,txrx} to pass the device handle through.

This is a pure refactor with no functional change; it sets up the
follow-up patch that adds 9-16 bit word size support by dispatching
to a 16-bit variant inside the wrapper.

Signed-off-by: Ričards Poriņš <ricards.porins@gmail.com>
2026-06-23 11:28:12 +02:00
Zhaoxiang Jin
5364f764c4 drivers: counter: add irtc counter driver
add irtc counter driver

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-06-23 08:36:08 +02:00
Noah Luskey
0c7a90ce4c drivers: sensor: ti: ina2xx: fix INA228 SHUNT_CAL integer truncation
INA228_DRIVER_INIT sets CAL with
`.cal = (INA237_DT_CAL(inst) * 16)`, where INA237_DT_CAL ends in
`/ 10000000ULL`. C operator precedence runs the divide before the
*16, so the truncation residual gets amplified 16x — and for small
current_lsb * rshunt products (e.g. 191 nA LSB, 5 mOhm shunt) the
numerator is below 1e10 and CAL collapses to 0, leaving the CURRENT
register stuck at zero (datasheet section 8.1.2).

Replace both CAL macros with a single parameterized
INA2XX_DT_CAL(inst, scaling) so the *16 (folded into
INA228_CAL_SCALING) happens inside the product, and the divide is the
last operation. INA237 path is functionally unchanged.

Signed-off-by: Noah Luskey <luskey@meta.com>
2026-06-23 08:35:58 +02:00
Sylvio Alves
9f77fce499 drivers: clock_control: fix lp clock power on espressif socs
pmu_init() powers on every LP clock source. After selecting the RTC
slow clock, re-narrow the LP clock power to the chosen source while
keeping FOSC on for the LP timer, so the post-init LP clock power
state is correct on c5, c6, h2 and p4.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-22 20:31:49 -04:00
Jan Carlo Roleda
5e610f91f0 tests: drivers: sensor: Add ADT7420 Emulated Driver Tests
Adds Driver emulation tests to validate configuration,
data fetching and temperature edge case checks.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-06-22 20:31:12 -04:00
Jan Carlo Roleda
f62e280b20 drivers: sensor: adi: Fix ADT7420 negative temperature decoding
Fixes a computation issue that causes negative temperature values
to be erroneously parsed from the device driver.

Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
2026-06-22 20:31:12 -04:00
Mathieu Choplain
de15902c13 drivers: crypto: stm32_hash: add support for HAL2 series
Add support for series using HAL2 APIs to the STM32 HASH driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-22 18:05:37 -04:00
Mathieu Choplain
e9c62a62ab drivers: crypto: stm32_hash: drop unused field in session structure
The HASH_InitTypeDef field in the session structure seems unused.
Get rid of it as well as the type alias created just for it.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-06-22 18:05:37 -04:00
Sreeram Tatapudi
b756ee2abd drivers: serial: infineon: pick oversample by absolute baud error
The UART bit clock is peripheral_clock / (divider * oversample), so the
driver must choose an oversample factor for the requested baud.
ifx_cat1_uart_set_baud() ranked candidates with ifx_uart_baud_diff(),
which returns the error as an integer percentage. At 100 MHz / 115200
every oversample (8-16) is under 1% and rounds to 0, so the first
candidate (oversample 8, -0.45%) always won, the least accurate option
with the smallest sampling margin.

Compare the error in absolute Hz instead. This selects oversample 14
(divider 62, 115207 baud, -0.006%), improving both accuracy and margin.
A zero divider is skipped to avoid divide-by-zero and the percentage
tolerance is kept as the validity check.

Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2026-06-22 18:05:12 -04:00
Sreeram Tatapudi
b37f5e667a drivers: bluetooth: infineon: add diagnostics to HCI setup
Add error logging on the device-not-ready, HCI_RESET and firmware
download failure paths, and include the image size in the firmware
download debug message, to make bring-up failures easier to diagnose.

Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2026-06-22 18:05:12 -04:00
Jacob Wienecke
c59df938a6 drivers: pwm: mcux_sctimer: guard counter start
The PM_DEVICE_ACTION_RESUME handler started the SCT counter
unconditionally. When RESUME runs before the first pwm_set_cycles()
no period match or counter limit event exists yet, so the counter
free-runs across its full 32-bit range. By the time a channel is
configured, COUNT has climbed past the period match installed as the
counter limit; since the limit only fires on COUNT == match, the
counter never resets and the output is stranded until a full 32-bit
wrap. Guard the start with pwm_channel_active so the counter is only
started once at least one channel has been configured.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-06-22 18:02:21 -04:00
Zafer SEN
e74d702549 drivers: modem: hl78xx: fix evt_monitor dispatch under spinlock
Two bugs are fixed in the instance monitor dispatch path:

1. Instance monitor callbacks were invoked while holding the
   notification spinlock. The lock protects the linked list of
   runtime monitors, so holding it across a user callback can
   deadlock when the callback tries to register or unregister a
   monitor. Replace with a heap-snapshot approach: allocate a
   temporary array under the lock, copy the instance monitor
   pointers, release the lock, then invoke each callback outside
   the critical section.

2. The heap allocation for the deferred FIFO snapshot was sized
   as sizeof(fifo_node) + sizeof(notif), adding an extra notif
   worth of bytes that were never used. The correct allocation
   is sizeof(fifo_node) only, since the notification is owned by
   the caller and passed by pointer.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-06-22 18:01:40 -04:00
Zafer SEN
1aac44c022 drivers: modem: hl78xx: add parsed URC AT monitor subsystem
Add hl78xx_at_monitor, an optional library that lets application
code subscribe to parsed unsolicited AT notifications without
touching driver internals.

Static monitors are declared with HL78XX_AT_MONITOR() (deferred,
system workqueue) or HL78XX_AT_MONITOR_DIRECT() (direct, modem RX
context) and stored in a dedicated linker section. Runtime monitors
can be registered and unregistered via hl78xx_at_monitor_register().
A per-notification k_heap slab carries argument vectors to deferred
handlers.

All URC matches in hl78xx_unsol_matches are now routed through a
single hl78xx_on_unsol_monitored() entry point. This function
dispatches to the AT monitor first, then calls the driver's own
handler via an index into hl78xx_unsol_handlers[]. Existing driver
behavior is unchanged; the subsystem adds zero overhead when
CONFIG_HL78XX_AT_MONITOR is not set.

The hello_hl78xx sample is extended with a +CEREG AT monitor as a
usage demonstration.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-06-22 18:01:40 -04:00
Chaitanya Tata
7fce719a51 drivers: wifi: nrf_wifi: Don't error on flag-clear for absent peer
hostapd clears the AUTHORIZED flag while a station is being torn
down (e.g. the EAP-Failure that ends every WPS/WSC exchange), by
which point the peer may already be gone from the driver peer
table. Clearing a flag on an absent peer is a harmless no-op, so
treat it as success instead of logging "Unknown PEER" and failing
the op. Setting a flag on a missing peer remains a logged error.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
2026-06-22 17:57:34 +02:00
Albort Xue
b02f480197 drivers: timer: mcux_lptmr: fix WUC wakeup source not configured
The LPTMR system timer driver used WUC_DT_SPEC_INST_GET_OR() which
relies on DT_DRV_COMPAT to resolve the device instance. Since the
system timer obtains its node via DT_CHOSEN(zephyr_system_timer)
rather than the standard device model, DT_DRV_COMPAT is undefined
and the macro silently falls back to the default value {0}. This
leaves wuc.dev as NULL and wuc_enable_wakeup_source_dt() is never
called, so the WUU module wakeup source for LPTMR is not programmed.

On MCXW7xx platforms this means timed wakeup from low-power states
fails: the board enters sleep and never returns.

Use WUC_DT_SPEC_GET_OR(LPTMR_NODE, ...) instead, which resolves
directly from the chosen system-timer node where the wakeup-ctrls
property is defined.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-06-22 17:57:12 +02:00
Lukas Gehreke
08d22ad236 drivers: modem: sim7080: runtime configurable rat and lte channels
Added functions to make radio access technology and lte channels
runtime configurable. Defaults are still derived from kconfig values.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2026-06-22 15:49:02 +02:00
Ričards Poriņš
2c88357cfd drivers: pinctrl: sam: handle extra-function pins
Pins configured with SAM_PINMUX_FUNC_extra (e.g. ADC analog inputs)
fall through the pinctrl configuration with the function field
defaulting to 0, which maps to SOC_GPIO_FUNC_A (Peripheral A).

If Peripheral A for that pin is an active output (e.g. SSC_TD on
PA17/SAM4S), it drives the pin LOW and the ADC reads 0V despite a
valid analog signal on the input.

Configure extra-function pins as PIO input (high-impedance) so no
peripheral output driver interferes with the analog signal path.
The ADC reads via its own internal analog connection regardless of
PIO mode.

Tested on SAM4S where PA17 (ADC ch0) Peripheral A is SSC_TD — ADC
now reads correctly instead of returning 0.

Signed-off-by: Ričards Poriņš <ricards.porins@gmail.com>
2026-06-22 15:48:47 +02:00
Victor Miranda
529f73034b drivers: modem: Add support for Quectel EG915U
Add required configs and code to enable EG915U as a cellular modem
(PPP).

Signed-off-by: Victor Miranda <varm@ic.ufal.br>
2026-06-22 15:47:15 +02:00
Tomas Barak
8ff55c6477 drivers: clock_control: fix RT1170 MICFIL clock init
Keep the RT1170 MICFIL Audio PLL initialization in the CCM clock
control path, but stop rewriting the MIC root clock while serving
PDM rate queries.

Reprogramming the MIC root caused RT1170 regressions during runtime.
It broke the i2s_codec sample and led to MICFIL capture starvation in
dmic_api. This keeps the safe Audio PLL bring-up while preserving the
working MIC root configuration used by the board.

The RT1170 dmic_api overlay and testcase enablement are included so the
test covers the board directly.


Assisted-by: GitHub Copilot:GPT-5.4
Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
2026-06-22 14:29:53 +02:00
Etienne Carriere
f23332025f drivers: flash: stm32: report failure on option byte locking error
Correct FLASH_STM32_EX_OP_OPTB_WRITE private flash operation for
stm32 internal flash drivers when unlocking or locking option bytes
fails. flash_stm32_option_bytes_lock() returns non-zero negative error
when so, not a positive error, fix flash_stm32_ex_op() accordingly,
using a comparison against zero, for consistency with other
calls to flash_stm32_option_bytes_lock().

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-22 14:27:50 +02:00
Etienne Carriere
4bc8115568 drivers: flash: stm32: report failure to set RDP level
Change flash_stm32_set_rdp_level() to return an error code when
failing.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-22 14:27:50 +02:00
Tim Lin
0692f32d04 drivers/flash: ite: Fix upper bound calculation and simplify erase flow
Upper bound is defined as the last block within the erase region.
Subtract one block unit from the erase size when programming upper
bound to prevent the erase range from extending into the next block.

With the correct upper/lower bounds in place, erase requests can be
handled in a single operation. Remove the block-by-block erase
loop.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-06-22 14:27:46 +02:00
Camille BAUD
aab450520e drivers: display: add RBW support for st730x
Adds RBW support and facilities for other color options

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-22 14:26:32 +02:00
Camille BAUD
27d146a01c drivers: display: Add tearing pin for st730x
Add tearing pin support

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-06-22 14:26:32 +02:00
Andrej Butok
a1e609f594 drivers: adc: nxp: lpadc: fix LPADC_DO_OFFSET_CALIBRATION warning
- Fixes "warning: LPADC_DO_OFFSET_CALIBRATION
  (defined at drivers/adc/Kconfig.mcux:109) was assigned the
  value 'y' but got the value 'n'..." in any application that did not
  independently enable ADC.
- CONFIG_LPADC_DO_OFFSET_CALIBRATION is only meaningful when
  CONFIG_ADC_MCUX_LPADC is enabled. Setting `default y'.
- Remove the now-redundant CONFIG_LPADC_DO_OFFSET_CALIBRATION=y
  from the defconfigs of all NXP FRDM MCXA boards.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-06-22 14:26:19 +02:00
Erwan Gouriou
cb60c30213 drivers: stm32: xspi: remove local xspim setup paths
Drop duplicated HAL_XSPIM_Config fallback code from STM32 XSPI
flash, MSPI, and MEMC drivers.

With manager setup centralized in the common XSPIM driver and
explicit xspim devicetree nodes, XSPI consumer drivers no longer
need to configure XSPIM directly.

Assisted-by: GitHub Copilot:GPT-5.3-Codex west
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-06-22 14:25:57 +02:00
2b41462310 drivers: console: add a QingKe Debug Module console driver
The QingKe V2A, V2C, and V4C have a Debug Module with two data
registers `data0` and `data1`. These can be used with SDI compatible
debuggers such as `minichlink` to send console data to the host.

Add a console driver communicates with the host and fails gracefully
if the driver is enabled but the debugger is not connected.

Compared to the UART console, the debug console uses 916 bytes less
flash and frees up a UART.

Tested on the ch32v006evt and bluepillplus_ch32v203. To test, add
`&sdiconsole { status = "okay"; };` to the board Devicetree, set
`zephyr,console = &sdiconsole`, and enable the driver.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2026-06-22 14:25:42 +02:00
Ramprasad Kannappan
1daa8ca447 drivers: wifi: infineon: wpa_supplicant support integration
In this PR, wpa_supp interfacing to the infineon's wifi driver

Signed-off-by: Ramprasad Kannappan <Ramprasad.Kannappan@infineon.com>
2026-06-22 14:24:58 +02:00
Fin Maaß
b766763927 drivers: ethernet: esp32: use DT_INST_ENUM_HAS_VALUE
use DT_INST_ENUM_HAS_VALUE for
phy_connection_type, that way we don't have to do
string operations.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-22 14:24:17 +02:00
Yongxu Wang
3f6085539f firmware: scmi: core: Add protocol-level notification dispatch
SCMI Platform-to-Agent (P2A) notifications are delivered via
the RX transport channel, Extend the SCMI transport callback
signature to pass the received message header to the core, allowing:

  - validation of SCMI message type
  - routing of NOTIFICATION messages to protocol handlers
  - differentiation from synchronous response flow

Protocols may now optionally register supported notification
event IDs and a callback during static initialization.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-06-22 14:23:34 +02:00
Yongxu Wang
59afdb927c firmware: scmi: shmem: Add API to clear channel status
In SCMI Platform-to-Agent (P2A) notification flow, the agent
must explicitly mark the RX shared memory channel as FREE
after processing an incoming message.

Introduce scmi_shmem_clear_channel_status() to provide a
standardized mechanism for transport drivers to release RX
channel after handling notifications.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-06-22 14:23:34 +02:00
Yongxu Wang
0968b6f594 firmware: scmi: mailbox: Add optional RX notification callback
Mailbox-based SCMI transports may signal incoming Platform-to-Agent
(P2A) messages via a dedicated RX doorbell.

Introduce an optional RX callback registration path in the mailbox
transport driver to handle asynchronous notifications independently
from TX reply interrupts.

If no RX mailbox channel is defined, the RX path remains disabled.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-06-22 14:23:34 +02:00
Yongxu Wang
15f3f72e07 firmware: scmi: core: Allow optional RX transport channel
SCMI transports may optionally provide a dedicated RX channel to
deliver asynchronous Platform-to-Agent (P2A) messages such as
notifications or delayed replies.

The SCMI core previously assumed a TX-only transport model and
rejected RX channel setup.

Allow SCMI protocols to request and initialize an optional RX
transport channel when provided by the underlying transport
driver.

No functional change for platforms that only implement TX
shared memory.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2026-06-22 14:23:34 +02:00
Jérôme Pouiller
13a21bbe11 drivers: cache: add SiWx91x instruction cache driver
The SiWx91x SoC features an external AHB instruction cache for the QSPI
flash. It has no data cache.

There is no dedicated hardware invalidate command. Invalidation is
performed by toggling the clock gate (disable then re-enable), which
implicitly clears all cached lines. An ISB barrier follows to flush the
Cortex-M4 instruction pipeline.

The driver selects EXTERNAL_CACHE (not ARCH_CACHE) because the siwx91x
Cortex-M4 core does not define __ICACHE_PRESENT in the CMSIS device
header, so the ARM architecture cache implementation (SCB_EnableICache)
cannot be used.

Note this commit has not functional impact. Instruction cache was already
automatically start by the hal.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-21 07:40:17 -04:00
Syed Maaz
a87063bfca drivers: dac: microchip: Introduce DAC G2 Driver
Add G2 DAC driver for Microchip DAC Peripherals.

Signed-off-by: Syed Maaz <Syed.Maaz@microchip.com>
2026-06-21 07:39:18 -04:00
Andrej Butok
4bb1e94007 drivers: crc: nxp: add clocks/resets to MCXA CRC nodes
- add clocks and resets to MCXA CRC nodes.
- crc_nxp: deassert in init if a dt reset is given.
  On MCXA SoCs the CRC peripheral boots held in reset, so enabling its
  clock is not enough. Deassert the reset during driver init.
- nxp,crc.yaml: include reset-device.yaml for the resets property.
- mcxa Kconfig.defconfig: enable CONFIG_RESET
  when MRCC reset is present.
- clock_control_mcux_syscon: enable the CRC clock gate.
- mcxa344: fix reset controller compatible to nxp,mrcc-reset.

Tested on frdm_mcxa344, frdm_mcxa156, frdm_mcxa266.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-06-19 22:40:47 +02:00
Jakub Rzeszutko
a29f81a61e drivers: lora: lbm: fix DIO1 interrupt race when stopping async RX
Stopping reception with lora_recv_async(dev, NULL, NULL) from inside the
async callback races with the DIO1 interrupt. modem_release() sets the
mode to MODE_SLEEP and puts the chip to sleep, but the DIO1 interrupt is
still enabled, so a packet arriving in that window schedules a work item
that then runs with MODE_SLEEP already set and logs "Unexpected modem
mode (0)".

On parts that re-assert DIO1 when woken from sleep with a pending IRQ
(observed on an LR11xx-based board) this becomes an infinite loop:
clearing the IRQ wakes the chip, DIO1 re-asserts, another work item is
scheduled, and so on.

Fix this in three parts:

- Disable DIO1 in modem_release() before the chip goes to sleep, and
  re-enable it (with a stale-IRQ clear) when starting the next RX/TX.
  The dio1 gpio_dt_spec is moved into lbm_lora_config_common so the
  common layer owns the operational interrupt gating directly. Parts
  that do not route their IRQ through a single DIO1 line (SX127x drives
  several DIO lines and manages them itself) leave the pin unset, so the
  common layer accesses it through a NULL-guarded helper.

- When the work handler sees MODE_SLEEP it returns instead of touching
  the hardware, which is what previously drove the loop.

- When the async callback stops reception, the handler detects that the
  modem was already released (mode is now MODE_SLEEP) and returns before
  re-reading the IRQ status, leaving the chip asleep instead of waking
  it again.

Fixes #111484

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2026-06-19 22:40:27 +02:00
Torsten Rasmussen
b425d7a375 kconfig: cleanup ZEPHYR_BASE usage
Remove `$(ZEPHYR_BASE)` from `source "<file>"`.
Source is always relative to ZEPHYR_BASE, so no need to specify it.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2026-06-19 22:40:14 +02:00