Commit graph

28,390 commits

Author SHA1 Message Date
Nilesh Vyas
132ab06a3f drivers: display: st7796s: Add display_set_orientation API
This commit adds the implementation for the display_set_orientation API
to the ST7796S display driver.

Currently, the driver lacks support for changing the display orientation
at runtime. This change implements the API to allow for hardware-based
rotation using the MADCTL register.

The implementation was tested on an `rd_rw612_bga` board with a 320x480
display using the ST7796S controller. The API now correctly handles
rotations to 0, 90, 180, and 270 degrees by configuring the MY, MX, and
MV bits of the MADCTL register.

Signed-off-by: Nilesh Vyas <nileshvyas1112@gmail.com>
2025-11-13 20:34:06 -05:00
Khoa Tran
7c529fbd0c drivers: spi: Initial driver support for SCI B SPI on Renesas RA
Add SCI B SPI driver support for Renesas RA

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
2025-11-13 20:33:44 -05:00
Terry Geng
cf3839f5ad drivers: spi: spi_pico_pio: Free sm resources when reconfiguring
When SPI spec is reconfigured, avoid reallocating another sm and properly
free the loaded sm programs before attempting to load new programs.

Fix #94416.

Signed-off-by: Terry Geng <terry@terriex.com>
2025-11-13 20:32:41 -05:00
Michael Smorto
20f6d716a3 drivers: video Add Himax HM0360 camera sensor driver
Adds support for the HM0360 camera.

Signed-off-by: Michael Smorto <CyberMerln@gmail.com>
2025-11-13 20:32:26 -05:00
Sanjay Vallimanalan
b804a5accc drivers: entropy: mspm0: Add a support for TI MSPM0 TRNG module
TI MSPM0 has a TRNG module to generate truly random bits. Add a support
for TI MSPM0 TRNG module.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
2025-11-13 20:31:46 -05:00
Bindu S
fb954189ee drivers: spi: Added LPSS DMA support for SPI
Enabled intel LPSS DMA interface using dw common to support
usage of internal DMA in LPSS SPI to transfer and
receive data.

Signed-off-by: Bindu S <bindu.s@intel.com>
2025-11-13 20:31:31 -05:00
Tony Han
bd15f36928 drivers: can: sam: update the can_sam driver for sama7g5 MCAN
Update the driver (supporting samx7x SOCs) to support sama7g5 MCAN.

Differences lists bellow:
          |           samx7x MCAN           |        sama7g5 MCAN        |
----------|---------------------------------|----------------------------|
CAN core  | the same                        | the same                   |
clock     | peripheral clock with a divider | generic & peripheral clock |
Msg RAM   | address configured by CCFG_CAN0 | in SRAM, configured by SFR |

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:31:14 -05:00
Tony Han
3c532c47f0 drivers: net: sam_gmac: add BUILD_ASSERT for checking GMAC_QUEUE_NUM
'GMAC_QUEUE_NUM' is a value of 'num-queues' for the first GMAC
instance getting from the device tree. It is used directly or
indirectly (by GMAC_PRIORITY_QUEUE_NUM) for defining and
initializing 'struct eth_sam_dev_data' with a value from Kconfig
(GMAC_ACTIVE_PRIORITY_QUEUE_NUM).

As there will be a big change for applying the corresponding
num-queues for each GMAC 'struct eth_sam_dev_data', here just
keep it as is. Adding the BUITD_ASSERT to make sure the array
queue_list[] is large enough for all GMAC instances.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
8880364901 drivers: net: sam_gmac: update random MAC addr for multi inst support
Add variable 'random_mac_addr' for 'zephyr,random-mac-address' from
device tree. Update generate_mac() to get random MAC address for each
GAMC interface with the 'zephyr,random-mac-address' property.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
7ff2f53c95 drivers: net: sam_gmac: deprecate the 'mac-eeprom' option
Deprecate the 'ETH_SAM_GMAC_MAC_I2C_EEPROM' for the 'mac-eeprom' option,
Limite it to be used when there's only one activated GMAC instance.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
8b0f8aaa2c drivers: net: sam_gmac: remove getting max_frame_size from DT
As jumbo frame size is not supported by the networking subsystem, only
max_frame_size 1518 and 1536 can be used. The Frame size 1536 would
allow for packets with a vlan tag, so enable GMAC_NCFGR_MAXFS when
NET_VLAN is configured.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
50b3028279 drivers: net: sam_gmac: remove run once check in eth_iface_init()
To allow every interface be initialized properly when there are more than
one instance, remove the static variable "init_done" which is used to make
the initialize procedure only be done once.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
317c67501e drivers: net: sam_gmac: ref_clk_source for multi instances support
Add variable "ref_clk_source" to get and set the source for the GMAC
reference clock from DT for different GMAC instances.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
62732e57e0 drivers: net: sam_gmac: update PHY connection type for multi instances
Add variable "phy_conn_type" to get and use the phy_connection_type from
DT for different GMAC instances.
Update the judgement on phy_connection_type for multi instances support.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
e61c5c0ed1 drivers: net: sam_gmac: update macros for multi GMAC instances support
Change the driver from support 1 instance to support multi instances.

Changes includes:
 - irq_config()
 - config & data definitions
 - ETH_NET_DEVICE_DT_INST_DEFINE
 - PTP content / init / DEVICE_DEFINE

Limitations:
 - generate_mac() to be updated for supporting multi instances.
 - the configurations in Kconfig.sam_gmac are used for all instances.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
fb77401b5c drivers: net: sam_gmac: add var num_queues to config, update LOG info
Changes includes:
 - add the variable for num_queues to eth_sam_dev_cfg
 - update LOG with dev->name to distinguish different instances

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Tony Han
6536d0d687 drivers: net: sam_gmac: centralize the lists used for different queues
The lists optimized includes:
 - RX descriptors list
 - TX descriptors list
 - RX buffer accounting list
 - TX buffer accounting list
 - TX frames accounting list

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-13 20:30:38 -05:00
Raffael Rostagno
75395b86dc drivers: shdc: esp32: Remove unnecessary timeout
Remove unnecessary timeout. Queue event fetch already has
timeout control.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:20:08 +02:00
Raffael Rostagno
97fb97b047 drivers: sdhc: esp32: Remove pinctrl as required
Adjust driver so that pinctrl property is not required in device
tree. Remove card init functions from driver init, as set_io()
function is meant to power cycle the card (if pin is used) and
initialize card clock and bit width. If card is not inserted
while driver init runs, init() will fail unreasonably, so
card init should take place at set_io() calls.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:20:08 +02:00
Tim Lin
6a340f6ef0 drivers/espi: it8xxx2: Add a config to share h2ram pool space
The h2ram is an independent 4KB section. With default settings of
CONFIG_ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM and
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM,
There is a 2KB gap that is unused. This change was made to make
unused gap can be reused by other modules to reduce overall RAM
usage.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-11-13 23:16:43 +02:00
Qiankun Li
3b2b513be3 drivers: wifi: nxp: Raise Wi-Fi mgmt events for soft AP start/stop.
Enhanced the shim driver to raise Wi-Fi management events
when starting or stopping SoftAP, specifically in cases
where CONFIG_WIFI_NM_HOSTAPD_AP is disabled.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-11-13 23:16:25 +02:00
Vinicius Carvalho
6efc612e8d drivers: adc: nxp: adc reference and differential channels
Fixed regression related to adc reference and adjusted to be
compatible with NXP K and MCX series.

Signed-off-by: Vinicius Carvalho <carvalho-vinicius@outlook.com>
2025-11-13 23:13:36 +02:00
Jordan Yates
71e242556d drivers: nrf_wifi: move Kconfig validation to Kconfig
Move compile time validation of Kconfig symbols into the symbols
themselves.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:12:40 +02:00
Jordan Yates
7fe7beb183 drivers: nrf_wifi: buffers from Kconfig
Remove C code overrides of RX buffer counts and sizes when the TX path
is disabled. Move the reduced resource requirements into the Kconfig
default values. Default RX buffer sizes are not changed by the commit.

Fixes #92356

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:12:40 +02:00
Raffael Rostagno
9ca6920d98 drivers: ieee802154: esp32: Todo's review
Review todo items to make sure points are solved.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:12:14 +02:00
Raffael Rostagno
7d46b82568 drivers: ieee802154: esp32: Fix start/stop API
Fix start/stop driver API implementation. OT stack expects these
functions to only put IEEE802.15.4 in sleep mode and back in RX
mode when calling start. Fixes ifconfig down/up cycling as well
as nodes staying in leader role and not forming a network.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:12:14 +02:00
Declan Snyder
2f51f06d6f drivers: flexcomm spi: Fix 0 length xfer in dma path
If rx and tx length are both 0 in dma path then do nothing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-13 23:11:23 +02:00
Fin Maaß
5805685c32 Kconfig: make use of configdefault
use configdefault, when we want to change
the default of a Kconfig option.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-11-13 11:20:20 -05:00
Badr Bacem KAABIA
0719c9eca2 crypto: mbedtls_shim: Fix concurrency and deadlock issues
- **Fix session mutex handling:** Ensure the `mtls_sessions_lock` is
    always released in `mtls_get_unused_session_index` on failure
    to prevent deadlocks.
- **Protect `in_use` flag:** Added mutex protection when setting
    `in_use = false` in free functions.
- **Cleanup on setup failure:** Added calls to `mbedtls_*_free()`
    in `mtls_session_setup()` when key initialization fails.
- **Free logic fix:** Corrected `if/else` structure in
    `mtls_session_free()` to ensure the correct context is freed.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Badr Bacem KAABIA
577f60dcd7 crypto: mbedtls_shim: Remove incorrect out_len calculation in AEAD decrypt
Remove erroneous calculation of `apkt->pkt->out_len` in
`mtls_ccm_decrypt_auth` and `mtls_gcm_decrypt_auth`.
The output length should be handled by the caller or the
AEAD decryption process itself.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Badr Bacem KAABIA
01b0280bad crypto: mbedtls_shim: Fix typos
Corrected "encrypt" log messages to "decrypt."

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-13 12:01:44 +02:00
Chris Friedt
e6fcd9e09a drivers: smbus: stm32: add cast to avoid warning
Previously, the function `smbus_stm32_pcall()` implicitly cast
`uint16_t *` to `uint8_t *`. Add an explicit cast to avoid warning.

```shell
..drivers/smbus/smbus_stm32.c:358:32: error: initialization of \
  'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
  'uint16_t *' {aka 'short unsigned int *'} \
  [-Werror=incompatible-pointer-types]
  358 |                         .buf = &send_word,
      |                                ^
..drivers/smbus/smbus_stm32.c:358:32: note: (near initialization \
  for 'messages[1].buf')
..drivers/smbus/smbus_stm32.c:363:32: error: initialization of \
  'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type \
  'uint16_t *' {aka 'short unsigned int *'} \
  [-Werror=incompatible-pointer-types]
  363 |                         .buf = recv_word,
      |                                ^~~~~~~~~
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-11 19:48:27 +02:00
Chris Friedt
07d29ec96d drivers: smbus: use correct device initialization priority
The smbus driver initialization priority was previously set to
`KERNEL_INIT_PRIORITY_DEFAULT` (which is 40). However, the default init
priority of devices is typically `KERNEL_INIT_PRIORITY_DEVICE` (which is
50).

Since the stm32 smbus driver uses a reference to the underlying i2c
device, and since this driver was not being built in CI, this led to the
discovery that the smbus driver was initialized too early.

```shell
ERROR: Device initialization priority validation failed, the sequence of \
initialization calls does not match the devicetree dependencies.
ERROR: /smbus1 <smbus_stm32_init> is initialized before its dependency \
/soc/i2c@40005400 <i2c_stm32_init> (POST_KERNEL+1 < POST_KERNEL+4)
```

By setting the initialization priority to `KERNEL_INIT_PRIORITY_DEVICE`,
both smbus1 and i2c1 have their priorities evaluated in the same group,
and it becomes possible to determine relative priorities via phandle
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-11-11 19:48:27 +02:00
Badr Bacem KAABIA
8c8d1b5166 Bluetooth: hci_nxp: Improve MAC address uniqueness using CRC-32 hash
The previous method of deriving the local MAC address from the MCU's
Unique ID (UID) by slicing the last 3 bytes had two issues:

1.  **Low Entropy:** Risk of address collision because only a small
    portion of the UID was used, and this portion may not vary much.
2.  **Offset Error:** An incorrect offset calculation could copy
    non-intended bytes.

This commit resolves both issues by replacing the slice operation
with a **CRC-32 hash** over the **entire 16-byte UID**.

The lower 3 bytes (24 bits) of the resulting CRC-32 are used as the
local part of the MAC address, maximizing randomization and ensuring
a high probability of uniqueness across all devices.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-08 08:28:43 -05:00
Wojciech Jablonski
70961e26be drivers: mm: Fix vm region range check
Checking virtual range is incorrect because size + 1 addresses are
considered: size + starting address (that is also part of an
allocation). Hence the last address of the range is impossible to map

Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
2025-11-08 10:22:09 +02:00
Pieter De Gendt
be0f5b0dc7 drivers: syscon: Cleanup some doxygen return commands
Documenting return values with doxygen should use the retval tags.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-07 19:22:40 +02:00
Charles Hardin
5c7ce0950e drivers: ethernet: lan9250: check for errors during the init calls
During board bringup the spi interface was not working as expected
and the lna9250 driver should have errored early when the chip was
not detected and reset but ended up busy waiting on setup. So, this
will error out on the init path when the chip can not be reset at
the driver instance.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-11-07 08:22:06 -05:00
Daniel DeGrasse
5575d3b238 drivers: flash: flash_mspi_nor: indicate support for flash page layout
Flash MSPI NOR driver already has support for flash page layout, but did
not select the Kconfig symbol indicating so. Add the selection so
drivers can use the page layout api.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-11-06 16:28:58 -05:00
Loic Domaigne
1b0950035e drivers: crypto: crypto_ataes132a fix missing count check
Coverity reported an untrusted loop bound caused by a missing check on
the count value in ataes132a_send_command() for the response received
from the device.  As per datasheet section 6.1, count should be at least
3 bytes (1 byte for count, and 2 bytes for the 16 bits CRC).

While I'm expecting this condition to be very rare, it doesn't hurt to
implement a proper checking and report an error if count<3.

Coverity CID: 434625

Signed-off-by: Loic Domaigne <tech@domaigne.com>
2025-11-06 14:02:39 -05:00
Badr Bacem KAABIA
ae5b69c112 eeprom: fram: Fix read/write length and buffer pointer arithmetic
Fixes two critical bugs in the Fujitsu MB85RCxx I2C FRAM driver when
handling transfers that cross page boundaries:

Fixes incorrect write length: The mb85rcxx_write function was
incorrectly passing the total remaining length (len) to the
underlying I2C transfer instead of the page-limited length (len_in_page).
This resulted in I2C errors or data corruption when writing past a page
boundary.

Fixes buffer pointer update: Corrects the loop's buffer pointer
arithmetic in both mb85rcxx_read and mb85rcxx_write. The original
code used incorrect casting (*(char *)&buf += len_in_page;), leading
to a strict aliasing violation and potentially undefined behavior.
The pointer is now correctly advanced using explicit casting:

- mb85rcxx_read: buf = (char *)buf + len_in_page;
- mb85rcxx_write: buf = (const char *)buf + len_in_page;

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-06 15:49:17 +02:00
BUDKE Gerson Fernando
55ecc63444 drivers: modem: bg9x: Update help description
Add note about PSM/eDRX modes to make it clear that off-load driver
still important when using in baterry powered devices.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-11-06 12:30:29 +02:00
BUDKE Gerson Fernando
40530d6f3e Revert "drivers: modem: deprecate MODEM_QUECTEL_BG9X"
This reverts commit da5eef665a.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-11-06 12:30:29 +02:00
Badr Bacem KAABIA
91d2dcf350 drivers: gnss: Fix snprintk return value check in gnss_dump
The snprintk function returns the number of characters that *would have
been* written if the buffer was large enough. This means if the return
value `ret` is greater than or equal to the buffer size `strsize`, the
output was truncated.

The existing check `(strsize < ret)` was incorrect as it did not
handle the case where `ret == strsize` (output fits exactly, but no
room for null terminator) and did not check for negative return values
which indicate an encoding error.

This commit corrects the check to `(ret < 0 || ret >= strsize)` to
properly detect truncation and errors, returning -ENOMEM in these
cases. This fix is applied to `gnss_dump_nav_data`, `gnss_dump_time`,
and `gnss_dump_satellite` functions.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-06 12:29:24 +02:00
Camille BAUD
4b96632e54 drivers: dma: BFLB DMA flush cache also for source
also flush cache for source, not just dest

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-11-05 15:39:02 -05:00
Liam Ogletree
9b4cc182ae drivers: flash: Fix devicetree API typo in AT25XV021A flash driver
Fix typos in the driver instantiation macro, which leads to page_size
and timeout_erase defaulting to 0 regardless of whether the
devicetree instance has the read-only property or not.

DT_INST_NODE_PROP_OR() -> DT_INST_PROP_OR()

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2025-11-05 15:37:04 -05:00
Imran Sajjad
3a5dad8831 drivers: i2s: stm32 i2s bit clock continuous mode
Added check for continuous or gated bit clock. Now clock does
not stop if I2S_OPT_BIT_CLK_CONT is selected.

Signed-off-by: Imran Sajjad <imransajjad89@gmail.com>
2025-11-05 15:36:46 -05:00
Badr Bacem KAABIA
a08c691e05 drivers: crc: renesas_ra: Fix state management and locking
Fix several issues related to the incremental CRC API usage:

1. Ensure the lock is not prematurely released in crc_set_config,
   preventing semaphore double-release (over-giving).
2. Reset the flag_crc_updated state on all error paths to prevent
   incorrect seeding in subsequent attempts.

Signed-off-by: Badr Bacem KAABIA <badrbacemkaabia@gmail.com>
2025-11-05 13:30:30 -05:00
Alain Volmat
679a6c6ec6 memc: stm32_xspi_psram: avoid XSPIM_Config if running from flash
Avoid calling the HAL_XSPIM_Config function if the app is running
from flash in order to avoid locking since HAL_XSPIM_Config is once
turning off each XSPI instance when performing the configuration.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00
Alain Volmat
299e067f8f drivers: memc: stm32_xspi_psram: avoid hardcode to XSPI1
The PSRAM could well be plugged to the XSPI2 instead of XSPI1
hence allow configuration of the IOPort and avoid forcing the
ChipSelect in order to allow working on both XSPI1 or XSPI2.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00
Alain Volmat
d604af86b0 drivers: memc: stm32_xspi_psram: use XSPI_HandleTypeDef ptr at init
Avoid copying the whole XSPI_HandleTypeDef structure into the
init function and use a pointer since the structure is already part
of the _data structure.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-11-05 11:35:04 +02:00