Commit graph

109702 commits

Author SHA1 Message Date
Marek Matej
65d2139dc6 lib: libc: malloc.c: fix calculation of sys heap
Change the condition so that ESP32 SoCs are using `_heap_sentry` to
get actual run-time heap size.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-02-05 17:49:54 +01:00
Marek Matej
f925d0759a manifest: update hal_espressif
Use proper hal version.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-02-05 17:49:54 +01:00
Sven Ginka
4d2e8921e7 board: sensry: add mdio and phy
add mdio and phy to the ganymed_bob_sy120 boards.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-02-05 17:49:40 +01:00
Sven Ginka
65780da520 dts: sy1xx: add mdio support
With this commit we add the mdio functionality to
the sensry soc sy1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-02-05 17:49:40 +01:00
Sven Ginka
e38f3e1c3c drivers: mdio: sy1xx add support for mdio
Add mdio support for the sensry soc sy1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-02-05 17:49:40 +01:00
Jamie McCrae
f8a5ebfd20 scripts: ci: check_compliance: Add check for disallowed Kconfigs
Adds a check for Kconfig settings that are disallowed from being
used in defconfig files (because it is the complete wrong place
for them), with the default entry being PINCTRL

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-05 17:49:27 +01:00
Filip Kokosinski
ee07eba569 arch/riscv: add Zaamo and Zlrsc extension subsets
The Zaamo and Zalrsc Extension (Version v1.0.0, 2024-04-25; Ratified) split
the standard A extension into two subextensions. As of date, the `_zaamo`
and `_zlrsc` extension specifications are accepted by the upstream
in-development GCC through the `march` argument. This means that those
subextensions are not yet supported by GCC shipped with Zephyr SDK.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-02-05 17:49:13 +01:00
Hieu Nguyen
a93a30239b tests: drivers: pwm: Add support for RZ/G3S-SMARC
Enable PWM driver tests for RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Hieu Nguyen
f134d3b35a boards: renesas: rzg3s_smarc: Add PWM support
Add PWM support for board RZ/G3S-SMARC

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Hieu Nguyen
3f96a35628 dts: renesas: Add PWM support for RZ/G3S
Add PWM nodes to Renesas RZ/G3S devicetree

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Hieu Nguyen
3a7ccecdcd drivers: pwm: Initial support for RZ/G3S
Add PWM driver support for Renesas RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-02-05 17:49:00 +01:00
Jimmy Zheng
f216c434d0 soc: gd32: gd32vf103: keep the mcause.interrupt by SOC-specific context
For Nuclei ECLIC, the interrupt level (mintstatus.MIL) is restored from
the previous interrupt level (mcause.MPIL) only if mcause.interrupt is set.
This behavior is not defined in the RISC-V CLIC spec.
If an ISR causes a context switch and mcause.interrupt is not set in the
next context (e.g. the next context is yielded from ecall), interrupts will
be masked after MRET because the interrupt level is not restored.

Use SOC-specific context to set mcause.interrupt to ensure the interrupt
level is restored correctly.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-02-05 17:48:45 +01:00
Jimmy Zheng
3804387350 arch: riscv: handle interrupt level for CLIC
CLIC supports mintstatus.MIL (RO) and mcause.MPIL (RW) for the current
interrupt level and the previous interrut level before a trap. Each ISR
must execute MRET to set mcause.MPIL back to mintstatus.MIL.

This commit introduces CONFIG_CLIC_SUPPORT_INTERRUPT_LEVEL to handle
mcause.MPIL for interrupt preemption in nested ISR, and uses
CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL to ensure ISR always switch out
with MRET.

e.g.
  With CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL=n, a context-switch in
  ISR may skip MRET in this flow:
  IRQ -> _isr_wrapper -> z_riscv_switch() -> retrun to arch_switch()

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-02-05 17:48:45 +01:00
Martin Hoff
e783f69ebf test: driver: uart: add silabs slwrb4180a overlay for async usart test
Add overlay for slwrb4180a board to test async silabs usart driver with
dma.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Martin Hoff
4a31f0227c driver: serial: silabs: implement asynch usart with dma
First implementation of asynchronous usart driver with dma support.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Martin Hoff
6f1debe6e7 driver: dma: silabs: Add silabs_ldma_block_append function
This function allows to not restart DMA engine for driver that gives
new buffer to the DMA engine while a transfer is ongoing.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Martin Hoff
c901551825 driver: dma: silabs: Add signal binding to support P2M and M2P transfer
Improve the silabs ldma driver to support P2M and M2P transfer. It also
adds signal binding to support source request binding in the dts.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-02-05 15:02:35 +01:00
Robin Kastberg
11ca616109 cmsis: backport cmsis_6 IAR fix to 5.9.0
Currently IAR is broken with CMSIS 5.9.0 and we need a backport
of https://github.com/ARM-software/CMSIS_6/pull/102 into CMSIS 5.9.0

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-05 15:02:22 +01:00
Dmitrii Golovanov
e9cb2ef86b twister: runner: Log trace on general exception
Log trace on general exception at ProjectBuilder to provide
more details on its cause.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-02-05 14:59:00 +01:00
Irfan Ahmad
cc40ec60eb samples: Fix fs format sample README to correct a formatting problem
The Sample Output section is missing a blank line before the code block
markup, resulting in the sample output text showing up with an incorrect
format. Fixed by adding a blank line.

Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
2025-02-05 14:58:36 +01:00
Johan Hedberg
4618a272ce drivers: serial: silabs: Fix build for efm32wg_stk3800/efm32wg990f256
The gecko_uart.c driver supports both `silabs,gecko_uart` and
`silabs,gecko_usart` compat strings, however `PM_DEVICE_DT_INST_DEFINE()`
was missing when defining `uart` type instances. The
efm32wg_stk3800/efm32wg990f256 platform enables by default one
`gecko_uart` DT node and no `gecko_usart` nodes. This results in the
following build warning/error:

uart_gecko.c:673:12: warning: 'uart_gecko_pm_action' defined but not used

Add the missing call to `PM_DEVICE_DT_INST_DEFINE()`.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-02-05 14:58:28 +01:00
Robin Kastberg
20360ce95b tests: kernel: Don't use VLA in pipe_api test.
In the current pipe_api test file we inadvertantly use VLA.
Toolchains are allowed by standard to allocate VLA on
heap for example. Therefore in my opinion we shouldn't
use VLA atleast in kernel+kernel tests.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-05 14:57:49 +01:00
Emil Gydesen
28e188b56a Bluetooth: PACS: Add verification of bt_bap_pacs_register_param
Add verification of the parameter struct, so that it returns
-EINVAL if the values are invalid.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-05 14:57:30 +01:00
Emil Gydesen
b72b33a8bc Bluetooth: Audio: Add dependency for BT_SMP
Add dependency for BT_SMP for the services and
service clients that require encryption.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-05 14:57:20 +01:00
Emil Gydesen
3e9b45440f Bluetooth: PACS: Do not use conn struct directly
Instead of using the bt_conn struct directly, only
access the field via the public API. This ensures that
changes to the struct won't affect PACS, unless it also
affects the public API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-05 14:57:14 +01:00
Laurentiu Mihalcea
80f62dd6af boards: imx8mp_evk: adsp: add pin definitions/property for SAI3
Add pin definitions and property for SAI3 node.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-02-05 14:57:03 +01:00
Laurentiu Mihalcea
d3ae53187c boards: imx8mp_evk: adsp: use pin definitions from imx8mp_evk-pinctrl.dtsi
Use the pin definitions from "imx8mp_evk-pinctrl.dtsi". No need
to redefine them.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-02-05 14:57:03 +01:00
Robin Kastberg
dac75f5ecb cmake: linker_script: move ztest to ROM
It seems ZTEST has been moved to ROM in
86cadf9 and this keeps linker generator
up to date. It is also causing some
issues with IAR toolchain where pbits
are being placed in RAM.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-05 14:56:54 +01:00
Emil Gydesen
72b94f0d05 usb: device_next: Document if callbacks are mandatory
Adds additional documentation to the callbacks of uac2_ops
to describe if/when they are mandatory to register.

Additionally add asserts before calling them to help debugging
if the user did not register the required ones.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-05 14:56:47 +01:00
Robert Lubos
b7cfa54c18 net: tc: Deprecate CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO
Since a separate CONFIG_NET_TC_RX_SKIP_FOR_HIGH_PRIO was introduced for
RX TC queues, CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO became ambiguous,
rename it to CONFIG_NET_TC_TX_SKIP_FOR_HIGH_PRIO and deprecate the old
config.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-05 12:37:01 +01:00
Robert Lubos
e430dfb00f net: arp: Set family and proto type for all ARP packets
The family and proto type was not set for the IPv4 autoconf ARP packets.
Since those should be set for all ARP packets, just move the code
outside of the if block.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-05 12:36:25 +01:00
Karsten Koenig
5f6a3ebcf5 modules: hal_nordic: bump regtool to 8.1.2
Recent versions fixed issues for EXMIF and TDM pins as well as support
for dynamic placement of the ETR buffer.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-02-05 12:35:59 +01:00
Tomasz Moń
9e050cd325 drivers: udc_nrf: Do not submit buffer more than once
When the UDC buffer gets submitted it should no longer reside in the
endpoint queue. While this commit does not address the underlying issue
of not being able to start transfer for whatever reason, it prevents the
problem from cascading into buffer double completion (e.g. receive
buffer double free in UAC2).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 12:25:20 +01:00
Bjarki Arge Andreasen
7e0e583f9e soc: nordic: nrf54h: gpd: yield() to not block if main is coop
The main thread, if configured with coop priority (don't do that :D)
breaks gpd since it has a non yielding while loop (also don't do that)

Add an explicit yield() to allow other threads to run if main or other
threads use gpd with coop prio.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-02-05 12:25:10 +01:00
Bartlomiej Buczek
dc7c396a0b tests: boards: nordic: add nrf comp tests.
Tests use nordic specific comparator api which enable it's
runtime reconfiguration.

As there were no tests prepared when introducing this api,
PR adds some to extend test coverage.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2025-02-05 12:24:59 +01:00
Haiyue Wang
d3d7e185ba dts: bindings: dma: Update the STM32 DMA reference link
ST engineer has moved STM32 DMA controllers bindings under ./dma/stm32/
in Linux source code reference by this commit:
	https://git.kernel.org/torvalds/c/8494ae75dde4

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-02-05 10:21:29 +01:00
Tomasz Moń
43880b930c drivers: udc_dwc2: Workaround hibernation exit glitch
DWC2 otg versions earlier than 5.00a are subject to randomly occurring
glitch on Hibernation Exit by Host Initiated Resume, Hibernation Exit by
Device Inititated Resume and Hibernation Exit by Host Initiated Reset.
When the glitch happens the device address is not correctly restored.
If the address is not correctly restored then the tokens addressed to
the device will timeout leading to host resetting the bus.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 10:21:13 +01:00
Tomasz Moń
b963c7d5eb drivers: udc_dwc2: Set bit 17 if needed on Hibernation Exit
Programming Guide states that bit 17 on PCGCCTL writes should be set if
the controller was enumerated for High Speed operation. Add the missing
bit set to adhere to the Programming Guide.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-02-05 10:21:13 +01:00
Flavio Ceolin
05f4add3f9 doc: security: Disclose CVE-2024-10395
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2025-02-05 10:21:04 +01:00
Peter Johanson
16b1d3c29e drivers: display: st7789v: Add ready time to startup
Add additional property to allow a configurable delay to the display
initialization to allow the st7789v to be ready to receive commands.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2025-02-05 10:20:52 +01:00
Declan Snyder
b83f8ed070 soc: nxp: Make clock init weak and global
Make clock init functions in SOC level weak and global so they can be
overriden by board/app level.

Ideally these should have been put at board level but for now just make
them weak so they can be overriden without breaking anything.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-02-05 10:20:41 +01:00
Grant Ramsay
a36c91b4cc doc: gsg: Add note on AArch64 Linux multilib availability
Currently, multilib packages are not available for AArch64 Linux

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2025-02-05 08:16:41 +01:00
Vinayak Kariappa Chettimada
21cb301447 samples: Bluetooth: GATT write commands with connection PHY Update
Update the Central and Peripheral GATT write command sample
to measure throughput across all supported connection PHYs.

Cover the sample in BabbleSIM CI testing to validate the 2M
PHY throughput after all supported PHYs have been changed
once.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-05 08:16:30 +01:00
Vinayak Kariappa Chettimada
e8da981711 Bluetooth: Controller: Workaround HCTO for BabbleSIM
Workaround HCTO calculation for BabbleSIM due to need of
addition timeout value required to have anchor point sync.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-05 08:16:30 +01:00
Vinayak Kariappa Chettimada
13fa3a0290 Bluetooth: Controller: Fix incorrect drift comp on PHY update
Fix incorrect peripheral drift compensation when connection
events are overlapping and a PHY update causes the currently
used PHY to change.

Incorrect preamble to address that is calculated using
updated PHY was used causing supervision timeout.

Fixed by storing the PHY used in the current connection
event and using that for drift compensation calculation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-05 08:16:30 +01:00
Vinayak Kariappa Chettimada
745810c4ce Bluetooth: Controller: Fix connection event busy check
Fix connection event busy check when peripheral role is
using minimal time reservation.

Peripheral and Central have a anchor point sync if the
Peripheral has successfully transmitted once to the Central.

Fixes commit cadef5a64f ("Bluetooth: Controller: Introduce
BT_CTLR_PERIPHERAL_RESERVE_MAX")'.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-05 08:16:30 +01:00
Duy Nguyen
633c5afb07 driver: eth: Fix phy-connection-type setting on RA8 ethernet
This commit fix the pin function configuration for mii and rmii
setting of Renesas RA8 ethernet driver
Correct pin function setting for mii is
PFENET = (uint8_t)(0x1 << R_PMISC_PFENET_PHYMODE0_Pos);
and rmii is:
R_PMISC->PFENET = (uint8_t)(0x0 << R_PMISC_PFENET_PHYMODE0_Pos);
Change code to intialize ping in driver init function, change
method of getting and checking via enum index of device tree.
Add build assert for invalid phy type.

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-02-05 08:16:02 +01:00
Tom Hughes
81f5581a86 tests: kernel: thread_apis: Fix -Wsometimes-uninitialized warning
Building kernel.threads.apis with clang warns:

tests/kernel/threads/thread_apis/src/main.c:362:6: error: variable 'ret'
is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:380:6: note: uninitialized
use occurs here
        if (ret != 0) {
            ^~~
tests/kernel/threads/thread_apis/src/main.c:362:2: note: remove the 'if'
if its condition is always false
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:362:6: error: variable 'ret'
is used uninitialized whenever '||' condition is true
[-Werror,-Wsometimes-uninitialized]
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:380:6: note: uninitialized
use occurs here
        if (ret != 0) {
            ^~~
tests/kernel/threads/thread_apis/src/main.c:362:6: note: remove the '||'
if its condition is always false
        if (m == ISR_ALREADY_EXIT || m == ISR_RUNNING) {
            ^~~~~~~~~~~~~~~~~~~~~~~~
tests/kernel/threads/thread_apis/src/main.c:329:9: note: initialize the
variable 'ret' to silence this warning
        int ret;
               ^
                = 0

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-05 05:40:51 +01:00
Toon Stegen
7b09ccedf3 doc: tracing: fix typo sys_trace_named_event
fix typo in tracing documentation

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2025-02-05 05:40:44 +01:00
Vixay Phimmasane
8119951283 ci: fix typo in coding_guidelines.yml
Typo fix: Guidelines

Signed-off-by: Vixay Phimmasane <visuphi@gmail.com>
2025-02-05 01:16:24 +01:00