Commit graph

126,787 commits

Author SHA1 Message Date
Etienne Carriere
7df2ce80ae drivers: usb: udc: stm32: remove useless OR operation on return value
Remove useless OR operation on return value is udc_stm32_enable()
since the return value is always 0 before it's OR-ed with a new return
value.

No functional changes.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-24 08:57:55 -07:00
Etienne Carriere
86616fd406 drivers: usb: udc: stm32: test essentially boolean value
Change implementation to ensure all boolean test are done on essentially
boolean values.

No functional changes.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-24 08:57:55 -07:00
Etienne Carriere
16237e4147 drivers: usb: udc: stm32: rename endpoint config variable
Rename endpoint configuration pointer variable in HAL_PCD_ResetCallback(),
udc_stm32_ep_mem_config() and udc_stm32_ep_disable() from ep to ep_cfg
to prevent confusion since ep is usually used as endpoint address.

For consistency, also use ep_cfg elsewhere where an endpoint config
pointer is used, instead of using either cfg, ecfg and ep_cfg.

No functional changes.

Suggested-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-24 08:57:55 -07:00
Etienne Carriere
66478fd11a drivers: usb: udc: stm32: test HAL return value
Add missing test of some HAL functions return value.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-24 08:57:55 -07:00
TOKITA Hiroshi
2cce5ed488 drivers: gpio: aw9523b: Fix the condition for changing Push-pull
The condition for setting the GPOMD bit when `port0_push_pull`
is enabled was reversed.
Fix this problem.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-10-24 08:57:29 -07:00
Ruijia Wang
41b3824f4a samples: Update XSPI memc and flash samples on RT700
Add memc sample for XSPI PSRAM.
Add spi_flash sample for XSPI Nor Flash.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-10-24 08:56:59 -07:00
Ruijia Wang
4f5cf51c59 soc: Update code to get flash size from dts
Update the Kconfig to parse the dts.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-10-24 08:56:59 -07:00
Ruijia Wang
9560a96523 boards: Update related configuration for RT700 xspi case
Add flash and psram dts based on RT700 board resource.
Add the clock and power setting for XSPI in board specfic initilization
function.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-10-24 08:56:59 -07:00
Ruijia Wang
b1dc69e0d1 dts: Enable the xspi flash and psram cases on NXP RT700
Move nxp,xspi.yaml from spi bindings to mtd, it should be flash
controllor rather than simple bus controller.
Delete the xspi flash mx25um51345g bindling yaml file which is useless.
Enable flash and two psrams on RT700 core0 and one psram on core1.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-10-24 08:56:59 -07:00
Ruijia Wang
e8bb85ee69 drivers: xspi: add NXP xspi driver
Add mcux xspi driver suppport. Add the flash and psram driver support
based on xspi driver.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2025-10-24 08:56:59 -07:00
Jun Lin
d5aad385c1 drivers: i2c: npcx: add support for NPCKn variant
In NPCXn variant, the I2C peripheral hardware uses FIFO for data
transfer, while in NPCKn variant, it uses DMA.
This change separates the FIFO-specific code from the common controller
logic and adds support for DMA mode.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-10-24 08:56:39 -07:00
Jun Lin
612c32429c dts: bindings: i2c: npcx: intruduce a new propery dma-driven
Add an new boolean property `dma-driven` to indicate if the I2C
hardware module has a dedicated DMA support for the data transfer.
Add this property to `i2c_ctrlx` nodes in NPCKn variant SoCs.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2025-10-24 08:56:39 -07:00
S Mohamed Fiaz
4c33c7e24a drivers: i2c: silabs: remove dev arg from PM state lock helpers
Dropped the device argument from i2c_silabs_pm_policy_state_lock_get/put.
Updated all internal usage.

Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-24 08:55:25 -07:00
S Mohamed Fiaz
fa3087f8c4 drivers: i2c: silabs: Update i2c driver with HAL changes
Updated the I2C driver for EFR Series 2 devices based on the
design improvements in the SiSDK I2C implementation

Signed-off-by: S Mohamed Fiaz <Fiaz.Mohamed@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-10-24 08:55:25 -07:00
Mickael Bosch
d27b654eb5 drivers: dac: add AD56x1 devices
The Analog Device AD5601, AD5611, and AD5621 devices are 8, 10 and 12
bits DAC respectively.

These devices use a 16 bits SPI communication protocol.
The 2 first bit encode the low power mode (this driver do not use the
low power mode, it always run in the 'normal' mode).
The next 14 bits contain the left aligned value. The 2, 4, or 6
remaining bits (depending on the resolution) are set to 0.

Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
2025-10-24 08:55:03 -07:00
Marko Sagadin
f3b3739fd8 drivers: spi: enhance spi shell
This commit enhances the SPI shell in a number of different ways:
- Previously only spi buses could be specified in the shell.
  Now both spi buses and spi devices (physical device on the spi bus,
  not the device struct) can be specified.
- Both spi buses and spi devices can be specified by their node name or
  by any of their node labels.
- Instead of having a single instance of a spi config struct, each spi
  bus/device has it's own dedicated config. This means that
  users only have to configure spi config once for each device and use
  them freely, without needing to reconfigure them every time after
  switching between different spi buses/devices.
- Spi devices get their spi configs automatically from the devicetree at
  compile time. This means that once a good working configuration is
  found for a spi device, that can be specified as a "default" in the
  devicetree.
- Spi devices don't need to have their status set to "okay" or be
  initialized by their driver to be accessible from the spi shell. As
  long as the spi bus that they are on has status="okay", they can
  be accessed.
- When changing a cs pin with spi cs command, the spi device/bus
  needs to first be specified before specifying the gpio device.
  The nested dynamic subcommands enable users to autocomplete both
  of the arguments.

Implementation details

- It was possible to gather all the information about the spi devices
  from the devicetree at the compile time, but not for the spi buses.
  For the spi devices we have a way to get spi device nodes that are
  on an okay spi bus with a devicetree macros and extract data from
  those nodes. For the spi buses that is not possible,
  since there is no macro to get all spi bus nodes at once.
- So, for the spi buses this discovery step has to be done at the
  runtime, with the help of SYS_INIT macro and shell_device_filter
  function.
- Since we now allow users to either specify a spi bus or a spi device
  by their node label or their node name, we needed to have a way to map
  those strings to the correct spi config struct, so we can later pass
  it to the spi API functions or do some configuration on it. That is
  made possibly by the find_spec_by_label and the two arrays,
  spi_things and maps.

Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
2025-10-24 08:54:43 -07:00
Josuah Demangeon
1ac86c4925 samples: drivers: video: capture: use DEVICE_DT_GET_OR_NULL for display
Allow the display to also use if() instead of #if by leveraging the
DEVICE_DT_GET_OR_NULL() that permit display_dev to always be defined.
The compiler will const-fold all the unused variables and functions.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
db27102be6 samples: drivers: video: make capture sample failure more visible
Centralize exit of all helper functions and display a common message
that indicates clearly that the sample is not blocking on any function
but instead stopped running.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
6893bc10cd samples: drivers: video: capture: move code to functions
Move blocks of code into individual functions to make the sample more
modular, component-based.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
15daa447ed tests: drivers: video: test_pattern: new test from the sample
Turn the test part of the sample code into a dedicated test into the
tests/ directory instead of just samples/.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
ecc54ff0af samples: drivers: video: capture: use the same error handling idiom
Use the same error handling implementation as everywhere else in the
video area and the majority of Zephyr:

  ret = error();
  if (ret < 0) {
      return ret;
  }

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
6ad6945ed6 samples: drivers: video: capture: use app_ prefix
Use an "app_" prefix for all functions local to the application.
This avoids accidentally using "display_" or "video_" prefix that
are reserved for the respective area.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
2250672c43 samples: drivers: video: capture: use if() instead of #ifdef
When possible, make use of C if statements instead of preprocessor #ifdef.
This still allow conditional compilation by letting the compiler
garbage-collect unused code.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
d2f2ba7485 samples: drivers: video: capture: change log verbosity
Increase log verbosity to print one line per captured frames and make
it like in the README by default. This avoids giving the impression
that the capture sample does not work. Users desiring to get better
performance can disable logging or reduce verbosity from INF to WRN.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
eb01f1d451 samples: drivers: video: capture: use static initializers
When possible, use static initializer instead of memset() and
initialization at runtime. Fixes a bug where uninitialized memory of caps
would be used, in case drivers do not initialize them like they should.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Josuah Demangeon
c765b99887 drivers: video: sw_generator: support test pattern CID
Add an always-on CID for enabling the test pattern, which makes
it possible to use it in tests enabling the test first enabling
the pattern.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-24 08:52:57 -07:00
Yong Cong Sin
c262e588a1 tests: arch: riscv: fatal: test z_riscv_fault() path
- Updated the testcase to test `z_riscv_fault()` error handling path.
- The main file is now fully assembly so that we can use precompiler
  guards more easily to test with/without frame pointer enabled.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2025-10-24 08:51:15 -07:00
Yong Cong Sin
643e09febf arch: riscv: streamline fatal handling code
`CONFIG_EXTRA_EXCEPTION_INFO` that was added in #78065 doesn't
seem necessary, as we were already storing and printing the
callee-saved-registers before that. All `CONFIG_EXTRA_EXCEPTION_INFO`
does in RISCV is to add an additional `_callee_saved_t *csf` in the
`struct arch_esf`, which overhead is negligible to what's being enabled
by `CONFIG_EXCEPTION_DEBUG`.

Let's remove `CONFIG_EXTRA_EXCEPTION_INFO`, and have that extra
`_callee_saved_t *csf` in the `struct arch_esf` as long as
`CONFIG_EXCEPTION_DEBUG` is enabled.

TL;DR: it doesn't make sense to not enable `CONFIG_EXTRA_EXCEPTION_INFO`
when `CONFIG_EXCEPTION_DEBUG` is enabled, so let's merge them.

Then, since `*csf` is always available in the `struct arch_esf` when
`CONFIG_EXCEPTION_DEBUG=y`, we can simply rely on that pointer in
`z_riscv_fatal_error()` instead of an additional argument in
`z_riscv_fatal_error_csf()`, rendering the latter redundant and thus
can be removed.

Additionally, save the callee-saved registers before jumping to
to `z_riscv_fault()`, so that callee-saved-registers are printed on
generic CPU exception as well.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2025-10-24 08:51:15 -07:00
Vinayak Kariappa Chettimada
4428c1a868 Bluetooth: Controller: nRF54Lx: Enable Controller Privacy Support
Enable Controller Privacy support for nRF54Lx as default.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Vinayak Kariappa Chettimada
6d79d52118 Bluetooth: Controller: nRF54Lx: Add Controller Privacy Support
Add Controller Privacy support for nRF54Lx by porting to
use NRF_AAR00 h/w peripheral.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Vinayak Kariappa Chettimada
7a1e7c9fba tests: bsim: Bluetooth: Conditionally compile Controller Privacy
Conditionally compile Controller Privacy testing and enable
advertising test for nRF54L15bsim.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Michael Klammt
0876b5a2de drivers: gpio: fix SN74HC595 reset GPIO prop name
The reset GPIO for the SN74HC595 driver was not working anymore since
c407fbc. That commit made it optional among other changes but
accidently removed the s from reset_gpios property name causing the
driver not being able to retrieve the specified reset-gpios property
from the devicetree anymore. Add the missing s back to fix this.

Signed-off-by: Michael Klammt <michael.klammt@automatic-research.de>
2025-10-24 11:42:42 +02:00
Dominik Ermel
7cd7f8ba36 west.yml: Update FATFS revision to fix window alignment setting
Last FATFS update accidentally made window alignment setting
ineffective.

Fixes #96485

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-10-24 11:35:12 +02:00
Axel Utech
cf5fc97b06 drivers: dma: stm32: enable isr only if needed
Improve the STM32 DMA driver to only enable transfer and half-transfer
interrupts if the interrupt handler has effects beside clearing the
isr flag. This improves system performance as unnecessary interrupts
are no longer raised by the hardware.

Signed-off-by: Axel Utech <utech@sofiha.de>
2025-10-24 11:35:03 +02:00
Jason Yu
ce3a3da9dd drivers: gpio: gpio_mcux: Fix port index mismatch issue
When GPIO works with IOPCTL, the PIO instance offset in IOPCTL
can't be calculated easily. It should be recorded in DTS based on
SOC integration.
When IOPCTL is used, add PIO reigster address in DTS, gpio_mcux
driver will configure the PIO register based on this address.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Jason Yu
69f797c6d2 drivers: gpio: gpio_mcux: Improve IRQ control macro usage
Add more direct macro GPIO_IRQ_CTRL to control different
IRQ implementation.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Jason Yu
2e64d67fad drivers: gpio: gpio_mcux: Fix bug that cannot set IOPCTL drive strength
The macro FSL_FEATURE_PORT_HAS_DRIVE_STRENGTH should only be used
for PORT but not IOPCTL.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-10-24 11:34:53 +02:00
Kai Cheng
038523c63b Bluetooth: Conn: add connection type helper functions
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections

Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-24 11:34:41 +02:00
Lyle Zhu
74e94fd8e9 Bluetooth: SDP: Optimize functions bt_sdp_get_XXX()
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
922da6cc4d Bluetooth: classic: shell: Support attribute parsing helper
Update the command `sdp-find` to support attribute parsing helper.
If the argument count is 1, the general SDP discovery will be used
to discover the protocol `L2CAP`.

In the SDP record discovered callback, call attribute parsing helper
functions to parse the SDP record and SDP attributes. And print all
parsed attribute values.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
7f04884eab Bluetooth: SDP: Add helper functions to parse discovered record
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.

Add function `bt_sdp_record_parse()` to parse the received SDP record.

Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.

Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.

Add function `bt_sdp_attr_value_parse()` to parse the attribute value.

Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.

Add function `bt_sdp_attr_read()` to read the value of the attribute.

Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
8365ed718e Bluetooth: Classic: SDP: Add protocol identifier codes
Add all protocol identifier codes defined in Assigned Numbers
specification.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Bjarki Arge Andreasen
306c3d483e drivers: nrf: remove handling of cross domain pins
Remove the handling of cross domain pins from nrf drivers. To use
cross domain in tests, force on constlat and disable power domains
for the test.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-10-24 11:33:28 +02:00
Laurentiu Mihalcea
74b51136a4 soc: nxp: imx93: drop SOF-specific region mapping
Remove SOF-specific region mappings. These should be handled inside of
SOF (external module), instead of Zephyr. This way, we avoid creating
a cyclic dependency between the two.

Needed for #91061.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-10-24 11:33:22 +02:00
Laurentiu Mihalcea
ff9835b8b1 boards: nxp: imx95_evk: drop rimage support
rimage is used in the context of Sound Open Firmware (SOF) to sign the
resulting firmware image. Since SOF is an external module, code found in
mainline Zephyr should not depend on it, but, rather, the other way
around. Therefore, drop the rimage signing support from the imx95_evk
board. This should be handled in SOF instead of Zephyr.

Needed for #91061.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-10-24 11:33:22 +02:00
The Nguyen
d8cb02aa24 modules: renesas: provide configuration for r_sce build
Add configuration to select the security engine for r_sce build

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-10-24 11:33:04 +02:00
John Batch
bec09e2bf1 tests: drivers: gpio: kit_pse84_ai gpio_api test support
Adding overlays to support gpio_api test on the kit_pse84_ai m33 and m55
cores.  The test expects jumpers between P16_0 (J14_6) and P16_1
(J14_5).

Signed-off-by: John Batch <john.batch@infineon.com>
2025-10-24 11:32:57 +02:00
John Batch
5db1df0453 boards: infineon: Add kit_pse84_ai board support
Adds basic support for the Infineon kit_pse84_ai board, including:
 * samples/hello_world
 * samples/basic/blinky
 * tests/driver/uart/uart_api

Signed-off-by: John Batch <john.batch@infineon.com>
2025-10-24 11:32:57 +02:00
Maochen Wang
dfd6efc972 manifest: update hostap to fix EAP-FAST connection issue
DUT Failed to associate fast-gtc/fast-mscahpv2 enterprise network, there
is error log shows 'EAP-FAST: Compound MAC did not match'.
tls_connection_get_eap_fast_key() gets wrong key, currently using
mbedtls_ssl_tls_prf to derive key, and it's not PSA API.
Therefore, conn->expkey_keyblock_size can't be set as 0, the correct
expkey_keyblock_size should contain keylen + mac_key_len + ivlen.
Remove MBEDTLS_USE_PSA_CRYPTO to get keyblock_size correctly.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-10-24 11:32:38 +02:00
Sunil Abraham
9f4c02edd2 boards: microchip: SAM_D5x_E5x: configure clock source and frequency
Configure CPU clock using FDPLL, sourced from XOSC to achieve 120Mhz.
Also configure UART clock to support bootup initialization.

Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
2025-10-24 11:32:30 +02:00