Commit graph

136,983 commits

Author SHA1 Message Date
Christoph Schnetzler
7ffbc237c9 drivers: mipi_dbi: add mipi_dbi_rpi_pico_pio
Add mipi_dbi driver for MIPI_DBI_MODE_8080_BUS_8/9/16_BIT using PIO and DMA

Signed-off-by: Christoph Schnetzler <schnetzler.christoph@gmail.com>
2026-02-20 10:25:45 -08:00
Henrik Brix Andersen
4d3702bf8b tests: drivers: can: timing: reformat source files using clang-format
Reformat the CAN timing test suite source files using clang-format.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-20 14:59:43 +01:00
Henrik Brix Andersen
fbda289322 tests: drivers: can: api: reformat source files using clang-format
Reformat the CAN API test suite source files using clang-format.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-20 14:59:43 +01:00
Henrik Brix Andersen
b3eeabffa5 tests: drivers: can: timing: replace zassert_equal() with zassert_ok()
Replace zassert_equal(err, 0, ...) with zassert_ok(err, ...) to simplify
code.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-20 14:59:43 +01:00
Henrik Brix Andersen
f9cf2ed49c tests: drivers: can: api: replace zassert_equal() with zassert_ok()
Replace zassert_equal(err, 0, ...) with zassert_ok(err, ...) to simplify
code.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-02-20 14:59:43 +01:00
Sylvio Alves
87e1920f09 tests: boards: espressif: add memory layout test
Add a test that validates SRAM region sizes and performs
write/read verification across the full heap range from
_end to _heap_sentry for all Espressif SoCs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-20 14:59:28 +01:00
Sylvio Alves
c968759f8a soc: espressif: fix bootloader memory layout for all SoCs
Fix the bootloader segment base address calculation to use
DRAM_BUFFERS_END instead of DRAM_BUFFERS_START, matching the
IDF bootloader approach. The shared buffers region is only used
during ROM download mode and is available for bootloader use.

This change reclaims significant RAM for application builds:

| SoC  | Simple Boot | MCUboot App |
|------|:-----------:|:-----------:|
| C6   | +69.5 KB    | +61.7 KB    |
| H2   | +70 KB      | +62 KB      |
| C3   | +70 KB      | +62 KB      |
| C2   | +70 KB      | +62 KB      |
| S3   | +70 KB      | +62 KB      |
| S2   | +57 KB      | +49 KB      |

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-20 14:59:28 +01:00
Anuj Paudel
59b753094a drivers: rtc: pcf8563: Fix year offset conversion
The PCF8563 stores years as 2-digit BCD (00-99 for years 2000-2099)
as specified in the datasheet (Table 17, section 8.4.7):
https://www.nxp.com/docs/en/data-sheet/PCF8563.pdf

However, struct rtc_time uses tm_year as years since 1900 (100-199
for years 2000-2099).

The driver was incorrectly passing tm_year directly to bin2bcd()
without conversion, causing:
1. Invalid BCD values to be written (e.g., 0x7E for year 2026)
2. 100-year offset when reading back (year 2026 read as 1926)

Fix by:
- SET: Use modulo 100 to convert tm_year to chip format
- GET: Add 100 to convert chip value back to tm_year

This follows the same pattern as the DS1307 driver
(drivers/rtc/rtc_ds1307.c).

Tested in Renode simulation with custom PCF8563 peripheral.
All test years (2000, 2026, 2050, 2099) pass with valid BCD values.

Fixes #103971

Signed-off-by: Anuj Paudel <anujpaudel98@yahoo.com>
2026-02-20 14:59:14 +01:00
Erwan Gouriou
e5d5f3eee7 drivers: flash: stm32_q/o/xspi: Add default to reset_gpios_duration
Make use of a default 1ms value to reset_gpios_duration.
Do not put default to dt prop reset-gpios-duration since it should remain
optionnal.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
f2ed2791f3 drivers: flash: stm32_xspi: Instantiate driver initialization
Now several drivers instances could be enabled at the same time.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
434ca35827 drivers: flash: stm32_xspi: Minor cleanup
Move around some code before driver instanciation

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
c40651be07 drivers: flash: stm32_xspi: Rework code relating to some properties
Some DT properties where used directly in the code w/o being put in
instatiable device structs (cfg, data).
Move them in these structs and access it from there.

Change definition of STM32_XSPI_RESET_GPIO to DT_ANY_INST

While I'm at it, simplify use of DT macros, replace
DT_NODE_HAS_PROP(DT_INST(0, st_stm32_ospi_nor), foo)
by DT_INST_NODE_HAS_PROP(0, foo).

Remove DT_XSPI_IO_PORT_PROP_OR, which is unused.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
8790a72cd3 drivers: flash: stm32_xspi: Remove DT sfdp-bfp support
While there was a small related piece of code in the driver,
it is not handled in the code.
Remove the related code and make clear in the binding that this property
is not supported.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Erwan Gouriou
eca099fd7f driver: flash: stm32_xspi: Add Kconfig symbol for DMA
Having a dedicated Kconfig symbol will make things easier for next steps.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-02-20 14:58:58 +01:00
Tomasz Moń
cbe1958809 usb: device_next: dfu: actually fail requests
Control read handlers handle_get_status(), handle_get_state() and
handle_upload() return value is used to set errno. Setting errno inside
the functions and then returning 0 therefore does not fail the request
as intended.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-02-20 14:58:46 +01:00
Sunil Hegde
da0d8572d5 board: ti: am243x: Add watchdog support
- Change the dtsi to include only r5f0_0
- Add main_rti0 and main_rti1 for a53 cores
- Add main_rti8 through main_rti11 for respective r5 cores
- Use main_rti8 for the r5f0_0 core
- Add mcu_rti0 for the m4 core

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-20 14:58:32 +01:00
Sunil Hegde
33a7ed0179 drivers: watchdog: wdt_ti_rti: add callback support
- Add callback support for the watchdog driver.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>
2026-02-20 14:58:32 +01:00
Bjarki Arge Andreasen
0c57145c9c boards: nordic: nrf54l15dk: add nordic expansion board connector
Add nordic,expansion-board-header to the nrf54l15dk, assigning
default SPI and PWM instances.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-20 13:34:40 +01:00
Bjarki Arge Andreasen
239bc4618f boards: nordic: nrf54lm20dk: enable gpio3 by default
gpio3 was not enabled by default. Enable it.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-20 13:34:40 +01:00
Bjarki Arge Andreasen
e1886c8ce6 boards: nordic: nrf54lm20dk: add nordic expansion board connector
Add nordic,expansion-board-header to the nrf54lm20dk, assigning
default SPI and PWM instances.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-20 13:34:40 +01:00
Bjarki Arge Andreasen
5d02d9332c dts: bindings: gpio: introduce nordic,expansion-board-header
Introduce the nordic expansion board header.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2026-02-20 13:34:40 +01:00
Mathieu Choplain
469835a0af boards: st: nucleo_wba65ri: move USB clock configuration to correct node
OTGHS_SEL() is used to configure the kernel clock of the OTGHS PHY, not the
OTGHS USB controller itself. Move clock configuration on PHY node to
reflect this.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-20 13:34:25 +01:00
Yassine El Aissaoui
06583dddb2 samples: bluetooth: peripheral: Add NXP board to testcase
Adding the platforms here helps maintain build
coverage for the Bluetooth subsystem on our
architecture and helps catch integration or
configuration regressions early.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2026-02-20 13:33:44 +01:00
Fin Maaß
b83997f20f drivers: ethernet: stm32: HAL_ETH_Init never returns HAL_TIMEOUT
In the V2 hal `HAL_ETH_Init()`  never returns `HAL_TIMEOUT`, so
remove that check.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-20 13:31:24 +01:00
Fin Maaß
4a69098aa9 drivers: ethernet: stm32: don't init hal_ret when not needed
hal_ret doesn't need to be assigned a value twice
before it is being used, so remove the unneeded first ones.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-20 13:31:24 +01:00
Zhaoxiang Jin
e7fe1f0c43 doc: kernel: timing: document runtime system timer frequency update
Add documentation for the runtime system timer frequency
update mechanism introduced by
CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE.

Update the Hardware Cycles section to clarify that:
- The system timer frequency is typically fixed but can be runtime-variable
  on some platforms
- sys_clock_hw_cycles_per_sec() returns a runtime value when runtime
  frequency updates are enabled
- Application code must not assume a single immutable frequency when
  runtime updates are enabled

Add a new "Runtime System Timer Frequency" section documenting:
- The typical fixed-frequency behavior on most platforms
- Use cases for runtime frequency (hardware discovery or dynamic changes)
- Requirements for platforms that change frequency at runtime:
  - Enable CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE
  - Call z_sys_clock_hw_cycles_per_sec_update() after clock changes
  - Optionally override z_sys_clock_hw_cycles_per_sec_update() if the
    timer driver needs to update cached state or reprogram hardware
- Limitation: not compatible with per-CPU frequency scaling

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
588ac0283f tests: kernel: timer: add tests for runtime system timer frequency update
Add unit tests for the runtime system timer frequency update mechanism
introduced by CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE.

The test suite verifies:
- Updating with the same frequency is a no-op
- Updating with zero frequency is ignored (frequency unchanged)
- Updating with a new non-zero frequency is reflected in
  sys_clock_hw_cycles_per_sec()

These tests validate the core behavior of
z_sys_clock_hw_cycles_per_sec_update() and ensure the frequency
getter returns the updated value when
CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME is enabled.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
55f1b24fbf soc: nxp: mcxn: update system timer frequency on CPU_FREQ changes
When CPU_FREQ is enabled with CORTEX_M_SYSTICK on MCXN, the system
timer frequency changes dynamically as the core clock is scaled.

Update cpu_freq_pstate_set() to:
- Notify the system timer driver of the new frequency by calling
  z_sys_clock_hw_cycles_per_sec_update() when CORTEX_M_SYSTICK is used
- Add a compile-time check to ensure
  CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE is enabled when
  using CPU_FREQ with SysTick, as this combination requires runtime
  frequency update support

Also update Kconfig.defconfig to:
- Remove the default enabling of MCUX_OS_TIMER when CPU_FREQ is set
- Enable SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE by default when
  both CPU_FREQ and CORTEX_M_SYSTICK are enabled

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
921b522a40 drivers: timer: cortex_m_systick: implement runtime frequency update
Implement z_sys_clock_hw_cycles_per_sec_update() for the Cortex-M
SysTick driver to support runtime system timer frequency changes
when CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE is enabled.

Also extend the conditional compilation guard for the external
z_clock_hw_cycles_per_sec declaration to include the runtime update
configuration option.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
cddedf9e3d kernel: busy_wait: handle runtime system timer frequency updates
When CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE is enabled,
the system timer frequency can change at runtime. Some timer drivers
(e.g. Cortex-M SysTick) rescale the cycle counter when the frequency
changes, which can break k_busy_wait() if the frequency changes during
the wait period.

Update k_busy_wait() to handle runtime frequency changes:
- Add busy_wait_us_to_cyc_ceil32() helper to convert microseconds to
  cycles with a given frequency (rounds up to avoid returning early)
- Implement a frequency-aware busy wait loop that:
  - Samples the frequency before and after reading the cycle counter to
    detect concurrent frequency changes
  - Rescales the start_cycles reference point when the frequency changes
    to keep it in the same scale as the cycle counter
  - Recomputes cycles_to_wait with the new frequency to preserve the
    requested duration
  - Retries sampling if a frequency change is detected mid-read

The original implementation is preserved when
CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE is not enabled.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
60197bf514 kernel: refactor sys_clock_hw_cycles_per_sec runtime support
- Move the variable declaration and related code from kernel/timeout.c
  to a new kernel/sys_clock_hw_cycles.c file. The motivation is that
  both functions are part of the system clock frequency plumbing
  (runtime query / update) and don’t naturally fit the responsibilities
  of timeout.c, which is otherwise focused on timeout queue management
  and tick announcement logic.

- Make sys_clock_hw_cycles_per_sec_runtime_get() (and its
  z_impl_sys_clock_hw_cycles_per_sec_runtime_get() implementation)
  visible under CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE
  as well, not only under CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME.
  This allows callers and time unit conversion helpers to retrieve the
  current system timer frequency after runtime clock changes even when
  the timer driver does not discover the rate by querying hardware.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Zhaoxiang Jin
df6e6cf0d2 drivers: timer: add runtime system timer frequency update support
Add infrastructure to support updating the system timer frequency at
runtime on platforms where the timer clock rate can change dynamically.

Introduce CONFIG_SYSTEM_CLOCK_HW_CYCLES_PER_SEC_RUNTIME_UPDATE Kconfig
option that enables runtime frequency updates. This option is mutually
exclusive with CPU_FREQ_PER_CPU_SCALING since the system timer frequency
is tracked as a single global value.

Add z_sys_clock_hw_cycles_per_sec_update() API that platforms must call
after applying a system timer clock change. The kernel provides a weak
default implementation that updates the stored frequency value used by
sys_clock_hw_cycles_per_sec().

System timer drivers that cache derived constants or need to reprogram
hardware on frequency changes can provide a strong override of this
function to maintain driver state consistency while ensuring the stored
frequency is also updated.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-02-20 13:31:07 +01:00
Dipak Shetty
41affb0901 samples: bluetooth: add peripheral ets sample
Added elapsed time service (ETS) GATT service sample.
The sample allows the user to set the system realtime clock
on the board and read the time.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2026-02-20 13:30:34 +01:00
Dipak Shetty
cae71714de bluetooth: services: add Elapsed Time Service support
Added support for elapsed time service (ETS). The service
is introduced currently with the experimental tag.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2026-02-20 13:30:34 +01:00
Dipak Shetty
865b5e1604 bluetooth: added uuid for Elapsed Time Service
Added UUID for Elapsed Time Service (0x183F).

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2026-02-20 13:30:34 +01:00
Yasushi SHOJI
28e25ea1a7 doc: releases: Add 4.1 to EOL releases
When we added v4.3.0 (1d1dace9a2), we forgot to move 4.1.0 to EOL.
Add 4.1.0 back to the EOL lists for release notes and migration guides.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2026-02-20 10:11:57 +01:00
Emil Gydesen
12c30e526a Bluetooth: TBS: Allow join in alerting/dialing state
The TBS spec only specificially disallows join for calls in
the incoming state. The Alerting and Dialing state in Zephyr
were disallowed, but that fails some TBS join tests.

Removed the (implicit) checks for alerting and dialing and
updated the state changer code to be more explicitly so that
all call states, except for incoming, is explicitly handled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-02-20 10:11:46 +01:00
Guillaume Gautier
4b1984181a doc: releases: migration guide: update for stm32l4 clock binding
Update the migration guide for the changes in STM32L4 PLLs.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
7a7933ad50 drivers: clock: stm32l4-l5-wb-wl: remove all references to pllsai binding
Now that everything uses the generic STM32L4 PLL binding, remove all
references from the the old PLLSAI binding:
- Remove the lines using div_divr (it is now post_div_r)
- Remove the clock source check since it is now done in the driver
- Remove the PLLSAI binding since it is no longer used

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
1c635b3427 dts: arm: st: replace stm32l4 pllsai compatible by the generic pll one
Replace st,stm32l4-pllsai-clock compatible by st,stm32l4-pll-clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
b600d38363 drivers: clock: stm32l4-l5-wb-wl: update pll configuration
For the STM32L4/L5/WB/WL, update the clock driver to support all PLL
channels.
Also add some BUILD_ASSERT to check that the clock are correctly defined
and configured in device tree.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
4841200c8d include: drivers: clock: stm32: update stm32l4 pll macros
Make the STM32L4 PLLSAIx macros available if the PLLSAIs are defined with
the generic L4 PLL compatible.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
4b765ca062 dts: bindings: clock: stm32l4: update pll binding
Update STM32L4 PLL clock binding so that it can be used for all PLLs of
L4 and L5 series, removing the need for a specific PLLSAI binding.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
897a30036f drivers: clock: stm32f2-f4-f7: fix error message
The property names in error message were not the correct ones (missing
an "-"). This commit fixes them.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
39f046e15c drivers: clock: use concat instead of ##
Use CONCAT macro instead of ## to create the RCC macros.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
779068e5ba drivers: clock: stm32: remove adcxx_prescaler macros
Remove adcxx_prescaler macros. They are unused since commit
914425fafc54bf359e1d7693846e387a1150988d.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Guillaume Gautier
22c9b6b877 drivers: clock: stm32: configure clock source with a single function
Use stm32_reg_modify_bits to configure the clock source, instead of calling
sys_clear_bits then sys_set_bits. Using modifiy makes only one write in
the RCC register instead of two previously.

Incidentally, for H5, clear was missing. It is now replaced by modify.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-02-20 10:11:30 +01:00
Emil Gydesen
3aa6e082cd doc: releases: migration_guide: bt_tbs_set_uri_scheme_list
Add entry for bt_tbs_set_uri_scheme_list that needs some application
changes.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-02-20 10:10:38 +01:00
Emil Gydesen
dd4a01af48 Bluetooth: TBS: set_uri_scheme_list single string instead of array
Refactor bt_tbs_set_uri_scheme_list to take a single string instead
of an array of URIs. This should not affect applications much
in any way (and may actually be easier to use), but simplifies
the implementation significantly, and reduces memory footprint.

Additionally it also make the client and server more similar
as bt_tbs_client_read_uri_list just returns it as a single
string as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-02-20 10:10:38 +01:00
Marc Herbert
f1ac9ce55e scripts: west_commands: build: rephrase the --cmake-opt help
Late review comments from #101457. Make it more formal and complete.

Add that argparse should preserve the order based on:
https://discuss.python.org/t/argparse-multiple-arguments-with-the-same-destination-left-to-right-order-guarantee/105685

Don't assume that all CMake options can be "overriden"; stick to
describing our own behavior.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2026-02-20 10:09:32 +01:00