Commit graph zephyr/drivers
Author SHA1 Message Date
Jordan Yates
aced7c3dd7 modem: cellular: common +CGSN match objects
The `AT+CGSN` query has several variants, the base `AT+CGSN` which
returns the `<sn>` without any prefix, and several explicit serial
number types, which include a `+CGSN: ` prefix.
```
AT+CGSN // <sn>, serial number as determined by manufacturer
AT+CGSN=0 // <sn>, serial number as determined by manufacturer
AT+CGSN=1 // <imei> International Mobile station Equipment Identity
AT+CGSN=2 // <imeisv> IMEI & Software Version Number
AT+CGSN=3 // <svn> Software Version Number
```

According to the specification, while `<sn>` is "typically" the IMEI,
manufacturers may choosed to provide whatever information they want in
the response. The new common match objects allows modem to explicitly
request the IMEI, instead of the manufacturer specific `<sn>`.

Reference: 3GPP 27.007 Ch. 5.4.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 19:16:53 +02:00
Jordan Yates
dfeec1ebff modem: cellular: output SERIAL_NUMBER event from IMEI callback
Output the `CELLULAR_MODEM_INFO_SERIAL_NUMBER` event from inside the
`modem_cellular_chat_on_imei` callback, as the callback runs in response
to `AT+CGSN`, which is documented as returning the serial number, not
IMEI.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 19:16:53 +02:00
Jordan Yates
06b890cbcf modem: cellular: CELLULAR_MODEM_INFO_SERIAL_NUMBER
Define a new information type for the modem serial number. While the
serial number is often the same as the IMEI, it is not always
(e.g. nRF93M1).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 19:16:53 +02:00
Yuzhuo Liu
b557c1bb47 drivers: gpio: bee: allow configuring pins as open-drain
GPIO_OPEN_DRAIN and GPIO_OPEN_SOURCE share the GPIO_SINGLE_ENDED bit and
differ only in GPIO_LINE_OPEN_DRAIN. The open-source rejection test
masked with GPIO_OPEN_SOURCE, which also matches open-drain, so any
attempt to configure a pin as open-drain wrongly returned -ENOTSUP.

Detect open-source on the GPIO_LINE_OPEN_DRAIN bit instead so open-drain
is accepted, and reject open-drain only on RTL8752H: open-drain is
supported on all current and future Bee ICs, and RTL8752H is the sole
older part without a hardware open-drain output mode, so a blacklist is
intentional here.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-09-10 19:14:33 +02:00
Md Shofiqul Islam
c9f9fe569e drivers: sensor: ina237: add 5 s timeout to CNVRF polling loop
Without a deadline the do/while loop can spin forever if the hardware
never asserts the Conversion Ready Flag (e.g. a faulty device). Add a
5-second timeout using k_uptime_get() so the function returns -ETIMEDOUT
instead of hanging, while preserving immediate propagation of I2C errors.

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
2026-09-10 19:14:07 +02:00
Md Shofiqul Islam
f22f4a8e12 drivers: sensor: ina237: fix sample_fetch in triggered mode
In triggered mode, ina237_sample_fetch() called
ina237_trigg_one_shot_request() which only writes to the ADC_CONFIG
register to start a one-shot conversion, then returned immediately
without waiting for the conversion to complete.

This violates the sensor API contract: after sensor_sample_fetch()
returns, the data must be ready to read via sensor_channel_get().

Fix by polling the DIAG_ALRT register until the CNVRF (Conversion
Ready Flag, bit 1) is set before calling ina2xx_sample_fetch() to
read the converted data.

Fixes #98547

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
2026-09-10 19:14:07 +02:00
Nicholas Cadieux
7d86010568 drivers: usb_c: tcpc: add dead_battery_enabled operation
Add an optional TCPC operation reporting whether a port applies the
USB-C dead battery resistors to its CC lines, and implement it for
ucpd_stm32 and ucpd_numaker.

Signed-off-by: Nicholas Cadieux <ncadieux@qti.qualcomm.com>
2026-09-10 12:21:06 +02:00
Mohammad Odeh
c1298259d6 drivers: flash: add M95P32 extended operations
Dispatch M95P32-specific Flash API operations through MSPI NOR quirks.

Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-09-10 12:19:44 +02:00
Laura Carlesso
9bb69d3c2b drivers: mbox: Add MBOX driver for Infineon
Add the mbox driver implementation on top of
IPC hw block as a native Zephyr driver.

Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
2026-09-10 12:19:12 +02:00
Michele Vaccari
193ace18c2 drivers: mipi_dbi: stm32_fmc: add Intel 8080 8-bit bus support
The STM32 FMC MIPI DBI driver only supported the Intel 8080 16-bit bus
mode and rejected any other configuration. Displays wired to the FMC
over an 8-bit parallel bus could not be used.

Add support for MIPI_DBI_MODE_8080_BUS_8_BIT:

- Validate the DBI mode against the configured FMC bus width, accepting
  both the 8-bit and 16-bit combinations and rejecting mismatches.
- Use 8-bit accesses (sys_write8) for command and data transfers when
  the bus is configured in 8-bit mode.
- Compute the data address offset without the extra bit shift in 8-bit
  mode, since the register-select line maps directly to the byte
  address instead of the half-word address used in 16-bit mode.

Signed-off-by: Michele Vaccari <michele.vaccari@outlook.com>
2026-09-10 12:18:23 +02:00
Benjamin Perseghetti
b099a89cf2 drivers: ethernet: nxp_enet_qos: reclaim TX resources on link drop
A frame handed to the ENET QoS transmit DMA when the link goes down is
never written back, so the completion interrupt that returns the packet
and frees the single transmit slot never arrives. The slot stays taken
across the link coming back, every later send on the interface fails
with -EBUSY, and the packet and its fragments are gone from their pools
for good, so a handful of link transitions exhaust the buffer pool and
the interface stops transmitting.

Give the driver a claim and release pair so that completion and
abandonment race for the packet and exactly one of them returns it, and
arm a transmit watchdog, CONFIG_ETH_NXP_ENET_QOS_TX_TIMEOUT_MS, that
takes the descriptors back, flushes the transmit queue and reinitializes
the ring when the DMA does not finish. Abandon an outstanding frame from
the PHY callback on carrier loss, and program speed and duplex with the
transmitter and receiver disabled before the carrier is announced, so
the MAC configuration write cannot land on a frame the stack has already
handed to the DMA.

Publish the packet, arm the watchdog and start the DMA as one step under
irq_lock so an abort can never observe a half-built submission, and flush
the transmit queue with a bounded wait.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-09-10 12:17:40 +02:00
Benjamin Perseghetti
9efd144a4a drivers: ethernet: nxp_enet_qos: restore RX buf addr on drop
Every RX descriptor writeback clobbers RDES0, which in read format is
the buffer address: the writeback formats alias it with the VLAN tag or
the timestamp low word. The success path restores it before handing the
descriptor back to the DMA, but the four drop paths (errored frame,
packet alloc failure, bad length, fragment alloc failure) re-arm the
descriptor with whatever the writeback left there, so the next use of
that slot makes the DMA write into flash or reserved address space and
receive stops permanently. Restore the reserved buffer's address on
every drop path, as the success path does.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-09-10 12:17:40 +02:00
Jordan Yates
0e7f6866ab fuel_gauge: composite: limit SoC from charger state
Allow connecting the `fuel-gauge-composite` instance to a charger
device, to limit the reported SoC to 99% while still charging, and
forcing it to 100% when charging terminates.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 12:16:25 +02:00
Jordan Yates
b536c10dc7 fuel_gauge: composite: compensate internal resistance
If we have a measured current and a configured internal resistance,
adjust the measured voltage to provide a less jumpy state-of-charge
computation under charging conditions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 12:16:25 +02:00
Jordan Yates
8357803e1d fuel_gauge: composite: update next sample time
Set the time for the next sample from the point the sampling finishes,
not from when `composite_get_prop` is called.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-10 12:16:25 +02:00
Raluca Bozdog
9d0e5e0400 drivers: ethernet: Add ADIN1140 driver
Add support for the Analog Devices ADIN1140 10BASE-T1S MAC-PHY:
ethernet driver, MDIO bus driver and PHY driver.

Signed-off-by: Raluca Bozdog <raluca.bozdog@analog.com>
Co-authored-by: Jason Murphy <jason.murphy@analog.com>
2026-09-10 12:15:30 +02:00
Francois Ramu
f7bfe1dd10 drivers: flash: stm32 xspi warn to move to MSPI instead
Add a warning to recommend to move the stm32h5 devices
to the mspi stm32 controller with the mspi stm32 xspi driver.
The flash stm32 xspi driver will be deprecated v4.5.0

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-09-10 10:19:01 +02:00
Francois Ramu
a0b84a091c drivers: flash: stm32 flash driver config
Extend the stm32 flash driver config to the MSPI st,nor compatible
device to enable the external flash in MemoryMapped mode.
This commit checks the KconfigFormat correctly.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-09-10 10:19:01 +02:00
Kate Wang
860aef9d6a drivers: video: introduce NXP MCUX FlexIO parallel camera driver
Add a new video driver for NXP FlexIO-based parallel camera
interface (DVP). The driver captures 8-bit parallel pixel data
via FlexIO shifters, with pixel clock (PCLK) gating and horizontal
sync (HREF) line synchronization. Pixel data is transferred to
memory using eDMA, with frame boundaries synchronized via VSYNC
GPIO interrupt. An optional XCLK output can be generated by a FlexIO
timer for camera sensor clock supply.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-10 10:18:47 +02:00
Sylvio Alves
597f9e1125 drivers: bluetooth: hci: add esp32c61 support
Enable the esp32 HCI driver on the ESP32-C61: extend the
controller Kconfig gates, report the C61 vendor hardware
variant id, add the hci devicetree node and enable it on the
esp32c61_devkitc board. The C61 BLE controller reuses the C6
controller sources and blobs through the hal.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-09-09 18:14:06 -04:00
Jose Alberto Meza
2c6cecef31 drivers: espi: microchip: xec: fix inverted boot-done acknowledge
Currently driver only acknowledged the boot handshake when
TARGET_BOOT_DONE was already asserted.

On a cold boot the virtual wire reads back 0, so the condition never
held and the EC never sent TARGET_BOOT_STS/TARGET_BOOT_DONE together,
leaving the host stalled waiting for boot-load-done.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2026-09-09 18:13:47 -04:00
Liam Ogletree
4d802b11b0 drivers: haptics: Multi write fixes for CS40L26
Fixes the same issue addressed in #114981 but for CS40L26. For
CS40L26, this issue leads to malformed masks for the first
IRQ register and then IRQ storms. This is only a problem when
disabling runtime PM because otherwise the power sequencer
correctly writes IRQ masks when exiting hibernation.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-09-09 18:13:42 -04:00
Lingao Meng
35c46048d3 Bluetooth: hci: Allow userchan on native library boards
BT_USERCHAN is currently limited to BOARD_NATIVE_SIM, but the
driver is implemented for native simulator based targets that use
the native host environment rather than for that specific board.

Bluetooth host-only applications can be built separately from the
controller and communicate with an external controller over HCI.
Allow native simulator based targets to use the same userchan HCI
transport when the application devicetree selects a
zephyr,bt-hci-userchan device.

Relax the dependency from BOARD_NATIVE_SIM to NATIVE_LIBRARY so
host-only Bluetooth applications can use userchan on native simulator
based targets, including out-of-tree boards, when they run in real
time.

This enables split host/controller simulation setups where the
Bluetooth host runs as one native simulator process and connects
over userchan to an external HCI controller process.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-09-09 12:59:08 -04:00
Stephan Linz
1df2fcc3a4 drivers: led_strip: ws2812_gpio: remove undeclared variable
The expression 'drv_data->clk_dev' is invalid because the pointer
'drv_data' is not declared anywhere. Since 'nrf_clock_control_release()'
is the counterpart to 'nrf_clock_control_request()', the pointer part
'drv_data->' can be safely removed.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2026-09-09 12:58:23 -04:00
Sachin D Kulkarni
05af1a7027 drivers: wifi: nrf_wifi: Add radio test shell to driver
Move radio test and FICR programming shell commands into the nRF70
Wi-Fi driver. Register the command sets behind NRF70_RADIO_TEST_SHELL
and NRF70_RADIO_TEST_FICR_SHELL Kconfig options so radio test builds
can use the built-in shell or provide a custom integration.

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
Assisted-by: Cursor:cursor-agent
2026-09-09 12:58:02 -04:00
Mathieu Choplain
db482339e8 drivers: *: stm32: include arch/cpu.h instead of generic implementation
Instead of including the header containing the generic implementation of
certain arch services, include the top-level <zephyr/arch/cpu.h> header
which will provide the correct implementation for the target arch.
Notably important for `sys_io.h` which has memory barriers on Cortex-A.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-09 12:57:53 -04:00
Duc Viet Le
6e755fba93 drivers: usb: uhc_dwc2: guard optional quirk data
Generic snps,dwc2 instances do not have the vendor quirk data/config
objects emitted by the vendor-specific quirk headers. The driver already
allowed the quirk table pointer to be NULL, but still initialized
quirk_data and quirk_config unconditionally. This causes generic-only
instances to fail to build because the corresponding vendor symbols do
not exist.

Use the same vendor-quirk condition for the table, data, and config
pointers so generic instances get NULL quirk pointers.

Fixes: 89a75416b7 ("drivers: usb: uhc_dwc2: add initial support")

Signed-off-by: Duc Viet Le <levietduc0712@gmail.com>
2026-09-09 12:57:05 -04:00
Benjamin Perseghetti
db3f01526e drivers: ethernet: nxp_enet_qos: advertise VLAN capability
Advertise ETHERNET_HW_VLAN when CONFIG_NET_VLAN is enabled. The
capability is an acceptance gate that permits VLAN interfaces on the
iface. The L2 keeps inserting the tag in software, so the transmit
path needs no offload change.

Account for the four extra bytes a single VLAN tag adds to a frame in
the transmit size cap and the receive buffer capacity assert. The MAC
recognizes the VLAN type and extends its own receive length limit by
the same four bytes, so no length register needs adjusting.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-09-09 12:56:23 -04:00
Benjamin Perseghetti
160dd12740 drivers: ethernet: nxp_enet_qos: offload RX checksums to hardware
Enable the receive checksum offload engine through the MAC_CONFIGURATION
IPC bit so the MAC verifies the IPv4 header and the TCP and UDP checksums
of incoming frames, and advertise ETHERNET_HW_RX_CHKSUM_OFFLOAD so the
stack does not repeat the check in software. Because the stack then trusts
the offload, drop any frame the engine flags with an IP header or payload
checksum error in the RDES1 write-back status, which is valid only when
the receive status word is present.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-09-09 12:56:23 -04:00
Benjamin Perseghetti
b1f1a79ba0 drivers: ethernet: nxp_enet_qos: offload TX checksums to hardware
The stack computes the IPv4 header and the TCP and UDP checksums in
software for every transmitted frame. On the MCXN947 Cortex-M33 that
per-packet cost is the largest single consumer of CPU on the transmit
path and it saturates the core well below the link rate.

The DesignWare Ethernet QoS MAC can insert these checksums in hardware.
Set the TDES3 checksum insertion control field to full insertion on the
first descriptor of every frame and advertise ETHERNET_HW_TX_CHKSUM_OFFLOAD
so the stack leaves the checksum fields cleared for the engine to fill.
The MAC only rewrites IP frames with a known protocol and leaves other
frames untouched, so the control field can be set unconditionally.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2026-09-09 12:56:23 -04:00
Mathieu Choplain
d3686d022c drivers: usb: common: stm32: phy_u5otghs: determine CLKSEL automatically
Query the frequency of the OTG_HS PHY and compute the appropriate CLKSEL
value at runtime if the `clock-reference` property is not specified.
This removes the user burden of providing the same value twice in DTS.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-09 12:56:13 -04:00
Mathieu Choplain
00a88e7916 drivers: usb: common: stm32: phy_u5otghs: remove obsolete comment
This comment duplicates the one right above - remove it.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-09 12:56:13 -04:00
Aksel Skauge Mellbye
10c5de0d04 drivers: clock_control: silabs: Add clock output driver
Add a clock_control driver for the CLKOUT feature of the Series
2/3 Clock Management Unit. The driver configures shared properties
such as exportclk and clkout dividers, and interprets the
subsys argument to clock management functions as the clock output
to enable or disable.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-09-09 10:41:46 -04:00
Mathieu Choplain
e005310b53 drivers: usb: common: stm32: usbphyc_n6: determine FSEL automatically
Instead of using a hardcoded FSEL for 24 MHz input, query the frequency
of the USBPHYC clock and determine the correct value automatically at
runtime.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-09 10:41:37 -04:00
Mathieu Choplain
178a017c31 dts: bindings: clock: stm32n6*: add missing hsi_div2_osc_ck source
The clock signal `hsi_div2_osc_ck` should be documented as a distinct
source because it is derived from the HSE clock with a configurable
prescaler.

Document the exact effect of `hse-div2` on st,stm32n6-hse-clock in the
binding: it enables the prescaler for `hse_div2_osc_ck` whose frequency
is `hse_osc_ck / 2` when enabled, and `hse_osc_ck` otherwise. Add new
clock source `STM32_SRC_HSE_DIV2_OSC` in stm32n6_clock.h, and update the
corresponding clock control driver to handle this new source.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-09 10:41:37 -04:00
Sylvio Alves
491fa7b322 drivers: wifi: esp32: add esp32c61 support
Enable the esp32 Wi-Fi driver on the ESP32-C61: extend the FTM
and mesh Kconfig gates, add the wifi devicetree node and enable
it on the esp32c61_devkitc board.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-09-09 10:41:29 -04:00
Ahnaf Shahriar
491510db64 drivers: net: ppp: let tests observe the transmitted frames
When CONFIG_NET_TEST is enabled the PPP driver drops the packet in
ppp_send() because there is no UART to write it to. That leaves the
tests with no way of checking what the PPP stack actually sends.

Add an optional callback, registered with
ppp_driver_register_send_cb(), that is invoked with the outgoing packet
before it is dropped. The callback is only compiled in for
CONFIG_NET_TEST builds and nothing changes when it is not registered.

Assisted-by: Claude:claude-sonnet-5 Simantic
Signed-off-by: Ahnaf Shahriar <shahriarahnaf007@gmail.com>
2026-09-09 10:41:15 -04:00
Anas Nashif
da3c553fef drivers: counter: gd32: use portable IRQ pending API
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-09-09 10:39:40 -04:00
Benjamin Cabé
3f6843f3b0 net: ieee802154: remove deprecated IEEE802154_HW_SLEEP_TO_TX
This capability was deprecated in Zephyr 3.6 (see issue #63670): every
OT-capable driver implements transmission directly from a low-power
state, so the bit conveyed no information and only coupled the radio
API to OpenThread's capability and device model.

Drop it from the radio API and from the four drivers still advertising
it, and renumber the subsequent capability bits. The OpenThread
platform glue now behaves as if the capability were always present: it
unconditionally advertises OT_RADIO_CAPS_SLEEP_TO_TX and allows
transmitting from the sleep state.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-09 10:38:59 -04:00
Etienne Carriere
198b07899f drivers: entropy: stm32: Acquire HSEM at RNG initialization
Acquire the HSEM to safely run RNG hardware initialization.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
6e682492d2 drivers: entropy: stm32: Enable RNG only when acquired
Remove enabling of the HW RNG and its interrupts from configure_rng()
local helper function. It is already done from acquire_rng() that
is always called when the RNG is used. For consistency, enable RNG
and its interrupts only once it's configured.

This is more consistent with the RNG disabling sequence that is
implemented in release_rng() local helper function.

A side effect it that the RNG is no more enabled at device initialization
which allowed it the accumulate entropy to serve quicker its first
consumer, at least on single-core MCUs.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
f67e75c586 drivers: entropy: stm32: Assert HSEM acquisition
Add some assertion and inline comment to clarify when the HSEM shall be
taken and released to ease maintenance. HSEM acquisition/release
sequences must be consistent knowing that there are no reference
counting support in HSEM management.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
61b93923e1 drivers: entropy: stm32: Simplify acquire_rng()/release_rng()
Merge entropy_stm32_resume() into acquire_rng() and
entropy_stm32_suspend() into release_rng() to make the implementation
a bit more easy to read.

Remove semaphore acquisition from release_rng() (previously inside
entropy_stm32_suspend() sequence) since the function is only
called when the semaphore was already acquired.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
6cdc354455 drivers: entropy: stm32: Move configure_rng() definition in the file
Move configure_rng() local function definition in entropy_stm32.c
source file to ease factorization in other local helper functions.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
861590224c drivers: entropy: stm32: Enabling RNG clock is not expected to fail
Remove entropy_stm32_resume() return value as it is not used and
we don't expect enabling of the RNG clock to fail.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
dc874a9007 drivers: entropy: stm32: Clarify error case in RNG disable sequence
On STM32WBAX series we must wait a few cycle before disabling the RNG
clock once it is switched off. Clarify the sequence implementation
so that RNG clock remains enable but semaphore is released. This change
addresses an issue where entropy_stm32_suspend() return value was
not used.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
52193e3127 drivers: entropy: stm32: Configurable workqueue for pools refilling
Allow project configuration to select use of either the Zephyr system
workqueue or a dedicated workqueue for fillings the random bytes pools.

By default, the driver uses the Zephyr system workqueue. Projects
can enable CONFIG_ENTROPY_STM32_WORKQUEUE and tune ENTROPY_STM32_WQ_PRIO
to use the dedicated wrokqueue.

Workqueue is configured only at POST_KERNEL initcall level, considering
that the driver init level depends on the STM32 SoC used (i.e. when
IRQLESS_TRNG local macro is enabled or not).

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Etienne Carriere
28838df419 drivers: entropy: stm32: Fix S2RAM sequence and ensure ISR pool filling
Split the initialization function in 2 and call only hardware
initialization on S2RAM resume to fix an issue where S2RAM resume
previously called entropy_stm32_rng_init() and corrupted some software
resource like the system workqueue by calling k_work_init() on an
existing and possibly submitted work.

Prevent entry in PM suspend state unless the ISR random sample pools
are filled so that any interrupt requesting random bytes at wakeup have
a chance to get random bytes. As a side effect, this change makes
entropy_stm32_rng_pm_action() much simpler.

Rename device driver initialization function for consistency.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-09-09 10:38:29 -04:00
Vincent van der Locht
df91365dc7 drivers: ieee802154: fix openthread guard MCXW driver
#112908 killed any other use-case besides openthread for the mcxw72 radio.
This patch fixes the dependency to only the vendor-specific radio use-case
of openthread.

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2026-09-09 10:37:44 -04:00
Tobias Meyer
350a730e48 drivers: clock_control: preserve STM32N6 boot clocks
Chain-loaded STM32N6 applications may execute from external XSPI NOR or
PSRAM whose controller depends on the bootloader clock tree. Add an opt-in
MCUboot configuration that preserves the retained RCC state while keeping
the SRAM gates required by the application.

Require the application devicetree to describe retained clock and external
memory hardware. Refresh SystemCoreClock without reinitializing the
application-domain oscillators, PLLs, interconnect, prescalers, ICs, or
SYSCLK.

Tests: git diff --check
Tests: python3 scripts/ci/check_compliance.py -c origin/main..HEAD

Assisted-by: OpenCode:gpt-5.6-sol
Signed-off-by: Tobias Meyer <tobias.meyer@hula.earth>
2026-09-09 10:36:55 -04:00