Commit graph

28,390 commits

Author SHA1 Message Date
Albort Xue
9d817c7992 drivers: flash: flash_mcux_flexspi_nor: fix QER S2B1v5 status reg case
The JESD216_DW15_QER_VAL_S2B1v5 case had incorrect status register
read/write logic. It was reading only SR2 but writing both SR1 and SR2,
which could corrupt SR1 if not read first.

Merge the S2B1v5 case with S2B1v1/v4 cases since they all set bit 1 of
SR2. Update the common path to properly handle both single-byte (SR2 only)
and two-byte (SR1+SR2) read/write operations by:

- Reading SR1 first when rd_size is 2, saving it temporarily
- Reading SR2 using the scratch command
- Combining both bytes with SR2 in the upper byte when needed
- Writing the combined value with the QE bit set

Remove the now-redundant S2B1v5-specific case and simplify the LUT
sequence to read SR2 directly instead of reading SR1 first.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-01-22 13:00:23 -05:00
Vincent Tardy
86d55a8d81 drivers: bluetooth: hci: remove RAM allocation in send process
Remove local Tx buffer allocated in the
bt_hci_stm32wba_send() function.
Get Event buffer resource to store data returned
by lower layer and provide it to Host in case of
Tx packet is an HCI Command type.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-01-22 13:00:00 -05:00
Vincent Tardy
77f933e7d3 drivers: bluetooth: hci: fix RAM allocation in stm32wbax ble hci driver
Remove useless allocated RAM in stm32wbax ble hci driver.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-01-22 13:00:00 -05:00
Miika Karanki
c7fb653046 serial: uart_native_pty: send UART_RX_DISABLED event
When uart_rx_disable is called, or rx gets otherwise disabled,
UART_RX_DISABLED event should be emitted.

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2026-01-22 12:55:41 -05:00
Muhammad Waleed Badar
1350164d67 drivers: uart: bcm2711: fix poll_in
uart_bcm2711_poll_in() incorrectly returned the received byte
instead of writing it to the provided buffer.

Update the implementation to store the character in *c and
return 0 on success, matching the UART poll_in API.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-01-22 12:55:13 -05:00
Mathieu Choplain
4228409128 drivers: sensor: stm32_temp: read calibration data once during init
Instead of reading calibration data (device-unique, but never changing!)
as part of each conversion, perform the read once and cache the value.

This notably avoids frequently an ICACHE disable/enable cycle on STM32H5,
which is a somewhat slow operation.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-22 14:11:20 +00:00
Mathieu Choplain
bc9efec896 drivers: sensor: stm32_temp: use union as calibration info type
Using a union enables accessing the calibration data using member names
instead of an array index, which makes the code more readable.

As long as the layout of struct { T m1; ... T mN; } and array A[N] is the
same (implementation-specific?), usage of the union type as done should
be Standard-compliant: accessing through either member of the union will
use an lvalue with compatible type to the same underlying object, which
is one of the allowed aliasing situations listed in §6.5.7 of N1548.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-22 14:11:20 +00:00
Mathieu Choplain
32260932f6 drivers: sensor: stm32_temp: move constants to instance configuration
Various fields were stored in the instance data despite being initialized
at compile-time to a constant value.
Move these fields to the instance configuration instead.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-22 14:11:20 +00:00
Mathieu Choplain
c9c23bef54 drivers: sensor: stm32_temp: use CAL_RES everywhere
The raw "12" constant was used in a place where the "CAL_RES" define should
have been used instead.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-22 14:11:20 +00:00
Peter van der Perk
40d79b1f64 sensor: bmm150: fix init when no trigger is selected
When no trigger was chosen case statement fell through to
default which causes the return code to -ENOTSUPP

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-01-22 14:08:56 +00:00
Gaetan Perrot
27be4443fc drivers: clock_control: litex: remove redundant initialization
Local variables are initialized but always overwritten before being
read or return.

Drop the redundant initialization.

No functional change intended.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-22 14:08:19 +00:00
Gaetan Perrot
49de45225d drivers: clock_control: litex: make litex_clk_dts_clkouts_read void
litex_clk_dts_clkouts_read() never reports errors and always returns
0.
The error check at the call site is therefore dead code.

Make the function void and drop the unused error handling.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-22 14:08:19 +00:00
Gatien Chevallier
84dc327084 drivers: ethernet: stm32: handle MAC address with net_eth_mac_load()
This new API handles if the MAC address should be fetched from NVMEM,
is static or be randomly generated. Use it so that the driver can
fetch the MAC address from the OTP fuses, when possible.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
2026-01-22 14:07:37 +00:00
Gatien Chevallier
ff864b3cd3 drivers: otp: add stm32 BSEC driver
Introduce the Boot and SECurity(BSEC) control driver. The BSEC
peripheral manages the accesses to an embedded one time
programmable(OTP) array of fuses. Those fuses are used to store
on-chip, non-volatile data like boot and security parameters (e.g:
secret keys, non-volatile counters, etc...).

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
2026-01-22 14:07:37 +00:00
Khoa Tran
ca8e82532a drivers: rtc: Add update to use with new battery backup inplementation
Update Renesas RTC driver to use with the new battery backup inplementation

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
2026-01-22 14:02:40 +00:00
Khoa Tran
caf40f2581 drivers: misc: update Renesas RA ethos_u init flow
Remove the NPU power domain enabling inside ethos_u code due to it
has already been done by soc_reset_hooks()

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-01-22 14:02:40 +00:00
Khoa Tran
0a37e1f43f drivers: display: update GLCDC device init flow
Remove power domain on for GLCDC controller inside driver code
due to it has already been done by soc_reset_hooks()

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-01-22 14:02:40 +00:00
The Nguyen
cb47fb2706 drivers: clock_control: remove clock early init for Renesas RA
Remove the root clock control early initialization because it has
already been done in the soc_reset_hooks()

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2026-01-22 14:02:40 +00:00
Camille BAUD
bddaa08afd drivers: adc: add bflb adc driver
Adds a driver for the GPADC

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-22 14:01:57 +00:00
Yangbo Lu
b2ac268a66 drivers: ethernet: dsa: make dsa_tag_netc driver native
The DSA tag protocol driver should be native for packet
tagging and untagging. There is possibility other vendors/IPs
use it. So, just defined DSA tag structures in header file
instead of using hal header file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-22 08:41:00 +00:00
Yangbo Lu
05c1fecb5b drivers: ethernet: dsa: move dsa_tag_netc driver out of subsys
Moved dsa_tag_netc driver out of subsys. Maintained it in
drivers/ethernet/dsa as vendor driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-22 08:41:00 +00:00
Yangbo Lu
cd5bc5caa5 drivers: ethernet: dsa: improve DSA_NXP_NETC_GCL_LEN Kconfig option
Renamed DSA_NXP_NETC_GCL_LEN to DSA_NXP_IMX_NETC_GCL_LEN for
naming consistency, and wrapped it in DSA_DRIVERS condition.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-22 08:41:00 +00:00
Gaetan Perrot
981872e203 drivers: ethernet: nxp_imx_netc: netc_blk: make ierb_init() void
ierb_init() never reports an error and cannot fail in practice.
Returning an int led to a dead error.

Convert ierb_init() to a void function, drop the unused return value
checks, and provide a no-op implementation for SoCs that do not
require IERB initialization.

This simplifies the control flow and removes an unnecessary error
condition.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-22 08:40:44 +00:00
Gaetan Perrot
0f046ac0de drivers: adc: adc_ambiq: check return value of adc power control
Handle the return value of am_hal_adc_power_control() during ADC
initialization.

The previous code overwrote the return value before it was checked,
which could silently ignore failures when powering on the ADC.

Fix this by validating the return code and propagating an error if
the operation fails.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-22 08:40:37 +00:00
Camille BAUD
a780587ccb drivers: display: move ssd1306.c to display_ssd1306.c
add missig prefix

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-22 08:40:29 +00:00
Camille BAUD
74975b0be5 drivers: display: ssd1306: move registers from header to main file
standard self-containment

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-22 08:40:29 +00:00
Camille BAUD
fad7e5dfe6 drivers: display: rename ssd1306/9fb to ssd1306/9
harmonize with other drivers, remove irrelevant suffix

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-22 08:40:29 +00:00
Dharun krithik k
682493add9 drivers: watchdog: infineon: add PSoC4 support
Add support for the Infineon PSoC4 family to the infineon watchdog driver.
PSoC4 specific ILO frequency and tick period definitions.
Initialization and configuration logic specific to PSoC4.

Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-01-22 08:39:16 +00:00
Ibrahim Abdalkader
2a432c65a2 drivers: wifi: Use kernel heap for allocations
Use the kernel heap instead of the libc heap, improving
security and consistency.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-01-22 08:38:34 +00:00
Ibrahim Abdalkader
5e61c06c85 drivers: i3c: Use kernel heap for allocations
Use the kernel heap instead of the libc heap, improving
security and consistency.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-01-22 08:38:34 +00:00
Bernardo Perez Priego
42fcca480b drivers: i2c: microchip: Add mutex to transaction implementation
Currently, I2C transfer implementation does not have a mutex to
prevent multiple users from sending data at the same time, this could
lead to devices malfunction due to mixing I2C transaction data.

This patch adds mutex into transfer implementation to allow only one
user to send data at the time.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-01-22 08:37:21 +00:00
Rex Chen
cbc881cc51 drivers: wifi: nxp: Add scan limit configure item
Expose scan limit configuration to customer.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2026-01-21 20:08:14 +01:00
Armando Visconti
af6264e4b9 drivers/sensor: lsm6dsv16x: add device self test
Add device Self Test procedure. It is required to enable the
per device self-test DT property as well as the LSM6DSV16X_SELF_TEST
configuration.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2026-01-21 20:08:05 +01:00
Karol Werner
c84a5eb24f drivers: sensor: ina3221: fix measurement wait time calculation
INA3221 performs measurements sequentially for all enabled channels (see
datasheet chapter 7.3.1), but the driver was not accounting for this
when calculating the wait time. Additionally, when measuring both bus
and shunt voltages, conversion times should be summed rather than taking
greater value.

Fix by counting enabled channels and multiplying them with per-channel
conversion time. For combined measurement, sum both conversion times
instead of using MAX().

Signed-off-by: Karol Werner <karol@ppkt.eu>
2026-01-21 20:07:46 +01:00
Jimmy Johnson
abeca66759 sensor: shell: battery: Update support for battery shell queries
Added a `supported` flag to battery status query so if the
charger does not support the query (returns -ENOTSUP) the
command still returns any other supported queries and
doesn't error out without reporting anything. Any other
errors than -ENOTSUP still cause the request to return
immediately, as was the case before the changes. Tested
on nordic npm 13xx.

Signed-off-by: Jimmy Johnson <catch22@fastmail.net>
2026-01-21 20:07:36 +01:00
Albort Xue
65438886e6 drivers: serial: uart_mcux_lpuart: configure clock before initialization
Add clock configuration step before UART initialization to ensure
proper clock setup. The clock is first disabled, then configured
if supported by the clock controller.

If clock configuration is not supported (ENOTSUP/ENOSYS), the driver
continues with default settings. Other errors are treated as failures
and propagated to the caller.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-01-21 20:07:26 +01:00
Camille BAUD
c5c4df5dd6 tests: build_all: display: Add ssd1325
Add ssd1325 test, rename ssd1327

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-21 20:07:07 +01:00
Camille BAUD
384abc7489 drivers: display: Introduce SSD1325, update driver
Adds SSD1325 support to SSD1327 driver, update and
improve driver.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-21 20:07:07 +01:00
Camille BAUD
18652dea69 drivers: serial: bflb: do not enable rx and err interrupt by default
It breaks things when callback doesnt expect them.

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-21 20:06:48 +01:00
Sylvio Alves
be501ebb06 drivers: i2s: skip syscall validation when unconfiguring stream
When frame_clk_freq is set to 0, the I2S API specifies that the
stream should transition to NOT_READY state (i.e., unconfigure).
In this case, other config fields like mem_slab and block_size
are not used by the driver.

Skip the mem_slab and block_size validation in the syscall handler
when frame_clk_freq is 0 to match the driver behavior and avoid
rejecting valid unconfigure requests due to uninitialized fields.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-01-21 17:07:19 +01:00
Albort Xue
f5bee07bf5 drivers: spi: nxp_lpspi: Add clock configuration support
Add clock_control_configure() call during initialization to properly
configure the LPSPI clock. The implementation gracefully handles
platforms that don't support clock configuration by checking for
-ENOTSUP and -ENOSYS return codes and continuing with default
settings. Real configuration errors are logged and propagated.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-01-21 17:06:57 +01:00
Gaetan Perrot
8340e8c264 drivers: sensor: ina2xx: get: remove redundant channel NULL checks
The ina2xx channel get helpers assume that channel descriptors are
valid when the driver exposes a given sensor channel.

Checking for NULL channel pointers after they are already
dereferenced does not provide any real safety and can hide
configuration errors.

Drop the late NULL checks and rely on the driver contract that
supported channels must be properly defined.

No functional change intended.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-21 17:06:19 +01:00
Gaetan Perrot
ae44e1e7b7 drivers: sensor: ina2xx: fetch: remove redundant channel NULL checks
The INA2xx fetch path assumes valid channel descriptors for all
supported sensor channels.

NULL checks performed after channel data is accessed are ineffective
and misleading, as invalid channel definitions indicate a
configuration error rather than a runtime condition.

Remove the redundant checks and keep the channel handling consistent
with the driver expectations.

No functional change intended.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-21 17:06:19 +01:00
Aditya Ganesh
f9de2777d9 drivers: sensor: i3g4250d: migrate SPI support to stmemsc
Convert the i3g4250d driver to use the ST MEMS SC API for SPI

Signed-off-by: Aditya Ganesh <adga5133@colorado.edu>
2026-01-21 17:05:13 +01:00
Lucien Zhao
0a6e0160b4 hwinfo: mcux_sim/mcux_rcm: Add new dependency
Change to use DT_HAS_NXP_SIM_UUID_ENABLED/DT_HAS_NXP_RCM_HWINFO_ENABLED
as the dependency condition for HWINFO_MCUX_SIM/HWINFO_MCUX_RCM to
enable the driver when the nxp,sim-uuid/nxp,rcm-hwinfo compatible
is present in the devicetree.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2026-01-21 13:03:11 +00:00
Stephan Linz
8bf8eeb338 drivers: display: rm67162: avoid uninitialized variable
Warning as error was:

.../drivers/display/display_rm67162.c: In function ‘rm67162_write_fb’:
.../drivers/display/display_rm67162.c:383:9: error: ‘wlen’ may be used
          uninitialized in this function [-Werror=maybe-uninitialized]
  383 |  return wlen;
      |         ^~~~
cc1: all warnings being treated as errors

Signed-off-by: Stephan Linz <linz@li-pro.net>
2026-01-21 13:01:53 +00:00
Flavio Ceolin
3d5a3ae075 entropy: mcux_rng: Do not ignore possible error
Propagate the HAL error otherwise it may return success even
when it fails causing invalid entropy and compromising security.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-21 11:24:07 +00:00
Ederson de Souza
86f7962d2c drivers/i3c/mcux: Handle short reads from target
Sometimes, the size of a message coming from a target is not known in
advance. In those cases, we must rely on the T-bit to get the end of
message, which is signaled as the `COMPLETE` bit of `MSTATUS`.

This patch verifies the COMPLETE bit before starting to wait for data,
and if set, simply returns what was read so far.

As a bonus, this simplifies the handling of IBI bytes: no need to rely
on timeouts, if it's reading from IBI, etc.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2026-01-21 11:19:57 +00:00
Ederson de Souza
3311d9734c drivers/i3c/mcux: Don't lose return value for function
Return value for `mcux_i3c_do_one_xfer` was being lost due reuse
of `ret` variable. Use another variable for timeout check.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2026-01-21 11:19:57 +00:00
Ederson de Souza
0bbe07bbc7 drivers/i3c/mcux: Use size_t for buffer size
Or a buffer whose size is 256 will become zero.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2026-01-21 11:19:57 +00:00