Commit graph

107854 commits

Author SHA1 Message Date
Khoa Nguyen
483a8df2f4 tests: drivers: i2c: Add support i2c_api test for RA4, RA2
Add conf and overlay to run i2c_api test on: ek_ra4w1,
ek_ra4m2, ek_ra4m3, ek_ra2a1

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-26 17:20:23 +01:00
Khoa Nguyen
8e18d23eb2 boards: renesas: Add I2C support for Renesas RA4, RA2 boards
Add I2C support for: ek_ra4w1, ek_ra4m2, ek_ra4m3, ek_ra2a1

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-26 17:20:23 +01:00
Khoa Nguyen
b40307d986 dts: arm: renesas: Add I2C support for RA4, RA2 devices
Add I2C support for: ra4-cm4, ra4-cm33 (except r7fa4e2b93cfm),
ra2xx Renesas MCU

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2024-12-26 17:20:23 +01:00
Taeyoun Park
9769a39766 dts: xtensa: Fix gpio-reserved-ranges of gpio1
The range of GPIO37-38 is <5 2>

Signed-off-by: Taeyoun Park <typark0422@pethcare.com>
2024-12-26 15:31:43 +01:00
Cong Nguyen Huu
a4006e4d4e tests: bsim: bluetooth: audio fixes build failure
Fixes build failure, correct the variable is using for
k_sem_take in function test_sink_encrypted_incorrect_code

Fixes #83388

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-12-26 09:31:21 +01:00
Luca Burelli
d492c849a3 tests: cmake: run zephyr_get() tests in script mode
Re-run the zephyr_get() testsuite in script mode after the project
mode testsuite has been executed. This is to ensure that the
zephyr_get() function works correctly in script mode as well.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-26 09:31:11 +01:00
Torsten Rasmussen
4e29a35b22 cmake: use GLOBAL property instead TARGET properties for scoping
Targets are not available in script mode.
To support the Zephyr scoping feature used by snippets and yaml module
then this commit moves from using custom targets to use GLOBAL
properties for scopes.

A scope property is prefixed with `<scope>:<property>` to avoid naming
collisions.
A `scope:<scope-name>` global property is used to track created scopes.
Tracking valid scopes ensure that properties are only set on known
scopes and thus catches typos / naming errors.

Add zephyr_scope_exists() and zephyr_get_scoped() to abstract the
implementation details of the scoped property retrieval and refactor
current code to use them.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-26 09:31:11 +01:00
Hua Zheng
535c40d6d6 drviers: mipi_dbi: mipi_dbi_bitbang: fix 16-bit data_gpios exceed error
For a 16-bit data bus, "DT_INST_PROP_LEN(n, data_gpios)" returns 16
which is equals "MIPI_DBI_MAX_DATA_BUS_WIDTH(16)".
As a result, the assertion will always be triggered.

Use a "<=" condition for the assertion instead.

Signed-off-by: Hua Zheng <writeforever@foxmail.com>
2024-12-26 06:21:25 +01:00
Maochen Wang
e40e0d66db hostap: fix build error when MBEDTLS_PSA_CRYPTO_C enabled
For TFM example, MBEDTLS_PSA_CRYPTO_C has some dependencies and may not
be enabled, so use 'imply' instead of 'select' here for hostap
MBEDTLS_PSA case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-26 06:21:05 +01:00
Arif Balik
6c06d2d33e dts: bindings: fix typo
Just copied and pasted the example and got an error because of the typo

Signed-off-by: Arif Balik <arifbalik@outlook.com>
2024-12-26 03:34:44 +01:00
Dawid Niedzwiecki
229c257522 tests: drivers: flash: stm32: fix uninitialized variable
Make sure not to accidentally enable WP by uninitialized variable during
FLASH_STM32_EX_OP_SECTOR_WP call.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-25 18:03:06 +01:00
Alberto Escolar Piedras
86adcb66e7 manifest: Update nRF hw models to latest
Update the HW models module to:
71bcaa88c97977647d387217dab99f7d6f026815

Including the following:
71bcaa8 hal/nrf_cracen_rng.c: Disable until released
69e9037 hal cracen_rng: Add replacements for proposed cracen_rng hal
71c2507 CRACEN RNG: Corrected one comment
dfbc93a 54 ECB: Corrected behaviour with premature end of input joblist
a46101f 54 AAR, ECB, CCM: Correct a few notes and ECB ERRORSTATUS
74aa2de 54L15: Correct IRQ 261 name
e12ab9c Add CRACEN RNG model
91066e7 docs: UART add PTY backend to shortlist of backends

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-12-25 14:40:46 +01:00
Toon Stegen
642e97dcbe doc: reorder tiles
Put most relevant links at the top. More users are interested in the
list of supported boards then the contributing guidelines.

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
2024-12-25 12:41:09 +01:00
James Roy
fb2b0f2b1c style: Inconsistent macro names changed
Fix incorrect header file pre-macro names in
'dts/common'.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-12-25 12:40:56 +01:00
James Roy
e8fe241859 dts: Improve readability of DT_xxx_M macro
Change '(x) * num' to reuse DT_xxx_K macro.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-12-25 12:40:56 +01:00
Dane Wagner
ad7d808aa2 drivers: spi: Explicitly cast void* for C++ compatibility
Fixes two isolated instances of implicit void pointer casting in spi.h.
While this is legal in C, it causes a compiler error in C++.

Signed-off-by: Dane Wagner <dane.wagner@gmail.com>
2024-12-25 11:06:00 +01:00
Rex Chen
8955d9f71b net: wifi: shell: free station certs memory during disconnect
It will be have a relative high probability to get continuous memory
for the next enterprise conenction, if free station certs memory
during disconnect, thus sys_heap need less memory for big size
EAP-TLS server cert packet, otherwise more memory space needed.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-12-25 08:41:03 +01:00
Ruibin Chang
4ce0ff5ef4 drivers/timer/it8xxx2: fix busy wait timer race condition
Command "waitms 50" on ChromeBook EC console, then it will crash EC.

Because arch_busy_wait() is re-entried by two different tasks,
the second calling will reset the timer and may cause the first
calling to fail to reach the waiting destination
(if the first calling's wait time is longer enough).

Verified by follow test pattern:
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_api
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_error_case
west build -p auto -b it8xxx2_evb tests/kernel/timer/timer_monotonic
west build -p auto -b it8xxx2_evb tests/kernel/timer/starve
west build -p auto -b it8xxx2_evb tests/kernel/context

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-12-25 08:40:53 +01:00
Quy Tran
d74020160f tests: subsys: fs: Support tests/subsys/fs on RA8 boards
Add overlay property node and configs to support tests/subsys/fs/ext2,
tests/fs/fat_fs_api and tests/subsys/sd on RA8 boards

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Quy Tran
8e48fa14df boards: shields: Add support for pmod sd
Add support for Pmod SD and support overlay for EK-RA8M1, EK-RA8D1
to use with Pmod

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Tran Van Quy
149d23d4f0 boards: renesas: Add board support for SDHC driver
Add board support for SDHC driver on EK-RA8M1, EK-RA8D1 and MCK-RA8T1

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Tran Van Quy
ddf56f5e5e dts: renesas: add dts entry node to support sdhc on Renesas RA8
Add node on RA8 dts to support sdhc as channel 0 and channel 1

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Tran Van Quy
8f91d0c072 drivers: sdhc: support SDHC driver on Renesas RA8
This is initial commit to support SDHC driver on Renesas RA8
with r_sdhi modules

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2024-12-25 06:33:12 +01:00
Johan Hedberg
aa04d500a1 samples: bluetooth: Add build_only property for "no blobs" tests
These are never meant to be run, so make sure it's explicitly specified
through the build_only property.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-25 03:37:53 +01:00
Johan Hedberg
2ac87acab9 samples: bluetooth: Add Silabs boards to "no blobs" test cases
Add Silabs boards to the newly added test cases which exercise the
CONFIG_BUILD_ONLY_NO_BLOBS configuration option. Also fix the namespace to
be "peripheral" for the peripheral sample app.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-25 03:37:53 +01:00
Johan Hedberg
5f963feed4 modules: hal_silabs: Add stubs to support CONFIG_BUILD_ONLY_NO_BLOBS
Add empty function stubs to support building with the newly introduced
CONFIG_BUILD_ONLY_NO_BLOBS option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-25 03:37:53 +01:00
Sylvio Alves
1681c7e317 soc: esp32: fix appcpu register access
Build is failing due to wrong calls to appcpu
stall and clock gating. This fixes it
by using proper registers.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-25 03:37:39 +01:00
Henrik Brix Andersen
52abef2f54 usb: device: next: reduce log level for vendor requests
Reduce the log level from error to debug for received vendor requests.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-12-25 03:37:26 +01:00
Fin Maaß
b500f4c557 mgmt: hawkbit: use settings_save_subtree()
use settings_save_subtree() instead of settings_save() to
only save the hawkbit settings

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-25 03:37:14 +01:00
Ian Wakely
dd37c60d5a doc: release-notes 4.1: Adding Adafruit QT Py
Updating release notes to include the recently added Adafruit QT Py
ESP32-S3 both with and without its PSRAM version.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2024-12-24 20:14:25 +01:00
Mahesh Mahadevan
b978fd7bfb drivers: usb: Fix pointer reference in the NXP drivers
The address passed in to the function was incorrect causing
failures when porting to RT1180.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-12-24 16:07:49 +01:00
Théo Battrel
18c2ea2336 Tests: Bluetooth: Check GATT settings cleanup
Check that the GATT settings added when bonding to a peer and
subscribing to a CCC are correctly deleted when calling `bt_unpair`.

Testing hooks have been added in the Bluetooth settings abstraction
layer to know which key are being added/deleted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-12-24 16:07:32 +01:00
Théo Battrel
65334e0104 Bluetooth: Host: Clear settings CF instead of CCC
`bt_gatt_clear_cf` was calling `bt_settings_delete_ccc` instead of
`bt_settings_delete_cf`. This was causing some settings to be left over.

Fix the issue by using the correct function.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-12-24 16:07:32 +01:00
Seppo Takalo
4a7ef5c010 net: lwm2m: Convert tickeless to use eventfd()
For waking up the poll() use eventfd() instead of socketpair()
so we save some buffer space and one file descriptor.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-12-24 13:54:39 +01:00
Mikkel Jakobsen
e4c21da41b drivers: fuel_gauge: make read-only pointer args const in api
For the lists of properties passed as a pointer to the get_props and
set_props functions, there is no reason to not make the pointer const as
the called functions will not and should not alter the pointed-to data.

In practice, not having the pointers const can cause compilation errors
if trying to pass in a const array of properties.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2024-12-24 13:54:15 +01:00
Mikkel Jakobsen
7960747d8d drivers: fuel_gauge: fix missing casts in api functions
The fuel_gauge_get_props and fuel_gauge_set_prop functions were missing
casts for the device struct which causes compiler warnings when using
the -fpermissive compiler flag.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2024-12-24 13:54:15 +01:00
Mikkel Jakobsen
10bb71e54f drivers: fuel_gauge: fix integer comparison in api functions
In the fuel_gauge_get_props and fuel_gauge_set_props functions, an array
len is passed as a size_t but compared against an int, which leads to
C++ compiler warnings when using -Werror=sign-compare. The fix is to use
a size_t for the loop counter.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2024-12-24 13:54:15 +01:00
Dawid Niedzwiecki
be5d44eb7e drivers: flash: stm32: update ex_op API
Use uint64_t instead of uint32_t for the FLASH_STM32_EX_OP_SECTOR_WP
extended operation.

Some chips have two banks, more than 16 sectors each e.g. stm32h7a3xx
chips, so more than 32 bits are required.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-12-24 13:54:04 +01:00
Yong Cong Sin
2f2dd9407c kernel/swap: remove redundant ARG_UNUSED from do_swap()
The `lock` arg is used multiple times in the function, making the
`ARG_UNUSED(lock);` redundant, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-12-24 13:53:49 +01:00
Emil Gydesen
c5fc9a2b17 tests: Bluetooth: BAP: Add retry with correct broadcast code
Expand test_sink_encrypted_incorrect_code to retry the sync with
the correct broadcast code after failing the initial sync
with the incorrect broadcast code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-24 13:53:34 +01:00
Chris Friedt
64442ae5cd scripts: west-commands: add an entry for the patch command
Add an entry to west-commands.yml for the west patch command.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-24 11:15:38 +01:00
Chris Friedt
ad611395ee scripts: west_commands: add the west patch command
In smaller projects and organizations, forking Zephyr is usually
a tenable solution for development continuity, in the case that
bug-fixes or enhancements need to be applied to Zephyr to
unblock development.

In larger organizations, perhaps in the absence of healthy patch
management, technical debt management, and open-source policies,
forking and in-tree changes can quickly get out of hand.

In other organizations, it may simply be preferable to have a
zero-forking / upstream-first policy.

Regardless of the reason, this change adds a `west patch`
command that enables users to manage patches locally in their
modules, under version control, with complete transparence.

The format of the YAML file (detailed in a previous comit)
includes fields for filename, checksum, author, email, dates,
along with pr and issue links. There are fields indicating
whether the patch is upstreamble or whether it has been merged
upstream already. There is a custom field that is not validated
and can be used for any purpose.

Workflows can be created to notify maintainers when a merged
patch may be discarded after a version or a commit bump.

In Zephyr modules, the file resides conventionally under
`zephyr/patches.yml`, and patch files reside under
`zephyr/patches/`.

Sample usage applying patches (the `-v` argument for additional
detail):
```shell
west -v patch apply
reading patch file zephyr/run-tests-with-rtt-console.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/twister-rtt-support.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/multiple_icntl.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/move-bss-to-end.patch
checking patch integrity... OK
patching zephyr... OK
4 patches applied successfully \o/
```

Cleaning previously applied patches
```shell
west patch clean
```

After manually corrupting a patch file (the `-r` option will
automatically roll-back all changes if one patch fails)
```shell
west -v patch apply -r
reading patch file zephyr/run-tests-with-rtt-console.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/twister-rtt-support.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/multiple_icntl.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/move-bss-to-end.patch
checking patch integrity... FAIL
ERROR: sha256 mismatch for zephyr/move-bss-to-end.patch:
expect: 00e42e5d89f68f8b07e355821cfcf492faa2f96b506bbe87a9b35a823fd719cb
actual: b9900e0c9472a0aaae975370b478bb26945c068497fa63ff409b21d677e5b89f
Cleaning zephyr
FATAL ERROR: failed to apply patch zephyr/move-bss-to-end.patch
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-24 11:15:38 +01:00
Chris Friedt
39588e7ca2 scripts: schemas: add schema for patches.yml files
Add a pykwalify schema for patches.yml files, which are used by
the west patch command.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-24 11:15:38 +01:00
Jiafei Pan
b35404f349 dts: arm64: imx8mn: add GPIO device nodes
Add GPIO device nodes for imx8mn.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-12-24 11:15:26 +01:00
Jiafei Pan
34aa5b16fe dts: arm64: imx8mm: add gpio device nodes
Add GPIO devices nodes.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-12-24 11:15:26 +01:00
Peter Mitsis
31ebd6036a tests: Test k_reschedule() with deadline scheduler
Setting a deadline is not a schedule point. This makes it a
perfect place to verify the behavior of the new k_reschedule()
routine at both thread and ISR level.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-24 04:22:51 +01:00
Peter Mitsis
669f2c489a kernel: Add k_reschedule()
The routine k_reschedule() allows an application to manually force
a schedule point. Although similar to k_yield(), it has different
properties. The most significant difference is that k_yield() if
invoked from a cooperative thread will voluntarily give up execution
control to the next thread of equal or higher priority while
k_reschedule() will not.

Applications that play with EDF deadlines via k_thread_deadline_set()
may need to use k_reschedule() to force a reschedule.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-24 04:22:51 +01:00
Make Shi
3f4ff78c1b Bluetooth: classic: Kconfig: set BT_RFCOMM_DLC_STACK_SIZE default 512
For the shell RFCOMM case, these is a stack overflow problem when do
disconnect, so need to increase the CONFIG_BT_RFCOMM_DLC_STACK_SIZE.
Set CONFIG_BT_RFCOMM_DLC_STACK_SIZE default 512.

Signed-off-by: Make Shi <make.shi@nxp.com>
2024-12-24 04:22:37 +01:00
Jeff Daly
334c6be2da drivers: adc: microchip: Fix PR #80933
Fixed bug calculating offset of registers after unused space in the ADC
register space for the SZ package parts.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-12-23 23:58:47 +01:00
Andrew Featherstone
6a47f724dc samples: drivers: led: pwm: Add rpi_pico2 board
The RP2350's PWM peripheral is largely unchanged from the RP2040's, but
the higher clock frequency means the long blink delay must be lower.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00