Commit graph

136,983 commits

Author SHA1 Message Date
Pedro André
c0ba4d3ffe drivers: gnss: f9p: fix multiple rtk enabled instances
The U-blox F9P driver uses the GNSS_RTK_DATA_CALLBACK_DEFINE macro to
register a callback for when RTK data is available. This is an issue when
multiple instances of the F9P are available and RTK is enabled since this
macro leads to a naming collision. The following compilation error is
reported:

     error: redefinition of '_gnss_rtk_data_callback__f9p_rtk_data_cb'

This is because GNSS_RTK_DATA_CALLBACK_DEFINE only uses `_callback` to
identify the callback being registered. As a fix, use the recently
introduced GNSS_DT_RTK_DATA_CALLBACK_DEFINE instead, which takes into
account the `_node_id` while naming the callback.

Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
2025-11-14 10:27:46 +02:00
Pedro André
3138b54f2c drivers: gnss: introduce node based callback macros
The current GNSS_DATA_CALLBACK_DEFINE, GNSS_SATELLITES_CALLBACK_DEFINE and
GNSS_RTK_DATA_CALLBACK_DEFINE macros only utilize `_callback` when naming
the respective callback. This means that if the same callback function is
used more than once, there will be naming conflicts.

In order to allow the same callback function to be used several times for
specific gnss devices, introduce GNSS_DT_DATA_CALLBACK_DEFINE,
GNSS_DT_SATELLITES_CALLBACK_DEFINE and GNSS_DT_RTK_DATA_CALLBACK_DEFINE
macros that take a device tree node identifier instead of a device
reference. This makes it possible to name the callback using both
`_node_id` and `_callback`. Such will uniquely identify any combination of
gnss device and callback.

Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
2025-11-14 10:27:46 +02:00
Robert Lubos
7e69575614 tests: net: socket: udp: Remove tests numbering
It shouldn't be needed to execute UDP sockets tests in a fixed order
(currently enforced by embedding the test number into the test case
name). In fact, this was only needed, as two test cases worked as
prerequisites for other tests, that should've been done in the setup()
function though.

Therefore, consolidate the two test cases which pre-configured the test
interface into a proper setup() function executed before the test
suite, and get rid of the confusing test case numbering.
There also was a race in TX time test due to incorrect mutex use, so fix
that by using semaphore instead.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-14 10:27:12 +02:00
Robert Lubos
f19e9667b4 tests: net: socket: udp: Add tests for UDP socket rebinding
Verify that UDP socket rebinding works fine for both, client and server
cases.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-14 10:27:12 +02:00
Robert Lubos
4453bfd1c9 net: context: Allow datagram socket rebinding
Rebinding of UDP sockets works just fine and there's really no reason to
disallow it. Keep the restriction for stream sockets only (as our TCP
implementation doesn't support rebinding).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-14 10:27:12 +02:00
Tony Han
f381e59807 tests: drivers: eeprom: api: enable tests for sama7d65_curiosity
Enable tests: tests/drivers/eeprom/api.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-14 10:26:50 +02:00
Tony Han
5c80e261cf boards: microchip: sam: add eeprom node to sama7d65_curiosity dts file
Add the node for on board EEPROM devices. Only the basic compatible
functions implemented. EUI-48 Node Address not added.
Add eeprom to the support list of the board.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-11-14 10:26:50 +02:00
Sylvio Alves
327954c3ef driver: wifi: esp32: update API interface
Add set_config to allow custom mac address.
Add statistics reset function.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-11-14 10:26:42 +02:00
Daniel Leung
65d31ea860 tests: intel_adsp/smoke: cast to signed ints before abs()
xt-clang complains about the clock ratio difference is unsigned
when being fed to abs(), though GCC does not. So type cast that
to signed integer before feeding to abs(). Clock ratio could be
big enough to overflow signed 32-bit integer. So we first cast
it to be a signed 64-bit integer before substraction.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 10:26:32 +02:00
Lyle Zhu
b540fde66b bluetooth: Classic: HFP: Set eSCO S4 bit if controller supports SC
The eSCO S4 settings feature should be enabled for CVSD Coding. It is
suggested by the HFP specification.

Set the eSCO S4 Settings Supported bit if the Secure connection is
supported by controller.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 09:26:21 +01:00
Lyle Zhu
1df6111c93 include: Bluetooth: Change return value of BT_FEAT_TEST() to boolean
In current implementation, the return value of `BT_FEAT_TEST()` is not
a boolean type. However, the macro `BT_FEAT_TEST()` is used as a type
with a return type value of boolean.

Change the return type of `BT_FEAT_TEST()` to boolean type to make it
easy to use.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 09:26:21 +01:00
Jordan Yates
1113d3129c disk: sdmmc_stm32: PM handling
Lock the sleep modes while SDMMC is running operations.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-14 10:26:15 +02:00
Kai Cheng
f0f2057316 Bluetooth: SMP: refactor SMP connection type checks
Replace direct conn->type comparisons with connection type helper
functions in SMP module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace bt_conn_is_type(conn, BT_CONN_TYPE_LE | BT_CONN_TYPE_BR)
  with !bt_conn_is_br(conn) && !bt_conn_is_le(conn) for clearer logic
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && (conn->type == BT_CONN_TYPE_BR)
  with bt_conn_is_br(conn) for simplified condition

This change completes the connection type helper refactoring across
the Bluetooth host stack, improving code consistency and readability.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Kai Cheng
b0505dbf3d Bluetooth: L2CAP: refactor L2CAP connection type checks
Replace direct conn->type comparisons with connection type helper
functions in L2CAP module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR
  with bt_conn_is_br(conn) for cleaner code
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace chan->conn->type == BT_CONN_TYPE_BR with
  bt_conn_is_br(chan->conn)

This change improves code readability and maintains consistency
with the connection type helper refactoring across the Bluetooth
host stack.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Kai Cheng
0f80444d12 Bluetooth: Core: refactor HCI core connection type checks
Replace direct conn->type comparisons with connection type helper
functions in HCI core module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_SCO with bt_conn_is_sco(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)

This change improves code consistency and maintains the same
refactoring pattern applied across the Bluetooth host stack.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Lyle Zhu
1820e4ed29 Bluetooth: Classic: HFP_AG: Check semicolon character of AT CMD ATD
Check if the received AT command `ATD` is valid. When the semicolon is
missing, return the error.

Remove the semicolon from the received valid data and notify received
number or memory location value.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:25:55 +02:00
Lyle Zhu
93cc24a678 Bluetooth: Classic: HFP_HF: Force ATD cmd to end with semicolon
Only voice calls are supported by HFP specification. And the
semicolon character shall be added when the voice call is originated.

Add the semicolon character to force the ATD command to end with
semicolon character.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:25:55 +02:00
Alberto Escolar Piedras
54d2ba3433 drivers/counter/counter_native_sim: Remove deprecated
This driver was renamed in
ab7a6de5bb
while the old kconfig options and dts binding were deprecated for 4.2
Let's remove them now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-14 10:25:41 +02:00
Carles Cufi
ffe2028dcf scripts: runners: Enable reusing the core dry run logic
In order to avoid duplication of logic in runners, allow subclasses
of ZephyrBinaryRunner to set self.dry_run so that they can then reuse
the logic in core.py to log instead of execute.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-11-14 09:25:32 +01:00
Carles Cufi
48e0481746 scripts: runners: Generalize the --dry-run option
Move the argparse.add_argument() call to the abstract base class and
augment the RunnerCaps class with a dry_run parameter.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-11-14 09:25:32 +01:00
Jordan Yates
18a3838e1c tests: zbus: publish_stats: test zbus_chan_pub_stats_data_age
Test the behaviour of `zbus_chan_pub_stats_data_age`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-14 10:25:20 +02:00
Jordan Yates
a9626ff3ae zbus: helper to query channel data age
Add a helper function to query how old the data in a channel is. Output
is converted to milliseconds as `k_ticks` objects cannot be compared
directly.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-14 10:25:20 +02:00
Yongxu Wang
dfe2c262c8 drivers: firmware: scmi: add cpu info get interface
Add scmi_cpu_info_get API to query CPU information via
NXP SCMI CPU domain protocol.

Retrieves run mode, sleep mode, and reset vector addresses
for the specified CPU ID using CPU_INFO_GET command.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-14 09:25:10 +01:00
Yongxu Wang
28b98c9ae8 drivers: firmware: scmi: add reset vector interface
Add scmi_cpu_reset_vector API for NXP SCMI CPU domain protocol.

This API allows setting CPU reset vector addresses using the
CPU_RESET_VECTOR_SET command. The vector address must point to
the initial address of the vector table

Supports 64-bit addresses and boot/start/resume vector flags.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-14 09:25:10 +01:00
Johann Fischer
620b7fe02f usb: host: usbip: fix actual_length in USBIP_RET_SUBMIT handling
actual_length needs to be set also for the OUT transfers. Assume that
requested length was transferred when there are no errors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-11-14 10:25:05 +02:00
Johann Fischer
b84b6d9e0a usb: host: usbip: check pool's buffer size USBIP_CMD_SUBMIT
Check that the pool's buffer size is large enough for the data in the
submit command.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-11-14 10:25:05 +02:00
Etienne Carriere
8bf93b26d6 drivers: i2s: stm32: clean indentation in instance init macros
Clean indentation in I2S_DMA_CHANNEL_INIT(), I2S_STM32_INIT() macros
of STM32 I2S driver, and SAI_DMA_CHANNEL_INIT() and I2S_STM32_SAI_INIT()
macros of STM32 I2S/SAI driver.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 10:24:56 +02:00
Etienne Carriere
e5aaceebe0 drivers: i2s: stm32: replace UTIL_AND() with IF_ENABLED()
Replace uses of UTIL_AND() with IF_ENABLED() that is far more
readable when initializing or not a structure instance.

No functional change.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 10:24:56 +02:00
Allen Curtis
26e9ce192d doc: version: document the required fields of VERSION file
Need to clarify what fields are required to successfully build.

Signed-off-by: Allen Curtis <allen.curtis@curtisembedded.com>
2025-11-14 10:24:47 +02:00
Johan Hedberg
445431c779 Bluetooth: Classic: AVRCP: Fix Clang/LLVM build failures
Having variable declarations after labels causes build failures with
Clang/LLVM:

subsys/bluetooth/host/classic/avrcp.c:1269:2: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
 1269 |         uint8_t failed_evt = 0;
      |         ^

/subsys/bluetooth/host/classic/avrcp.c:3809:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
 3809 |              uint64_t identifier = sys_get_be64(data->identifier);
      |              ^

Fix these by moving the declarations to the top of the function in the
first case and add braces for the second.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-11-14 10:24:38 +02:00
Jilay Pandya
c9536e65c7 drivers: stepper: tmc22xx: move to driver specific folder
tmc51xx and tmc50xx have already been placed in its dedicated folder,
however,tmc22xx is not.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-11-14 09:23:14 +01:00
Jilay Pandya
015a7c6d3f drivers: stepper: create gpio_stepper folder for h-bridge & step-dir
currently h_bridge_stepper driver is directly placed in drivers/stepper
and step_dir folder contains only gpio specific functionalities. This
commit reorganizes the h_bridge_stepper in gpio_stepper folder to organize
drivers and libs based on functionality.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-11-14 09:23:14 +01:00
Jilay Pandya
da6e98e479 drivers: stepper: tmc5xxx: move to driver specific folder
tmc51xx has already been placed in its dedicated folder, however,
tmc50xx is not. use absolute path for including tmc_rampgem_template
Kconfig.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-11-14 09:23:14 +01:00
Neil Chen
31fd167735 boards: nxp/frdm_mcxaxx6: Support trng for NXP frdm_mcxaxx6 board
Support trng for NXP frdm_mcxa366 and frdm_mcxa266 board
Verified tests/drivers/entropy/api

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
74d4ad70e0 dts: arm/nxp: Add trng nodes to NXP mcxaxx6 dtsi file
Add trng nodes to NXP mcxa366 and mcxa266 dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
201393a2b3 drivers: syscon: update syscon driver to support mcxa trng clock
Add mcxa trng clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
43ea5fe81f tests: drivers: pwm: pwm_api: enable flexio pwm test on frdm_mcxaxx6
Enable the flexio pwm test on NXP FRDM-MCXA366 and FRDM-MCXA266 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
17ee480212 boards: nxp/frdm_mcxaxx6: Support flexio for NXP frdm_mcxaxx6 board
Support flexio for NXP frdm_mcxa366 and frdm_mcxa266 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
53a04f28e6 dts: arm/nxp: Add flexio node to NXP mcxaxx6 dtsi file
Add flexio node to NXP mcxa366 and mcxa266 dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Neil Chen
6a423fc6e9 drivers: syscon: update syscon driver to support mcxa flexio clock
Add mcxa flexio clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Felipe Neves
01f08e184d boards: witte: linum: add display support
By enabling the LTDC controller and attaching it to
the zephyr, display node

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2025-11-14 09:22:07 +01:00
Daniel Leung
e45808b9cd xtensa: mmu: add page table usage statistics
Adds function for app to obtain page table usage statistics,
allowing fine tuning of numbers of L1 and L2 page table
array.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
a48345fccf xtensa: mmu/ptables: conserve memory by using COW on L2 tables
When adding new memory domains, we need to start from kernel
page tables by duplicating them. However, there is no need to
duplicate all in-use page tables as some memory regions remain
unchanged. Fror example, hardware register region where only
kernel has access does not need to be duplicated across all
memory domains. The same L2 table can be used among them.
This changes the L2 page table allocation to be copy-on-write
where we only need to duplicate a L2 table if changes need to
be made on it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
1e41db3ddd xtensa: mmu: no need for cache ops if page tables are not cached
If the page tables are not cached, there is no need to do any
cache ops to flush or invalidate the data in cache. So skip them
if the page tables are not cached. Saves a few CPU cycles.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
501368601d xtensa: mmu/ptables: rework TLB invalidation on L2 unmap
In l2_page_table_unmap(), invalidating TLBs should be limited to
the address and not the whole auto-refill TLBs. Also fix a bug
where the EXEC bit should be determined from the L2 PTE and not
the L1 PTE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
259be3d559 xtensa: mmu: remove XTENSA_ prefix for page table array macros
Some macros for the page tables array are local to the file so
there is no need to prefix them with XTENSA_. Simplify by
removing the XTENSA_ prefix, and clairfy if needed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
1470d9ef74 xtensa: mmu: move PTE macros into source file
Almost all page table entry (PTE) related macros are only used
in one source file. These macros are considered the internal
working of MMU. There is no need to expose them in header file
for other to reference. So move them into the source file where
it is only place they are used. Bonus is that we can shorten
the macro names as they are now local to the file. Makes it
easier to read, and few keystrokes to input.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
b6713c0145 xtensa: mmu: skip PTE SW field redirection
This skips the redirection of backup attributes and ring via
some SW field macros, and use the PTE bits directly. Should
make it easier to decode what's going on.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
2bfcb20258 xtensa: mmu: unify PTE macros
The fields in macro should be done with both shift and mask
values to make it clear. So amend some macros so that
the presentation are unified for them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Daniel Leung
f040a738ac soc: cdns/dc233c: linker: add snippets-text-sections.ld
Adds snippets-text-sections.ld to linker scripts. So that
the mem_map test can run on qemu_xtensa/dc233c/mmu.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00