Commit graph

17,121 commits

Author SHA1 Message Date
Ryan McClelland
779383e769 drivers: counter: add 64bit apis
Add apis for 64 bits.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-01-27 10:49:43 +00:00
Ryan McClelland
ac8f2200ae drivers: counter: run clang-format on counter.h
Run clang-format on counter.h

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-01-27 10:49:43 +00:00
Ryan McClelland
fd72085d9b drivers: counter: add kconfig for enabling 64b frequencies
Some counters, such as those that use fractional adders, tick at
resolutions greater than 4294967295Hz. This changes the freq in the common
info to a uint64_t. This adds a KConfig that can be selected by a driver.

This also has the counter ticks to sec (and vice versa) helper functions
call the get frequency for 64 bits if the kconfig is selected.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-01-27 10:49:43 +00:00
Ryan McClelland
849ba3a33f drivers: counter: add ns to ticks helper
There is already a helper for converting ticks to ns. Add one
that does the opposite.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-01-27 10:49:43 +00:00
Ryan McClelland
34befefd93 drivers: counter: introduce counter set value api
Introduce a counter set value api to set the ticks for 32b and 64b.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-01-27 10:49:43 +00:00
Zhijie Zhong
1c432582bb Bluetooth: Core: add Mode Change event in event mask
Since we have already supported sniff mode,
the corresponding link mode change event should be received.

Signed-off-by: Zhijie Zhong <zhongzhijie1@xiaomi.com>
2026-01-27 08:08:56 +01:00
Pieter De Gendt
941f1e6af5 drivers: otp: Add NXP MCUX OCOTP
Introduce an OTP driver for NXP's MCUX OCOTP.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-27 08:07:53 +01:00
John Batch
6289dbdc46 drivers: infineon: clock control: move clock selection to peripherals
Moves clock selection/assignment from the clock driver to the
peripherals that subscribe to the clock.  This allows multiple
devices such as PWM/Counters to share a peripheral clock.

Signed-off-by: John Batch <john.batch@infineon.com>
2026-01-27 08:06:28 +01:00
John Whittington
977dec95fe sd: disk ioctl get card cid command
CID (card id register) can be useful to application for traceability of SD
cards (#66460).

Adds disk ioctl command to get the CID data that is read at initialisation.

Changes the card_read_cid function to take pointer to cid register so that
the ioctl command can utilize with the passed user buf. Updated
calling functions to pass this pointer.

Signed-off-by: John Whittington <git@jbrengineering.co.uk>
2026-01-26 13:55:20 -06:00
John Whittington
ef655380a1 sd: disk ioctl get card cid command #66460
CID (card id register) can be useful to application for traceability of SD
cards.

Adds disk ioctl command to get the CID data that is read at initialisation.
The struct sd_cid is moved to sd_card so that it can be read and retrieved
by card_ioctrl.

Signed-off-by: John Whittington <git@jbrengineering.co.uk>
2026-01-26 13:55:20 -06:00
Amneesh Singh
03ba08615a drivers: sdhc: split caps into standard and extra
Make sure the capability bitfields fit the standard SD Association
specification and move the extra capabilities to props.

Affected Drivers:
- sdhc_infineon
- imx_usdhc
- intel_emmc_host
- rcar_mmc
- sam_sdmmc
- sdhc_ambiq
- sdhc_esp32
- sdhc_max32
- sdhc_renesas_ra
- sdhc_stm32
- xlnx_sdhc

Affected Subsys
- sd

Reference: 2.2.26, SD Specifications, Part A2, SD Host Controller
           Simplified Specification, Version 4.20
           URL: https://www.sdcard.org/downloads/pls/pdf/?p=PartA2_SD%20Host_Controller_Simplified_Specification_Ver4.20.jpg

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-01-26 13:53:51 -06:00
Alessandro Manganaro
429350b1be pm: add optional custom ticks hook for system suspend
Add an optional power policy hook to provide custom "next event"
ticks during pm_system_suspend(), in addition to the existing
kernel ticks and policy event list.

This hook enables applications and SoC-specific code to derive
the next wake-up time directly from proprietary or
hardware-specific data structures (e.g. hardware registers,
binary-only modules, complex schedulers) that are not
practical to convert into the standard PM policy event list.

The feature is gated by CONFIG_PM_CUSTOM_TICKS_HOOK and is fully
backwards compatible when disabled.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2026-01-26 10:13:53 -06:00
Jisheng Zhang
fdca758270 sys: device_mmio: add devcie_map for !DEVICE_MMIO_IS_IN_RAM
On !MMU && !PCIE && !EXTERNAL_ADDRESS_TRANSLATION platforms, the
device_map() isn't defined, thus brings below ramconsole build error:

ram_console.c: In function 'ram_console_init':
ram_console.c:49:9: error: implicit declaration of function 'device_map'

Previously, I solved this issue in a workaround style[1] as below:

+#ifndef DEVICE_MMIO_IS_IN_RAM
+#define device_map(virt, phys, size, flags) *(virt) = (phys)
+#endif /* DEVICE_MMIO_IS_IN_RAM */

But during the PR review progress, pathcing device_mmio.h is suggested.
This patch implements that suggestion.

Link: https://github.com/zephyrproject-rtos/zephyr/pull/97894 [1]
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
2026-01-26 10:10:15 -06:00
Pieter De Gendt
189c6794ce net: pkt: Add read functions for le32, be64 and le64 variants
Re-use sys_get_be/sys_get_le provided functions and add missing variants.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-26 14:17:41 +01:00
Jérôme Pouiller
e6302b1b74 drivers: rng: siwx91x: Avoid direct access to the clock
Currently, silabs,siwx91x-rng directly write clock hardware block. Change
that to properly rely on clock driver.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Afonso Oliveira
cdbf3b787e arch: riscv: add csr_swap macro for atomic CSR read-write
Add csr_swap() macro that performs an atomic CSR read and write using
the csrrw instruction. This completes the set of CSR access primitives
alongside the existing csr_read, csr_write, csr_read_set, and
csr_read_clear macros.

The csrrw instruction atomically reads the current CSR value into a
register while simultaneously writing a new value, which is required
for operations like IMSIC interrupt claiming where the read and write
must be indivisible.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-26 14:16:22 +01:00
Afonso Oliveira
742685afbd include: drivers: interrupt_controller: riscv: add IMSIC header
Add public IMSIC driver API header (claim and EIID control).

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-26 14:16:22 +01:00
Lyle Zhu
0d73d29962 bluetooth: classic: add callback for incoming connection requests
Add a callback mechanism to allow applications to handle incoming
BR/EDR connection requests and decide whether to accept or reject
them, as well as specify the desired role (central/peripheral).

Update bt_br_set_connectable() to accept an optional callback function
parameter. When provided, callback is invoked on incoming connection
requests, allowing the application to inspect the remote device address
and Class of Device before accepting or rejecting the connection.

If no callback is provided, the connection request is accepted
internally with the default behavior based on the
`CONFIG_BT_ACCEPT_CONN_AS_CENTRAL` configuration option.

The accept_conn() function is updated to:
- Call the registered callback if available
- Pass the remote device address and Class of Device to the callback
- Accept the connection if the callback returns BT_BR_CONN_REQ_ACCEPT_*
- If the returned value is BT_BR_CONN_REQ_ACCEPT_CENTRAL, the role
  switch will be requested.
- Reject the connection if the callback returns BT_BR_CONN_REQ_REJECT_*
- Add error handling and logging for failed connection acceptance

Update all existing callers of bt_br_set_connectable() to pass NULL
for the callback parameter to maintain backward compatibility.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-26 12:01:22 +01:00
Hubert Miś
68dbbb14d7 drv: ft8xx: new coprocessor commands
Implement more co-processor commands in the FT8xx display driver.
The list of the new implemented commands consists of:

* CMD_FGCOLOR
* CMD_BGCOLOR
* CMD_SLIDER
* CMD_TOGGLE
* CMD_TRACK

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2026-01-26 11:59:00 +01:00
Benjamin Cabé
1feabd2552 shell: fix potential buffer overflow in shell_help_is_structured()
The function was casting a char* help pointer to struct shell_cmd_help*
and reading its 4-byte magic field. When the help string was shorter
than 4 bytes, this caused a read past the end of the buffer.

The fix replaces the struct cast with a byte-by-byte comparison of the
magic number.

Fixes zephyrproject-rtos/zephyr#102598

Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-23 09:20:01 -06:00
Tomasz Moń
288802461c dts: bindings: clock: fix reference audio frequencies
Reference audio clock frequencies are supposed to be integer multiplies
of sampling frequency (44100 * 256 = 11289600, 48000 * 256 = 12288000)
and not some arbitrary numbers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-01-23 10:44:43 +01:00
Peter Mitsis
e18a048c84 kernel: Add K_TIMEOUT_SUM() macro
The K_TIMEOUT_SUM() macro is intended as a means to add two
k_timeout_t values together. This may be useful for a developer
applying an exponential backoff algorithm.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-01-22 14:33:23 -06:00
Liam Ogletree
339d2df232 drivers: haptics: Update CS40L5x driver to use new haptics API
Modifies the CS40L5x driver to use the error callback mechanism
added to the haptics API instead of a device-specific API
extension.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-01-22 14:31:31 -06:00
Liam Ogletree
abaf251800 drivers: haptics: Add error callback mechanism to haptics API
Haptics devices provide protection features to prevent damage during
operation. Adds an error callback mechanism to the haptics API to
enable haptics device drivers to raise these conditions to the
application layer. Enumerates a subset of errors that are common
to modern haptics devices across major vendors.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-01-22 14:31:31 -06:00
Thomas Lang
f505d31be6 drivers: sensor: apds9960: Setup gesture sensing configuration
Created sensor specific channels and Kconfig for gesture sensing.

Signed-off-by: Thomas Lang <thomaslang2003@me.com>
2026-01-22 14:29:50 -06:00
Hanan Arshad
151a9a33e6 drivers: sensor: pms7003: add support for additional PM parameters
The current PMS7003 sensor driver in Zephyr only supports reading the
basic PM1.0, PM2.5, and PM10 concentration values.

This update extends the driver to support additional data provided by the
PMS7003 sensor, including:

- Standard particle concentration values (CF=1) for PM1.0, PM2.5, and PM10
- Particle counts for particles greater than or equal to 0.3 µm, 0.5 µm,
  1.0 µm, 2.5 µm, 5.0 µm, and 10.0 µm per 0.1 liter of air

Adding support for these readings allows applications to access more
detailed particulate data, improving the sensor’s usability in air quality
monitoring and analysis scenarios.

Signed-off-by: Hanan Arshad <hananarshad619@gmail.com>
2026-01-22 14:29:37 -06:00
Braeden Lane
f68885f1c6 drivers: Add PSOC 4 clock control and serial support
Add clock control and UART support for PSOC 4 family:
- Clock control drivers with PSOC 4 compatibility
- PSOC4xx clock source bindings and definitions
- HF clock divider configuration support
- UART FIFO trigger level configuration for PSOC 4100S Max
  series with 8-deep FIFO (RX trigger=7, TX trigger=0)

Signed-off-by: Braeden Lane <Braeden.Lane@infineon.com>
2026-01-22 13:01:21 -05: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
1b14cb18a2 net: dsa: support dsa protocol registering with iterable section
Supported dsa protocol registering with iterable section.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-22 08:41:00 +00:00
Yangbo Lu
d9d46c0ce3 net: dsa: make dsa_tag.h as common header file
Moved dsa_tag.h to include folder as common header file.
And we will support iterable section for vendor dsa tag
protocol drivers registering.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-22 08:41:00 +00:00
Peter Mitsis
3944b0cfc7 kernel: Extend thread user_options to 16 bits
Upgrades the thread user_options to 16 bits from an 8-bit value to
provide more space for future values.

Also, as the size of this field has changed, the values for the
existing architecture specific thread options have also shifted
from the upper end of the old 8-bit field, to the upper end of
the new 16-bit field.

Fixes #101034

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-01-22 08:40:17 +00: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
Jukka Rissanen
96121bfb57 net: posix: Avoid multiple definitions of IFNAMSIZ symbol
One might see this compile error depending on what order the
POSIX headers are included

include/zephyr/net/net_compat.h:143: error: "IFNAMSIZ" redefined
.../zephyr/include/zephyr/net/net_compat.h:143:
                                error: "IFNAMSIZ" redefined [-Werror]
  143 | #define IFNAMSIZ NET_IFNAMSIZ
      |
In file included from ...
.../zephyr/include/zephyr/posix/net/if.h:16:
                note: this is the location of the previous definition
   16 | #define IFNAMSIZ IF_NAMESIZE
      |

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2026-01-21 17:08:55 +01:00
Robert Lubos
fbd9079148 net: dns: Implement CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES
There was a Kconfig option defined to limit the number of additional DNS
queries sent for aliases received in CNAME records (to avoid potential
query loops), however it was not implemented. This commit implements the
feature - the resolver will now only send up to
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES follow-up queries after
receiving CNAME record with an alias w/o any IP addresses.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-21 17:08:29 +01:00
Pieter De Gendt
f344ab6b98 cobs: Introduce streaming
This commit does:

- Introduce COBS streaming
- Refactor custom delimiter with XOR'ed encoded data
- Update tests

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-21 17:06:04 +01:00
Pieter De Gendt
0d4435984a include: zephyr: drivers: adc: Add adc_dt_spec _OR variants
Add _OR variations for the differen adc_dt_spec initialization macros.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-20 20:11:59 -05:00
Flavio Ceolin
6595aaf280 pm: device_runtime: Fix documentation typo
s/EWOUDBLOCK/EWOULDBLOCK in pm_device_runtime_get() documentation.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-20 14:34:37 -05:00
Flavio Ceolin
9003da65b7 pm: policy: Fix pm_policy_event signatures
Fix pm_policy_event_register() and pm_policy_event_update signatures
when CONFIG_PM is disabled.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-20 14:34:37 -05:00
Flavio Ceolin
dbf3bb64a9 pm: state: Fix pm_state_in_constraints stub
It was missing the const qualifier in pm_state_in_constraints
when CONFIG_PM is not enabled.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-20 14:34:37 -05:00
Flavio Ceolin
18e3d5c368 pm: device_runtime: Fix doxygen inconsistency
Fix an inconsistency / typo in pm_device_runtime_get return
value documentation.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-20 14:34:37 -05:00
Fin Maaß
77c4fd9a53 console: add functions to set the timeout
While the tty_* api already has functions
to set the rx and the tx timeout, the console_*
api didn't had one.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-20 14:34:29 -05:00
Fin Maaß
2ed0e04dc8 console: use k_timeout_t internally
use k_timeout_t internally, that way
the timeout has only to be calculated, when setting it and not
every time when it is used.

Also use the ys_timepoint* api instead of
counting the ms.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-20 14:34:29 -05:00
Chaitanya Tata
23ba648b82 net: lib: zperf: Add raw socket upload support
This helps in benchamrking raw socket (packet socket) performance in the
lines of UDP/TCP.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-01-20 14:33:58 -05:00
Jamie McCrae
e830376b71 mgmt: mcumgr: Refactor callback header files
Refactors these so that each group defines the events it raises

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-20 15:31:50 +00:00
Alain Volmat
8f9e370bfb drivers: clock: h7rs: add PCLKx support
Addition of PCLKx clock source which can be used by some
peripherals.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-01-20 15:29:27 +00:00
Nhut Nguyen
982231a8fe drivers: intc: renesas: Add gpio interrupt (tint) for RZ family
Add support for gpio interrupt (tint) for Renesas RZ familiy.

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-01-20 13:25:13 +00:00
Martin Moya
dd2dedf343 sensor: bosch: bma4xx: add attr_get to device API
This feature allows the user to get the chip's id
from the sensor's API easily

Signed-off-by: Martin Moya <moyamartin1@gmail.com>
2026-01-19 16:21:11 -06:00
Guillaume Gautier
e5dbb600bc include: dt-bindings: clock: stm32f4: rename clock sel macro
Rename CLK48M_SEL to CK48M_SEL for consistency with stm32f410_clock.h.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00
Guillaume Gautier
21e433eed6 include: drivers: clock: stm32: clean up indentation
Clean up indentation for consistency.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00
Guillaume Gautier
5960c2d5a1 drivers: clock: stm32: update stm32f2_f4_f7 driver with the new binding
This commit updates the STM32Fx clock driver to add complete support for
all PLLs for all SoCs.

Supports  all outputs and additional divisors:
- PLL-DIV-R
- PLLI2S-P
- PLLI2S-DIV-Q
- PLLI2S-DIV-R

Adds global checks to make sure that all:
- All PLLs share the same source clocks
- All PLLs share the same M-Divisor (on applicable SoCs)
- Both div-X and div-divX are defined (on applicable SoCs)

Functions get_plli2s_source and get_plli2ssrc_frequency are added to make
sure that PLLI2S can be used even if PLL is not defined.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00