Commit graph

17,121 commits

Author SHA1 Message Date
Philipp Steiner
e9b9569085 drivers: fuelgauge: format fuel_gauge.h
format fuel_gauge.h according to the clang-format settings

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2025-06-26 22:08:44 -05:00
Philipp Steiner
73999c16c4 drivers: fuelgauge: Add additional properties
Adds properties for current direction, charge and voltage alarms

Signed-off-by: Philipp Steiner <philipp.steiner1987@gmail.com>
2025-06-26 22:08:44 -05:00
Adrien Maillard
4d73cd3980 updatehub: report error before rollback on unconfirmed image
Report the error state to the UpdateHub server before triggering a rollback
in autohandler mode. This prevents the server from redeploying the same
(failed) update after rollback, avoiding update loops. Also exposes a new
public syscall: updatehub_report_error(), allowing manual mode users to
report an error explicitly.

Signed-off-by: Adrien Maillard <adrien.maillard@edu.hefr.ch>
2025-06-26 22:07:51 -05:00
Lyle Zhu
78a22f461a Bluetooth: Classic: SCO: Add SCO conn connected/disconnected cb
Add two functions to register/unregister SCO conn connected/
disconnected callback.

Add macro BT_SCO_CONN_CB_DEFINE to defined static SCO connect callback.
Define section `bt_sco_conn_cb` to ROM.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-06-26 22:05:25 -05:00
Tim Pambor
542ea03c1a include: cbprintf: Fix call to memcpy with null pointer
cbprintf_package_convert may invoke z_cbprintf_cpy with a null pointer
to buf and zero length to indicate a flush operation. This triggers
an error from the undefined behavior sanitizer due to memcpy being called
with a null src, which is undefined behavior according to the C standard.

This is avoided by exiting early in z_cbprintf_cpy when length is zero.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-26 11:02:08 -05:00
Alain Volmat
616c6ed21f dts: bindings: support 15-pin and 22-pin RaspberryPi CSI camera connector
Update the RaspberryPi CSI camera connector nexus gpio in order to only
expose the list of GPIO pins in order to support both 15-pin and 22-pin
connectors as well as 15-pin to 22-pin conversion cables.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-26 10:59:54 -05:00
Sayooj K Karun
41adc8a61a include: zephyr: sys: Refactor MIN_HEAP_DEFINE macro
Remove calling of `min_heap_init()` from MIN_HEAP_DEFINE

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Sayooj K Karun
ff657071ce include: zephyr: sys: Assert in min_heap_get_element
Assert in `min_heap_get_element()` if heap is NULL

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Sayooj K Karun
e719ba239f include: zephyr: sys: simplify MIN_HEAP_FOREACH macro
Refactor the `MIN_HEAP_FOREACH` macro to use a cleaner
for-loop style removing the need for a third `body` argument.
Update the sample application with the new macro changes.

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Jeppe Odgaard
dffbd4fc88 license: fix copyright owner
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-06-26 10:56:48 -05:00
Ryan McClelland
d0d9894070 drivers: sensor: bmm350: expose magnetic reset
This exposes a driver specific function to perform a
magentic reset by the application.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Miguel Gazquez
8362e603bb dts: bindings: add DT bindings for the lsm9ds1 magnetometer
This commit adds a description for the magnetometer part of the lsm9ds1
sensor.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-26 10:55:11 -05:00
David Jewsbury
8b5ff6ab36 dts: bindings: clock: add nordic,nrf-auxpll
Introduce Nordic NRF AUXPLL binding include.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
Jukka Rissanen
25084203c2 net: dhcp: Remove only added DNS servers when stopping
Make sure that we remove only the added DNS servers when
the DHCP is stopped.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-26 14:08:19 +02:00
Jukka Rissanen
cdc6c324d7 net: dns: Save info about source when configuring DNS servers
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-26 14:08:19 +02:00
Duy Nguyen
f92b70bdb0 include: arch: rx: Change noinit region to be after bss
Change noinit region to be after bss so that it would not cause
alignment issue for the data region setup

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-06-26 14:07:03 +02:00
Duy Nguyen
58ed8c16d6 include: arch: Update missing rx/exception.h include
Add missing zephyr/arch/rx/exception.h for RX architecture

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-06-26 14:07:03 +02:00
Duy Nguyen
d18f879566 include: arch: rx: Change data symbol name
The RX linker is using the name "data" for .data region start
which caused the application cannot use "data" for variable
naming globally.
This commit change the name to "__data_region_start" as expected
in the linker_defs.h file

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-06-26 14:07:03 +02:00
Duy Nguyen
2a332517c1 arch: rx: Add ARCH_EXCEPT for RX architect
Adding ARCH_EXCEPT for RX architect by using unconditional
trap interrupt no 3.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-06-26 14:07:03 +02:00
Keith Packard
dc52b4aef0 arch/rx: Add missing linker script fragments
There were lots of missing chunks, including those necessary for C++
support.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-26 14:07:03 +02:00
Maxwell Weru
a972203871 net: lib: tls_credentials: clarify secure tag usage for TLS credentials
Updated documentation to clarify that while credential pairs should
generally share the same secure tag for subsystems supporting multiple
credentials per tag, some implementations may expect only one credential
per tag.

Signed-off-by: Maxwell Weru <mburumaxwell@gmail.com>
2025-06-26 12:42:41 +02:00
Aleksandr Khromykh
b408445b4d bluetooth: mesh: remove tinycrypt support
Tinycrypt support deprecated in Zephyr 4.0 release.
Time to remove it.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-06-26 11:13:19 +02:00
b1cd947771 drivers: adc: add a driver for the CH32V003 ADC
The CH32V003 has a 8 channel, 10 bit onboard ADC. Add an immediate
mode driver and the appropriate pinctrl bindings. Note that the
CH32V003 GPIO pins have both a floating input and an analogue input
mode, and the pinctrl is needed to put the pin in analogue mode.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-26 09:42:20 +02:00
Marco Marche
f5f90395c9 drivers: adc: ad7124: add current sources support
Adds support for configuring the AD7124's excitation current sources.

Signed-off-by: Marco Marche <marco.marche@gmail.com>
2025-06-26 09:39:25 +02:00
b99b7d14f1 drivers: interrupt_controller: add a WCH EXTI external interrupt driver
The WCH External Trigger and Interrupt controller (EXTI) supports
between 8 and 22 lines where each line can trigger an interrupt on
rising edge, falling edge, or both edges. Lines are assigned to a
group, and each group has a separate interrupt. On the CH32V003/6,
there is one group of 8 lines, while on the CH32V208 there are
multiple groups with between one and six lines per group.

In the same way as the STM32 and GD32, define an EXTI driver that
configures the peripheral and an internal interface that can configure
individual lines.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-26 09:38:56 +02:00
Thao Luong
720d4c61a9 drivers: clock_control: Add support for RA8P1
Add additional clocks to support for RA8P1.

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2025-06-25 15:56:20 -10:00
Alain Volmat
49f066c58b video: api: addition of video_set/get_selection APIs
Addition of selection APIs (set/get) in order to be able
to control the crop and compose of a video device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-25 15:55:24 -10:00
Nirav Agrawal
5a8189bf2a bluetooth: host: gatt: fix null-ptr access if no include-svc userdata
- Issue: There is a bus-fault while accessing empty userdata structure
  pointer if application does not include any include service
  userdata instance (which consist of UUID list of included service)
  but service array has defined dummy entry for it assumed to be
  overridden by app during initial flow.
- For example, the issue has happened in case of tmap-central sample
 without "CONFIG_BT_OTS" support. there are some MCS attributes
 dependent on OTS service because of that
 "BT_GATT_INCLUDE_SERVICE(NULL)" entry is added as part of service
 definition. The given entry does not have userdata handler defined
 and is expecting to be overriden by the app if it will be included.
 During "bt_mcs_init()" call, "mcs.attrs[i].user_data" is not
 populated with any attr-instance pointer. This makes CPU to access
 null-address during reading local-database include-service attribute
 which was not provided by the app but the include-service entry was
 added to the db.
- Fix: Adding condition to check if user-data has null address, and
 returning back to avoid any hard-faults.

Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
2025-06-25 15:51:24 -10:00
a8375c986d include: dt-bindings: fix and extend the ch32v00x pinctrl definitions
These were wrong and incomplete. Rebuild based on section 7.2.11 of
the CH32V00XRM and added the CH32V007-only remaps.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-06-25 15:44:37 -10:00
Bjarki Arge Andreasen
a4800beef2 drivers: rtc: api: adjust callback APIs to not be syscalls
The rtc device driver APIs rtc_update_set_callback and
rtc_alarm_set_callback are not allowed from usermode threads, thus
they should not be marked as syscalls. The APIs where never
implemented as sycalls, there is no z_vrfy wrapper for them, so
only change needed is to not mark them as syscalls with the
special __syscall "attribute" and z_impl wrapper.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-25 15:40:06 -10:00
Kristoffer Rist Skøien
ca2e98c4c9 debug: Added CPU usage callback
- Added a CPU load callback with threshold
- Changed cpu_load to use k_timer instead of k_work

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2025-06-25 15:29:06 -10:00
Pieter De Gendt
0b8c00b5dd net: lib: dhcpv4: Support INIT-REBOOT
Add the init-reboot state for DHCPv4 to request an already assigned IP
address.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-25 14:09:46 +02:00
Bjarki Arge Andreasen
bb319603fd drivers: clock_control: nrf: add support for HFCLK24M
Add support for the HFCLK24M clock to the clock_control_nrf
device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-25 14:07:20 +02:00
Phi Tran
d8ab33ae96 drivers: pwm: Add support for PWM driver on RSK_RX130_512KB
This is initial commit to support PWM driver
on Renesas RX130 with MTU modules.

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-06-25 10:52:34 +02:00
Jiafei Pan
df0304ae09 drivers: clock_control: mcux_ccm: add flexcan clock support
Enable FlexCAN clock support on imx8mp.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-06-25 09:52:56 +02:00
Pisit Sawangvonganan
1757ea302c drivers: sensors: improve range check in sensor_value_from_float/double
Avoid undefined behavior caused by casting floating-point values outside
the int32_t range. The updated implementation explicitly validates input
bounds before performing conversions, ensuring consistent behavior across
platforms.

Added test cases to cover edge conditions near float rounding limits
and INT32 range boundaries.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-06-25 09:52:37 +02:00
Tim Pambor
15ce6e0f01 shell: Fix warning for SHELL_SUBCMD_SET_END
The macro SHELL_SUBCMD_SET_END was defined as {NULL}, which triggers a
-Wmissing-field-initializers warning due to the missing 'help' field in
the shell_cmd struct. Replacing {NULL} with {0} silences the warning.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-24 20:03:26 -10:00
Youssef Zini
03d3075dc8 drivers: clock_control: add uart clock handling
Add clock bindings for UART/USART (1-9) peripherals in the
`stm32mp2_clock.h`.
Add UART/USART clocks rate reading to the STM32MP2 clock driver.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-24 15:37:57 -05:00
Youssef Zini
a2d09e61a3 dt-bindings: stm32mp2_reset.h: add reset bindings
Add reset bindings for UART/USART (1-9) peripherals for the STM32MP2
series.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-24 15:37:57 -05:00
Lucien Zhao
585a85ac55 drivers: clock_control: support rt700 getting sai clock
There are multi sai instance shared on clock source on
cm33_cpu0, clock driver don't need index parameter, so
modify clock driver to adapt clock driver.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-06-24 15:35:07 -05:00
Yunshao Chiang
5a2765da26 drivers: comparator: add it51xxx_evb analog comparator driver
Add analog comparator driver for ITE it51xxx chip.

Signed-off-by: Yunshao Chiang <Yunshao.Chiang@ite.com.tw>
2025-06-24 15:33:17 -05:00
Chris Friedt
97519002ad sys: clock: re-apply change to Z_IS_TIMEOUT_RELATIVE
A mid-air collision between two different changes to sys_clock.h
resulted in a test failure.

```shell
tests/kernel/timer/timer_api/src/main.c:763:
  timer_api_test_timeout_abs: Z_IS_TIMEOUT_RELATIVE(t2) is false
```

Re-apply the change that was added in

9075d53355

to keep tests running smoothly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 11:25:51 -04:00
Chris Friedt
c08544a87b sys: clock: merge sys_clock.h into sys/clock.h
Merge sys_clock.h into sys/clock.h and preserve the original header.

This allows us to use a slightly more intuitive name for the
sys/clock.h header, while reducing churn throughout the codebase.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
8743da2f32 posix: use sys_clock implementation
Use the newly added sys_clock API in lib/os for

* clock_gettime()
* clock_settime()
* clock_nanosleep() and nanosleep()
* gettimeofday()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
a3e934f12c sys: clock: additional sys_clock api calls
Additional entries for the sys_clock API, comprised of:

* sys_clock_gettime()
* sys_clock_settime()
* sys_clock_nanosleep()

along with the constants

* SYS_CLOCK_REALTIME
* SYS_CLOCK_MONOTONIC
* SYS_TIMER_ABSTIME

The primary motivation for this API is so that libc and other
libraries have a familiar-enough API to reach to when POSIX
is not available, since POSIX is optional in Zephyr.

By adding this API to lib/os, we also eliminate dependency cycles
between libc and posix, as lib/os is a mutual dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Phi Tran
da38a779ea drivers: external interrupt: add external interrupt support for RX130
Add support for external interrupt on RX130.

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-06-24 14:18:41 +02:00
Tatsuya Ogawa
5560c9f12a drivers: interrupt_controller: Add interrupt controller support for RX130
Add interrupt controller driver support for RX130 series

Signed-off-by: Tatsuya Ogawa <tatsuya.ogawa.nx@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2025-06-24 14:18:41 +02:00
Laurentiu Mihalcea
4c8a2ac715 boards: nxp: imx8qxp_mek: add esai0 default pin configuration
Add pad definitions and the pin configuration for i.MX8QXP MEK's
ESAI0.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-06-24 09:13:45 +02:00
Laurentiu Mihalcea
d474f0a177 boards: nxp: imx8qm_mek: add esai0 default pin configuration
Add pad definitions and the pin configuration for i.MX8QM MEK's
ESAI0.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-06-24 09:13:45 +02:00
Laurentiu Mihalcea
1f483b37ea drivers: clock_control: mcux_ccm: support QM/QXP's ESAI/AUD_PLL1 clocks
Add support for gating/ungating IMX8QM/IMX8QXP's ESAI clocks and the
AUD_PLL_DIV_CLK0 clock used as source for ESAI's EXTAL.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-06-24 09:13:45 +02:00