Compare commits

...

4284 commits

Author SHA1 Message Date
Troels Nilsson
6f64f77557 Bluetooth: Controller: Remove incorrect check of RFU bit
RFU bits has to be ignored according to the spec; In addition,
some MediaTek devices seems to have it set (by mistake I assume),
so having the check means we cannot sync to these devices

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-10-18 17:47:14 +01:00
Erik Brockhoff
b590c0b1f6 doc: connectivity: Bluetooth: add LLCP fly-in
Adding a brief fly-in of the main concepts of the
implementation of link layer control procedures handling

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-10-18 17:46:55 +01:00
Phi Bang Nguyen
e67f2b1a61 samples: video: capture: Enhance fixture test with colorbar checking
Currently, the camera fixture test can only tell whether data are dumped
onto memory. This is to check further if the image content is correct.

The algorithm is rather simple: compare the average color of each bar
of a generated pattern with a predefined target in CIELAB76 color
space (which is nearly perceptually uniform).

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-18 17:46:38 +01:00
Phi Bang Nguyen
9f97e18ddd samples: video: capture: Fix camera fixture test
The logs that the fixture test are based on are not printed anymore due
to recent changes from "printk" to "LOG_DBG". Change the log level so
that it can work again.

Remove "Capture started" as it is not a relevant test regex. Logs are
sometimes not correctly printed in the console, for example, we can see:

DEBUG   - DEVICE: muart:~$ [mapture started

As "Capture started" is a one-time log, fixture test will then fail due
to timeout.

Also, consolidate other regex.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-18 17:46:38 +01:00
Phi Bang Nguyen
5e627b64b5 samples: video: capture: Add mimxrt1170_evk@B to test
Add mimxrt1170_evk@B to test platforms.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-18 17:46:38 +01:00
Vinayak Kariappa Chettimada
b4182caf77 Bluetooth: Controller: Fix Periodic Adv Chain PDU channel indices
Fix missing population of channel indices for Periodic
Advertising Chain PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 17:46:23 +01:00
Vinayak Kariappa Chettimada
1eb74c43df Bluetooth: Controller: Fix Extended Adv Chain PDU channel indices
Fix missing population of channel indices for Extended
Advertising Chain PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 17:46:23 +01:00
Pavel Vasilyev
1fbcc0e6f9 tests: bluetooth: host: conn: Add bt_conn_le_create unit test
Add a test that checks behavior of
CONFIG_BT_CONN_CHECK_NULL_BEFORE_CREATE Kconfig option.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-18 17:46:04 +01:00
Pavel Vasilyev
8acb1cc577 bluetooth: host: conn: Check if *conn is not NULL
This commit adds a warning and a Kconfig option to `bt_conn_le_create`
and `bt_conn_le_create_synced` functions which are meant to warn a user
of a potential leakage of an active connection object.

This change is implemented due to frequent incorrect use of the
connection pointer where a pointer to an existing connection object
is overwritten by `bt_conn_le_create` and `bt_conn_le_create_synced`
functions which in turns leads to sporadic critical bugs. See
https://github.com/zephyrproject-rtos/zephyr/pull/78284#discussion_r1754304535
for more details.

The Kconfig option is introduced instead of always returning the error
to not affect current implementations. However, it is recommended to
keep this option enabled to avoid potential bugs.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-18 17:46:04 +01:00
Gerard Marull-Paretas
4ab766cafc doc: migration-guide: inform about power-domains[-names]
The new property replaces the old power-domain.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-18 17:45:21 +01:00
Gerard Marull-Paretas
f989711a60 pm: s/power-domain/power-domains and add power-domain-names
Some devices may belong to >1 power domain, so with the current design
this is something not possible to describe. It's worth to note that
Linux also uses the `power-domains` naming scheme, not `power-domain`.
This patch also introduces `power-domain-names` so that each entry in
`power-domains` can be given a name if needed. `#power-domain-cells`
is now required as well.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-18 17:45:21 +01:00
Yassine El Aissaoui
5ae51cf959 samples: bluetooth: Set NXP CI checks as build-only
Flag the central and prepheral ht CI check as build-only.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-18 17:45:07 +01:00
Yassine El Aissaoui
c002e7880a drivers: bt_nxp: delete non monolithic support
Current code does no longer support
the non monolithic feature.
Hence, removing unnecessary code.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-18 17:45:07 +01:00
Yassine El Aissaoui
906a5ec37b soc: nxp: rw: Introduce HAS_NXP_MONOLITHIC_BT config
This config will be used to indicate if a platform
has the support for monolithic BT feature.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-18 17:45:07 +01:00
Emilio Benavente
9d5cceb166 boards: nxp: frdm_mcxn947: Enabled MRT
Enabled the MRT at the board level for
mcxn947. Enabled the clocking for the MRT
in the clock control.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-18 17:44:48 +01:00
Emilio Benavente
ae354aa7d4 dts: arm: nxp_mcxn947: Add MRT DTS
Updated the MCXN94x DTS with the MRT node.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-18 17:44:48 +01:00
Bjarki Arge Andreasen
0502189729 tests: drivers: comparator: shell: use platform_allow
Change integration_platform -> platform_allow to not build the
shell test suite for all supported boards.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-18 17:44:30 +01:00
Vivekananda Uppunda
2f23313e37 manifest: Pull promiscuous mode filtering support in driver
This pulls in changes to support promiscuous mode filtering
in driver.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-10-18 08:31:50 -04:00
Vivekananda Uppunda
da0c30d52a drivers: wifi: nrfwifi: Add promiscuous mode support functions
This adds promiscuous mode support functions into build for filter
operation when the configuration CONFIG_NRF70_PROMISC_DATA_RX
is enabled.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-10-18 08:31:50 -04:00
Vivekananda Uppunda
c9b56de040 drivers: wifi: nrfwifi: Promiscuous mode filtering support in driver
This set of changes brings in promiscuous mode filtering support in
driver. Since, firmware would be unable to filter packets due to
connection issues, the filtering support for promiscuous mode is
moved to the driver.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-10-18 08:31:50 -04:00
Andrzej Puzdrowski
17c15e3b4e susbys/dfu/img_util: refined ERASE PROGRESSIVELY implementation
Moved MCUboot trailer's status erase ahead any write operation,
which is step which helps with addition of support for devices
don't require explicit pager erase.
For these kind of devices flattening of mcuboot image status in
the trailer was introduced.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2024-10-18 08:19:28 -04:00
Michał Stasiak
3013604f1b samples: drivers: audio: dmic: Add nRF54L15 to the sample
nRF54L15 FP1 can now be used in dmic audio sample.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Michał Stasiak
f8466b4791 drivers: audio: dmic: Add support for multiple nrf PDM instances
Driver now uses multi-instance PDM nrfx API and
defines PDM device based on available instances.
It also introduces calculating PDM frequency using
prescaler, present on nRF54L15 FP1.
Updated nrfx API version changed to 3.7 to use the
new PDM API.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Michał Stasiak
c092964dd2 modules: hal_nordic: Add new PDM instances
New PDM, some present on nRF54L15 FP1, instances have
been added. Modified condfiguration file for nRF5340,
which now requires PDM0 instance.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Michał Stasiak
005587fd61 modules: hal_nordic: Add nrfx configuration for nRF54L15 FP1
Added dedicated nrfx configuration files for
nRF54L15 FP1, which differ from ENGA variant with
inclusion of PDM.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Nikodem Kastelik
478a40ad89 boards: nordic: nrf54hl: add retained_mem to supported features
Doc and .yaml descriptions shall mention retained_mem
in supported features on affected boards.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-18 08:17:53 -04:00
Nikodem Kastelik
e9f1f41e28 tests: drivers: retained_mem: api: add support for nrf54h20
retained_mem driver is now compatible with nrf54h20 cpuapp & cpurad.
Also add missing .conf for nrf54l15.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-18 08:17:53 -04:00
Nikodem Kastelik
7048e0bec3 drivers: retained_mem: nrf: align dependencies to nrf54h20
nRF54H20 cpuapp and cpurad are now compatible with retained_mem,
so explicit list of supported devices can be removed.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-18 08:17:53 -04:00
Mustafa Abdullah Kus
abea54e574 test: net: lib: add prometheus library tests
Tests for prometheus library support.
It contains integration and unit test
each metric types.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-10-18 14:17:11 +02:00
Mustafa Abdullah Kus
316e823178 samples: net: add prometheus library sample application
The sample uses the Zephyr HTTP server library
and demonstrates the Prometheus metric
server node. Prometheus client library
runs as a pull method. The sample contains
the HTTP request counter and increases
when refresh path of '/metrics' from the browser.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-10-18 14:17:11 +02:00
Mustafa Abdullah Kus
d482e3ddfc net: add initial prometheus client library
The library provides Prometheus metrics
types, collector and exposion formatter.
The library isn't thread-safe for now.
The next first pull request will support
that. Can be use exposion formatted
output with Zephyr Http server.

Signed-off-by: Mustafa Abdullah Kus <mustafa.kus@sparsetechnology.com>
2024-10-18 14:17:11 +02:00
Laurentiu Mihalcea
e2872c002a drivers: intc: irqstr: initialize 'enabled' variable
Initialize the 'enabled' variable before using it.
This fixes the following compilation warning:

"warning: 'enabled' may be used uninitialized [-Wmaybe-uninitialized]"

issued when compiling with `CONFIG_DEBUG` enabled.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-10-18 14:16:21 +02:00
Laurentiu Mihalcea
cdd5635002 nxp: imx8m: adsp: enable the irqstr interrupt controller
Enable the irqstr interrupt controller for the adsp-based
imx8mp.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
2024-10-18 14:16:21 +02:00
Sadik Ozer
e2f5439314 tests: drivers: w1: Move platform_allow in w1-serial
As per of str4t0m request, it is moved under
w1-serial section more detail in below link
https://github.com/zephyrproject-rtos/zephyr/pull/75009

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Furkan Akkiz
6380c961d1 tests: drivers: w1: Enable 1-wire driver tests for max32666evkit board
Enable 1-wire driver test for MAX32666EVKIT

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
0c7e3e1fe0 tests: drivers: w1: Add MAX32666FTHR board overlay file
Add MAX32666FTHR board overlay files to w1_api test be supported.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
30368e9b4f boards: adi: Add 1-Wire driver in MAX32666 driver list
1-Wire interface can be used with MAX32666 boards
It added in supported interface list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
aed0bf33e5 tests: drivers: w1: Add APARD32690 board overlay file
Add APARD32690 board overlay files to w1_api test be supported.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
54f1ec68f8 boards: adi: Add 1-Wire driver in APARD32690 driver list
Add 1W driver in APARD32690 driver list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
2a8df0a37c tests: drivers: w1: Add MAX32690EVKIT board overlay file
Add MAX32690EVKIT board overlay files to w1_api test be supported.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
2b02bf31a9 boards: adi: Add 1-Wire driver in MAX32690EVKIT driver list
Add 1W driver in MAX32690EVKIT driver list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Tahsin Mutlugun
e3355e9a53 tests: drivers: w1: Add MAX32680EVKIT board overlay file
Support MAX32680EVKIT in 1-wire tests.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
b9ec607d26 boards: adi: Add 1-Wire driver in MAX32680EVKIT driver list
Add 1W driver in MAX32680EVKIT driver list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
0f3aa5d53d tests: drivers: w1: Add MAX32655EVKIT board overlay file
Add MAX32655EVKIT board overlay files to w1_api test be supported.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
fd9b1332aa boards: adi: Add 1-Wire driver in MAX32655EVKIT driver list
1-Wire interface can be used with MAX32655EVKIT
It added in supported interface list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
6623e834db dts: Add 1-Wire inside device tree
Add 1-Wire register file
Some MAX32 MCUs has 1-Wire peripheral some one not
So that added in device related dtsi file.

Has 1-W       Not have 1-W
MAX32655        MAX32662
MAX32666        MAX32670
MAX32680        MAX32672
MAX32690        MAX32675

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Sadik Ozer
3c4f819c02 drivers: w1: Add MAX32xxx 1-Wire driver
Added 1-Wire master driver for MAX32xxx MCUs

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-18 14:16:14 +02:00
Ha Duong Quang
08a4259a0a boards/tests: dma: enable dma for S32Z270
Enable dma boards/test for S32Z270.

The non-cacheable memory used for DMA tests (chan_blen_transfer and
loop_transfer) is split from the system SRAM.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-10-18 14:16:05 +02:00
Ha Duong Quang
12bb3fb9b1 soc: nxp: s32ze: add support eDMA3 for S32Z270
Enable support EDMA for S32Z270.
Add eDMA3 instance 0, 1, 4 and 5 for S32Z270 devices.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-10-18 14:16:05 +02:00
Ha Duong Quang
a685d1143d drivers: dma: support multiple instances
Support multiple instances for dma.

Memset struct data and tcdpool on initialization is not necessary.
Therefore remove it.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-10-18 14:16:05 +02:00
Adam Cavender
18f508144e bluetooth: host: CS support for various HCI commands
Adds HCI support for:
- LE CS Security Enable
- LE CS Procedure Enable
- LE CS Set Procedure Parameters
- LE CS Set Channel Classification
- LE CS Read Local Supported Capabilities
- LE CS Write Cached Remote Supported Capabilities
- LE CS Write Cached Remote FAE Table

Signed-off-by: Adam Cavender <adam.cavender@nordicsemi.no>
2024-10-18 14:15:49 +02:00
Georgij Cernysiov
daf116a73d drivers: ethernet: adin2111: minor corrections of is_adin2111
* Make `is_adin2111` a const.
* Check `is_adin2111` before processing port 2 related events.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Georgij Cernysiov
fd9a947311 drivers: ethernet: adin2111: add is_adin2111 check for oa port 2
Skip RX check for port 2 in the OA path for ADIN1110.
As the 2nd port doesn't exist.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Georgij Cernysiov
32cf1f7df2 drivers: ethernet: adin2111: oa: fix thread termination
If OA read fails, then the essential thread is terminated.
Correct the behavior so that the driver re-tries the read and
continues to work.

Refactor offload thread OA and Generic SPI parts into
if/else statement.

Add missing `is_adin2111` to OA port 2 RX status check.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-18 14:15:42 +02:00
Iuliana Prodan
4b16071069 samples: disable shell for i.MX8QM and i.MX8QXP
Disable shell for i.MX8QM and i.MX8QXP since is not supported now.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-18 14:15:31 +02:00
Vinayak Kariappa Chettimada
ee844550b7 Bluetooth: Controller: Fix short prepare timeout start (2nd attempt)
Fix to setup correct short prepare timeout when preempt
callback does not find the prepare in the head of the
pipeline. In this case, find the short prepare and setup
a fresh preempt timeout for the determined short prepare
present in the pipeline.

Relates to commit 7d1bc1789e ("Bluetooth: Controller: Fix
short prepare preempt timeout start").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
ccec1d5150 Bluetooth: Controller: Fix delayed ULL scheduling aux PDU reception
Fix delayed ULL scheduling an auxiliary PDU reception by
skipping it. When many bufferred ADV_EXT_IND are to be
processed, the ULL scheduling could get late and then cause
the scan aux LLL to detect increased overhead start timing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
7d21a61f64 Bluetooth: Controller: Fix to reschedule at window start
Fix to reschedule at window start when there are no more
tickers in the list to check for overlap.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
557376a2ce Bluetooth: Controller: Fix ticks_elapsed use in reschedule_in_window
Remove ticks_elapsed use in reschedule_in_window as it has
already been used in the bottom half processing.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
c96375ec1e Bluetooth: Controller: Simplify ticker reschedule_in_window
Simplify ticker reschedule_in_window implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
b5ec75d964 Bluetooth: Controller: Refactor to not invoke function as parameter
Minor refactor to not invoke function as parameter being
passed.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
bc0b283731 Bluetooth: Controller: Fix BT_RX_STACK_SIZE required
During use of tests/bluetooth/shell application to perform
extended scanning with periodic advertising and broadcast
audio source devices around, it was observed that the
application crashed due to too low BT_RX_STACK_SIZE, hence
increase by 128 bytes.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Vinayak Kariappa Chettimada
5dfc58cff9 Bluetooth: Controller: Fix single switch timer minimum compare value
Fix implementation of single switch timer minimum compare
value requirement. Do not always add the maximum possible
radio latency duration, but check if the required compare
value is smaller, then use the remainder required as the
extra compare value. This fix reduces latencies to setup
radio receptions and fixes an assertion in lll_scan_aux
when radio_tmr_start_us() is checked for latencies.

Relates to commit bcd28e0a86 ("Bluetooth: Controller:
Fix sw switch single timer for spurious TXEN/RXEN").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-18 14:15:23 +02:00
Mara Furland
7ac41a1b24 scripts: twister: set Python3_EXECUTABLE when calling cmake
When twister calls cmake, set Python3_EXECUTABLE so things work as expected
when using non-global python

Signed-off-by: Mara Furland <mara@fur.land>
2024-10-18 14:15:13 +02:00
Tomi Fontanilles
8bce5230fd tests: secure_storage: update integration_platforms
Consistently use the nRF54L15 as the non-TF-M integration platform
in addition to `native_sim`, and the nRF9151 as the TF-M one.
In addition, add the `integration_platforms` specification to the
tests that were missing it.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-18 14:15:06 +02:00
Maciej Baczmanski
ca09d1daa1 net: silence no sources cmake warning
add `ALLOW_EMPTY TRUE` property to silence cmake warnings in case
when no sources are added to subsys__net library

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-10-18 14:14:56 +02:00
Jukka Rissanen
11fae015e0 net: sockets: Ignore error if there is none
Seen when having multiple network interfaces that the sock_error
was 0 even if the socket was serviced properly. So if SO_ERROR
returns 0, just ignore it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-18 14:14:45 +02:00
Jukka Rissanen
8e866e95c8 net: mdns_responder: Register properly multiple sockets
We must register all listening sockets under one file descriptor
array when calling dns_dispatcher_register() which then calls
net_socket_service_register(). The socket services expects all
the registered sockets under one service context to be in one
array. If this is not done, the latest socket array wins and
the earlier registrations are forgotten.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-18 14:14:45 +02:00
Jukka Rissanen
de98378571 net: dns: Make dispatcher check also network interface
As the DNS might listen to multicast addresses (like in mDNS) in
different network interfaces, make sure to check the network
interface index when registering the dispatcher context. This
allows two mDNS registrations to more than one network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-18 14:14:45 +02:00
Tobias Pisani
a2ac676a10 tests: drivers: display: build_all: add ssd1322
Add ssd1322 to display build test

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-10-18 09:18:21 +02:00
Tobias Pisani
3253d333e1 drivers: display: Add ssd1322 driver
Initial support for SSD1322 OLED display driver. Only 1 bit color mode is
supported.

Most options map directly to values documented in the datasheet,
except segments-per-pixel, which I had to add to support the Newhaven
NHD-2.7-12864WDW3. This is a slightly odd feature, but in practice
it is a lot nicer to support it in the driver, and since we're currently
remapping pixels anyway, it makes sense to implement here.

This driver also has a configurable buffer size for the pixel conversion.
By using a larger buffer, we can potentially use DMA for the SPI transfer.
The default is set to 8, which is the smallest value that supports
segments-per-pixel = 2

Initial driver implementation by Lukasz Hawrylko <lukasz@hawrylko.pl>.
Additional options and configurability by Tobias Pisani <mail@topisani.dev>

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
Signed-off-by: Tobias Pisani <mail@topisani.dev>

Co-authored-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
Co-authored-by: Tobias Pisani <mail@topisani.dev>
2024-10-18 09:18:21 +02:00
Lucien Zhao
3e109d6997 boards: nxp: correct the acmp description in doc
acmp interface is a sensor component

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-18 09:18:07 +02:00
Lucien Zhao
c847cd5d19 boards: nxp: mimxrt1180_evk: add flexcan support
Add flexcan pin pinctrl

Test samples/subsys/canbus/isotp on B2B way
(Need to weld pin header on J35)

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-18 09:18:07 +02:00
Lucien Zhao
ef4ff8eb2c dts: arm: nxp: rt118x: add flexcan instances
Enable flexcan clocks
add 3 flexcan instances

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-18 09:18:07 +02:00
Sungwoo Kim
2f50e26c40 Bluetooth: HCI: Add validation for data from controllers
Like 2ca179c, check and warn if incoming HCI event parameters exceed
the specification. This helps debugging controllers by detecting the
out-of-spec value that shouldn't appear.

Signed-off-by: Sungwoo Kim <iam@sung-woo.kim>
2024-10-18 09:17:57 +02:00
Daniel Gaston Ochoa
f05fb41587 drivers: spi: stm32h7: Avoid unnecessary FIFO flush
The RxFIFO is already flushed any time a transceive operation
finishes, there is no need for doing it also before the
transaction start.

The aim of this change is to simplify the logic and to
(potentially) reduce the minimum time between transactions.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-10-18 09:17:46 +02:00
Chris Friedt
b302212c5a tests: posix: net: fix missing clock_t and clockid_t with newlib
Fix errors found in CI for missing clock_t and clockid_t types
when building the tests/posix/net testsuite against newlib.

Also use angle-brackets and prefixed path with
`<zephyr/posix/posix_types.h>` since it is not in the default
search path and is analagous to `<sys/types.h>`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-18 09:17:33 +02:00
Peter Mitsis
091c6664c5 tests: arc_vpx_lock
Add tests to verify arc_vpx_lock/unlock API.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-17 15:49:49 -04:00
Peter Mitsis
1d07e565fc arch: arc: add support for lock/unlock VPX
Adds support for cooperative locking/unlocking the VPX vector registers.
Provided that all VPX enabled threads use these routines to control
access to the VPX vector registers, it will allow multiple threads to
safely use them without the need for saving/restoring them upon each
context switch.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-17 15:49:49 -04:00
Andrzej Głąbek
f629f1e287 drivers: clock_control_nrf2_hsfll: Fix checking if DVFS is available
To check if DVFS can be used, the CONFIG_NRFS_DVFS_LOCAL_DOMAIN symbol
needs to be used, not CONFIG_NRFS_HAS_DVFS_SERVICE which only indicates
that DVFS is technically possible, not that its local domain part is
actually included in the build.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-10-17 15:49:38 -04:00
Javier Santos
a70eaa5c4a drivers: sensor: npm1300: Added charging support without NTC
Current nPM1300 charger driver does not work with batteries
without NTC thermistor. Added supported for this feature.

Signed-off-by: Javier Santos <jasr93@outlook.es>
2024-10-17 15:39:28 -04:00
Tomáš Juřena
953436b185 test: sensor: ina230: Add INA236
Update tests to validate INA236 chip

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-10-17 15:39:18 -04:00
Tomáš Juřena
3602342611 drivers: sensor: ti: ina230: Add support for INA236
This commit adds support for INA236 into the existing INA230 driver.
These two chips are similar enough to share most of the code.
The device can be defined the same way as INA230 and we only have
the extra option to select the high-precision mode.

```
ina236: ina236@40 {
		status = "okay";
		compatible = "ti,ina236", "ti,ina230";
		reg = <0x40>;
		adc-mode = "Bus and shunt voltage continuous";
		vbus-conversion-time-us = <1100>;
		vshunt-conversion-time-us = <1100>;
		avg-count = <1>;
		current-lsb-microamps = <1000>;
		rshunt-micro-ohms = <15000>;
		alert-gpios = <&gpiod 0 GPIO_ACTIVE_LOW>;
		high-precision;
	};
```

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2024-10-17 15:39:18 -04:00
Jordan Yates
8f4cf7f6af sensor: voltage_divider: delay sampling after power-on
Enforce some minimum delay between enabling the voltage divider with a
GPIO and sampling the analog voltage. Without this delay the ADC can
easily sample the transient power up curve instead of the steady state
output.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 15:38:52 -04:00
Benedikt Schmidt
acbc14e767 drivers: gpio: implement parallel mode in TLE9104
Implement the parallel mode in the powertrain switch TLE9104.
This allows that OUT1 and OUT2 are controlled together, as well
as OUT3 and OUT4.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-10-17 15:38:45 -04:00
Piotr Kosycarz
fb86c453cc tests: drivers: sensor: temp_sensor: verify room temperature
Verify sensor reading - should be within room temperature limits.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-10-17 15:38:37 -04:00
Jamie McCrae
85710f1727 soc: nordic: nrf53: Make GPIO pin forwarding automatic
Allows forwarding GPIO pins to network core automatically if the
devicetree node exists.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-17 15:38:22 -04:00
Jamie McCrae
89bf0eda74 boards: nordic: thingy53: Add missing FEM entries
Adds missing SPI definition and settings for usage of FEM on
this platform

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-17 15:38:22 -04:00
Jukka Rissanen
4c0a72bb60 samples: net: echo-server: Add USB CDC NCM support
Add support for USB cdc_ncm to echo-server application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 15:38:00 -04:00
Jukka Rissanen
85b9bd4424 samples: net: zperf: Add USB CDC NCM support
Add support for USB cdc_ncm to zperf application.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 15:38:00 -04:00
Jukka Rissanen
cc7d932cce samples: usb: common: Add NCM when setting code triple
Add NCM class to sample usbd initialization and the code
triple is set properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 15:38:00 -04:00
Jukka Rissanen
8169ca2e08 usb: device_next: NCM driver for usb-next
USB NCM Ethernet driver implementation.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 15:38:00 -04:00
Florian Weber
0d9cdf0990 drivers: sensors: rtio
Inform the executor of a submissions completion with -ENOMEM
if the size of the workq is not big enough.

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2024-10-17 15:37:49 -04:00
Olivier Lesage
60a2d7d7d2 bluetooth: host: minor doc correction for bt_le_cs_step_data_parse()
This function can be used to parse HCI-formatted subevent results
regardless of whether they come from CS Test or not

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
6c954782d2 bluetooth: host: Add defines for mode 1 packet quality and RSSI
Add some defines for packet quality and rssi for RTT,
these are useful for filtering out steps where the RTT exchange
was unsuccessful

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
b1f34a1b19 bluetooth: host: uint16_t -> int16_t mode 1 deltas
These are signed 16-bit integers by spec

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
5d0366404a bluetooth: host: Add docs for t_XX times in CS Test
These options are in microseconds but not fully configurable,
document what options are allowed in 6.0

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
51a0e9484d bluetooth: host: Fix values for minimizing/maximizing TX power
The values were swapped, leading to the opposite of the intended
behavior

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Benjamin Cabé
8f4ee9bb81 ci: doc: don't fail publish job if there's no artifact to publish
If doc build has not generated any artifact, gracefully skip
publication.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-17 15:37:27 -04:00
Ian Morris
1e5d0045b5 boards: mikroe: stm32_m4_clicker: fix mikrobus_header pin assignment
Fix incorrect pin assignment on mikrobus_header.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-17 15:37:20 -04:00
Johan Hedberg
6517bab502 doc: migration-guide-4.0: Add a note about updated HCI DT properties
Add a note for the updated bt-hci-quirks and bt-hci-bus DT properties.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-10-17 15:36:49 -04:00
Johan Hedberg
a20f842728 Bluetooth: HCI: Use lower-case values for bus and quirks in devicetree
It's more common (and more readable) convention to use lower-case
names for string-based device tree property values. Convert the HCI bus
and quirks to follow this convention. Also take advantage of the
recently added support for string-array enums to enforce that the
correct values are used.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-10-17 15:36:49 -04:00
Erwan Gouriou
5ca4624f01 boards: st: nucleo_wba55cg: Fix west debug
To enable breakpoints on this board, remove the `dgdb_memory_map disable`,
which is a leftover from early development steps.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-10-17 15:36:31 -04:00
Nithin Ramesh Myliattil
40a8870c2e bluetooth: BAS: update helper text indentation of BAS Kconfig
Fix the indentation issue of BAS KConfig

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-10-17 15:35:58 -04:00
Daniel Leung
2bfc2a3cc5 manifests: update SOF to v2.11
This updates the SHA for SOF to their v2.11 release.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-17 16:54:33 +02:00
Benjamin Cabé
239f4308be doc: boards: extensions: board catalog is only available in HTML
Although boards/index.rst is not included in the PDF toc, it seems as if
Sphinx tries to build the page anyway, which fails because the board
catalog directive is not outputting any node on non-HTML builders.

This commit fixes it by returning a "Board catalog is only available in
HTML." paragraph. In the future, we might want to output some kind of
static table or bullet list for non-HTML builders.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-17 10:49:57 -04:00
Guennadi Liakhovetski
18419b618f llext: xtensa: fix relocations with multiple SLOT0_OP
Support for R_XTENSA_SLOT0_OP was implemented with a relocation table
test case, containing only one entry at offset 0. For multiple
entries .r_addend has to be taken into account.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-10-17 10:49:50 -04:00
Benjamin Lemouzy
b7d8f105e7 tests: boot: fix retention area address
Fix retainedmem address to not overlap sram0.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-10-17 10:49:41 -04:00
Benjamin Lemouzy
cbe642bc60 samples: mgmt: mcumgr: smp_svr: fix retention area address
Fix retainedmem address to not overlap sram0.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-10-17 10:49:41 -04:00
Benjamin Lemouzy
6203261ea8 doc: retention: fix retention area address
Fix retainedmem address to not overlap sram0.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-10-17 10:49:41 -04:00
Mathieu Choplain
454efc2338 boards: st: nucleo_wb05kz: add SPI and I2C
Add I2C and SPI configuration to board DTS and mark as supported in YAML.
Also add support for arduino_i2c and arduino_spi.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-17 10:49:34 -04:00
Mathieu Choplain
7d3fb11989 boards: st: nucleo_wb09ke: add SPI and I2C
Add I2C and SPI configuration to board DTS and mark as supported in YAML.
Also add support for arduino_i2c and arduino_spi.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-17 10:49:34 -04:00
Mathieu Choplain
a6ffdd3e47 dts: arm: st: wb0: add I2C and SPI nodes
Add I2C and SPI Device Tree nodes in SoC DTSI files to allow usage of these
peripherals.

Note that the SPI driver requires no modification to be functional on WB0.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-17 10:49:34 -04:00
Mathieu Choplain
6fd1a19868 drivers: i2c: stm32: add support for STM32WB0
Select COMBINED_INTERRUPT mode of operation for STM32WB0 to match the
hardware and allow the driver to build - no other modification required.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-17 10:49:34 -04:00
Andrej Butok
36707c1bd4 soc: nxp: k6x: disable on reset NMI and EzPort
- Disables on reset NMI and EzPort.
- Fixes frdm-k64 SW3 user button on reset issue.
  So it can be assigned to the mcuboot-button0 alias.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-17 10:49:26 -04:00
Robert Lubos
6545f5148f net: lwm2m: Make CoAP pendings/replies arrays access thread safe
Make sure LwM2M context mutex is locked whenever accessing CoAP
pendings/replies arrays.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-17 10:49:19 -04:00
Robert Lubos
4a4e4ec7d0 net: lwm2m: Make LwM2M context lists access thread safe
System lists are not thread safe, therefore all accesses should be
protected with a mutex. Introduce a LwM2M context specific mutex,
and use it whenever lists defined per-context are acessed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-17 10:49:19 -04:00
Robert Lubos
85c5cd4c6a net: lwm2m: Make CoAP block contetx allocation thread safe
Use global engine mutex to protect allocation/deallocation of the CoAP
block contexts.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-17 10:49:19 -04:00
Robert Lubos
b8751c669b net: lwm2m: Make LwM2M message allocation thread safe
The LwM2M message allocation was not thread safe, i. e. the message was
acquired by setting the ctx pointer, and it was freed by clearing the
entire message structure.

If preemptive threads were enabled, and memset() clearing the message
content was preempted, the message structure being currently zeroed
migh've been allocated and initialized by some other thread. If the
thread releasing the message resumed work, it would continue clearing
the freshly allocated and initialized message structure.

In order to prevent this, introduce a new global mutex for the lwm2m
engine global variables. The mutex is used when LwM2M message is
allocated/deallocated. This will prevent reallocating the message
during the release process.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-17 10:49:19 -04:00
Pieter De Gendt
95195b5574 scripts: ci: check_compliance: Add text encoding check
Add a check for text files to make sure these are encoded in ascii
or utf-8.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-17 10:49:08 -04:00
Han Wu
8f3fdc9731 board: pandora_stm32l475: fix flash write command for w25q128jv
w25q128jv only supports quad input page program instruction 0x32 (PP_1_1_4)

Signed-off-by: Han Wu <wuhanstudios@gmail.com>
2024-10-17 10:48:55 -04:00
Chaitanya Tata
734fc58b62 manifest: hostap: Pull fix for WPA3 connection
Fixes WPA3 connection regression.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 10:48:46 -04:00
Chaitanya Tata
be65de0d09 modules: hostap: Fix memory leak of network
In "connect" all networks are removed and  new network is always added,
but in disconnect the network isn't deleted, so, the memory is
unnecessarily held till next connect. This is not exactly a leak, but if
someone profiles using "kernel heap" then this can be construed as a
leak.

Fix this by removing network during the disconnection (for now "all") so
that the memory can be used by someone else.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 10:48:46 -04:00
Laurentiu Mihalcea
1174ea522f dts: xtensa: nxp_imx8: add bus clock for sai1
Add bus clock for `sai1` node.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-17 10:48:38 -04:00
Laurentiu Mihalcea
d3aa170963 drivers: dai: sai: support pm runtime operations
Add support for PM runtime operations.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-17 10:48:38 -04:00
Laurentiu Mihalcea
3fbb7f4403 clock_control: mcux_ccm: add sai clocks
Add support for gating/ungating SAI clocks for imx8qm and
imx8qxp.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-17 10:48:38 -04:00
Krzysztof Chruściński
60d8482348 logging: log_cmds: Enable log commands for shell with the logging frontend
When shell is integrated with the logging frontend then pointer to
the logging backend in the shell structure is null. When null pointer
is found assume that it is a shell instance with logging frontend
integration and use frontend in the logging commands.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
6253c0678e soc: nordic: nrf54h: cpuapp: Don't use serial shell when ETR is used
ETR handler (for Coresight STM logging) is using console UART and
can act as the shell backend. When that happens default serial shell
backend shall be disabled (and it is by default enabled if there is
a zephyr,console chosen set.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
7ea87f4de9 drivers: misc: coresight: nrf_etr: Add support for shell
Extend ETR handler to be able to work as shell backend and multiplex
Coresight STM logging with shell content on the UART used by the
ETR handler. Shell backend works only in the standalone mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
fe6c288b1b drivers: misc: coresight: nrf_etr: Use dmm API for the buffer declaration
Use DMM_MEMORY_SECTION instead of a custom macro. When file was created
dmm was not present yet.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
74746760fe shell: Extract shell creation from SHELL_DEFINE
Extract shell instance creation from SHELL_DEFINE to Z_SHELL_DEFINE.
SHELL_DEFINE creates logging backend and calls Z_SHELL_DEFINE to
create a shell instance with that logging backend. With this split
it is possible to create a shell instance with logging integration
but without the default shell logging backend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Krzysztof Chruściński
05dd68a377 shell: Allow custom shell log backend implementation
Shell is capable of acting as the logging backend and multiplex
logging messages with shell content. It expects that logging
messages goes through the logging backend. However, there is an
option that logs go only to the custom logging frontend. In
that case this default approach does not work and logging
frontend cannot be easily integrated with the shell (due to
its custom nature). Add Kconfig option SHELL_LOG_BACKEND_OOB
which prevent compilation of the default shell log backend.
When enabled, application can provide frontend specific
implementation to integrate shell with the logging.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Mirko Becker
4d4938fa2e sensor: fix assertion
With rtio_sqe_prep_read() buf is assigned to userdata. The __ASSERT
should check if the same userdata arrived with rtio_cqe_consume_block()$

Signed-off-by: Mirko Becker <mirko.becker@phoenixcontact.com>
2024-10-17 10:48:15 -04:00
Yong Cong Sin
b9df2bed64 drivers: uart: ns16550: add support for Synopsys DesignWare 8250
Extended functionality of the current driver to support
Synopsys DesignWare 8250 UART.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
Yong Cong Sin
b0a872c908 drivers: uart: ns16550: refactor read into a function
Refactor the char read into a function, check for availability
before reading.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
Yong Cong Sin
1d571fff4c drivers: serial: ns16550: rename config to uart_ns16550_dev_config
Rename `uart_ns16550_device_config` to `uart_ns16550_dev_config` so
that it looks consistent with the device data structure.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-17 10:48:02 -04:00
Krzysztof Chruściński
1f96e62397 drivers: serial: nrfx_uarte: Add support for frame timeout
Frame timeout is a hardware feature present in newer versions
of UARTE (e.g. in NRF54X platforms) for detecting idle state
on RX line and ending RX after configurable timeout.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Krzysztof Chruściński
399a235653 drivers: serial: nrfx_uarte: Rework driver to support new features
Rework driver to support new way of asynchronous RX handling.
Previously RX was handled in two modes: using RXDRDY interrupt for byte
counting or TIMER + PPI. Both modes had flaws. RXDRDY interrupt mode
could miscalculated amount of received bytes when interrupt was not
handled on time. Data was not lost but was not reported on time that
could lead to issues. PPI+TIMER mode requires additional resources
thus it was not the default mode. Often user was not aware of that
option and was expiriencing driver RX faults.

New RX mode is switching buffers when there is new data (RXDRDY event
not set for given amount of time). It does not require additional
resources to get precise byte counting. Additionally, this is in line
with new UARTE feature (RX frame timeout) which is present in nRF54X
devices. The behavior of the driver is the same for legacy devices
and new one. For legacy devices k_timer periodic interrupts are used
to check if there are any new bytes and it is not needed when RX frame
timeout is present.

Improved RX mode is enabled by default
(CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) but legacy modes are still
available though not recommended to be used.

Note that new RX mode (CONFIG_UART_NRFX_UARTE_ENHANCED_RX=y) behaves
a bit different because timeout always triggers switch of buffers
which means that there will be no UART_RX_RDY events with non-zero
offset. It also means that every UART_RX_RDY will be followed by
UART_RX_BUF_RELEASED.

After rework, driver is recommended to be used for all platforms as it
performs much better and takes much less code than the second UART shim
available for Nordic devices.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Krzysztof Chruściński
d82808ea9b drivers: serial: nrfx_uarte: Refactor to use RX async struct pointer
Refactor RX asynchronous API function to use a pointer to the RX
async data structure instead of top level data structure pointer.
It improves readability with more concise code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:47:32 -04:00
Hake Huang
96aef721eb boards: da14695_dk_usb: remove the arduino_gpio support
da14695_dk_usb use mikro-bus interface not arduino

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
d323137a6c boards: lpcxpresso55s69: add arduino_gpio support
add arduino_gpio support to lpcxpresso55s69

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
bdc15f10e1 boards: lpcxpresso55s28: add arduino_gpio support
add arduino_apio support to lpcxpresso55s28

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
2850841106 test: gpio: gpio_basic_api: enhance the gpio test
1. add delay read config for platforms that has capacitor with pin
2. add dts pin flags to gpio_pin_config when output.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
43425014c6 tests: gpio: gpio_basic_api split input and ouput
input and output shall be split and configure by dts

fixes: #78381

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
999e31e26f tests: gpio: gpio_basic_api: update customerized board list
update boards that can not use the common pins
mimxrt102x reuse with ethernet
mimxrt106x has external pull up
lpcxpresso55s3x reuse with int

add CONFIG_SKIP_PULL_TEST by default to be more general
user can enable this test in customized case with select pin

ST prefer to using D9 D10 pair to testing.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Hake Huang
2d0e6d7fbe boards: lpcxpresso55s36 : add arduino_gpio
add arduino_gpio in support list

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2024-10-17 10:47:22 -04:00
Lukas Gehreke
4c0317fa47 drivers: usb_dc_rpi_pico: Implemented vbus detection handling
As per USB 2.0 specification 7.1.5.1: The voltage source on the pull-up
resistor must be derived from or controlled by the power supplied on the
USB cable such that when VBUS is removed, the pull-up resistor does not
supply current on the data line to which it is attached.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-10-17 10:47:15 -04:00
Dmitrii Golovanov
e528d53a7a ci: footprint: Add data transform and upload to ELK
Extend `footprint-tracking` CI workflow with two more steps:

 * pack Memory Footprint data produced by `track.py` script
   into Twister JSON footprint reports (`twister-footprint.json).

 * upload Twister JSON footprint reports into ElasticSearch storage.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-17 10:47:01 -04:00
Daniel DeGrasse
99368df6a8 samples: tracing: add usage example for sys_trace_user_event
Add usage example for sys_trace_user_event, to demonstrate how users
could add tracing functionality to their application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Daniel DeGrasse
87180f40ac doc: services: document sys_trace_user_event
Document availability of sys_trace_user_event, for users who are trying
to add custom trace events to their application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Daniel DeGrasse
66577a9d23 tracing: add named event trace
Add support for a "named event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Anas Nashif
6f937c9cea Revert "tests: posix: net: fix missing clock_t and clockid_t with newlib"
This reverts commit 45b3010d74.

Issue introduced in #79884.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-17 06:51:02 -04:00
Daniel Kampert
9d0486e3ee drivers: sensor: Add support for Broadcom APDS-9306
- Add Broadcom / Avago APDS-9306 ambient light sensor driver

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-10-17 09:46:53 +02:00
Jordan Yates
5d3d78e9cb sensor: bmm150: support power domains
Support the BMM150 being on a power domain, which may not be powered at
boot. For example, Nordic Thingy53.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:46 +02:00
Juliane Schulze
38ee9aa17b vcnl36825t: additional delay after wakeup on "force"-mode
There is an (undocumented) additional delay necessary if the device woke
up and a measurement is triggered via the "force"-mode. The additional
sleep time was determined empirically on different devices.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-10-17 09:46:38 +02:00
Krystof Sadlik
3978693d47 samples: sensor: added general samples for triggers
Added samples that show off trigger functionality, removed fxos8700 driver
specific sample

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-10-17 09:46:32 +02:00
Jordan Yates
5eb5f3d6a5 sensor: bme280: only configure mode on PM suspend/resume
Update power management to only start/stop periodic measurements in
`CONFIG_BME280_MODE_NORMAL`, instead of re-initialising the chip
completely.

In `CONFIG_BME280_MODE_FORCED`, there is nothing to do when suspending,
as the sensor is already in its lowest power mode.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Jordan Yates
ecfb4c7628 sensor: bme280: check status before sleeping
Check the status register immediately, instead of waiting 3ms for the
first check.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Jordan Yates
22c2fe52dc sensor: bme280: name for mode choice
Add a name for the mode choice symbol to enable other Kconfig files
to change the default.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-17 09:46:24 +02:00
Lukasz Mrugala
82548410bd scripts: twister: NOTRUN status
Adds a new NOTRUN status, which indicates
that a test was successfully built, but
not run on account of being not
runnable in given test instance.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-10-17 09:46:17 +02:00
Niklas Gürtler
50dbd8ba5a modem_cellular: Add support for the Telit ME310G1 LTE modem
Add support for the Telit ME310G1 LTE modem which is very similar to
the ME910G1. Re-use the ME910G1's AT command scripts but rename
them to mex10_xx and define a shutdown script (AT#SHDN).

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Niklas Gürtler
bfeb8c807a dts: bindings: Add binding for Telit ME310G1
Add a DTS binding file for Telit ME310G1 cellular modem based
on the binding for ME910G1 but without the mdm-reset-gpios as
the ME310 doesn't have a reset input.

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Niklas Gürtler
93330b07f2 modem_cellular: Add support to define a shutdown script for cellular modems
Add support to define a shutdown script for cellular modems, i.e.
AT commands to shutdown the modem. This allows to shutdown the
modem much quicker compared to using a power pulse which saves power.

Signed-off-by: Niklas Gürtler <niklas.guertler@e-obs.de>
2024-10-17 09:46:09 +02:00
Rex Chen
193023b075 net: wifi: shell: update enterprise mode certificate files
Update enterprise mode certificate files to support phase1 and
phase2.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-17 09:46:02 +02:00
Rex Chen
be151908d8 net: wifi: shell: add enterprise support for station
Add EAP-TLS, EAP-PEAP-MSCHAPv2, EAP-PEAP-GTC, EAP-TTLS-MSCHAPv2,
EAP-PEAP-TLS, EAP-TLS-SHA256  enterprise wpa2 and wpa3 suiteb
support for station.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-17 09:46:02 +02:00
Reto Schneider
7dbcf65562 tests: drivers: dma: Enable for board sgrm
This allows to run the test 'chan_blen_transfer' and 'loop_transfer' on
the sgrm board.

The functionality tested in `chan_link_transfer` and `scatter_gather` is
not (yet) supported by the Si32 DMA driver, and those tests therefore
not enabled.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-17 09:45:54 +02:00
Reto Schneider
6c78a776a5 MAINTAINERS: Add Gardena maintainer and collaborators
Adding myself as maintainer because my employer Husqvarna wants to
upstream the Gardena smart gateway radio module SoM to Zephyr, and keep
it well-supported.

Adding as collaborator M1cha, because he did the initial port.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-17 09:45:54 +02:00
Michael Zimmermann
bd4212e458 boards: gardena: Add smart garden radio module
This adds support for the SiM3U/Si4467 based SoM used on the GARDENA
smart Gateway [1] (art. no 19000 and 19005).

[1] https://github.com/husqvarnagroup/smart-garden-gateway-public

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-10-17 09:45:54 +02:00
Yassine El Aissaoui
9cc3364d3c boards: frdm_mcxw71: Add BLE info to doc + Enable second UART instance
- Add second UART needed for bt_tester app.
- Update doc with BLE info

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Yassine El Aissaoui
ad8b62413d soc: MCXW71: Add BLE support
- Add IMU regions
- Add HCI definition
- Add config when BT is enabled

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Yassine El Aissaoui
89709ee382 drivers: hci: Update NXP HCI driver
Add updates to support MCXW71
Add support if RX data are received in ISR context
Add support to set BT address using Vendor command

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Chaitanya Tata
9eedb6d7c8 drivers: nrfwifi: Fix build error
This crept-in due to bad merge conflict resolution.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
c08b846b47 samples: net: wifi: Enable nRF70 Util in nRF70 build
This ensures we catch basic issues in nRF70 util, which is handy in
debugging.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
cd736558ef drivers: nrfwifi: Fix build errors when Util is enabled
This path is disabled by default.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida
0ce5da6da8 wifi_mgmt: Add support for configuring PS exit strategy
If AP indicates the presence of buffered traffic, then it is up to the
STA to decide whether to stay in PS or come out of PS, add configuration
options that can be used at runtime to choose this.

This is tagged as "noup" because it's a backport and "fromlist" cannot
be used as it won't apply cleanly.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
d30161cd8b drivers: wifi: Fix mutex re-initialization
The mutex is used to protect RPU zephyr context which gets modified for
every interface down and up (including recovery), so, it was being
re-initialized but also used to protect down and up which is a bug.

Move the re-initialization to the driver entry so that it happens only
once and we can properly use the mutext for down and up protection.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ce9d71c476 drivers: wifi: Fix missing unlock for stats
The RPU context lock is not unlocked this is causing recovery to be
stuck waiting for the lock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
67216f1b5a drivers: wifi: Fix crash when recovery is triggered
There is a race condition when recovery is in progress and in parallel
Wi-Fi util commands are being executed (CTF), where the RPU context is
de-initialized as part of recovery but no checks are present in the
Wi-Fi util command processing causing a crash.

This needs a proper fix for all commands, but for maintenance branch
fix is added only for commonly used commands.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida
fe920fc9c9 drivers: wifi: Add PS exit strategy runtime configuration
Dynamically set power save exit strategy runtime configuration that
allows to switch b/w stratgies depending on conserving power and
low-latency traffic download.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
d0d659b675 drivers: wifi: Use mutex for spinlock
Ideally we should be using Zephyr spinlock APIs but that requires
changes to shim API, so, for this maintenance release just replace with
mutex to keep the context same and no API changes.

This solves the locking issue that we see when control and data path are
excited concurrently due to locking semantics of semaphores, the issue
is not root caused but mutex enforce strict locking semantics for
multiple threads and solve the issue.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
5f6dca377a drivers: wifi: Fix shell hang
Add a null check for HAL context in the interrupt handler, this was
causing locking issue operating on null. The root cause of null is not
known, but this solves the locking issue when data and control paths are
excited in parallel.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
7c3d342796 drivers: wifi: Add support for keepalive
To handle interoperability issue with few APs, add a feature to keep
sending keepalive frames periodically to avoid AP disconnecting the STA.

This is disabled by default to avoid unnecessary power consumption as
it's only seen with few old APs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
94f9fb95d9 drivers: wifi: Increase default PS active timeout interval
In crowded environments RPU is active for more than 10s due to too many
retries and this triggers a false RPU recovery. To avoid this, increase
the default to 50s to handle corner cases, as this will only impact the
recovery triggered case, higher timeout doesn't have any impact in
normal cases.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
dbda09d3e5 drivers: wifi: Enable management buffers offload
With this offload, host doesn't need to manage RX buffers for management
frames, and this saves Host-RPU comms and thus giving RPU to sleep more
often and is essential to test RPU recovery.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
a4537a7eea drivers: wifi: Add PS state debugs
These are very frequent, so, a separate debug is added for debugging
host RPU recovery logic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
9c36d97646 drivers: wifi: Fix TX buffers leak
During interface down in case TX has pending buffers in either TXQ or
Pending_Q then they are not freed instead the Q itself is freed.

Fix by traversing the Q and freeing all members.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
5c8f1807c1 drivers: wifi: Fix RPU recovery disabled build failures
Fix RPU recovery protection to solve build failures when RPU recovery is
disabled.

As recovery is primarily based on power-management, add a Kconfig
dependency to enforce, this simplies the macros to protect the code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
9b105698ed drivers: wifi: Add RPU recovery retry mechanism
In case RPU is stuck in consecutive recovery over a time period then
that means it's not recoverable through RPU recovery, only thing left to
do is to trigger a system reboot. This feature is disabled by default,
so, either application can do their own implementatio or enable this
feature in the driver along with configurable retries and window period.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
6f7fbf8451 drivers: wifi: Fix the NULL check
Check for RPU context as well.

To fix this properly we need more fixes to be backported, but this
should suffice for now.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ed7c10ead3 drivers: wifi: Add quiet period for RPU recovery
This is to avoid successive recoveries in case we get successive
watchdog interrupts from the RPU.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
ce521b89ee drivers: wifi: Ignore parallel recovery requests
During recovery we might get further watchdog interrupts causing
multiple recovery requests, ignore them if a recovery is already in
progress.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
c1afe97e94 drivers: wifi: Increase the propogation delay
In order for the interface down to propagate and cleanup it needs more
time, using Shell 10ms was working due to human delay, but
programatically this needs higher delay.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
1e5db78afc drivers: wifi: Add support for separate debugs for RPU recovery
These are helpful for debugging RPU recovery only.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
a23184c473 drivers: wifi: Add a sanity check for RPU comms
Before proceeding with RPU bringup, do a sanity check by reading a known
signature to make sure the Host-RPU comms are operational.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
04ddd6d2b0 drivers: wifi: nrf700x: Ignore all failures in iface down
In case RPU is stuck and need a recovery, the failures in interface down
should be ignored as they are expected and we should proceed with device
removal that in turn removes power to the RPU.

TODO: This works for single VIF, but needs more thought for multi-VIF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata
5ad7339311 drivers: wifi: Fix RPU recovery not being triggered
During watchdog (or any) interrupt processing, RPU accesses are being
made and they assert the wakeup_now flag this causes RPU recovery to not
trigger.

New false or true recovery detection algo:

 Check the time difference b/w last de-assert and assert, and if it
 exceeds minimum time needed for RPU to enter sleep, then not the
 timestamp. This timestamp will be used to compare when a watchdog
 interrupt is received and see if during the last window if host has
 given a chance for RPU to attempt sleep, if yes, then attempt recovery
 else ignore watchdog.

Also, add a Kconfig for the 10s active time that triggers recovery, this
needs to be passed to the FW (once we have enough patch memory).

Also, add a Kconfig for the minimum time needed for RPU to attempt sleep
in positive case.

Also, add a new _ms API for time stamp fetch, this is to avoid
precision loss when converting to and from ms to us and also makes code
readable by avoiding *1000 and /1000.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Andrej Butok
e53eec0851 yaml: use EXTRA_CONF_FILE in .yaml files
Use EXTRA_CONF_FILE in sample yaml files,
that replaced deprecated OVERLAY_CONFIG
since the Zephyr v3.4 release.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-17 09:45:25 +02:00
Sylvio Alves
59f0418d2e soc: esp32: unify runtime heap usage
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.

Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.

Such changes are described below:

1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.

Fixes #79490
Fixes #79470

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Sylvio Alves
882ac1d088 drivers: esp32: wifi/bt: modify init call return error
Update both Wi-FI and BLE init codes to return proper
error code and logging when it is missing heap.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Valerio Setti
5e225e0c8b tinycrypt: deprecate the library
Since we now have PSA Crypto APIs/Mbed TLS alternatives for crypto
operations in all Zephyr's codebase we can start the deprecation
of the TinyCrypt libary (as planned from #43712).
This commit is only the inital step: updates documentation and
add the DEPRECATED Kconfig option to the TINYCRYPT one.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-17 09:44:53 +02:00
Tom Chang
cbb322937f drivers: espi: npcx: support espi taf rpmc request
This commit adds support for handling espi taf rpmc requests.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-17 09:44:39 +02:00
Ibe Van de Veire
e6dd4cda89 test: net: igmp: Add extra IGMPv3 testcase
Added extra testcases for the IGMPv3 protocol. The IGMP driver is
supposed to send an IGMPv3 report when joining a group.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
ba9eca3181 net: ip: igmp: Add igmp.h for definitions
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
c646dd37e5 net: ip: igmp: Remove too strict length check
According to RFC2236 section 2.5, the IGMP message may be longer then 8
bytes. The rest of the bytes should be ignored.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire
f852c12360 net: ip: igmp: Fix wrong header length
The header length of the net ip packet was calculated using only the
net_pkt_ip_hdr_len function. The correct header length should be
calculated by adding net_pkt_ip_hdr_len and net_pkt_ipv4_opts_len. This
resulted in an incorrect IGMP version type in case of IGMPv2 message
(when IGMPv3 was enabled). The IGMP message was not parsed correctly and
therefore dropped.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Marcio Ribeiro
3c82cd6585 openocd: esp32: gdb init command update
flushregs alias is deprecated, so it was replaced by the command:
"maintenance flush register-cache"

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-17 09:44:26 +02:00
Dominik Ermel
3e8ea52e21 tests/flash/common: Increase ztest stack size
The commit sets CONFIG_ZTEST_STACK_SIZE to 4096.

Fixes #79801

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-17 09:43:40 +02:00
Jukka Rissanen
8134673309 tracing: segger-sysview: Fix compilation issues with networking
The networking tracing function definitions were missing for sysview.

Fixes #79805

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 09:43:33 +02:00
Fabio Baltieri
b23fea114d input: gpio_keys: add a no-disconnect property
Add a no-disconnect property that skips the call to disconnect the pin
during suspend, this is useful as not all gpio controllers supports pin
disconnection, and right now using the gpio-keys driver on one of those
results in a failed initialization if PM runtime is enabled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-17 09:43:25 +02:00
Pieter De Gendt
ca3dc019b7 scripts: Read yaml files using utf-8 encoding
By default Windows does not use utf-8 encoding for reading files,
set is explicitly.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-17 09:43:16 +02:00
Fengming Ye
9e8b7bd3ad modules: hostap: fix DPP build error
Fix DPP build error when HOSTAPD enabled and DPP disabled.
Guard hapd_dpp_dispatch in both CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
and CONFIG_WIFI_NM_HOSTAPD_AP.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-17 09:43:08 +02:00
Maochen Wang
4af697ad6b net: l2: wifi: fix AP sets band failed with channel 0
Should support setting band for both STA and SAP mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-17 09:42:59 +02:00
Phi Bang Nguyen
829c03bcdc runners: jlink: Fix NoneType object error
The commit 221199e15b presents a bug that
makes west flash failed with error.

AttributeError: 'NoneType' object has no attribute 'startswith'

In function is_tunnel(), tunnel may contain None and has no attribute
"startswith". Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-16 20:53:31 +01:00
Aleksander Strzebonski
18fb3f9a32 usb: dwc2: Allow for enabling USB if the cable is disconnected
Adds CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT_MS that allows
for waiting for a USBHS VBUS ready event for a specified
amount of time. Earlier it waited forever and because of that,
the udc_enable() was blocked forever if the USB cable was
disconnected. Now the function returns error on timeout.

Signed-off-by: Aleksander Strzebonski <aleksander.strzebonski@nordicsemi.no>
2024-10-16 16:37:31 +01:00
Jamie McCrae
ef45434690 boards: nxp: imx8mp_evk: doc: Remove stray PINCTRL reference
Removes a reference to PINCTRL in a defconfig file, which has
been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
b5b335ef6e tests: drivers: build_all: eeprom: Add nrf9131ek Kconfig fragment
Adds a Kconfig fragment which changes the MFD init priority

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
3e8b769577 boards: ruuvi: ruuvitag: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
fb62ac0220 boards: vcc-gnd: yd_stm32h750vb: Remove PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
6ec63d4424 boards: ezurio: rm1xx_dvk: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae
84976a2ce7 boards: nordic: Remove setting PINCTRL in defconfig files
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Andrzej Głąbek
edc4f75b61 soc: nordic: Fix the way of enabling clock control for nRF54H Series
This is a follow-up to commit 7a2ce2882a.

Do not enable clock control by default on nRF54H Series SoCs when
the system timer is present, because clock control is not needed
for this purpose there.

Add missing `default y` in the CLOCK_CONTROL_NRF2 Kconfig option that
enables compilation of clock control drivers for nRF54H Series.
This way modules that actually require clock control (like drivers
that use radio) will be able to enable it using the generic option
(CLOCK_CONTROL), not the above one that is specific for nRF54H.

Update accordingly applications that referenced the CLOCK_CONTROL_NRF2
option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-10-16 16:36:51 +01:00
Ayush Singh
3f0476d773 boards: beagle: beagleplay_cc1352p7: Fix twister
- Add UART console config.
- Fixes tests/subsys/llext/simple/llext.simple.readonly_mpu

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-16 16:36:34 +01:00
Ayush Singh
e596143dc7 boards: beagle: beagleplay_cc1352p7: Disable 2.4g ieee802154
- A lot of zephyr networking samples (zperf, http_server, etc) will
  complain if both 2.4g and subg ieee802154 are enabled simultaneously.
- This leads to a lot of new people getting confused with the network code
  not working without any clear errors.
- As we already set the alias `zephyr,ieee802154 = &ieee802154g`, I think
  it would be best to enable only subg by default.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-16 16:36:34 +01:00
Bruce Rosier
24414e3c39 subsystem: tracing: test: fix k_pipe_put_* functions
k_pipe_put_* functions should take const void* data
    instead of void* data. This can lead to warnings at the
    the -Werror=discarded-qualifiers compiler flag, because the
    the input will be const void* and the parameter will be void*.
    Fix it by replacing void* data with “const void* data”.

Signed-off-by: Bruce Rosier <brucerosier9@gmail.com>
2024-10-16 16:36:11 +01:00
Szymon Janc
5b232bf1d7 Bluetooth: GATT: Allow to tune writable device appearance permissions
This allows to select if device appearance requires encryption or
authentication or none. This makes it similar to what is implemented
for device name characteristic.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-16 16:35:56 +01:00
Szymon Janc
398487f841 Bluetooth: GATT: Convert writable device name to KConfig choice
This makes it clear on how security requirements are set and avoid
confusion on how encryption and authentication are handled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-16 16:35:56 +01:00
alperen sener
a5010504bc tests: bluetooth: tester: Add nrf54l15dk and remove nrf54l15pdk
Rename the config files according to nrf54l15dk.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-10-16 16:35:32 +01:00
Bjarki Arge Andreasen
0f6a35c363 manifest: hal_nordic: include lpcomp-int-dis-on-stop patch
Update hal_nordic manifest to include lpcomp-int-dis-on-stop patch

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-16 16:35:10 +01:00
Benjamin Cabé
9beb82f971 doc: vulnerabilities: use :cve: role to link to CVEs
This is a new role available in Sphinx 8.1 and it very useful to avoid
typos and to provide a consistent way to link to CVEs.
This commit actually fixes some such typos :)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:34:46 +01:00
Benjamin Cabé
e0ee9f1ac6 doc: vulnerabilities: fix typo in JIRA urls
Some JIRA urls had a triple s in "...atlassian..."

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:34:46 +01:00
Krzysztof Chruściński
7b3acdb5c0 dts: common: nordic: nrf54l20: Adjust RAM size to 511k
Last 1k is used for saving VPR context and shall not be exposed.
Limiting RAM to 511k.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-16 16:33:48 +01:00
Benjamin Cabé
dd1f51148b doc: enable three-way dark-mode switch
dark-mode-toggle now allows to also set current mode to "system", which
allows people to use the system-wide dark mode setting rather than
having to definitively choose between light and dark mode once they've
used the button once.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Benjamin Cabé
dbf3c8f5cd doc: fix dark mode "flashing" on page load
This hooks up the dark-mode-toggle-stylesheets-loader so that the dark
mode styles are loaded immediately, rather than waiting for the page to
load and then switching to dark mode. This prevents the "flashing" of
light mode styles on page load.

Fixes #79791

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Benjamin Cabé
7aa6222835 doc: update dark-mode-toggle to 0.16.1
Updates the minified JS resources corresponding to latest
dark-mode-toggle (0.16.1) release.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 16:33:24 +01:00
Chris Friedt
a6a6cc6a63 modules: thrift: use app and library private include paths
Do not export Thrift header paths to the global build.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-16 16:33:05 +01:00
Chris Friedt
45b3010d74 tests: posix: net: fix missing clock_t and clockid_t with newlib
Fix errors found in CI for missing clock_t and clockid_t types
when building the tests/posix/net testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-16 16:32:51 +01:00
TOKITA Hiroshi
8c705cabab tests: drivers: build_all: Add a build_all test for wifi
The test targets the following devices at this time.

- atmel,winc1500
- inventek,eswifi
- inventek,eswifi-uart

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-16 12:27:05 +02:00
TOKITA Hiroshi
3c4789aca3 drivers: wifi: eswifi: Resolve the dependency on RING_BUFFER
`eswifi-uart` uses the ring buffer library, but the dependency is
not indicated.
Specify `select RING_BUFFER` to resolve the dependency.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-16 12:27:05 +02:00
TOKITA Hiroshi
01f4c20fdc drivers: wifi: eswifi: Specify POSIX-2008 to use strnlen()
`_POSIX_C_SOURCE` must be specified to use the `strnlen()` function
in string.h. Make sure to specify this explicitly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-16 12:27:05 +02:00
Marcio Ribeiro
7e7672cb4b bugfix: esp32: allows QIO and QOUT flash modes
Allows QIO and QOUT flash mode to work on:
- esp32s2
- esp32s3
- esp32c2
- esp32c3
- esp32c6

Fixes #73677

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-16 12:26:52 +02:00
Marcio Ribeiro
235243f02b manifest: esp32: update hal_espressif
Update hal to cover latest features and fixes.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-16 12:26:52 +02:00
Christian Gabriel
5c638395ac modules: canopennode: add rxmsg callback
Implement callback for incoming CAN messages for any of the
configured filters for CANopenNode.

This can be used to wake the loop calling CO_process when a
new message was received which needs processing.

Signed-off-by: Christian Gabriel <ch_gabriel@web.de>
2024-10-16 12:26:40 +02:00
Benjamin Cabé
ede954c098 doc: extensions: boards: add search tips admonition
As the search form is becoming richer, provide some guidance on how to
filter the list of supported boards and what to do when no results are
found.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Benjamin Cabé
282a6c5a98 doc: boards: allow filtering by SoC
This introduces the ability to filter boards by soc (family / series /
soc).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Benjamin Cabé
86b72ee6e2 doc: extensions: boards: extract socs information
Store soc(s) information for each board in the catalog, as
well as populate a tree structure for the full list of
family->series->soc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Benjamin Cabé
c5529309f1 doc: extensions: boards: don't guess board full name anymore
Now that we have full_name available in board.yml, stop trying
to "guess" full/commercial name of the board based on its
documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-16 12:26:27 +02:00
Hao Luo
e7a64f74a8 drivers: i2c: add runtime put for error path
The previous error path incorrectly returned without
calling runtime put async

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-10-16 12:26:17 +02:00
Damian Krolik
5d69216cc9 net: openthread: add Kconfig for CSL request time ahead
Add OPENTHREAD_CSL_REQUEST_TIME_AHEAD Kconfig variable.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-10-16 12:26:06 +02:00
Jamie McCrae
9b4f18cb24 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  b9d69dd2a2d6df32da6608d549138288bb7d7aa5

Brings following Zephyr relevant fixes:
  - b9d69dd2 zephyr: print version number before boot
  - 08a71d10 boot: bootutil: swap_scratch: Fix compressed image
    sector size check
  - d69933cd scripts: imgtool: compression ARM thumb filter
  - a5f28c13 bootutil: Add SHA-512 support to Ed25519
  - 601463db bootutil: Add SHA-512 support with mbedTLS
  - f1f557fd zephyr: Fixing Kconfig dependency for SHA512
  - 5c21093a boot: zephyr: use EXTRA_CONF_FILE instead of
    deprecated OVERLAY_CONFIG
  - b233228a samples: zephyr: add sysbuild to the hello-world
    sample
  - a91a6156 boot: zephyr: Fix serial recovery for NXP IMX.RT
    platforms
  - a967c66e boot: zephyr: Fix Warning 'boot_serial_enter defined
    but not used'
  - a5e3d163 zephyr: hello_world: Fix the main() return type
    warning
  - 63fa7e45 scripts: imgtool: compression
  - 30bcd468 bootutil: Add SIG_PURE TLV
  - 8f759f2e boot: Replace boot_encrypt by boot_enc_encrypt and
    boot_enc_decrypt
  - c894d047 imgtool: Add support for calculating SHA512

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 12:25:51 +02:00
Victor Chavez
db4c206d4e zbus: fix extern declaration for cpp
Declaration with const keyword (subscriber, listener,message)
require extern cpp declaration otherwise the name is mangled.

Fixes  https://github.com/zephyrproject-rtos/zephyr/issues/79664

Signed-off-by: Victor Chavez <vchavezb@protonmail.com>
2024-10-16 12:25:40 +02:00
Jordan Yates
0fb63c05d1 tests: random: rng: validate sys_csrand_get availability
Validate that `sys_csrand_get` is available when `TEST_RANDOM_GENERATOR`
is enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-16 10:00:47 +02:00
Jordan Yates
bff97fbc7f random: sys_csrand_get backend for TEST_RANDOM_GENERATOR
When non-random number generation is allowed via
`TEST_RANDOM_GENERATOR`, enable an implementation for `sys_csrand_get`
that stubs out to `sys_rand_get`. This enables libraries that request
CS random numbers to be tested in CI, even if the results are not CS in
that context.

The documentation for `TEST_RANDOM_GENERATOR` is explicit enough about
the dangers of enabling this in production.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-16 10:00:47 +02:00
Yangbo Lu
fdcdc5d3cd boards: nxp: mimxrt1180_evk: update doc and yml for NETC support
Updated doc and yml for NETC support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
fe95141695 boards: nxp: mimxrt1180_evk: add board netc init
Added board netc init for mimxrt1180_evk.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
a168c6283e boards: nxp: mimxrt1180_evk: enable netc support in dts
Enabled netc support in dts.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
ea741a3174 dts: arm: nxp_rt118x_cm33: fix address format
Fix address format to resolve build warning.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
97b02c3249 dts: arm: nxp: nxp_rt118x: add netc node
Added netc node for nxp_rt118x.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
7f4c074114 soc: nxp: imxrt118x: enable and configure M33 MPU
Enabled and configured M33 MPU.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
4d248fda87 soc: nxp: imxrt118x: add NonCacheable section for M33 linker
The NonCacheable section is required by HAL driver.
Added it with using DTCM.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
f83a695f25 soc: nxp: imxrt118x: add NETC clock init support
Added NETC clock init support.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
8f99767dd3 soc: nxp: imxrt: increase system workqueue stack for NETC
Increased system workqueue stack for NETC to use.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
a79b65facd modules: hal_nxp: enable NETC cache control in default
Enabled NETC cache control in default.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
6a8cdf42b5 drivers: clock_control_mcux_ccm_rev2: add NETC clock support
Added NETC clock support for clock_control_mcux_ccm_rev2.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
553079350c drivers: ethernet: add NXP i.MX NETC driver
Added NXP i.MX NETC driver based on NXP MCUX SDK driver APIs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Yangbo Lu
4986809581 drivers: mdio: add NXP i.MX NETC MDIO driver
Added NXP i.MX NETC MDIO driver based on NXP MCUX SDK driver APIs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Kristoffer Rist Skøien
c73c5d985e shell: Added assert
Assert to check columns. Averts a potential divide by zero

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2024-10-16 10:00:17 +02:00
Armin Kessler
9564a3b431 drivers: video: esp32s3: Add set_signal video api function
This PR implements the set_signal callback from the video API.
A signal registered on VIDEO_EP_OUT raises once a new image has
been received completely.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-10-16 10:00:01 +02:00
Lyle Zhu
0e4561bed2 Bluetooth: SSP: No MITM if required level is less than L3
Regardless IO capabilities, clear MITM flag for pairing
initiator if the required security level is less than
BT_SECURITY_L3.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-16 09:59:38 +02:00
Lothar Felten
a427497f03 documentation: lilygo: fix formatting for LoRa32 and T8-C3
Fix the formatting of the doc/index.rst for Lilygo LoRa32 and T8-C3
Requested by nordicjm

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-10-16 09:59:26 +02:00
Nikodem Kastelik
e31598233d samples: drivers: adc: add support for internal nRF54L SAADC inputs
SAADC peripheral for nRF54L Series allows to choose internal
voltages as positive inputs and samples shall showcase that.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Nikodem Kastelik
ece7da5947 drivers: adc: nrf: add support for nrf54l internal SAADC inputs
SAADC peripheral for nRF54L Series allows to choose internal
voltages as positive inputs.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Nikodem Kastelik
d494769948 dts: nordic: refactor bindings helper symbols for SAADC
Split header files containing symbols denoting SAADC inputs
so that only supported inputs can be used for given device.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Kiara Navarro
41f749ce8b lorawan: unify logging level
All the remaining modules uses LOG_MODULE_REGISTER(<module>, <log level>)

Lets update the logging registration as the other modules are doing it.

Signed-off-by: Kiara Navarro <sophiekovalevsky@fedoraproject.org>
2024-10-16 09:59:01 +02:00
Sylvio Alves
5a205518a6 tests: drivers: counter: fix no_alarm use case
In the test scenario without alarms, it might
be the case that counter is already running and
it will not match the expected tick.
This adds a tick offset into the expected value
based on current counter reading.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-16 09:58:47 +02:00
Sylvio Alves
7668a4d27e drivers: counter: esp32: force capture to read value
Force capture call so that timer counter value is updated
accordingly.

This also adds get_value_64 counter API function.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-16 09:58:47 +02:00
Lingao Meng
537d215981 Bluetooth: Mesh: Fixes after proxy advertising unable to send messages
When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after https://github.com/zephyrproject-rtos/zephyr/pull/68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-10-16 09:58:33 +02:00
Arnaud Pouliquen
6e75926b9d maintainers: move arnopo from maintainer to collaborator of IPC
Move myself from maintainer to collaborator.
I am not active enough on Zephyr to take on the role of maintainer.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-16 09:58:24 +02:00
Neil Chen
0fa766c8ea tests: drivers/regulator/voltage: Add regulator test for NXP frdm_mcxn236
Support regulator(vref) output vt oltage test for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
a6b414d46b tests: drivers/adc/adc_api: Support adc api test for NXP frdm_mcxn236
Support adc api test for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
2c6f993098 samples: drivers/adc: Support adc example for NXP frdm_mcxn236
Support adc example for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
0ffe2f0006 boards: nxp/frdm_mcxn236: Support lpadc for NXP frdm_mcxn236
Support lpadc for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
078580e791 boards: nxp/frdm_mcxn236: Support vref for NXP frdm_mcxn236
Support vref for NXP frdm_mcxn236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
38dab1219b dts: arm/nxp/mcxn23x: Add lpadc nodes for NXP mcxn23x
Add lpadc nodes for NXP mcxn23x

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Neil Chen
5fbaf22fb3 dts: arm/nxp/mcxn23x: Add vref node for NXP MCXN23x
Add the vref node for NXP MCXN23x

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-10-16 09:57:49 +02:00
Chaitanya Tata
cb1ea80c02 drivers: nrfwifi: Add provision to handle FW blobs externally
The FW blobs are contentious topic in OSS, so, add a provision to use
external tooling (e.g., NCS) to handle FW blobs for advanced usecases
(e.g., storing in external flash).

This won't be used upstream, only built-in or build-only are supported.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-16 09:57:39 +02:00
Chang Feng
2e93bcf2d7 driver: serial: gd32: add irq_update
Add missing api irq_update for gd32.

Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2024-10-16 09:57:05 +02:00
JP Hutchins
c81e36091d doc: mcumgr: Add smp and smpclient
The smp library implements de/serialization of SMP messages.
The smpclient library implements the serial, BLE, and UDP
transport layers for Windows, Linux, and macOS.

Signed-off-by: JP Hutchins <jp@intercreate.io>
2024-10-16 09:56:52 +02:00
Lingao Meng
664c087d55 Bluetooth: Mesh: Refine Mesh store logic
Move flag&handler to structure, not only save some flash size
but also make code more readable.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-10-16 09:56:26 +02:00
Maochen Wang
244958c9f4 manifest: Update hostap to fix build error
Fix build error of undefined reference to 'inet_aton' in
hostap/src/utils/ip_addr.c

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-16 09:56:15 +02:00
Maochen Wang
d916d7287d drivers: wifi: nxp: fix build error
Fix build error of undefined 'nxp_wifi_ret_t'.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-16 09:56:04 +02:00
Maochen Wang
a259900720 hostap: fix DUT hang when start SAP on wrong channel
When try to start SAP on channel 12 with region code US, the channel
check will fail and calls supplicant_send_wifi_mgmt_ap_status() with
iface->owner is NULL, which causes DUT hang. Set iface->owner when
enable the SAP can fix this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-16 09:55:44 +02:00
Gerard Marull-Paretas
eb45da5a44 tests: pwm_api: enable dma_fast_region in nRF54H20 DK overlay
The overlay makes use of the dma_fast_region without enabling it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-16 09:55:08 +02:00
Emilio Benavente
82a192c8a9 boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig
The Drivers using Pinctrl should be turning Pinctrl on
this should not be the responsibility of the board. This
commit removes CONFIG_PINCTRL from the boards side for nxp boards.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-10-15 19:09:45 -04:00
Gaofeng Zhang
0c54a3f8c7 hostapd: add ap status in l2 wifi
add ap status in l2 wifi

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-10-15 19:09:33 -04:00
Hake Huang
193bfabd3f tests: uart_async_api: update test for dma usage
1. ensure the two dma buffers all aligned with 32 bits
2. clean the rx_data_idx at test begin

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 19:09:19 -04:00
Hake Huang
fb1ffff7d3 driver: uart: uart_mcux_lpuart fix issues in async api
1. optimized the logic for buffer usage in async api
2. skip timeout flush when the remaining counts is 0,
   as this will trigger dma_callback to process.
3. remove scatter mode, as we are not using this mode
4. trigger after dma_reload.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 19:09:19 -04:00
Burak Gorduk
bfe3c4353c bluetooth: host Accommodate platform endianness for CS types
Modifies the CS bitfields that are used for accessing HCI
event data to take platform endiannes into consideration.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-10-15 19:09:05 -04:00
Burak Gorduk
c5a126cedb bluetooth: host: LE CS subevent result reassembly
Adds HCI support for LE CS subevent result continue
event and the reassembly logic for the partial results.

When subevent results are completed or the subevent is
aborted, the user callback is invoked with a buffer
pointing to the HCI event buffer, so no copy is done.

When subevent results are incomplete, then a reassembly
buffer is allocated from a fixed sized pool. This buffer
is used for the reassembling of the subevent result
containing all of the step data, which is then passed
to the user via the callback. kconfigs have been added
to set the size and the count of the reassembly buffer.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-10-15 19:09:05 -04:00
Daniel Leung
ac98d0e350 cmake: xcc: remove TOOLCHAIN_LIBS
Following the footstep of GCC/Clang cmake code to remove
TOOLCHAIN_LIBS, xcc also has it removed and utilizes
something similar to c_library to link the HAL library.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-15 19:08:47 -04:00
Daniel Leung
2dee8a4733 cmake: xcc: use xt-ld linker cmake code
Shuffling of ld/lld on C library linking cmake code causes
issue with XCC as the HAL library is not being included in
linking. So make XCC to use xt-ld linker cmake code such
that the HAL library is included.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-15 19:08:47 -04:00
Daniel Leung
cc07117bca cmake: xcc: do not use -fno-printf-return-value
XCC does not recognize -fno-printf-return-value as compiler
flag. So skip it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-15 19:08:47 -04:00
Peter Mitsis
c70a619a2f kernel: Remove unused z_ready_thread_locked()
Removing the routine z_ready_thread_locked() as it is not
used anywhere. It was a leftover artefact from development
that previously escaped cleanup.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-15 19:08:30 -04:00
Pieter De Gendt
f7e130f982 scripts: ci: check_compliance: Order list alphabetically
Print the compliance checks alphabetically by default.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-15 19:08:20 -04:00
Benjamin Cabé
4f4c7b90a4 doc: boards: align main board image name with board name
As per board porting guidelines, the board image should be named after
the board.
This commit implements the changes for boards found to be non-compliant.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-15 16:33:55 -04:00
Sreeram Tatapudi
23f3cb1977 samples: subsys: fs: littlefs: add overlay files for CYW20829
Use littlefs to store logs to flash memory

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-10-15 21:04:38 +01:00
Declan Snyder
d2bad69d93 MAINTAINERS: eth phy api and eth api to eth group
Add ethernet phy header to ethernet group

Add ethernet.h to ethernet group

Add net/mdio.h to mdio group

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 19:29:46 +01:00
Jordan Yates
f31439991d modules: tfm: interface: handle ISR context
Don't attempt to take a mutex if operating from inside an ISR. The only
expected use-case where this should occur is when attempting to reboot
via `tfm_platform_system_reset` from an exception handler.

Fixes #79687.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-15 19:08:24 +01:00
Adam Kondraciuk
dd7cfbc92e test: drivers: pwm: add fast PWM
Add fast PWM instance for nRF54H20 device.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-15 19:08:03 +01:00
Jordan Yates
1637443dc0 sensor: current_amp: request calibration
Request calibration on ADC samples to improve the accuracy of the ADC
outputs and therefore the final measured current.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-15 19:07:21 +01:00
Kapil Bhatt
28b74947e0 wifi: Add wrapper APIs for offloaded raw TX feature
Add wrapper APIs for the offloaded raw TX feature supported
by nRF70 devices.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-15 19:06:52 +01:00
Kapil Bhatt
56a5ac5189 manifest: update hal_nordic revision for offloaded raw tx mode
Updated hal_nordic revision contains changes for offloaded
raw tx mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-15 19:06:52 +01:00
Kapil Bhatt
5c3cc3730a drivers: nrfwifi: Create separate offloaded raw tx mode
Create separate offloaded raw tx mode which will work
as stand-alone compile-time mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-15 19:06:52 +01:00
Krzysztof Chruściński
5371effda8 tests: boards: nrf: qdec: Add device runtime PM configuration
Add configuration to the test which is using runtime PM on qdec.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 19:06:01 +01:00
Krzysztof Chruściński
7fc73619b4 tests: boards: nrf: qdec: Add common configuration for nrf54l
Add common overlay for nrf54l15pdk targets.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 19:06:01 +01:00
Krzysztof Chruściński
b773306a56 drivers: sensor: nordic: qdec: Add runtime PM
Add runtime PM to the driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 19:06:01 +01:00
Romain Pelletant
8ee66a151e drivers: i2c: i2c_gecko: add exclusive access
- Add exclusive and atomic access to resource

Fixes #79110

Signed-off-by: Romain Pelletant <romainp@kickmaker.net>
2024-10-15 19:05:24 +01:00
Chris Friedt
f4e07d15d6 sys: util: define bits per byte, nibble, and nibbles per byte
Collect some common bit-widths redefined in various locations
and put them under sys/util.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-15 19:05:06 +01:00
Chaitanya Tata
b40cb4c46c drivers: nrfwifi: Use Zephyr tooling to load nRF70 FW file
Instead of relying on INCBIN macros which do not properly add
dependencies, e.g., modifying FW file doesn't trigger rebuild.

Use the Zephyr cmake tooling to load the FW patch file as a header.

This also improves memory report where the patch target is clearly
visible instead of a hidden section.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 19:04:29 +01:00
Chaitanya Tata
7f9be54897 Revert "drivers: nrfwifi: Fix rebuilding when FW blobs are changes"
This reverts commit e2e96acebf.
This will be properly fixes by adding a target for nRF70.bin and
removing INCBIN approach.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 19:04:29 +01:00
Stoyan Bogdanov
6ec8a53c9b tests: drivers: build_all: gpio: Correct max14906 and max14916 compat
Replace wrong compatibility strings for max14906 and max14916.
Fix wrong addressees for max14906 and max14916.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-15 19:04:10 +01:00
Tomasz Moń
7c7383cabf tests: usb: uac2: Test Feature Unit descriptor
Insert Feature Units in between:
  * USB Streaming Input Terminal and Headphones Output Terminal
  * Microphone Input Terminal and USB Streaming Output Terminal

The Feature Units have Mute control only on the Primary channel 0.
The headphones Feature Unit also has Automatic Gain control on all
channels while microphone Feature Unit has Automatic Gain control only
on the Logichal channel 1.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-15 19:03:49 +01:00
Tomasz Moń
1dde8e2550 usb: device_next: uac2: Generate Feature Unit descriptor
Rework NUM_SPATIAL_LOCATIONS() to evaluate to integer literal to allow
using it with LISTIFY() macro. This is necessary because Feature Unit do
not operate on channel clusters but rather on logical channels.

Track back Output Terminal channel cluster to appropriate entity. This
is necessary because Feature Unit does not repeat the channel cluster
information.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-15 19:03:49 +01:00
Tomasz Moń
3ca52a0580 dt-bindings: usb: uac2: Add Feature Unit bindings
Add initial Feature Unit bindings allowing user to place the Feature
Unit inside UAC2 instance description. Currently the bindings facilitate
only specifying which controls are available on the Primary channel 0
and on each Logical channel. The number of Logical channels has to be
derived from data-source property.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-15 19:03:49 +01:00
Benjamin Cabé
d5bcfc764c doc: extensions: boards: suppress extra blank lines in Jinja templates
Ensure Jinja templates don't have extra blank lines in the output by
using the {% -%} syntax to suppress them.
This is not incredibly important but this helps keeps the HTML output
more readable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-15 19:01:56 +01:00
Benjamin Cabé
29798f0ebd doc: extensions: boards: add labels to search form fields
Add proper labels to the form fields for better UX/accessibility
Updated the placeholder for the "board name" field to be more
informative.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-15 19:01:56 +01:00
Kai Vehmanen
52efa3bb9b soc: intel_adsp: tools: fix ace15 ROM status check in cavstool.py
Fix definition for ROM status register for ACE1.5. The value should be
same as ACE2.0 and only different for ACE3.0.

Fixes: 6ad9b6ccab ("soc: intel_adsp: tools: add intel_adsp_ace30
support to cavstool.py")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-10-15 19:01:35 +01:00
Alberto Escolar Piedras
fb010719ed manifest: Update nRF hw models to latest
Update the HW models module to:
eeed2591d38e5e9bf89658df67555f2777249fc0

eeed259 RADIO: Do not warn about TASK_RSSISTART during RXIDLE
565220e 54L15.mk: Fix flipper hal target name
bb8c6fd Makefile: Let's install libraries by default
6dbb843 RADIO: Implement immediate RSSI measurement when needed
3a5d567 RADIO: Allow triggering TASK_RSSISTART from register writes

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-15 19:00:26 +01:00
Klaus Nagel
03959a20f7 boards: st: nucleo_g431kb: add support for nucleo g431kb
Add support for the nucleo g431kb Board.

Signed-off-by: Klaus Nagel <nagelkl01@gmail.com>
2024-10-15 13:53:52 +02:00
Alexandru Lastur
ec2dd19d45 samples: openamp_rsc_table: Add the option to use predefined vring ID
Currently, Zephyr is always sending back notifications to
AP (e.g Linux in our case) on channel 0.

But this currently doesn't work if Linux uses other channel
id for communication. So, add option to use predefined
vring ID that can accomodate Linux used ID.

Signed-off-by: Alexandru Lastur <alexandru.lastur@nxp.com>
2024-10-15 13:53:42 +02:00
Alexandru Lastur
840f13f13a sample: open_amp_rsc_table: Add support for imx8mp_evk M7 core
This enables openamp_rsc_table sample for imx8mp_evk on M7 core

Signed-off-by: Alexandru Lastur <alexandru.lastur@nxp.com>
2024-10-15 13:53:42 +02:00
Chaitanya Tata
b643070557 doc: wifi: Update build command for Enterprise mode
Now, Enterprise mode has a separate overlay.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Chaitanya Tata
4c5a72f9e0 net: wifi: Fix PEM certificate parsing errors
MbedTLS specifically checks for null-terminator, else it skips PEM
format processing and tries to parse it as DER causing parsing failures.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Chaitanya Tata
48916d66e7 modules: hostap: Fix checks for Enterprise security
Enterprise security doesn't have either SAE or PSK, so, using a blanker
else throws a false warning. Fix the checks to proper handler enterprise
mode.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Chaitanya Tata
6cac9540ec doc: wifi: Update enumeration for EAP-TLS
EAP-TLS enumeration is now changed due to recent SAE additions.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Chaitanya Tata
d107b04c9d samples: wifi: Add overlays for Enterprise mode
This overlay has all necessary configuration needed for Enterprise mode.
Two variants are given, once with fixed size network buffers and other
with variable size network buffers (still experimental).

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Chaitanya Tata
39b904d9cc modules: hostap: Add separate config for EAP-FAST
EAP-FAST has extra requirements (TLS 1.3, session tickets etc) and is
seldom used, so, remove it from Enterprise list and add a separate
Kconfig option.

This solves the build error when Enterprise mode is enabled.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 13:53:30 +02:00
Alexander Svensen
cfd7f633d2 samples: Bluetooth: Audio: Find device regardless of name type
- Fixes bug where the sample would only look at the first name type
  and skip the rest.

Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
2024-10-15 13:53:23 +02:00
Jilay Pandya
abf5520a19 test: drivers: stepper: adjust tests as per the new api
This commit adjusts the tests as per the updated stepper api.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-15 13:53:16 +02:00
Jilay Pandya
ecada895da drivers: stepper: update drivers as per the api changes
This commit deprecates passing of async signal in functions such as move
and set_target_position. As per the new API, the async signal has to be
set via set_async_signal.

If RAMPSTAT_POLL is activated then enable_constant_velocity_mode would be
able to raise signals like END_STOP_DETECTED & SENSORLESS_STALL_DETECTED.
This commit also adjusts shell script in order to test these signals.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-15 13:53:16 +02:00
Jilay Pandya
4f18d64b30 drivers: stepper: api: introduce stepper_set_event_callback function
- Refactor stepper_signal_result to stepper_event.
- Introduce stepper_set_event_callback function
- Deprecate k_poll_signal

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-15 13:53:16 +02:00
Szymon Janc
4a3807789d bluetooth: tester: Enable support for writable appearance
This was affecting GAP/GAT/BV-06-C qualification test.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-10-15 13:53:03 +02:00
Tim Lin
7fa962589f ITE: it8xxx2: Remove CONFIG_PINCTRL from soc defconfig file
The driver Kconfig determines whether pinctrl is enabled
instead of soc defconfig.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-10-15 13:52:55 +02:00
Pieter De Gendt
d66d3170cf ci: github: Run CI for python 3.13
Python 3.13 has been released, add it to the CI matrix for python
workflows.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-15 13:52:49 +02:00
Robert Lubos
45a79d3208 tests: net: conn_mgr_monitor: Improve test reliability under heavy load
conn_mgr_tests were occasionally failing when executed under heavy load.
The reason for this are short timeout values used when waiting for
events - if executed under heavy load, the even might not be delivered
on time.

An obvious solution would be to simply increase the timeout, however
when testing it turned out the actual timeout value would need to be
pretty high to ensure tests reliability. Therefore, to avoid
unnecessary increase of the overall test execution time to protect
against rare edge cases, rework the event waiting mechanism to use
semaphore instead. The test cases will now specify the events they're
waiting for, and the event handlers will feed the semaphore if all
expected events have been delivered. This allows the increase the
maximum timeout when waiting for events, w/o affecting too much the test
execution time under normal conditions.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-15 13:52:24 +02:00
Henrik Brix Andersen
a285b8a7b8 boards: nxp: frdm_k64f: use SW2 instead of SW3 for MCUboot
Use SW2 instead of SW3 for entering MCUboot serial recovery/USB DFU
mode. Holding SW3 during reset results in a NMI, causing the boot process
to halt.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-15 13:52:14 +02:00
Nikodem Kastelik
6300e1bc25 soc: nordic: nrf54l: remove normal voltage mode
Normal voltage mode is no longer supported by MDK 8.67.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-15 04:27:42 -04:00
Rodrigo Peixoto
9105b1937e tests: zbus: fix ci by excluding m2gl025_miv board
The `m2gl025_miv` is breaking the ci during the zbus integration tests. To
solve that in a meanwhile, this commit excludes the board from the
zbus integration tests.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-10-15 04:27:26 -04:00
Daniel Leung
bda38f033a tests: mem_map: fix memory exhaustion test on qemu_x86_tiny
The test_k_mem_map_unmap test requires some free physical pages
to work correctly. On qemu_x86_tiny, the physical memory is
artificially limited to test demand paging, which is 320KB as
of writing of this commit message. We also reserve 128KB of
physical memory as swapping area. And we do pin quite lot of
text and data (relatively speaking) in memory. There is not
much memory left for the test. So lower the amount of reserved
memory for paging to leave some pages for the test.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-15 04:12:25 -04:00
Joel Hirsbrunner
405c6718ed Devicetree: Devicetree Bindings: Add tests for new DT_ENUM_ macros
Test the new c-macros for dt enums. The new macros are already used in
the existing macros. As an example, DT_ENUM_IDX(node_id, prop) uses
DT_ENUM_IDX_BY_IDX(node_id, prop, 0) to get its result. However, this is
insufficient for testing the complete functionality of these macros.
Therefore, additional tests are added to make sure they work
appropriately for other indices besides 0.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Joel Hirsbrunner
ae747c4fa1 Devicetree: Devicetree Bindings: Add new APIs
The existing APIs for enums were rewritten to support the changes.
Additional macros were added to now also support getting specific
indices from the array / string-array.
The macros can be evoked the same way like before, since nothing changed
for the interface. Therefore, these changes are backward compatible.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Joel Hirsbrunner
7454cb984b Devicetree: Devicetree Bindings: Adjust python tests
Adjust existing tests to support the changes and add new tests to test
the newly added feature.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Joel Hirsbrunner
8b02bc9392 Devicetree: Devicetree Bindings: Support enums for array like dt props
It is currently impossible to use enum with any array like type (i.e.
string-array and array, these are the only ones that make sense) in the
devicetree and dt-bindings.
However, there is no such remark in the dt-bindings section of the docs.
Since this is a feature that comes in very handy and is implemented
fairly easily, I adjusted the scripts for this.

It is now possible to do something like this.
```yaml
compatible = "enums"

properties:
  array-enum:
    type: string-array
    enum:
      - bar
      - foo
      - baz
      - zoo
```
```dts
/ {
	enums {
		compatible = "enums";
		array-enum = "foo", "bar";
	};
};
```

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Grzegorz Swiderski
85b03949e4 boards: nordic: Flatten shared_ramxx_region nodes
Update the default memory maps for `nrf54h20dk` and `nrf9280pdk` to
remove the `shared_ram20_region` and `shared_ram3x_region` nodes,
because their child nodes no longer need to be grouped together:

  * IPC buffers in RAM20 are statically allocated.
  * DMA buffers in RAM3x have separate access owners.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Grzegorz Swiderski
13b1cfa5ec boards: nordic: Align with updated Nordic owned memory bindings
Apply the following changes to `nrf54h20dk` and `nrf9280pdk`:

* Convert `perm-*` properties to the newly introduced `nordic,access`,
  both in board files and tests.

* Redefine shared regions to specify multiple access owners per node,
  and ensure that each such region is reserved by one domain at a time.
  `cpuapp_cpurad_ram0x_region` is only enabled by Radiocore, while
  `cpuapp_cpucell_ram0x_region` is only enabled by Application core.

* Divide `shared_ram3x_region` so that each sub-region is owned by a
  different domain. Their addresses must be rounded down to fit the
  current UICR format.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Grzegorz Swiderski
365e9d63d0 dts: bindings: Update Nordic owned memory bindings
This concerns both `nordic,owned-memory` and `nordic,owned-partitions`.

Introduce a property named `nordic,access`, which is meant to replace
the `owner-id` and `perm-*` properties. It allows for describing how
multiple domains should access a single memory region, possibly with
different permissions per owner, but without having to create more than
one DT node for this purpose.

This change is also motivated by updated memory protection requirements
on the nRF54H20, which mandate that a given memory region must only be
reserved by one domain, even if multiple domains can have access to it.
This restriction is now described in the binding itself.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Jukka Rissanen
c409d106ac samples: net: echo-server: Add websocket console support
Add enablers that can be used to setup websocket console
for this sample.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Jukka Rissanen
7510e2d940 shell: backend: Create a websocket transport backend
This creates a websocket based shell backend that is used to
implement a websocket console that can be connected using a browser.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Jukka Rissanen
7408004531 logging: backend: Add websocket backend
Allow logging output to websocket console. Requires that
websocket shell backend and websocket HTTP server support
is also enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Daniel DeGrasse
20cce995da samples: drivers: video: capture: don't apply format unless needed
Do not apply format setting unless needed. Also, correct the check for
the RGB565 format setting- the zephyr display API treats RGB565 and
BGR565 as big endian, so the format needed here is BGR565.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
22cb79d221 samples: video: capture: add support for SMARTDMA
Add support for using the SMARTDMA engine on the FRDM-MCXN947 board with
the video capture sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
a79574f9dc boards: nxp: frdm_mcnx947: add support for SMARTDMA camera engine
Add support for SMARTDMA camera engine, and a OV7670 parallel camera
definition for the frdm_mcnx947 board. This support has been tested with
the video capture sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
7c3f0f6a34 boards: nxp: frdm_mcn947: add support for LPI2C7
Add support for LPI2C7. This peripheral is used for interfacing with
cameras connected to the J9 header.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
df448b6fbb dts: arm: nxp: nxp_mcxn94x: add definition for SMARTDMA device
Add definition for SMARTDMA device to the MCXN94x devicetree.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
d2df15a0e9 drivers: video: video_mcux_smartdma: add SMARTDMA video driver
Add SMARTDMA video driver. This driver uses the SMARTDMA engine as a
parallel camera interface, which can read QVGA frames from a camera
device. Due to SRAM constraints, the video driver divides the camera
stream into multiple horizontal video buffers as it streams them back to
an application.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
f386cc26fa drivers: video: ov7670: improve resolution init code
Improve resolution init code for OV7670 driver, to properly program the
full set of registers needed to realize a given output resolution. The
settings for these registers are based on those used in the MCUX SDK
driver, which are derived from the resolution register settings given in
the OV7670 programming guide, with a different configuration for the
CLKSRC and DBLV registers used for the input clock.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
126306981d drivers: dma: dma_mcux_smartdma: update interface to support custom FW
The SMARTDMA is a programmable DMA engine, and supports custom firmware
in order to run complex DMA operations. Update the driver to increase
the flexibility users have when configuring the SMARTDMA with
custom firmware, and remove the RT500 display firmware specific
definitions and functionality from the driver.

This display setup is now handled from the MIPI DSI driver, since the
firmware used for this case is specific to the MIPI DSI IP.

This change also requires an update to the RT500 devicetree, as the
register definition for the SMARTDMA has changed, so the base address
must as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
97943295e5 samples: drivers: video: handle line_offset field
Handle line_offset field within video capture sample. Other samples do
not support partial framebuffers and therefore can ignore this field.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
561198ac75 drivers: video: handle line_offset field
Since all video drivers in tree use a full frame, their video buffers
will always start at a line_offset of 0 within the frame.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
04a007f9fe drivers: video: add line_offset field to video_buffer structure
Add line_offset field to the video_buffer structure. This field
indicates the offset (in horizontal lines) within a frame that a video
buffer starts at. This is useful for video devices that produce or
consume video buffers that constitute a partial frame.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
2fb259833f samples: drivers: video: update video samples for min/max line count
Update video samples to use min/max line count capabilities when
allocating video buffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
ec6ffc8b33 drivers: video: update video drivers to handle min/max line count
Update existing video drivers to handle the min/max line count field
within the video_caps structure. All drivers work with full frames
currently, so use the special LINE_COUNT_HEIGHT value to indicate this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
f46e5342c4 drivers: video: add min_line_count and max_line_count to video_caps
Add min and max line count to the video_caps structure- these fields can
be used by applications to determine the size of video buffer they need
to allocate for a video endpoint

The min and max line count fields are designed to enable supporting
endpoints that may produce or consume partial frames within each video
buffer, and may support arbitrarily sized video buffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Paweł Czaplewski
217fdf9d24 tests: drivers: i2c: fix I2C registers configuration in i2c.dtsi
Fixed incorrect I2C register definitions in the test file
tests/drivers/build_all/sensor/i2c.dtsi.

Signed-off-by: Paweł Czaplewski <pawel.czaplewski@arrow.com>
2024-10-15 04:10:40 -04:00
Paweł Czaplewski
9fe959857a drivers: sensor: tmp1075: Add tmp1075 sensor driver and sample
TI tmp1075 driver implemented based on tmp108 driver.
The driver initializes the sensor based on the DTS.

Added tmp1075 example overlay file to thermometer sample.
All you need to do to use the sensor is to connect the I2C and
optionally interrupt line.
To see default DTS configuration option inspect `ti,tmp1075.yaml`
bindings file and sensor spec.

Signed-off-by: Paweł Czaplewski <pawel.czaplewski@arrow.com>
2024-10-15 04:10:40 -04:00
Emil Gydesen
cd5a9f62bb tests: Bluetooth: CCID: Add unit testing of CCID
Add unit tests of the CCID functions.
To support these new tests, the GATT mocks need to
support dynamic GATT DB so we can add and remove
a service that contains CCIDs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen
203bcf3774 Bluetooth: CCID: Make the CCID API public
Move the CCID header to the include directory
to make it public.

This also compiles the ccid.c file whenver CONFIG_BT_CONN
is enabled, rather than having an additional Kconfig for it,
since the API is now public and may be used by other than
our internal services.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen
5f1a573809 Bluetooth: CCID: Improved CCID allocation
Rather than throwing an assert, it will now do a better
check for already-allocated CCIDs and return an error instead.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Emil Gydesen
7461f3781e Bluetooth: CCID: Rename ccid_get_value to alloc_value
alloc_value is more correct as it does allocate a new
value, rather than just returning/getting a value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Adam Dunkels
221199e15b runners: jlink: add support for J-Link tunnels
This adds support for J-Link tunnels, which run on top of an IP network
and therefore uses the -IP option. J-Link tunnels are identified by a
tunnel: prefix instead of a bare IP address. This change checks for the
presence of such a prefix, and choses the -IP transport option if the
tunnel prefix is found.

This has been tested with J-Link Remote Server v7.98g and the SEGGER
tunnel option.

Signed-off-by: Adam Dunkels <adam@dunkels.com>
2024-10-15 04:10:18 -04:00
Bernhard Krämer
b4a35d9b10 boards: teensy4: Update config for ethernet
- Updates teensy board configs for use with new `eth_nxp_enet.c` driver
- Remove ethernet configs from teensy40 (4.0 has no ethernet phy)
- Adds a device entry to include `tests/drivers/build_all/ethernet/`

Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
2024-10-15 04:10:06 -04:00
Bernhard Krämer
6ea04441f9 drivers: ethernet: Add DP83825 phy driver
Includes dt binding

Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
2024-10-15 04:10:06 -04:00
TOKITA Hiroshi
042a40d0e3 drivers: lora: rylrxxx: Add stdio.h to resolve function prototypes
The source code uses functions from stdio.h,
such as `sprintf()`, but they are not explicitly included
so that we will add it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
TOKITA Hiroshi
1d4c29ab29 drivers: lora: rylrxxx: Fix missing default y in LORA_RYLRXXX
The `default y`, which is coupled with
`depends on DT_HAS_REYAX_RYLRXXX_ENABLED` to link the settings with
DeviceTree, which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
TOKITA Hiroshi
0ce32c963e tests: drivers: build_all: lora: Add devices build tests
Add build tests for the following devices.

- semtech,sx1262
- semtech,sx1272
- reyax,rylrxxx

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-15 04:09:56 -04:00
Adrian Warecki
256ab0c919 ace: mm: tlb: Check tlb translation enabled before flushing cache
Before unmapping a memory page, the cache is flushed. If the given memory
page is not mapped, this operation ends with a cpu exception on the
ptl platform. Add check if tlb translation is active before flushing.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-10-15 04:09:49 -04:00
Adrian Warecki
0e9b9b0cf3 ace: mm: tlb: Ignore unmappig error in driver initalization
The sys_mm_drv_unmap_region_initial function is responsible for unmapping
all unused virtual memory during tlb driver initialization. Most addresses
will not have a mapped page. Ignore the error code indicating unmapped
memory that will occur when trying to unmap.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-10-15 04:09:49 -04:00
Declan Snyder
3be548b139 boards: frdm_mcxw71: Enable LPI2C1
Enable LPI2C1 on the frdm_mcxw71 board which is connected to a
FXLS8964AF sensor (no driver for the sensor yet).

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:09:34 -04:00
Declan Snyder
8a104729c4 soc: nxp: mcxw71: Add LPI2C node and clocking
Add LPI2C node and default clocking in soc.c

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:09:34 -04:00
Bjarki Arge Andreasen
e933c7eaee boards: nordic: nrf7002dk: re-enable external flash by default
The external flash (mx25r64) was accidentally disabled during
testing. The node should be enabled by default like its spi.

This commit removes the status = "disabled";

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-15 04:09:26 -04:00
Hake Huang
33fe360bfc tests: twister: runner add runner test
add test for platform in extra_args

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Hake Huang
c05e4802fb document: twister: update documents for extra_args
now extra_args can support domain settings, add in doc.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Hake Huang
c759068c40 twister: runner: add extra_args supporting platform and soc
like extra_confs, add extr_args filterable by
soc:<arch>:<extra_args> or
platfrom:<platform name>: <extra_args>
simulation:<simulator name>: <extra_args>

which will only apply to given platform or arch

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-10-15 04:09:16 -04:00
Krzysztof Chruściński
835dd0b83e logging: Refactor filtering macros
Create a macro that encapsulates all filtering and use it in standard
and hexdump macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Krzysztof Chruściński
6adfd4ba89 logging: Minor cleanup in logging helper macros
Change logging level definitions to just numbers instead of
numbers with unsigned indicator (e.g. 1 instead of 1U). Levels
from Kconfig comes as just numbers and often levels are used
for IS_ENABLED-type of macros where values are concatenated
into tokens and it actually makes the difference if value is
1 or 1U. It allows minor cleanup in the internal macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Declan Snyder
2ab104625e drivers: mdio_nxp_enet: Don't disable IRQ
No real need to be enabling and disabling IRQs, this logic has been
reported to be causing spurious interrupts and strange behavior, we can
just enable the interrupt and switch to interrupt based logic one time
and keep the interrupt enabled at that point.

Also, fix a W1C bug where |= was used instead of = to clear a flag.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-15 04:08:30 -04:00
Daniel DeGrasse
feb0241536 soc: nxp: lpc55xxx: fix dependencies for SOC_FLASH_MCUX
SOC_FLASH_MCUX has additional dependencies for LPC55xxx CPUs, due to the
fact that the flash should be disabled when executing in nonsecure mode.

Since the merge of HWMv2, this dependency has been set incorrectly at
the SOC level, resulting in the IAP flash driver being enabled when
targeting CPU1, which is incorrect. Fix the Kconfig dependency to
resolve this issue.

Fixes #79576

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:08:15 -04:00
Jukka Rissanen
c6aa9e3803 wifi: shell: btm_query: Fix invalid pointer cast
The 11v_btm_query shell command was calling parse_number() using
a pointer to uint8_t. This will cause memory overwrite and possible
crash. Convert to use long temporary value to avoid this.

Fix also the output prints in case of an error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Jukka Rissanen
8105f70d7a wifi: shell: Add missing newlines when printing error
The parse_number() did not print newline after error or warning message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Jukka Rissanen
32aa1d634e wifi: Refactor wifi-shell to allow external subcommands
Rework the wifi-shell code so that external subcommands can be
bolted into it easily. This means that the commands should be
created using SHELL_SUBCMD_ADD().

Place the various subcommands in alphabetical order to find them
more easily.

Split long lines in order to pass CI checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:07:59 -04:00
Erik Sandgren
5f59b35b42 Bluetooth: Host: Fix issue where uninitialized value was used
This change makes sure that when a call to `bt_id_set_scan_own_addr` is
sucessful, i.e., the return value is 0, the `own_addr_type` will
be set by the `bt_id_set_scan_own_addr`.

Not setting the `own_addr_type` in a successful call to
`bt_id_set_scan_own_addr` causes, for example,
the `start_le_scan_ext` method in `scan.c` to use an
uninitialized `own_addr_type`.

Eventually this results in an unexpected failure further down in
`start_le_scan_ext`, when sending HCI command to controller with
an uninitialized `own_addr_type`.

Signed-off-by: Erik Sandgren <erik.sandgren@nordicsemi.no>
2024-10-15 04:07:50 -04:00
Marcin Szymczyk
a555838033 drivers: mbox: nrf_vevif_task_rx: align to direct IRQs
Allow using direct IRQs (which are obligatory when buiding
with `CONFIG_GEN_SW_ISR_TABLE=n`).

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-10-15 04:07:32 -04:00
Tahsin Mutlugun
ca1b2b865e manifest: Update hal_adi to fix build errors for MAX32672
Some deprecated inclusions in max32672.h are causing compilation
warnings, which are interpreted as errors by build tests. Grab relevant
fixes from hal_adi.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-10-15 04:07:21 -04:00
Chaitanya Tata
601b98cd24 boards: nrf7002dk: remove redundant cpunet initialization code
Extending commit 4a1834cef7d("boards: nrf53: remove redundant cpunet
initialization code") to nRF7002DK for CPUNET reset handling.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-15 04:07:03 -04:00
Emil Gydesen
730b2f7c69 Bluetooth: Tester: Force initial conn param to 30ms
Modify the GAP connect to use 30ms. The default parameters
typically ended up with 50ms which is OK in most cases,
but for ISO related test cases, using an ACL interval that
is a multiple of the ISO SDU interval (7.5/10ms) generally
provides better stability. 30ms is the lowest multiple
of both 7.5 and 10ms, and was thus chosen.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:06:53 -04:00
Marc Herbert
8b859cea2d west: promote config_get*() functions from sign.py to the base class
These two functions have stood the test of the time and they have
absolutely nothing specific to sign.py

This has the benefit of transitioning away from west's global and
deprecated logging interface
(https://github.com/zephyrproject-rtos/west/issues/149) and this
deprecation is what prompted this commit: see #79240.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-10-15 04:06:42 -04:00
Peter Mitsis
cc415bc139 kernel: Apply 'unlikely' attribute
Applies the 'unlikely' attribute to various kernel objects that
use z_unpend_first_thread() to optimize for the non-blocking path.

This boosts the thread_metric synchronization benchmark numbers
on the frdm_k64f board by about 10%.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-15 04:06:32 -04:00
Nick Ward
89b7336876 net: openthread: make receive sensitivity configurable
OpenThread route cost calculations are dependent on this
being accurate for the hardware design.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-10-15 04:06:08 -04:00
Dean Sellers
43897a4e60 drivers: ethernet: enc28j60: Fix carrier on race on init
If there is a carrier (cable plugged in) on device initialisation
there is a race between the interrupt service and the L2 init.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2024-10-15 04:05:50 -04:00
Krzysztof Chruściński
01f2740015 boards: nordic: Do not enable hw-flow-control on console
Like in all other legacy boards, hw-flow-control should not be
enabled for console UART. With hw-flow-control sample stuck
during printing some initial information and sample appears to
be not working correctly unless com port is opened.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:05:36 -04:00
Guillaume Gautier
f4f1b1a365 drivers: adc: stm32: fix clock check for stm32f1
STM32F1 doesn't have synchronous/asynchronous source clock choice.
The recently added clock check was failing compilation for these series.
This commit removes the check for F1.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-15 04:05:22 -04:00
Bjarki Arge Andreasen
1635d77c75 MAINTAINERS.yml: patch comparator drivers area
The comparator drivers area contains the following incorrect area:

files:
  - include/zephyr/dt-bindings/clock/

and contains the following duplicate area:

files:
  - include/zephyr/drivers/comparator/

this commit removes them.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-15 04:05:09 -04:00
Michal Smola
45720f8b8c boards: frdm_mcxc242: Add uart support
Board frdm_mcxc242 does not have UART IP configured.
Add UART configuration and pin control. Set state to disabled,
as it serves as alternative to default LPUART0 or as second
uart only. Add uart to supported features in yaml.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-15 04:04:15 -04:00
Lucien Zhao
1a89e1640c boards: nxp: mimxrt1180_evk: add qtmr description in doc
support qtmr interface as counter function

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-15 04:37:47 +01:00
Lucien Zhao
4db46a3331 tests: drivers: counter_basic_api: add qtmr1_timer0 configuration
add qtmr1_timer0 configuration for counter_basic_api case

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-15 04:37:47 +01:00
Lucien Zhao
62c62da1ba dts: arm: nxp: rt118x: add qtmr instances
update driver clock to adapt qtmr clock structure
add 8 qtmr instances

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-10-15 04:37:47 +01:00
Daniel Mangum
52540d8412 net: fix note about source address in net_context
Removes extraneous word in note on net_context struct describing why the
source address is not stored directly in struct.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-10-14 13:05:54 +02:00
Lukasz Maciejonczyk
a131e85a94 kconfig: openthread: Add OPENTHREAD_CLI_VENDOR_EXTENSION option
This commit introduces a new option, OPENTHREAD_CLI_VENDOR_EXTENSION,
in the Zephyr OpenThread module to map the upstream option
OT_CLI_VENDOR_EXTENSION.

OPENTHREAD_CLI_VENDOR_EXTENSION option specifies the path to a CMake
file that defines and links the CLI vendor extension. By setting this
option, it enables the addition of vendor-specific commands to
the OpenThread CLI interface.

Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
2024-10-14 13:05:44 +02:00
Ravi Dondaputi
609520bf3f modules: hostap: Add config options for EAP types
Enabling all EAP types for enterprise mode increases
memory usage in both ROM and RAM. Provide config options for each
type to let solutions choose the methods based on their
requirements.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-10-14 13:05:31 +02:00
Jordan Yates
fec7156b03 adc: current_sense_amplifier: reduce valid scaling range
Reduce the valid scaling range for the gain multipliers and dividers to
provide more headroom on int64_t overflows in the calculations. Take
advantage of this headroom to perform all multiplications before
divisions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-14 13:05:07 +02:00
Jordan Yates
4361c96c48 adc: current_sense_amplifier: resistance in milli-ohms
Change the unit of the sense resistor in the devicetree binding from
micro-ohms to milli-ohms. This is done for three reasons.

Firstly, the maximum value resistor that can currently be represented
is 4.2 kOhms, due to the limitation of devicetree properties to 32 bits.

Secondly, storing the resistance at such a high resolution makes
overflows much more likely when the desired output unit is micro-amps,
not milli-amps.

Finally, micro-ohms, are an unnecessarily precise unit for the purpose
of these calculations, and a resolution that is not realistic to
achieve. The high resistor resolution results in large divisors that
reduce the resolution of outputs. Unlike resistors characterised down to
the micro-ohm, devices wanting to measure micro-amps are actually
realistic.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-14 13:05:07 +02:00
Lars Knudsen
e0a262b33f Bluetooth: Audio: Fix initial Broadcast source values
If the Broadcast ID is initially set to 0x000000,
which is valid, comparison logic on add of an
actual Broadcast ID of 0x000000 fails.

Likewise for SID.

Moving INVALID_BROADCAST_ID define to bap.h

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-14 13:04:31 +02:00
Chaitanya Tata
edb47444b9 manifest: hostap: Pull fix for duplicate AP enable event
The event is sent from both WPA supplicant and hostapd, but hostapd
should only be sent when using hostapd to create the AP.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-14 13:04:05 +02:00
Emil Gydesen
0ed799aa14 tests: Bluetooth: Audio: Modify/add compile.sh for audio samples
Instead of having one large compile.sh for all audio samples,
it has been split into multiple. This makes it easier to
build and run specific tests (e.g. BAP or CAP), without
having to build all of them.

This also makes it easier to expand later, without
creating one huge compile.sh file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-14 13:03:57 +02:00
Michal Simek
50919747bf drivers: ipm: xlnx: fix AMD copyright
There is nothing like AMD-Xilinx Inc. That's why use full AMD name
instead.

Fixes: 09e2a4e9eb ("drivers: ipm: add zynqmp r5f support")
Co-developed-by: Mubin Sayyed <mubin.sayyed@amd.com>
Signed-off-by: Mubin Sayyed <mubin.sayyed@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-10-14 13:03:48 +02:00
Declan Snyder
6be08222c0 boards: frdm_mcxw71: Enable mcuboot
Enable mcuboot partitions

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-14 13:03:39 +02:00
Sylvio Alves
7a57d55c76 drivers: bt: airoc: fix compliance check
Fix compliance check related to "symbols without children".
Using regular 'config' entry.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-14 13:03:28 +02:00
Alberto Escolar Piedras
9e7785f323 tests/bsim/bluetooth/ll/edtt: Dont use deprecated global_device_nbr
Use the provided API to get it instead

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-14 13:03:19 +02:00
Declan Snyder
ca829e1b77 include: spi: Clarify data frame units and meaning
Make clear in the include/ header that data frame size
is the same thing as word size for the context of this API.

Also, add some comments to the spi_context to make it easier
for driver writers to understand how to use the functions,
by noting the meaning of the dfs and len parameters to the update
functions. Otherwise it takes some time to understand what they mean.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-14 13:03:10 +02:00
Christoph Seitz
74ca0a499a net: ethernet: Add 2.5G and 5G hardware capabilities.
Add the 2.5G and 5G link speeds as possible capabilities
to ethernet drivers.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2024-10-14 13:02:50 +02:00
Christoph Seitz
2dca6d64c7 net: shell: Add missing hw_cap strings.
Two ethernet capabilities were missing. Added them to allow
the 2.5G and 5G strings to appended.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2024-10-14 13:02:50 +02:00
Christoph Seitz
6fa74eea36 net: ethernet: Add 2.5GBase-T and 5GBase-T phy speeds
The possible link speeds of ethernet phys are extended by
the 2.5G and 5G constants.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2024-10-14 13:02:50 +02:00
Declan Snyder
e8bb2d6472 boards: rd_rw612_bga: Remove LED node
There is no LED on this board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-14 13:02:41 +02:00
Josuah Demangeon
0ef69c8815 drivers: video: fix a typo in get_ctrl API function type
The "struct video_driver_api" struct field "get_ctrl" had the wrong type
although this did not have any practical effect as "video_api_set_ctrl_t"
and "video_api_get_ctrl_t" have the same signature.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-10-14 13:02:29 +02:00
Benjamin Cabé
8595a0cf79 doc: requirements: Update to Sphinx RTD Theme 3.0
Update to latest Sphinx RTD Theme version.
Main benefit will be to be able to leverage Sphinx 8.0 since previous
version of the theme was depending on 'sphinx < 8.0'.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-14 13:02:20 +02:00
Jonas Remmert
4919bd421e boards: phytec: add support for phyBOARD-Nash (imx93)
Add basic support for the phyBOARD-Nash, a SBC based on the phyCORE-i.MX93.
Both CPU types (Cortex-A55, Cortex-M33) are supported.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-10-14 13:02:04 +02:00
Robert Lubos
c4803752a8 net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX
CONFIG_ZVFS_POLL_MAX is now used to control the maximum number of poll()
entires. Thereby, CONFIG_NET_SOCKETS_POLL_MAX is redundant and shall
be deprecated.

Modify the defaults for NET_SOCKETS_POLL_MAX and ZVS_POLL_MAX so that
the deprecation actually makes sense instead of symbol removal. In case
the application still sets the old config, it will modify the
ZVS_POLL_MAX default.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
e82b2ea924 fdtable: workaround posix->zephyr->posix dependency cycle
Currently Zephyr depends on POSIX, which presents a
dependency cycle.

Newlib does not seem to like this dependency cycle so it
requires that we re-declare off_t and ssize_t.

We should really stop using off_t and ssize_t below the
POSIX API line in Zephyr.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
c152fb90f8 posix: kconfig: remove select y from non-user-selectable help
Several help prompts for non-user-selectable Kconfig options
included the phrase "select 'y' here", which does not make
any sense in this situation.

Adjust the help sections to use more appropriate language.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
d9398cd203 doc: posix: mark posix device io as complete
Mark the POSIX_DEVICE_IO Option Group as commplete. This Option
Group is required for PSE51, PSE52, PSE53, PSE54, and most of
the interesting applications involving file descriptors and
sockets.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
748252aa76 posix: device_io: use mode argument correctly in open()
Previously, we had only used the flags field and ignored mode
with the open() function.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
ab8b28ed7b posix: device_io: implement fileno()
Implement fileno() as required by the POSIX_DEVICE_IO Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
399458e3b4 posix: device_io: implement fdopen()
Implement fdopen(), as required by the POSIX_DEVICE_IO Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
1715196cff posix: device_io: implement pselect()
Implement pselect() as it's required by POSIX_DEVICE_IO

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
b3d3d4fff7 net: sockets: move select() implementation to zvfs
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
881dc1fa7a net: sockets: move poll implementation to zvfs
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
5ccbaeff39 posix: device_io: implement pread() and pwrite()
Add pread() and pwrite() implementations, which are nearly
identical to read() and write() but differ in that they do not
update the file-descriptor offset and instead read from a
specific file offset.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
fe26de9606 posix: device_io: require a full libc for c89 functions
The POSIX_DEVICE_IO Option Group requires a number of c89
functions mainly from stdio.h .

Namely,

clearerr(), fclose(), feof(), ferror(), fflush(), fetc(),
fgets(), fprintf(), fputc(), fputs(), fread(), freopen(),
fscanf(), fwrite(), getc(), getchar(), gets(), perror(),
printf(), putc(), putchar(), puts(), scanf(), setbuf(),
setvbuf(), ungetc(), vfprintf(), vfscanf(), vfprintf(), and
vscanf().

Additionally, symbols stdin, stdout, and stderr should be
provided.

These should be provided by any conformant C library
(not by the POSIX API).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
6f766a0058 fdtable: read, write, close: only execute methods if non-NULL
Only invoke vtable methods read, write, and close if they are
non-NULL.

The close() vtable method is optional, so that should not return
an error if zvfs_close() is called and that method is
unimplemented.

Otherwise, if zvfs_read() or zvfs_write() are called and the
corresponding vtable method is unimplemented, fail setting
errno to EIO.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Phi Bang Nguyen
eac7e604c2 dts: bindings: video: Add common video interface binding
Add common video interface binding. This binding contains the most
common properties needed to configure an endpoint subnode for data
exchange with other device.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-14 13:01:40 +02:00
Yonatan Schachter
8b2cdd4577 bindesc.h: Include missing device.h
bindesc.h did not explicitly include device.h. For some build scenarios
this caused compilation warnings, failing the CI.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-14 13:01:23 +02:00
Mahesh Mahadevan
1f0a15fa08 drivers: sensor: Fix NXP LPCMP driver
Fix Build failure due to undefined variable.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-10-14 13:01:13 +02:00
Daniel Leung
1ec5ce05f9 dp: swdp_bitbang: fix unused variable build error
The variable config in sw_port_off() is not used, and it's
causing CI build error about unused variable. So remove it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-11 17:04:38 -05:00
Chaitanya Tata
10d49736cf boards: nordic: nrf7002dk: Remove NS variants
The NS variants need crypto changes from NCS, so, remove it from
upstream till their support is upstreamed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-11 13:32:09 -04:00
Yonatan Schachter
9472f845b8 samples: Add read_bindesc sample
Added a sample to demonstrate how to read binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
31fe9645ea tests: Add tests for bindesc reading
Added tests for bindesc reading, to test reading on multiple C/C++
standards. Only RAM and flash backends are tested, as the flash
simulator can't simulate a memory mapped flash.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
41e1c436e5 doc: bindesc: Add documentation for bindesc read
Added documentation for reading binary descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
00800d4818 bindesc: Add support for reading binary descriptors
This commit adds support for reading and parsing binary descriptors.
It can be used for reading the descriptors of another image, or for
iterating over one's own descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
fd68fc486c bindesc: Add maximum data size and assertion
Add a Kconfig symbol to limit the maximum size of a descriptor's
data, enforced by a build assertion.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
5da7ba55aa west: bindesc: Added get_offset command
Add `west bindesc get_offset` command to print the offset of
the descriptors inside the given image.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Yonatan Schachter
c8c25b5c52 bindesc: Fix placing of the descriptors end tag
Prior to this fix the descriptors end tag was placed in the binary
using LONG. This was wrong because the tag is of type short, and
the size of the descriptor (0), should have also been placed.
It so happened that on little endian machines the incorrect linker
script yielded correct results, as the extra zeros added to make
the value a long ended up as the correct byte sequence
(FF FF 00 00). On big endian machines however, the wrong sequence
is generated (00 00 FF FF).
This patch correct this issue.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00
Moritz Geier
da87952948 west: runners: stm32cubeprogrammer: Fixed behaivor if programmer is in path
Enabled west commands to use CubeProgrammer installed in custom directory.

Signed-off-by: Moritz Geier <moritz.geier@proton.me>
2024-10-11 13:20:29 -04:00
Maximilian Deubel
b0936ae353 drivers: dp: swdp_bitbang: power optimization
This patch changes GPIO initialization
to be in PORT_OFF state by default.
Also, if no transceiver is attached to the signals,
the GPIOs are configured to be disconnected to preserve power.

I tested this on a prototype board where we are going to have
a debugger in a low-power context.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-11 13:20:18 -04:00
Jordan Yates
8746a2aa12 tests: fs: fat_fs_api: add timestamp integration
Add an example implementation of `get_fattime` to the API tests. Also
ensure that `FS_FATFS_EXTRA_NATIVE_API` compiles in a test.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jordan Yates
a1d6f8081a fs: fatfs: additional ELM FAT options
Make additional ELM FAT library options configurable to the user.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jordan Yates
4235dbfd2b fs: fatfs: add missing dependency
Add a missing dependency on `!FS_FATFS_READ_ONLY`` for `FS_FATFS_MKFS`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-11 13:20:08 -04:00
Jamie McCrae
3406515f12 sysbuild: images: bootloader: Add RAM load note
Adds a note about MCUboot RAM requirements for this

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae
525f2b9153 samples: mgmt: mcumgr: smp_svr: Add RAM load configuration
Adds configuration for booting this sample in RAM load mode on
nrf52840dk

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae
646f116cca mcuboot: Add support for RAM load mode
Adds supporting code that allows the RAM load mode of MCUboot to
be used and for applications to build successfully with it.
Sysbuild can be used to build images for this mode

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Jamie McCrae
8774f15bd2 sysbuild: cmake: Add set_config_int() function
Adds a function that will add an integer value to an image

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-11 13:19:39 -04:00
Krzysztof Chruściński
e11d050b23 drivers: pwm: nrfx: Improve runtime PM
Rework PM handling to use pm_device_driver_init(). Shim is not using
put and get internally as there is no api that disables or stops
pwm so it is hard to determine when to put the device. There are cases
when PWM peripheral is stopped but PWM is still active because
duty cycle is 100% or 0% and pin is driven by GPIO and not PWM.

If user want to use runtime PM with PWM it is possible and getting
the device will initialize internal data and putting will suspend
by forcing PWM stop if used and setting pins to sleep state. However,
from power consumption perspective it is enough to set 0% or 100%
duty cycle on all channels.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Krzysztof Chruściński
c3a33cfd3e drivers: pwm: nrfx: Disable PWM peripheral when not used
Shim was not correctly disabling PWM when it was not used. Task
STOP was triggered but PWM->ENABLE remained set which caused
increased current. Added interrupt and enabled event handler in
the nrfx driver to allow disabling PWM on STOPPED event.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Krzysztof Chruściński
0ab86c48dd drivers: pwm: nrfx: Improve device generation macros
Use NRFX_FOREACH_PRESENT macro to iterate over all PWM instances
and create device only for those enabled in the devicetree.
This approach removes need of changing driver code when new
instance id is added.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-11 13:18:34 -04:00
Yangbo Lu
85501c5414 include: arm: arm_mpu_v8: support memory attribute for device for Cortex-M
Supported memory attribute for device for Cortex-M.
Not sure why such code was conditional compile for only Cortex-R,
but Cortex-M also suited.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-11 13:18:21 -04:00
Guillaume Gautier
ded9e11d59 drivers: dma: stm32 dmamux: fix for c0 hal update
Fix the DMAMUX driver for the STM32C0 HAL update. Typedef used in function
is now const.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Guillaume Gautier
48ba84bb95 drivers: clock: stm32 common: update ahb prescaler
STM32C0 have a different prescaler for SYSCLK and for HCLK.
Updates the clock driver to use the appropriate prescaler for each series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Guillaume Gautier
d61a984bd6 west.yml: update hal_stm32 to use latest version
Update hal_stm32 to use the latest version.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-11 13:18:01 -04:00
Sudan Landge
8bdd45be47 arch: arm: cortex_a_r: smp: minor fix for non cache coherent cores
What is changed?
1. Updated the data sync barrier to make sure the other parameters of
   `arm_cpu_boot_params` are updated before updating its member `mpidr`
2. Updated the MPIDR affinity level mask to account for affinity level
   1 and 2 along with level 0.

Why do we need this change?
1. As reported in issue #76182, on Cortex_A_R, the current code
   execution fails to consider the correct sequence of data sync
   barrier and cache maintenece for the code to work on non cache
   coherent cores in SMP enabled mode.
   The secondary cores are waiting in a loop for primary core to set
   `arm_cpu_boot_params.mpidr`. As soon as primary core set this,
    the secondary cores start reading other parameters from the
   `arm_cpu_boot_params` however, the existing position of DSB
   instruction doesn't guarantee that `arg`, `cpu_num` and other
   parameters of `arm_cpu_boot_params` would be updated before `mpidr`
   is udpated and this could lead to a unpredicatble behaviour so,
   we need to move the DSB instruction.
2. The affinity level mask is updated because it didn't account for
   level 1 to identify individual cores within a cluster and
   level 2 to identify different clusters within the system which can
   lead to an incorrect conversion between mpidr to core-id.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
Sudan Landge
67f3d0b923 tests: kernel: smp: Test cpu affinity with custom ROM offset
What is the changed?
CPU affinity test for SMP cores will now cover a change in ROM offset.

How is it changed?
Add a new testcase section with ROM offset set to something other than
the default 0.

Why is it change?
There is no test to cover the issue reported in #76182 and the cpu
affinity test is the closest to test the issue. Adding a new testcase
will makes sure there is no breaking change in the future.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
Sudan Landge
ac2de3fa7c arch: arm: cortex_a_r: Set VBAR for all cores
What is changed?
Secondary cores can now boot successfully on cache and non-cache
coherent systems if the Zephyr image/vector table is loaded at an
address other than the default address 0x0.

How is it changed?
1. By calling the relocate_vector() from reset.S as part of EL1 reset
   initialization instead of prep_c to have VBAR set for all cores and
   not just for the primary core.
2. Remove dead code under CONFIG_SW_VECTOR_RELAY and
   CONFIG_SW_VECTOR_RELAY_CLIENT.

Why do we need this change?
1. As reported in issue #76182, on Cortex_ar, VBAR is set only for
   the primary cores while VBAR for the secondary cores are left with
   default value 0.
   This results in Zephyr not booting on secondary cores if the vector
   table for secondary cores is loaded at an address other than 0x0.
   VBAR is set in relocate_vector() so we move it to reboot.c which is
   better suited to have configs related to system control block.
2. The two SW_VECTOR_RELAY configs have a direct dependency on
   CONFIG_CPU_CORTEX_M, which is disabled while compiling for
   Cortex-A and Cortex-R hence leading to a dead code.

How is the change verified?
Verified with fvp_baser_aemv8r/fvp_aemv8r_aarch32/smp.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-10-11 13:17:25 -04:00
TOKITA Hiroshi
2c95978f3b MAINTAINERS: Add build_all test files for bbram and flash
Add build_all to `files:` entry to bbram and flash.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi
eebed141cf tests: drivers: build_all: Add a build_all test for flash
The test targets the following devices at this time.

- atmel,at45
- jedec,spi-nor

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi
60dc055f9e tests: drivers: build_all: Add a build_all test for bbram
The test targets the following devices at this time.

- microchip,mcp7940n

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
TOKITA Hiroshi
23496f5208 tests: drivers: build_all: eeprom: Add config for ti,tmp116-eeprom
Add configuration to add `ti,tmp116-eeprom` to build test.

Also, adding emulator build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-11 13:16:53 -04:00
Francois Ramu
48a2aedb78 soc: st: stm32h7rs serie requires specific power rails
Enables the XSPIM2 rail when using GPIO bank N
Enables the XSPIM1 rail when using GPIO bank O or P
Enables the USBvoltage detector when using the GPIO M

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-11 13:16:43 -04:00
Marek Pieta
bc5f1c8186 doc: releases: Add note for CONFIG_BT_CONN_TX_NOTIFY_WQ
Change adds a release note informing about the newly introduced Kconfig
option for Bluetooth stack.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-10-11 13:16:26 -04:00
Marek Pieta
341f1f502d bluetooth: conn: Use a separate workqueue for connection TX notify
Use a separate workqueue instead of system workqueue for connection TX
notify processing. This makes Bluetooth stack more independent from the
system workqueue.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-10-11 13:16:26 -04:00
Reto Schneider
7fa5a222a0 drivers: flash: Sort CMake and Kconfig files alphabetically
By sorting the lines alphabetically, merge conflicts can be reduced.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-10-11 13:16:15 -04:00
Joakim Andersson
d794d58d64 drivers: nrf_qspi_nor: Check poll period before sleep
Check that the poll period is non-zero before sleeping.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-10-11 13:16:05 -04:00
Joakim Andersson
14c896b647 drivers: nrf_qspi_nor: Fix build without multithreading
Fix build of nrf_qspi_nor flash driver without multithreading enabled.
This is required for builds like mcuboot.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-10-11 13:16:05 -04:00
Alexandre Bailon
0d5f8e3524 cmake: flash: Update OPENOCD variables to work with sysbuild
Defining OPENOCD and OPENOCD_DEFAULT_PATH when we are using sysbuild
doesn't make any effect.
This updates flash.cmake to make these variables compatible with sysbuild.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-10-11 13:15:56 -04:00
Torsten Rasmussen
32e5894ab9 manifest: update picolibc to avoid setting of CMAKE_BUILD_TYPE
This commit updates picolibc module so that CMAKE_BUILD_TYPE is not
defined by picolibc when building with Zephyr.

The avoids a situation where both picolibc and Zephyr defines the
optimization level, for example like: `-Os -O2`.

And remove the warning:
> CMake Warning at .../zephyr/CMakeLists.txt:2166 (message):
>
> The CMake build type was set to 'MinSizeRel', but the optimization
> flag was set to '-O2'.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-11 13:15:37 -04:00
Fabio Baltieri
523efee132 tests: build_all: input: clean up the i2c device list
Make the address sequential again, drop a stray blank line.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-11 13:15:27 -04:00
Wajdi ELMuhtadi
9af50a7b19 drivers: sensor: wsen_tids: remove wsen_tids driver
Remove wsen_tids since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi
8f684cfe9b drivers: sensor: wsen_pdus: remove wsen_pdus driver
Remove wsen_pdus since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi
8c0b09ddc3 drivers: sensor: wsen_pads: remove wsen_pads driver
Remove wsen_pads since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi
449bf8019c drivers: sensor: wsen_hids: remove wsen_hids driver
Remove wsen_hids since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Wajdi ELMuhtadi
5f584052d8 drivers: sensor: wsen_itds: remove wsen_itds driver
Remove wsen_itds driver since the hal update
is no longer compatible with this version.

Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
2024-10-11 13:15:10 -04:00
Henrik Brix Andersen
164447a3c6 boards: st: stm32h745i_disco: m7: remove CAN sample-point properties
Remove explicit CAN controller sample-point/sample-point-data values and
instead rely on the defaults, as they change with the configured bitrate.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-10-11 13:14:40 -04:00
Benjamin Cabé
3af51ddce1 doc: boards: extensions: fix vendor selection from URL
Apply selection from the hash URL *after* having sorted the vendors
alphabetically.
Remove the initial call to updateBoardCount() as it is useless to
have one this early.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-11 13:14:29 -04:00
Benjamin Cabé
a1261773db doc: boards: extensions: fix CSS rule
Fix a regression introduced at the last minute when cleaning up
the stylesheet. The rule as it was made no sense.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-11 13:14:29 -04:00
Benjamin Cabé
a5ecd339d7 doc: boards: extensions: update code comment for consistency
Very minor fix for having consistent style in the coment

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-11 13:14:29 -04:00
Carles Cufi
b0f6f1d33a Revert "lib: fix ubsan errors in cbvprintf_package"
This reverts commit 6f95a50553.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-11 13:13:49 -04:00
Quy Tran
4793e00ae8 boards: renesas: Add configurations to support pwm on EK-RA8D1
Add support for PWM driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-10-11 09:28:29 +02:00
Quy Tran
1391355ac4 boards: renesas: Add configurations to support pwm on MCK-RA8T1
Add support for PWM driver on MCK-RA8T1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-10-11 09:28:29 +02:00
Duy Phuong Hoang. Nguyen
59dbbb347d drivers: pwm: Initial support for PWM driver on RA8
Add PWM driver code support for RA8. This support is using
GPT HW

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-10-11 09:28:29 +02:00
Curtis Malainey
6f95a50553 lib: fix ubsan errors in cbvprintf_package
It is undefined behaviour to shift / add offsets to a null pointer.

Move to direct offset tracking to satisfy UBSAN.

Simple translation of code:
buf0 -> buf
buf +=/++ -> offset +=/++
buf = -> buf+offset =

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2024-10-11 09:28:21 +02:00
Lucas Dietrich
d056455fce dts: Enable AES node in nucleo_l4a6zg.dts
Activate AES node in nucleo_l4a6zg.dts to enable testing of the
st,stm32l4-aes driver in CI.

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2024-10-11 09:28:12 +02:00
Lucas Dietrich
1d9af414d6 dts: stm32l4: Update AES node for stm32l4 series
The stm32l4 devices were previously assigned the generic STM32 AES driver,
which turned out to be incompatible with the stm32l4 series. This commit
updates the nodes to use the new driver specifically designed for this
series.

Add missing node for stm32l4a6, stm32l4q5, stm32l4s5 and stm32l486 socs.

It appears stm32l4p5 and stm32l496 socs do not have the AES accelerator
present, so the nodes are removed from the dts files.

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2024-10-11 09:28:12 +02:00
Lucas Dietrich
11abb5e4fc drivers: crypto: Fix pointer type warnings in STM32 AES driver
This patch resolves compiler warnings related to mismatched pointer types
between the STM32L4 and generic STM32 AES HAL by introducing CAST_VEC
macro.

Fix github CI warning

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2024-10-11 09:28:12 +02:00
Lucas Dietrich
ad431dcc23 drivers: crypto: Add support for STM32L4 AES accelerator
This patch completes the addition of support for the STM32L4 AES
accelerator by introducing conditional handling for different STM32 AES
HAL variants. Key changes include:

- Created device tree bindings `st,stm32l4-aes` for STM32L4 AES
- Replaced `copy_reverse_words` with `copy_words_adjust_endianness`
to handle endianness conversion for different variants.

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2024-10-11 09:28:12 +02:00
Lucas Dietrich
8f0de8455d drivers: crypto: Refactor encryption and decryption functions for STM32 AES
This patch introduces a unified function pointer approach to handle
encryption and decryption operations for the STM32 AES accelerator.

- Replace separate `do_encrypt` and `do_decrypt` functions with a generic
`do_aes` function, using function pointers to AES HAL functions.

Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
2024-10-11 09:28:12 +02:00
Alexander Kozhinov
fbeda5959d drivers: ethernet: eth_stm32_hal_priv.h
Remove unused missleading definition.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-10-11 09:28:05 +02:00
Alexander Kozhinov
0036b8bf21 drivers: ethernet: eth_stm32_hal
Drop preprocessor redefinitions

Some preprocessor defines were redefined to follow
stm32 hal naming conventions.
People seems to be confused by redefines and use
them with alternating names.
This PR does not change code behaviour,
but shall increase it's readability.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-10-11 09:28:05 +02:00
Laurentiu Mihalcea
2fcd6c0ae4 boards: nxp: imx8{qm/qxp}_mek: enable PDs and runtime PM
Enable support for device runtime PM and power domains.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
fdbf4d23df dts: xtensa: nxp_imx8: add power domain for irqsteer
Add power domain DT node for the irqsteer and a reference to
it in irqsteer's DT node.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
202794273d drivers: intc: irqstr: add PM support
Add support for PM. The strategy is as follows:

	1) For level 1 interrupts: don't care, these don't
	require the PM domain of irqsteer to be turned on
	since they are, well, direct.

	2) For level 2 interrupts: use the reference count
	of the dispatchers.

Upon doing a get() on a dispatcher with its reference count
set to 0, before enabling the IRQ (meaning accessing the
reg. space) increment the reference count of the irqstr device
(which will result in the PM domain being enabled if 0).

Upon doin a put() on a dispatcher with its reference count
set to 1, after disabling the IRQ (meaning accessing the
reg. space) decrement the reference count of the irqstr device
(which will result in the PM domain being disabled if 0).

In summary, the PM domain of the device will be enabled if
at least one dispatcher is in use. On the other hand, the
PM domain of the device will be disabled if there's no
dispatchers in use (assuming there's no other dependencies).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
4fba1d4642 drivers: power_domain: add driver for NXP's SCU-managed PDs
Add driver for NXP's SCU-managed power domains.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
6b6443f11f include: dt-bindings: power: add IMX SCU resource header
Add header file containing definitions of IDs for all resources
managed by NXP's SCU.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
fb84f4f53f dts: bindings: power-domain: add binding for NXP's SCU-managed PDs
Add DT binding for NXP's SCU-managed PDs. This binding describes
exactly _one_ power domain.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
e8d28bfdfd drivers: dai: sai: disable IRQs when not needed
IRQs are currently only enabled during the driver
initialization function (i.e: sai_init()). As such,
even though they're not needed (i.e: after a TRIGGER_STOP
operation) they remain enabled. Fix this by enabling IRQs
after during the TRIGGER_START operation and disabling them
during the TRIGGER_STOP operation.

This change is required by irq chips (i.e: irqsteer) which
perform PM operations during irq_enable()/irq_disable(). If
interrupts are left enabled all the time that means the irq
chip's PM resources might also remain enabled.

To make this change possible, the irq will have to be stored
inside the SAI's configuration structure.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
48b98a9284 drivers: dma: dma_nxp_edma: disable IRQs when not needed
IRQs are currently only enabled during channel setup
and never disabled. As such, even though they're not
needed (i.e: after a channel has been suspended or stopped)
they remain enabled. Fix this by enabling IRQs during the
channel start() operation and disabling them during the
channel stop() operation.

This change is required by irq chips (i.e: irqsteer) which
perform PM operations during irq_enable()/irq_disable(). If
interrupts are left enabled all the time that means the irq
chip's PM resources might also remain enabled when not needed.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
c7be48aae4 drivers: intc: irqstr: manage dispatchers dynamically
Currently, all dispatcher interrupts are enabled during
the driver init() function, which will cause a bus fault
unless the PM domain associated with irqsteer is powered on.

Since PM will be done during irq_enable()/irq_disable(),
add support for dynamically enabling/disabling dispatchers.
This way, the reg. space of the dispatchers will be accessed
when the PM domain is powered on.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Laurentiu Mihalcea
d274cabf83 drivers: intc: irqstr: add reference count for IRQs
Currently, shared interrupts pose a big problem because
irq_disable() doesn't keep track of the number of clients
using that interrupt line. As such, add a reference count
mechanism which will stop the interrupt from being disabled
if there's still clients using it.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-11 09:27:57 +02:00
Ioannis Damigos
7455bf50d2 twister: Fix reported testcase execution time
Testcase execution time doesn't match between twister.xml and
twister.log. Testcase execution time is the sum of the previous
testcases' execution time plus its own execution time in
twister.xml.

This patch fixes the issue above.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-11 09:27:51 +02:00
Jun Lin
b05e23cbf0 dts: npcx: remove unnecessary sub-power state for npcx4
NPCX9 and former chips defines two kinds of sub-power-states to support:
1. Standard wake-up time: if the chip needs to stay in the deep sleep
   state more than 200 ms.
2. Instant wake-up time: if the chip needs to stay in the deep sleep
   state less than 200 ms.

As NPCX4 can stay in the deep sleep state at more than 200 ms with the
instant wake-up capability, we can define only one sub-power state.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-10-11 09:27:45 +02:00
Phi Bang Nguyen
6acad9bd91 include: drivers: video: Remove unused video-controls header
Remove the unnecessary video-controls header included in video.h.
Drivers, applications should explicitly include it when needed.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-11 09:27:38 +02:00
Phi Bang Nguyen
d29ef14bcf include: drivers: video: Run clang-format
Run clang format before making changes

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-11 09:27:38 +02:00
Bjarki Arge Andreasen
e40fa8914f MAINTAINERS: add entry for comparator drivers
Add entry for comparator drivers

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
43f88ca8e1 doc: release notes: added comparator release notes
Added comparator support to release notes for release 4.0

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
183e58b190 docs: hardware: peripherals: add comparator docs
Add documentation for the comparator peripheral and shell.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
4ff9886e48 tests: drivers: comparator: add shell test suite
Add test suite for comparator device driver shell.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
2fbe105a47 drivers: comparator: add fake comparator
Add fake comparator driver and bindings for use with testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
b7648f89c4 drivers: comparator: add shell
Add shell for comparator device drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
6ed855a53f tests: drivers: build_all: comparator: add mcux_acmp
Add mcux_acmp device driver to build_all test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
d37f844104 drivers: comparator: add mcux acmp device driver
Add mcux SDK based kinetis acmp device driver implementing the
comparator device driver API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
3b08a08c7f doc: releases: migration-guide: deprecated nxp,kinetis-acmp props
Add entyr mentioning the deprecation of the nxp, prefixed properties
in the nxp,kinetis-acmp dts binding.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
4e55597527 drivers: sensor: mcux_acmp: update dts binding and adapt driver
Update the devicetree binding for the nxp,kinetis-acmp comparator and
move the binding to dts/bindings/comparator.

The update to the binding includes:
- Remove unused io-channel-cells property
- Remove unused sensor-device include
- Adding missing properties dac config, discrete mode config, and
  input configs.
- Rename properties to exclude redundant vendor prefix since props in
  this binding are not inhereted, and as such, don't need to be
  namespaced.
- Deprecate the old names of the renamed properties

The sensor based device driver has been updated to support both the
deprecated and new property names. This allows it to use both
nxp,enable-sample and filter-enable-sample for example.

Additionally, remove the unused io-channel-cells properties from
in-tree nodes of compatible = "nxp,kinetis-acmp"

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
e0363f252d sensor: mcux_acmp: namespace driver and kconfigs
The mcux_acmp will get support by the comparator subsystem. To avoid
namespace clashes, namespace the driver, kconfigs and use the
MCUX_ACMP config solely to select the MCUX SDK driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
a4fce338ac tests: drivers: build_all: comparator: add nrf_lpcomp
Add nrf_lpcomp to build_all comparator test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
04e70ab96c drivers: comparator: add nRF LPCOMP device driver
Add nRF LPCOMP device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
13af5ca0dc tests: drivers: build_all: add comparator test suite
Add comparator build_all test suite designed to test multiple
devicetree overlays and boards for each comparator device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
4adc92475d drivers: comparator: Add nRF COMP device driver
Add nRF COMP device driver and remove deprecated bindings from
dts/bindings/sensor.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
ffbda1b0f8 dts: common: nordic: adjust comparator nodes
Adjust comparator nodes of nrf SoCs to exclude the unused
io-channel-cells property and simplify the comment describing how
to configure the comparator hardware block as COMP or LPCOMP for
SoCs which support this.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
211bdd935c drivers: comparator: Add initial files
Add top level CMakeLists.txt entry and Kconfig options along with
userspace handlers for comparator API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Bjarki Arge Andreasen
00cefa15ff drivers: Add comparator API
Add comparator API header.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-10-10 20:24:52 -04:00
Jordan Yates
97db13dc09 scripts: west_commands: runners: propagate arguments
Provide a mechanism to propagate useful arguments from one runner to the
next. The primary use case for this is to propagate a JLink serial
number, so that if it is queried from the terminal the user only needs
to make the choice once.

Implements #76077.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 20:24:35 -04:00
Nerijus Bendžiūnas
c591994b4f docs: settings: clarify conditions for csi_save_start and csi_save_end
Clarify that the actual calls to these backend functions are made
from `settings_save_subtree()`, which is called by `settings_save()`
or can be used directly.

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@astrolightspace.com>
2024-10-10 20:24:21 -04:00
Bernardo Perez Priego
1cc93810d0 ec_host_cmd: Fix generating multiple Port80 notifications
Port80 notifications are continously generated as long as NOT_EMPTY
bit inside of Data Attributes register is set. This register was only
read once prior entering loop and its value was not checked on each
iteration.

This patch will include reading Data Attributes register on each
iteration, this way we can exit loop when no more data is available.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2024-10-10 20:24:06 -04:00
Vinayak Kariappa Chettimada
ad6c0512ad Bluetooth: Controller: Fix CIS payload count under skipped events
Fix CIS payload count calculation under skipped events that
caused CIS disconnection with reason MIC failure.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-10 20:23:36 -04:00
Kevin ORourke
3399e0614a shell: backend: telnet: Don't assert if connection closed
The code in shell_ops.c that calls telnet_write will assert if it
returns non-zero. For a telnet shell it's normal that the
network might disconnect unexepectedly, so that should not
trigger an assert.

Fixes #67637

Link: https://github.com/zephyrproject-rtos/zephyr/issues/67637

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-10-10 20:23:18 -04:00
Raffael Rostagno
9a5cd08deb uart: esp32: Fixing garbage characters on mcuboot
Fixes garbage characters on mcuboot by adjusting UART baudrate
during boot phase according to clock source.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-10 20:22:54 -04:00
Lars Knudsen
405492f009 Bluetooth: Audio: Shell: Fix BIS sync bit field validity check
NO PREF (0xFFFFFFFF) and BIT(0) was wrongly rejected.

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-10 20:22:39 -04:00
Lars Knudsen
7f1589e23b Bluetooth: ISO: Add ISO BIS bitfield check macro
Checks validity of ISO BIS bitfield (BIT(0)|...|BIT(30))

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-10 20:22:39 -04:00
Benjamin Cabé
05d59f7207 boards: Set full_name for all boards
Full name was set based on the information available either in board
documentation or in Twister files.
Whenever applicable, vendor name was dropped from the full name so that
all boards have a consistent naming scheme.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 20:22:21 -04:00
Ryan McClelland
f2d549d55b drivers: i3c: cdns: fixup attachment and addr assignment for daa
The ENTDAA does not have a way to assign DA that are with a PID. It will
assign DAs that were in it's RRs in the order that they win arbitration.
Assign only available addresses in to it's RRs before ENTDAA.

Cleanup the attach api to no longer require a addr argument and remove
the helper function `i3c_determine_default_addr`. This now looks at if
it has a static address or if it already has a dynamic address (such as
from DEFTGTS) and will register the address if either exist with
precidence of dynamic addr over static addr.

This also fixes up the look up for if a device already has a dynamic
addr to find which pos of the RRs is it is in.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-10 20:22:01 -04:00
Torsten Rasmussen
2c1eae216d cmake: update build_info() calls to use PATH argument
Update build_info() calls to use `PATH` argument when values passed to
`build_info()` are user specified and thereby might use native path
separator, such as a single `\`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-10 20:21:45 -04:00
Torsten Rasmussen
a5cd46b843 cmake: support PATH argument in build_info()
Support PATH argument in build_info() function.
The PATH argument can be used to provide a list of paths paths and that
those paths might be using native style, such as `c:\win\path', and
therefore should be converted to CMake style path.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-10 20:21:45 -04:00
Anas Nashif
121cb49a46 kernel: sched: inline update_cache
This improves context switching by 7% when measured using the
thread_metric benchmark.

Before:
**** Thread-Metric Preemptive Scheduling Test **** Relative Time: 120
Time Period Total:  5451879

After:
**** Thread-Metric Preemptive Scheduling Test **** Relative Time: 30
Time Period Total:  5853535

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-10 20:21:04 -04:00
Michał Stasiak
9b5260de9a tests: boards: nrf: qdec: modify QDEC tests to match new api
Overflow errorcode is now correctly detected when expected.
Subsequent sensor_channel_get() yield the same values, so
the check can be no longer ignored.
Added a sensor_sample_fetch() where missing for correct
sensor_channel_get() calls.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-10 15:01:20 -04:00
Michał Stasiak
2e6c83dd4c drivers: sensor: qdec: fix QDEC overflow handling
QDEC sensor driver fails to inform user of the overflow in the
ACC register, which makes the most recently fetched data invalid.
An error code return has been added to nrfx_qdec_sample_fetch(),
that indicates that an overflow has occured, based on oveflow flag.
Also, raw_acc field was added in the qdec_nrfx_data structure, to
adjust QDEC to sensor API rules - two subsequent sensor_channel_get()
calls should will yield the same values.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-10 15:01:20 -04:00
Gang Li
79222c9c11 hostap: add WPA-Auto-Personal(WPA2/WPA3 mixed) support
Add WPA-Auto-Personal support for AP and STA.
This mode uses WPA2/WPA3 SAE mixed security with PSK.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-10-10 14:59:55 -04:00
Michal Smola
d04c3c1817 tests: drivers: counter_basic_api: Support mcux rtc counter
Allow counter_mcux_rtc in reliable_cancel_capable test.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-10 14:59:35 -04:00
Michal Smola
527a2258fe boards: frdm_mcxc242: Add counters support
mcxc242 has lptmr, pit and rtc counters, but it is not documented and
not listed in frdm_mcxc242.yaml.
Add the counters to board documentation, to the yaml file, and enable
it explicitly in board dts. Set rtc clock to 32 kHz oscillator.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-10 14:59:35 -04:00
Michal Smola
8a674e157c dts: nxp mcxc: Add counters configuration
Counters configuration is missing in Devicetree for NXP MCX C series.
Add lptmr, rtc and pit configuration to Devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-10 14:59:35 -04:00
Jordan Yates
257c5e6aff bluetooth: conn: increase log level of timeout ignore
Notifying users that the supplied timeout is being ignored is worthy of
a higher log level than debug. Any such usage should be changed at the
application level.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 14:59:16 -04:00
Jordan Yates
88ee2bee39 net: buf: increase log level of timeout ignore
Notifying users that the supplied timeout is being ignored is worthy of
a higher log level than debug. Any such usage should be changed at the
application level.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 14:59:16 -04:00
Pavel Vasilyev
74972e694b bluetooth: host: l2cap: Check conn state before queueing PDU
In case of UATT, if a connection was lost while user was holding a read
or write attribute callback, `bt_l2cap_send_pdu` (called from
`att.c::chan_send`) will anyway queue a PDU and trigger tx work. The PDU
won't be sent eventually, but neither will hold an error code, which
will allow it to bypass the error check in `att_on_sent_cb` and call
`att_sent` function.

For EATT `bt_l2cap_chan_send` is used which already handles this case
and the error code is passed to `att_on_sent_cb`.

This change adds connection state check to `bt_l2cap_send_pdu`
preventing from unnecessary code execution when connection does not
exist anymore.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-10 14:59:02 -04:00
Pavel Vasilyev
f7e8a8717b tests: bsim: bluetooth: host: att: Add ATT timeout test
This commit tests that the host correctly disconnects from peer when ATT
timeout happens.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-10 14:59:02 -04:00
Pavel Vasilyev
f712bde122 bluetooth: host: att: Implement disconnect on ATT timeout
The timeout state is local and can block new ATT operations, but does
not affect the remote side. Disconnecting the GATT connection upon ATT
timeout simplifies error handling for developers. This reduces rare
failure conditions to a common one, without needing special cases for
ATT timeouts.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-10 14:59:02 -04:00
Maochen Wang
9487952a4f net: fix build error in DPP struct
Fix build error in DPP struct when building Matter over Wi-Fi.
The struct declaration must be done outside of the anonymous union.
Only struct definition can be done inside the anonymous union.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-10 14:58:44 -04:00
Maochen Wang
838ff13fe2 hostap: fix other STA failed to connect to SAP
The format of wpa_passphrase and sae_password is wrong when start the
SAP, which leads the invaild MIC check error when other STA try to
connect in security mode. Change the wrong format can fix this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-10 14:58:31 -04:00
Pieter De Gendt
23871f6ecb tests: drivers: build_all: display: Add coverage
Make display tests depend on the "display" feature. And add a testcase
as example.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-10 14:58:13 -04:00
Pieter De Gendt
1c630f0661 boards: nxp: mimxrt1170_evk: Add display support for cortex m7
Add a 'display' entry to NXP's mimxrt1170 EVK supported features.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-10 14:58:13 -04:00
Pieter De Gendt
de93f95622 boards: native: Add display to native board features
Add a 'display' entry for the native sim/posix supported features.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-10 14:58:13 -04:00
Fabrice DJIATSA
371d4adb06 drivers: mipi_dbi: update macro to get address
DT_REG_ADDR now generates an unsigned string terminated with U
which doesn't match the way the macros is used in a CONCAT
to build a FMC_BANK1_(1/2/3) define that is defined in hal.
`DT_REG_ADDR_RAW` should now be used to get the RAW FMC bank index

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-10-10 14:57:58 -04:00
Fabrice DJIATSA
18e568d5c7 boards : st: add U0 boards images to documentation
add references to images of boards already present in the
index.rst files (for nucleo_u083rc, nucleo_u031r8, stm32u083c_dk)
so that they can be displayed in the documentation.


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-10-10 14:57:40 -04:00
Chaitanya Tata
80db01f3bf drivers: nrfwifi: Fix random MAC address setting
Random MAC address setting can never be configured as the two defaults
cover all cases. Fix the defaults, now the order is

* Fixed
* OTP (default, in case of no config)
* Random

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 14:57:27 -04:00
Jordan Yates
865f88c803 tests: zbus: publish_stats: test publishing statistics
Test the new publishing statistics functions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 14:57:13 -04:00
Jordan Yates
e45ab126ea zbus: optional publishing statistics
Add optional statistics around the channel publishing action. Store the
time a channel was last published to, and a total publish count.

This information can be used to determine how old a given channels data
is, and an average channel publishing frequency.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-10 14:57:13 -04:00
Benjamin Cabé
f2f1496156 doc: Introduce boards catalog
This commit adds support for generating an interactive catalog of all
the supported boards that can be included in the documentation using
the `.. zephyr:board-catalog::` directive.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 14:56:57 -04:00
Benjamin Cabé
4eb415e317 doc: extensions: conditionally includes css/js assets
Only add js/css needed for live code sample search to the pages
that actually need it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 14:56:57 -04:00
Dmitrii Golovanov
27456ed2b5 twister: blackbox: coverage: fix matching pattern
Fix the expected pattern randomly matched to coverage.json contents
ordered differently at test_coverage_basedir().

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-10-10 04:19:56 -04:00
Trung Hieu Le
fc90c9f824 drivers: video: ov5640: Add support for changing frame rate
Add support for changing frame rate

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Farah Fliss
863b43be46 drivers: video: ov5640: Add some controls
Add some controls:
- hue
- saturation
- brightness
- contrast
- gain
- hflip
- vflip
- power line frequency filter
- pixel rate (read-only) which is needed for changing frame rate

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
c1980c2806 drivers: video: ov5640: Add support for test patterns
Add support for 4 test pattern modes:
- Color bar
- Color bar rolling
- Square
- Square rolling

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
865032103b drivers: video: ov5640: Some minor fixes and optimizations
Add some minor fixes and optimizations:

- Fix coding style
- Rename some variables
- Use the array variable size directly instead of defining a macro

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
ecd4c43026 drivers: video-controls: Rename colorbar to test pattern
Color bar is one type of test patterns. Rename it to
VIDEO_CID_CAMERA_TEST_PATTERN to be more generic.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
6007fb5c33 drivers: video-controls: Add some control IDs
Add some control IDs:

- VIDEO_CID_CAMERA_HUE
- VIDEO_CID_POWER_LINE_FREQUENCY
- VIDEO_CID_PIXEL_RATE which is needed for changing frame rate

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Phi Bang Nguyen
ae87d53ac5 drivers: video-controls: Run clang-format
Run clang format before making any changes.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-10 10:08:09 +02:00
Rodrigo Peixoto
e0b5c67dda zbus: add HEAP_MEM_POOL_ADD_SIZE_ZBUS
ZBus currently does not have a `HEAP_MEM_POOL_ADD_SIZE_ZBUS` when using
message subscribers or runtime observers, forcing the developer to set that
manually. Adding the configuration option to zbus would improve its
usability and make zbus easier to use. With this feature, zbus aligns with
the other Zephyr subsystems' heap memory allocation approach.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-10-10 10:08:02 +02:00
Declan Snyder
a6eb068e3c drivers: spi_mcux_lpspi: clang-format
Clang format the lpspi driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-10 10:07:55 +02:00
TOKITA Hiroshi
cf871692f4 tests: drivers: pwm: pwm_api: Add rpi_pico test configuration
Add test configuration for rpi_pico

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-10 10:07:47 +02:00
TOKITA Hiroshi
92b7b66396 samples: drivers: led: pwm: Update rpi_pico test configuration
Tweaking the parameters to go the sample without any errors.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-10 10:07:47 +02:00
TOKITA Hiroshi
6a84631eec samples: drivers: led: pwm: Makes blink and fade times configurable
Make the blinking and fading parameters adjustable so that samples
can be run on devices that support only short periods.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-10 10:07:47 +02:00
TOKITA Hiroshi
275162fd52 drivers: pwm: rpi_pico: Configuring the divide ratio adaptively
If the `divider-int-0` or variations of these for each channel properties
are not specified, or if these is 0,
the driver dynamically configures the division ratio by specified cycles.

The driver will operate at the specified division ratio if a non-zero
value is specified for `divider-int-0`.
This is unchanged from previous behavior.

Please specify ``divider-int-0`` explicitly to make the same behavior as
before.

In addition, the default device tree properties related to the division
ratio have been removed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-10 10:07:47 +02:00
Chaitanya Tata
5c9c95b593 manifest: hostap: Pull fixes from NCS
Pull fixes that are in NCS but missed in upstream.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Chaitanya Tata
970428419c modules: hostap: Use the build time flag
Instead of hard-coded value, use the build time flag.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Chaitanya Tata
b2c6f6c53b modules: hostap: Add missing default for max STAs in AP mode
The default should honor the build time flag.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Chaitanya Tata
3ade4bed27 modules: hostap: Fix heap pool allocation
Now that hostap is used k_heap, it needs to reserve the kernel heap not
libc heap.

Fixes #79477.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Chaitanya Tata
bcef9ac6ea modules: hostap: Use OS primitive even in native code
This was we can modify it in a single place that works both for native
and OS specific code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-10 10:07:41 +02:00
Benjamin Cabé
d13e0a1dbf doc: boards: infineon: fix various issues with cy8ckit_062s4
Title of the document was wrong, image info was missing, and a bunch of
other formatting issues.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 10:07:24 +02:00
Yves Vandervennet
2165a2c6bc boards: mimxrt1024_evk: enable support for linkserver
- update the EVK's board.cmake, making linkserver the default runner
 - update the board's document file

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-10-10 10:07:12 +02:00
Naveen Gangadharan
175407c9cc drivers: i3c: cadence: fix HDR-DDR write failures due to M1 errors
Fix M1 errors seen with HDR-DDR writes, M1 errors we seen between CRC
and HDR exit sequence. The fix was to set Bit-8 of HDR-DDR CRC TXFIFO
word.

Signed-off-by: Naveen Gangadharan <naveeng1001@meta.com>
2024-10-10 10:07:00 +02:00
Sylvio Alves
e48639e460 soc: esp32c6: add LLEXT linker entry
Make sure LLEXT sections are properly placed to avoid
orphan declaration.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-10 10:06:53 +02:00
Nithin Ramesh Myliattil
de14efef98 Bluetooth: BASS: add scan cb to scan delegator module.
Add scan cb to scan delegator so that Application
can be notified  when assistant starts or stops
scanning.
Also state information of Broadcast Assistant
is removed as info is not used.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-10-10 10:06:43 +02:00
Benjamin Cabé
acbda31707 west: boards: add full_name support in format string
The recently introduced board.full_name property can now be used as part
of the format string in the `west boards -f ...` command.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-10 10:06:31 +02:00
Michal Smola
61a87384f2 dts: nxp mcxc: Configure boot source to flash
NXP mcxc series has boot source configured to ROM. ROM bootloader
waits 5 sec for active peripheral detection timeout before jumping
to application in flash which makes booting very slow.
Change configuration to boot from flash and allow boot source
selection by external pin.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-10-10 10:06:22 +02:00
Robert Lubos
66ff30efb4 net: sockets: Move msghdr_non_empty_iov_count() to common file
msghdr_non_empty_iov_count() is used by TLS sockets too therefore should
be available regardless of native IP sockets being enabled or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-09 18:37:58 +01:00
Krzysztof Chruściński
8652e8e413 logging: Fix LOG_OUTPUT dependency
When CONFIG_LOG_OUTPUT is set, it indicates that logging strings
are formatted by the application (using log_output module). It is
not needed when backend works in the dictionary mode. So far
LOG_OUTPUT was set also when dictionary mode was used and that
prevented removing of the logging strings from binary which is
an important feature of the dictionary logging.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-09 18:37:49 +01:00
Krzysztof Chruściński
df683fd7f8 logging: log_output: Move flushing and writing to the header
Move log_output_flush and log_output_write (renamed internal
buffer_write() function) to the header as inline functions.
Those function are used by log_output_dict.c and there are cases
when log_output.c is not compiled in.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-09 18:37:49 +01:00
Robert Lubos
f4335d22ca net: if: Don't require native IP stack support for IPv6 lookups
IPv6 based interface lookups doesn't require native IP stack support,
hence reflect that in the API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-09 18:37:30 +01:00
Andrej Butok
491520f8a6 tests: mcumgr: Use EXTRA_ZEPHYR_MODULES
Use EXTRA_ZEPHYR_MODULES that replaced ZEPHYR_EXTRA_MODULES
since the Zephyr v3.4 release.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-09 18:37:15 +01:00
Nikodem Kastelik
e0860eb9a6 boards: nordic: nrf54h20dk: make RAM3x DMA region larger for cpurad
Some tests are failing on nrf54h20 cpurad in non-obvious manner
because of this memory region being too small.
Instead of adding overlays to each individual application,
make this region larger at expense of cpuapp equivalent.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-09 18:37:02 +01:00
Daniel Leung
9f4ea03c53 tests: zbus/hlp_priority_boost: skip Intel audio DSP platforms
All Intel Audio DSP platforms have non-coherent cache between
CPUs. So the zbus_channel struct data goes out-of-sync between
CPUs with multiple producer and consumer threads running
concurrently on multiple CPUs, resulting in bad pointer being
used, e.g. passed to memcpy(). So exclude these platforms from
running in twister as they are certain to fail.

Fixes: #79368

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-09 18:36:55 +01:00
Rafal Dyla
ec77fc399c modules: hal_nordic: Add global domain power request service
Service for powering peripherals that use GPIO pins
in the global power domains:
- Active Fast
- Active Slow
- Main Slow

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2024-10-09 18:36:47 +01:00
Jilay Pandya
9cf1269e0e shell: stepper: add further stepper signals to shell
This commit adds further signals to stepper shell
- STEPPER_SIGNAL_SENSORLESS_STALL_DETECTED
- STEPPER_SIGNAL_LEFT_END_STOP_DETECTED
- STEPPER_SIGNAL_RIGHT_END_STOP_DETECTED

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-09 18:24:08 +01:00
Jilay Pandya
27572ea59d drivers: stepper: test: build_all: tmc5041
This commit add tmc5041 to stepper build all tests

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-09 18:24:08 +01:00
Jilay Pandya
52c6a289f1 drivers: stepper: adi: trinamic tmc5041
This commit introduces initial structure for trinamic drivers
TMC5041 is implemented with following features:
- StallGuard
- RAMPSTAT_POLL
- RAMP_GEN

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-09 18:24:08 +01:00
Declan Snyder
42c43b9f9c boards: frdm_rw612: Add ethernet to twister yaml
Add netif:eth to twister yaml for frdm_rw612

Exclude from wifi test because of binary blob requirement

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-09 18:23:57 +01:00
Declan Snyder
719a21a312 boards: nxp: Add missing RW board feature tables
Add missing items to RW board feature tables.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-09 18:23:57 +01:00
Declan Snyder
86f65f2591 dts: nxp: Rename nxp,iap-msf1 to nxp,msf1
IAP is a reference to the method of software interaction with the flash
used in the current driver implementing support for this flash. The
DT compatible should not be named like this.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-09 18:23:39 +01:00
Vinayak Kariappa Chettimada
247037bd3e Bluetooth: Controller: Fix incorrect elapsed events value
Fix incorrect elapsed events value when event prepare are
aborted in the pipeline. This caused premature supervision
timeouts.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-09 18:23:10 +01:00
Vinayak Kariappa Chettimada
e21ff7067d Bluetooth: Controller: Fix BT_CTLR_SCAN_AUX_SYNC_RESERVE_MIN
Fix BT_CTLR_SCAN_AUX_SYNC_RESERVE_MIN such that event is not
aborted when near supervision timeout conditions.

Relates to commit ddf04997a5 ("Bluetooth: Controller: Add
abort fairness in overlapping Periodic Sync").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-09 18:23:10 +01:00
Vinayak Kariappa Chettimada
468b60087e Bluetooth: Controller: Introduce BT_CTLR_PERIPHERAL_ISO_RESERVE_MAX
Introduce BT_CTLR_PERIPHERAL_ISO_RESERVE_MAX Kconfig option
so that disabling this option will use minimum time
reservation and exercise the peripheral ISO connection event
continuation using is_abort_cb mechanism.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-09 18:23:10 +01:00
Vinayak Kariappa Chettimada
cadef5a64f Bluetooth: Controller: Introduce BT_CTLR_PERIPHERAL_RESERVE_MAX
Introduce BT_CTLR_PERIPHERAL_RESERVE_MAX Kconfig option so
that disabling this option will use minimum time reservation
and exercise the peripheral connection event continuation
using is_abort_cb mechanism.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-09 18:23:10 +01:00
Dominik Lau
c344cca8e9 boards: stm32f429i_disc1: inverted touch controller axes
This inverts x and y axes as reported by stmpe811 driver for stm32f429i.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-09 18:11:21 +01:00
Dominik Lau
b38a4ccbdb boards: added touch controller to the /chosen node
This adds zephyr,touch property to boards with touch controllers, analogous
to `zephyr,display`.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-09 18:11:21 +01:00
Dominik Lau
8941a2100c samples: drivers: added a simple touch controller sample
The sample is supposed to help examine the issues with touchscreen.
It draws a plus in last touched position.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-10-09 18:11:21 +01:00
Fin Maaß
ac670c4594 doc: releases: 4.0: change of hawkbit header
Mention change of the hawkbit header files.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
d28c0cf08c mgmt: hawkbit: move HAWKBIT_JSON_URL
move HAWKBIT_JSON_URL out of the header.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
94bad9d9ac mgmt: hawkbit: seperate header files
seperate the hawkbit header files, to make
it clearer.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
dce3d2de66 mgmt: hawkbit: seperate autohandler
seperate the autohandler from the main
hawkbit source. This way the autohandler can
be disabled if it is not needed.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
621cf5baec mgmt: hawkbit: get poll interval
Add function to get the poll interval.
This is needed to seperate the autohandler
from the main hawkbit code.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
a71fc667fb doc: releases: 4.0: change of hawkbit autohandler
Mention change of hawkbit autohandler and shell in the
migration guide and the release notes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
421ab502e4 mgmt: hawkbit: delay autohandler
Be able to delay the next run of
the hawkbit autohandler.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
f5a3d7dd8f mgmt: hawkbit: log start of autohandler from shell
If the run of the autohandler is started from shell,
it will be logged.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
4655ef317e mgmt: hawkbit: also use workqueue for shell run
Also use a workqueue, when execution of
hawkBit is requested via shell.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
6cc2bb53b4 mgmt: hawkbit: add hawkbit_autohandler_wait
Add hawkbit_autohandler_wait() to be able
to wait for the autohandler to finish.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
cf5f6aad23 mgmt: hawkbit: add option for autohandler
add option for autohandler to only run once.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Fin Maaß
35d05b7198 mgmt: hawkbit: use K_WORK_DELAYABLE_DEFINE
staticly init hawkbit_work_handle

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-10-09 18:10:30 +01:00
Yago Fontoura do Rosario
029540abec Bluetooth: Controller: Handle overlapping buffers on ull_adv{.c,_aux.c}
* Setting the adv data, scan rsp and adv aux ad data can happen on
overlapping buffers
* There can be other memcpy's that need to be changed to memmove but
these are the only ones I could reproduce the issue and since memmove
has a performance penalty, I left the others as is.

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2024-10-09 13:59:07 +02:00
Ayush Singh
5b5d6366e3 net: l2: ieee802154: shell: Fix stringop-truncation
- Fix the warning stringop-truncation
- Leave space for NULL terminator.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-09 13:50:00 +02:00
Ayush Singh
d8f3bfa7a2 samples: net: zperf: Add 802154-subg test
- Using beagleconnect freedom for testing subg overlay

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-09 13:50:00 +02:00
Ayush Singh
40d8926b20 samples: net: sockets: echo_server: Add 802154-subg test
- Using beagleconnect freedom for testing subg overlay

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-09 13:50:00 +02:00
Ayush Singh
1bafa95f50 samples: net: sockets: echo_client: Add 802154-subg test
- Using beagleconnect freedom for testing subg overlay

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-09 13:50:00 +02:00
Jordan Yates
4953389b1e net: socket_service: remove work_q parameter
Remove the `work_q` parameter from `NET_SOCKET_SERVICE_SYNC_DEFINE` and
`NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC` as this feature was dropped
during review but the removal was not 100% complete.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-09 13:48:54 +02:00
Jakub Rzeszutko
5bb721264b shell: add generic RX buffer flush function
Added a generic function `z_shell_backend_rx_buffer_flush` to clear
the RX buffer when resuming the shell. The function repeatedly calls
the backend's `read` API until the buffer is empty or a maximum of
1000 iterations is reached. This prevents unintended command
execution after `shell_start`.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2024-10-09 13:48:41 +02:00
Jordan Yates
d427d8a653 samples: drivers: gnss: display more information
Query and display additional information in the GNSS API sample.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-09 13:47:30 +02:00
McAtee Maxwell
61b00097d8 Verification: verify code changes from PR review
- verify code changes from PR review

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2024-10-09 13:46:56 +02:00
McAtee Maxwell (CSS ICW SW MTO INT 2)
30f2e5120a Drivers: RTC: Initial implementation of RTC for IFX cyw20829
- Initial driver implementation
	- Overlay for rtc_api test
	- dtsi updates.

Signed-off-by: McAtee Maxwell (CSS ICW SW MTO INT 2) <maxwell.mcatee@infineon.com>
2024-10-09 13:46:56 +02:00
Joel Jaldemark
2a1fde7aa3 drivers: input: ili2132a: add support for ili2132a touch controller
This commit adds basic ili2132a touch controller driver.

Signed-off-by: Joel Jaldemark <joeljaldemark@outlook.com>
2024-10-09 13:46:14 +02:00
Alberto Escolar Piedras
9451424677 ci: bsim tests: Also trigger on MbedTLS module changes
Trigger bsim tests also on changes to the MbedTLS module code in Zephyr
side. To avoid possible regressions in bsim tests when this code is
changed getting into main.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-09 13:45:41 +02:00
Fengming Ye
20e81f7c85 west.yml: update hostap revision
Update hostap revision to get crypto module test.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-09 13:45:30 +02:00
Fengming Ye
e40eef2d58 hostap: add crypto module test kconfig option
Add crypto module test kconfig option
CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_TEST,
which is default n and hidden.
It is only available by developer for crypto module test.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-09 13:45:30 +02:00
Krzysztof Chruściński
ddf753cdac debug: mipi_stp_decoder: Avoid potential 64bit unaligned access
Decoder was casting uint8_t pointers to uint64_t pointers which could
result in double word instruction which does not support unaligned
access on Cortex-M. Issue was revealed when -O3 optimization was
used instead of -Os. In size optimized version, compiler was
using word load and store instructions which support unaligned
access and issue was not visible.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-09 13:45:04 +02:00
Bas van Loon
1adb779ba5 drivers: adc: stm32: Implement boost settings for STM32H7.
After boost is implemented and enabled it allows for higher
sampling frequencies.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2024-10-09 13:44:54 +02:00
Alberto Escolar Piedras
b29f9f21bc Revert "coredump: ARM: Ensure sp in dump is set as gdb expects"
This reverts commit ec7943bb18.
This commit introduced a regression.
Let's revert it so we do not block development in main.
For more information see:
https://github.com/zephyrproject-rtos/zephyr/issues/79594

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-09 13:42:19 +02:00
Han Wu
1726443d9d drivers: sensor: mpu9250: fix mismatched value in log message
The print message prints cfg->accel_fs when cfg->gyro_fs is too big.

Signed-off-by: Han Wu <wuhanstudio@qq.com>
2024-10-09 09:49:40 +02:00
Sylvio Alves
0a56dc8055 boards: esp32-based: unset default libc in appcpu
As in all other esp32-based boards, APPCPU
does not require to have MINIMAL_LIBC as default libc.
In the past, that was required due to memory constraints,
which is not the case anymore.

This fixes build issues in `tests/lib/c_lib/common`.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-09 09:48:45 +02:00
Pisit Sawangvonganan
ea2d785a28 modem: cmux: replace crc8 with crc8_rohc for FCS calculation
To improve performance in FCS calculation, this commit replaces
the usage of the generic `crc8` function with the specific `crc8_rohc`
function in `modem_cmux.c`.
The `crc8_rohc` function utilizes a small table approach, enhancing
the efficiency of CRC-8/ROHC variant calculations while optimizing
memory usage.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-09 09:48:00 +02:00
Pisit Sawangvonganan
d6024c5051 tests: unit: crc: use zassert_equal for cleaner assertions
Replace `zassert` with `zassert_equal` in CRC8-CCITT and CRC8-ROHC
test cases, as `zassert_equal` is more appropriate for comparing
actual and expected values.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-09 09:48:00 +02:00
Pisit Sawangvonganan
ec5354cd80 lib: crc: add crc8_rohc for CRC-8/ROHC variant calculation
This commit introduces the `crc8_rohc` function to the CRC library,
implementing the CRC-8/ROHC (RObust Header Compression) variant.
This algorithm is widely used in networking protocols, which is commonly
found in modem subsystems.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-09 09:48:00 +02:00
Jan Kiszka
339ba1a23d drivers: ipm: ipm_mbox: Initialize after mbox drivers
This driver depends on its mboxes to be initialized, or the build
will fail like this:

ERROR: Device initialization priority validation failed, the sequence of \
       initialization calls does not match the devicetree dependencies.
ERROR: /ipm <ipm_mbox_init> is initialized before its dependency \
       /mailbox0@31f80000 <omap_mailbox_0_init> (POST_KERNEL+0 < \
       POST_KERNEL+2)

Lift its priority to device level.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2024-10-09 09:46:56 +02:00
Marcio Ribeiro
c20e43caaf drivers: wifi: esp32: adc2 init code calibration
Add call to adc2_init_code_calibration during wifi initialization on
esp32s2 and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-09 09:43:58 +02:00
Marcio Ribeiro
b7a4bb3ef9 drivers: adc: esp32: adc2 init code calibration
Add call to adc2_init_code_calibration during adc initialization on esp32s2
and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-09 09:43:58 +02:00
Emil Gydesen
e7e7386352 Bluetooth: BAP: Modify unicast client callbacks to slist
Modify the BAP unicast client callback structure to be a
linked list. The purpose of this is to have multiple listeners
of the unicast client changes and notifications.
This is needed for the CAP initiatior.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-09 09:42:30 +02:00
Yong Cong Sin
9109cfe346 drivers: intc: plic: convert trigger type to use Kconfig
Convert the compilation of the trigger type feature to depend
on Kconfig, following the same pattern of software-triggered
interrupt.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-09 09:41:50 +02:00
Yong Cong Sin
65fb61bc68 drivers: intc: plic: implement software-generated interrupt
Implement `riscv_plic_irq_set_pending()` to trigger a
software-generated interrupt.

The "4. Interrupt Pending Bits" of the riscv-plic specs
described the reading of the pending bits, but not the writing

Since not all PLIC implementations support software-generated
interrupt, the function is compiled only when
`CONFIG_PLIC_SUPPORTS_SOFT_INTERRUPT` is enabled on PLIC that
supports it, such as the Andes' NCEPLIC100.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-09 09:41:50 +02:00
Yong Cong Sin
0cecb2c9af dts: add andestech,nceplic100 binding
Add a new `andestech,nceplic100` binding that inherits from the
`sifive,plic-1.0.0` binding. This is so that the Kconfig
`DT_HAS_ANDESTECH_NCEPLIC100_ENABLED` would be generated during
build.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-09 09:41:50 +02:00
Mark Holden
ec7943bb18 coredump: ARM: Ensure sp in dump is set as gdb expects
Gdb is typically able to reconstruct the first two frames of the
failing stack using the "pc" and "lr" registers. After that, (if
the frame pointer is omitted) it appears to need the stack pointer
(sp register) to point to the top of the stack before a fatal
error occurred.

The ARM Cortex-M processors push registers r0-r3, r12, LR,
{possibly FPU registers}, PC, SPSR onto the stack before entering the
exception handler. We adjust the stack pointer back to the point
before these registers were pushed for preservation in the dump.

During k_oops/k_panic, the sp wasn't stored in the core dump at all.
Apply similar logic to store it when failures occur in that path.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-10-09 09:41:00 +02:00
Benjamin Lemouzy
9f60075d14 jwt: remove jwt_payload_len function
The function jwt_payload_len doesn't return payload length but returns
used data in builder->buf

If jwt_payload_len is called after jwt_init_builder, header length will
be returned
If jwt_payload_len is called after jwt_add_payload, header+payload
length will be returned
If jwt_payload_len is called after jwt_sign, header+payload+sign length
will be returned

So, this commit removes the function and uses strlen instead

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-10-08 18:10:41 -04:00
Valerio Setti
64ecbea505 doc: update JWT documentation
Update JWT subsystem documentation concerning the changes related
to:

- default library used
- new Kconfigs added

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-08 18:10:32 -04:00
Valerio Setti
6e8e0ec08e test: subsys: jwt: fix testing of the features
- Some files (PEM/DER files, jwt-test-cert.c, user-tls-conf.h)
  were removed because they are not used or no longer necessary.
  Private keys used in the test are now in the jwt-test-private.c
  file as arrays.
- testcase.yaml has been improved in order to test all possible
  use cases: ECDSA with TC, ECDSA with PSA, RSA;
- unnecessary Kconfigs were removed from prj.conf.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-08 18:10:32 -04:00
Valerio Setti
ec3dea2b45 jwt: reshape and add alternative for ECDSA using PSA
This commit:

- creates 2 new files, jwt_ecdsa.c and jwt_rsa.c, to hold the
  implementations of the corresponding ECDSA/RSA signature
  algorithms;
- RSA signature is stil done through Mbed TLS's PK module which
  can optionally make use of PSA (if enabled);
- ECDSA signature will instead use PSA, if possible, or TinyCrypt
  as fallback.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-08 18:10:32 -04:00
Flavio Ceolin
c60d06057c mbedtls: Add purl/cpe information
Get revision with purl/cpe support.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-10-08 18:10:20 -04:00
Yong Cong Sin
59e41ef830 tests: latency_measure: reduce the chance of cycles underflow
Sometimes there's an unusually large cycles for tests that are
known to complete with just a few cycles. Upon some testing,
I found that it was because the overhead cycles was larger
than the cycles taken by tests, causing the cycles to
underflow.

To workaround that, make sure that the overhead measurement
thread runs uninterrupted, repeat the measurement for a few
times, and take the minimum value.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-08 18:10:11 -04:00
Daniel Leung
4f4cc4de08 xtensa: fix typo userpsace to userspace
s/userpsace/userspace/

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-08 18:10:03 -04:00
Ingar Kulbrandstad
b32eb0d2b2 Bluetooth: Mesh: Fix out of bounds write
Fix of the subnet bridging table function to only
compact the table if elements has been removed, and
fixing the compact function to compact the table if
several elemnts has been removed at the same time.

Fixes zephyrproject-rtos#78794

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2024-10-08 18:09:57 -04:00
Abderrahmane Jarmouni
8173acad11 drivers: dma: stm32_bdma: fix regression
Fix regression introduced by 1e1c14cfee
undefined variable name is used.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-08 18:09:47 -04:00
Declan Snyder
c1e6488ded MAINTAINERS: Remove decsny from ADC
Remove myself from ADC collaborator

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-08 18:09:36 -04:00
Declan Snyder
e904743152 ethernet: phy_mc_ksz8081: Don't reset in cfg link
No need to reset in cfg link, this was blocking system workqueue during
phy callbacks that call cfg link, since this happens from monitor work
handler which is in the system workqueue.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-08 18:09:26 -04:00
Benjamin Cabé
f90b1caae4 doc: fix nested list rendering in soc porting guide
Added missing blank line that caused nested bullet list to not render
properly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-08 18:09:00 -04:00
Ioannis Damigos
dcea9169c7 dts/smartbond: Move bt_hci_da1469x node outside of soc node
Move bt_hci_da1469x node outside of soc node to fix warning:

"Warning (simple_bus_reg): /soc/bt_hci_da1469x: missing or
empty reg/ranges property"

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-08 18:18:00 +01:00
Daniel Leung
667c01b658 tests: input/api: limit to 1 CPU for thread mode test
There is a check to see if it is no longer able to push more
messages into a full queue. When these is another CPU consuming
messages, the queue would not be full at that point. A new message
can be pushed into the queue and thus failing the "full queue"
check. So limit this to 1 CPU only so this check's assumption
can be fulfilled.

Fixes #79319

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-08 18:17:48 +01:00
Jukka Rissanen
d59bb2f9f5 west.yml: update hostap revision
Update hostap revision to get supplicant event numbers
correctly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-08 18:17:42 +01:00
Jukka Rissanen
4b83b2346f hostap: Use proper value when generating supplicant event
The previous NET_EVENT_SUPPLICANT_CMD_INT_EVENT is from
"enum net_event_supplicant_cmd" but the supplicant_send_wifi_mgmt_event()
has the event parameter as an "enum net_event_wifi_cmd" and those event
number spaces are different.

This meant that the wrong event value NET_EVENT_SUPPLICANT_CMD_INT_EVENT
maps to NET_EVENT_WIFI_CMD_TWT (from "enum net_event_wifi_cmd") which
fortunately did not cause issue in this case because the
supplicant_send_wifi_mgmt_event() has no handling for this TWT event value.

It is important we fix this as this can cause great confusion in the
future.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-08 18:17:42 +01:00
Jonathan Nilsen
d403d73ad7 boards: nordic: update custom JLink reset scheme for ADACv2
Version 2 of the ADAC interface implemented by secure domain firmware
changes the ADAC RESET command used in the custom reset handling in
the JLink support scripts. The command has been split into two
commands, RESET and START, and has different semantics from
the previous RESET command. The new RESET command resets both the
application and radio domains without starting the CPUs again, and the
START command must then be used to start the CPUs.

Update the JLink support scripts for nrf54h20dk/nrf54h20/cpuapp,
nrf54h20dk/nrf54h20/cpurad, nrf9280pdk/nrf9280/cpuapp and
nrf9280pdk/nrf9280/cpurad so that they read out the ADAC interface
version from the device and use the newer commands if ADAC version 2 is
detected. If the version is lower than 2, the legacy implementation is
used.

Also improve the CTRL-AP MAILBOX transaction implementation
to avoid the need for arbitrary sleeps or unnecessary polling of
the MAILBOX. This should improve stability when using the script.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2024-10-08 18:17:33 +01:00
Ravi Dondaputi
0e2daaa9fa manifest: modules: hal: nordic: Pull in fix for country code
Pull in changes to pass country code as string to firmware.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-10-08 16:05:09 +01:00
Stoyan Bogdanov
7b2da4e191 dts: bindings: gpio: Add dtb bindings for MAX14916
Industrial 8 channel input GPIO expander with diagnostics
Per channel diagnostics from dtb

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
Stoyan Bogdanov
3ca5cf50fe drivers: gpio: Add MAX14916 industrial output
Industrial 8 channel output with advanced diagnostics.
Allowing giagnostic configuration both on per channel or global bases
In SPI communication diagnostic status transmitted on every
READ/WRITE which includes generic status of chip.
Diagnostics includes :
 * Oveload
 * Open Wire
 * Over current
 * Short to VDD
 * Thermal Shutdown
 * VDD Warn
 * Watch Dog Error
 * Communication Error
 * VDD under voltage

Add app.overlay for MAX14916 driver.

Tested with adopted basic/blinky example.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
Stoyan Bogdanov
fe8f5d3f6a dts: bindings: gpio: Add dtb bindings for MAX14906
MAX14906 industrial 4 channel Input/Ouput GPIO expander with diagnostics.
Per channel diagnostics for open wire, over current.
Global diagnostic for power supply, communication and various fault
conditions.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
Stoyan Bogdanov
71149fd47a drivers: gpio: Add MAX14906 industrial input/output
MAX14906 in 4 channel I/O with advanced diagnostic.
In SPI communication diagnostic status transmitted on every
READ/WRITE which includes generic status of chip.
Configuration both on global level and on per channel bases.
Diagnostics includes :
 * Thermal overload
 * current limit
 * open wire detection
 * short to VDD
 * Above VDD
 * Safe DEmagnitization fault
 * VDD warning
 * VDD low
 * SPI/CRC Error
 * WDog Error
 * Loss GND

Add app.overlay for MAX14906 driver.

Tested with adopted basic/button and basic/blinky sample.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2024-10-08 17:01:44 +02:00
Johann Fischer
47c8815253 modbus: fix support for floating point values
The Modbus protocol object types are either single-bit or 16-bit word.
Other types are not defined in the specification. Types such as float
are typically mapped to two 16-bit registers. Current implementaiton
does not maps correctly to the 16-bit word addresses. On the client
side, the implementation must take into account that the number of
requested registers (Quantity of Registers) is double that of a "float"
register.  The server side should not treat "Quantity of Registers" and
"Byte count" differently for addresses reserved for floating values,
only in the user callback the two 16-bit registers are mapped to a float
value but still aligned to 16-bit register addresses.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-08 17:01:19 +02:00
Abderrahmane Jarmouni
7cd87ea1f7 boards: stm32h750b_dk: update doc & board file
Update board's doc & yaml file with enabled features.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-10-08 17:01:01 +02:00
Jamie McCrae
1df078158f doc: build: Add signing page
Adds a signing page under build, which contains information on
how to sign images from the build system, this removes the old
details for using west sign with imgtool from the west sign page

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
fba029c99f doc: migration: 4.0: Add notes on deprecation of imgtool west sign
Adds details on the deprecation of this feature

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
d1f8b6a0ab doc: release: 4.0: Add note on imgtool west sign change
Adds a note that the build system now uses imgtool directly

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
dd7ce12d68 scripts: west_commands: sign: Deprecate imgtool signing
Deprecates signing for imgtool using west sign

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
5a48685683 doc: release: 3.4: Use double backticks
Fixes a compliance error

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
5ff1088a16 doc: release: 3.4: Remove Kconfig option usage for removed Kconfig
Removes the Kconfig extension function around a Kconfig that has
been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
c952f09a79 cmake: mcuboot: Use imgtool instead of west for signing
Uses imgtool directly to sign images instead of calling west sign,
this also removes the MCUBOOT_CMAKE_WEST_SIGN_PARAMS Kconfig option
as this has no effect

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Jamie McCrae
890787ded3 modules: mcuboot: Add Kconfig for firmware updater image
Adds a Kconfig which can be selected when building for firmware
updater mode to select if this is the application or the firmware
updater image that is being built

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-08 17:00:46 +02:00
Torsten Rasmussen
46a3e61bc7 cmake: nordic: save build information regarding SVD file used.
Save information regarding SVD file in use in vendor-specific section
of the build info file.

Information is stored under Nordic section.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Torsten Rasmussen
09faf537dd cmake: support build info in Zephyr
Store informations regarding the current Zephyr build.
The following informations are stored during CMake configure:
- Board information
- Application source directory
- Application configuration directory
- Toolchain information
- Devicetree files
- Kconfig config files
- Zephyr version

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Torsten Rasmussen
24ee391231 west: support build info file for west build
For pristine builds 'west build' will now create a build_info.yml file
containing the west build command including arguments.

This is done to help users and external tools to recreate builds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Torsten Rasmussen
5d5c2d4775 cmake: introduce build_info function
The build_info function provides a generic and stable way of dumping
build information to the <build>/build_info.yml file.

The build info file is in YAML format and the keys in the file are
intended to be stable, as to allow external tools to retrieve
information regarding the build.

The main differences to the CMakeCache.txt are:
- Settings in the CMakeCache.txt are user controlled, whereas the
  information in the build info file is intended to be those values
  which are used by the build system regardless if those are specified
  by the developer or picked up automatically.
- Internal build system variables are not present in the CMake cache
  and should not be, because their values are calculated when CMake
  runs.

This also has the benefits of decoupling CMake variable names from
build info keys. Several CMake variables has internal build system
names, and the build system is free to rename those at its own
discretion.

Having dedicated key names ensures a stable API that external tools can
rely upon.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Torsten Rasmussen
daac2d55ab cmake: move script mode handling from package helper to extensions.cmake
Move Zephyr CMake script mode handling from package_helper.cmake into
extensions.cmake.

This ensures that all Zephyr CMake script which includes
extensions.cmake will have the same functions stubbed or mocked and thus
does not need to replicate this behavior.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Torsten Rasmussen
6c3a55a682 cmake: define ZEPHYR_TOOLCHAIN_PATH
Other toolchains uses <toolchain>_TOOLCHAIN_PATH, align Zephyr SDK
by setting ZEPHYR_TOOLCHAIN_PATH to be identical to the
ZEPHYR_SDK_INSTALL_DIR.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-08 17:00:30 +02:00
Robert Lubos
c6498bb68d net: ipv6: Make Multicast Listener Discovery API public
IPv6 MLD API was so far defined in an internal header. This does not
seem correct though, as application code should be able to join/leave
multicast groups, hence the API should be exposed in a public header,
just as it is done for its IPv4 countepart - IGMP.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 17:00:06 +02:00
Nicolas Munnich
458f363f0b drivers: pinctrl: rpi-pico: fix: typo
Found a typo, fixed the typo

Signed-off-by: Nicolas Munnich <nickmunnich@gmail.com>
2024-10-08 16:59:57 +02:00
Luca Burelli
11c350e2e6 llext: fix handling of unimplemented syscalls
When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.

This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.

This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.

The test for this functionality is also updated to reflect the change.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-08 16:59:50 +02:00
Chaitanya Tata
e2e96acebf drivers: nrfwifi: Fix rebuilding when FW blobs are changes
Whenever FW blobs are updated manually, we need to tell cmake to
auto-build the source files to use the latest firmware without doing a
pristine build.

This adds a custom target to be run with nRF Wi-Fi driver and updates
timestamp of fw_load.c to rebuild whenevr the blob is updated.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata
d15b7b5b3a drivers: wifi: nrf: Remove unused linker script
This script is needed only when external flash is used to store nRF70
firmware patches. This also uses PM which is supported only in NCS.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata
f20e2d68b0 drivers: wifi: Add support to override FW load
For using external flash the tooling is only available in NCS, so, use
the existing Kconfig option to override the FW loading.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Chaitanya Tata
3cd4700132 drivers: nrfwifi: Fix the indentation
The Cmake indentation is two spaces.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-08 16:58:52 +02:00
Robert Lubos
c6cc87c526 log: net: Fix build warning with IPv6 disabled
Building the net logger backend with IPv4 only gives the following
warning:

log_backend_net.c:116:31: warning: array subscript 'struct sockaddr[0]'
is partly outside array bounds of 'struct sockaddr_in[1]'
[-Warray-bounds] local_addr->sa_family = server_addr.sa_family;

hence assign the address family directly to sockaddr_in/6 structs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
7d91281caa samples: net: telnet: Remove redundant code
The sample uses net_config library, so there's no need for the sample to
configure unicast IP addresses manually.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
5c6b003554 net: dns: dispatcher: Don't use uninitialized entries
In case CONFIG_DNS_RESOLVER_MAX_SERVERS is larger than the actual number
of DNS servers configured, some server entries may be left
uninitialized. The dispatcher needs to take this into account, otherwise
it may cause memory corruptions.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
7b854d8260 samples: net: echo_client: Fix 'Tag name should be unique' error
Refactor the code to comply with:
  Violation to rule 5.7 (Tag name should be unique) tag: data

Rename the structure to avoid excessive refactoring.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
0623b23f71 samples: net: echo_client: Fix build warning with IPv6 disabled
Building the sample with IPv4 only gives the following warning:

tcp.c:99:37: warning: array subscript 'struct sockaddr[0]' is partly
outside array bounds of 'struct sockaddr_in[1]' [-Warray-bounds]
  data->tcp.sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);

This doesn't really seem like a valid one, but to get rid of it
workaround by specifying address family explicitly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
fd2fa54aa7 samples: net: Add Wi-Fi snippet support for networking samples
Make use of wifi-ipv4 snippet in several networking samples.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Robert Lubos
0fdfad84de snippets: Add Wi-Fi IPv4 snippet
Introduce a snippet for configuring IPv4 over Wi-Fi support in
networking samples.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-08 16:58:20 +02:00
Emil Gydesen
b2e61ef355 Bluetooth: BAP: Fix bad check in bt_audio_valid_qos_pref
The checks did not properly take into account
that the pref_pd_min and pref_pd_max could have valid
0 values.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-08 16:58:09 +02:00
Krzysztof Chruściński
8fc0aba4ae logging: Add log_source_id helper function
There are many places where source_id is retrieved and it
depends on runtime filtering being enabled. So far it was
all exposed but lets encapsulate that into a helper function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-08 16:57:59 +02:00
Pisit Sawangvonganan
88374b0738 fs: nvs: streamline rc return logic
Streamline the `rc` return logic in `nvs_flash_wrt_entry()`, `nvs_gc()`
by directly returning `rc`, as the redundant conditional check and
explicit return of 0 were unnecessary.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-08 16:57:49 +02:00
Ioannis Damigos
6c6a1e550c da1469x: Remove CONFIG_PINCTRL from all defconfig files
Remove CONFIG_PINCTRL from all defconfig files.

Fixes #78619

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-08 16:57:41 +02:00
Anas Nashif
621da32340 MAINTAINER: add board/hardware scripts into build system area
Add board/hardware scripts and schema used by build system to relevant
areas.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Anas Nashif
55489f5787 boards: qemu_x86: add board description
Use the description field for the full name/description of the boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Anas Nashif
50ffc771bf boards: add board full_name field
Full name or description of a board is something we are missing in
HWVv2. It is right now being added to yaml files parsed by twister. This
should be generically available to tooling and documentation
independently from twister.

As we rework how twister parses board meta-data (#77250) and how we
generate board documentation (#79160), this becomes neceassry.

Moving the board full name/description from the twister yaml files to
the board.yaml is something we can automate once the schema is agreed
upon.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-08 16:57:34 +02:00
Raffael Rostagno
a7d6565f55 tests: wifi: esp32: ICMP check improvement
Improve ICMP check by adding retry feature and data check.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-08 16:57:27 +02:00
Raffael Rostagno
c6b0175a2c tests: wifi: esp32: Code improvement
Change log level to fixed value coherent with macros used in the
test (LOG_INF). Use context struct to better organize global
variables and improve code readability.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-08 16:57:27 +02:00
Aleksander Wasaznik
8cfad44852 Bluetooth: Deprecate adv auto-resume
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: https://github.com/zephyrproject-rtos/zephyr/issues/72567

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-08 16:57:01 +02:00
Johann Fischer
d7ab4f25e1 samples: disable CDC ACM logging
Disable CDC ACM logging in the configuration overlays used to select the
CDC ACM UART as the shell backend.
The build warning was introduced by the commit e8c4867806
("usb: cdc_acm: disable logging if used for shell with logging")
to prevent recursive logging when using the CDC ACM UART as shell or
logging backend

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-08 15:45:23 +02:00
Pavel Vasilyev
86b666548b modules: mbedtls: Enable back Mbed TLS PSA Crypto Storage C
This partially reverts 4b479016a7
to fix Bluetooth mesh tests with bsim.

Fixes #79533

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-08 13:44:22 +02:00
Chris Friedt
41e4b5323a drivers: flash: shell: add "flash copy" command
Add a flash copy command, capable of copying a region in one
flash device to a region on the same or another flash device. The
destination is erased prior to copying.

This is useful for evaluating mcuboot on devices with little
on-chip resources, or devices that are incapable of running more
elaborate image management services (e.g. via bluetooth or
networking).

Additionally, it's useful for evaluating mcuboot on devices with
one or more images stored on external spi flash.

The command syntax is
flash copy <src_dev> <dst_dev> <src_offs> <dest_offs> <size>

E.g.
flash copy flash@0 flash-controller@abcd1234 0x1234 0x5678 21012
Copied 21012 bytes from flash@0:1234 to \
  flash-controller@abcd1234:5678

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt
ccc78912be tests: drivers: flash: add flash_copy() test
Add a test for coverage of flash_copy()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt
5d1c881b02 tests: flash: common: randomize before each test
test_flash_erase() requires that the expected[] array contains
pseudo-random data. However, the expected[] array would only
be initialized once before all tests are run using the setup
callback.

Instead, use the before() callback to randomize data before
each test in the suite, since there is otherwise no guarantee
that test_flash_erase() will be run directly after the
expected[] array has been randomized.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Chris Friedt
ced4e16235 drivers: flash: provide a generic flash_copy() algorithm
Provide a generic flash_copy() algorithm that is capable of
copying from one flash device to another or within different
regions of the same flash device.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-08 06:02:01 -04:00
Krystof Sadlik
6bc0970c40 tests: counter: counter_basic_api: Added testcase wihtout alarms
Some counter drivers do not support alarms, so I added testcase which
starts the counter, checks if the value is in range after certain time and
stops the counter, to check if the counter is running correctly.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
Co-authored-by: Michal Smola <michal.smola@nxp.com>
2024-10-08 06:01:46 -04:00
TOKITA Hiroshi
16c9b74e3a drivers: flash: rpi_pico: Rename to avoid conflicting with SDK
Some symbol names have been conflicted with introducing pico-sdk 2.0.0.
Rename these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi
1400ee713a drivers: gpio: rpi_pico: Fitting for the changes made in pico-sdk 2.0.0
Following the GPIO interface changes in pico-sdk 2.0.0.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi
6a2aafe286 modules: hal_rpi_pico: Update to fit for 2.0.0 directory structure
The directory structure has changed in 2.0.0,
so we update it accordingly.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi
dccf4bfb0f manifest: update hal_rpi_pico
Update RaspberryPi Pico hal to 2.0.0 release

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:23 -04:00
TOKITA Hiroshi
0f80f993f9 drivers: clock_control: renesas_ra: Adding macros to convert DT values
Adding the macros `RA_CGC_CLK_SRC` and `RA_CGC_CLK_DIV` that derive
the BSP clock settings from the DeviceTree node settings.
I also define some aliases to fill in the gaps with the BSP
naming conventions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
d72a69488c dts: renesas_ra: Change to describe the division ratio in a numeric
Move the process of replacing numerical values with macros to
the header, and set the division ratio in a numeric without
using macros in the device tree.

Change `clk-div` defined in `renesas,ra-cgc-pclk.yaml` to `div`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
7c615f95d2 dts: renesas_ra: Referencing clocks change to DeviceTree's standard.
DeviceTree typically references the clock source using the `clocks`
property defined in `base.yaml`, so we'll change it to this.

Also delete the custom clock source definitions in
`renesas,ra-cgc-pclk-block.yaml`, `renesas,ra-cgc-pclk.yaml`, and
`renesas,ra-cgc-pll.yaml`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
91d8e72dd4 dts: renesas_ra: Rename dts node path
Changes the path name of a DTS node so that it can be used
as the stem of a BSP macro.
All nodes to be changed are referenced via labels,
so only the name is changed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
767d1ce5f6 devicetree: Adding UNQUOTED, TOKEN, and UPPERTOKEN variants of FULL_NAME
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
TOKITA Hiroshi
ab9cb58fed west.yml: Update revision of hal_renesas
Update HAL to improve the BSP clock setting process.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-08 06:01:10 -04:00
Adrian Friedli
4584904807 doc: releases: migration-guide-4.0: add note about changed CoAP struct
Inform users about the new field in the `coap_transmission_parameters`
struct.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-10-08 06:00:56 -04:00
Adrian Friedli
98289e594d net: lib: coap: make ACK random factor runtime configurable
Extend the `coap_transmission_parameters` struct with the field
`ack_random_percent`. This was the last remaining CoAP transmission
parameter that was not configurable at runtime.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-10-08 06:00:56 -04:00
Firas Sammoura
6f072ba774 Ztest: Including the missing C standard library header
The ztest.c calls atoi, which is provided by the C standard library.
Remove the conditional inclusion of the C standard library with the
definition of CONFIG_ZTEST_SHUFFLE.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2024-10-08 06:00:45 -04:00
Rex Chen
5a195001e3 net: wifi: shell: add reg domain support
Supp api add reg domain support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-08 06:00:36 -04:00
Rex Chen
6551e4083f samples: net: wifi: enable time checking for mbedtls cert files
enable time checking for mbedtls certificate files, return failed
if certificate files expired.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-08 06:00:25 -04:00
Lukasz Stepnicki
022122d659 boards: nordic: ipc node added dcache alignement
dcache-alignement needs to be defined for ipc to have
consistent memory organization on both endpoints, when
shared memory is cacheable. nrf54h20 and nrf9280 are
using cacheable shared memory.
This is applied for ipc with icmsg backend.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-10-08 06:00:07 -04:00
Flavio Ceolin
9100a8b848 doc: security: Disclose CVE-2024-6444
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Flavio Ceolin
05c60db5a8 doc: security: Disclose CVE-2024-6443
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Flavio Ceolin
559f05d3f3 doc: security: Disclose CVE-2024-6442
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-10-08 05:59:49 -04:00
Ayush Singh
c506cf5e83 boards: ti: beagleconnect_freedom: Remove PINCTRL
- PINCTRL is now being selected by
  soc/ti/simplelink/cc13x2x7_cc26x2x7/Kconfig, so no need to add to
  diffconfig.
- See https://github.com/zephyrproject-rtos/zephyr/pull/64718#discussion_r1734288793

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-08 05:59:41 -04:00
Ayush Singh
89995d0568 boards: ti: cc1352p7_launchpad: Remove PINCTRL
- PINCTRL is now being selected by
  soc/ti/simplelink/cc13x2x7_cc26x2x7/Kconfig, so no need to add to
  diffconfig.
- See https://github.com/zephyrproject-rtos/zephyr/pull/64718#discussion_r1734288793

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-10-08 05:59:41 -04:00
Benedek Kupper
a6b911f195 usb: device_next: USB reset clears remote wakeup permission
Verbatim from USB 2.0 specification:
The Remote Wakeup field indicates whether the device is currently enabled
to request remote wakeup. The default mode for devices that support
remote wakeup is disabled. If D1 is reset to zero, the ability of the
device to signal remote wakeup is disabled. If D1 is set to one,
the ability of the device to signal remote wakeup is enabled.
The Remote Wakeup field can be modified by the SetFeature() and
ClearFeature() requests using the DEVICE_REMOTE_WAKEUP feature selector.
This field is reset to zero when the device is reset.

Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
2024-10-08 05:59:29 -04:00
Jordan Yates
a29db9800e modules: mbedtls: compile PAKE with PSA
When building with `MBEDTLS_PSA_CRYPTO_C` enabled, compile in the
PAKE (Password-authenticated key exchange) implementation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-08 05:59:16 -04:00
Johann Fischer
470cbe36d7 tests: bluetooth: disable CDC ACM logging
Disable CDC ACM logging in configuraton overlay used in test case
bluetooth.shell.cdc_acm.
The build warning was introduced by the commit e8c4867806
("usb: cdc_acm: disable logging if used for shell with logging")
to preven recursive logging when using the CDC ACM UART as shell or
logging backend

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-08 05:58:30 -04:00
Peter Mitsis
318b49570a tests: scheduler queue benchmarks
Implements a set of tests designed to show how the performance of the
three scheduler queue implementations (DUMB, SCALABLE and MULTIQ)
varies with respect to the number of threads in the ready queue.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-07 20:16:20 -04:00
Peter Mitsis
2221ca82d4 tests: wait queue benchmarks
Implements a set of tests designed to show how the performance of the two
wait queue implementations (DUMB and SCALABLE) change as the number of
threads in the wait queue varies.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-10-07 20:16:20 -04:00
Rafael Laya
626174e982 drivers: i2c: Designware IP clang format pass
To reduce lint warnings during code review, it is best
to keep clang-format happy

This commit makes a lint pass to this driver

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com>
2024-10-07 20:15:54 -04:00
Rafael Laya
bccaeb9c16 drivers: Support Fast Plus Mode in I2C Designware
Adds the right clock settings for Fast Plus Mode
in the i2c Designware driver which the original author
left as a TODO. Similarly, I lack the hardware to test
high-speed mode, and so that mode remains not well
supported.

Signed-off-by: Rafael Laya <rafael_laya97@hotmail.com>
2024-10-07 20:15:54 -04:00
Vaishnav Achath
1b8158b212 soc: ti: k3: am6x: Fix AM62X M4 RAT initialisation
Commit b73c5578e3 ("soc: ti: move init code from SYS_INIT to hooks")
changed SYS_INIT to init hooks. For AM6x M4 target soc_prep_hook()
was added by mistake instead of soc_early_init_hook(), the platform needs
RAT translation initialized before any other operation and the platform
failed to boot with this change, fix this by replacing with
soc_early_init_hook()

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
2024-10-07 20:15:41 -04:00
Sreeram Tatapudi
438fe6dbba dts: infineon: cat1b: cyw20829: Reduce the default interrupt priority
Having the lowest possible interrupt priority is causing the
tests\arch\arm\arm_irq_zero_latency_levels test to fail.
This test reserves 2 priority levels for the low latency interrupts.
Since CYW20829 supports 3 interrupt bits, 6 becomes an invalid
value when 2 levels are reserved for the low latency interrupts.

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-10-07 20:15:25 -04:00
Torsten Rasmussen
29e82d2f23 cmake: add linker_libraries.cmake for Cadence Xtensa linker
Follow-up: #78320

Create linker_libraries.cmake for the Cadence Xtensa xt-ld linker to
ensure correct linking of runtime and C libraries as well as correct
link order.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-07 20:15:08 -04:00
Peter Fecher
9f73988be0 boards: phytec: update phyboard_polis docs
Updating PhyBOARD Polis docs after enabling ECSPI
and CAN support on that board.
Add additional information what to do if
using Linux and Zephyr simultaneously.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2024-10-07 18:43:35 +02:00
Peter Fecher
0ac7f641b3 tests: drivers: spi_loopback: Add phyboard_polis
Adds the devicetree overlay and configuration for
phyboard polis to the spi_loopback test.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2024-10-07 18:43:35 +02:00
Peter Fecher
c2d38a7e17 boards: arm: phyboard_polis: configure spi and can
Configures ECSPI devices in devicetree including connected
mcp2518 (CAN FD).
Configures pinctrl for board.
Enables spi support in board files.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2024-10-07 18:43:35 +02:00
Peter Fecher
6560128418 dts: arm: nxp: nxp_imx8m_m4: Add ECSPI devices
Add device tree instances for ECSPI devices,
update SoC code to enable clocks.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2024-10-07 18:43:35 +02:00
Laurentiu Mihalcea
8a1785b8aa soc: nxp: soc.yml: remove unsupported cpu clusters for imx8 socs
Some imx8 socs have cpu cluster entries for cores that
are not currently supported. Remove them.

Fixes #79027.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-07 18:43:26 +02:00
Hou Zhiqiang
fd103f2ccc soc: nxp: imx95: fix indent of MMU entry
Fix the indent of LPUARTs MMU setup entry.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-10-07 18:43:20 +02:00
Yangbo Lu
0d49482b9f west.yml: update hal_nxp to the latest
Updated hal_nxp to the latest.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-07 18:43:12 +02:00
Yangbo Lu
dc734e19f9 boards: nxp: imx95_evk: enable TPM2 PWM on M7
Enabled TPM2 for PWM on imx95_evk m7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-07 18:43:12 +02:00
Yangbo Lu
621681fabe boards: nxp: imx95_evk: add TPM2 pinmux support in dtsi
Added TPM2 pinmux support in dtsi.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-07 18:43:12 +02:00
Yangbo Lu
6ac457fb8e dts: arm: nxp_imx95_m7: add all TPM nodes
Added all TPM nodes for nxp_imx95_m7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-07 18:43:12 +02:00
Yangbo Lu
11ef521c60 drivers: pwm_mcux_tpm: adapt to more platforms
The TPM max channel number was got from register array size.
However some platforms TPM instance may begin from TPM1 rather
than TPM0. This should be handled in driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-07 18:43:12 +02:00
Paul He
c2911af78e fs: littlefs: get block_cycles value from dts
Property "block-cycles" is required for node "zephyr,fstab,littlefs",
but source code did not get the value from dts file, now add it.

Additionally correct the wrong description of property "block-cycles"
in binding file.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2024-10-07 18:43:05 +02:00
Pisit Sawangvonganan
640a2ade8b drivers: serial: ra8_sci_b: adjust return usage in void functions
For code clarity, this commit adjusts the use of `return` statements
in functions with a void return type by:
- Remove unnecessary `return` statements when
  they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 18:42:58 +02:00
Pisit Sawangvonganan
626918588d drivers: serial: ra8_sci_b: revise switch-case in callback_adapter
Unified switch-case usage in `uart_ra_sci_b_callback_adapter` to use
`break` instead of `return`.
Typically, a `break` is used in switch-case statements unless an early
return is necessary, in which case `return` is appropriate.

For this case, using a `break` statement is the more suitable choice.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 18:42:58 +02:00
Gerard Marull-Paretas
d3ca4fd84f tests: lib: cpp: cxx: ignore nRF54H20 DK 0.8.0
nRF54H HAL is not compatible with C++98, add new board revisions to the
list so that they are skipped.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
df9a84ea31 boards: nrf54h20dk: add board revision 0.9.0
Add a new revision for nRF54H20 DK: 0.9.0. This new hardware spin contains
the final nRF54H20 SoC. Treat it as the default, including twister.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
47212de9de boards: nrf54h20dk: introduce revision 0.8.0 (current)
The current DK is labeled as revision 0.8.0. Until now, no revisions were
needed, but a new hardware spin is coming, so we'll need to keep at least
two revisions in the near future until the final one becomes the default.
Prepare the board for that scenario. Note that the "old" nRF54H20 SoC is
now nRF54H20 EngB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
091e38b3f2 scripts: west_commands: runners: nrf: add support for nRF54H20 EngB
Make sure cpuapp/cpurad cores are detected correctly when using nRF54H20
EngB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
5a4655f69f drivers: adc: nrfx_saadc: use CONFIG_NRF_PLATFORM_HALTIUM
So that any Haltium based SoC uses the same settings, including nRF54H20
EngB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
72ab376c24 modules: hal_nordic: nrfs: add support for nRF54H20 EngB
Make nrfs compatible with the EngB soc revision.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
40f5ca03b5 modules: hal_nordic: add support for nRF54H20 EngB
Add support for nRF54H20 EngB in the Nordic HAL glue code.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
a9d0eacae2 soc: nordic: nrf54h20: add support for nRF54H20 EngB
nRF54H20 EngB is a re-label to the existing hardware revision for the
nRF54H20. nRF54H20 (whithout EngX) is becoming the final revision of the
SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Adam Kondraciuk
bc7a5b6781 drivers: timer: nrf_grtc_timer: Align Zephyr to new AUTOEN read manner
The new GRTC reading manner of the SYSCOUNTER uses hardware mechanism which
allows to keep it alive when any of CPUs is not sleeping. Otherwise
the SYSCOUNTER goes into sleep mode. Thus there is no
longer need to maintain the `CONFIG_NRF_GRTC_SLEEP_ALLOWED` symbol, however
if the user wants to have the SYSCOUNTER enabled all the time the
`CONFIG_NRF_GRTC_ALWAYS_ON` can be used instead.
The nrfx_grtc  driver no longer provides the `wakeup-read-sleep` reading
manner.
Also setting the GRTC clock source is performed by the nrfx_grtc driver so
it has been removed from the `sys_clock_driver_init()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
b2031aa20d bluetooth: controller: ll_sw: nordic: align to nrfx 3.7.0
Some enums have been renamed:

- NRF_CCM_EVENT_ENDCRYPT -> NRF_CCM_EVENT_END
- NRF_CCM_TASK_CRYPT -> NRF_CCM_TASK_START

Also adjust some TX power level settings (26/28dBm not always available
depending on the SoC revision).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
9d82a03444 modules: hal_nordic: add nrf54l system sources to bsim build
Include system_nrf54l.c file when building for bsim.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
97dff5bccb modules: hal_nordic: align PDM configuration
Introduce instance 0, PDM0, following nrfx 3.7.0 update.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Nikodem Kastelik
de82f2f4cb manifest: update hal_nordic revision to have nrfx 3.7.0
Bring latest release of nrfx: 3.7.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
c39ad845f3 scripts: ci: check_compliance: add BOARD_REVISION in Kconfig.board.v2
This is required if boards make use of such definition in their Kconfig
files. In Kconfig.board.v2, only `boards/Kconfig.v2` is loaded, but
BOARD_REVISION is part of `boards/Kconfig`, which can't be loaded in this
context.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Francois Gervais
736344b310 tests: coap_client: optimize/reduce sleep time
The goal of this commit is to reduce the overall test time by optimizing
the time spent sleeping.

However while doing so, a few glitches became apparent and those have
been fixed as well.

1. The way the ZSOCK_POLLIN event is managed has been modified

In most tests, the event would stick for the whole test and this would
sometimes results in the client receiving more data than intended which
in turn would results in various unexpected warnings and errors.

The management of the ZSOCK_POLLIN event has now been mostly moved to
the send/receive overrides which better represent how things would
happen outside of the test scenario.

For example, when sending data, if this send would normally result in
receiving some response, the send function sets the ZSOCK_POLLIN event.
Then when receiving, we clear the event as the data has been received.

There are a few exceptions to this for cases where we need to simulate
some specific abnormal behavior.

2. The `messages_needing_response` queue now includes a valid bit

The test manages a queue of messages id to be able to respond to the
correct id in the receive hooks.

It was built in a way that the id 0 would be treated as invalid
although it is a valid id.
In practice, it would not be an issue in most cases however, it would
result in an unexpected behavior if the `test_multiple_requests` test
would be run first.

To fix this issue in the simplest way, the queue has been changed to
uint32_t which gives us 16 extra bits for the management of the queue,
1 of which is used to tell if the entry is valid or not.

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2024-10-07 17:13:47 +01:00
Maximilian Deubel
fd686a25b3 drivers: dp: swdp_bitbang: Update SWD clock calculation
This patch updates the SWD clock calculation to the latest behavior
of DAPLink.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-07 17:13:37 +01:00
Maximilian Deubel
621a6000d5 drivers: dp: swdp_bitbang: hardcode nRF53 SYSCLK
Since CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC is tied to the slow RTC clock
for the nRF53, use the default SYSCLK of 64MHz instead.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-07 17:13:37 +01:00
Andrej Butok
4511662fe5 boards: nxp: Add Serial Recovery button alias
Fixes MCUBoot Serial Recovery compilation error
"Serial recovery/USB DFU button must be declared
in device tree as 'mcuboot_button0'"

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-07 17:13:28 +01:00
Ioannis Damigos
1fdbd7e16a da1469x_dk_pro: Add user button
Add user button.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-07 17:13:14 +01:00
Daniel Schultz
836370f67c MAINTAINERS: Add PHYTEC Platforms
PHYTEC currently supports five boards in Zephyr, with another in
development. Given the growing interest from our customers and our
commitment to expanding support for PHYTEC platforms, I am
volunteering to take over the maintenance of these boards.

This will help streamline contributions and reduce the workload on
the silicon vendor maintainers.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-10-07 17:13:08 +01:00
Benjamin Cabé
07d6632201 boards: Fix duplicate image in MAX32666FTHR board doc
Front picture was listed twice, despite the back picture
(max32666fthr_img2.jpg) actually being checked into the repo, so switch
to that one.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-07 17:12:52 +01:00
Abram Early
583f4956dc modbus: reset wait semaphore before tx
A response returned after a request times out would increment the
semaphore and stay until the next request is made which will immediately
return when k_sem_take is called even before a response is returned. This
will once again have the same problem when the actual response arrives.
So the wait semaphore just needs to be reset before transmitting.

Signed-off-by: Abram Early <abram.early@gmail.com>
2024-10-07 17:12:44 +01:00
Pisit Sawangvonganan
a378440116 drivers: intc: stm32: correct inconsistent parameter names
Correct several inconsistent parameter names in the following functions:
- stm32_gpio_intc_select_line_trigger: rename `trigger` to `trg`
  to match the header file.
- stm32_gpio_intc_set_irq_callback: rename the callback argument to `user`
  to match the `stm32_gpio_irq_cb_t` type.
- stm32_exti_get_line_src_port: rename `pin` to `line` to align with
  the Doxygen comment and implementation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 17:12:34 +01:00
Chaitanya Tata
2dec9313e4 modules: hostap: Use net_mgmt context
Using a separate workqueue causes issues without any special locking to
synchronize with networking threads e.g., interface being removed while
the workqueue is trying to synchronize with WPA supplicant.

It's easier to use the net_mgmt thread which is in better sync with
networking.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
56d7e9a487 modules: hostap: Fix typo in NM unregistration
The module name is not modified in remove.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
c44aa6b18e modules: hostap: Fix double free in case of error conditions
In case of error conditions post successfully sending the message, the
event is already freed but we attempt to free it again.

Rejig the labels to easily reflect thier purpose.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
2d7c995395 modules: hostap: Fix double free of the event
When an event is sent the receiver gets is asynchronously and hence is
responsible for free the event, the sender should only free in case of
error conditions i.e., unable to send.

Else, this causes a tough to debug double-free.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
1da74ef705 net: wifi: Fix DPP disabled build
In case WPA supplicant disabled DPP, we need to compile out the
corresponding DPP code in Wi-Fi shell too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:16 +01:00
TOKITA Hiroshi
86da989a52 tests: drivers: build_all: display: Add config for solomon,ssd1327fb
Add configuration for "solomon,ssd1327fb" to enable build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
8529e93501 tests: drivers: build_all: display: Add mipi-dsi devices to build test
Add build tests for the following devices.

- himax,hx8394
- frida,nt35510
- orisetech,otm8009a
- raydium,rm67162
- raydium,rm68200

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
3f6bddc2bf drivers: mipi_dsi: Change MIPI_DSI priority to the same as DISPLAY
These priorities can be resolved automatically with the sub-priority
mechanism, so set them to the same value.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
ef3847c3d8 drivers: mipi_dsi: Add dummy driver for vnd,mipi-dsi
Add dummy driver for "vnd,mipi-dsi" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
Xudong Zheng
e8c4867806 usb: cdc_acm: disable logging if used for shell with logging
This prevents recursive logging loop when USB CDC ACM is used for shell
with logging.

Change affects both USB stacks.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-10-07 17:11:44 +01:00
Guillaume Gautier
2a67664c55 doc: releases: migration guide: stm32 adc async clock
Update the migration guide to indicate that the STM32 ADC that selects an
asynchronous clock also need to set a domain clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
3c261c273b dts: bindings: adc: stm32: update adc bindings doc
Update ADC bindings documentation to state that a domain clock is now
necessary if asynchronous clock is selected.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
9566d4ecb5 drivers: adc: stm32: add a check for asynchronous clock source
Add a compile-time check to verify that a domain clock is explicitly
defined if a STM32 ADC is configured to use an asynchronous clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
111b2bb150 boards: st: add adc clock source if asynchronous clock is used
For all STM32 boards that define an asynchronous clock for ADC, specify
which clock is to be used in the clock node.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
1d639aabe4 dts: arm: st: add default clock source for asynchronous ADC
For STM32L1, U5 and WBA, the ADC always uses an asynchronous clock source,
so we add the default clock source in the clock node.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
46d4be75e0 drivers: clock_control: st: add missing bus source clocks
Add missing bus source clocks for STM32H5, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
b27e36242b include: zephyr: dt-bindings: clock: st: add bus source clocks
Add missing bus source clocks define for STM32H5, L1, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Mateusz Holenko
aa7c367f44 drivers: led_strip: Fix formatting of log message
The previous version generated compilation warnings.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-07 13:39:59 +02:00
Vinayak Kariappa Chettimada
c334ed515b Bluetooth: Controller: Fix multiple Extended Adv chain reception
Fix assertion when enabling simultaneous multiple Extended
Advertising chain reception that is enabled by increasing
supported auxiliary scan contexts.

ULL sets the association of aux context to scan and sync
context, and LLL resets the association; this is safer
compared to earlier implementation where ULL did both the
association and reset which caused aux context memory
leak.

Supported auxiliary scan contexts can be increased using
CONFIG_BT_CTLR_SCAN_AUX_SET value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-07 13:39:53 +02:00
Frode van der Meeren
29b78abd16 bluetooth: tester: audio: Add verification for bis stopping
Adds a semaphor to make sure the stream has properly been stopped by the
controller before returning from btp_bap_broadcast_source_stop.

Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
2024-10-07 13:39:33 +02:00
Raffael Rostagno
d41fefe665 west.yml: hal_espressif: Update for SDK 0.16.9-rc2 bump fix
Update for SDK 0.16.9-rc2 bump fix

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-07 13:39:12 +02:00
Alberto Escolar Piedras
afbba5fb9b boards native_sim docs: Clarify which SDL version is needed
One needs the 32bit version of the SDL development library when
building for 32bit native_sim, and for the 64bit native_sim the
64bit version. Let's clarify this.

Also fix the SDL2 link.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-07 13:39:00 +02:00
Tomi Fontanilles
571e6019d7 doc: secure_storage: add documentation for the secure storage subsystem
It includes both the high-level documentation of the subsystem and
that of APIs defined in code (PSA Secure Storage and internal APIs of
the subsystem).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
c9a59dd02d samples: psa: persistent_key: add the persistent_key sample
Add a sample to demonstrate use of persistent keys in the PSA Crypto API.

The implementation of the PSA ITS API that allows storage of persistent
keys is provided either by the just-introduced secure storage subsystem
or by TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
d6bee54986 samples: psa: its: add the psa_its sample
Add a sample to demonstrate direct use of the PSA ITS API.

The implementation of the API is provided either by the just-introduced
secure storage subsystem or by TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
85a56b5ee3 tests: secure_storage: add tests for the secure storage subsystem
Add one suite to test the PSA ITS API directly, and another to test it
through the PSA Crypto API.

The PSA ITS API test suite is run with different configurations to also
test customization possibilities that the secure storage subsystem offers.

Both test suites also have a test scenario with TF-M instead of the
secure storage subsystem.
This serves as compatibility testing to ensure that the PSA Secure
Storage API behaves the same from the user's point of view regardless
of the underlying implementation provider.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
4b479016a7 modules: mbedtls: enable persistent keys when CONFIG_SECURE_STORAGE
With the secure storage subsystem now providing an implementation of
the PSA ITS API, let Mbed TLS use it when it's enabled.
This allows the use of persistent keys in the PSA Crypto API.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
bf0e6d7c83 secure_storage: introduce the secure storage subsystem
Implements RFC https://github.com/zephyrproject-rtos/zephyr/issues/75275.

See also the PR (https://github.com/zephyrproject-rtos/zephyr/pull/76222)
for more information.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Maureen Helm
d022d315d2 tracing: Fix sysview for soc families not subdivided into series
Fixes the systemview tracing backend for soc families, such as max32,
that don't subdivide into soc series and therefore don't define
CONFIG_SOC_SERIES. Use CONFIG_SOC_FAMILY instead in the system
description since it should always be defined.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-06 20:51:27 +01:00
Maureen Helm
82a00c9cb8 soc: adi: max32: Indicate Segger RTT support
Sets CONFIG_HAS_SEGGER_RTT on the max32 soc family to allow using RTT
backends in the logging, shell, and tracing subsystems.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-06 20:51:27 +01:00
Marcel Krüger
38c9a74099 kernel.h: Fix k_msgq_get retval doxygen
Added a hint about -ENOMSG being returned when the
queue is purged.

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2024-10-06 20:51:18 +01:00
Chris Friedt
b6aed5c505 kernel: dynamic: use 4k stack size for x86
x86 architectures require a dynamic stack size that is a multiple
of 4096 bytes due to mmu restrictions.

For example, this test would previously fail when using the
default dynamic stack size of 1024 bytes for 32-bit
platforms.

```
west build -p auto -b qemu_x86/atom/nopae -t run \
  tests/posix/common/ -- -DCONFIG_USERSPACE=y
```

It would pass with an additional argument
```
west build -p auto -b qemu_x86/atom/nopae -t run \
  tests/posix/common/ -- -DCONFIG_USERSPACE=y \
  -DCONFIG_DYNAMIC_THREAD_STACK_SIZE=4096
```

Add a special default for x86 when using dynamic thread stacks.

The x86 default removes the need for `boards/qemu_x86*.conf`,
with the exception of `qemu_x86_tiny`.

qemu_x86_tiny did not have sufficient memory (or configuration)
to run the non-userspace tests, so bump up the available ram
from 256k to 512k for this test and clone the .conf from the
demand paging tests.

Eventually, the common posix test should be split into more
concise functional categories.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-05 14:13:18 -04:00
Rex Chen
82ec1d7862 net: wifi: shell: add wps support
Add wps pin and wps pbc L2 layer cmd support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-05 14:07:48 -04:00
Pisit Sawangvonganan
7d1953918a net: wifi: shell: enhance consistency in cmd_wifi_dpp_ap_auth_init
The `cmd_wifi_dpp_ap_auth_init` function was added but is not yet
aligned with others.
This update enhances consistency with the following changes:
- Unified the order of declaration for `opt`, `opt_index`,
  `state`, and `long_options`.
- Wrapped lines in the `long_options` declaration to prevent them
  from extending too far to the right.
- Applied `struct option` as `static const`
- Unified the wrapping of `getopt_long` calls, regardless of
  the length of the `options` string.
- Using `getopt_state` to access `optarg` and also `optopt` offers
  a better alternative to direct global access.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-05 14:07:33 -04:00
Lyle Zhu
3756429b6c Bluetooth: BREDR: L2CAP: Recover ident when conn is pending
The `ident` of L2CAP BR connection req will be cleared if
function l2cap_br_conn_req_reply called to send L2CAP BR
connection rsp with result `BT_L2CAP_BR_PENDING`.

Then the invalid `ident` (it is zero) will be filled in
the L2CAP BR connection rsp after the ACL connection is
encrypted.

Recover `ident` if the result of the connection rsp is
`BT_L2CAP_BR_PENDING`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:24 -04:00
Lyle Zhu
c7c1f73045 Bluetooth: SSP: Support security level 4
Currently, error code `-ENOTSUP` will be
returned if start security with security
level 4.

For SC supported case, level 4 for ssp
should be supported.

Remove the code limitation to support
security level 4.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:15 -04:00
Lyle Zhu
7e54f13e7b Bluetooth: l2cap_br: Support Multi-Command Packet
Improve L2CAP BR to handle more than one
signaling command in one receiving L2CAP packet.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:09 -04:00
Lyle Zhu
3561540110 Bluetooth: L2CAP_BR: Set flags in CFG RSP
The flags of L2CAP_CONFIGURATION_REQ are set.
But in L2CAP_CONFIGURATION_RSP, all bits of
flags are cleared.

When used in the L2CAP_CONFIGURATION_RSP
packet, the continuation flag shall be set
to one if the flag is set to one in the
Request.

Copy flags from Request to Response if it
is a successful result.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:00 -04:00
Lyle Zhu
b7ab7c9d45 Bluetooth: L2CAP_BR: Process all defined OPTs
Currently, Only configuration opt MTU is handled.

For opt `Flush timeout`, `QOS`, `Retransmission
and Flow Control`, and `FCS`, response wilt
result `BT_L2CAP_CONF_UNACCEPT`.

For opt `extended flow specification` and
`extended windows size`, response wilt result
`BT_L2CAP_CONF_REJECT`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:06:55 -04:00
Lyle Zhu
c5648044a8 Bluetooth: L2CAP_BR: incorrect result returned if config opt unsupported
The `BT_L2CAP_CONF_SUCCESS` is returned as result for the config
req with supported opt.

Result `BT_L2CAP_CONF_UNKNOWN_OPT` should be returned for this case.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:06:55 -04:00
Daniel Flodin
9c5fda3e11 include: kernel: arch: sys: Use new TLS macro
PR #78645 replaced uses of the GNU keyword `__thread` with a new macro
`Z_THREAD_LOCAL` which expands to correspond C/C++ standard keyword if
applicable, else it falls back to `__thread`.

This PR addresses some missed replacements in headers files for #78645.

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
2024-10-05 14:06:26 -04:00
Jukka Rissanen
2e6c038363 tests: net: wifi: Run wifi tests together with net tests
Make sure wifi tests are run when verifying networking.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-05 14:06:15 -04:00
Ian Morris
627c33292a boards: mikroe: remove CONFIG_PINCTRL from defconfig of RA4M1 clicker
This PR fixes #78619 for the Mikroe RA4M1 Clicker board.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-05 14:05:48 -04:00
Robert Lubos
30a3d88d8a samples: net: wifi: Disable building on NS platform variants
The sample currently doesn't build for non-secure nRF platforms due to
mbed TLS misconfiguration - TFM enforces PSA crypto API, while the
default configuration for supplicant uses legacy crypto configuration.
In result, build fails due to unsatisfied dependencies. Therefore,
disable this variant from building temporarily to unblock the CI, until
the issue is resolved.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-05 14:05:36 -04:00
Mykhailo Lohvynenko
03029e7bd7 json: support parsing and serializing 'uint64_t'
Introduce support for 'uint64_t' type, so that unsigned numbers
can be serialized into JSON payloads.

Signed-off-by: Mykhailo Lohvynenko <Mykhailo_Lohvynenko@epam.com>
2024-10-05 14:04:48 -04:00
Ryan McClelland
ae63c62f0e drivers: i3c: implement support for ibi thr interrupts
Some IBI TIR packets can be larger than the ibi data fifo size
which can prevent it from receiving the full packet. This adds
a data struct in to the driver data where data can be pushed
to as data is being transfered.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Ryan McClelland
31e821bef6 drivers: i3c: cdns: grab mutex before adjusting prescalers
Grab the mutex before adjusting the prescalers to make sure no
transaction is on going.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Ryan McClelland
9c48f7eb37 drivers: i3c: cdns: correct sda push pull hold time
correct the comments and timing for the sda push-pull hold time
configuration.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-10-05 14:04:25 -04:00
Sylvio Alves
9403b08512 boards: esp32: move board specific kconfig definitions
HEAP_MEM_POOL_ADD_SIZE_BOARD is not a zephyr-defined entry and
should be placed into Kconfig instead of Kconfig.defconfig.

This PR moves that entry for all ESP32-based boards accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-04 22:53:01 +01:00
Martin Stumpf
4ec266152d drivers: cc: mcux: Fix incorrect clock source of FlexSPI2
The clock control mcux rev2 returns FlexSPI1 clock rate when FlexSPI2
clock rate is requested.

Signed-off-by: Martin Stumpf <martin.stumpf@vected.de>
2024-10-04 22:52:39 +01:00
Declan Snyder
8221a9a704 Revert "arch: common: Add user can specify the nocache location"
This reverts commit 88f6851a3d.

This is being reverted because it is redundant with the capabilities of
zephyr,memory-region and zephyr,memory-attr properties.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-04 22:52:31 +01:00
Andrej Butok
3ea954e97d tests: mcuboot: Add other nxp boards as test targets
Added other nxp boards as test targets:
frdm_ke17z, frdm_ke17z, frdm_ke17z512,
rddrone_fmuk66, twr_ke18f,
twr_kv58f220m, frdm_mcxn947/mcxn947/cpu0,
mimxrt1062_fmurt6, vmu_rt1170.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-04 22:51:22 +01:00
Jordan Yates
8354fc5c3c modules: tfm: default version numbers from VERSION
Populate the TFM application version numbers from the application
`VERSION` file if it exists.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-04 22:51:04 +01:00
Daniel DeGrasse
8a30c2318d boards: nxp: rd_rw612_bga: add display support documentation
Add documentation about supported displays on this board, as the list is
getting rather long and each display has its own bespoke connection
requirements.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
404041621f boards: nxp: rd_rw612_bga: enable with LCD_PAR_S035 shield
Enable the rd_rw612_bga board with the LCD_PAR_S035 shield. This shield
cannot be connected directly to the board, but the connection can be
made with a set of jumper wires.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
f8f70c2ac7 boards: shields: lcd_par_s035: enable reset gpio within input module
The LCD_PAR_S035 display module shares the reset pin between the display
module and the touchscreen controller. The touchscreen controller needs
the reset pin to be toggled low during boot in order to select the
expected I2C address. However, the reset sequence must occur before the
display is initialized. To enable this, set a custom INPUT driver init
priority when using this display module, so that INPUT drivers start
after MIPI DBI drivers but before DISPLAY drivers.

Since the reset sequence is now operating as expected, we no longer need
to use the alt-addr probing method. This method was previously only
working correctly because boards using this display were configuring
the display INT pin using the pin control API prior to resetting the
display, so when the display was reset it would select the alt-addr
I2C address.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
22a922fded drivers: mipi_dbi: nxp_lcdic: add support for 8080 mode
Enable support for 8 bit 8080 mode in the NXP LCDIC driver. Support
for programming the minimum duration of the write active/inactive signal
is also added, since this will be required to support high display
clocks in 8080 mode.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
04726a22cb drivers: display: st7796s: respect rgb_is_inverted in 8080 8 bit mode
Update ST7796s display driver to respect the setting of rgb_is_inverted
in 8080 8 bit mode, as it was previously not applied for this mode.

Also, simplify the logic check for 16 bit mode- the new check is
functionally equivalent, but no longer inverts both boolean values.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Daniel DeGrasse
3604aba75b shields: lcd_par_s035: rename nxp_flexio_lcd to zephyr_mipi_dbi_parallel
Although the parallel mipi dbi mode pinout used for the LCD PAR S035
display is specific to NXP boards, the definition of the display is
generic, and does not require NXP-specific parallel mipi dbi IP.
Therefore, rename the MIPI DBI node for this display from
`nxp_flexio_lcd` to `zephyr_mipi_dbi_parallel`. The gpio-nexus node name
is unchanged, as the pinout it describes is specific to NXP.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-04 22:50:45 +01:00
Joel Spadin
c82799bd4c tests: scripts: dts: Add tests for string escapes
Added tests for escape sequences in string and string-array properties.

Signed-off-by: Joel Spadin <joelspadin@gmail.com>
2024-10-04 13:26:51 -05:00
Joel Spadin
6edefd8f50 scripts: dts: properly escape string properties
Fixed escaping of double quotes, backslashes, and new line characters
so they can be used in string properties.

Previously, double quotes and backslashes were escaped in gen_defines.py
but not in gen_dts_cmake.py, and new lines were not escaped in either,
so using any of these characters would break the build.

Signed-off-by: Joel Spadin <joelspadin@gmail.com>
2024-10-04 13:26:51 -05:00
Jukka Rissanen
0515bfff7a net: lib: http-client: Use memcpy() to avoid gcc warning
GCC 12.2.0 can give this warning (version 11.4.0 did not), when
CONFIG_SPEED_OPTIMIZATIONS=y

subsys/net/lib/http/http_client.c: In function 'http_send_data.constprop':
subsys/net/lib/http/http_client.c:114:33: warning: 'strncpy' specified
bound depends on the length of the source argument [-Wstringop-truncation]
  114 |                                 strncpy(send_buf + end_of_send,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  115 |                                         data + end_of_data,
      |                                         ~~~~~~~~~~~~~~~~~~~
  116 |                                         remaining);
      |                                         ~~~~~~~~~~
subsys/net/lib/http/http_client.c:87:41: note: length computed here
   87 |                         remaining_len = strlen(data + end_of_data);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~

The code properly checks that we do not overwrite the destination
buffer even if we use the source buffer length to determine how much
to copy. One possible fix is to use memcpy() or strcpy(), I opted
to use memcpy() because it has the length option which feels more
natural.

Fixes #79326

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-04 13:24:17 -05:00
Fabio Baltieri
09a643ee2c devicetree: make DT_..._REG_SIZE return unsigned
Simiarly to f98fde07b3, make the SIZE macros return unsigned literal
values.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-04 13:23:23 -05:00
Seppo Takalo
8068cb2567 net: lwm2m: Add shell command for listing resources
Add shell command for listing multiple objects, resources
or resource instances.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-04 16:35:59 +01:00
Aleksander Wasaznik
357427aee5 Bluetooth: GATT: Remove note on flow-control from `bt_gatt_write_without
It's not clear what this note is trying to convey. I assume it's
outdated.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-10-04 16:35:51 +01:00
Jukka Rissanen
eb7b3f67d4 ci: tags: Add wifi tag to hostap and other wifi related files
Make sure we run wifi tests for all hostap related files
that are changed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-04 16:35:44 +01:00
Jukka Rissanen
335d713792 maintainers: Add wifi identifier for hostap files
Add wifi identifier for hostap related files.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-04 16:35:44 +01:00
Yong Cong Sin
8848fd4613 toolchain: match gcc 'missing-field-initializers' with others
`arcmwdt`` and `clang` both have
`-Wno-missing-field-initializers` in `warning_dw_1` and
`-Wmissing-field-initializers` in `warning_dw_2` while `gcc`
has `-Wmissing-field-initializers` in `warning_dw_1`, so
update it to match.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-04 16:35:27 +01:00
Luca Burelli
17be7ffca5 device.h: fix inconsistent semicolon logic for DEVICE_DT_DEFINE
When CONFIG_LLEXT_EXPORT_DEVICES is not enabled, the DEVICE_DT_DEFINE
macro ends with the contents of the Z_DEVICE_DEFINE macro, which always
includes a terminating semicolon.

When CONFIG_LLEXT_EXPORT_DEVICES is enabled, the macro ends with
Z_DEVICE_EXPORT, which does _not_ include a terminating semicolon. This
leads to a syntax error in places where the DEVICE_DT_DEFINE macro is
used without it.

Fix this by adjusting the added code when CONFIG_LLEXT_EXPORT_DEVICES is
enabled to include a semicolon after the Z_DEVICE_EXPORT macro; also use
the opportunity to remove a stray backslash.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-04 16:35:18 +01:00
Olivier Lesage
9ae2e23d34 bluetooth: host: Update text for BT_CHANNEL_SOUNDING kconfig
Include EXPERIMENTAL tag in the kconfig text and remove the word
"support" to align with other options

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-04 16:34:45 +01:00
Olivier Lesage
9e3943d13e bluetooth: host: Add CONFIG_BT_CHANNEL_SOUNDING_TEST
Makes it easier to make sure the CS test code is removed if desired.
It should hopefully allow for a clean split in general.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-04 16:34:45 +01:00
Olivier Lesage
a12b869eac bluetooth: host: Add support for processing CS subevent results
Adds support for:
- LE CS Subevent Result event
- LE CS Test End Complete event

For now, recombination of subevent results with more steps than could
fit within a single HCI event is not supported, and such events
are discarded.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-04 16:34:45 +01:00
Torsten Rasmussen
6fc8563b16 manifest: update zephyr-lang-rust to always link runtime libs first
Update zephyr-lang-rust module to include commit for linking the
runtime library before the librustapp.a.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
0274bcbee4 cmake: detect LLVM picolibc and newlib support
Newlib or Picolibc libraries for LLVM may be compiled or installed from
pre-built sources independently of LLVM itself.

This means that always indicating that TOOLCHAIN_HAS_NEWLIB=OFF and
TOOLCHAIN_HAS_PICOLIBC=OFF are wrong. But it could be just as wrong to
always indicate suport for newlib or picolibc.

Some pre-built LLVM toolchains are provided with default picolibc
support, such as LLVM for Arm embedded, but can also be used with newlib
be installing newlib add-on package.

Unfortunately it's not possible to query LLVM regarding newlib or
picolibc support.

Developers have the option of `-DTOOLCHAIN_HAS_<NEWLIB|PICOLIBC>=ON`,
but this is not widely known and cumbersome to do for each build.

An indication of newlib or picolibc support is the presence of library
specific headers, so to improve current situation we check for library
specific headers, and if those are present we assume support for the
library.

This commit improves the current support for LLVM in Zephyr when
cross-compiling, especially for users of LLVM for Arm embedded.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
b2eeef4ac9 manifest: update picolibc to support the new c_library property
This commit updates picolibc module to remove the need for hard-coding
linking with `-lgcc`.

Instead it sets the c_library linker property and thereby allows the
Zephyr toolchain infrastructure to properly handle the linking of
C and runtime libraries.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
9d835fe464 cmake: move specs compiler and linker flags to toolchain properties
Moving specs argument to compiler and linker properties so that the
compiler and linker in use can decide how the flags are mapped / handled
for the compiler and linker in use.

This avoids specifying `--specs=spec.picolibc` for clang which prints a
warning about an unused argument.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
102b3fc078 cmake: make TARGET optional in set_linker_property()
The `check_set_linker_property()` and `set_linker_property()` takes a
target argument. Make the target argument optional and use the target
`linker` as default target.

The function name `set_linker_property()` already implies that we are
setting a property and the linker target.

Remove the need to specify `TARGET linker` when using the default linker
property target.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
718b726b37 cmake: PROPERTY flag support on compile options and link libraries
Extend zephyr_link_libraries to allow an optional value together with
the `zephyr_link_libraries(PROPERTY <property> [<value>])`.

This allow setting linker property combined with a value when linking
Zephyr. The value will only be applied if the property is defined.

Extend zephyr_compile_options to support the same PROPERTY flag that
has been introduced for zephyr_link_libraries().
This remove the need for developers to write complex generator
expressions for compiler flags and thus minimizes mistakes.

The following syntax is now supported in addition to the existing
syntax: `zephyr_compile_options(PROPERTY <property> [<value>])`

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Torsten Rasmussen
2e3873adde cmake: improve Zephyr link phase
Zephyr is a bare metal build where standard libs are disabled.

This means that c and runtime libraries must manually be linked in.

This has generally been handled by using CMake's link libraries handling
but the issue with that is both de-duplication but also library link
order.

Standard libraries must be linked at last location to ensure symbols
are always available, however this is not optimal with
target_link_libraries() because this would ultimately require every
library to know the c library to link with, which is not desired.

Therefore, setup standard C and runtime library linking in linker
CMake files for toolchains where this is required.

This commit expands the principle introduced with toolchain abstraction,
see PR#24851.

This means that a toolchain implementation may specify standard C,
runtime, C++, etc libraries, as well as their link order.
Because a property approach is used, then Zephyr modules, such as the
Picolibc module can adjust such properties.

An optional `zephyr_linker_finalize()` macro is called at the end of
Zephyr's CMakeList process and can be used by the toolchain
implementation to define the final linker invocation.

This aligns the linker handling flow to the principle introduced in
PR#24851 and improves the flexibility and robustness of Zephyr build
system.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Jonathon Penix
9fe6c5e3fb cmake: linker: Use the same linker for cmake checks and final build
Currently, the linker that is used when performing various cmake checks
(check_c_compiler_flag, for example) may be different than the linker that
will be used during the actual build. This happens as we currently specify
'-fuse-ld' to force the appropriate linker a) after many such checks have
already happened and b) in a way which is not automatically propagated to
check_c_compiler_flag (and friends). As a result, the toolchain's default
linker will generally be used for such checks regardless of which linker
was selected in Zephyr.

This can lead to a number of surprises when building Zephyr, particularly
when building with clang. For example:

- If the linker is misconfigured, where the build will fail can vary
  depending on whether the linker is the toolchain's default. When the
  configured linker happens to be the toolchain's default, the build
  (helpfully) fails quickly on the checks for a basic working toochain.
  When the configured linker isn't the default, the build won't fail until
  the final link steps.
- The build can fail due to issues with a linker other than the one
  configured by the user in Zephyr. For example, LLVM toolchains without
  lld will generally fail to build Zephyr (the checks for a basic
  working toochain will fail) for targets where lld is the default in LLVM
  even if GNU ld is configured in Zephyr and would otherwise be used in the
  final build.
- Flags which are only added if check_c_compiler_flag (or similar) succeeds
  may be unexpectedly omitted during the final build if the flag is
  supported in the configured linker but is unsupported in the toolchain's
  default linker (as check_c_compiler_flag will test using the default
  one).

Note that this isn't limited to clang--even when we are building with
Zephyr's SDK and force ld.bfd, we seem to use the 'ld' variant during the
cmake checks (though this generally seems fairly harmless compared to
mixing ld/lld or other proprietary linkers).

To fix this, ensure the appropriate 'fuse-ld' is set early enough and in
such a way that the same linker will be used throughout the entire build.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-04 16:34:35 +01:00
Emil Gydesen
dc97bbd35f Bluetooth: Audio: Rename bt_audio_codec_qos -> bt_bap_qos_cfg
The QoS structure is not related to a codec, but rather a
stream, and should thus not use the "Codec" name.

The BAP and ASCS specs refer to the QoS as
"QoS configuration" several places, so it is an obvious
choice for a name.

Since the structure is defined and used by BAP, the prefix
was changed from bt_audio to bt_bap.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-04 16:34:22 +01:00
Krzysztof Bartnicki
e1cacb3a18 net: dns: Fix DNS resolver cache invalid find call
The size of the output array for the find call in resolver
is invalid: expected array size while overall memory size
provided. As the latter is bigger there is a high probability
of memory overwrite occurring on the stack.

Signed-off-by: Krzysztof Bartnicki <krzysztof.bartnicki@embevity.com>
2024-10-04 10:50:31 +01:00
Yong Cong Sin
453dfed3ad arch: riscv: smp: prevent nested #ifdef
The `CONFIG_PLIC_IRQ_AFFINITY` depends on `CONFIG_SMP` in the
Kconfig layer, nested #ifdef can be avoided for readability.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-04 10:50:14 +01:00
Yong Cong Sin
796b795cda drivers: intc: plic: fix for SMP=n when MP_MAX_NUM_CPUS > 1
The functions to obtain the address are hardcoded to return
the address of the first core when `CONFIG_SMP != y`, this
causes an issue with enabling an IRQ when there are more than
one core in the system (`CONFIG_MP_MAX_NUM_CPUS > 1`), as the
driver would first enable the IRQ on the first core, and when
it tries to obtain the address for the following cores and
disable the IRQ on them, the functions continue to return the
address of the first core, causing the IRQ to be disabled
on the first core.

Fix this by determine if `CONFIG_MP_MAX_NUM_CPUS > 1` instead
of `CONFIG_SMP=y` when returning the address.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-04 10:50:14 +01:00
Robert Lubos
0376a417fd tests: net: ipv6: Enable mbed TLS heap
mbed TLS MD operations, used by IPv6 Privacy Extensions, require access
to heap. This may vary depending on platform/mbed TLS variant used,
hence enable CONFIG_MBEDTLS_ENABLE_HEAP in tests to ensure mbed TLS has
always access to some heap memory.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-04 10:50:06 +01:00
Yassine El Aissaoui
ad673d18b7 soc: rw: Fix stack over flow during BLE init
RW requires more stack size now,
value changed from 1024 to 1280.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-04 10:50:00 +01:00
Pieter De Gendt
668a5dc55d samples: net: sockets: Update HTTP server linker with CMake variable
Use the CMake variable for iterable section's subalignment instead of a
global defined macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-04 10:49:51 +01:00
Pieter De Gendt
e9d24aa7da doc: connectivity: networking: Update HTTP linker example
Update the HTTP linker example to use a CMake variable instead of a
global defined macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-04 10:49:51 +01:00
Pieter De Gendt
79f063e81b doc: connectivity: networking: Update CMake linker info to CoAP server
Add missing entry to the documentation to also support CMake linker
generator with CoAP services.
Update hard coded value with linker script defined value.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-04 10:49:51 +01:00
Krzysztof Chruściński
cbe0abfd00 tests: drivers: uart: uart_pm: Disable PM_DEVICE_SYSTEM_MANAGED
When PM_DEVICE_SYSTEM_MANAGED is enabled (and that's the default) all
devices are suspended when device go to idle state (through pm
subsystem and not through just cpu_idle). In this test we are manually
controlling PM of the DUT so we don't want that.

Additionally, suspend action is taking a semaphore and it is illegal
in idle thread (where system managment operates) which causes assert
in kernel scheduler.

Removed for nrf54h20 as it applies only there.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:48:57 +01:00
Emil Gydesen
a4d628efcb tests: Bluetooth: tester: Implement TBS registration
TBS registration was changed from static to dynamic
and the BT Tester application need to be updated to use
the dynamic registration.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-04 10:47:03 +01:00
Krzysztof Chruściński
242331291d drivers: misc: coresight: nrf_etr: Imply UART asynchronous API
Asynchronous API is recommended to be used by ETR buffer handler but
polling is also supported. Imply UART_ASYNC_API so that it is possible
to disable it in project config and fall back to polling if needed. For
example to reduce memory footprint.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:46:54 +01:00
Krzysztof Chruściński
c6f4e719b7 snippets: nordic-log-stm: Do no enforce UART Asynchronous API
UART asynchronous API will ensure highest throughput but it is not
necessary as polling API is also supported as a fallback. Do not
enforce use of asynchronous API as there might be cases when polling
might be used (e.g. to reduce memory footprint).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:46:54 +01:00
Jakub Zymelka
3904c3b2fe samples: Align tests yaml and overlays to nrf54l15dk
Align mbox sample.yaml and icmsg flpr overlays to nrf54l15dk.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-10-04 10:46:30 +01:00
Dominik Chat
70419bdee7 dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg
Change the default IPC backend of nRF5340 to icbmsg.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2024-10-04 10:46:18 +01:00
Erik Brockhoff
670bd3bed2 Bluetooth: controller: fixing issue re. assert on overlapping conn upd proc
If a connection update (from central) overlaps a peripheral initiated
conneection param request, then central rejects peripheral request
and continues central procedure. This lead to an assert in peripheral
On instant there would not be an rx_node for notification, as this
would have been discarded by the reception of the REJECT.

This fix ensures that once an rx_node has been 'accepted' for retention
it will not be discarded/overwritten by future rx_nodes

The test will trigger the assert without the fix in.

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
2024-10-04 10:46:06 +01:00
Krzysztof Chruściński
3786b617bd soc: nordic: Disable asserts on ppr and flpr
Asserts are by default enabled for tests but flpr and ppr are
small cores (<64k) and many tests does not fit in memory with
asserts enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:45:57 +01:00
Krzysztof Chruściński
ffe6910e21 tests: kernel: interrupt: nested_irq: support nrf54h20_cpuppr
Add dedicated interrupt lines for nrf54h20_cpuppr. Similar exception
was already added to nrf54l15_flpr: 8742e2476.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:45:57 +01:00
Luca Burelli
7773fe8dd6 llext: hotfix: fix device API tests for platforms without console
LLEXT tests currently fail on platforms where a console was chosen but
its underlying device is not enabled. This might happen for example on
multicore SoCs, where the console is only enabled on the most powerful
CPU.

Fix this by only allowing testing the device API if the console device
is both chosen and enabled in the final DT.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-03 22:01:08 +01:00
Daniel Leung
b43e7387db tests: mem_map: no exec test for intel_adsp/ace30/ptl
This needs special treatment because the TEST_MEM_MAP section
is placed at the end. Since there is code in TEST_MEM_MAP,
rimage thinks the whole text section spans from .text to
end of TEST_MEM_MAP, which overlaps .data and others, so
it complains. Skip the execution test to avoid this issue.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-03 22:00:54 +01:00
Daniel Leung
3d65839dbc tests: rename intel_adsp_ace30.conf to intel_adsp_ace30_ptl.conf
The board has been renamed from intel_adsp/ace30_ptl to
intel_adsp/ace30/ptl. So the corresponding board only configs
for tests also need to renamed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-03 22:00:54 +01:00
Jyri Sarha
32f9ecacc4 soc: intel_adsp: tools: cavstool.py: Add debug_slot_offset_by_type()
Add debug_slot_offset_by_type() for getting debug window slot offset
by type identifier. How to find the correct slot and what types there
are is documented here:

soc/intel/intel_adsp/common/include/adsp_debug_window.h

In a normal situation a client program would try to find a specific
slot right after DSP boot. Because of that the we can not expect it to
be there immediately. Instead we need to try multiple times and give
firmware some time to update the debug slot descriptor table.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 22:00:33 +01:00
Eric Ackermann
5275d44409 llext: Add RISC-V arch-specific relocations
This commit introduces architecture-specific ELF relocations for RISC-V,
in accordance with the RISC-V PSABI specification:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
Also, the necessary compiler configurations for compiling LLEXT
extensions on RISC-V are added, and the llext tests are executed on
RISC-V targets.
Calling llext extensions from user threads in RISC-V is still
unsupported as of this commit.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2024-10-03 21:59:42 +01:00
Seppo Takalo
73a3438b82 net: lwm2m: Remove hostname_verify flag from context
Use security mode (PSK or X509) to detect if we should
set the socket option to verify hostname.

PSK security mode cannot verify hostnames as this information
is coming in the certificate, so don't set the options.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-03 17:09:32 +01:00
Francois Ramu
8c0026a6a6 boards: st: nucleo_h7 boards correct LD2 on PE1 pin
The stm32h7 nucleo 144 boards (ref MB1364)
have the LD2 on PE1 pin (not PB7). This commit change this
in the doc. Board DTS are correct.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-03 17:09:16 +01:00
Emil Gydesen
205a99f97f doc: migration-guide: Add LE Audio entry for dynamic TBS
The TBS and GTBS shall now be registered at runtime and can
no longer be registered statically. This requires a change in
the applications using this.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-03 17:09:08 +01:00
Seppo Takalo
77e09916f7 tests: lwm2m: Remove qemu-cortex-m3
This board just don't have enough RAM for all tests
so it is just a maintenance headache without any
benefits.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-03 17:08:55 +01:00
Seppo Takalo
871aab7c45 tests: lwm2m: Fix minor timing issues on tests
* Wait for update when new object is created

  Sometimes our blockwise transfer starts before server have
  received an LwM2M Update. This causes Leshan to reject the SEND
  because is was not aware of object /19/0

* Wait "registered" message already in conftest.py.
  Sometimes Qemu boots faster, and the testcase don't see the
  log.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-10-03 17:08:55 +01:00
Benjamin Cabé
d224fa130e doc: _scripts: gen_devicetree_rest: add link to driver sources
When generating the documentation pages for the devicetree bindings, add
a link to the .c file implementing the corresponding driver, or folder
likely to contain the driver implementation, using heuristics to
determine the most likely location of the driver sources.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-03 17:08:43 +01:00
Tomasz Moń
508bd3edef drivers: udc_dwc2: Change hibernation exit on bus reset
Adhere to programming guide steps on Hibernation Exit on Host Initiated
Reset.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-03 17:08:36 +01:00
Tomasz Moń
f57e78de2a drivers: udc_dwc2: Suspend if connected to suspended bus
Peripherals are required to support the suspend state whenever VBUS
is powered, even if bus reset has not occurred (Mandate: Required,
Effective Date: February, 2010).

Remove the stale suspend check that essentially prevented the device
from hibernating when connected to already suspended bus.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-10-03 17:08:36 +01:00
Robert Lubos
0c1550dd9f net: sockets: Remove SET_ERRNO() macro
Macros with flow control are discouraged and generate compliance error,
hence remove it and replace the corresponding code with simple errno
assignments.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-03 17:08:29 +01:00
Robert Lubos
bdbf7cc620 net: offload: Do not need to enable TC threads for NET_OFFLOAD
Net offloading doesn't need net TC threads to be enabled as they're used
by the native stack. This fixes build if CONFIG_NET_OFFLOAD is enabled
but native stack is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-03 17:08:29 +01:00
Robert Lubos
2e1d89619f net: Avoid compiling native network stack parts w/o NET_NATIVE
In case NET_NATIVE is disabled, certain network stack components do not
need to be compiled. Otherwise, they could throw errors if
--no-gc-sections compiler options is enabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-03 17:08:29 +01:00
Robert Lubos
404e9c7b88 net: sockets: Split native IP socket implementation from syscalls
Native IP socket implementation need only be build if native IP stack is
enabled. Therefore, split the native IP sockets from the common socket
syscalls shared across all socket implementations.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-03 17:08:29 +01:00
Tommi Rantanen
a5aed04b7e net: lib: coap: Initialize response_truncated
Fix the following compilation warning given when using newlibc:
warning: 'response_truncated' may be used
uninitialized [-Wmaybe-uninitialized]

Issue is not seen with picolibc.

The variable was introduced as part of PR #76257

Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
2024-10-03 17:08:21 +01:00
Florian Grandel
dd08fe5893 cmake: emu: qemu: return to ctrl-c
To avoid killing the QEMU process w/o also ending the 802.15.4
monitoring tool, we reassign the terminal's interrupt shortcut from ^C
to ^D. This change resets the shortcut to ^C after ending the QEMU
session.

Fixes #79131

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-03 17:08:14 +01:00
Sadik Ozer
3f4a9c408a boards: arm: adi: Enable display for MAX32662EVKIT board
MAX32662EVKIT board has CFAF128128B1-0145T display which
is 128x128 graphic display.
This commit enable mpi dbi display support with LVGL graphic library.
Pin connection of display is 3wire mode
SRAM size increased to be fit with lvgl example.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-03 17:07:25 +01:00
Sadik Ozer
98f19592f1 dts: arm: adi: Add MAX32662 missing pin definitions
This commit add missing pins that not defined in pinctrl file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-10-03 17:07:25 +01:00
Chris Friedt
d11a0c2be9 tests: posix: common: test userspace as well
Ensure that userspace is tested in the common posix testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-03 17:07:05 +01:00
Chris Friedt
7506274ef2 posix: use sys_sem instead of k_spinlock for pool synch
Based on Andy's talk at eoss 2024, use the sys/sem.h api instead
of the spinlock.h api to synchronize pooled elements since it
has minimal overhead like semaphores but also works from
userspace.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-03 17:07:05 +01:00
Chris Friedt
5a0b1b1628 clang-format: add entry for SYS_SEM_LOCK()
SYS_SEM_LOCK() is a for-loop-like macro similar inspired by
K_SPINLOCK().

Add an entry to .clang-format so that autoformatting works as
expected.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-03 17:07:05 +01:00
Chris Friedt
5d29e13e09 sys_sem: add a for-loop-like macro similar to spinlocks
Add SYS_SEM_LOCK() and SYS_SEM_LOCK_BREAK which are mostly the
same as K_SPINLOCK() and K_SPINLOCK_BREAK.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-03 17:07:05 +01:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Yong Cong Sin
5aebd1276d devicetree: add DT_NODE_HAS_STATUS_OKAY
We already have `DT_HAS_COMPAT_STATUS_OKAY` and
`DT_NUM_INST_STATUS_OKAY`, it seems intuitive to assume that
`DT_NODE_HAS_STATUS_OKAY` exists, so much so that it was used
before it's implemented.

This patch implements `DT_NODE_HAS_STATUS_OKAY`, which is
equivalent to: `DT_NODE_HAS_STATUS(<node_id>, okay)`

Added test for it in `tests/lib/devicetree/api`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Andrew Sonzogni
44d101acab drivers: sensor: lis2dw12: add interrupt status fetch
INT status can be fetched if the feature can't trigger via interrupt

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
70de35d9c9 drivers: sensor: lis2dw12: add inactivity detection
Add inactivity mode or stationary detection

Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Andrew Sonzogni
c74dd3ee74 drivers: sensor: lis2dw12: add temp reading
adds support for reading temperature
Signed-off-by: Andrew Sonzogni <andrew@safehear.fr>
2024-10-03 11:41:51 +01:00
Daniel Leung
8638e411e7 xtensa: fix insecure userspace warning wording
"in behave of" -> "on behalf of", which is more accurate of
what is actually happening in the code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-03 11:41:40 +01:00
Adrien Ricciardi
cd76ab3428 fs: nvs: Simplified the initial loop in calc_free_space()
Replaced the initial loop that computes the initial free space
by a simple formula.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-10-03 11:41:33 +01:00
Dominik Kilian
9acfd9d4ca maintainers: Add doki-nordic as maintainer of IPC
Become the maintainer for the IPC code.
Additionally carlocaione becomes collaborator now.

Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
2024-10-03 11:41:12 +01:00
Georges Oates_Larsen
a4599219b7 logging: dictionary: Support unsigned integers
Add unsigned integer support to the log parser.

This does not change the underlying log format,
it only allows the log parser to more accurately
read the log format.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-10-03 11:40:41 +01:00
Dave Rensberger
c0bb9735d7 net: shell: Make stack size for event_mon_stack configurable
The stack size for the event_mon_stack task may need to be larger than the
default 1024 to avoid crashes. It should be configurable through Kconfig
so that source code doesn't need to be modified to increase it.

Signed-off-by: Dave Rensberger <davidr@beechwoods.com>
2024-10-03 11:40:16 +01:00
Florian Grandel
5688a95d07 cmake: modules: dts: fix in/out docs
The input/output documentation of dts.cmake and pre_dt.cmake was
outdated.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-03 11:40:09 +01:00
Jyri Sarha
80e629cd97 soc: intel_adsp: tools: cavstool.py: Add debug_slot_offset()
Add debug_slot_offset() function for getting a debug slot offset by
the slot number.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
9563960bde soc: intel_adsp: tools: cavstool: Fix fw_is_alive() and wait_fw_entered()
The fw_is_alive() depends on 'dsp' global variable which is assigned
from map_regs() return value. To make fw_is_alive() and
wait_fw_entered(), that calls fw_is_alive(), callable from another
module, the 'dsp' variable needs to be passed as an argument.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
91495812bd soc: intel_adsp: tools: cavstool.py: Make map_regs() shareable
map_reg() depends on args global variable for knowing it should
load a new firmware or just stand by for logging or Zephyr
shell. The map_regs() code is the very first step to access the
DSP memory, it nees to be shareable if the code is to be accessed
from another python module.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Jyri Sarha
c2126cb906 soc: intel_adsp: tools: cavstool.py: argsparse code to separate function
Do not force argsparse code to all modules importing cavstool.py. The
commit moves argparse code into a separate function, and calls it from
'if __name__ == "__main__":'. Also adds the argsparse call to to
acetool.py that shares cavstool code with the argument parsing.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-10-03 11:39:15 +01:00
Yong Cong Sin
c710f8892b drivers: intc: plic: implement irq affinity configuration
- Implement irq-set-affinity in RISCV PLIC.
- Added new affinity shell command to get/set the irq(s)
  affinity in runtime, when `0` is sent as the `local_irq`, it
  means set/get all IRQs affinity.
- Some minor optimizations

Updated the build_all test to build this new configuration.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 13:48:05 -05:00
Laurentiu Mihalcea
155f3f3ba6 west_commands: sign: add imx95 to target list
Add imx95 to target list to allow signing images for
imx95.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-02 13:46:06 -05:00
Laurentiu Mihalcea
01754956de boards: nxp: imx95_evk: add rimage support for m7 ddr variant
Add rimage support for the i.MX95 EVK M7-based DDR board
variant. This is only required when running SOF.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-10-02 13:46:06 -05:00
Pieter De Gendt
476c12fdde include: zephyr: net: coap_service: Use _CONCAT expansion
Passing MACRO arguments that need expansion require _CONCAT.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-02 13:44:42 -05:00
Jamie McCrae
96c6c7863a sysbuild: cmake: Fix ExternalZephyrProject_Add() revision handling
Fixes an issue with HWMv2 boards whereby the specified board
revision was not applied at the correct place, which would cause
the target image to fail configuration

Fixes #79208

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-02 13:43:59 -05:00
Jori Rintahaka
a3f2ba1928 drivers: bluetooth: silabs: move code from module to main tree
The code that handles passing events to and from the controller
resided in the hal_silabs module. This is an integral part of the
HCI driver that it can't work without, and logically belongs in
the driver.

Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
2024-10-02 13:42:56 -05:00
Torsten Rasmussen
094b0498a9 manifest: update open-amp to include change to strlcpy
This manifest update points open-amp to include a fix for unsafe use
of strncpy by by replacing it with internal strlcpy.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-10-02 13:42:09 -05:00
Alberto Escolar Piedras
867e84ce59 manifest: Update nRF hw models to latest
Update the HW models module to:
bf8e45bd1f870e49cc15392e045c28d54ea12285

Including the following:
* bf8e45b (52) CCM HAL: Support nrfx 3.7.0 with renamed TASK_CRYPT
* 14c14d7 HW_models/NHW_GRTC: Support MDK not exposing SYSCOUNTERVALID
* 6d66801 RADIO: Improve RSSISTART behaviour
* ceb6a80 hal grtc: Add replacements for new int group functions
* 838aa38 docs/README_HW_models: Add reference to Bsim HW models descr
* 0ff34d7 docs: Several updates and fixes
* 2972a93 AES_CCM: Avoid UBSAN pointer align warnwhen reading CNFPTR
* f8cd477 UART: Minor bugfix: Set rx status to off during ENABLE

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 13:41:15 -05:00
Georgij Cernysiov
d8c0a67d7b drivers: ethernet: adin2111: fix generic spi frame reception
Fixes a bug that results in double RX buffer read from ADIN
when generic SPI protocol is used.

Actual frame size to be read must be RX_FSIZE - HEADER.
If we read less amount of bytes, then ADIN raises an IRQ or
signals via Pn_RX_RDY that there is another frame available, as
we fail to read the whole frame.

The fix for "Still some length to go 2" is still present, we drop
the CRC32 bytes from the frame prior allocation and network
stack pass.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-10-02 13:40:42 -05:00
Iuliana Prodan
42b116e4ac samples: add support for i.MX8QM and i.MX8QXP DSP core in openamp_rsc_table
Add the dts and config overlay for the two boards in order
to have the openamp_rsc_table sample working on
HiFi4 DSP from i.MX8QM and i.MX8QXP.

Since these two are similar, use a snippet.

Therefore, to compile the sample we use:
west build -p -b imx8qm_mek/mimx8qm6/adsp -S nxp-openamp-imx8-adsp
-s samples/subsys/ipc/openamp_rsc_table/

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Iuliana Prodan
991eb0cd10 dts: xtensa: nxp: add mailbox node
Add mailbox node used for inter-process communication.
For DSP, we have a direct interrupt line to the core.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Iuliana Prodan
c85d157fc0 soc: nxp: imx: add resource_table section in linker script
Add resource_table section in linker script for i.MX8QXP and
i.MX8QM, for inter-process communication.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-10-02 13:40:20 -05:00
Pete Skeggs
715b97397b net: lib: coap: Make use of ZSOCK_MSG_TRUNC configurable
Not all offloaded network stacks support this socket option so
control it using a Kconfig CONFIG_COAP_CLIENT_TRUNCATE_MSGS,
and enable it by default.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-10-02 15:55:00 +02:00
Lyle Zhu
0ed8866eb6 Bluetooth: host: Kconfig: Correct help of BT_BONDABLE
Correct the `help` of the configuration `BT_BONDABLE`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
aaab223574 Bluetooth: SSP: Incorrect bonding status notified
The `bonded` flag of the callback `pairing_complete` is always true,
event if the SSP pairing is non-bondable.

Check the bonding status in SSP complete event instead of in link key
notify event.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
a00d5089d5 Bluetooth: shell: Add command conn-bondable
Add command `conn-bondable` to enable/disable the pairing bondable
flag of a specific ACL connection.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
d5160f663a Bluetooth: BR: Improve bt_conn_set_bondable
In current, the bondable flag cannot be configured for each specific
BR connection.
But for LE conn, there is a function `bt_conn_set_bondable` for this
purpose.

Improve `bt_conn_set_bondable` to support BR conn.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
e772c45e6b Bluetooth: SSP: Support non-bondable mode
If the return value of function bt_get_bondable is false, clear the
bonding flag when controller requiring `Authentication_Requirements`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Lyle Zhu
c0ce5b419b Bluetooth: Host: smp: Add function to get bonding setting
Add a function bt_get_bondable to get the bonding setting.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 15:54:30 +02:00
Håvard Reierstad
0fe6d34f8a Bluetooth: Mesh: Remove duplicate brg declaration
Removes duplicate declaration of the bridging direction, keeping the
one in the public header file.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-10-02 14:54:13 +01:00
Håvard Reierstad
8049c24994 Bluetooth: Mesh: Add prefix to Subnet Bridge API
Adds the `bt_mesh_brg_cfg` prefix to the public Subnet Bridge API, and
aligns the function and callback naming with the rest of the Bluetooth
Mesh API.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-10-02 14:54:13 +01:00
Johann Fischer
35c9e54961 include: usb_ch9: add note about USB_CONTROL_EP_MPS
This value may not be correct for devices operating at speeds other than
high speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:54:04 +01:00
Johann Fischer
f5a3f90a68 usb: device_next: respect bMaxPacketSize0 in control transfers
Only the device operating at high speed has bMaxPacketSize0 set to 64
bytes, the device operating at other speeds may have a different value.
For full speed, use the value from the full speed descriptor.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:54:04 +01:00
Alberto Escolar Piedras
3d86360c33 samples/bluetooth/cap_acceptor: Add missing include
strncasecmp()'s prototype is provided in strings.h
let's include it to avoid a build warning.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Alberto Escolar Piedras
d29f2d547b tests/bsim/bluetooth/audio_samples: Error on warnings
Do not override the cmake_args parameter, but instead use the
cmake_extra_args one.
Otherwise we lose the default -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Alberto Escolar Piedras
1460ef4419 tests/bsim/compile: Improve cmake_extra_args
Allow cmake_extra_args to contain multiple arguments

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 14:53:55 +01:00
Emil Gydesen
9658b7d0d3 samples: Bluetooth: Audio: Avoid uisng K_FOREVER in syswq
Several samples used K_FOREVER when allocating buffers in the
system workqueue thread, which is prohibited.

The samples should rather retry later if TX fails.

This is not the ideal solution for the samples, but
fixes a bug. Ideally the samples would use a dedicated thread
to handle TX, instead of the system workqueue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-02 15:53:37 +02:00
Daniel Gaston Ochoa
bce51b7706 drivers: spi: stm32h7: avoid unnecessary suspend
The SPI stm32 H7 driver always suspends the SPI transaction
when finishing the transceive operation. This, according to
the stm32 H7 datasheet, must only be done when the SPI master
is configured as receive-only, and the driver always
configures it as full-duplex.

Hence, remove this unnecessary operation for clarify and for
a potential reduction in the minimum time between SPI
transceive operations.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-10-02 14:42:48 +01:00
Luca Burelli
aeec014cbe llext: rename symbol struct identifiers
This patch renames the identifiers for the structs in the LLEXT symbol
tables to have a prefix of "__llext_sym_". This is done so existing
scripts like gen_device_deps.py do not confuse them with the object
they are referring to.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-10-02 14:42:37 +01:00
Jordan Yates
bf9584d6ba fs: add FILE_SYSTEM_LIB_LINK option
Add an option that links in the underlying file system libraries as
usual, but doesn't compile in the Zephyr file system abstraction layer.

This can be useful to avoid linking in the entire filesystem
implementation through the `fs_file_system_t` API struct if only a
subset of the functions are used.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 14:42:10 +01:00
Johann Fischer
b79ffe3582 usb: device: use irq_update in CDC ACM UART implementation
Move the TX/RX ready flag updates into irq_update() where they belong.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
c5a31aec3c usb: device: cleanup CDC ACM UART rx_ready, tx_ready and is_pending
Align the irq_tx_ready and irq_rx_ready implementations and use them
from irq_rx_pending.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
0f0322127d usb: device: avoid starving other threads in CDC ACM UART fifo_fill
The check for the device being configured or suspended in the fifo_fill
implementation can starve other threads, because the early return does
not change the state of the TX path, and fifo_fill is called again
from the callback loop. The ringbuffer that emulates the TX FIFO can be
filled and marked ready as long as the space is available.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:42:02 +01:00
Johann Fischer
fe4d8a678c usb: device_next: use delayable work for TX FIFO in CDC ACM
Use delayable work to reduce CPU load when there is no transfer flow in
the host direction. This also improves the performance of poll out, as
introduced in commit commit fed6bde788
("usb: device: cdc_acm: send more than 1 byte in poll out")
for the legacy CDC ACM implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
4875aa3924 usb: device_next: limit CDC ACM OUT transfer size to the current MPS
When the controller is connected to a full speed bus, regardless of
whether the controller supports high speed or not, the transfer size for
the bulk OUT endpoint should be equal to the MPS in the current
configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
ece1f51c5b doc: usb: add note about CDC ACM virtual UART polling API behavior
Add note about CDC ACM virtual UART polling API behavior.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
ef89321160 usb: device_next: allow fifo_fill and poll_out be used simultaneously
As it is still accepted practice, allow fifo_fill and poll_out to be
used simultaneously. The lock around fifo_fill was already in place.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
6cf27758d3 usb: device_next: align CDC ACM UART poll_out with legacy implementation
Apply changes in commit c152e0980c
("usb: device: cdc_acm: block in uart_poll_out() routine")
to the new CDC ACM UART poll_out implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
1867e71df2 doc: usb: describe CDC ACM virtual UART IRQ API behavior
In general, it mirrors what is described in Interrupt-driven API
documentation, but here a little more explicitly and with a simplified
example, so that we can finally chisel it into the stone.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
64ee885950 usb: device_next: align CDC ACM UART with Interrupt-driven UART API
Align CDC ACM UART with Interrupt-driven UART API behavior description.
Use the same flags in uart_irq_rx_ready(), uart_irq_tx_ready(), and
uart_irq_is_pending(), which are updated after each uart_irq_update()
call. Allow TX FIFO to be filled if there is space.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Johann Fischer
fc0437c0b8 doc: usb: move "Built-in functions" down and increase the heading
Move "Built-in functions" section down and increase the heading.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-10-02 14:41:50 +01:00
Fabio Baltieri
f98fde07b3 devicetree: make DT_..._REG_ADDR return unsigned
`DT_..._REG_ADDR` macros do not always return an unsigned value. This
commit adds and unsigned 32bit prefix to ensure the value is always
unsigned.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-02 14:41:32 +01:00
Alberto Escolar Piedras
71afbaf66e irq_multilevel: explicitly initialize all members to avoid a warning
As this is a header, let's explicitly initialize all members of the
struct to avoid a "missing initializer for member" warning in case the
file is built with -Wmissing-field-initializers, or worse, that warning
set to be an error.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 15:03:25 +02:00
Maciej Baczmanski
9655c2f61b net: openthread: add OPENTHREAD_STORE_FRAME_COUNTER_AHEAD
Add `OPENTHREAD_STORE_FRAME_COUNTER_AHEAD` Kconfig option
and set it to 100000, as after calculations it appears to
be a more suitable value.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-10-02 10:16:16 +02:00
Maciej Baczmanski
539cc1ddfa manifest: openthread: Regular OpenThread upmerge
Update OpenThread up to `2aeb8b8` and align KConfig options

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-10-02 10:16:16 +02:00
Lyle Zhu
4c09f5cce3 Bluetooth: BR: Shell: Remove duplicated else statement
Remove duplicate `else` statement if the function is returned from
corresponding `if` statement.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:15:14 +02:00
Lyle Zhu
0270f91c1c Bluetooth: BR: Shell: Return error if command is failed
Return error code if the command is failed instead of `0`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:15:14 +02:00
Lyle Zhu
3b74ed3f54 Bluetooth: BR: shell: Rename int res to int err
Rename `int res` to `int err`. Make variable naming consistent.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:15:14 +02:00
Lyle Zhu
17cfe36195 Bluetooth: BR: Return SHELL_CMD_HELP_PRINTED if calls shell_help
If the function `shell_help` is called, return SHELL_CMD_HELP_PRINTED
instead of `0`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:15:14 +02:00
Lyle Zhu
0b6684d8e3 Bluetooth: l2cap_br: Comment on l2cap->info_fixed_chan
Comment on the l2cap->info_fixed_chan why the size of it is one octet.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:14:18 +02:00
Lyle Zhu
f1d9549a0c Bluetooth: BR: SMP: Check if remote supports CID 0x0007
Add a function bt_l2cap_br_get_remote_fixed_chan to get the remote fixed
channels.

If the fixed channel CID 0x0007 is unsupported, skip the LTK derivation.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:14:18 +02:00
Florian Grandel
117a0098f3 drivers: flash: simulator: fix address resolution
The flash simulator assumes that flash is being addressed with absolute
addresses by clients. But this is not the case. Given addresses are
relative to the flash base address.

The existing code only worked because the base address was always zero.
Testing with non-zero base addresses caused a mem fault/page fault.

(Reproducible e.g. when using the NVS settings subsystem on QEMU x86
with a non-zero base address in the soc-nv-flash node.)

Fixes #79082

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-02 10:12:27 +02:00
Alberto Escolar Piedras
ca26820ac1 ipc: icmsg: Check return error of pbuf_rx_init()
When pbuf_rx_init() was added, this caller did not check for a possibly
returned error to not have more overhead than before using this
function.
Although unlikely let's check for a possible error (not configured Rx
pbuf cfg).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 10:09:18 +02:00
Mirko Covizzi
5742b27078 ipc: icmsg: fix typo
Fix typo in header.

Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
2024-10-02 10:09:09 +02:00
Lyle Zhu
ff39d41034 Bluetooth: ssp: correct pairing failed callback
Current, the callback `pairing_complete` is called
when the pairing is filed. But there is a callback
`pairing_failed` for pairing failed case.

Correct the callback calling if pairing failed.
Call `pairing_failed` instead of `pairing_complete`
if the pairing failed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:09:00 +02:00
Lyle Zhu
f9c490b7e1 Bluetooth: LE: SMP: Set CT2 bit by default
Set CT2 bit to auth_req field by default if
the BR is enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:08:44 +02:00
Lyle Zhu
c7db41dddb Bluetooth: BR: SMP: Set CT2 bit by default
Set CT2 bit by default.

If CT2 bit is set by both side, set the
CT2 flag `SMP_FLAG_CT2`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:08:44 +02:00
Lyle Zhu
8c8a21a04c Bluetooth: BR_SMP: Add a flag BT_CONN_BR_PAIRED
Due to the BT_CONN_BR_PAIRING is cleared when
receiving ssp pairing complete event. The LTK
key cannot be derived after the BR connection
encrypted.

Add a flag BT_CONN_BR_PAIRED that the pairing
has been done.

Use this flag to indicate whether the LTK
derivation needs to be applied if the BR ACL
connection is encrypted.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:08:34 +02:00
Lyle Zhu
91db52c431 Bluetooth: SSP: clear pairing flag if ssp pairing completed
When the ssp pairing event is notified, clear the pairing
flag.

It is used to support case that the authentication is
started by peer, the link will not be encrypted after
the pairing is completed without any err.
If the local device want to encrypt the link, it could
call `bt_conn_set_security` to start encrypt the link
after the pairing complete callback triggered.

In original implementation, the `bt_conn_set_security`
cannot be called if the authentication has been started.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:08:34 +02:00
Yong Cong Sin
8bfdff3cb1 irq: multilevel: add API to increment a multilevel IRQ
Unlike a normal IRQ, a multilevel IRQ can't be incremented by
simply `irq++`, as that would always increment the L1 of a IRQ,
regardless of its level. A function that understands the level
for which the IRQ operates in is required.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
4b2f5c7de2 irq: multilevel: avoid manipulations with bits by using union type
Use a union struct to partition the bits in a
multilevel-encoded interrupt number instead of manipulating
the bits manually, which is tedious and error prone.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
091d70de6b tests: kernel: interrupt: multilevel: test APIs with devicetree
Test multilevel-irq APIs with interrupt number generated from
the devicetree to make sure that they work in sync.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
68f56f1c5d tests: gen_isr_table: multilevel: cleanup filter & Kconfigs
The following Kconfigs are always enabled on `qemu_riscv32`:
- CONFIG_MULTI_LEVEL_INTERRUPTS
- CONFIG_2ND_LEVEL_INTERRUPTS
- CONFIG_RISCV_PRIVILEGED

No need to enable/filter for them in the testcase.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
d05c9e6037 tests: gen_isr_table: move multilevel test into a separate file
The multilevel IRQ APIs tests are currently cordoned off by
`CONFIG_MULTI_LEVEL_INTERRUPTS` compiler switch, do this more
cleanly by moving it to another file and use cmake for that
instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
3fa7d783d6 irq: multilevel: allow to APIs to always work
When `CONFIG_MULTI_LEVEL_INTERRUPTS` is enabled, bits in a
`uint32_t` is always partitioned into 3 levels, we can safely
remove the `CONFIG_*_LEVEL_INTERRUPTS` checks so that the
APIs always works.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Yong Cong Sin
cb6417cff4 irq: multilevel: fix irq_parent_level_3()
The IRQ for level 1 and above is incremented by 1 when encoded
with Zephyr's multilevel IRQ scheme, so it should be
decremented by 1.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-02 10:08:19 +02:00
Lyle Zhu
08ceb14299 Bluetooth: Host: SSP: Correct BR bonding type
Currently, the bonding type of Authentication
_Requirements parameter is always `Dedicated
Bonding` if the device is pairing initiator.

But if the bonding is performed during
connection setup or channel establishment as
a precursor to accessing a service, the
bonding type should be `General bonding`.

Add a flag BT_CONN_BR_GENERAL_BONDING.
Set the flag if the bonding is performed in
the L2CAP_BR/RFCOMM channel establishment.

Set bonding type depends on the flag when
receiving IO cap request.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:07:09 +02:00
Andrej Butok
1005a73523 boards: nxp: rd_rw612_bga: Delete fw_storage
- Delete unused fw_storage partition.
- Optimize mcuboot partitions.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-02 10:06:29 +02:00
TOKITA Hiroshi
e5a41c8964 tests: drivers: build_all: sensor: Add CONFIG_MC3419_TRIGGER_NONE
Add missing CONFIG_MC3419_TRIGGER_NONE=y

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 10:05:58 +02:00
TOKITA Hiroshi
773d50e072 drivers: sensor: mc3419: Change the TRIGGER config to a typical
Because MC3419's TRIGGER's Kconfig was different from the typical
configuration, the `build_all` test settings were not correctly
applied.

The Kconfig configuration has been revised to be set in conjunction
with MC3419_TRIGGER_OWN_THREAD, even if MC3419_TRIGGER is not
explicitly specified.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 10:05:58 +02:00
Lyle Zhu
832753b80c Bluetooth: BR: Change the type of resolving to bool
The `resolving` is used to flag the status that the stack is requesting
remote device name.

It is better to use the type `bool` instead of the original type
`uint8_t`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
b1dc7ff242 Bluetooth: BR: Optimize _priv of struct bt_br_discovery_result
Move `struct discovery_priv` to classic.h

Rename `struct discovery_priv` to `struct bt_br_discovery_priv`.

Modify the structure `struct bt_br_discovery_priv` with `@private`.

Change field `_priv` of `struct bt_br_discovery_result` from
`uint8_t _priv[4]` to `struct bt_br_discovery_priv _priv`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
d92bc8ab30 Bluetooth: shell: BR: update device discovery
Due to the update of function bt_br_discovery_start,
register discovery callback by calling
bt_br_discovery_cb_register.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
ac0ccc8f5f sample: Bluetooth: hfp_ag: update device discovery
Due to the update of function bt_br_discovery_start,
register discovery callback by calling
bt_br_discovery_cb_register.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
f670e3a52f Bluetooth: Classic: Remove callback from bt_br_discovery_start
Remove BR discovery callback from bt_br_discovery_start.

All discovery results will be notified through callback
registered by bt_br_discovery_cb_register.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
b0258c919d Bluetooth: classic: Move classic source to sub folder
Move source code of classic from bluetooth.h to
./classic/classic.h.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Lyle Zhu
d0f5b6c351 Bluetooth: BR: Add listener cb for discovery
The results of inquiry and extended inquiry
are only reported from application level
after the inquiry complete event notified.

While the event of inquiry result is notified
by controller in real time.

It is not a good user experience.

Just like scanning of LE, add a listener
cb for discovery.

When the event of inquiry result, extended
inquiry result, or remote name request
complete notified, call listener `recv`
cb to notify the upper layer.

When the event of inquiry complete
notified or no pending of remote name
request , call listener `timeout`
cb to notify the upper layer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-02 10:05:32 +02:00
Andrew Davis
df64d076d8 ipc: ipc_service: Inline libmetal_{setup,teardown}() for correct ordering
Currently metal_init() is called as part of libmetal_setup() which is
called after libmetal has already started being used (metal_io_init
called before). Same for metal_finish() but in reverse (metal_io_finish
called after). To fix this inline the content of libmetal_{setup,teardown}
into their one call-sites and move the init/finish calls to the correct
spot before/after all uses of the lib.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-02 10:04:59 +02:00
Andrew Davis
be4a4ee324 ipc: ipc_service: Remove intermediate metal generic device
A libmetal "generic" device is created, then opened and used for its IO
regions. Since we are adding these IO regions in the first place there
is no reason for this layer of indirection.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-02 10:04:59 +02:00
Andrew Davis
d58542fcc4 ipc: rpmsg_service: Remove virtual shared memory device
A virtual metal_device is created, next the needed IO regions are created
and added to this device. Immediately we extract these regions back out
and make use of them. There is no reason to create the metal_device and
add the IO regions to it, instead simply use the IO regions directly.

This is similar to what was already done to the openamp_rsc_table sample.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-02 10:04:59 +02:00
Andrew Davis
8ccc43912f samples: ipc: openamp: Remove virtual shared memory device
A virtual metal_device is created, next the needed IO regions are created
and added to this device. Immediately we extract these regions back out
and make use of them. There is no reason to create the metal_device and
add the IO regions to it, instead simply use the IO regions directly.

This is similar to what was already done to the openamp_rsc_table sample.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-10-02 10:04:59 +02:00
Alexandre Bailon
02fb8faefb board: ti: cc1352p7_lp: Add complementary instructions about OpenOCD
Currently, OpenOCD doesn't support the cc1352p7.
There are two open PR adding its support to Zephyr's OpenOCD[1]
and upstream OpenOCD[2].
Until this gets merged, we need to use a downstream version of OpenOCD.
This updates the documentation to explain where to find it and how to
use it.

[1] https://github.com/zephyrproject-rtos/openocd/pull/65
[2] https://review.openocd.org/q/owner:abailon%2540baylibre.com

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-10-02 10:04:12 +02:00
Mathieu Choplain
5a0775b1ab dts: bindings: stm32-temp*: align 'avgslope' to datasheet format
Change the STM32 Temperature Sensor bindings to accept the average slope
value in string form instead of integer. With this change, it is possible
to use the raw decimal value found in each MCU's datasheet instead of
needing to scale it (differently depending on series!). This also allows
regrouping the property in a single file to reduce duplication.

Also update all DTSI files affected by this change and the dietemp driver
to accept the property's new format.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
e61b010b4c dts: bindings: stm32-temp*: reword bindings documentation
Improve the STM32 dietemp sensor bindings by rewording the descriptions
of bindings and properties.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
4641d3dab9 dts: bindings: stm32-temp*: regroup 'ntc' in common file
Reduce duplication in STM32 dietemp bindings by regrouping the 'ntc'
property declared in both "st,stm32-temp" and "st,stm32c0-temp-cal"
to the shared "st,stm32-temp-common" binding.

"st,stm32-temp-cal" is also modified to block 'ntc' property on include as
no dual-calibration sensors to date require it (this could be changed later
when need arises).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
7f44ecb06a drivers: sensor: stm32_temp: update and comment conversion code
Update all the conversion code in the STM32 dietemp sensor driver to be
more readable and match the Reference Manuals. Additionally, comment all
the code to make it easy to understand.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
dabcd605a8 drivers: sensor: stm32_temp: read calibration data in dedicated function
Move the reading of calibration data from manufacturing flash to a
dedicated function. This makes introduction of new STM32 series easier.

Additionally, use the sys_read16 primitive to read data instead of
manipulating and dereferencing raw manufacturing flash pointers.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
2ef666a15c drivers: sensor: stm32_temp: make driver data field names closer to RM
Rename the fields of the STM32 dietemp sensor driver data structure to
match the names in Reference Manual more closely, and add documentation
comments to all of them.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
70bf26b358 drivers: sensor: stm32_temp: convert samples in dedicated function
Factor out the ADC-sample-to-temperature conversion logic from the sensor
subsystem API implementation, and move it to a dedicated function.

This makes the driver more readable.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
d307221065 drivers: sensor: stm32_temp: enable/disable channel in separate functions
Moves the temperature sensor channel enable and selection to separate
functions. This improves the driver's readability and makes introduction
of new STM32 series easier.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
8785e9f605 dts: bindings: stm32c0-temp-cal: force new series to define 'avgslope'
Set the 'avgslope' property of 'st,stm32c0-temp-cal' to required, and
remove its default value, to ensure new series cannot be introduced without
setting the property to the correct value explicitly.

This change does not require any DTSI modification, because there are only
two files using this compatible (stm32f030.dtsi / stm32c0.dtsi), and both
of these already set 'avgslope' explicitly.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
8caf1f6d3e dts: bindings: stm32-temp: force new series to define 'avgslope'
Set the 'avgslope' property of 'st,stm32-temp' to required, and remove its
default value, to ensure new series cannot be introduced without setting
the property to the correct value explicitly.

This change does not require any DTSI modification, because there are only
two files using this compatible (stm32f1.dtsi / stm32f2.dtsi), and both of
these already set 'avgslope' explicitly.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
665f33ec51 dts: bindings: stm32-temp: force new series to define 'v25'
Set the 'v25' property of 'st,stm32-temp' to required, and remove its
default value, to ensure new series cannot be introduced without setting
the property to the correct value explicitly.

This change does not require any DTSI modification, because there are only
two files using this compatible (stm32f1.dtsi / stm32f2.dtsi), and both of
these already set 'v25' explicitly.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
0fd095d6d1 dts: st: stm32f100: add correct 'v25' property on die temp sensor
The typical value for V25 is different on the STM32F100 line compared
to other STM32F1 MCUs. Update the DTS property to the correct value.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
577c1b2e9e dts: st: stm32f030: add correct 'avgslope' property on die temp sensor
Add the missing 'avgslope' property to the DTSI for STM32F030/STM32F070.

This fixes improper results being returned by the driver: the correct
value for the average slope is 4.3mV/°C (4300 µV/°C), but the binding's
default value of 2.53mV/°C was used instead, since property was missing.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Mathieu Choplain
2cfb21b9df dts: st: stm32f2: remove 'ntc' property from die temp sensor
Remove the "Negative Temperature Coefficient" attribute from the STM32F2
die temperature sensor node, as it does not correspond to the hardware.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-02 10:03:03 +02:00
Kurtis Dinelle
5eeff698ca sensor: tsl2591: fix: Address CID 353644 & 353654
Fixes implicit sign-extension/potential overflow by explicitly casting
to int64_t.

Signed-off-by: Kurtis Dinelle <kurtisdinelle@gmail.com>
2024-10-02 10:01:43 +02:00
Armin Brauns
fa8d80a15b bluetooth: honor log panic mode in monitor
Once panic mode is entered, the log write functions are called from an ISR,
so must not try to acquire locks.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-10-02 10:00:26 +02:00
Andries Kruithof
a63665438a Bluetooth: Audio: improve broadcast reception stop unittest
Add more parameter checking for the unittests for the
CAP procedure 'broadcast reception stop'

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-10-02 09:59:23 +02:00
Andries Kruithof
8295deb966 Bluetooth: Audio: CAP implement broadcast reception stop
Implement the CAP broadcast reception stop procedures and
add unit tests

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-10-02 09:59:23 +02:00
Daniel Leung
907a3bf908 boards: add qemu_xtensa/sample_controller32/mpu
This adds the necessary bit to enable testing Xtensa MPU on
QEMU.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-02 09:58:36 +02:00
Daniel Leung
d0e2a62daf soc: xtensa: add sample_controller32
Add sample_controller32 for Xtensa which has MPU.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-02 09:58:36 +02:00
Daniel Leung
84c12ab5b5 boards: rename qemu_xtensa to qemu_xtensa/dc233c
This is in preparation for adding another SoC where qemu_xtensa
is no longer valid choice. So use qemu_xtensa/dc233c as it is
the same as the old qemu_xtensa.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-10-02 09:58:36 +02:00
Jordan Yates
0425b04fc3 serial: uart_nrfx_*: update tx_ready return codes
Update nrfx drivers with the minimum number of bytes that can be sent
in a single call to `uart_fifo_fill`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
3e5c72a0ee serial: async_to_irq: update tx_ready return
The async IRQ shim supports writes of any size up to the TX buffer size.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
81352d011f serial/usb: update struct ring_buf users
Update the interrupt driver UART drivers that use `struct ring_buf`
internally to report the number of bytes that can be pushed in
`uart_fifo_fill` without fragmentation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Jordan Yates
5bd53b6e2e uart: update meaning of uart_irq_tx_ready return code
Update the documented value range that `uart_irq_tx_ready` returns in
order to provide more information to the callers about the number of
bytes that could be writted with `uart_fifo_fill` without fragmentation.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-02 09:56:45 +02:00
Arrel Neumiller
a3556aafb7 doc: kconfig: clarify .config file location
Fixes issue #78815

Specifies explicitly the location of the generated .config file
relative to the build directory.

Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
2024-10-02 09:54:12 +02:00
Raffael Rostagno
724376de33 drivers: clock_control: esp32: Fix for UART baud
Fixes UART baud rate adjustment for ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-02 09:52:23 +02:00
Raffael Rostagno
26314cf760 tests: clock_control: esp32: Fix device testing
Select modules which are not sensitive for testing.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-02 09:52:23 +02:00
Ian Morris
92ec60f5ab drivers: sensor: renesas: Move to vendor subdirectory
Moves all Renesas sensor drivers into a vendor specific subdirectory
matching the organization used for other drivers.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-10-02 09:51:54 +02:00
TOKITA Hiroshi
e3438585b5 tests: drivers: build_all: sensor: Adding Festo VEAA pressure regulator
Add "festo,veaa-x-3" to testing targets.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:51:19 +02:00
TOKITA Hiroshi
1f30346d4f drivers: dac: Add dummy driver for vnd,dac
Add dummy driver for "vnd,dac" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:51:19 +02:00
TOKITA Hiroshi
cc6dfb6220 tests: drivers: build_all: input: Add config for futaba,sbus
Add configuration to add `futaba,sbus` to build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
TOKITA Hiroshi
00eaa850b2 drivers: input: sbus: Fix incorrect index reference of INPUT_SBUS_INIT
The argument of INPUT_SBUS_INIT is named `n,` but there are some places
where it references `id.`  Correcting these.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
TOKITA Hiroshi
e9adbe4077 drivers: input: sbus: Remove unused pinctrl.h including
This source does not reference any pinctrl functions.
Removing the unused header.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:50:22 +02:00
Florian Grandel
41533a2eea scripts: build: check_init_priorities: remove obsolete code
Removes a snippet of dead code.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-02 09:49:53 +02:00
TOKITA Hiroshi
cb99cd795d tests: drivers: build_all: fuel_gauge: Add devices to build test
Add build tests for the following devices.

- maxim,max17048
- ti,bq27z746
- sbs,sbs-gauge-new-api
- zephyr,fuel-gauge-composite

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:49:16 +02:00
TOKITA Hiroshi
20d17cfa6a tests: drivers: build_all: charger: Add config for sbs,sbs-charger
Add configuration to add `sbs,sbs-charger` to build test.

Also, adding emulator build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-02 09:49:16 +02:00
Jamie McCrae
c1e7784445 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  3a195f2207d5eadf45a5c989a870e91aff020d86

Brings following Zephyr relevant fixes:
  - 3a195f22 boot: bootutil: loader: Fix issue with using
    pointers
  - cc7b97be boot: boot_serial: Fix wrong usage of slot numbers
  - 30109df3 boot: bootutil: loader: Fix slot info for
    directXIP/RAM load
  - 7f3c77e1 boot: bootutil: Add write block size checking
  - c40d237a boot: zephyr: Add check for unexpected flash sector
    size
  - f9fc5918 boot: zephyr: Remove broken target config header
    feature
  - f8d8004e boot: zephyr: Allow disabling NRFX_WDT on nRF devices
  - fe26c289 boot: zephyr: boards: nxp: clean .conf files
  - b553290f Add Conexio Stratus Pro board configuration for DFU
  - 41df52e6 boot: SHA512 verification
  - 75672000 cmake: zephyr: change ERROR into FATAL_ERROR

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-02 09:48:42 +02:00
Alberto Escolar Piedras
3ee9b40a5a eeprom sim: Enhance & refactor native part so it works w emb libCs
For the parts of the simulator which are dedicated for the native
platforms (POSIX arch based):
* Refactor the parts that interacts with the host, so it is possible to
  use it also with embedded libCs
* Enhance it with more options to allow:
  * Keeping the content just in RAM
  * Erasing the EEPROM file at exit
  * Clearing the file at boot
* Also show in the command line help the default file name.

As part of this:

* Update the kconfig dependencies, so we allow building it with other
  C libraries in the native targets
* Update the table in the native_sim docs to indicate all C libraries
  are supproted now

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-02 09:48:12 +02:00
Yong Cong Sin
4da4ee8ece tests: arch: riscv: test csf registers value
Test if callee-saved-registers values are as expected.

Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-10-02 09:48:02 +02:00
Yong Cong Sin
4bbc2a7893 arch: riscv: isr.S: restore s0 before jumping to z_riscv_fatal_error_csf
Restore the s0 we saved early in ISR entry so it shows up
properly in the CSF.

Signed-off-by: David Reiss <dreiss@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-10-02 09:48:02 +02:00
Vladislav Pejic
fe5bfc9eb2 driver: sensor: adxl372: Bug fix for status2 reg
This is a bug fix for adxl372_get_status function.
This function is used to get STATUS1, STATUS2, FIFO_ENTRIES2
and FIFO_ENTRIES1 registers (they are continuously present
in the memory in this order). User can choose if it wants
STATUS2 and/or FIFO registers by passing pointers where
to store received values. Bug was when user doesn't want
STATUS2 and want FIFO regs. In that case calculated length
would be 3 which will result in reading of STATUS1, STATUS2
and FIFO_ENTRIES2 regs and not expected STATUS1, FIFO_ENTRIES2
and FIFO_ENTRIES1.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-02 09:47:12 +02:00
Vladislav Pejic
4ce3a7b08e sample: accel_polling: Upgrade for RTIO stream
Upgrade to accel_polling sample application to support
RTIO streaming functionality. This mode is enabled when
CONFIG_SENSOR_ASYNC_API is defined. NUM_SENSORS must be
set to the correct number of sensors used.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2024-10-02 09:46:23 +02:00
Daniel DeGrasse
9c0f92db47 boards: shields: rk055hdmipi4ma0: raise MIPI DSI bit clock for RT1170
The RT1170 MIPI DPHY requires a faster clock frequency setting for
the MIPI DPHY, or the pixel packet counts for the HFP, HBP, and HSA will
be incorrect, and the DSI transfers will stall. Raise the target DPHY
clock frequency to resolve this.

Fixes #78299

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-01 10:49:20 +01:00
Tom Chang
080787f5b7 drivers: espi: npcx: update the parsing function for espi taf
This commit updates the FLASHRXBUF parsing functionality of eSPI TAF.
It ensures that data can be read correctly from FLASHRXBUF[0].
And, the eSPI TAF request can be parsed correctly.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-01 10:48:43 +01:00
Alberto Escolar Piedras
15774e1316 tests/boards/native_sim/cpu_wait: Correct ifdef
This test works both with native_posix and native_sim.
native_sim will eventually not set NATIVE_SIM_NATIVE_POSIX_COMPAT
(i.e. not pretend to be native_posix) so let's correct this ifdef

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-01 10:47:55 +01:00
Alberto Escolar Piedras
517d51e33a drivers/timer native_posix: Allow without BOARD_NATIVE_POSIX
This driver works both with native_posix and native_sim.
native_sim will eventually not set NATIVE_SIM_NATIVE_POSIX_COMPAT
(i.e. not pretend to be native_posix) so let's correct the
dependencies.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-01 10:47:55 +01:00
Daniel Flodin
f8299b66eb include: types.h: toolchain.h: Move TLS macro definition
Move the `Z_THREAD_LOCAL` macro from
`include/zephyr/toolchain/common.h` to `include/zephyr/types.h`.

This is needed since some `syscall.h` files are using TLS but aren't
including `zephyr/toolchain.h` (but they are including
`zephyr/types.h`).

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
2024-10-01 10:46:10 +01:00
Sebastian Głąb
5b607ed5c7 dts: arm: nordic: Define power states for nrf54h20/cpuapp
Add definition of low power states 'idle' and 's2ram'
for nrf54h20/cpuapp.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-10-01 10:45:34 +01:00
TOKITA Hiroshi
df7f1ff5b5 tests: drivers: build_all: gnss: Add serial devices to build test
Add build tests for following devices.

- luatos,air530z
- quectel,lc86g
- u-blox,m8

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-01 10:01:23 +02:00
Mateusz Holenko
9905e27353 tests: thread_runtime_stats: Skip the test on virtual Cortex-R8 platform
Current clocks configuration for the platform makes it impossible
to pass the IDLE_EVENT_STATS_PRECISION check. This is to be addressed
in the future.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Marek Slowinski
f7b7edc40c MAINTAINERS: Add Renode-related SoCs and boards to Testing with Renode area
Extend Testing with Renode area by:
- soc/renode/
- boards/renode/

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Marek Slowinski
2088f6d35f ztest: error_hook: Exclude cortex_r8_virtual from divide-by-zero tests
Cortex-R8 emulated in Renode doesn't trigger exceptions on divide by zero.
We only skip the virtual SoC, so the test will still apply on a physical
target.

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Marek Slowinski
9b9d39d578 samples: userspace: cortex_r8_virtual: Set CONFIG_DYNAMIC_OBJECTS=y
Enable kernel dynamic object allocation.
Otherwise the following error is printed:

    E: 0xa138 is not a valid sample driver
    E: address is not a known kernel object
    E: syscall z_vrfy_sample_driver_state_set failed check: access denied
    E: couldn't start driver interrupts

Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Krzysztof Sychla
92d4a88c7a boards: renode: Add virtual Cortex-R8 board
This commit adds a virtual target using the `cortex_r8_virtual` SoC.
It can be used for testing purposes and a starting point to add new R8
platforms.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Krzysztof Sychla
dc433dd6bd soc: renode: Add cortex_r8_virtual
Add virtual Cortex R8 SoC. This target does not represent a real SoC,
but can be easily run in Renode.

This will allow to easily test basic architecture support.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Krzysztof Sychla
5d76b563ea arch: Add Cortex-R8 support
Enable Cortex R8 support, similar to Cortex-R5.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-01 09:58:22 +02:00
Emil Gydesen
fa4f2ffc47 Bluetooth: CAP: Add support for doing just disable for unicast stop
The unicast_stop function is changed to primarily do a
BAP disable instead of a release, with optional
support for releasing the streams once they have been disabled.

This also adds unittests for the procedure which also
allow us to remove the invalid param testing from the BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-01 09:54:04 +02:00
Francois Ramu
ff34d575bc drivers: flash: stm32 qspi flash driver with unprotect command
Add the write_unprotect command to the stm32 qspi flash driver
to un protect flash before any write operation to the external quad-NOR

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Francois Ramu
76740ae1d1 drivers: flash: qspi stm32 driver supporting requires_ulbpr
Add the support of the requires_ulbpr property when a Microchip
quad-spi flash is mounted.
Set the CONFIG_USE_MICROCHIP_QSPI_FLASH_WITH_STM32=y flag to access
the command

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Francois Ramu
72370b23ce dts: bindings: flash_controller stm32 qspi has requires-ulbpr property
Add the <requires-ulbpr> property from the "jedec,spi-nor-common.yaml"
to the existing st,stm32-qspi-nor.yaml. So that external quad-NOR with
unlock the Global Block Protection (BPR) (opcode 0x98) is accepted.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-01 09:52:34 +02:00
Lucas Tamborrino
9ae3105f79 samples: drivers: video: capture: Add ESP32S3-EYE support
Add support for esp32s3-eye board.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00
Lucas Tamborrino
3f405ea92f boards: espressif: esp32s3 eye: add video feature
Add video as supported feature.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00
Lucas Tamborrino
6c99888bfe drivers: video: esp32: Fix unused variables
Fix build warning for unused variables.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00
Lucas Tamborrino
61644977d4 samples: drivers: video: capture: Add format config
Add video format Kconfig for proper sample configuration.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-10-01 09:51:46 +02:00
Keith Packard
d5b6539614 picolibc: Update module to version 1.8.8
Switch to released version with all of the Zephyr build fixes

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-10-01 09:47:27 +02:00
Florian Grandel
6733efdc84 arch: x86: ia32: linker.ld: add missing DT sections macro
Generating sections via DT memory attributes did not work for the
platform as only the memory region was created so far.

This change adds the DT_LINKER_SECTION() macro to the linker script so
that the appropriate sections will be generated, too.

Fixes #79085

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-10-01 09:47:15 +02:00
Jamie McCrae
18b20058a0 dfu: Add missing depends on for progressive erase
Adds a depends on that requires the underlying driver support
explicit erase

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-01 09:46:18 +02:00
Emilio Benavente
a6ed05e765 tests: drivers: uart_async_api: fix userspace fault
Updated overlay files to test using nocache.
and run outside of usersapce mode to avoid
inaccessible memory regions when using nocache on RT parts.
Also updated testcase file to reflect nocache testing.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-09-30 17:00:17 -05:00
Ayush Singh
57f0894b8f boards: beagle: beagleconnect_freedom: doc: Update capabilities
- Add PWM, ADC, FLASH and Radio to docs

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
b68a823586 boards: beagle: beagleconnect_freedom: Enable adc, pwm tests
- Enable testing for ADC and PWM.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
2c19cf65b4 boards: beagle: beagleconnect_freedom: Disable 2.4g ieee802154
- A lot of zephyr networking samples (zperf, http_server, etc) will
  complain if both 2.4g and subg ieee802154 are enabled simultaneously.
- This leads to a lot of new people getting confused with the network code
  not working without any clear errors.
- As we already set the alias `zephyr,ieee802154 = &ieee802154g`, I think
  it would be best to enable only subg by default.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
1b81489ec5 tests: drivers: adc: adc_api: Add beagleconnect_freedom overlay
- Enabling adc testing for beagleconnect_freedom

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
c96de52107 samples: drivers: adc: Remove ADC node from overlay
- Since ADC node is now enabled in the base dt, this is no longer
  required

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
3bcd0a658e boards: beagle: beagleconnect_freedom: Add ADC
- Enable ADC node to the base board.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
fc034ea54b samples: blinky_pwm: Remove enabling pwm in overlay
- Since PWM config has been moved to base devicetree, it can be safely
  removed from the sample.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Ayush Singh
9313fb60da boards: beagle: beagleconnect_freedom: Add PWM
- Add PWM support to base devicetree

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-30 16:58:49 -05:00
Raffael Rostagno
565005c27a drivers: wifi: esp32: Check blobs dependency
Checks blobs presence as dependency to allow driver build.
Goal is to avoid building in environment where blobs won't
be present (e.g GitHub CI environment).

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-30 16:57:50 -05:00
Raffael Rostagno
4409573e72 tests: wifi: esp32: Functional tests for CI
Functional wifi tests for ESP32 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-30 16:57:50 -05:00
WenBin Zhang
48eb944e4d input: gpio_keys: fix gpio_pin_get_dt error handling
When gpio_pin_get_dt returns an error, the report event should not
be generated

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2024-09-30 16:57:06 -05:00
Ryan McClelland
996512d589 Revert "Revert "tests: drivers: i3c: add build of i3c_shell.c""
This reverts commit 50720f835b.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
22571f32bf drivers: i3c: shell: add shell cmd for ccc setbuscon
Add a i3c shell command for the i3c ccc setbuscon.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
901044f1e7 drivers: i3c: add ccc setbuscon
Add helpers and defines for the i3c ccc setbuscon.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
507e8170fa drivers: i3c: shell: fixup rstact
Both #78823 and #78807 merged at around the same time. This made it so
the shell didn't compile when #78823 was stacked on top as it did not run
with the test build. This fixes the compile issues.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Ryan McClelland
7e21f2e1ce drivers: i3c: shell: add parse args func for rstact
Add the parse args function for the rstact

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-30 16:56:04 -05:00
Helmut Lord
aac15846fa west_commands: build: add extra file arguments
Adds an argument to include additional .conf or .overlay files

Example use:

```
west build -b nrf52840dk/nrf52840 -p --extra-conf foo.conf
```

```
west build -b nrf52840dk/nrf52840 -p --extra-dtc-overlay foo.overlay
```

Or:

```
west build -b nrf52840dk/nrf52840 -p --extra-conf foo.conf
--extra-conf bar.conf
```

```
west build -b nrf52840dk/nrf52840 -p --extra-dtc-overlay foo.overlay
--extra-dtc-overlay bar.overlay
```

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-09-30 16:55:26 -05:00
Emilio Benavente
7f40866168 boards: nxp: mimxrt1060_evk: Updated Active state for user_led
The User LED for the mimxrt1060_evkb is inverted from the
mimxrt1060_evk, this commit updates the ACTIVE_STATE to be
HIGH rather than LOW.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-09-30 16:54:06 -05:00
Fabio Baltieri
5e2203a6cd stepper: shell: fix uninitialized variable compiler warning
Fixes:

/__w/zephyr/zephyr/include/zephyr/drivers/stepper.h:429:16: error:
'direction' may be used uninitialized [-Werror=maybe-uninitialized]

found with:

west build -p -b esp32s3_touch_lcd_1_28/esp32s3/appcpu -T
tests/drivers/stepper/shell/drivers.stepper.shell

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-30 17:13:07 +01:00
Lars-Ove Karlsson
8fceb6421f libc: minimal: math: Removed undefined behavior in sqrt routines
Fixed a clang config warning.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-09-30 17:12:43 +01:00
Lars-Ove Karlsson
0a8e1ad972 libc: minimal: math: Removed undefined behavior in sqrt routines
The previous code used casts of address of int to float pointer.
This is undefined behavior in C and may cause a compiler to
optimize code incorrectly.

I have replaced it with a union of int and float types,
eliminating the cast problem.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2024-09-30 17:12:43 +01:00
alperen sener
9ae8ebfade Tests: Bluetooth: Tester: Increase the number of max mesh tx segments
Increasing the number of max tx segments to be able to fit composition
page 0 into composition data status message.

After the subnet bridge config client and server are added to the
tester, the size needed to report composition data page 0 increased.
Current behaviour of the tester is correct, dropping the element when
there is not enough space in data field, however the PTS application
does not handle the composition data status message without element.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-09-30 17:12:34 +01:00
Torsten Rasmussen
d128a078f6 cmake: change test message overwrite to macro
Fixes: #79052

The yaml CMake tests overwrites `message()` in order to verify correct
error handling. This was original done in a function and then using
a return call when an expected error has been raised.
Using a function() means the `return()` only returns the `message()`
and thus wrongly continue processing rest of the yaml file.

Change `message()` to macro so the return call correctly returns from
the calling yaml functions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-30 17:12:23 +01:00
Jukka Rissanen
759f3a0c7c tests/samples: net: Fix the max number of file descriptors
Make sure that CONFIG_ZVFS_OPEN_MAX in the tests and samples is at
least the same value as CONFIG_NET_SOCKETS_POLL_MAX so that we
cannot have more polled sockets than there are available file
descriptors.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-30 17:12:15 +01:00
Jukka Rissanen
2ff26674a2 net: dns: Check that dispatcher table is not overflowing
Add CHECKIF() checks that verify that dispatcher table is
not overflowing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-30 17:12:15 +01:00
Jukka Rissanen
077dd8f142 net: dns: Increase the size of dispatcher table
The dispatcher table needs to be large enough to have support
for all file descriptor values.

Fixes #79042

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-30 17:12:15 +01:00
Gerard Marull-Paretas
de70ebd66f boards: nordic: do not enable DMA_RAM21 region by default
This region is only required if certain fast peripherals make use of such
region for DMAing. It was now enabled on all builds, often resulting in:

```
[134/134] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       24372 B       248 KB      9.60%
             RAM:        4448 B       256 KB      1.70%
       DMA_RAM21:          0 GB        16 KB      0.00% <~~ Not used!
   DMA_RAM3x_APP:          40 B         4 KB      0.98%
        IDT_LIST:          0 GB        32 KB      0.00%
```

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-30 17:12:07 +01:00
Aksel Skauge Mellbye
d82acdc4e4 drivers: spi: gecko: Use clock control on Series 2
Use clock control driver to configure peripheral clock on
Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
00270d0d12 drivers: serial: gecko: Use clock control on Series 2
Use clock control driver to configure peripheral clock on
Series 2 devices.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
bda8ae8c3f drivers: clock_control: silabs: Add clock control driver
Add clock control driver for Silicon Labs Series 2 and newer.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
46367ff15a sys: util: Make FIELD_* available from device tree
Move FIELD_* macros from zephyr/sys/util.h to zephyr/sys/util_macro.h,
as zephyr/sys/util.h cannot be used from device tree.

Device tree uses zephyr/dt-bindings/dt-util.h, which includes
zephyr/sys/util_macro.h.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Aksel Skauge Mellbye
1299dc74df MAINTAINERS: Update patterns for Silabs platforms
Update glob patterns to include files using "silabs" naming
in addition to "gecko".

Also include the oddly named BT HCI driver.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-30 17:12:01 +01:00
Krystof Sadlik
44180a7dfc boards: NXP: mimxrt1040: added counter as supported
Mimxrt1040_ebk board was missing counter in the .yml file, also added GPT
to documentation

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-09-30 17:11:45 +01:00
Gerard Marull-Paretas
9f0ebb64a6 drivers: i2c: nrfx_twim: simplify PM by using pm_device_driver_init
- Driver always initializes the device in the suspended state
- If CONFIG_PM_DEVICE_RUNTIME=n, device PM callback will be called with
  RESUME action, thus setting up pins to default state and enabling the
  peripheral

NOTE: when CONFIG_PM_DEVICE=n, the pinctrl sleep state will not be
available (-ENOENT) and so never applied, thus avoiding a pin
suspended->active transition.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-30 17:11:20 +01:00
Gerard Marull-Paretas
740eba1341 pm: device: allow optional support of TURN_ON action
Some devices, e.g. SoC level devices like I2C peripheral, can never be
powerd off as they are always energized. Such devices can only go from an
active state or to a low power state (suspended). Allow them to simply
return -ENOTSUP when called with TURN_ON (or TURN_OFF).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-30 17:11:20 +01:00
Abderrahmane Jarmouni
f8bac1ac1b doc: develop: flash_debug: host-tools: fix typo
Fix registred trademark typo

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-30 17:11:04 +01:00
Abderrahmane Jarmouni
77f025dd19 boards: st: update doc
Update forgotten boards following PR 75284

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-30 17:11:04 +01:00
Abderrahmane Jarmouni
a4169e6141 boards: st: update board.cmake
Update forgotten boards following PR 75284

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-30 17:11:04 +01:00
Maciej Sobkowski
9f0b96d77c samples: fs: Add stm32f746g_disco with DMA enabled to fs_sample
Adds custom overlay and config allowing the fs_sample to run on
the stm32f746g_disco with DMA enabled.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
5ec39011cc drivers: disk: sdmmc: enabled SDMMC DMA for stm32f7x
This enables the usage of DMA for stm32f7x in the sdmmc driver.

Co-authored-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
455b45780d tests: drivers: dma: run dma tests on stm32f746g_disco
enabled dma loop transfer and channel blend to run
on stm32f746g_disco

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
1e1c14cfee drivers: dma: stm32: fix dma_stop stream busy handling for HAL override
For DMA channels overridden by HAL DMA, there was no way of
resetting stream busy variable.

Co-authored-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
744fe5284a drivers: disk: sdmmc: stm32: add missing DMA stream deinitialization
Due to deinitialization not happening, reinitialization
of the disk did not happen as the streams were marked busy.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Dominik Lau
319d67f7d3 fs: ext2: add alignment for superblock
Reading superblock didn't work with DMAs that only support aligned reads
(e.g. STM32 DMA).

Co-authored-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
2024-09-30 17:10:56 +01:00
Fabrice DJIATSA
6b167f2596 drivers: clock_control: add calibration for h7 pllx_hsi
This will calibrate the HSI's PLLX clocks if enabled
The value rcc_hsicalibartion_default is 0x40U for h7/h7rs.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-30 17:10:48 +01:00
Jukka Rissanen
0ae12adcf0 manifest: Fix compilation warnings in hostap
Hotfix for two compilation warning issues for
wpa_drv_zep_event_dfs_cac_finished() and
wpa_drv_zep_event_dfs_cac_started(),
and for hmac_prf256() in hostap project.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-30 17:10:16 +01:00
Reto Schneider
8fda052826 net: Give name to logging choice
This allows downstream modules to overwrite the default log level choice
using Kconfig.defconfig files.

For example, this becomes possible:

```
choice LWM2M_LOG_LEVEL_CHOICE
  default LWM2M_LOG_LEVEL_WRN
endchoice
```

In contrast to the configuration method, this then has an effect on all
applications stored in the downstream module.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-30 12:10:42 +01:00
Gero Schwäricke
a50e0d9b3b kscan: input: fix multiple kscan inputs
The kscan input callback does not use an instance specific name, so we
can only ever have one instance of this type.

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-09-30 12:10:29 +01:00
Gero Schwäricke
d411421a2b input: fix missing namespace prefix for named input callbacks
Using INPUT_CALLBACK_DEFINE_NAMED would not add the _input_callback__
prefix to the given callback name. This can result in namespace clashes.

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-09-30 12:10:29 +01:00
Gero Schwäricke
5bcb5242ed modules: lvgl: fix multiple LVGL inputs
The LVGL input callback does not use an instance specific name, so we
can only ever have one instance of this type. This issue was evident by
a build error, e.g., when using "zephyr,lvgl-keypad-input" nodes twice:

  error: redefinition of '_input_callback__lvgl_keypad_process_event'

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-09-30 12:10:29 +01:00
Armin Brauns
6ba6c66ab5 hci_spi_st: send ACI config synchronously
There's no reason to send these async, and since the reply isn't waited for
anywhere, this can cause the HCI buffer pool to be exhausted and
`bt_enable()` to fail.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-09-30 12:10:20 +01:00
Michal Smola
f810e1318f tests: adc: Enable ADC tests for frdm_mcxc242 board
Enable ADC tests for frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-30 10:49:30 +02:00
Michal Smola
ff01648d4b samples: adc: Enable ADC samples for frdm_mcxc242 board
Enable ADC samples for frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-30 10:49:30 +02:00
Michal Smola
568606f1d7 boards: frdm_mcxc242: Add adc support
frdm_mcxc242 board does not have adc configured and enabled. Configure
and enable it. Update documentation.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-30 10:49:30 +02:00
Marek Pieta
88231b5583 usb: device_next: usbd_hid: Fix size in HID report get
Since UDC buffers are allocated with `UDC_BUF_GRANULARITY` granularity,
the `net_buf_tailroom` may no longer be equal to the HID report size.
Use `setup->wLength` instead to ensure that proper HID report size is
passed to the application's callback.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-09-30 10:49:20 +02:00
Vivekananda Uppunda
06d0c5831e manifest: Pull PRF-256 PSA based wrapper API for supplicant
This pulls in PRF-256 wrapper API based on PSA APIs. This implements
PRF-256 as per section 11.6.1.7.2 in 802.11ac using PSA APIs.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-30 10:47:58 +02:00
Andrzej Kuros
54aca3ef58 manifest: update hal_nordic revision
This commit updates revision of hal_nordic to bring the latest changes
in the nRF IEEE 802.15.4 driver.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-09-30 10:47:41 +02:00
TOKITA Hiroshi
2815b6d710 tests: drivers: build_all: gpio: Add ti,lmp90xxx-gpio configuration
Add the following devices to build tests.

- ti,lmp90xxx-gpio

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
0ea5ef8699 tests: build_all: gpio: Excluding app.overlay from ads1145s0x tests
- Exclude `app.overlay` from DTC_OVERLAY_FILES in
  `drivers.gpio.build.adc_ads1145s0x_gpio` tests to avoid duplicate builds.
- Modified so that adc_ads1145s0x_gpio.overlay can be tested alone.
- Delete the conffile and move its contents to extra_configs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
8d68f6a45b tests: drivers: build_all: gpio: Correct mcp230xx compatibility
The "microchip,mcp230xx" is not defined.
Correcting it to "microchip,mcp23017".

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
bcec0a29ef tests: drivers: build_all: gpio: Add modules that were not registered
Add the following devices to build tests.

- richtek,rt1718s
- st,stmpe1600
- adi,adp5585
- nordic,npm6001
- cypress,cy8c95xx-gpio
- ti,sn74hc595

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
5fe5126913 driver: gpio: rt1718s: Create a log module with LOG_MODULE_REGISTER
Since the log module entity is not defined anywhere,
LOG_MODULE_REGISTER should be used here instead of LOG_MODULE_DECLARE.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
TOKITA Hiroshi
01d3312d07 drivers: gpio: emul: Fixed return type of get_pending_int
`get_pending_int` should return a uint32_t value as defined in
`struct gpio_driver_api`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-30 09:04:58 +02:00
Pisit Sawangvonganan
c9f9d5cdda net: tcp: remove redundant null check for conn in net_tcp_put()
A null check for the TCP connection `conn` was added at the start of
the function, but the previous checks were not removed, leading to
a redundant null check, which is unnecessary.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-30 09:04:48 +02:00
Jason Kridner
2eda5f3e10 boards: beagle: add BeaglePlay on-board CC1352P7
Add support for BeaglePlay, a TI AM6254 SoC based development board with a
CC1352P7 wireless microcontroller for supporting software defined 2.4GHz
and SubGHz wireless protocols. Support for running Zephyr on the
quad-A53 SoC or the programmable M4 on the SoC would be provided
separately.

See https://beagleplay.org for details.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-09-29 21:23:28 +02:00
TOKITA Hiroshi
2c1274f6a9 tests: drivers: build_all: Add power_domain drivers test
Add build_all test for power_domain drivers.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
TOKITA Hiroshi
663c7bc181 drivers: power_domain: gpio_monitor: Add PM_DEVICE dependency
Since "power_domain,gpio_monitor" depends on PM_DEVICE,
specify it in Kconfig.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
TOKITA Hiroshi
a511f519b8 drivers: power_domain: gpio_monitor: Fix compilation error
The fix 25173f71cd created
`struct pm_device_base` and moved `usage` to it.
This has been overlooked so that I fixed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-29 21:22:34 +02:00
Simon Maurer
4ce6a217d8 arm: cortex_a_r: rom_start relocation configuration
This commit makes the rom_start relocation introduced in
commit 8ef8e8b497 available for Cortex-A/R CPUs.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2024-09-29 21:22:23 +02:00
Declan Snyder
25e9252826 boards: frdm_mcxw71: Add timers to doc & yaml
Add timers that have been enabled to board doc table

Add timers that have been enabled to board twister yaml

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
4012161efb boards: frdm_mcxw71: Enable LPTMR
Enable LPTMR as counter, enable lptmr0 in board DTS and enable lptmr1 in
basic counter api test.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
b0a66d3f24 dts: nxp: mcxw71: Add LPTMR0 and LPTMR1
Add nodes for LPTMR. This is sufficient to enable their use as counter
devices when set to status okay.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
343d8b18ad dts: nxp: mcxw71: Add WDOG nodes to DT
Add watchdog nodes to MCXW71 SOC DT, and enable wdog0 alias.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
60a70fd4a3 boards: frdm_mcxw71: Enable TPM and pwm_leds
Enable TPM0 on FRDM_MCXW71 which is connected to an RGB LED.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
b74a7c4176 soc: mcxw71: Add TPM support
Add DT node and clocking of TPM peripherals, which are used for PWM.

Also change the soc clock enable code to not use preprocessor
conditionals.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
bfa4a7b02b boards: frdm_mcxw71: Rename LED to blue
The LED is blue, not green.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
5399615cdc dts: nxp: mcxw71: Add peripheral bridge definition
Add peripheral bridge definitions to DT, this also fixes the base
address of the GPIO peripherals which were faulting in the driver due to
the wrong reg address.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
fb3fce570f drivers: pwm_mcux_tpm: support pause level feature
Support TPM devices with the pause level selection feature

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
7152dc19e1 soc: nxp: mcxw: Switch to soc_reset_hook
Base enablement of MCXW merged while z_arm_platform_init was being
deprecated, resulting situation is now that no platform init is
happening, fix by converting to use soc_reset_hook.

Also fix a comment that said the core was being set to 40 MHz, when it
is actually being set up to 96 MHz.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Declan Snyder
f7e9c3b114 dts: nxp: mcxw71: Use genetic unit names
Use generic unit names as recommended by the DT spec.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-29 21:21:34 +02:00
Guennadi Liakhovetski
c6bf743df2 LLEXT: add support for detached sections
Some LLEXT objects can include sections, that should not be merged
with other sections of the same type. E.g. when such sections should
be placed into locations, other than the default. Add support for
such sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-29 21:21:24 +02:00
Guennadi Liakhovetski
0aa6b1c9de llext: pass the whole struct llext_load_param
To simplify LLEXT loader parameter extension pass the whole
struct llext_load_param to final consumers instead of extracting
individual fields from it in the caller function.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-29 21:21:24 +02:00
Guennadi Liakhovetski
d676d469bd LLEXT: Xtensa: add support for L32R relocation
When building LLEXT for Xtensa with custom sections the compiler
can leave unresolved references in them. Then this has to be done by
the LLEXT core during linking. This commit adds linking support for
the L32R Xtensa instruction.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-29 21:21:24 +02:00
Guennadi Liakhovetski
f04e646af0 llext: (cosmetic) use a more common name for a variable
It's more common in the LLEXT code base to call elf_sym_t instances
"sym" and not "sym_tbl." Convert llext_link_plt() to follow this
convention.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-29 21:21:24 +02:00
Guennadi Liakhovetski
43a69f868b llext: make llext_loaded_sect_ptr() available to all LLEXT code
Make llext_loaded_sect_ptr() a proper function to be able to call it
from platform LLEXT code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-29 21:21:24 +02:00
Pete Skeggs
09fab7e680 net: lib: http: ensure SYS_FOREVER_MS behavior
The http_client_req() function's timeout parameter is allowed
to be SYS_FOREVER_MS. However, K_MSEC() does not convert this
to a proper k_timeout_t, so sys_timepoint_calc() ends up
returning 0, which is causes immediate timeouts.

Check for this case specifically and force value passed to
sys_timepoint_calc() to be correct.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-09-29 21:20:50 +02:00
Florian Grandel
f55cf43ddf drivers: ieee802154: ieee802154_uart_pipe: replace magic number
Replaces a magic number by the appropriate definition.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-29 21:20:20 +02:00
Sylvio Alves
0d118ec1ab soc: esp32: add SPIRAM memory test kconfig option
Add kconfig to disable SPIRAM memory test. Allows
faster SoC initialization when disabled.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-28 11:30:34 -05:00
Josuah Demangeon
1596ee0415 drivers: video: gc2145: set_fmt: branch on failure rather than success
This aims to make the code more linear by having the for loop
validates the input format rather than search for a match.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
Josuah Demangeon
9174cb75e9 drivers: video: gc2145: return 0 at the end of functions
After the error code is checked to be zero, it is possible to return 0
explicitly to help with readability. Also, when available, forward the
return code from the failing function instead of a locally chosen error
code like -EIO.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
Josuah Demangeon
81f5725839 drivers: video: gc2145: check format compatibility before applying
While applying the format, the pixel format and drv_data->fmt were set
immediately, and the resolution was set only if it had a matching
entry on the "caps".

This commit makes sure the requested format matches the caps before
applying the format as well as drv_data->fmt. This does not guards
against partial failure (i.e. only pixelformat set and not
resolution).

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-28 11:30:08 -05:00
TOKITA Hiroshi
61c5346095 tests: drivers: build_all: sensor: Add non-typical TRIGGER settings
The following devices enable TRIGGER in a way that is different from the
template definition, so add these settings to sensos_no_default.conf.

- bosch,bmc150
- bosch,bmm150
- bosch,bmp150
- ti,ina230
- we,wsen-itds
- lm77
- st,lsm9ds0-gyro
- ti,tmag5170

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-28 11:29:03 -05:00
Chandler Keep
a9be21038e drivers/pinctrl.h: Resolve PINCTRL_DT_STATE_INIT Cpp Compatibility
This commit adds C++20 onwards support for the
PINCTRL_DT_STATE_INIT macro. Since C++20, support was
added for designated initializers but with the restriction that
they're ordered. PINCTRL_DT_STATE_INIT initializes a
pinctrl_state struct but the current initializer list is un-ordered,
this PR resolves that for >= C++20 compat

Signed-off-by: Chandler Keep <chandlersamkeep@gmail.com>
2024-09-28 08:22:36 -05:00
Robert Lubos
7aef84ce52 tests: net: sockets: tls: Increase connect timeout
Since fc007eeef5 TLS sockets support
timeout based on CONFIG_NET_SOCKETS_CONNECT_TIMEOUT value. The TLS test
suite reduced this config value to speed up the tests, however it turns
out the 100ms timeout is too low to finalize the handshake on slower
platforms (nrf52840 specifically). Therefore increase the timeout value
to 200ms to prevent test failures on those.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-28 08:21:51 -05:00
Ioannis Damigos
d7497507cf i2c_smartbond: Don't set STOP flag to last message
Setting STOP flag to last message it's done by z_impl_i2c_transfer().

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-09-28 08:20:41 -05:00
Benedikt Schmidt
f54a97c117 drivers: fpga: configure CDONE for ICE40 as input
Configure the GPIO CDONE of the ICE40 as GPIO_INPUT.
Fixes #78934.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-28 08:18:49 -05:00
Arif Balik
8742d9f25e logging: backend: add semihosting
Added semihosting support in logging backend

Signed-off-by: Arif Balik <arif.balik@enda.com>
2024-09-28 08:18:00 -05:00
Ryan McClelland
d00684b28e drivers: i3c: shell: add ibi disable/enable commands
Add shell commands for the `i3c_ibi_enable` and `i3c_ibi_disable` apis.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-28 08:16:13 -05:00
Jérôme Pouiller
bf700beac4 boards: silabs: Uniformize board.cmake
All the board.cmake contains more or less the same data. This patch
applies the cosmetics changes to align the structure of all these files.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Jérôme Pouiller
824a241132 soc: silabs: Drop useless comments after "endif"
It is a good practice to add a comment after #endif when the condition
is not obvious. However, when the condition is well known, "Don't Repeat
Yourself" rule applies and no comment should be added.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Jérôme Pouiller
7edafe00f6 soc: silabs: Drop useless comments
Most of the Kconfig files in soc/silabs start with a comment describing
the chip. This comment is redundant with the help message in associated
to the chip. Let's don't repeat ourselves.

This patch also ensure the Kconfig help message the full name the chip.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Jérôme Pouiller
322a086269 boards: silabs: Drop useless comments
Most of the Kconfig files in boards/silabs start with a comment
describing the board. This comment is redundant with the content of
board.yaml. Let's don't repeat ourselves.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Jérôme Pouiller
b695d18a1d boards: silabs: Add chipset reference to "sltb004a"
Usually commercial names mention the chipset included on the board.
"Thunderboard Sense 2" is the only exception in the Silabs boards.

This information is probably useful, so add it to the description of
this board.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Jérôme Pouiller
c08001b115 boards: silabs: Add internal board references
Yaml files allows the user to find the internal name for their board
using the "name" field.

In addition of the commercial names/references, Silabs boards have
internal board references. These references are not advertised, but can
be found printed on (every) boards.

It makes sense to add this reference to the Yaml file in case a user
would have the idea to grep it.

This patch also fixes some commercial names of very old boards.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2024-09-28 08:15:38 -05:00
Florian Grandel
247ce6cbe2 doc: build: kconfig: preprocessor: remove obsolete entry
The entry listed in the docs does not exist. The correct entry
(dt_compat_enabled) is present.

Fixes #79081

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-28 08:14:45 -05:00
Jukka Rissanen
2f47de60a0 hostap: The security keys were checked in wrong function
The security check case statements were in frequency band
setting checks. This is totally wrong and will cause compiler
warnings. Moving the checks to correct function.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-27 21:06:44 +01:00
Krzysztof Chruściński
d11997dbcf samples: boards: nordic: coresight_stm: Add flpr and ppr support
Add flpr and ppr core to the sample.

Since there are only 2 UARTs available on DK, local UART configuration
is using only cpuapp and cpurad.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-27 14:30:57 +01:00
Krzysztof Chruściński
c61e92a79c samples: boards: nordic: coresight_stm: Improve benchmark
Add interrupt locking during test to ensure that main thread is not
interrupts which would impact the test.

Add longer sleep time between tests to ensure that all logs are
processed on time and not dropped.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-27 14:30:57 +01:00
Krzysztof Chruściński
c2454f2a9f logging: frontend: stmesp: Do not append strings when not needed
Currently we can assume that flpr and ppr cores are always owned by
cpuapp. In that case, cpuapp (which processes ETR buffer content) has
access to the memory where logging strings from ppr and flpr are
located. Those strings do not need to be appended to the message
which is written to the STM (in case of standalone configuration).
This approach reduced logging time, e.g. logging a message with
one argument takes 1.8us on cpuapp and 6.3us on cpurad.

This setting applies only to the case when cpuapp is the owner
of those co-oprocessors and shall be updated if that becomes
configurable but currently there are no means to detect core
owner.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-27 14:30:57 +01:00
Krzysztof Chruściński
8e22222e75 dts: riscv: nordic: nrf54h20_cpuflpr: Add stmesp node
Add node with STMESP registers.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-27 14:30:57 +01:00
Alberto Escolar Piedras
d67d64de91 boards/native/doc: Update architecture description
The architecture description was quite out of date in some parts,
specially those which changed with the introduction of the native
simulator.
Let's update it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-27 14:30:39 +01:00
Dmitrii Golovanov
2ddab56bfd scripts: twister: Fix trailing CR/LF at BinaryHandler logs
Fix trailing `\\r\\n` (escaped CR/LF) didn't cut off because of rstrip()
removed by #58338, so the CR/LF suffix was never found as the actual line
end was `\\r\\n\n`.

Add ANSI code sequence to `test_handlers` Twister unit test.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-27 14:30:26 +01:00
Reto Schneider
58d9e3d27a boards: arm: v2m_musca_s1: Fix unit and first address mismatch
This fixes the following warnings:

> unit address and first address in 'reg' (0xa080000) don't match for
> /mram@a080400

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-27 14:30:12 +01:00
Gang Li
caf86128b7 drivers: wifi: nxp: add AP configuration cmd support
Implement NXP AP configuration parameter operations.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-09-27 10:56:57 +01:00
Gang Li
4bfdb64386 hostap: add AP configuration cmd support
Implement AP configuration parameter operations.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-09-27 10:56:57 +01:00
Robert Lubos
1dca822483 tests: net: http_server: Add netif dependency
Some of the http_server tests suites were missing netif dependency.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-27 10:56:47 +01:00
Vidar Berg
d943e22f94 drivers: flash: spi nor: Allow the init priority to be configurable
Some applications may require the SPI NOR driver to be initialized
earlier. This commit enables the user to change the default
initialization priority.

Signed-off-by: Vidar Berg <vidar.berg@nordicsemi.no>
2024-09-27 10:56:41 +01:00
Jeppe Odgaard
6bca0347df doc: mcumgr: Use SPDX license list short identifier
Fix license notation inconsistency in the MCUmgr tools/libraries table.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-27 10:56:36 +01:00
Jeppe Odgaard
a8859e7f87 doc: mcumgr: Fix license
mcumgr-client is Apache-2 and not BSD licensed. See:
https://github.com/vouch-opensource/mcumgr-client/blob/main/LICENSE

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-27 10:56:36 +01:00
Dan Collins
0e43dd23ae soc: st: adds support for stm32u545xx
This adds support for the stm32u545xx SoC, which extends
the stm32u5 family already present in Zephyr.

Signed-off-by: Dan Collins <dan@collinsnz.com>
2024-09-27 10:56:25 +01:00
Gaofeng Zhang
94386e103e zephyr: hostap: fix eap secure mode print UNKNOWN
wpas_key_mgmt_to_zephyr doesn't support eap secure mode, add code to
support eap secure mode.

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-09-27 10:56:16 +01:00
Fabrice DJIATSA
31d24eb186 tests: drivers: adc: adc_api: update adc_api test
-add nucleo_u083rc and stm32u083c_dk overlays files
for testbench purpose.
- add platform_exclude property to skip test on boards
with little ram size.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>

tests: drivers: adc: adc_api: update adc_api test
2024-09-27 10:55:56 +01:00
Fabrice DJIATSA
bfa6c32e07 divers: adc: update adc driver to integrate stm32u0
add u0 config_soc conditions in adc driver to handle
news peripherals.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-27 10:55:56 +01:00
Fabrice DJIATSA
293eb22d62 boards: st: add adc node in dts file and update docs
-enable adc in nucleo_u031r8, stm32u083c_dk and nucleo_u083rc
- add adc as new supported interface in docs
- update yaml files

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-27 10:55:56 +01:00
Fabrice DJIATSA
301111ead4 dts: arm: st: u0: add adc node in dtsi file
all stm32u0 boards have only one and same
adc peripheral.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-27 10:55:56 +01:00
Morten Priess
7e892f8c6f Bluetooth: controller: Remove SC-jitter from ISO pause/resume setup
Because timing of the pause/resume for peripheral/sync is based on
central/broadcaster active clock, the sleep-clock jitter shall not be
added.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-09-27 09:03:37 +02:00
Morten Priess
fe83a9dc22 Bluetooth: controller: Fixes and improvements for PTO implementation
- Add next pointer to node_rx_iso_meta for pre-transmission linked
  list (does not increase memory usage as union is larger).
- Fix broadcaster not setting PTC with test configuration
- Refactor stopping of sync ISO tickers to separate function

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-09-27 09:03:37 +02:00
Morten Priess
541b516a3f Bluetooth: controller: Make ISO Pause/Resume common
Share pause/resume functionality by moving resume ticker handling to
ull_iso. Rename interface function to ull_conn_iso_resume_ticker_start,
and provide handles instead of instance pointer.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-09-27 09:03:37 +02:00
Laurentiu Mihalcea
848907c0f8 soc: imx: imx95: enable cache management for M7
Enable cache management for the M7-based i.MX95 soc.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-27 09:02:14 +02:00
Jiafei Pan
d8663bf501 boards: imx8mm/n/p imx93: add U-Boot requirement in document
Currently NXP MPU depends on "cpu" command in uboot to kick Zephyr to
Cortex-A Core, added U-Boot version which support "cpu" command in the
board documents.

Refined boot commands.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-27 09:00:31 +02:00
Szymon Janc
fa8f86f283 MAINTAINERS: Remove sjanc from Bluetooth Classic group
sjanc is not working on BT Classic and shouldn't be assigned as
reviewer for those.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-09-27 09:00:00 +02:00
Jamie McCrae
2485102606 doc: release: 4.0: Add note on new MCUmgr img mgmt slot info
Adds information on the new img mgmt slot info command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
Jamie McCrae
a9731b5d67 tests: mgmt: mcumgr: Add img_mgmt_slot_info test
Adds a test to exercise this new feature

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
Jamie McCrae
82d3400a1c doc: services: device_mgmt: smp: Add img mgmt slot info docs
Adds documentation describing the new slot info command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
Jamie McCrae
9c821eb999 mgmt: mcumgr: grp: img_mgmt: Add slot info command
Adds a new command that will return information on slots
themselves, listing the slot sizes, without any internal
information about the slot data. Will also return the maximum size
of an image for a set of slots if built using sysbuild.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
David Brown
bd46e8d849 modules: Add placeholder for CONFIG_RUST
In order to be able to ifdef based on `CONFIG_RUST`, the config must be
defined in the main repo (because the rust module is optional).  Add
this as a placeholder.  If the module is not availabe, the symbol will
be present, and always disabled.  The module will provide a full
definition for the Kconfig.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
David Brown
b14ed47d11 linker: Include the .ARM.extab section for Rust
This is a little complicated.  We currently just jump directly to rust's
panic, so we aren't likely to actually need these unwind tables.  But, they
would be needed if we ever reall paniced.  As of the time of this change,
the tables seem to just be 24 bytes of ROM space.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
David Brown
442e212364 MAINTAINERS: Add zephyr-lang-rust maintrenance
Indicate that this the lang-rust module (modules/lang/rust) is
maintained.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
David Brown
8aaad1e960 .gitignore: Ignore Rust 'target' directories
Although the Cmake rules to build Rust applications keeps the target
directory inside of the build directory, some IDE tools may generate a
target directory while editing the code.  Ignore these so they never get
checked in.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
David Brown
f1ec7be154 gitignore: Ignore some Rust/Cargo generated files
Although the Cmake rules for Rust leave all build files in the build
directory, sometimes tools such as IDEs can leave a few files in the
source tree.  Ignore these to make sure they don't get committed.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
David Brown
46aa9d7c49 manifest: Add rust lang module
Add zephyr-lang-rust as an optional module.  This module brings in
support for writing applications in Zephyr using the Rust programming
language.

At this point, the integration supports:

- Building applications with Rust support.
- CI testing of samples and tests from the rust module (twister
  functionality already present).

Still to do is adding documentation to the Zephyr docs with an overview
of Rust support as well as the generation of the rustdoc docs.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
Dmitrii Golovanov
883d9e3a6c ci: elasticsearch: Upload script index map examples
Add several examples for `upload_test_results_es.py` script usage
with ElasticSearch index map files for the following use cases:

 * Twister test results.

 * Twister test results with recordings.

 * Memory Footprint data (`twister-footprint.json`).

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-26 17:44:01 -04:00
TOKITA Hiroshi
6e5f1f19c9 tests: drivers: build_all: adc: Adding configuration for ti,tla2021
Add configuration for ti,tla2021 to enable build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
TOKITA Hiroshi
a29c27f050 drivers: adc: ads1112: Remove unused variables
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
TOKITA Hiroshi
a873c73701 driver: adc: ads1112 Fix missing default y in config ADC_ADS1112
The `default y`, which is coupled with
depends on DT_HAS_TI_ADS1112_ENABLED to link the settings with DeviceTree,
which was missing, so I added it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:52 -04:00
Vinayak Kariappa Chettimada
b423941010 Bluetooth: Controller: Remove unused nRF21 FEM SPI CSN control
Remove unused nRF21 FEM SPI CSN control as the Zephyr
Controller does not implementation SPI control for Tx/Rx
nor for Tx gain settings.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
7443daf6ef samples: Bluetooth: hci_uart: CI coverage for nRF52833 DF
Add CI coverage for nRF52833 DF features in hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
f98a5dd4ec samples: Bluetooth: hci_uart: CI coverage for nRF52dk
Add CI coverage for nRF52dk in hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
d8e75f8c40 samples: Bluetooth: hci_uart: CI coverage for nRF52840
Add CI coverage for nRF52840 in hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
8f751c799d samples: Bluetooth: hci_uart: CI coverage for nRF52+nRF21 FEM
Add CI coverage for nRF52840 plus nRF21540 FEM usage in
hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
107e37e99c samples: Bluetooth: hci_ipc: CI coverage for nRF5340_audio_dk cpunet
Add CI coverage for nRF5340_audio_dk cpunet in hci_ipc
sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
7077502d21 samples: Bluetooth: hci_uart: CI coverage for nRF5340dk cpuapp
Add CI coverage for nRF5340dk cpuapp in hci_uart sample.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Vinayak Kariappa Chettimada
35ad653038 samples: Bluetooth: hci_uart/hci_ipc: CI coverage for nRF53+nRF21 FEM
Add CI coverage for nRF5340 plus nRF21540 FEM usage in
hci_uart plus hci_ipc samples.

The overlay values are inspired from:
https://github.com/nrfconnect/sdk-nrf/tree/
85307a9ca0fb6ba8c61f4bd05b7f866cde42612f/boards/shields/nrf21540ek

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-26 17:43:34 -04:00
Jamie McCrae
07f96b8620 soc: nordic: nrf53: Make GPIO pin forwarding selectable
Allows selecting the forward GPIO pins to network core Kconfig
option and enables it by default if the node exists in devicetree

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:43:34 -04:00
TOKITA Hiroshi
20ff7ddff9 tests: drivers: build_all: pwm: Add i2c-devices build test
Add build tests for following devices.

- maxim,max31790-pwm
- nxp,pca9685-pwm

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-26 17:43:24 -04:00
Laurentiu Mihalcea
f3e870dfa5 boards: nxp: imx95_evk: add edma and sai nodes
Add edma and sai nodes for the M7-based i.MX95 board.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-26 17:42:49 -04:00
Babak Arisian
c0cfe49a54 Bluetooth: BASS: Add support for dynamic registration of BASS
Added support for dynamic registration and unregistration of the
Broadcast Audio Scan Service (BASS) within the scan delegator.
This enables both scan delegator and BASS to be registered or
unregistered dynamically at runtime.

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-09-26 17:42:39 -04:00
Fin Maaß
38fb12f5ac doc: releases: mention change of kernel reboot
mention change of `kernel reboot` shell command.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-26 17:42:20 -04:00
Jamie McCrae
770482a45a mgmt: mcumgr: grp: os_mgmt: Fix issues raised in comments
Fixes an issue with structure which was previously raised in a
comment, and adds a new bool to the structure to enable this
restructure to work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:42:01 -04:00
Emil Gydesen
ec2c5b0c1f Bluetooth: GATT: Replace magic number 0 with macro for auto ccc
Replace the magic number 0 with a #defined value for
the auto CCC discovery feature.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-26 17:41:24 -04:00
Raffael Rostagno
aaaffd20a6 tests: ethernet: esp32: Functional test for CI
Functional test for Ethernet for CI device testing

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-26 17:41:06 -04:00
Hakan Jansson
8a7a737a14 samples: bluetooth: Fix PAwR null dereference on disconnection
If an involuntary disconnection happened it could set default_conn to NULL
while it was still being used in the main while loop.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-09-26 17:40:54 -04:00
Hakan Jansson
53b91138fb samples: bluetooth: Fix PAwR response slot calculation
Fix the calculation of the response slot that is assigned to the
temporarily connected responding device.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-09-26 17:40:54 -04:00
Benjamin Cabé
c487259241 doc: extensions: samples: Add "browse source code" button
One of the first thing one wants to do when reading about a code sample
is checking the code itself. This commit adds a button to directly take
the user to the code sample' source code on GitHub.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-26 17:40:42 -04:00
Benjamin Cabé
06a89bc549 samples: hello_world: remove redundant title
Recent switch to zephyr:code-sample:: made the use of a section title
redundant.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-26 17:40:42 -04:00
Jamie McCrae
3a15e37b5a lib: libc: common: time: Add toolchain include
This file uses something that is defined in the toolchain files,
fix a build error by including that header

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 13:31:03 -05:00
Anas Nashif
b45992159d ci: compliance: remove dropped pylint rules
new pylint dropped few rules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-26 13:30:12 -05:00
Bartosz Miller
e26b9750ae tests: drivers: Add PPR support in NRF GRTC timer test
Test did not support PPR core due to failing GRTC channel allocation.
This change fixes the channel allocation and enables PPR core test.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-26 13:29:45 -05:00
Fabio Baltieri
eacee3c1f9 README: drop the stray link underscores between badges
The README HTML has some extra link underscore between spaces due to the
extra newline and space between the <a> and <img> tags. Remove it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-26 15:20:39 +01:00
Francois Gervais
13cad59542 tests: coap_client: wait enough for requests to be unallocated
As confirmable requests will stay allocated for (3 * ACK_TIMEOUT), we
need to adjust the timings so all requests are unallocated by the end
of the test.

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2024-09-26 09:20:23 -05:00
Francois Gervais
bfed8d0966 net: lib: coap_client: wait for all acknowledgements
This commit makes sure we continue to wait for extra confirmations even
after the request is done so we can handle duplicate confirmations if any.

Detailed description:

rfc7252#section-4.5 specifies that:

"The recipient SHOULD acknowledge each duplicate copy of a
 Confirmable message".

So if, for example, the client sends to a multicast destination address,
the server will get multiple requests and will confirm all of them.

Without this commit, the client will set the request to done after
receiving the first answer.
From here the request object will be marked as free and the duplicate
acknowledgements will stay buffered in the network stack.
Once the client tries to send a new request, it will unbuffer those
duplicate acknowledgements but now the request object is unallocated
so the client won't be able to handle those acknowledgements as duplicates.
It will instead treat it as an unexpected ACK.

To work around this issue, rfc7252#section-4.8.2 states that:

"EXCHANGE_LIFETIME is the time from starting to send a Confirmable
 message to the time when an acknowledgement is no longer expected,
 i.e., message-layer information about the message exchange can be
 purged."

Keeping the request object allocated for EXCHANGE_LIFETIME ensures that
duplicate acknowledgements can be handled accordingly.

This commit adds a basic implementation of what is stated in the RFC.

EXCHANGE_LIFETIME has been arbitrarily set to 3 * ACK_TIMEOUT which
seems more reasonable than the 247 seconds stated in the RFC.

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2024-09-26 09:20:23 -05:00
Andrej Butok
aa185c756c samples: mcumgr: smp_svr: Add NXP platforms to allow list
Adds NXP platforms to the smp_svr sample allow list,
for overlay-serial.conf and overlay-shell.conf.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-26 09:18:53 -05:00
Li Long
04e1b71f5c west: hostap: update hostap revision to PR
Update hostap revision to PR

Signed-off-by: Li Long <li.long@nxp.com>
2024-09-26 09:18:31 -05:00
Andrew Davis
93a6f694db drivers: ipm: Add IPM over MBOX driver
The Multi-Channel Inter-Processor Mailbox (MBOX) framework can be seen
as a more general version of the Inter-Processor Mailbox (IPM) framework.
An MBOX driver provides for multiple channels, where IPM provides for
only a single channel of communication.

Currently many applications are written to use IPM, while some are now
being written to use MBOX. This means if a platform wants to support both
types of apps a given it must have a driver for both frameworks. As MBOX
is the newer and more generic framework, new drivers are being added for
this framework only and older IPM drivers are being migrated to MBOX.
This leads to the situation where applications need to be written twice,
once for each framework, to run across all platforms.

The solution is to add a gasket driver that exposes the IPM interface
while using a MBOX driver in the back-end. This shim driver allows
platforms to only need an MBOX driver to support both types of
application. This IPM driver can be used when an application only
supports IPM but the platform only supports MBOX.

This will allow platforms and applications to be ported over to MBOX
independently of each other. Add this driver here.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-09-26 09:17:48 -05:00
Rubin Gerritsen
417a9e81ec Bluetooth: Controller: Add device tree dependency to selection
This commit makes the device tree configuration decide
which link layer is compiled in. We do this to avoid
hard-to-understand linker errors referencing device tree nodes.

The following configuration creates a difficult to parse
linker error:
* BT_LL_CHOICE contains multiple entries, BT_LL_SW_SPLIT
  is selected.
* Each BT_LL_CHOICE has its own unique device tree node with its
  own "compatible".
* Only one of the link layer device tree nodes has status "okay",
  but not the one corresponding to BT_LL_SW_SPLIT.

The linker error indicates that code using the HCI driver fails
to link with the controller. This because the HCI driver device
tree node references the link layer selected in devicetree which
is not compiled in.

By adding a dependendency to the device tree node, this can no longer
happen. Instead, if BT_LL_SW_SPLIT is now selected in a configuration
file, a Kconfig warning will be issued:

```
warning: The choice symbol BT_LL_SW_SPLIT
(defined at subsys/bluetooth/controller/Kconfig:129) was
selected (set =y), but BT_LL_SOFTDEVICE (defined at
/home/ruge/ncs/nrf/subsys/bluetooth/controller/Kconfig:11)
ended up as the choice selection.
```

This should be easier to understand than:

```
...(hci_core.c.obj):(.data.bt_dev+0x16c):
undefined reference to `__device_dts_ord_132'
```

After this commit we should consider getting rid of link layer
selection from Kconfig completely as the link layer is in practice
selected through device tree.

Unit tests have been updated to satisfy the dts dependency.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-26 11:10:22 +01:00
Krzysztof Chruściński
266847665a drivers: serial: nrfx_uarte: Use nrfx_gppi helper
Use nrfx_gppi as abstraction over (D)PPI.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-26 11:10:10 +01:00
Robert Lubos
da6b607a32 net: tcp: Do not cancel connect sem from tcp_conn_unref()
Resetting the connect semaphore from tcp_conn_unref() prevents the
ref/unref mechanism from being used freely when needed. Therefore, move
the code responsible for resetting pending connection to
tcp_conn_close() (called only when the connection is being closed on
behalf of the TCP stack, for instance due to RST being received) and to
net_tcp_put() (connection closed on behalf of the application).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-26 10:58:37 +01:00
Jukka Rissanen
a41f625fab net: tcp: Make sure that connection failure is propagated to app
It is possible that TCP connect() will fail if for example network
interface does not have IP address set. In this case we close
the connection during net_tcp_connect() but do not set the return
code properly. This looks in the application like the connection
succeeded even if it was not.

As the tcp_in() call in net_tcp_connect() might close the connection,
we just take extra ref count while calling tcp_in(). Otherwise we
might access already freed connection.

Before the fix:

net_tcp_connect: context: 0x80757c0, local: 0.0.0.0, remote: 192.0.2.2
net_tcp_connect: conn: 0x8087320 src: 0.0.0.0, dst: 192.0.2.2
tcp_in: [LISTEN Seq=1604170158 Ack=0]
tcp_conn_close_debug: conn: 0x8087320 closed by TCP stack (tcp_in():3626)
tcp_conn_close_debug: LISTEN->CLOSED
tcp_conn_unref: conn: 0x8087320, ref_count=1
net_tcp_connect: conn: 0x8087320, ret=0

After the fix:

net_tcp_connect: context: 0x80757c0, local: 0.0.0.0, remote: 192.0.2.2
net_tcp_connect: conn: 0x8087320 src: 0.0.0.0, dst: 192.0.2.2
tcp_conn_ref: conn: 0x8087320, ref_count: 2
tcp_in: [LISTEN Seq=1604170158 Ack=0]
tcp_conn_close_debug: conn: 0x8087320 closed by TCP stack (tcp_in():3626)
tcp_conn_close_debug: LISTEN->CLOSED
tcp_conn_unref: conn: 0x8087320, ref_count=2
net_tcp: tcp_conn_unref: conn: 0x8087320, ref_count=1
net_tcp: net_tcp_connect: conn: 0x8087320, ret=-128

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-26 10:58:37 +01:00
Charles Dias
57a8a7c350 samples: drivers: video: add capture to lvgl sample
Add sample application to capture an image frame from a camera
and send it for display on LCD via the LVGL library.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-09-26 03:35:34 -04:00
Peter van der Perk
dd15aff5fe west: linkserver: Fix version detect for ihex support
version detect never occured correctly and always yielded true

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-09-26 03:34:53 -04:00
Jordan Yates
cd03667a5d modules: tfm: split security counter from version
By default, TFM enables hardware rollback protection, which requires a
security counter to be embedded in the image trailer. The default
behaviour of constructing this counter from the image version breaks the
TFM `boot_nv_security_counter_update` implementation once the version
number is greater than `0.0.1024`. As such, explicitly specify the
desired security counter value. As per the MCUboot docs, this does not
need to be incremented on every firmware update.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-26 03:34:42 -04:00
Alberto Escolar Piedras
13efb3910e samples ipc_service/static_vrings: Enable for nrf5340bsim
Enable this sample for the nrf5340bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
ca62ff801c samples ipc_service/icmsg: Enable for nrf5340bsim
Enable this sample for the nrf5340bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
be35bbd4c0 samples ipc_service/multi_endpoint: Enable for nrf5340bsim
Enable this sample for the nrf5340bsim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
b5b91b3edb ipc: icmsg & icbmsg: Add support for POSIX arch targets
Add support in this IPC backends for POSIX arch targets in general,
and ensure the nrf5340bsim defines the buffer which will be used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
5dc810e261 ipc: pbuf: Provide function for Rx side initialization
Provide a new function for initializing the Rx side,
so users do not need to initialize the pointers by hand
if they did not use PBUF_DEFINE().

Let's also rename pbuf_init() to pbuf_tx_init() to clearly
signify the previous function was only meant to be used
by the Tx side.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
5efe751240 boards native: Add function to remap embedded address
Add a function which can be used to remap embedded device address,
into addresses which can be used in the simulated native boards.

For the nrf_bsim boards we provide an actual implementation.
For other boards, we provide an optional dummy version which does
nothing.
It is up to each board implementation to decide if they want to
provide one or use the dummy.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
942fa67a45 manifest: Update nRF hw models to latest
Update the HW models module to:
85944c64f224406e4d781aa382c5f1f71ed307fd

Including the following:
* 5340: Allocate a buffer for the APP core RAM (2nd version)
* 82ca90c Add NCS test-spec.yml to trigger downstream CI job
* a05d7a6 docs: top README: Mention nrf54l15 support and minor fixes
* cd64524 54 ECB/CCM tests: Remove comment which does not apply

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
b6f1767db5 subsys/ipc icmsg_me.c: Fix ssize_t build error for some libCs
ssize_t is not part of the C library ISO standard subset, and as such
one cannot expect a C library to expose the type by default.
Some libraries like glibc do not expose this type in general, and
trying to build using them results in build errors.

There is 3 possible options:
1. Continue using ssize_t and:
1.a define _POSIX_C_SOURCE before including any header
1.b include sys/types.h directly (A bit uglier)
3. Not use ssize_t, and instead rely on ISO standard types

Let's just go with 1.a assuming we want to keep using this type,
as that is the correct way of getting this type defined.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Ryan McClelland
00b6443a55 drivers: i3c: add additional option to setdasa
struct i3c_ccc_address is intended to match the output where the address
is left shifted by 1 for SETDASA and SETNEWDA. Require the operations
calling it to shift the data.

add an additional parameter for the setdasa function which will allow for
the da to be configured rather than being hard coded.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-26 03:34:16 -04:00
Simon Hein
e401b80b61 doc: safety: Extend safety overview with IEC 61508 infomation
Extend the safety overview with information about the IEC 61508 standard
and why it was chosen for zephyr.
Add a new diagram which shows relations between the IEC 61508
and other standards.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-09-26 03:34:06 -04:00
Tomasz Moń
e2f2e448c7 drivers: udc_dwc2: Implement USBHS hibernation quirks
Use the quirk to keep only the necessary clocks running when the core is
hibernated. The quirk is necessary to bring the USB suspend current
below the USB 2.0 suspend current limit.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-26 03:33:52 -04:00
Tomasz Moń
f8df6b49e1 drivers: udc_dwc2: Add hibernation vendor quirks
Make it possible to have vendor quirks after hibernation entry sequence
and before hibernation exit sequence.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-26 03:33:52 -04:00
Aksel Skauge Mellbye
e77d082b4e drivers: bluetooth: silabs: Initialize PHY
Initialize PHY as part of controller init sequence.

Disable 2M and coded PHYs for now, as they cause issues on devices
that don't support them. This should be made configurable in the future.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-26 03:33:38 -04:00
Aksel Skauge Mellbye
9f8f1fff8b soc: silabs: Update HAL for Series 2
Update HAL for Series 2 devices to Simplicity SDK 2024.6.

This HAL deprecates sl_device_init_emu(). Equivalent functions
are now performed by sl_power_manager_init().

For now, soc.c remains compatible with both the Gecko SDK based
HAL for Series 0 and 1, and the Simplicity SDK based HAL for
Series 2. In a future commit, soc.c will be split between the
two platforms.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-09-26 03:33:38 -04:00
Declan Snyder
30a8f87d6a drivers: spi_mcux_lpspi: Fix synchronous DMA CS
Fix the chip select when using the synchronous API with DMA path.

Note need to use TxDataRequest flag instead of ModuleBusy flag now
because module busy flag will not deassert until PCS deasserts.

This does not fix CS for the non-DMA path, because that would require a
large driver rework.

Do not skip configuration when calling transceive with the same spi_cfg
because we need to write a new command word.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-26 03:33:05 -04:00
Declan Snyder
0186bfb2d0 drivers: spi_mcux_lpspi: Enable debug mode
When CONFIG_DEBUG is turned on, enable debug mode for the LPSPI.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-26 03:33:05 -04:00
Arrel Neumiller
703eadde5c Doc: Contribute: Add instructions for GitHub profile name and email
Fixes 78713
Add instructions to the "Git Setup" section to ensure that the user's
GitHub profile name is their full name (first and last) and that the
GitHub profile name and email address match the git config user.name
and user.email.

Page: contribute/guidelines
Tested with:
ninja html
python3 -m http.server 8000

Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
2024-09-26 03:32:40 -04:00
Ben Wolsieffer
063b146eb4 net: tcp: Fix net_tcp_endpoint_copy() with IPv4 disabled
The IPv6 branch of net_tcp_endpoint_copy() was accidentally made
conditional on CONFIG_NET_IPV4 rather than CONFIG_NET_IPV6.

Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
2024-09-26 03:32:26 -04:00
Sreeram Tatapudi
5c0275df27 drivers: gpio: ifx: Update GPIO driver to use PDL instead of HAL
Update the GPIO driver to use PDL API instead of HAL API to fix the
issue with configuring interrupts on both edges

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-09-26 03:32:13 -04:00
Ivan Iushkov
e35781419b dts: nordic: Add Channel Sounding support to nrf-radio
- Added `cs-supported` property to nrf-radio devicetree
- Added `HAS_HW_NRF_RADIO_CS` Kconfig option which is set if
`cs-supported` property is enabled
- Enabled `cs-supported` property for nrf54-series devices
- Disabled `cs-supported` on nrf54l15bsim because it is not
yet supported

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-09-26 03:32:03 -04:00
Emil Gydesen
fff3ff02c5 Bluetooth: CSIP: Add bonding requirement for set lock/release
The CSIP spec states that the procedures shall only be done
on bonded devices, so a check for that was added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-26 03:31:47 -04:00
Krzysztof Chruściński
3a4c5a9ebc doc: releases: Add not about CONFIG_UART_n_GPIO_MANAGEMENT removal
Add note that those Kconfig options were removed from Nordic UART driver
configuration.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-26 03:31:39 -04:00
Krzysztof Chruściński
cae53af136 drivers: serial: nrfx_uarte2: Remove CONFIG_UART_n_GPIO_MANAGEMENT
Remove Kconfig option that no longer has any use after pinctrl
driver is introduced.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-26 03:31:39 -04:00
Krzysztof Chruściński
76db5b24e0 drivers: serial: nrfx_uarte: Remove CONFIG_UART_n_GPIO_MANAGEMENT
This is a leftover from pre-pinctrl era and no longer makes sense.
Driver always manages gpio through pinctrl.

Support removed from uart and uarte shims.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-26 03:31:39 -04:00
Katarzyna Giądła
436d1bf628 samples: tests: Add support to tests on nrf54l15 DK
Align all existing samples/tests/applications which
contains nrf54l15pdk/nrf54l15/* by adding
nrf54l15dk/nrf54l15/* to enable twister builds.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-09-26 03:31:20 -04:00
Ren Chen
e632cc99c5 usb: it82xx2: lock irq for handling suspended flag
The suspended flag is checked during SOF and RESUME interrupts, and it
is modified within a delayable work item. To prevent race conditions,
this update ensures that interrupts are disabled (locking IRQs) before
modifying the suspended flag. Additionally, the RESUME interrupt is
enabled only when the USB is suspended.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-26 03:30:51 -04:00
Sylvio Alves
1fe904539d west.yml: espressif: fix extra build warnings
Fix build warnings due to unused variables
when CONFIG_PM=y is set.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-25 16:17:31 -05:00
Torsten Rasmussen
205691edce cmake: linker: evaluate CONFIG_LINKER_ITERABLE_SUBALIGN in CMake
Evaluate CONFIG_LINKER_ITERABLE_SUBALIGN in CMake instead of in the
linker script.

It cannot be assumed that a linker generator implementation is
pre-processed and therefore Kconfig settings cannot be used in those
but must be evaluated in CMake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-25 16:16:35 -05:00
Hubert Miś
70c9bf1da7 net: coap: add no-response option definition and values
Constrained application can require to avoid waiting for response
from a server. CoAP No-response option defined in RFC 7967 allows
to do that by suppressing selected response types.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2024-09-25 16:14:31 -05:00
Jukka Rissanen
765bfbbc3c net: stats: dns: Collect DNS statistics
If DNS statistics is enabled in Kconfig, then start to collect it.
This is useful in order to see how many DNS requests/responses
received or sent, and also see the amount of dropped DNS packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-25 13:52:15 -05:00
Jukka Rissanen
ca0bd2cc23 net: mdns: Discard the message if query count is 0
As described in RFC 6804 ch. 2, if query count is 0, discard
the message silently.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-25 13:52:15 -05:00
Jordan Yates
6db9cbc499 firmware: scmi: util: add missing macro argument docs
Add missing documentation for macro parameters, as `@param ...` is
only expected to be used with a variable argument list.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Jordan Yates
4d9724a98d llext: fix @kconfig{} pattern
The `@kconfig{}` pattern does not work properly as the first value in
the `@retval` field, leading to:
```
WARNING: zephyr/include/zephyr/llext/llext.h:296: unexpected token in
comment block while parsing the argument of command retval
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Jordan Yates
84a363011a devicetree: add missing macro param doc
Add missing documentation for the `compat` parameter.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Jordan Yates
fd58374663 doc: get output folder from environment
Pull the output build folder from the environment, instead of hardcoding
the HTML output folder, which is wrong for the latex build.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:49:34 -05:00
Sylvio Alves
68479a8c8c tests: boards: rename espressif folder name
Current folder name is set to "espressif_esp32" and
might not reflect all kinds of SoCs as such as esp8684.
Rename the folder to "espressif" only.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-25 13:47:37 -05:00
Benedikt Schmidt
e7bf414f15 scripts: dts: devicetree: edtlib: Use insertion sort for compat2nodes
Sort the elements in the lists of compat2nodes already during insertion.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-25 13:46:32 -05:00
Benedikt Schmidt
fe3287a9ac scripts: dts: extract pickled EDT generation
Separate the pickled EDT generation from the C-Macro header
generation in gen_defines.py to have a more clear responsibility
of the scripts in the DTS parsing process.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-25 13:46:32 -05:00
Florian Grandel
a575c769f8 scripts: dts: gen_defines/edtlib: improve encapsulation
Moves node sorting concern into EDT.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-25 13:46:32 -05:00
Florian Grandel
945925bd8b scripts: dts: gen_defines: redundant sorting
Removes redundant sorting of nodes.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-25 13:46:32 -05:00
Florian Grandel
de846c7afa scripts: dts: gen_defines: type hints
Introduces type hints to all functions for improved static type checking
and IDE support.

Also equalizes spacing between functions as the lines are being touched
anyway.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-25 13:46:32 -05:00
Laurentiu Mihalcea
50720f835b Revert "tests: drivers: i3c: add build of i3c_shell.c"
This reverts commit ffb60c08e9.

Fixes #78990.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-25 09:10:23 -05:00
Chun-Chieh Li
7cf5dd9ab2 boards: nuvoton: numaker_m2l31ki: add usbd
Add usbd test feature for the numaker_pfm_m467 board

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-09-25 12:22:16 +01:00
Chun-Chieh Li
0e00a395f3 drivers: usb: udc: add numaker m2l31x usbd controller
Add numaker m2l31x usbd controller

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-09-25 12:22:16 +01:00
Chun-Chieh Li
68c11b2a45 soc: nuvoton: numaker: m2l31x: fix hirc48m typo
Fix typo on HIRC48M. This clock source is required by:
- USB 1.1 OTG PHY
- USBD
- USBH
- OTG

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-09-25 12:22:16 +01:00
Tomasz Moń
ac7d55b939 drivers: usb: udc_dwc2: Support Remote Wakeup
According to USB 2.0 Specification the remote wakeup device must hold
the resume signaling for at least 1 ms but for no more than 15 ms. The
DWC2 otg controller requires the software to drive the remote wakeup
signalling for appropriate duration (when LPM is disabled, which is
currently always the case in udc_dwc2). Arbitrarily choose to drive the
resume signalling for 2 ms to have sufficient margin in both directions.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
68b8818e02 drivers: udc_dwc2: Add missing GHWCFG bit defines
Add missing GHWCFG2 and GHWCFG3 defines based on nRF54H20 registers
documentation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
b89b7ed542 drivers: usb: udc_dwc2: Exit hibernation on disable
The PMU is not reset by core reset and therefore it is necessary to exit
hibernation on DWC2 disable to prevent endless PMU interrupt loop when
the driver is enabled again.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
f7650262bf drivers: usb: udc_dwc2: Enter hibernation in thread
Enter hibernation in thread context with the lock held to make sure to
not queue any transfers when the core is hibernated.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
5fc0405a6f drivers: usb: udc_dwc2: Synchronize thread with UDC API
UDC API handlers and DWC2 driver thread share not only software
constructs, but also the underlying hardware. Ensure that any UDC API
call is not preempted by DWC2 driver thread (and vice versa) by
acquiring the lock in thread handler.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
c2f2d8ce5d drivers: usb: udc_dwc2: Replace queue with events
When the queue is full, all messages posted inside interrupt handlers
are simply dropped. This problem can be remedied by having the message
queue large enough, but determining the maximum number of messages that
can ever be posted in the system is really complex task.

Hopefully in DWC2 driver there is finite number of events that have to
be processed inside thread handler. Therefore it is unnecessary to
determine the maximum queue size for the events if the events are posted
to k_event object instead of send to k_msgq object.

Use combination of three k_event structures to handle all possible event
sources. This not only guarantees by design that no event will be lost,
but also slightly reduces the memory usage.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
2c78a4d243 drivers: usb: udc_dwc2: Remove forward defitions
Reorder functions in order to remove forward function defitions.
No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:03:12 +01:00
Tomasz Moń
9815f43fd0 boards: nrf54h20dk: Allow running USB on radio core
Add the necessary entries but keep the usbhs disabled by default on
radio core (it is enabled by default on app core).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:02:33 +01:00
Kumar Siddaramayya
a899deda2b scripts: logging: dictionary: Add uart support
This commit adds support to dictionary logging to parse binary
data directly from input serial and generate the ascii logs.

Signed-off-by: Kumar Siddaramayya <harish.kumar@nordicsemi.no>
2024-09-25 12:00:13 +01:00
Karsten Koenig
43f9488045 dts: bindings: arm: nordic: Add TDDCONF sources
For nrf54h20 a range of combinations exist to configure the test and
debug domains data sources and sinks. Expose them in DTS to allow
configuring them. Also drop the previous style which was too rigid to
extend to cover all cases cleanly. The old style was only used in a
single sample application so far.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2024-09-25 12:00:04 +01:00
Reto Schneider
d14fe911d9 dts: arm: renesas: rz: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x80280000) don't match for
> /soc/sckcr@81280004

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-25 12:59:21 +02:00
Reto Schneider
47ea5e35ce boards: renesas: da14695: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x82000) don't match for
> /soc/flash-controller@38000000/flash@16000000/partitions/partition@80000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-25 12:59:21 +02:00
Reto Schneider
056b84add9 boards: renesas: da1469x: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x82000) don't match for
> /soc/flash-controller@38000000/flash@16000000/partitions/partition@80000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-25 12:59:21 +02:00
Luca Burelli
5ec5f24081 llext: test exporting DT devices to extensions
Add a new test to the simple llext test suite that verifies that DT
devices are properly exported to extensions. This is done by obtaining a
device handle from the DT and then trying to get the same handle at
runtime using the device_get_binding() API.

This test is optional because the current qemu_xtensa platform does not
have any usable DT devices to test with.

The LLEXT heap size is also increased to 64 kbytes to avoid heap
exhaustion when running the new test on mps2_an385.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
db451f2c46 llext: export DT devices to extensions
This change adds a new configuration option, LLEXT_EXPORT_DEVICES, which
enables exporting all devices defined in the device tree to llext
extensions. When enabled, all devices are made available to extensions
via the standard DT_ / DEVICE_* macros.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
38722ecbcf llext: add wrapper to EXPORT_SYMBOL / LL_EXTENSION_SYMBOL
This patch adds an indirection level moving the current code from inside
the EXPORT_SYMBOL and LL_EXTENSION_SYMBOL macros to private Z_* macros.
This is done to allow for the official APIs to properly expand more
complex arguments, such as the DT function-like macros.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
ca5f24e713 device.h: fix misleading comment
The comment for Z_DEVICE_DT_DEV_ID() is misleading: device_get_binding()
compares its inputs with values generated by the DEVICE_DT_NAME() macro,
which expands to the node's DT label or to the node's full name.

This patch updates the comment to reflect the actual behavior of
Z_DEVICE_DT_DEV_ID().

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
811330bd83 device.h: fix bad error message for Z_DEVICE_NAME_CHECK
The error message for Z_DEVICE_NAME_CHECK was needlessly calling
DEVICE_NAME_GET() on the "name" string, resulting in a confusing message
being displayed.

Remove the DEVICE_NAME_GET call so that the error message shown by the
compiler contains the actual name.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Johann Fischer
ef784cd3fd boards: remove test feature usb_cdc and usb
These test features are not required and are not used in any USB samples
or tests.

Follow-up on commit 0809b75b42 ("boards: remove test feature usb_cdc")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-25 12:59:04 +02:00
Burak Gorduk
6e3c3f67e1 bluetooth: host: Use consistent API naming for CS
This change adds bt_le_cs prefix to public CS API as well as
adding le_cs prefix to CS related bt_conn callbacks. This is
to ensure consistency within CS API while maintaining the
separation between the Bluetooth LE and Classic features.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-09-25 12:58:51 +02:00
Burak Gorduk
7b82214d29 bluetooth: host: HCI support for CS configuration
Adds following HCI support for CS configuration:
- LE CS Create Config command
- LE CS Remove Config command
- LE CS Config Complete event

Two callbacks have been added to notify the application
when a new CS configuration is created or an existing
CS configuration is removed.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-09-25 12:58:51 +02:00
Abderrahmane Jarmouni
3a9215a54e tests: drivers: dma: loop_transfer: add stm32h750b_dk config
Run test on stm32h750b_dk board

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-25 12:58:36 +02:00
Babak Arisian
d8c1d4d7b6 Bluetooth: Host: BT scan failure when connecting by name in shell
Added a timeout for active scans (instead of using the host's scan
timeout) in the shell by submitting a k_work that stops the scan
after a specified period.

Fixes #78659

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-09-25 12:58:11 +02:00
Valerio Setti
a913c9f2e3 tests: tls_configurations: remove tests on native/64 platform
Since the same test might be run in parallel on different platforms,
the one that it's started later will fail due to port re-use for
the OpenSSL server.
Since it's not really required to run the tests on native_sim and
native_sim/native/64, the latter is removed in order to solve this
problem.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-25 12:58:04 +02:00
Jonathan Rico
ce31d21870 MAINTAINERS: Add alwa-nordic as Bluetooth maintainer
He will be taking over my duties.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-09-25 12:57:53 +02:00
Jonathan Rico
85414f05e1 MAINTAINERS: Remove myself from Bluetooth
This is my final week at Nordic. My future job will not involve me
maintaining the Bluetooth host.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-25 12:57:53 +02:00
Emil Gydesen
aa1e7db6ed MAINTAINERS: Add kruithofa as collaborator for BT ISO
Added kruithofa as a collaborator as they are familiar
with ISO and we should have at least 2 collaborators
to perform reviews.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-25 12:57:45 +02:00
McAtee Maxwell (CSS ICW SW MTO INT 2)
a4d9bb4545 Boards: cyw20829: Added jlink as potential runner for board
- Add jlink as possible runner for cyw920829m2evk_02 platform in
	  board.cmake file

Signed-off-by: McAtee Maxwell (CSS ICW SW MTO INT 2) <maxwell.mcatee@infineon.com>
2024-09-25 04:05:37 -04:00
Quy Tran
5abacb2323 dts: renesas: change interrupt number of flash node
Change the interrupt number of flash in device tree due to duplication
And disable CONFIG_FLASH as default

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-25 04:05:23 -04:00
Olivier Lesage
7538a981c9 bluetooth: host: set BT_BUF_EVT_RX_SIZE to 255 when CS is enabled
Channel sounding frequently produces very large events, so the default
of 68 bytes can lead to buffer overruns / memory corruption.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-25 04:05:14 -04:00
Declan Snyder
b29190c314 drivers: nxp_enet: Fix tx error handling
The code path for error handling and timestamping in tx path
was meant to be identical in function to old eth_mcux driver,
but there is actually a discrepancy causing no error handling
for timestamped frames, fix it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-25 04:05:07 -04:00
Andrej Butok
9abc17b034 boards: nxp: mimxrt1170_evk: Delete redundant Kconfig.sysbuild
Remove unnecessary Kconfig.sysbuild for mimxrt1170_evk
as MCUBOOT_MODE_SWAP_WITHOUT_SCRATCH is set by default without it.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-25 04:04:55 -04:00
Emil Gydesen
390528101a test: Bluetooth: ext_adv_scanner: Fix bad use of adv_type
The adv_type is not a bitfield but was used as such.
Changed to do a proper comparison.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-25 04:04:46 -04:00
Emil Gydesen
4efe5d3210 samples: Bluetooth: ext_adv_scanner: Fix bad use of adv_type
The adv_type is not a bitfield but was used as such.
Changed to do a proper comparison.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-25 04:04:46 -04:00
Alberto Escolar Piedras
4f152b2a81 tests/ztest: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
6593f2b696 tests/subsys/usb: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
78286ffcba tests/subsys/testsuite/fff_fake_contexts: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
83f1e0c4b8 tests/subsys/storage: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
5195c6901d tests/subsys/shell: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
1aa93c8586 tests/subsys/settings: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
fe076e7556 tests/subsys/pm: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
c3f83dd883 tests/subsys/modem: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
fa1b3c56c7 tests/subsys/mgmt: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
89fa12d066 tests/subsys/mem_mgmt: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
2ef3ac724c tests/subsys/logging: Don't test on native_posix
native_posix is now deprecated.
So let's make sure we test in native_sim instead of native_posix..

Also, building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
fc87d05b15 tests/subsys/input: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
aedafdf19b tests/subsys/fs: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
a848f7d1b2 tests/subsys/emul: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
0bef883cc3 tests/subsys/dfu: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
38c8c7c3f9 tests/subsys/debug/mipi_stp_decoder: Switch from native_posix to native_sim
native_posix is now deprecated.
Let's use native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
9380f61f26 tests/subsys/debug/cs_trace_defmt: Switch from native_posix to native_sim
native_posix is now deprecated.
Let's use native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
24696aec43 tests/subsys/bindesc: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
9666e7c638 tests/net: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
41a92ec42e tests/misc/check_init_priorities: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
32283c0049 tests/lib/mpsc_pbuf: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
1b675e48f0 tests/lib/gui/lvgl: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
582f9711ba tests/lib/devicetree: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
b01c3e31ef tests/lib/cmsis_dsp: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
2db8f09a19 tests/drivers/smbus: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
7e615d05ef tests/drivers/regulator: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
6a1da30771 tests/drivers/pinctrl: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
bd8d8db0f5 tests/drivers/gnss: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
614d40a890 tests/drivers/fuel_gauge: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
28ae294f5c tests/drivers/eeprom/api: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
081c3638e1 tests/drivers/build_all: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Note: Some drivers tests for which there is native specific driver
which will or may be built differently in native_sim and native_posix
have been left enabled for native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
98ac30d1c5 tests/drivers/adc/adc_emul: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
7b0fa45300 tests/crypto: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
d50a306400 tests/cmake/snippets: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
66a70a2ffd tests/bluetooth: Don't test on native_posix
native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
833f7da7ee scripts/tests/twister_blackbox: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
13a986d63a tests/bluetooth/shell: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Also let's remove a few redundant test platform filters

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
28a0023495 samples/subsys/zbus/remote_mock: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
0503bef030 samples/subsys/zbus/benchmark: Switch from native_posix to native_sim
native_posix is now deprecated. Let's switch the filter and build
checks to native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
4e93fa6252 samples/subsys/tracing: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
bf37b58c00 samples/subsys/testsuite/pytest: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
a82f499753 samples/subsys/settings: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
1ffdb14200 samples/subsys/pm/*: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
ab5477be27 samples/subsys/fs/*: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
93ec96d0bc samples/net: Remove redundant exclude filters
native_posix is already filtered in the common
part. No need to remove it also per test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
d9aae58f80 samples/net: Don't test on native_posix
native_posix is now deprecated.
Building these samples in both native_sim and native_posix
does not improve coverage for these samples but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Alberto Escolar Piedras
1a5ff2cee2 samples/bluetooth/hap_ha: Don't test on native_posix
native_posix is now deprecated.
Building this sample in both native_sim and native_posix
does not improve coverage for the sample but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-25 04:04:36 -04:00
Sylvio Alves
5fc3f56125 drivers: counter: esp32: disable timer before int clear
Make sure to stop timer counter before interrupt is cleared,
otherwise it might re-trigger it due to default interrupt level mode.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-25 04:04:26 -04:00
Ryan McClelland
bc3390111e drivers: i3c: shell: add helper function to parse args
There is a lot of repeated code for parsing arguments. Add a function
to do the same in every place.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:04:13 -04:00
Ryan McClelland
e602590931 drivers: i3c: add iterate through i3c/i2c devices macros
Add i3c_bus_for_each_i3cdev and i3c_bus_for_each_i2cdev to more easily
iterate through each i3c or i2c device on the bus.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:04:13 -04:00
Ryan McClelland
ffb60c08e9 tests: drivers: i3c: add build of i3c_shell.c
Include the i3c shell when building an i3c driver.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:04:13 -04:00
Alexander Kozhinov
0f576b047f copyright: change email
Change my email copyright address since unavailability of old one

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-09-25 04:04:03 -04:00
Abderrahmane Jarmouni
e71b50244e drivers: dma: stm32_bdma: fix comments
Some comments were not updated following the change in how uncached
memory regions are defined in devicetree.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-25 04:03:18 -04:00
Ryan McClelland
32f0a15486 drivers: i3c: shell: add ccc rstact shell command
Add a shell command for rstact format 2 and 3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:03:04 -04:00
Ryan McClelland
e20b556fb4 drivers: i3c: add rstact format 2 and 3 helpers
Add rstact direct write and direct read formats helper functions.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:03:04 -04:00
Lyle Zhu
18d1ca7c78 Bluetooth: classic: Fix LE LTK cannot be derived issue
In the handler of SMP_Pairing rsp, the encryption key
flag is cleared incorrectly.

It causes the LE LTK cannot be derived.

Do not modify the encryption key flag to fix the
issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-09-25 04:02:11 -04:00
Jeppe Odgaard
bb88d5f1f1 drivers: pwm: pwm_stm32: remove capture overflow log err
The `LOG_ERR` will spam the log if the window is low e.g. 1 ms.
Also the PWM capture callback will be called with an error, which allows
handling and logging the error if desired.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-25 04:01:59 -04:00
Florian Grandel
f2d6c74875 net: net_pkt: remove deprecated functions for v4.0
Removes deprecated functions net_pkt_txtime() and net_pkt_set_txtime().

See: #76943

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-25 04:01:46 -04:00
Yangbo Lu
6fe7f6c55d net: lib: http_server: fix snprintk issue of size_t
The size_t type may vary from machines. Current snprintk code was
causing below build issue on arm64.

error: format '%x' expects argument of type 'unsigned int', but argument
4 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=].

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-25 04:00:02 -04:00
Fin Maaß
99e6280d7e logging: log_output: timestamp_print uses gmtime_r, a POSIX function
Define _POSIX_C_SOURCE for this file to make sure gmtime_r is visible.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Fin Maaß
1d91d0f269 logging: log_output: switch to gmtime_r
switch from gmtime() to gmtime_r().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Fin Maaß
9ab8eee875 tests: logging: log_output: add cases for timestamps
add cases for the different timestamp formats.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Fin Maaß
54b2f56984 logging: add ISO 8601 formated timestamp
add ISO 8601 formated timestamp for logging.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Fin Maaß
20a6ad7918 logging: add formated timestamp for realtime
This adds a timestamp format mode, that includes the date, which is
usefull, when using realtime for the logging timestamp.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Fin Maaß
683ae11510 logging: net: don't replace syslog timestamp
this way CONFIG_LOG_OUTPUT_FORMAT_CUSTOM_TIMESTAMP
only uses the custom timestamps for
logs that are not send via syslog.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-24 14:29:02 -05:00
Erwan Gouriou
3b697a29a2 soc: st: common: Simplify DBGMCU clock control flow
DBGMCU clock handling was not optimal.
If it exists, enable it before dealing with debug configuration in one
block, then deactivate it after in another block.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-24 14:28:11 -05:00
Erwan Gouriou
6840b58208 soc: st: common: Enable debug in sleep mode on H7
Similarly to debug in stop mode, enable debug in sleep mode on H7 series,
as initially described by `STM32_ENABLE_DEBUG_SLEEP_STOP` option.

Not extending it further to other series as I won't be able to test.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>

# Conflicts:
#	soc/st/stm32/common/soc_config.c
2024-09-24 14:28:11 -05:00
Erwan Gouriou
004a540063 soc: stm32: common: Fix use of legacy HAL API for debug config
HAL_Enable/DisableDBGStopMode() was one of the last usage of HAL
definitions from Legacy HAL APIs.
Use LL instead to harmonize code across series and remove this dependency.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-24 14:28:11 -05:00
Tom Burdick
09d600e442 llext: Add cmake/llext-edk.cmake to LLEXT area
This file should be assigned to LLEXT maintainers as it is LLEXT
specific.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-24 14:27:34 -05:00
Henrik Brix Andersen
16b39e8a03 scripts: west: commands: completion: add twister --log-level completion
Add bash tab-completion for for the newly introduced "west twister
--log-level" arguments.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-09-24 14:27:03 -05:00
Declan Snyder
a91be9d297 MAINTAINERS: Fix NXP MPU DTS path assignment
DTS files for the application core IMX MPUs should
fall under the NXP MPU area, not MCU.

Also, remove myself from NXP MPU area.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-24 14:26:19 -05:00
David Leach
2d17cec63d MAINTAINERS: Add ngphibang as collaborator in Drivers: Video
Adding Phi Bang Nguyen (ngphibang) as collaborator in Drivers: Video.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-09-24 14:25:47 -05:00
Dong Wang
83700963df west.yml: Update hal_intel with a fix on gpio driver
Make chagne to correctly identify both edge triggered gpio pins.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-09-24 14:25:08 -05:00
Carson Green
f698fd525e drivers: dma: stm32: only clear busy flag when transfer is complete
The STM32 DMA driver can provide interrupts for transfers not yet complete.

However, the current implementation will clear the busy flag for all
interrupts when CONFIG_DMAMUX_STM32 is not enabled. The previous fix for
when CONFIG_DMAMUX_STM32 is enabled should also apply when not enabled.
Also if CONFIG_DMAMUX_STM32 is enabled busy flag will not be cleared when
error interrupts occur.

With this change, the busy flag is only cleared when completion interrupts
in non-cyclic mode or error interrupts occur. These are the cases where
transfer will not continue.

Signed-off-by: Carson Green <cgreen@tuta.com>
2024-09-24 14:24:28 -05:00
Phi Bang Nguyen
41034d06c5 samples: video: capture: Get and enumerate frame rate
Add code to get the current frame rate and enumerate all supported frame
rates (frame intervals) of the current format.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-09-24 14:23:56 -05:00
Phi Bang Nguyen
16fc8f84fc drivers: video_sw_generator: Add support to change frame rate
Add code to to set / get / enumerate frame rates (intervals).

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-09-24 14:23:56 -05:00
Phi Bang Nguyen
0cbaea0d7e include: video: Add frame interval APIs
Add set/get/enum frame intervals APIs to support frame rate changing.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-09-24 14:23:56 -05:00
Fabrice DJIATSA
73cc021a13 dts: bindings: dma: Update stm32-dma-v1.yaml with macros
add macros in the description values and update an example

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-24 14:20:46 -05:00
Fabrice DJIATSA
5cea74dde5 include: zephyr: dt-bindings: dma: add macros for DMA V1 15th bit
unlike dma v2 binding where bit 15 is reserved, dma v1 binding
needs to configure the the DMA peripheral increment offset.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-24 14:20:46 -05:00
Emil Gydesen
1406c547d6 Bluetooth: TBS: Add support for dynamic TBS
The TBS and GTBS instances can now be dynamically registered
and unregistered, which fits better for the use cases of TBS
where specific bearers can come and go depending on the
features of the device.

For example if a SIM card is inserted, then a device can
register a TBS for the provider and remove it again if the
SIM card is removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:21:54 -04:00
Emil Gydesen
c0f71e9125 samples: Bluetooth: Audio: Add/fix API includes and references
Update the includes for Bluetooth Audio samples so they
properly include what they use.

The includes are then used to determine which relevant APIs
to refer to in the READMEs.

Finally improve the naming and description of the samples
using the Profile names and role.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:21:40 -04:00
Mahesh Mahadevan
f1b57f6d8a drivers: i3c: Move clocking code out of NXP I3C driver
The clocking code present inside the NXP I3C is SoC specific.
This has been moved to the SoC folder which makes this driver
more flexible to clock architecture variations between SoC's
and SDK driver clock API variations.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-24 09:21:28 -04:00
Mahesh Mahadevan
e14c4f4dc2 soc: nxp: Add code to set I3C divider
Update RT5xx and RT6xx clock init to add the code
to set the I3C dividers. This code has been moved
from the I3C driver.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-24 09:21:28 -04:00
Emil Gydesen
bf897cf941 Bluetooth: Shell: Restructure shell files
Moves around the shell files so that they are placed nearer
to the features they expose access to.

A few changes as possible has been made.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:21:04 -04:00
Carlo Kirchmeier
cb304318df net: dns: Improve interface count mismatch warning
In order to reduce confusion regarding interface count
the respective warning was adjusted to better reflect
the actual state of the system.

Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier@zuehlke.com>
2024-09-24 09:20:48 -04:00
Emil Gydesen
7c35286678 Bluetooth: BAS: Fix bad use of kconfig_dep
The kconfig_dep keyword was missing the `@`.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:20:35 -04:00
Anas Nashif
caf81647fc manifest: update SOF revision
Fixes SoC rename and twister platform_allow in sample.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-24 09:20:01 -04:00
Anas Nashif
cb02d090bf soc: intel_adsp: rename missing file during compilation
Fix renaming of file during refactoring of SoC.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-24 09:20:01 -04:00
Declan Snyder
45727b5fe1 manifest: Update NXP HAL to fix MCX flash driver
Fix the flash driver header for MCXA and MCXN not being included
correctly in the hal.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-24 10:13:50 +02:00
Guillaume Gautier
7e160453e2 drivers: adc: stm32: fix stm32u5 extended calibration
Add Data Memory Barrier during the extended calibration of STM32U5, as it
is done in STM32Cube HAL, to avoid sporadic errors during calibration that
may result in measures that are offset from real values.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-09-24 10:12:26 +02:00
Jukka Rissanen
00bb90a42e net: if: Check chksum offloading properly for VLAN interfaces
Make sure we check the checksum offloading capabilities correctly
for VLAN interfaces. Use the real Ethernet interface when doing the
check.

Fixes #78724

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-24 10:11:33 +02:00
Jakub Michalski
e75316b11a arch: x86_64: re-enable -mno-red-zone
Red zone was causing issues in places where inline assembly was pushing
data to stack, like arch_irq_lock, and possibly in other places.
Initially -mno-red-zone was enabled on x86_64, but was later, maybe
accidentially, disabled in https://github.com/zephyrproject-rtos/zephyr/
commit/b7eb04b3007767be9febe677924918d2422a4406

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-24 10:11:15 +02:00
Grzegorz Bernat
a654bfbdfa soc: intel: renamed soc from ace30_ptl to ace30
Renamed soc from ace30_ptl to ace30.
We were previously using the wrong soc name.
The correct name is ace30.

There is only one ptl platform, but there can be several ace30 platforms.

Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
2024-09-24 10:10:37 +02:00
Grzegorz Bernat
966abb2f57 soc: intel: Fix problems with the formatter
No functional changes were made in this update.
Only code formatting issues were corrected.

This commit is necessary to preserve Git history
continuity for future changes involving the switch from ace30_ptl to ace30.

Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
2024-09-24 10:10:37 +02:00
Lauren Murphy
e0bd9aef66 drivers: sensor: add mmc56x3 sensor driver
Adds Memsic MMC56X3 magnetometer and temperature
sensor driver.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-24 10:09:25 +02:00
Lauren Murphy
3a595610e6 drivers: sensors: move mc3419 into parent memsic folder
Moves MC3419 into a parent Memsic folder, to be joined
later by MMC56X3.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-24 10:09:25 +02:00
Anas Nashif
810f978bed Revert parts of "soc: intel: move init code from SYS_INIT to hooks"
This reverts parts of commit c344771d8b
related to intel_adsp soc.

There is a dependency on device initialization that was missed.

Reverting until we have a proper way for migrating to hooks.

Fixes #78880

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-23 18:13:17 -04:00
Lucas Tamborrino
43cc36f4bc drivers: video: Add SMH option for video buffer
This commit enables the user to choose whether to
allocate the video buffer from the video heap pool
or use a memory region with specific extra capabilities,
such as being cacheable/non-cacheable or using external
memory.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-09-23 18:12:20 -04:00
Furkan Akkiz
679547495b tests: drivers: pwm: Add MAX32662EVKIT overlay file
Enable PWM test for MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
f1e7eb1c0e boards: arm: adi: Add pwm in MAX32662EVKIT board driver list
Add pwm in 'index.rst' and '.yaml' file of MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
ee2a48e310 tests: drivers: pwm: Add MAX32675EVKIT overlay file
Enable PWM test for MAX32675EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
af10949909 boards: arm: adi: Add PWM to MAX32675EVKIT board driver list
Add PWM into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
e3bb2f1098 tests: drivers: pwm: Add MAX32672 boards overlay file
Enable PWM test for MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
c26c52f3b1 boards: arm: adi: Add pwm in MAX32672 boards driver list
Add pwm in 'index.rst' and '.yaml' file of MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
3b75e9e042 tests: drivers: pwm: Add MAX32670EVKIT overlay file
Enable PWM test for MAX32670EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Mert Ekren
551706e12c boards: arm: adi: Add PWM to MAX32670EVKIT board driver list
Add PWM into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
886319d3f2 tests: drivers: pwm: Add MAX32690EVKIT overlay file
Enable PWM test for MAX32690EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Furkan Akkiz
0650317fec boards: arm: adi: Add pwm in MAX32690EVKIT board driver list
Add pwm in 'index.rst' and '.yaml' file of MAX32690EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
e315ae12bb tests: drivers: pwm: Add MAX32666 board overlay files
Add MAX32666FTHR and MAX32666EVKIT pwm overlay file

Co-authored-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
190b2183f8 boards: arm: adi: Add pwm in MAX32666 board driver list
PWM added in MAX32666EVKIT and MAX32666FTHR boards file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
95a73023ab tests: drivers: pwm: Add MAX32655 board overlay files
Add MAX32655EVKIT and MAX32655FTHR pwm overlay file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
e781544c04 boards: arm: adi: Add pwm in MAX32655 board driver list
PWM added in MAX32655EVKIT and MAX32655FTHR boards file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
0dcadcd99f dts: arm: adi: Add PWM sub node to MAX32xxx
Add pwm yml file.
TIMER0/1/2/3 support pwm, LPTIMER0/1 not.
LPTIMER0/1 provide 16bits out that not meet pwm requirement.

Co-authored-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Sadik Ozer
18c991acc4 drivers: pwm: Add MAX32xxx PWM driver
Common pwm driver for MAX32xxx MCUs

Co-authored-by: Mert Ekren <mert.ekren@analog.com>
Co-authored-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-23 18:12:00 -04:00
Mateusz Kapala
cef42d5645 samples: subsys: mgmt: mcumgr: smp_svr: Use SMP_BT_SVC_UUID_VAL define
Used the SMP_BT_SVC_UUID_VAL define exposed in the smp_bt header
in the smp_svr sample instead of hardcoding its value.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2024-09-23 18:10:49 -04:00
Mateusz Kapala
77555898de mgmt: mcumgr: Add SMP SVC and CHR UUIDs to header
Added the SMP service and characteristic UUIDs to the smp_bt module
header and used those definitions.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2024-09-23 18:10:49 -04:00
Nicolas Pitre
66853f4307 x86: add support for on-demand mappings
This makes x86 compatible with K_MEM_MAP_UNPAGED.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-23 18:10:38 -04:00
Fabio Baltieri
56dcafece8 cmake: use the warnings_as_errors flag for cpp files
C++ file compilation is actually missing the warning-as-error handling,
causing warnings in build files to be unnoticed in CI. Add a flag to
handle them as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
1a2d74adab device_mmio: use explicit unsigned literals for addresses
Add an explicit unsigned literal suffix (U) for addresses obtained from
devicetree, this is to work around a specific warning:

zephyrproject/zephyr/include/zephyr/arch/arm/cortex_a_r/timer.h:40:2:
warning: this decimal constant is unsigned only in ISO C90

When compling

west build -p -b qemu_cortex_a9 -T tests/lib/cpp/cxx/cpp.main.cpp98

Argueably all devicetree addresses and sizes should be unsigned but this
is enough to make CI pass, may look into changing the device.h macro as
a followup.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
e428a52a28 tests: i2c_emul: drop the array designators
Drop the array dasignators as they generate a

warning: array designators are a C99 extension

warning when compiling with clang. Not too sure if this is an actual
problem or if the warning should be disabled instead but since it's just
a test it should be fine to just drop them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
b094167114 tests: cpp: add a pm device reference
On some architecture (qemu_x86) this tests generate an unused reference
warning for the PM device structure, as nothing in the structure macro
definition is referencing itself.

Reference the struct in the device define, keep the compiler happy.

Also change one of the device priority to dodge a

'__device_dts_ord_8' causes a section type conflict with
'__device_dts_ord_9'

error with llvm.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
c51df533b5 tests: i2c_emul: fix sign comparison warning
Fix the compiler error:

comparison of integer expressions of different signedness: ‘const int’
and ‘unsigned int’

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
068ed1851b mspi: add a dummy byte to struct mspi_timing_cfg
Add a dummy byte to struct mspi_timing_cfg, for C++ compatibility, same
as what's done in include/zephyr/arch/structs.h,
include/zephyr/arch/arm/structs.h, include/zephyr/kernel/thread.h and
others.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
23f37a5901 tests: lib: cbprintf_package: fix compiler warning
Fix a type mismatch compiler warning in the c++ tests.

Signed-off-by: Yuval Peress <peress@google.com>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Jacob Winther
dcc1d0e49c boards: nrf52840 common uf2 partition
Common uf2 partition configurations to avoid duplication in boards.

There appears to be a bit of confusion about exactly what a proper
UF2 partition map looks like for the nrf52840, so common dts
configurations should help to avoid confusion.

Configuration for SoftDevice v6 and v7 provided as thats what was
fouond in use in tree already.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-23 18:10:08 -04:00
Pieter De Gendt
0d95e2e9e8 clang-format: add more whitespace sensitive macros
An issue with some macros is that a space is added to conditional
expansions. Prevent some of these macros to get formatted.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-23 18:09:53 -04:00
Jamie McCrae
44973d8974 boards: enclustra: mercury_xu: Do not select PINCTRL
This should not be selected by boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 18:09:38 -04:00
Jamie McCrae
cc8d646987 boards: digilent: zybo: Do not select PINCTRL
This should not be selected by boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 18:09:38 -04:00
TOKITA Hiroshi
efc7c7dacc tests: build_all: sensor: add wsen-pads trigger
Add trigger support for wsen-pads build all sensor tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
8dce43bfc1 drivers: sensor: wsen: wsen_pads: Fix variable type mismatch
Fix to eliminate warnings caused by type mismatch.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
51c5f46f0e tests: build_all: sensor: add iis328dq trigger
Add trigger support for iis328dq build all sensor tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
TOKITA Hiroshi
90fb012db7 drivers: sensor: st: iis328dq: Avoiding declaring unused variables
Separating declarations of variables not referenced with #ifdef
when CONFIG_IIS328DQ_THRESHOLD is disabled.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 18:09:25 -04:00
Emil Gydesen
4e4971b25d Bluetooth: GATT: Fix issue with 0/NULL for bt_gatt_attr_read
The bt_gatt_attr_read function did not properly handle cases
where value is NULL and/or value_len is 0, or bad mixes of the
two.

The important part is here is that we do not perform the pointer
arithmetic on NULL and/or call memcpy with a NULL src with a
non-0 length.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 18:09:13 -04:00
Daniel Leung
b7541e8f1a west: update hal_xtensa to latest commit
This updates the hal_xtensa commit to latest, including:

* Adds intel_adsp_ace30_ptl SoC
* Adds sample_controller32 for MPU

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-23 18:08:45 -04:00
Raffael Rostagno
d392e9b345 drivers: mbox: esp32: IRQ priority and flags from dts
Get IRQ priority and flags from device tree, allowing for
custom configuration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-23 18:08:36 -04:00
Bill Waters
eb19d32588 drivers: Remove CONFIG_PINCTRL in defconfig files
The CONFIG_PINCTRL setting is removed from the board
_defconfig files.  And "select PINCTRL" is added to
the appropriate driver files.

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2024-09-23 18:08:14 -04:00
Derek Snell
11623eb1e4 soc: nxp: rt116x: Fix bus clocking
Reverts bus clock settings.  Follows MCUXpresso SDK clock settings, and
sets to output of SysPLL2 PFD3 at 198 MHz.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-09-23 18:07:59 -04:00
Declan Snyder
daa6d3a668 dts: nxp: Fix lpspi node names on mcxn
Spi bus controller node names should follow recommended naming
convention from DT spec otherwise DTC will report a warning.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-23 18:07:29 -04:00
Ioannis Damigos
ea50b18e37 doc: twister: Document binaries keyword under testing
Document binaries keyword under testing keyword
in board's yaml.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-09-23 18:06:39 -04:00
Armando Visconti
3508994ac6 boards: arm: sensortile_box_pro: add bluenrg-lp chip description
Extend sensortile_box_pro document adding BlueNRG-LP chip description.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-09-23 13:24:00 -05:00
TOKITA Hiroshi
aa23112828 tests: drivers: build_all: led: Add i2c devices build test
Add build tests for following devices.

- issi,is31fl3194
- issi,is31fl3216a
- issi,is31fl3733

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 13:23:28 -05:00
Fabian Blatz
11c83c80fc west: commands: runners: canopen: add download-buffer-size option
Adds a --download-buffer-size option to the canopen runner to allow
specifying the buffer size of the SDO download.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-23 13:21:52 -05:00
Martin Jäger
46922b51ce drivers: dac: dac_shell: consider buffered and internal options
The buffered and internal options were not assigned in the channel_cfg,
so they would end up at a random state.

The cfg struct is now properly zero-initialized and both options can
be set using optional parameters -b and -i.

Fixes #75884

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-09-23 13:21:11 -05:00
Gerard Marull-Paretas
bdad3fd17a doc: extensions: link-roles: missing module not critical
External projects building the documentation may not clone all modules, as
they have manifest filtering. Therefore, not having access to a module
should not produce a fatal documentation build error. Convert the error to
a debug log, so it is at least traced.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-23 13:20:41 -05:00
Jeroen Broersen
cf837dd371 drivers: gpio: stm32: keep track of clock enabling per pin
The driver enables the clock of a gpio-port if any of the
pins use the port. This is done by calling pm_device_runtime_get
when a pin is used and pm_device_runtime_put when the pin is not
used anymore.
These calls needs to be balanced. But if a single pin was configured
as GPIO_DISCONNECTED multiple times, every time pm_device_runtime_put
was called.
This caused the clock of the port to be stopped and therefore also
other pins on the same port stopped working.

This commit fixes this by keeping track of which pin on a port
has requested the clock and only call pm_device_runtime_get or
pm_device_runtime_put when the clock-request for the specific pin
changes.

Fixes #77698

Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
2024-09-23 13:20:23 -05:00
Dong Wang
f61b8f9fd2 tests/kernel/context: correct the way to get IRQ number of APIC TSC Timer
This case fails to build on boards having APIC TSC timer enabled.
This change is needed after moving APIC TSC timer support from
apic_timer.c to apic_tsc.c.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-09-23 14:10:27 +01:00
Jukka Rissanen
8aab3ca39d net: shell: Allow user to disable not used commands
User can set CONFIG_NET_SHELL_SHOW_DISABLED_COMMANDS=n to prevent
unused net-shell commands from showing. This can save flash as
the disabled commands will not be shown in net-shell listing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
9d9398f42d net: shell: iface: Add DHCPv6 status prints
It is useful to know the currect status of DHCPv6 client when
printing the interface information.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
e459191ace net: shell: dhcpv6: Add cmd to start/stop DHCPv6 client
Allow user to use the net-shell to start or stop DHCPv6 client.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
bc003db998 net: shell: dhcpv4: Add cmd to start/stop DHCPv4 client
Allow user to use the net-shell to start or stop DHCPv4 client.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Jukka Rissanen
7e4a2c6d46 net: shell: virtual: Add attach/detach commands
Allow "net virtual" command to attach or detach virtual
interfaces. This is useful for device management.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-23 14:10:15 +01:00
Yangbo Lu
21558df2c3 boards: nxp: imx95_evk: enable i2c5/i2c7 for M7
Enabled i2c5/i2c7 for M7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Yangbo Lu
abb475df09 boards: nxp: imx95_evk: add i2c5/i2c7 pinmux
Added i2c5/i2c7 pinmux in dtsi file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Yangbo Lu
e5f477064e dts: arm: nxp_imx95_m7: add all I2C device nodes
Added all I2C device nodes for nxp_imx95_m7.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-23 14:10:03 +01:00
Krzysztof Chruściński
701beecb5c drivers: serial: nrfx_uarte: Split async control block structure
Split async control block structure into tx and rx structures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-23 14:09:54 +01:00
Emil Gydesen
72829b3b77 Bluetooth: ISO: Added missing NULL checks for API functions
Add missing NULL check for public API function, so that the
function will return -EINVAL rather than crashing.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 14:08:52 +01:00
Arkadiusz Cholewinski
0b370bc4d5 Tests: Ztest_params fix.
- Add CONFIG_SHELL_PROMPT_UART to the prj.conf file.
- Ensure the ztest_params test is flashed/run only once per Pytest session.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-09-23 14:08:41 +01:00
Robert Lubos
c377017146 net: shell: Enable IPv4/6 and iface commands if NET_NATIVE is disabled
Some commands can be executed and some statuses can be printed even if
native IP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
4595295028 test: net: offloaded_netdev: Add tests for IPv4/6 address registration
Make sure it's possible to register IPv4/6 addresses on an offloaded
interface. Add an extra build configuration to make sure it's also
possible when native IP stack is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
8d296ba8fe net: iface: Don't require native networking to register IP address
It shouldn't be needed to enable native networking to be able to
add/delete IP addresses on network interfaces.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Robert Lubos
5d085b49a9 net: ipv4: Make native IPv4 options dependent on NET_NATIVE_IPV4
IPv4 Kconfig options which only affect native IPv4 stack should be
dependent on NET_NATIVE_IPV4, similarly as it's done for IPv6.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Jamie McCrae
ddad1e6fb0 mgmt: mcumgr: grp: os_mgmt: Fix invalid return
Fixes wrongly returning an SMP version 2 error code as an SMP
version 1 error code instead of adding it as an error

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 14:08:03 +01:00
Jamie McCrae
c6c00e13b8 mgmt: mcumgr: grp: os_mgmt: Allow bootloader info without MCUboot
Allows enabling the bootloader info functionality without MCUboot
being enabled, so that other bootloaders can add hooks with their
own responses

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-23 14:08:03 +01:00
Fabio Baltieri
61f4ba27ad drivers: i2c: add an option to skip auto-sending stop on last message
The I2C transfer API has been recently changed to always automatically
set a STOP on the last message, which was well documented but
implemented only by few drivers.

Unfortunately, while documented, this is a change in the current
behavior and it turns out that some applications depended on it for some
complex operations.

Add a flag to temporarily restore the old behavior, buying time to fix
the application code depending on this.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 14:07:49 +01:00
Matt Rodgers
93356447ad doc: http_server: Document response_ctx used for dynamic resources
Update documentation to describe the method of returning response data
to the HTTP server using the response_ctx callback parameter.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
bc9eee4286 tests: net: http_server: Add tests for long GET/POST data
Add test cases for dynamic GET/POST, where the payload is transferred
across more than one call to the dynamic resource callback.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
f2d8766b5d net: lib: http_server: remove dynamic resource data buffer
After introduction of struct http_response_ctx, the dynamic resource
data buffer is no longer needed for transferring data between the
application callback and the server. It is therefore removed to avoid
unnecessary copying of data.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
96061428e0 tests: http_server: add tests for dynamic response context
Add tests covering new method of providing a response for dynamic
resources.

Tests cover the application sending response codes and headers,
overriding "default" headers, and sending various combinations of
headers and body data. Each case is tested for HTTP1 & HTTP2, both POST
and GET methods.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
4cc905c513 net: lib: http_server: allow application to send headers/response code
Allow the application to send headers and response codes from a dynamic
resource callback by filling out a response context structure.

This also allows simple requests to be completed in a single execution
of the callback, by setting the final_chunk flag.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Stefan Petersen
f88784a7ff net: ipv6: Setting Router Solication Packet timeout
Running IPv6 on STM32H743 using eth_stm32_hal I had to extend
the timeout between the attempts to send Router Solicitation packets
from 1 second to 2 seconds. Else it looked liked the packet never
got sent (checked using tcpdump).

Signed-off-by: Stefan Petersen <spe@ciellt.se>
2024-09-23 12:00:35 +02:00
Benjamin Cabé
1db9b009a7 doc: samples: Adopt code-sample-category across tree
This commit uses the new .. zephyr:code-sample-category directive to
categorize code samples across the tree.
Updates existing legacy references to manually defined targets to now
use :zephyr:code-sample-category: role instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-23 12:00:00 +02:00
Benjamin Cabé
793c70d095 doc: extensions: samples: Introduce code sample categories
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes #62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-23 12:00:00 +02:00
Benjamin Cabé
3d7bb30103 doc: extensions: move Zephyr domain extension to dedicated package
move domain.py to domain/ to make it easier to keep things organized
and e.g. add dedicated css/js resources, etc.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-23 12:00:00 +02:00
Benjamin Cabé
a5b7349ab9 samples: doc: convert philosophers sample to code-sample directive
Adopt zephyr:code-sample directive to describe the Dining
Philosophers sample and update reference accordingly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-23 12:00:00 +02:00
Krzysztof Chruściński
ac1cc17ae9 dts: nordic: nrf-uarte: Add frame-timeout-supported property
Add property which indicates that UARTE support frame timeout
feature. Property is added to nrf54h20, nrf9280, nrf54l20 and
nrf54l15.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-23 10:04:25 +02:00
Emil Gydesen
7ef2f81413 Bluetooth: Audio: Add helpers for assisted listening stream
Added helper functions to set and get assisted listening
stream values for codec capabilities and codec configs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:03:47 +02:00
Michał Barnaś
b9ef11d4b4 usbc: add event-driven handling of CC lines changes in ps8815 driver
Add bool value that stores the CC change information received in
the interrupt of TCPC alert line. In sink role when in disconnected
state, polling the CC lines causes the chip to be awaken from sleep
mode increasing the power usage. When partner is connected, or any
other CC lines change happens, the chip informs about it with alert.
It can be cached and used instead of asking the chip directly.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Michał Barnaś
82a6e9fc66 usbc: add TCPC driver for Parade PS8815 chip
Add support for the PS8815 and used with other PS8xxx family chips.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Michał Barnaś
90c65cffdb usbc: add support for vbus measurement using TCPCI compliant device
Add support for VBUS measuring part of the TCPCI compliant device.
This device should be used as a child-node for the more specific
TCPC driver and referenced by the vbus property in the usb-c
connector node.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Michał Barnaś
198e040b4e usbc: add generic TCPCI related functions
Add generic functions that will be common to all TCPCI compliant
drivers like registers reading, writing and updating.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Michał Barnaś
1e156564cd usbc: add definitions for TCPCI registers and fields
Add header file with registers and fields definitions compliant
to the Type-C Port Controller Interface Specification
Revision 2.0, Version 1.3.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Emil Gydesen
0fe97560a3 Bluetooth: BAP: Add validation of qos_pref
The QoS preference defined by ASCS has some specified
limits and values that we should enforce.

Given the current API we cannot return an error to the
unicast server if it supplies invalid values, so we have
to resort to a LOG_ERR.

For the unicast client we treat invalid QoS preferences
similar to other invalid data in the notifications.

This also adds additional documentation in the
bt_audio_codec_qos_pref struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:03:12 +02:00
Emil Gydesen
d578c598eb Samples: Bluetooth: CAP Acceptor broadcast support
Add broadcast support for the CAP acceptor sample.

This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.

The babblesim implemented for the broadcast has been expanded
to verify that the CAP acceptor receives the broadcast audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:02:58 +02:00
Fredrik Danebjer
2af4ae17a6 Bluetooth: audio: Fix shell available context
This fixes a bug where the shell will reject setting available
context to 0x0. This has now been moved to only affect supported
context instead.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-09-23 10:02:40 +02:00
Emil Gydesen
b800be3430 Bluetooth: BAP: Broadcast sync fail receive state bis sync value fixed
In the case that a broadcast sync fails for any reason, we need to
set the BIS_Sync value for all subgroups to 0xFFFFFFFF
(BT_BAP_BIS_SYNC_FAILED) as per the BAP spec.

This commit adds a new define for this and modifies
both the scan delegator and broadcast sink to support this.

The change is validated by a modification to the broadcast
assistant test that verifies that the value is set in the
case of an invalid broadcast code (which indicates a
failed BIG sync).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:02:33 +02:00
Abderrahmane Jarmouni
330abc4b95 boards: shields: st_b_lcd40_dsi1_mb1166: refactoring
Minimize code duplication chances when multiple boards will be added
eventually as supporting this shield.

Define an alias for board i2c node used by on-shield touch controller.

Move H747I-specific LVGL/display optimization options to a dedicated
defconfig file.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-23 10:02:23 +02:00
Fabrice DJIATSA
c386c7a00a tests: drivers: counter: counter_basic_api: boards: add ovarlay file
add nucleo_u083rc and stm32u083c_dk overlays files
for counter_api test purpose.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-23 10:02:16 +02:00
Fabrice DJIATSA
d2ddb6541d drivers: pwm: update stm32 pwm driver
add stm32u0x soc configuration to be able to
run test on new boards.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-23 10:02:16 +02:00
Fabrice DJIATSA
2756da31fe boards: st: add timers nodes in dts file and update docs
enable two timers(16 and 32 bits) in nucleo_u031r8
stm32u083c_dk and nucleo_u083rc.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-23 10:02:16 +02:00
Fabrice DJIATSA
ea70f82c18 dts: arm: st: u0: add timers nodes in dtsi file
all stm32u0 boards have the same 7 timers peripherals.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-23 10:02:16 +02:00
Michal Smola
1c944ba9ef drivers: adc: adc_mcux_adc16: Remove reference check
Only ADC_REF_INTERNAL reference option is allowed in
adc_mcux_adc16 driver, but the reference is not used
for driver configuration. Internal, external or VDD
can be used in reality depending on SoC type and
its configuration.
Remove the reference option check to allow any reference
option from Devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-23 10:02:10 +02:00
Naveen Gangadharan
27d5528174 drivers: i3c: cadence: fix tx_fifo width for target mode on REV_ID 1.7
Cadence I3C target FIFO width has been increased to 4 bytes in i3c
hardware REV_ID 1.7. Writing 1 byte to 4 byte FIFOs can cause
unintentional padding for bytes written from TX threshold interrupt
handler. Fixed the target callback to handle tx width of i3c target
writes to FIFO, by using run time rev_id check.

Signed-off-by: Naveen Gangadharan <naveeng1001@meta.com>
2024-09-23 10:02:01 +02:00
TOKITA Hiroshi
d0a9c065a4 tests: drivers: build_all: watchdog: Add i2c and spi devices build tests
Add build tests for following devices.

- nordic,npm6001-wdt
- nxp,fs26-wdog

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-23 10:01:54 +02:00
Daniel Flodin
746c59c82a arch: kernel: lib: toolchain: Standardize TLS keyword
Up until now, the `__thread` keyword has been used for declaring
variables as Thread local storage. However, `__thread` is a GNU
specific keyword which thus limits compatibility with other
toolchains (for instance IAR).

This PR intoduces a new macro `Z_THREAD_LOCAL` which expands to the
corresponding C11, C23 or C++11 standard keyword based on the standard
that is specified during compilation, else it uses the old `__thread`
keyword.

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
2024-09-23 10:01:48 +02:00
Chew Zeh Yang
62c0fc3e14 drivers: gpio_ambiq: Fixed uninitialized return variable
Fixed uninitialized return value variable issue, which would cause
functions to wrongly return non-zero value despite a successful
execution.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-09-23 10:01:40 +02:00
Yong Cong Sin
d250664dc7 bluetooth: host: fix formatter warnings
Update the string formatter according to the type of the
variables that it is printing to eliminate compilation
warnings.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-23 10:01:34 +02:00
Yong Cong Sin
e2310396d6 samples: shell_module: move login cmds into a separate file
Was getting compilation error due to `CONFIG_SHELL_CMD_ROOT`
not being defined whe building the sample under certain
configurations.

The `CONFIG_SHELL_CMD_ROOT` is defined and used only when
`CONFIG_SHELL_START_OBSCURED` is enabled, we can simply move
it to another file and rely on CMakeLists.txt to compile.

Run the `login_init` with `SYS_INIT` so that the `main()`
do not need to have knowledge of its existence.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-23 10:01:34 +02:00
Quy Tran
c17a8d3e84 drivers: i2c: change to use IRQ_CONNECT in Renesas RA i2c driver
Change to use IRQ_CONNECT instead of IRQ_DIRECT_CONNECT

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-23 10:01:26 +02:00
Grzegorz Swiderski
9d1b361265 cmake: Require Python >= 3.10
The minimum Python version was bumped for Zephyr LTSv3, but only in the
documentation and CI. The build system would still accept Python 3.8,
yet some scripts in tree have already broken support with that version.
Incompatibility errors should be prevented early.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-23 10:01:20 +02:00
Lukasz Mrugala
cbe5d9833b scripts: Remove wrong bz package
Package in the requirements-run-test.txt file, bz,
is not package enabling bz2 support.
It is a security concern and must be removed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-23 09:59:56 +02:00
David Demelier
e268b56699 docs: adi: Fix table rendering
Improper reStructuredText table syntax breaks rendering.

Signed-off-by: David Demelier <markand@malikania.fr>
2024-09-23 09:59:25 +02:00
Dmitrii Golovanov
4cc3134aa1 scripts: twister: Don't use match/case statements
Don't use match/case syntax to allow twister to run with
python3 versions < 3.10.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-21 12:24:05 +01:00
TOKITA Hiroshi
42020f202f tests: drivers: build_all: Add auxdisplay drivers test
Add build_all test for auxdisplay drivers.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:51 +01:00
TOKITA Hiroshi
923f47dd80 drivers: auxdisplay: Remove unused variables
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:51 +01:00
TOKITA Hiroshi
325d7df026 tests: drivers: build_all: led_strip: Add RaspberryPi Pico PIO driver
Add build tests for "worldsemi,ws2812_rpi_pico_pio" driver

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
TOKITA Hiroshi
945f9291c4 drivers: led_strip: tlc5971: Enable when the dt-node exists
The TLC5971_STRIP config enables if the "ti,tlc5971" node exists.
Also, removing the setting that explicitly enables in the
`tests/drivers/build_all/led_strip` test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
TOKITA Hiroshi
295078e8ec tests: drivers: build_all: led_strip: Add i2c-devices build test
Add build tests for following devices.

- apa,apa102
- greeled,lpd8806
- worldsemi,ws2812-spi

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
Yong Cong Sin
022041edba soc: riscv: andes_v5: fix PMA compilation warnings
These static functions in the `pma.c` are used only when
`CONFIG_NOCACHE_MEMORY` is enabled, so guard them accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-21 12:23:39 +01:00
Fabian Blatz
7e2337a1b7 drivers: stepper: shell: Add test for stepper shell
Adds a basic test suite for the stepper shell commands.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Fabian Blatz
c525dc0813 drivers: stepper: Add fake stepper driver
Add `zephyr,fake-stepper` compatible which can be used inside of unit
tests.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Fabian Blatz
c694858d06 drivers: stepper: add stepper shell
Add shell commands to enable/disable, move, set velocity, configure
micro-step resolution, and display stepper motor status. Includes an
`info` command to output all relevant data with graceful handling of
unsupported features.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Marek Matej
7aa710287b samples: wifi: ESP32-S2 sample configuration
Remove the system heap override config from the board sample config.
Remove the memory saving restrictions.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
548131476e boards: espressif: Update system heap increment
Remove the system heap increment based on used parts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
a1c4552ea9 soc: esp32c6: Add runtime heap symbols
Update the linker scripts to provide necessary symbols.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
bf2c67c441 soc: esp32c2: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Update the ROM-code SRAM usage according the IDF main.
Fix static allocations size check.
Increase iram_seg memory size for MCUboot.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
2683774265 soc: esp32c3: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocations size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
13a59fb855 soc: esp32s3: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocations size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
3784beb6cc soc: esp32s2: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix the loader ROM buffers start address.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
94731488e7 soc: esp32: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
15d0189d3e soc: espressif: Introduce runtime heap mempool
Add the `CONFIG_ESP_RUNTIME_HEAP` kconfig.
This allows the memory pool to be created starting
at `z_mapped_end` ending at `_heap_sentry`.

Added choice symbol ESP_WIFI_HEAP_* to select which
heap to use in the ESP WiFi adapter module.

Add file heap.c with code to initialize the runtime heap.
Size of the pool is checked during the runtime.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej
e05d3ba661 manifest: update hal_espressif
Get latest necessary changes to support the following changes.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Daniel Leung
2c551554e2 riscv: support dumping privilege stack during coredump
Adds some bits to enable dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
4c5e33b2c2 soc: cdns/dc233c: advertise coredump with privilege stack
This lets the SoC to select the correct kconfigs to show that
it supports coredump, and with the ability to dump privilege
stack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
efb2a354a0 xtensa: coredump: support dumping privilege stack
Adds the bits to support dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
a3f4251ed5 x86: coredump: support dumping privilege stack
Adds the bits to support dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
71bea33894 tests: debug/coredump: crash from user thread if userspace
Modify the test to spawn a user thread if it is running
with userspace enabled. This allows testing coredump when
the crashing thread is a user thread.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
4f52860fe0 debug: coredump: dump privileged stack
This adds the bits to call into architecture code to dump
the privileged stack for user threads.

The weak implementation is simply there as a stub until
all architectures have implemented the associated function.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung
f5163d8940 arch: add interface to dump privileged stack in coredump
This adds a interface to allow coredump to dump privileged
stack which is defined in architecture specific way.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Emil Gydesen
e1e4f2a2af Bluetooth: Host: Set scan option type to uint8_t
Changed the scan option type from uint32_t to
uint8_t.

There are 2 reasons for this:
1) This reduces the size of the struct bt_le_scan_param.
   Since we are now storing two copies of scan parameters
   statically in the host, this is not insignficant.
2) This fixes a "hole" in the struct. There are no longer
   3 empty octets between the `type` and the `options`, which
   caused valgrind warnings when using `memcpy` and `memcmp`
   of the struct.

Currently we only need 8 bits for the options available.
If additional options are added later, the field need
to be increased. For the above reasons some additional
refactoring my be required to avoid significant size
increases and the valgrind issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-21 11:29:21 +02:00
Anas Nashif
f08c91a7e4 soc: stm32g4x/stm32l0x: fix soc hook calls
Missed 2 places related to power management.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-21 11:29:06 +02:00
Anas Nashif
3eded9d10d soc: intel_ish: remove duplicate hook
Remove duplicate hook and fold power code into the same early soc hook.

Fixes #78776

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-21 11:29:06 +02:00
David Brown
c3438903d2 github: workflows: Add cargo support to twister
Add cargo's bin to the path, and print out the versioning of the tool to
make it easy to ensure the right version has been installed.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-20 15:25:05 -05:00
Emilio Benavente
63308c5f13 tests: drivers: dma: Enabled DMA Tests for MIMXRT1010_EVK
The Buffer data was being stored in cacheable memory for
the MIMXRT1010_EVK, the caching is not handle in these
test and cause mimxrt1010 to fail, this commit moves the
memory region to DTCM and in some cases lowers the size
of the DATA Buffer since it won't fit in DTCM for MIMXRT1010_EVK

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-09-20 15:23:58 -05:00
Chekhov Ma
c93a5de3ae drivers: mcux_igpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Chekhov Ma
a296705d37 drivers: mcux_rgpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Felipe Neves
2aa7cb5a7c samples: drivers: video: add arduino nicla vision
As supported board to the video capture sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Felipe Neves
591b7d380b drivers: video: gc2145: add resolution support
Add VGA and QVGA resolution support to enable
usage of gc2145 sensor by smaller ram capable devices.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Felipe Neves
cdca844d3a boards: arduino_nicla_vision: add camera subsystem
initial support on device tree

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Krzysztof Chruściński
af391b8b3f logging: frontend: stmesp_demux: Improve robustness
Demultiplexer was not ready to handle case when log message was
incomplete which was followed by other log messages. Such scenario
could occur if there was a fault that happen during logging of
a message. In that case incomplete message was followed by valid
messages (fault report) and this fault report was not handled
because processing was blocked waiting for completion of a
message which preceeded fault report.

Since it is expected that some messages may be incomplete a
garbage collection mechanism is added. When start of a message is
received timestamp is logged and list of incomplete messages
is checked for 'old' messages which persist in incomplete state
for long. When message timeouts it is closed and marked as
invalid. It unblocks processing of following messages.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:46 -05:00
Krzysztof Chruściński
da8ba3efa4 logging: frontend_stmesp: Avoid unaligned word access
write_data function which was writing to STMESP data registers was
starting by writing words and tail was written using byte access.
However, RISCV core does not support unaligned access and on Cortex-M33
even if supported it is faster to do aligned access. Reworked
write_data to start first by writing data using byte or half word
access until data pointer is word aligned, then word access is used
and finally tail is written using byte or half word access.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:16 -05:00
Krzysztof Chruściński
d7a62bdeb6 logging: frontends: stmesp: Run clang-format
Apply clang-format formatting.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:16 -05:00
Tom Chang
0b04b772cb boards: npcx_evb: update espi vw index for DnX
This CL updates the virtual wire index to support DnX_WARN signal for
npcx4m8f_evb.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang
9795dc2758 drivers: espi: npcx: add support to customize vw index
This CL adds support to revise vw index accroding to the
vw-index-extend-set.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang
20b1b6ac83 dts: espi: npcx: add property for customize vw index
This CL adds the vw-index-extend-set for customize vw index.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang
0e4ac766fb drivers: espi: npcx: add support for DnX VW
This CL adds support to handle DnX virtual wire signal.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang
450bd68c1a dts: espi: npcx: add definition for DnX VW
This CL adds DnX_ACK and DnX_WARN definitions to the virtual wire table.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang
0ded5623f2 soc: npcx: update register definition for espi vw
This CL adds the field for the index of virtual wire and the enable bit.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Declan Snyder
4405420b33 soc: mcxw71: Enable FMU flash controller
Enable flash controller driver for main FMU on MCXW71

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
448485a967 drivers: soc_mcux_flash: Add flash_k4 support
Add support for flash_k4 api from the mcux SDK.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
846601f260 boards: nxp: Add FRDM-MCXW71
Add FRDM-MCXW71 initial board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
cbee39ef71 soc: nxp: Add MCXW71
Add MCXW71 SOC, which inherits some qualitiies
of kinetis heritage platforms.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
95e22089cb dts: nxp: Add MCXW71 DTS
Add SOC DTS for MCXW71.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
2db9ea94de drivers: kinetis-pinctrl: Account for SCG K4
Add support for SCG K4 clock control in kinetis pinctrl.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Declan Snyder
a8b1ac26d8 drivers: clock_control: Add MCUX SCG K4 driver
Add driver for newer SCG clock control peripheral.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Reto Schneider
eb98483769 boards: ct: ctcc: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x88000) don't match for
> /soc/flash-controller@4001e000/flash@0/partitions/partition@87000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-20 11:58:40 -05:00
Reto Schneider
caec80e571 boards: arduino: nano_33_iot: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x6a) don't match for
> /soc/sercom@42001800/atecc608a@15

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-20 11:57:44 -05:00
Reto Schneider
63a7d74120 boards: seagate: legend: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x1000) don't match for
> /soc/spi@40003800/spi_nor@0/partitions/partition@10000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-20 11:57:04 -05:00
Stefan Gloor
2571ae8b19 drivers: mipi_dbi: add support for parallel 8080/6800 modes using GPIO
Introduce GPIO-based driver for MIPI DBI class that allows MIPI DBI
type A and B displays to be used on general platforms.

Since each data pin GPIO can be selected individually, the bus pins are
set in a loop, which has a significant negative impact on performance.
When using 8-bit mode and all the data GPIO pins are on the same port,
a look-up table is generated to set the whole port at once as a
performance optimization. This creates a ROM overhead of about 1 kiB.

Tested 8-bit 8080 mode with ILI9486 display on nRF52840-DK board.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
2024-09-20 11:56:22 -05:00
Stefan Gloor
1d8c3c013b doc: update MIPI DBI API compatibility
The MIPI DBI API supports MIPI DBI controllers type A, B, and C
(except with 16 write clocks). Update the documentation accordingly.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
2024-09-20 11:56:22 -05:00
Stefan Gloor
ac8816068d drivers: display: ili9xxx: read mipi-mode, only use SPI mode as fallback
Instead of always using the SPI MIPI DBI mode (type C), look up the
mipi-mode from the device tree and only set the mode to
MIPI_DBI_MODE_SPI_4WIRE as a fallback in case the property is not given.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
2024-09-20 11:56:22 -05:00
TOKITA Hiroshi
8915bad1ab tests: drivers: build_all: sensor: Adding Grove NTC Temperature Sensor
Add "seeed,grove-temperature" to testing targets.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-20 11:53:43 -05:00
TOKITA Hiroshi
082ce03389 tests: drivers: build_all: sensor: Adding Grove Photo-Resistor Light Sensor
Add "seeed,grove-light" to testing targets.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-20 11:53:43 -05:00
Brandon Allen
3176ec55bb soc: esp32s3: bump esp32s3 bootloader iram and dram sizes.
Currently the RAM allocated for the bootloader is not
enough to use MCUBoot with crypto signatures.
This commit bumps the #defines accordingly to fix
compile errors with ecdsa_p256 and RSA.

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
2024-09-20 11:53:11 -05:00
Declan Snyder
f8a4a2ff5c doc: dts: Link Linux binding guidelines.
The Linux binding DO's and DONT's about designing DT bindings
pretty much all apply to Zephyr as well, and a lot of these issues
come up in reviews in Zephyr, which is the reason that Linux has
this page in the first place, to list common binding review topics.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 11:52:34 -05:00
Anas Nashif
b73c5578e3 soc: ti: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
6624ebd156 soc: telink: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
c6a03606c2 soc: st: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
49f7204530 soc: snps: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
a018f9d5ec soc: silabs: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
2c1fde39c4 soc: sifive: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
258c4db1e2 soc: renesas: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
f585e852ed soc: quicklogic: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
911d5532bb soc: openisa: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
f519f00f16 soc: nxp: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
21217309bf soc: nuvoton: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
1d7910352d soc: microchip: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
8a16c72023 soc: lowrisc: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
c344771d8b soc: intel: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
e6506619ca soc: gd: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
c9e0a4b843 soc: ene: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
5c541ffd30 soc: brcm: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
51c771ecb2 soc: atmel: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
3af24f88ce soc: arm: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
da118b9f24 soc: andestech: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
72ee7aa279 soc: ambiq: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
b60efecdf6 soc: adi: move init code from SYS_INIT to hooks
Replace SYS_INIT with SoC hooks and adapt SoC init code

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
Anas Nashif
e9474302da init: enhance kconfig docs for custom hooks
Improve docs for custom soc/board hooks.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-20 13:15:31 +02:00
TOKITA Hiroshi
e9b1cde82e tests: drivers: build_all: display: Add i2c and spi devices build test
Add build tests for following devices.

- sharp,ls0xx
- maxim,max7219
- solomon,ssd1306fb

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-20 13:15:09 +02:00
Andrej Butok
34f3786851 boards: nxp: fix mcuboot slots per automatic max sectors
Fixed mcuboot slots, needed after MCUBoot added the default
auto calculation max sectors (CONFIG_BOOT_MAX_IMG_SECTORS_AUTO).
Fixed a possible firmware update error.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-20 13:14:59 +02:00
Filip Kokosinski
0abc9fb8be boards: remove CONFIG_PINCTRL from defconfig files of FE310-based boards
This commit removes the y-selection of the `CONFIG_PINCTRL` Kconfig option
in FE310-based boards defconfig files.

It also makes drivers used in FE310 y-select `CONFIG_PINCTRL` if pinmuxing
is needed.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-20 13:14:41 +02:00
Sven Ginka
0a59ed609c soc: sensry: Fix isa extension settings
Before that fix, the march was set via direct
CMakeLists.txt. Now its done in Kconfig.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-20 13:14:16 +02:00
Jamie McCrae
47bbade847 boards: enclustra: mercury_xe: Remove pointless init function
Removes an init function that does absolutely nothing

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-20 13:14:06 +02:00
Gerard Marull-Paretas
4b2c030ec4 doc: releases: migration-guide: add nRF53 L|HFXO changes
Infom users about Kconfig options deprecation, and provide code snippets
on what they have to do now.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
718007a038 soc: nordic: nrf53: deprecate all L|HFXO options
Devicetree should be used instead. Example DT snippets are provided to
ease with the transition.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
6a2cbc7c87 boards: nrf53*: add L|HFXO configurations
- Only one board tweaked the HFXO configuration (bl5340_dvk)
- LFXO configuration has been added to all boards based on the current
  Kconfig defaults: use LFXO with internal 7pF capacitor.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
b5ce16a84c boards: bl5340_dvk: remove redundant LFXO option
7pF is already the default.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
f00bd302f4 soc: nordic: nrf53: allow configuring L|HFXO from DT
Support both, Kconfig (about to be deprecated) and DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
34c7abffa2 dts: arm: nordic: nrf5340: instantiate HF crystal oscillator
HFXO is represented as a child of the oscillators node. A new node is
created because it requires its own properties (see the binding for more
details).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
41d433051f dts: arm: nordic: nrf5340: instantiate LF crystal oscillator
LFXO is represented as a child of the oscillators node. A new node is
created because it requires its own properties (see the binding for more
details).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
f742741f72 dts: arm: nordic: nrf5340: adjust OSCILLATORS IP description
- Create a new compatible: nordic,nrf53x-oscillators, as other series,
  e.g. nRF54LX contain a similar but different IP (with PLL control,
  etc.)
- Adjust DT: use recommended node name, remove redundant status okay.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
4b6297a20d dts: bindings: clock: add nordic,nrf53-hfxo
Add binding for the nRF53 series HF crystal oscillator.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Gerard Marull-Paretas
586cb18435 dts: bindings: clock: add nordic,nrf53-lfxo
Add binding for the nRF53 series LF crystal oscillator.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Maochen Wang
e2f671ee00 hostap: only add STA interface when hostapd enabled
For add_interface(), only add STA interface when hostapd enabled,
and the Soft-AP interface will be added in zephyr_hostapd_init().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-20 11:08:19 +02:00
Emil Gydesen
82700b8b88 Bluetooth: Audio: Fix bad/missing groups for LE Audio APIs
Add or fix the groups for the public APIs for LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-20 11:08:07 +02:00
Emil Gydesen
83a621dcac Bluetooth: AICS: Fix race condition in AICS free inst get
bt_aics_client_free_instance_get can be called from multiple threads
and as such the atomic_test_and_set_bit should be used instead
of a atomic_test_bit followed by a atomic_set_bit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-20 11:07:57 +02:00
Lukasz Mrugala
558c74be04 scripts: twister: decouple debug and verbosity
Currently, debug logging in the console and verbosity
are tightly coupled - verbosity of level 2 and higher
enables logging at the debug level.

This change introduces a separate Twister flag
responsible for controlling the debug logging,
while leaving the rest of verbosity unchanged.

This allows for controlling the verbosity on
both logging levels, according to one's needs.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-20 11:07:48 +02:00
Pisit Sawangvonganan
9ae9873f12 style: tests: remove unnecessary return statements
For code clarity, remove unnecessary `return` statements
in functions with a void return type they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-20 11:06:55 +02:00
Pisit Sawangvonganan
5c8a2c0dbf style: kernel: remove unnecessary return statements
For code clarity, remove unnecessary `return` statements
in functions with a void return type they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-20 11:06:55 +02:00
Pisit Sawangvonganan
9955b0bd6f style: arch: remove unnecessary return statements
For code clarity, remove unnecessary `return` statements
in functions with a void return type they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-20 11:06:55 +02:00
Pisit Sawangvonganan
af4527e131 style: subsys: adjust return usage in void functions
For code clarity, this commit adjusts the use of `return` statements
in functions with a void return type as follows:
- Transform `return foo();` into separate statements:
  `foo();`
  `return;`
- Remove unnecessary `return` statements when
  they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-20 11:06:55 +02:00
Pisit Sawangvonganan
44ba8a5485 net: dhcpv6: adjust switch-case in dhcpv6_enter_state
For code clarity, unified switch-case usage in `dhcpv6_enter_state` to
use `break` instead of `return`.
Typically, a `break` is used in switch-case statements unless an early
return is necessary, in which case `return` is appropriate.

In this scenario, the `break` statement is the more suitable choice.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-20 11:06:03 +02:00
Andrej Butok
726ac5cc06 boards: nxp: frdm_ke17z: Fix MCUBoot build.
Fixed MCUboot sample build for frdm_ke17z and frdm_ke17z512.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-20 11:05:35 +02:00
Emil Gydesen
27709609f3 Bluetooth: BAP: Unicast Client: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This also modifies the order of how this value is
controlled to avoid any race conditions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-20 09:04:23 +02:00
Emil Gydesen
9001e259a8 tests: bsim: Bluetooth: Audio: Fix minor things in source files
Removed some unused variables and includes.
Added missing includes.
Fixed duplicated variable names.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-20 09:04:11 +02:00
TOKITA Hiroshi
512f237838 tests: drivers: build_all: video: Add i2c-devices build test
Add build tests for following devices.

- galaxycore,gc2145

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-20 09:03:07 +02:00
Peter Mitsis
eda5814dbc kernel: Simplify k_thread_cpu_pin()
Simplifies the k_thread_cpu_pin() implementation to leverage the
existing cpu_mask_mod() infrastructure.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-09-20 09:02:38 +02:00
Emilio Aguila Escalante
dda9ba6031 Bluetooth: Mesh: Use dfd_phase_set() in dfu_suspended()
Currently, dfu_suspended() sets the phase SUSPENDED
directly in the structure, bypassing the dfd_phase_set() function.
This prevents the phase change callback in the bt_mesh_dfd_srv_cb
structure from receiving the SUSPENDED event.

Signed-off-by: Emilio Aguila Escalante <emilio.aguila@hotmail.com>
2024-09-20 09:02:21 +02:00
Jiafei Pan
bd03883744 soc: imx8m: change RDC configuration based on device tree
Can disable RDC configuration if RDC node is disabled.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-19 18:02:50 -04:00
Laurentiu Mihalcea
b26d21fcfd drivers: dma: dma_nxp_edma: support 64-bit TCD
On some EDMA versions, some TCD registers (e.g: SADDR, DADDR,
SLAST, DLAST, etc...) are extended to 64 bits via adding a new
HIGH register holding the value of bits [63:32]. Since, for now,
the driver doesn't support 64-bit addresses, this scenario is
supported by sign-extending the 32-bit value written to SLAST/DLAST.
SADDR and DADDR are taken care of on HAL side.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-19 18:02:42 -04:00
Laurentiu Mihalcea
7eb07479eb drivers: dma: dma_nxp_edma: support MUX register in MP space
Some EDMA versions may have the channel MUX register in the MP
region. To support this scenario, use the `EDMA_HAS_MP_MUX_FLAG`
flag to figure out which channel MUX register to use (TCD or MP).

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-19 18:02:42 -04:00
Laurentiu Mihalcea
93c2b293b9 west.yml: hal_nxp: update hash
Update hal_nxp hash to point to the latest version.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-19 18:02:42 -04:00
Marek Matej
a0d7016e27 soc: espressif: Simple boot validity
Update CONFIG_ESP_SIMPLE_BOOT to exclude if CONFIG_MCUBOOT=y
Fix usage of the config according to actual definition.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-19 18:02:20 -04:00
Marek Matej
404fdb20b4 manifest: update to support changes
Update hal_espressif.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-19 18:02:20 -04:00
Daniel DeGrasse
bc8cb0be4c net: l2: wifi: ensure certificates directory is created
Ensure that the output certificates directory is created, where
generated certificates will be placed. This fixes a build error seen
when using `make` to build samples/net/wifi for the rd_rw612_bga board,
where the output directory for generated certificates did not exist at
build time.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-19 18:01:53 -04:00
Hake Huang
b4ff177aa0 tests: spi_loopback: kinetis dspi fix
1. kenistis dspi does support rx and tx with different size,
so skip the tx_bigger test.
2. dspi dma need internal alignment and 8192 bytes are too
many for k64, so reduce to 1440 bytes

fixing: #77010

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-09-19 18:01:18 -04:00
Yong Cong Sin
f6d5c2e4b4 drivers: intc: shared_irq: change init and isr function to static
Device init & ISR functions should be made static.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-19 18:28:58 +01:00
Emil Gydesen
2a1360ecf9 MAINTAINERS: Add BT role specific conf files to right groups
The mesh.conf belongs to the Mesh group and the audio.conf
belongs to the Audio group.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-19 18:28:46 +01:00
Yong Cong Sin
b55f3c1c4f kernel: remove CONFIG_MP_NUM_CPUS
`CONFIG_MP_NUM_CPUS` has been deprecated for more than 2
releases, it's time to remove it.

Updated all usage of `CONFIG_MP_NUM_CPUS` to
`CONFIG_MP_MAX_NUM_CPUS`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-19 18:28:37 +01:00
Florian Grandel
da0371accf net: l2: ieee802154: decouple frame decryption from upper layer fields
The L2 function `ieee802154_decipher_data_frame()` relied on upper layer
LL address fields which breaks encapsulation.

Also fixes a bug introduced in another fix that went overboard (#53734).

Fixes: #78490

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-19 18:28:26 +01:00
Florian Grandel
766fda06c2 net: l2: ieee802154: move vars to top of block
Found a few variable declarations that were not yet moved to the top of
the function/block. Doing this before actually fixing #78490 so that the
fix becomes more readable.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-19 18:28:26 +01:00
Florian Grandel
a7f235596c net: l2: ieee802154: fix typo
renamed ieeee802154 to ieee802154

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-19 18:28:26 +01:00
Yong Cong Sin
def418b920 tests: latency_measure: fix stacks for the busy threads
The current `K_THREAD_STACK_DEFINE` only create a single stack
shared by all the busy threads. This is causing the application
to crash when there are more than 2 cores in the system.

We should use `K_THREAD_STACK_ARRAY_DEFINE` to create an array
of stacks instead.

Updated the testcase to test up to 8 cores using
qemu_riscv64_smp

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-19 18:28:16 +01:00
Emil Gydesen
9af5d14ef0 Bluetooth: MICP: Add bondable requirement
MICP requires support for the bondable mode for both
the MICP microphone device and MICP microphone controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-19 18:28:01 +01:00
Emil Gydesen
f57a040808 Bluetooth: BAP: Add bondable requirement for BAP
BAP mandates support for bondable mode for all central and
peripheral roles.

Due to Kconfig circular dependencies, some additional
Kconfig changes had to be made.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-19 18:27:53 +01:00
Kamil Piszczek
f17431ee97 bluetooth: smp: remove experimental from BT_GATT_AUTHORIZATION_CUSTOM
Removed the experimental status from the BT_GATT_AUTHORIZATION_CUSTOM
Kconfig option used in the Bluetooth Host GATT layer. This feature
has been present in Zephyr for almost a year without any issue reports
or API modifications.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-09-19 18:27:43 +01:00
Bjarki Arge Andreasen
3ed1b40688 drivers: wifi: nrfwifi: determine shared iovdd and bucken from dt
Currently a user, or a shield definition, must select a Kconfig to
signal that the iovdd_ctrl and bucken GPIOs are connected to the same
pin. We can instead check this in the driver by simply checking if
the iovdd_ctrl_spec and bucken_spec are the same pin.

Update the nrfwifi driver and remove the redundant
NRF_WIFI_COMBINED_BUCKEN_IOVDD_GPIO config.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-19 18:27:36 +01:00
Olivier Lesage
fb9a8eb316 bluetooth: host: CS support for CS Test
Adds HCI support for the LE CS Test command.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-19 18:27:20 +01:00
Olivier Lesage
947a294d36 bluetooth: host: CS support for remote capabilities and FAE table
Adds HCI support for:
- LE CS Read Remote Supported Capabilities
- LE CS Read Remote FAE Table

Callbacks have been added to the conn object to allow upper layers to
make use of the cache commands, with which it will be possible to store
this information and provide it again in the case of a disconnect
and reconnect to the same device.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-19 18:27:20 +01:00
Michal Smola
a44e3e146d samples: pwm: Add overlay for frdm_mcxc242 board
Add Devicetree overlay for samples basic/blinky_pwm and drivers/led/pwm
for frdm_mcxc242 board to set appropriate tpm clock source and
to enable pwmleds.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-19 18:27:11 +01:00
Michal Smola
9e8a8db9dc boards: frdm_mcxc242: Add pwm support
frdm_mcxc242 has tpm ip for pwm generation, but it is not enabled.
Configure and enable it. Add pwmleds definition and disable it,
as leds and pwmleds are mutually exclusive.
Update board documentation.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-19 18:27:11 +01:00
Michal Smola
3cfcfa7947 dts: mcxc: include pwm header file
Include dt-bindings pwm header file in soc dtsi to have helper
definitions available in Devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-19 18:27:11 +01:00
Michal Smola
add15a62a6 soc: nxp mcxc: Add tpm clock selection
Timer/PWM Module (TPM) initial clock source is not selected.
Add initial clock source selection based on Devicetree configuration.
Rename clock sources definitions from LPUART specific to general names
usable by several modules on the SoC.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-19 18:27:11 +01:00
Neil Chen
16bd2e8e7d boards: frdm_mcxc444: add frdm_mcxc444 support
add frdm_mcxc444 support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-19 18:17:19 +01:00
Neil Chen
880952d35a soc: mcxc444: add soc support for mcxc444
Add MCXC444 support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-19 18:17:19 +01:00
Neil Chen
c209924742 dts: mcxc444: add dts for mcxc444
add dts for mcxc444

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-19 18:17:19 +01:00
Lucien Zhao
abad7ba7f7 tests: drivers: adc: add mimxrt1180_evk support for adc_api case
add necessary configuration for lpadc1 on cm33/cm7 cores
test passed on my local

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-19 18:16:04 +01:00
Lucien Zhao
ccd8464075 boards: nxp: mimxrt1180_evk: add lpadc1 support
add lpadc1 ch0a/ch1a channel in pinctrl
set lpadc1 status ok

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-19 18:16:04 +01:00
Lucien Zhao
23f58fd3a4 dts: arm: nxp: rt1180: add lpadc modules
Register all the lpi2c instances.

Add no-power-level property and update driver
to adapt no-power-level property.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-19 18:16:04 +01:00
Marek Matej
7b3eba7da3 boards: espressif: Add uart1 to esp_wrover_kit
Extend board capabilities by adding the uart1 node
and set its default pinctrl.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-19 18:15:52 +01:00
Piotr Kosycarz
ca770dbeb7 scripts: pylib: twister: twisterlib: prevent empty gcda files
In case of problem with parsing hex data from coverage dump,
do not create empty gcda file.
Such empty file will break gcovr parsing.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-09-19 15:14:33 +02:00
Bjarki Arge Andreasen
033cbbac67 samples: net: wifi: add build of nrf7002eb
Add build for nrf7002eb shield on thingy53 board.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-19 15:14:26 +02:00
Bjarki Arge Andreasen
c34107a4e6 boards: shields: add nrf7002eb
Add board support for the nrf7002eb shield. This shield uses the
nordic edge-connector to be compatible with multiple boards.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-19 15:14:26 +02:00
TOKITA Hiroshi
7d95128476 tests: drivers: build_all: ieee802154: Add overlay for native_sim and 64
The native_sim has already been added to the test cases of
`drivers.ieee802154.build.external` is not being appropriately
processed because there is no corresponding overlay.

Create an overlay as an alias of native_posix.overlay.

Also, add the native_sim/native/64 platforms in the same way.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-19 15:14:06 +02:00
TOKITA Hiroshi
a88ee692b9 drivers: ieee802154: mcr20a: Specify the dependency on HAL_MCUX
The mcr20a driver referencing `MCR20Overwrites.h` which is under
`hal/nxp/mcux`.

So, put `depends HAS_MCUX` for clarify the dependency.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-19 15:14:06 +02:00
TOKITA Hiroshi
3d2b18a5ff tests: drivers: build_all: counter: Add i2c-devices build tests
Add build tests for following devices.

- maxim,ds3231
- microchip,mcp7940n

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-19 15:13:57 +02:00
TOKITA Hiroshi
cbec7c8569 drivers: counter: Specify _POSIX_C_SOURCE when native_sim
When building with native_sim, We need to specify

```
 #define _POSIX_C_SOURCE 200809L
```

to make `gmtime_r` available.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-19 15:13:57 +02:00
Benjamin Cabé
d8997b4dc3 ci: github: git clean after rebase
After rebasing the PR on main, the local copy of the repository may
still contain untracked directories and files (for example, the commits
from the pull request are "git mv"ing files out of directories that are
then left empty). Add a git clean so that we run CI in conditions
that are as close as possible to a fresh clone.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-19 15:13:49 +02:00
Florian Grandel
041d8c707c net: l2: ieee802154: fix deadlock
When an incoming PAN ID does not match or when an error occurs while
sending association requests, then locks were not properly released.

Fixes: #78495

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-19 15:13:41 +02:00
Erwan Gouriou
694076c349 boards: st: nucleo_wb0: Remove arduino_gpio compatibility declaration
gpio_basic_api test configuration drivers.gpio.2pin_arduino expects
arduino pins D2 and D3 to be available but they aren't declared in
arduino connectors for this board as not available by default.

Remove arduino_gpio compatibility declaration for now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-19 15:13:34 +02:00
Armando Visconti
661975df1f west.yml: hal_stm32: revert ble_fw blobs
Since the mkbox board ble f/w upgrade method based on binary
blobs that was proposed in #74255 has been turned down, all
the work done in hal_stm32 module to host blobs is now reverted.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-09-19 15:13:27 +02:00
Kamil Piszczek
8c0bc54ab0 mgmt: mcumgr: transport: bluetooth: add all gatt permission levels
Added new Kconfigs for defining permission level of GATT
characteristics that are part of the Bluetooth SMP service in the
MCUmgr subsys.

Removed the CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN as the new Kconfig
options are mutually exclusive and need to be groupa as the Kconfig
choice option.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-09-19 15:13:19 +02:00
Alberto Escolar Piedras
3726cf369c tests/bsim/bluetooth/host/adv/encrypted: Enable RealEncryption
Let's run tests with security/privacy with the HW models acutually
running the encryptions, so in case of missaligned keys
tests fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 15:13:10 +02:00
Alberto Escolar Piedras
9182a7e8c4 tests/bsim/bluetooth/host/security: Enable RealEncryption
Let's run tests with security/privacy with the HW models acutually
running the encryptions, so in case of missaligned keys
tests fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 15:13:10 +02:00
Alberto Escolar Piedras
342e2988bb tests/bsim/bluetooth/host/gatt: Enable RealEncryption
Let's run tests with security/privacy with the HW models acutually
running the encryption, so in case of missaligned keys
tests fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 15:13:10 +02:00
Alberto Escolar Piedras
53adf2c617 tests/bsim/bluetooth/host/att: Enable RealEncryption
Let's run tests with security/privacy with the HW models acutually
running the encryptions, so in case of missaligned keys
tests fail.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 15:13:10 +02:00
Kamil Piszczek
a743dd6f29 bluetooth: smp: remove experimental from BT_BONDABLE_PER_CONNECTION
Removed the experimental status from the BT_BONDABLE_PER_CONNECTION
Kconfig option used in the Bluetooth Host SMP layer. This feature
has been present in Zephyr for over a year without any issue reports
or API modifications.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-09-19 15:13:02 +02:00
Balaji Kulkarni
beb733919d docs: i3c: fix incorrect detail for SETDASA I3C CCC usage
Fix the recommended usage for SETDASA I3C CCC

Signed-off-by: Balaji Kulkarni <quic_bkulkarn@quicinc.com>
2024-09-19 03:53:17 -04:00
Yong Cong Sin
ae20c08822 shell: kernel_service: heap: add required header
Add the "kernel_shell.h" header which is required but missing,
causing build error.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-19 03:52:59 -04:00
Tavish Naruka
b1af1928f8 cmake: set big-endian flags to TOOLCHAIN_*_FLAGS
Set -big-endian to both compiler and linker flags if
CONFIG_BIG_ENDIAN is set.

Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
2024-09-19 03:30:14 -04:00
Hake Huang
b5ee4c0500 samples: fs_sample: add required meta info for twister
in harness_fix definition, type and regex is must have

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-09-19 03:29:59 -04:00
Filip Kokosinski
55b1570c0d tests: kernel.common.stack_sentinel: re-enable some platforms
This commit re-enables the following platforms for the
`kernel.common.stack_sentinel` test:
* `hifive1`
* `m2gl025_miv`

These platforms working correctly after Renode was upgraded to 1.15.2 in
the CI.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-19 03:29:09 -04:00
Dmitrii Golovanov
c5f2df49cc scripts: footprint: Add converter to twister_footprint.json
Add new script `pack_as_twister.py` to convert memory footprint
data prepared by `./footprint/scripts/track.py` into JSON files
compatible with Twister report schema. Next, the data can be
transformed and uploaded to ElasticSearch data storage the same
way as memory footprint (and other) reports executed by Twister.

Add to `plan.txt` an optional column with the corresponding
test suite names for 'footprints' as an example for test instance
name composing with `--test-name` command argumnent.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-19 03:28:52 -04:00
Ian Morris
9f50de110d boards: mikroe: add initial support for Mikroe STM32 M4 Clicker
The STM32 M4 Clicker is a basic development board for the ST STM32F415RG
Microcontroller. The board contains two LEDs and push buttons and several
headers for interfacing with external devices.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-09-19 03:28:33 -04:00
Hake Huang
494133af7b samples: driver: video: enable capture case to run
enable capture case with fixture_camera to run

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-09-19 03:28:09 -04:00
Andrej Butok
e6dc31c6e8 boards: nxp: Fix the MX25UM51245G flash DTS write block size
- Fixed the MX25UM51245G flash DTS write block size from 16 to a value
used by the flash_mcux_flexspi_mx25um51345g driver.
- Fixed flash partitions.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-19 03:27:39 -04:00
Alberto Escolar Piedras
50f2800d80 boards nrfbsim docs: Explain relation between native sim and nrfbsim
Add a section to the docs ellaborating on the relationship between
Zephyr, the native simulator, the nRF HW models and BabbleSim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-19 03:27:22 -04:00
Robert Lubos
fc007eeef5 net: sockets: tls: Prevent infinite block during handshake
In case peer goes down or we disconnect from the network during the
TLS handshake, the TLS socket may block indefinitely during
connect()/accept(), waiting for data from the peer. This should be
avoided, hence use the preconfigured timeout for the TLS handshake,
same as we use for TCP-level handshake.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-19 03:27:05 -04:00
Flavio Ceolin
086e4f84ed intel_adsp: cavstool: Remove legacy code
cavs15, cavs18 and cavs20 were removed from Zephyr there is no
need to handle those platforms in the tool.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-19 03:26:53 -04:00
Flavio Ceolin
0047d31eb9 intel_adsp: cavs20: Remove legacy files
Remove cavs20 leftover files.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-19 03:26:53 -04:00
Flavio Ceolin
72f2a04f7d intel_adsp: cavs18: Remove legacy files
Remove cavs18 leftover files.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-19 03:26:53 -04:00
Flavio Ceolin
b3acb149c5 intel_adsp: cavs15: Remove legacy files
cavs15 was removed long time ago, these are leftovers files that should
be removed as well.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-19 03:26:53 -04:00
TOKITA Hiroshi
34b6234f2f tests: drivers: build_all: rtc: Add i2c-devices build tests
Add build tests for following devices.

- ambiq,am1805
- nxp,pcf8523
- nxp,pcf8563
- microcrystal,rv3028
- microcrystal,rv-8263-c8
- maxim,ds1307

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-19 03:26:43 -04:00
Felipe Neves
4713707e92 drivers: mbox: mbox_esp32: fix mbox callback call
Fixes the mailbox notification callback that was not
being called from the ISR when the other side sends
something.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-19 03:25:57 -04:00
Arkadiusz Cholewinski
a421f339d5 Ztest: Ztest_param fix
Add the missing #ifndef CONFIG_ZTEST_SHUFFLE in ztest.c file.
This fixes multiple definitions of NUM_ITER_PER_SUITE
and NUM_ITER_PER_TEST.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-09-19 03:25:17 -04:00
Tim Lin
fd5ecef59e drivers/i2c: it8xxx2: Add a property for maximum time allowed I2C transfer
Add a property of the maximum time allowed for an I2C transfer.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-09-18 19:56:43 +01:00
Reto Schneider
7b8beeab28 boards: nxp: mimxrt595_evk: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x1a0000000000000000) don't
> match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-18 19:56:26 +01:00
Reto Schneider
a52da052e8 boards: nxp: mimxrt685_evk: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x1a0000000000000000) don't
> match for /soc/peripheral@50000000/i3c@36000/wm8904@1a

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-18 19:56:26 +01:00
Daniel DeGrasse
793d8bb3d2 tests: net: wifi: exclude RW612 ethernet variant
Ethernet board variant was missed in commit 138e9591f8 (tests: net:
wifi: exclude RW612 based boards), but is the sole variant that actually
was running this test. Exclude this variant only, since it cannot build
this test due to requiring binary blobs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-18 19:56:18 +01:00
Andrej Butok
4c4a4c3b0b dts: rt5xx: rt6xx: Fix DTC sram warnings
Fix DTC warnings caused by sram node definition:
 Warning (simple_bus_reg): /soc/sram@30000000:
 simple-bus unit address format error, expected "10000000"

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-18 19:56:12 +01:00
Grzegorz Swiderski
eadc3d08c2 twister: Fix inconsistency among DT compat filters
This small change concerns the following filter functions:

   1. `dt_compat_enabled(C)`:
      There's a node with compatible `C` and status "okay".

   2. `dt_enabled_alias_with_parent_compat(A, C)`:
      There's a node with alias `A` and status "okay", and its parent
      has compatible `C`.

   3. `dt_label_with_parent_compat_enabled(L, C)`:
      There's a node with label `L`, and its parent has compatible `C`
      and status "okay".

All three functions involve checking whether some node or its parent has
a given compatible, but the way this has been checked is inconsistent.
Function (1) has done it with this Python conditional:

   compat in node.compats

while (2) and (3) have used:

   parent.matching_compat == compat

The first check works well with nodes that have multiple compatibles,
and it is more aligned with the notion of "has_compat" as seen in the
devicetree macros for C, CMake, and Kconfig.

Arguably, `matching_compat` shouldn't have been used here, because it is
actually a property of a node's binding, moreso than of the node itself.
In practice, it's usually equal to the first compatible for which edtlib
has found a binding, which at first glance is just more constrained than
the `node.compats` check. However, there also exist obscure cases where
the `node.compats` are empty, while the `node.matching_compat` is not.

For now, the three functions can use a combined check, to improve
consistency and utility while avoiding breakage:

   node.matching_compat == compat or compat in node.compats

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-18 19:56:06 +01:00
Grzegorz Swiderski
89bf698d90 twister: Remove dt_compat_enabled_with_alias filter
It has been deprecated since Zephyr v2.6.0.

The filter that replaced it - `dt_enabled_alias_with_parent_compat` -
had shared code with it, which can now be inlined into `ast_expr()` to
match the parser's overall code structure.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-18 19:56:06 +01:00
Lukasz Stepnicki
02045f110c modules: hal_nordic: dvfs: patch medlow trim entry
DVFS medlow oppoint should use trim entry index 2,
this needs to be updated in hal/hal_nordic.
Currently this is not possible because of time
constraints that is why this temporary patch
is applied. This is the only point where
new_f_trim_entry is used.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-18 19:55:38 +01:00
Arkadiusz Cholewinski
9d9089edd0 ztest: Add Support for Multiple Test Runs.
Introduces new kconfig options to enable multiple test runs in the ztest.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-09-18 15:32:28 +02:00
Alexandre Bailon
80bf9bf5c8 openthread: coprocessor: Enable support of cc1352p7 lp
This adds a dt overlay to enable support of cc1352p7 lp
to the openthread coprocessor sample application.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Alexandre Bailon
7a49ed899d boards: ti: launchxl: Add support of UART1
Some examples may require the usage of a second UART.
This adds UART1 to common launchxl.dtsi in order to make it
available for these examples.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Alexandre Bailon
3341298c0c drivers: ieee802154: cc13xx_cc26xx: Enable support of OpenThread L2
This updates the driver to enable support of OpenThread L2.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Alexandre Bailon
f44072c299 drivers: ieee802154: cc13xx_cc26xx: Fixup a bus error
Sometime, the radio causes a bus error.
This happens because we cast a struct and access to a member
that doesn't exists in the original struct.
This updates the driver to use the right struct to make the cast safe.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Alexandre Bailon
c75186f5ca samples: subsys: settings: Add configuration for cc1352p7
Add configuration needed to run the sample on cc1352p7 SoC.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Alexandre Bailon
2cef27865f drivers: flash: cc13xx_cc26xx: Add support of write to flash from flash
Currently, if we try to write data from a memory mapped flash address
to the flash then we get a -EINVAL error.
This could break the settings subsystem when we use NVS backend.

In order to make it work, add a buffer and use it when we want to
write data that is located in flash address space.

This has been tested using sample/subsys/settings/

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-09-18 15:32:09 +02:00
Benjamin Cabé
47a7da9e9f doc: Overhaul doc guidelines
- Improved document structure (was *very* flat before) by adding more
  meaningful top-level headings and re-ordering some of the existing
  sections
- Provide detailed and structured docs for all the custom Sphinx roles
  and directives available in Zephyr, including moving the docs for
  ``.. zephyr-app-commands`` directive and `:dtcompatible:` roles away
  from the extensions' source files to align with how Sphinx typically
  handles docs for custom roles/directives.
- Added more content regarding diagrams guidelines, images,
  cross-referencing of Doxygen documentation, ...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-18 15:31:39 +02:00
Benjamin Cabé
145dbf820d doc: Increase navigation depth in side nav bar
Increase navigation depth by 1 to enable "local" toc navigation in the
side bar for those pages that are deeper in the documentation tree.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-18 15:31:39 +02:00
Peter Mitsis
03d9f636ea arch: Simplify find_lsb_set()
Rather than testing each bit until the lowest set bit is found, we can
massage the input parameter to easily clear all bits except the lowest
set bit. When only one bit is set, both find_lsb_set() and find_msb_set()
return the same value.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-09-18 15:31:26 +02:00
Xudong Zheng
3c092f9274 dts: bindings: clock: rpi_pico: add XOSC definition
This defines raspberrypi,pico-xosc along with a configurable startup
delay multiplier. On some boards, the XOSC takes longer to stabilize.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-09-18 15:31:04 +02:00
Tomasz Moń
6582529d1f drivers: usb: udc_dwc2: Restrict TxFIFO to SPRAM size
Do not allocate TxFIFO in a way that could corrupt Endpoint Information
Controller data (stored at DFIFO Depth address) or access locations
outside the SPRAM.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-18 15:30:45 +02:00
Yong Cong Sin
7ebd3decd8 drivers: counter: shell: device name autocompletion
Add timer device name autocompletion to the commands.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-18 15:30:35 +02:00
Yong Cong Sin
a3d9ede341 drivers: counter: shell: change callback functions to static
These callback functions are not used outside of the file, make
them `static`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-18 15:30:35 +02:00
Reto Schneider
ff8cbd1eda dts: nios2: intel: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x1002c0) don't match for
> /soc/dma@100200

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-18 15:30:24 +02:00
Henrik Brix Andersen
b63af21235 doc: develop: manifests: external: add CANnectivity USB to CAN adapter
Add a reference to the CANnectivity USB to CAN adapter firmware as an
external module.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-18 15:30:16 +02:00
Guennadi Liakhovetski
531bbbdf65 Revert "ace: mm: tlb: Check tlb translation enabled before flushing cache"
This reverts commit 311ddf90e2. That
commit breaks firmware boot on both MTL and LNL.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-18 15:30:03 +02:00
Thorsten Spätling
106b2013bb dts: adding flexible memory controller (fmc) to H56x, H533
As requested in

https://github.com/zephyrproject-rtos/zephyr/issues/77888

I'm adding the DT basics for the flexible memory controller.

Signed-off-by: Thorsten Spätling <thorsten.spaetling@vierling.de>
2024-09-18 15:29:49 +02:00
Johan Hedberg
db88324f26 scripts: check_compliance: Fix incorrect soc root lookup
The script was only looking at the Zephyr base repository and failing to
look for soc roots e.g. in other modules.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-18 15:29:32 +02:00
Torsten Rasmussen
fc741d5344 compliance: Revert "scripts: handle auto defined ZEPHYR_<name>_MODULE"
With the requirement in #78316 for Zephyr modules to always define
ZEPHYR_<name>_MODULE Kconfig setting then there is no longer a need
for this commit. Simplify check_compliance by reverting ths commit.

This reverts commit 35e28e6315.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-18 15:29:06 +02:00
Yong Cong Sin
119b238594 doc: release: 4.0: add missing colon
Add missing colon to the entry introduced in #78285.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-18 11:03:18 +02:00
Francois Ramu
74c5c84c66 west.yml: Update hal_stm32 with a fix on the stm32h7/L4/F7 drivers
Update stm32H7xx_hal driver partial update to v1.11.3
Update STM32L4xx to 1.18.1
Update stm32F7xx README patch list
module hal_stm32 is now: c4099c229323f305eef75ff6ba93ee9b89827581

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-09-18 09:57:42 +02:00
Fengming Ye
e829b868fc west.yml: update hostap revision
Update hostap revision to get hostapd DPP support.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
c642b44c95 net: wifi_mgmt: add DPP reconfig support
Hostap does not support wpa_cli DPP reconfig command.
So add wifi_mgmt DPP reconfig command and api.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
27d882e740 hostap: add hostapd cli shell command
Add hostapd_cli shell command for test.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
23d2281d6a wifi: shell: add AP DPP shell commands
Add AP DPP shell commands by expanding wifi_cmd_dpp.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
0961928b3a hostap: add dispatch for hostapd and wpa_supplicant wpa_msg
When we have coexistence of hostapd and wpa_supplicant,
wpa_msg has different implementation.
So to let them work together, we need to have common implementation
for wpa_msg and dispatch msgs for hostapd and wpa_supplicant.

So add register zephyr_hostap_ctrl_iface_msg_cb,
and judge if ctx is hostapd by the first integer where ctx points to.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
5e9377e051 hostap: add AP DPP wpa_msg event handler
Hostapd has TODO in hostapd_dpp_handle_config_obj,
to save DPP connector using wpa_msg.

AP DPP needs to use dpp_connector, dpp_netaccesskey and dpp_csign
in DPP Peer Discovery handshake in hostapd_dpp_rx_peer_disc_req.
So add AP DPP wpa_msg event handler to store these info.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
a1eee8ac0c hostap: add AP DPP dispatch mgmt api
Add hostapd mgmt ops, some use same api as wpa_supplicant,
and DPP use different ops.
supplicant_dpp_dispatch use wpa_cli and hapd_dpp_dispatch use hostapd_cli.
And use common DPP param parse.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Fengming Ye
4f93c84a94 hostap: add AP network security type DPP
Add DPP security type for AP DPP support.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-09-18 09:57:27 +02:00
Laurentiu Mihalcea
01418564bc boards: nxp: imx95_evk: add M7 DDR board variant
Add DDR variant of the i.MX95 EVK board (M7 core). Using this
variant, one can run Zephyr from DDR instead of ITCM/DTCM
as it's the case for the M7 "base" board.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-18 09:57:03 +02:00
Reto Schneider
f28ddf5a8e boards: nordic: nrf52805: Fix slot1_partition base address
This prevents an overlap with `storage_partition`

Additionally, it fixes the following warning:

> unit address and first address in 'reg' (0x20000) don't match for
> /soc/flash-controller@4001e000/flash@0/partitions/partition@19000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-18 09:56:42 +02:00
Reto Schneider
5dcc9370ec boards: infineon: cyw920829m2: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x60000) don't match for
> /qspi_flash@40890000/flash@60000000/partitions/storage_partition@70000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-18 09:56:29 +02:00
Pisit Sawangvonganan
a9800e2ea7 style: drivers: adjust return usage in void functions
For code clarity, this commit adjusts the use of `return` statements
in functions with a void return type as follows:
- Transform `return foo();` into separate statements:
  `foo();`
  `return;`
- Remove unnecessary `return` statements when
  they don't affect control flow.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-18 09:56:16 +02:00
Ryan McClelland
a8ae883e4d modules: tflite-micro: add batch_matmul.cc to cmakelists.txt
batch_matmul.cc was missing from the CMakeLists.txt for tflite-micro.
Add it.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-18 09:56:06 +02:00
Luis Ubieda
53f547b737 serial: bluetooth: Maximize notification payload size based on ATT MTU
By keeping track of run-time ATT MTU of all connected peers, it's
possible to increase the notification payload size; thus increasing
data-throughput sent over Bluetooth.

Note that this assumes the Bluetooth connection is properly configured
(with the corresponding connection parameters) to optimize performance.
This is application-specific and shall be examined on each scenario for
optimal performance.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-17 20:12:55 -04:00
Yong Cong Sin
aa9446ca6b shell: modules: kernel: cleanup thread list subcmd
Parts related to the thread runtime stats are somewhat
standalone, refactor it out instead of having two #ifdef
and two places.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-17 20:12:33 -04:00
Yong Cong Sin
83212147b2 shell: kernel_service: reorg the commands
Split the `kernel_service.c` into multiple subcommand files,
each file would register with the main `kernel` cmd based on
the dependencies in Kconfig/CMakeLists.txt.

This greatly reduces the number of precompiler directives.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-17 20:12:33 -04:00
Shrek Wang
0b24b960fe net: Add onlink and forwarding check to IPv6-prepare
Deadloop happens when CONFIG_NET_ROUTING and VLAN are enabled.
In function net_ipv6_prepare_for_send(), pkt->iface will be
updated with net_pkt_set_iface(pkt, iface) in 2 scenarios:
1. ip_hdr->dst is onlink
2. check_route or nbr_lookup
VLAN is virtual-iface which attaches to a physical-iface. Each
time a packet being sent to a VLAN port will invoke twice of
the net_send_data(). The 1st time, pkt->iface is set to virtual
iface and the 2nd time to physical iface.
However in above 2 scenarios, at the 2nd time of calling the
net_send_data(), the pkt-iface will be changed back to virtual
iface. The system runs into a deadloop. This can be proved by
enabling CONFIG_NET_ROUTING with the VLAN sample.
The main purpose for net_ipv6_prepare_for_send() is to set the
right ll_dst address. If the ll_dst address is already set, then
no need to go through it again. If the packet has done with the
forwarding and set the ll_dst, then no need to check_route again.
And, the pkt->iface will not be changed back to virtual iface.

Fixes: #77402

Signed-off-by: Shrek Wang <shrek.wang@nxp.com>
2024-09-17 20:11:32 -04:00
Flavio Ceolin
d9bdb4af20 doc: security: Disclose CVE-2024-6259
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
d8df6abd69 doc: security: Disclose CVE-2024-6137
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
a4dcb8d259 doc: security: Disclose CVE-2024-6135
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
38db894cd9 doc: security: Disclose CVE-2024-5931
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
2f5b9577de doc: security: Disclose CVE-2024-6258
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
1142f95c8c doc: security: Disclose CVE-2024-5754
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
311b7ac3ec doc: security: Add CVE under embargo
Add an entry to CVE-2024-8798

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Flavio Ceolin
a6f57960cd doc: relnotes/4.0: Add info about CVE-2024-8798
Information about CVE-2024-8798 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-17 20:11:12 -04:00
Emil Lindqvist
f5981e5d8c net: shell: increase number of arguments to net suspend command
Increased variable to the mandatory amount of commands, since the
comment of SHELL_SUBCMD_ADD states

"Number of mandatory arguments including command name"

but net suspend takes the interface number to suspend

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-17 20:10:55 -04:00
Quy Tran
3ccd52b657 drivers: spi: update casting for MSTP register
Update casting for MSTP register in SPI driver

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-17 20:10:46 -04:00
Felipe Neves
c24e8a3820 drivers: video: gc2145: fixes the prefix
of the compatible driver, use galaxycore
instead of gc.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-17 20:10:31 -04:00
Arrel Neumiller
9bba5141f5 doc: i2c, i3c: remove unnecessary preposition 'in'
This commit removes the preposition "in" from the phrase
"in particularly"in the I2C and I3C Controller API sections
to improve readability.

Signed-off-by: Arrel Neumiller <rlneumiller@gmail.com>
2024-09-17 20:07:09 -04:00
Reto Schneider
63cd2f6580 boards: google: twinkie_v2: Fix unit and first address mismatch
This fixes the following kind of warnings:

> unit address and first address in 'reg' (0xf) don't match for
> /soc/adc@40012400/channel@15

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:41 -04:00
Reto Schneider
c883f34e63 dts: arm: nxp: lpc55S0x: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x3fc70) don't match for
> /soc/peripheral@40000000/flash-controller@34000/flash@9fc70

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
e2ae547be3 dts: arm: nxp: lpc55S2x: Fix unit and first address mismatch
This fixes the following warnings:

> unit address and first address in 'reg' (0x40094000) don't match for
> /soc/peripheral@40000000/usbhs@144000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
b80f7b90ad dts: arm: nxp: lpc55S1x: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x3fc70) don't match for
> /soc/peripheral@40000000/flash-controller@34000/flash@9fc70

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
ddcc07fc68 dts: arm: nxp: lpc55S1x: Fix unit and first address mismatch
This fixes the following warnings:

> unit address and first address in 'reg' (0x40094000) don't match for
> /soc/peripheral@40000000/usbhs@144000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
0067081461 boards: nxp: imx8mp: Fix unit and first address mismatch
This fixes the following warning:

> devicetree error: unit address and first address in 'reg' (0x1) don't
> match for /soc/enet@30be0000/mdio/phy@0

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
17efac3b48 boards: nxp: frdm_kw41z: Fix unit and first address mismatch
This fixes the following warnings:

> devicetree error: unit address and first address in 'reg' (0x70000)
> don't match for
> /soc/flash-controller@40020000/flash@0/partitions/partition@700000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
a23e2e2ed5 boards: nxp: frdm_mcxn236: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x88000) don't match for
> <snip>/flash-controller@43000/flash@0/partitions/partition@80000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
06aa38e690 boards: nxp: usb_kw24d512: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x70000) don't match for
> /soc/flash-controller@40020000/flash@0/partitions/partition@700000

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
d35293c137 boards: nxp: imx8mp_evk: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x1) don't match for
> /soc/enet@30be0000/mdio/phy@0

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Reto Schneider
b15c5d7e8b boards: nxp: imx93_evk: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x2) don't match for
> /enet@42890000/mdio/phy@0

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 20:06:30 -04:00
Ryan McClelland
b0442e24f1 drivers: i3c: shell: record getcaps in to desc from shell
Record the getcaps values in to the i3c desc from the shell command.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
d2b0f70ddc drivers: i3c: add helper for if target is controller capable
Add the function, i3c_device_is_controller_capable, to determine if
a target is controller capable.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
93dc6113bc drivers: i3c: fix static addr for deftgts AC
The Active Controller data struct for static addr is to always be
0x7E. This is so the active controller can be identified according
to section 5.1.9.3.7 of the I3C v1.1.1 Specification.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
cf2ccbf85e drivers: i3c: add missing parameter to doxygen for deftgts
The dev argument was missing for the doxygen for the function
i3c_bus_deftgts. Add a comment for it.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
a338f7c710 drivers: i3c: shell: add hdr ddr shell commands
Add read and write hdr ddr shell commands.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
d6bff46d99 drivers: i3c: shell: add ibi shell commands
This adds ibi commands for hot-join, controller request, and target
interrupt request.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
86f7ccf10a drivers: i3c: shell: add i3c speed command
Add a shell command to set the i3c scl speed.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
Ryan McClelland
1036310e8b drivers: i3c: set vendor ccc command target arg to const
The target argument was not const. Set it to be const.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-17 20:06:13 -04:00
TOKITA Hiroshi
a9c305d983 tests: drivers: Fix adc labels in sensors test
Use `test_adc` in io-channels to be consistent in whole
tests/drivers/build_all/sensor/adc.dtsi file.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-17 20:06:08 -04:00
TOKITA Hiroshi
998aea814e tests: build_all: sensor: Fix i2c duplicate address
The address after @91 is messed up, so I fixed it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-17 20:05:40 -04:00
Anas Nashif
7c90f1bca1 arch: arm64: init xen in arch_kernel_init()
Call xen_enlighten_init() from arch_kernel_init() instead of using
SYS_INIT.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
328f52b0ce x86: init spec_ctrl in prep_c, do not use SYS_INIT
Do not use SYS_INIT, call init script directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
7e225efab7 arch: initialize irq_offload during boot, do not use SYS_INIT
Do not use SYS_INIT for initializing irq_offload when enabled, instead
using a new interface that is called during the boot process for all
architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
c9f7b512da arm: init null pointer detection in prep_c, do not use SYS_INIT
Do not use SYS_INIT for initializing null pointer detection, call
directly in prep_c.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
3e616cf4d3 arc: start secureshield in prep_c, do not use SYS_INIT
Initialize secureshield in prep_c instead of using SYS_INIT.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
2294da24d7 arc: start mpu in prep_c, do not use SYS_INIT
Initialize MPU in prep_c similar to how all other architectures do it,
avoid use of SYS_INIT.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Anas Nashif
6ec74d02b6 cache: add new interface arch_cache_init() for initializing cache
Add a new call for initializing cache on architectures that need that.
Avoid using SYS_INIT for this and instead call the hook in a fixed place
and run if implemented.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 20:05:22 -04:00
Lukasz Mrugala
418b1e0e21 scripts: twister: Add TestCase status printing
When at verbosity 1, we print out the status of TestInstances.
This makes it harder to notice changes at TestCase level,
which require perusing the logs.

This adds TestCase status and reason printing
if verbosity level is 2 or more.
Reason printing is suppressed if the reason is empty or None.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-17 15:04:04 -04:00
Keith Short
9d999149e3 drivers: gpio: stm32: Fix compiler warning
The local function ll_gpio_get_pin_pull() is not always referenced.  Add
the __maybe_unused attribute to avoid compiler warnings (which may be
promoted to errors by downstream users).

Signed-off-by: Keith Short <keithshort@google.com>
2024-09-17 14:58:57 -04:00
Reto Schneider
371a48ac16 edtlib: Remove unreachable code
This fixes the following error reported by
./scripts/ci/check_compliance.py:

> 1 checks failed
> ERROR   : Test Pylint failed:
> W0101:Unreachable code (unreachable)
> File:scripts/dts/python-devicetree/src/devicetree/edtlib.py
> Line:2271
> Column:16
>
> Complete results in compliance.xml

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-17 14:58:25 -04:00
Andrea Merello
cc61e96860 drivers: sensors: fix compile error due to conflicting types.
Since b249535 (sensors: Add channel specifier) the signature of
sensor_reconfigure_read_iodev() changed, but sensor_handlers.c
apparently hasn't been updated.

Fix compile time error by updating sensor_reconfigure_read_iodev()
signature in sensor_handlers.c

Signed-off-by: Andrea Merello <andrea.merello@iit.it>
2024-09-17 14:57:32 -04:00
Felipe Neves
e646f99093 boards: witte: linum: mention the board website
location, it was placed in the documentation but
it was not being mentioned.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-17 14:56:30 -04:00
Felipe Neves
73699f2419 boards: witte: linum: fix documentation
by updating the correct link for the Linum defconfig
file.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-17 14:56:30 -04:00
Christopher J. Champagne
63051bf71a xtensa: add kconfig to allow non-preemptible interrupts
This adds a kconfig to enable making the interrupts
non-preemptible by other interrupts. Enabling this will set
the INTLEVEL to the max non-debug level before clearing
the EXCM bit.

Signed-off-by: Christopher J. Champagne <christopher.j.champagne@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-17 14:54:19 -04:00
Thibo Verheyde
91535f3a28 boards: dptechnics: Add support for Walter board
Add board definitions for the DPTechnics Walter board.

Signed-off-by: Thibo Verheyde <thibo@dptechnics.com>
2024-09-17 14:53:24 -04:00
Fabio Baltieri
f7c0a643df kscan: mark the kscan driver class as deprecated
All kscan drivers have been moved over to input, Mark the kscan driver
class as deprecated so it can be removed in the 4.2 release.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-17 14:52:50 -04:00
Emil Gydesen
dfa5bd8a54 Bluetooth: VCP: Replace bools with atomic
Replace several bools in volume controller with an atomic value.
Update how these values are modified so that we can better
prevent race conditions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-17 14:52:37 -04:00
Emil Gydesen
ae58f474a1 Bluetooth: VCP: Vol ctlr rename flags to vol_flags
Rename the volume flag field from the generic "flags"
to "vol_flags" as the generic "flags" will be used for
other values in a future commit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-17 14:52:37 -04:00
Maxime Vincent
f86f98fa2e soc: arm: nxp: fix USB w/ SPEED_OPTIMIZATIONS
Fix USB w/ SPEED_OPTIMIZATIONS for LPC55xxx SoCs
Root cause was non-volatile register access,
which could get optimized by the compiler
(by -fschedule-insns, specifically)

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-09-17 14:52:27 -04:00
Anas Nashif
cdf18ba91a samples: bluetooth: remove outdated platform_exclude
Remove some outdated platform_exclude entries.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 14:52:03 -04:00
Guennadi Liakhovetski
665e69d71d llext: (cosmetic) fix a name in an error message
test_dependent() was changed to test_entry() but one location was
missed - in a warning message string. Fix it too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-17 17:49:29 +01:00
Mahesh Mahadevan
999146afb9 MAINTAINERS: add mmahadevan108 as second maintainer for NXP
Adding myself as a second maintainer for NXP SoC's.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-17 17:49:20 +01:00
David van Rijn
96386eac0b cmake: Add REQUIRED option to devicetree getters
namely:
 - dt_nodelabel
 - dt_alias
 - dt_prop

these currently fail quietly.
This can cause some very confusing errors later on.
By adding `REQUIRED` to the function call one can
easily generate a more clear message:

    required nodelabel not found: ...

Signed-off-by: David van Rijn <david@refractor.dev>
2024-09-17 17:49:07 +01:00
Kapil Bhatt
ccc243c129 modules: hostap: Add wifi statistics reset support
This change will add  an API to reset the wifi statistics
when reset command is called.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-17 17:48:36 +01:00
Jonathan Rico
2ca59e799c Bluetooth: Host: Defer conn.recycled() to the syswq
We don't own the thread that calls the final `bt_conn_unref()`. The
users might not be aware that they are re-using that poor thread's
stack.

Putting it on the system workqueue gives a predictable stack size and
thread priority for the invocation of the recycled handlers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-17 17:47:56 +01:00
Raffael Rostagno
48938550af boards: esp8684_devkitm: Update doc and .yaml for SPI support
Update esp8684_devkitm board files indicating SPI support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-17 17:45:58 +01:00
Jonathan Rico
edeb529c9f Bluetooth: Host: Add advertising events stress test
More information in the test description.

Why: At the time of writing, this test exposes a bug in the Bluetooth stack
where all the RX buffers are in use, and the controller driver fails to
synchronously allocate a command response buffer.

This is manifested in an assertion failure in `hci_common.c`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-17 17:45:50 +01:00
Jonathan Rico
6d5cce662a Bluetooth: buf: Put command complete/status in sync buf pool
Why is it ok to use the sync pool?

Because command complete/status is processed in prio: that means on the
same stack as the `bt_recv()` call from the driver.

Why does it fix the issue?

Because the complete/status event goes into a pool that is guaranteed to
have one free buffer any time `bt_recv()` is not executing.

Since the driver is the one calling bt_recv(), it (hopefully) will
finish one `bt_recv()` before starting another one.

Fixes #78223

Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-17 17:45:50 +01:00
Robert Lubos
bd56fecc61 net: iface: Add missing interface mutex locks
net_if_ipv4/6_addr_rm() were missing the iface mutex lock, this commit
adds it.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-17 17:45:34 +01:00
Armin Kessler
2ba893e0cb drivers: video: esp32s3
Add the missing calls to the sensors`video_stream_start()`
and `video_stream_stop()` functions.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-09-17 17:45:27 +01:00
Simon Walz
5af3fbadfd net: lwm2m: check each block for TLV header
For composite operations, we should always check whether the TLV header
is present. Otherwise, all blocks are assigned to one resource.

Signed-off-by: Simon Walz <simon.walz@autosen.com>
2024-09-17 17:45:17 +01:00
Simon Walz
e20ef4443e net: lwm2m: check lwm2m path level while getting the block ctx
The Block1 context for composite operations is not found, as all path
levels are compared. The incoming path level should therefore always be
taken into account.

Signed-off-by: Simon Walz <simon.walz@autosen.com>
2024-09-17 17:45:17 +01:00
Jamie McCrae
c41d88740a doc: release: 4.0: Add note on new MCUmgr bootloader info hook
Adds a note on this newly added hook

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-17 17:45:04 +01:00
Jamie McCrae
87a18400dd mgmt: mcumgr: grp: os_mgmt: Add optional bootloader info hook
Adds an optional hook that allows for appending additional
responses to the bootloader info command

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-17 17:45:04 +01:00
Vit Stanicek
adb83d26bf soc: mimxrt685s/cm33: Fix lockup on clock config
Imply CONFIG_INIT_AUDIO_PLL on nxp,dmic driver selection on
mimxrt685s/cm33. Make DMIC clock config dependent on the use of the
RT685's audio PLL.

Fixes a regression described in #77851.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-09-17 17:44:48 +01:00
Fabrice DJIATSA
0df9e2536b boards: st: add die_temp or digi node
update die_temp node for some stm32 boards,
need that for run sensor die_temp_polling samples.
don't need to modify sample.yaml

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-17 17:44:39 +01:00
Fabrice DJIATSA
eab0e37e68 dts: arm: st: add digi-temp node in dtsi file
add digital temperature node in board.dtsi file

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-17 17:44:39 +01:00
Chekhov Ma
19949a0ccf boards: imx93_evk: enable flexcan driver
Add pinctrl for flexcan2
Add EXP_SEL gpio hog for board mux selection during boot.
Add TJA1057 CAN PHY driver.
Update supported features in board document

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-17 17:44:14 +01:00
Chekhov Ma
643db3fa0b soc: imx93: enable flexcan driver
- Add flexcan dts node and pinctrl.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-17 17:44:14 +01:00
Wilfried Chauveau
6194159608 scripts: twister: handlers: Enable BinaryHandler to run sysbuilt tests
Running sysbuilt tests fails because of missing "run" target.

This adds the default domain context to the command.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-17 09:13:26 -05:00
Jonny Svärd
bdd894ca50 modules: tflite-micro: Fix CMakeLists.txt
Add missing file to source list

Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2024-09-17 09:12:23 -05:00
Marcio Ribeiro
de53fb471a drivers: i2s: esp32: remove unused code
Removed unused code in I2S driver.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-09-17 09:10:51 -05:00
Rubin Gerritsen
f6712c43d4 tests: Bluetooth: Add some more tests for bt_le_create_conn()
Adds coverage for attempting to connect while already connecting
or connecting to a device that already exists.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-17 09:09:56 -05:00
Benjamin Cabé
c394234305 ci: doc: build the documentation using GitHub-hosted runners
There is no reason to use our custom runners for docs build
as it's equally fast on GH default runners and allows doc CI
to be expedited more quickly even when our build farm is
busy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-17 09:05:22 -05:00
Yuval Peress
53dd8e884b cpp: Fix warnings
Fix warnings caught by running west build. Another fix will have to go
in to see why twister was missing these.

#78348

Signed-off-by: Yuval Peress <peress@google.com>
2024-09-17 09:03:55 -05:00
Anas Nashif
ca09a4b91c doc: kernel/arch: fix some wrong doxygen references
Remove non-existing references and document parameters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 05:24:09 -04:00
Anas Nashif
ac808d13dc doc: kernel: define additional doxygen groups
Some groups are used by multiple files/tests, define them globally in
doc/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 05:24:09 -04:00
Anas Nashif
3744dd828f tests: kernel: fix test groups for semaphore/mutex
define groups for semaphores and mutexes

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-17 05:24:09 -04:00
Corey Wharton
d80174fadf drivers: dac: add checks for internal channel config
Return -ENOTSUP if these flags are specified but not supported.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-09-17 05:23:56 -04:00
Corey Wharton
2b9ed72f9e drivers: dac_stm32: make pinctrl config in the device tree optional
Now that we support internally connected channels we should make the
pinctrl configuration optional.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-09-17 05:23:56 -04:00
Corey Wharton
834cc98f39 drivers: dac_stm32: add support for internally connected channels
Adds support for configuring the STM32 DAC channel mode for internal
connections. This is only enabled for SOCs that support it.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-09-17 05:23:56 -04:00
Corey Wharton
e94e5eb10c drivers: dac: add flag to channel config to support internal connections
Allows user to connect DAC output to internal peripherals for HW and
drivers that support it.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-09-17 05:23:56 -04:00
Pisit Sawangvonganan
7a59ebf6af drivers: i3c: shell: use shell_fprintf_normal instead of shell_fprintf
Due to the introduction of `shell_fprintf_normal` in PR #77192, we can
minimize caller overhead by eliminating direct `color` parameter passing.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-17 05:23:19 -04:00
Pisit Sawangvonganan
d539257a87 drivers: i3c: shell: align struct shell * argument name to sh
Aligned the `struct shell *` argument name from `shell_ctx` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-17 05:23:19 -04:00
Pisit Sawangvonganan
fdaaf3624c drivers: i3c: shell: fix unhandled <id> argument parsing
The `<id>` argument was included in `cmd_i3c_ccc_getvendor`,
`cmd_i3c_ccc_setvendor`, and `cmd_i3c_ccc_setvendor_bc` but
was not processed.

Utilized `shell_strtoul` for proper parsing of the `<id>` argument
in these functions.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-17 05:23:19 -04:00
Pisit Sawangvonganan
66bce34af2 drivers: i3c: shell: fix compilation error in cmd_i3c_ccc_getmxds
Resolved a compilation error where `maxwr`, `maxrd`, and
`max_read_turnaround` were incorrectly referenced.

The code was updated to correctly access these fields from
the `data_speed` structure.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-17 05:23:19 -04:00
Jukka Rissanen
9acf53e412 net: context: Set IPv4 address properly for sendmsg()
When using sendmsg() and if CONFIG_NET_IPV4_MAPPING_TO_IPV6 is
enabled, then the addr4 variable was set too late which was causing
null pointer access.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-17 05:22:48 -04:00
Ingar Kulbrandstad
d41e834bbe tests: bluetooth: mesh: Removed native_posix and renamed sim_ids
Removed deprecated native_posix as test platform.
Added unique sim_ids for tests with the psa as a overlay.
Fixed clang-format issues.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
e0f5f3acf4 bluetooth: mesh: brg_cfg_srv: ignore message with invalid parameters
When a message with invalid parameters is received, we must ignore it.

In this commit we check invalid parameters first.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
ed051cddb9 tests: bluetooth: mesh: add subnet bridge bsim tests
This commit adds the following tests:
- Simple test for bridging table
- Test bridging table state changes
- Test persistence storage of subnet bridge
- Test IV Index update with subnet bridge
- Test network key removal for subnet bridge

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
b267da33d6 tests: bluetooth: mesh_shell: add brg_cfg_srv instance
This commit adds Bridge Configuration Server to the mesh_shell sample.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
dd7b6757f4 bluetooth: mesh: brg_cfg: use IS_ENABLED macro optimally
If use `IS_ENABLED` macro inside if statements but not as preprocessor
directives, we can always compile the code for settings even if settings
are not used. This allows to reduce amount of firmwares we need to build
in CI to ensure that code compiles.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
945e320e75 bluetooth: mesh: brg_cfg_srv: check buf tailroom before packing data
We must tcheck if buf has enough tailroom to fit another pair of keys or
pair addresses with direction.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
f44ee3c50c bluetooth: mesh: adv_ext: resched main adv set if relay doesn't have own
If relay feature doesn't have own adv set, it should use the main adv
set to send messages.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
76f015b61f bluetooth: mesh: brg_cfg_cli: copy buf in synchronous api
When a synchronous API is used, the content of `buf` will not be
valid by the time the thread that called the synchronous API is woken up
again.

Therefore, the simplest way to solve this is when a user allocates the
buffer which will be filled up with the content of the buffer passed to
the model callback.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
6c94d3bec6 bluetooth: mesh: net: bridge traffic regardless of relay state
The Subnet Bridge node must bridge traffic regardless of the Relay
state.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
957bb4754a bluetooth: mesh: net: use subnet credentials when relaying
When relaying a Network PDU to another subnet, we need to update sub
field of rx structure so that correct credentials are used. We also need
to update NID field of the Network PDU.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
96cb386f39 bluetooth: mesh: brg_cfg: add constants for directions
Add constants for directions so that they can be used in the
subnet bridge client api.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
abf02719c4 bluetooth: mesh: rpl: fix rpl for subnet bridge
The initial implementation of RPL check for Subnet Bridge wasn't fully
correct. It decides whether to relay or not a PDU based on RPL of only
received messages. However, the spec section 3.9.8 says:

```
In addition, a Subnet Bridge node shall implement replay protection for
all Access and Transport Control messages that are sent to bridged
subnets.

A Subnet Bridge node shall maintain the most recent IVISeq value for
each source address authorized to send messages to bridged subnets.
Messages received by the Subnet Bridge node with the IVISeq value less
than or equal to the last stored value from that source address shall
be discarded immediately upon reception. When a message is retransmitted
to a bridged subnet, the stored IVISeq value shall be updated. In this
way, bridged subnets are protected against replay attacks from other
subnets.
```

This was noticed with MESH/NODE/SBR/NET/BV-02-C test. It passes when
PTS misses the message at step 3 and 4, and fails when PTS manages to
receive the message.

This commit fixes the wrong behavior by removing argument for
`bt_mesh_rpl_check` function making store a new message and bypassing
`local_match` check in case of Subnet Bridge node.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
f06f69a8b8 bluetooth: mesh: brg_cfg: store tbl when changed only
Though nvs backend checks whether the data passed to it is identical to
the stored one, this isn't guaranteed by other the settings api. We can
also avoid going into the settings subsystem since we know what was
actually changed.

This commit adds 2 flags that allow to control whether Subnet Bridge
or Bridging Table states were changed and skips storing if the certain
state was not changed.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Pavel Vasilyev
ceba348ca4 bluetooth: mesh: brg_cfg: fix restoring bridging table
We store only filled up entries, but want to restore the entire table.
`bt_mesh_setting_set` fails if the restored length didn't match the
provided length.

This commit fixes the restoring of the bridging table by allowing to
restore any size as long as the stored size is less than the allocated
one and it is a multiple of the size of a single entry.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Stine Åkredalen
e1232a45e2 docs: Bluetooth: Mesh: add Subnet Bridge doc
Added high-level documentation for Subnet Bridge,
connecting models together and explaining usage.

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Ingar Kulbrandstad
0e2f8b21cf Bluetooth: Mesh: Fixed bugs found in PTS testing
Fixed bugs found while running PTS test.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Ingar Kulbrandstad
21fa5c81d2 Bluetooth: Tester: Mesh: Added support for Bridge client/server
Added support for the Bridge Configuration client and server
to the tester application.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Omkar Kulkarni
fc4576ce3f Bluetooth: Mesh: Add bridging functionality
Adds subnet bridging functionality to the network layer.
Also fixes brg_cfg_srv for minor issues to get it working.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Omkar Kulkarni
8210d2da1b Bluetooth: Mesh: Populate Bridge Config Server
Adds implementation for the Bridge Configuration Server model.

Updates `brg_cfg` module to add sanity check for
bt_mesh_brg_cfg_tbl_remove() API. Also, updates the unit test
accordingly.

Adds documentation for the Bridge Configuration Server model

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Håvard Reierstad
50a4c2d17a Bluetooth: Mesh: Add brg_cfg_cli commands to shell
Adds the Bridge Configuration Client commands to Mesh shell.

Unifies documentation for shell Kconfig options.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Håvard Reierstad
d49068e608 Bluetooth: Mesh: Implement Bridge Config Client
Implements the Bridge Configuration Client model.
Adds opcodes for all Bridge messages to `foundation.h`. Adds client-side
support for these messages.
Adds a new Kconfig option for the Bridge Configuration Client model to
configure the waiting time for respones for acked messages.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Håvard Reierstad
7c6c5b4965 Bluetooth: Mesh: Change bridge table add params
Change the parameters of the bridge table add function to take an
entry struct rather than the fields of an entry.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Håvard Reierstad
6846f6f64c Bluetooth: Mesh: Fix subnet bridge table status type
Changes status type to be status codes defined in Mesh Protocol 4.3.14
as defined for the `BRIDGING_TABLE_STATUS` message.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Omkar Kulkarni
092f808ea4 Bluetooth: Mesh: Adds subnet bridge states
The `brg_cfg` module implements the states needed for subnet bridge
feature. It provides two states - enable state, and bridging table
state. APIs are provided to access and modify the states. The module
handles responsibility of persistence of the states.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Ingar Kulbrandstad
709c006b58 Bluetooth: Mesh: Bridge Configuration Client/Server API
Adding documentation and function calles for the API's
in Bridge Configuration Client model and Bridge
Configuration Server model.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2024-09-17 05:22:32 -04:00
Emil Gydesen
eb22e1fc98 Bluetooth: TBS: Make GTBS mandatory
Any places that checked for GTBS is now always enabled
as GTBS is mandatory to support, and the Kconfig option
was removed.

Also removed a duplicate Kconfig option for TBS,
BT_TBS_SERVICE_COUNT, as it was unused.

The other Kconfig option BT_TBS_BEARER_COUNT is used
instead exclusively to set it if needed.

Since GTBS can now exist alone, it must also
support having its own calls and other values.
This means that the GTBS and TBS instances now share
the same underlying struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-17 09:45:48 +02:00
Georgij Cernysiov
4ec67271ab drivers: flash: stm32 ospi correct lines on writes
Correct used lines based on write opcode
regardless of the data mode.

The write opcode is set during init for all
modes and can be overwritten in DT.

Add lines correction for PP_1_1_2.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-09-17 09:45:42 +02:00
Weiwei Guo
88f6851a3d arch: common: Add user can specify the nocache location
nocache ram is usually used by DMA to transfer data between
peripherals and ram. Some chips use isolated nocache ram,
which does not necessarily have to be in RAMABLE-REGION.
By specifying the zephyr,nocache-ram options, users can specify
the region where nocache-ram is located. If the user does not
specify it, it defaults to RAMABLE-REGION.

Signed-off-by: Weiwei Guo <guoweiwei@syriusrobotics.com>
2024-09-17 09:45:35 +02:00
Lucas Tamborrino
e0f45cce52 boards: espressif: add esp32s3-eye board support
Add support for ESP32S3-EYE dev board.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-09-17 09:45:17 +02:00
Lucas Tamborrino
2b437afaec dts: pinctrl: esp32s3: Add lcd_cam support
Add pinctrl for LCD_CAM peripheral.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-09-17 09:45:17 +02:00
Paul He
4278d0a8d6 boards: nxp: mimxrt1050: add LinkServer runner support for qspi board
override the default flash driver with MIMXRT1050_SFDP_QSPI.cfx to support
LinkServer runner for qspi board.

Signed-off-by: Paul He <pawpawhe@gmail.com>
2024-09-17 09:45:01 +02:00
Pavel Vasilyev
48ff46d616 doc: ipc: icmsg: fix numbered list in bonding section
To correctly render the list the continuation line must be indented with
thee spaces.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-17 09:44:52 +02:00
Benjamin Cabé
48a077f2d9 doc: update references to video capture sample
Video samples have moved from samples/subsys/video to
samples/drivers/video.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 15:34:19 -04:00
Gerard Marull-Paretas
a056b608f2 arch: arm: do not enable PLATFORM_SPECIFIC_INIT if SOC_RESET_HOOK=y
Otherwise we can't escape from DEPRECATED being selected, and so getting
build warnings. It doesn't make sense that the option replacing the
deprecated one is used to automatically enable it.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-16 15:12:18 -04:00
Anas Nashif
fc6cb6700a manifest: update to sha with fix to PLATFORM_SPECIFIC_INIT
PLATFORM_SPECIFIC_INIT is deprecated.

Update nxp hal to sha 77815705c465627b8436cbac51f0bf0594bbeba2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-16 15:12:18 -04:00
Anas Nashif
f438696281 soc: mcxa156: use soc hooks
Use SoC hooks instead of legacy z_arm_platform_init.

Fixes #78386

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-16 15:12:18 -04:00
Anas Nashif
6cf12c1aa9 tests: gen_isr_table: remove misnamed platform
This platform does not exist, causing ci failures due to recent
additional checks added.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-16 14:53:58 -04:00
Joakim Andersson
f5e047e8c3 doc: Document deprecated stm32 MCO kconfig options for MCO
Document deprecated stm32 MCO Kconfig options in favour of
setting MCO through devicetree.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
e67f629094 drivers: clock_control: Deprecate Kconfig for MCO configuration
Deprecate support for configuring the MCO source and prescaler from
Kconfig configurations.
This is now done by devicetree and an MCO driver instead, which also
configures the pin to be used by the MCO peripheral.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
b4ada0dbd1 samples: stm32: mco: Add disco board which has 2 MCO instances
Add stm32f746g_disco board to MCO sample.
This board has 2 MCO instances so useful to show multiple instances
as well as checking the implementation.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
438ed89238 samples: stm32: mco: Update sample to use dts instead of Kconfig
Update MCO board sample to use devicetree information instead of Kconfig
configurations.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
a624fe0f3d boards: Add MCO support for the stm32c0xx family
Add MCO support for the stm32c0xx family.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
0a2c6a0023 include: dt-bindings: clock: fix stm32f7 missing HSE and PLLI2S_R source
Fix stm32f7 missing the definition for HSE and PLLI2S_R clock source.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
3b9c34d085 dts: st: Add MCO node to STM32 boards
Add MCO device nodes to the STM32 boards.
The set of supported boards are chosen to replace what is currently
supported in Kconfig.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
929c4507fc drivers: Add driver for STM32 MCO peripheral
Add device driver for STM32 MCO peripheral which takes configures
the MCO clock source and prescaler, and outputs it on one of the GPIO
pins.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
4b9dfe2a16 include: Add STM32_MCO_CFGR bit encoding and decoding
Add macro for encoding MCO bit values into the CFGR register
of RCC. Add macros for decoding and extracting the different fields.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
bd592fac8b dts: bindings: Add stm32 microcontroller clock output binding
Add stm32 microcontroller clock output binding.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
9925ce792e include: dt-bindings: Add MCO select and prescaler macros for CFGR reg
Add MCO select and prescaler macros to set bits in the RCC CFGRx
register.
The set of supported boards are chosen to replace what is currently
supported in Kconfig.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
efe72a3c7a dt-bindings: clock: Add clock sources for stm32f1x/10x for MCO
Add clock sources that can be output by the MCO on the stm32f1x and
stm32f10 connectivity line devices.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
807ccf5b03 drivers: clock_control: Add clock sources to common enabled_clock check
Add clock sources PLL2CLK, PLL3CLK and EXT_HSE.
Needed to check that these clocks are enabled in MCO code.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Joakim Andersson
3c3487ae07 drivers: clock_control: Expose enabled_clock for clock driver library
Expose the helper function enabled_clock so that it can be used in
other clock library sources.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-09-16 20:19:57 +02:00
Luis Ubieda
00abc5a661 spi: rtio: Move spi_rtio_copy to spi_rtio
To group all common APIs for SPI RTIO.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-16 20:19:51 +02:00
Luis Ubieda
bd8a23f719 spi: rtio: Extract common APIs into separate file
Extracted common SPI RTIO operations from the spi_mcux_lpspi driver
into spi_rtio, which should be common across RTIO drivers.

Tested with spi_loopback with and without CONFIG_SPI_RTIO. Ran on
mimxrt1010_evk.

Also, verified the other SPI RTIO driver (spi_sam) is not broken by
these changes (tested building for target: robokit1 with the same
conditions as above).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-16 20:19:51 +02:00
Luis Ubieda
b135cc5e46 spi: spi_mcux_lpspi: Removed spin lock from iodev_start
Does not seem to be required. This allows hiding away the spin lock APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-16 20:19:51 +02:00
Luis Ubieda
7510a17c18 spi: mcux_lpspi: Refactor driver to extract common RTIO functionality
As a step to make them common code: spi_rtio.c.
Verified this refactorization builds and passes spi_loopback, both with
CONFIG_SPI_RTIO enabled, as well as disabled. Tested on mimxrt1010_evk.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-16 20:19:51 +02:00
Lucas Tamborrino
4385785f02 drivers: i2c: esp32: Fix DT node instance.
DT_INST macros were not getting the info from the correct
node.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-09-16 20:19:43 +02:00
Sven Ginka
d2bded5efb board: sensry: Add support for sy1xx
Add board support for eval board ganymed_bob, which
is a break-out-board for both soc variants.
Variants of the soc are GBM and GEN1.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
Sven Ginka
686cbc90f6 driver: timer: Add support for sy1xx
Add sys timer driver for Sensry's RISCV32 based SY1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
Sven Ginka
7443a2c703 driver: serial: Add support for sy1xx
Add uart driver for Sensry's RISCV32 based SY1xx.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
Sven Ginka
402f3d24c4 soc: sensry: Add support for SY120-GBM and SY120-GEN1
Add soc support for Sensry's RISCV32 based SY1xx.
Variants of the soc are GBM and GEN1.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-09-16 20:19:31 +02:00
IBEN EL HADJ MESSAOUD Marwa
ec08e1c0e8 drivers: ethernet: Modify RX thread creation and update KConfig
This change will allow users to configure the Ethernet RX thread
according to their specific real-time requirements.
Adding preemptive threading helps to reduce jitter and
the impact of Ethernet traffic on real-time performance.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-09-16 20:19:16 +02:00
Torsten Rasmussen
1bea5fcacb sysbuild: fix extra kconfig targets when using sysbuild
Zephyr provides a feature to hook in custom menuconfig implementations
by setting EXTRA_KCONFIG_TARGETS and then defining the corresponding
command to invoke as EXTRA_KCONFIG_TARGET_COMMAND_FOR_<target>.

This feature is broken with sysbuild because sysbuild will try to create
multiple custom targets with identical names.

This commit fix the sysbuild handling of extra kconfig targets.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-16 20:19:09 +02:00
Fabrice DJIATSA
f7ebd61ae9 tests: drivers: dac: dac_api: src: update dac_api driver test
-add nucleo_u083rc and stm32u083c_dk  boards for testbench purpose.
- add min_ram property to skip test on boards with little ram size.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-16 20:19:01 +02:00
Fabrice DJIATSA
1ae6e61ec0 boards: st: add dac node in dts file and update docs
-enable dac in nucleo_u031r8, stm32u083c_dk and nucleo_u083rc
- add dac as new supported interface in docs
- update yaml files

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-16 20:19:01 +02:00
Fabrice DJIATSA
e33e997c7d dts: arm: st: u0: add dac node in dtsi file
all stm32u0 boards have only one and same
dac peripheral.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-16 20:19:01 +02:00
Nathan Olff
eb3f718b2c tests: drivers: add fracn test for stm32h7 clock configuration tests
add overlay to use fracn with HSI in clock configuration tests for
stm32h7

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Nathan Olff
7a094e376f drivers: clocks: remove check for sysclock in h7 clocks
remove check for system clock frequency in clock_stm32_ll_h7 because of
addition of fracn (difficult to handle)

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Nathan Olff
f979252cea drivers: use fracn in clock stm32h7 driver
use fracn value if defined for each PLL 1, 2 and 3 based on stm32u5 code

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Nathan Olff
9dd25adc79 dts: add fracn to STM32H7 PLL clocks
add fracn to STM32H7 pll clock binding

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-09-16 20:18:54 +02:00
Emil Gydesen
4b68043ebb Bluetooth: MPL: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This prevents any race conditions with the MPL implementation.
Modifies where the new atomic value is set and cleared
so that initialization gets to finish before allowing
any reads.

Due to how the MPL is structured, and how a select cannot
be rejected from OTS, this does not give a perfect solution.
Ideally we need a separate object per OTS object, rather than
a shared one, and/or the OTS implemenation would allow
us to reject a select if the object is not currently
available or ready.

This commit does not fix the above issues, as that is a
larger undertaking.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-16 20:18:39 +02:00
Sylvio Alves
0aec059630 drivers: sdhc: esp32: remove unused code
Removed unused entry in SDHC driver and initialize
variables accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-16 20:18:33 +02:00
Johann Fischer
e06c7fcbff boards: nucleo_h7a3zi_q: do not force USB_DC_HAS_HS_SUPPORT
SoC and the board have only full speed phy.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-16 20:18:26 +02:00
Torsten Rasmussen
69d2c0f19e cmake: add toolchain_ld_<name> macros to FindDeprecated
Follow-up: #77887

The macros:
- toolchain_ld_base
- toolchain_ld_baremetal
- toolchain_ld_cpp

was deprecated in 5db1f1ae8f but no check
was added to FindDeprecated.cmake, meaning toolchains still providing
those macros was not getting a proper deprecation warning.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-16 20:18:17 +02:00
Lukasz Mrugala
14a72b5158 scripts: Plug TwisterStatus type gaps
Some dict.get() calls did not use a TwisterStatus
as a default value, thus using a NoneType where
TwisterStatus should appear.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-16 20:18:09 +02:00
Olivier Lesage
788d1a908e bluetooth: host: improve log for unhandled vs events
Aligns the logging unhandled vs events with the regular ones.
Now it prints out the code and length.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-16 20:17:57 +02:00
Mathieu Choplain
277504cfbc soc: st: stm32wb0: support SoCs without SMPS output current limit
The STM32WB06 and STM32WB07 SoCs do not support SMPS output current limit.
This makes the LL_PWR_SetSMPSPrechargeLimitCurrent function and all the
LL_PWR_SMPS_PRECH_LIMIT_CUR_xxx defines not visible when one of these SoCs
is selected, resulting in a build failure.

Fix this by only handling SMPS current limit when the feature is available.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-16 20:17:50 +02:00
Mathieu Choplain
0c13100797 dts: bindings: power: add note on SMPS current limit for STM32WB0
Indicate in the STM32WB0 power controller binding that the SMPS output
current limitation is a feature only available on STM32WB05 and STM32WB09.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-16 20:17:50 +02:00
Raffael Rostagno
cc6ba10142 soc: espressif: Default MCUboot mode for ESP32 family
Include default MCUboot mode for all ESP32 chips

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-16 20:17:44 +02:00
Keith Packard
2803d4bbb4 picolibc: Update to version 1.8.7
Integrate new upstream release.
Include strnlen_s and aarch64 cmake fixes.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
962e42cf1d tests, samples: Define _POSIX_C_SOURCE where needed
Various tests and samples use POSIX-only functions. Define _POSIX_C_SOURCE
to ensure they are visible.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
6e1210a09e tests/c_lib: Don't test undefined behavior of asctime and asctime_r
These functions requre non-null parameters; passing them NULL
values is undefined. Remove tests which are not valid.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
dc7c20adf9 posix: sysconf.c uses POSIX values
We need to add _POSIX_C_SOURCE to this file as it uses POSIX values from
limits.h including IOV_MAX, CHILD_MAX and ARG_MAX.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
5973a71e1f posix: options/shm.c needs _POSIX_C_SOURCE
This file uses PATH_MAX, which is defined in limits.h when _POSIX_C_SOURCE
is set.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
ea366ecc61 posix: Need sys/types.h to get suseconds_t defined
Picolibc's sys/_timeval.h (which Zephyr shouldn't be using) needs
sys/types.h to be included first so that __suseconds_t is defined.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
8d176ea97d libc/picolibc: Don't replace picolibc time _r functions
Select TC_PROVIDES_POSIX_C_LANG_SUPPORT_R to keep Zephyr from
including the common libc implementation of the various _r APIs.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
3eedb20d7a lib/posix: Only enable Zephyr _r APIs when toolchain doesn't
Check TC_PROVIDES_POSIX_C_LANG_SUPPORT_R before selecting
the COMMON_LIBC_*_R APIs.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
ac3df26f0a libc/common: Remove redundant Kconfig POSIX_THREAD_SAFE_FUNCTIONS uses
POSIX_THREAD_SAFE_FUNCTIONS already selects POSIX_C_LANG_SUPPORT_R and
POSIX_C_LANG_SUPPORT_R alread selects all of the COMMON_LIBC_*_R values.
That makes the 'default y if POSIX_THREAD_SAFE_FUNCTIONS' clauses in these
symbols redundant.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
98debeea78 posix: Define _POSIX_C_SOURCE to gain access to POSIX functions
options/fs.c and options/timer.c both use POSIX-only functions. To ensure
those symbols are visible from the underlying C library, define
_POSIX_C_SOURCE.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
a7cfe31731 posix: Don't require struct itimerspec in posix/time.h
struct itimerspec is only required to be available when building with
_POSIX_C_SOURCE defined. Applications including posix/time.h without
defining _POSIX_C_SOURCE will need to have a forward declaration of struct
itimerspec even if they don't use the functions requiring that type.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
5ad762f22e posix: Avoid redefining TZNAME_MAX
When _POSIX_C_SOURCE is defined by a source file, a POSIX-conforming C
library will define TZNAME_MAX in limits.h. Avoid redefining this
in Zephyr's posix_features.h.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
9da477543d posix: Avoid stepping on picolibc clockid_t and timer_t
picolibc sets _CLOCKID_T_DECLARED and _TIMER_T_DECLARED, not
__clockid_t_defined and __timer_t_defined.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
94043dbefe subsys/shell: cmd_date_set uses gmtime_r, a POSIX function
Define _POSIX_C_SOURCE for this file to make sure gmtime_r is visible.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
88359d998c subsys/llext: Allow .exported_sym to be between other data sections
There's no reason for the .exported_sym data to always land at one end of a
data region; the order of sections depends on the whim of the compiler and
assembler.

Ignore overlaps between that region and other data regions.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
40ac96aa57 net: dns: Ignore GCC warnings in mdns_responder.c
GCC complains about struct sockaddr accesses due to the various
address-family-specific variants being of differing sizes. Let's not
mess with code (which looks correct), just silence the compiler.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Keith Packard
7f412924d3 libc/common: Define _POSIX_C_SOURCE to gain access to POSIX functions
ctime.c and localtime_r_utc.c may use POSIX-only functions; to ensure those
are visible from a POSIX-conforming C library, define _POSIX_C_SOURCE in
these source files.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 20:17:35 +02:00
Felipe Neves
a372220ade video: esp32_dvp: change default log level
to the recent CONFIG_VIDEO_LOG_LEVEL option.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-16 20:17:26 +02:00
Carles Cufi
9f59d89922 boards: nordic: nrf9280pdk: Remove doc page
This board is not currently available for the general public, and the
documentation page adds no value whatsoever. Remove it until the board
is finally available and its features and support can be documented
properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-09-16 20:17:17 +02:00
Josuah Demangeon
dff5307b25 samples: drivers: video: complement renaming from subsys/ to drivers/
Commit 911abc33e6 did move the samples
from subsys/ to drivers/, and more contribution came in parallel.

This covers extra board configurations added later which also need
moving.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-16 20:17:09 +02:00
Fabian Blatz
20b218985c tests: drivers: stepper: stepper_api: Fix UAF of poll signal
The test_target_position test used a stack allocated `poll_signal` which is
kept as a refrence inside the gpio driver. Since the time for polling the
signal was chosen pretty narrow, the function exited with the driver still
trying to signal the stack allocated value upon movement completion.
Fix by adding the structs to the test fixture and increase the timeout.

Resolves #78466.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-16 20:17:01 +02:00
Reto Schneider
23eca6362d boards: silabs: slstk3401a: Fix unit and first address mismatch
This fixes the following warning:

> unit address and first address in 'reg' (0x3e800) don't match for
> /soc/flash-controller@400e0000/flash@0/partitions/partition@fe800

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-16 13:52:07 +02:00
Keith Packard
d7aaf9bee3 tests/c_lib: Ensure TZ value is UTC for ctime/ctime_r tests
When testing these functions with CONFIG_NATIVE_LIBC, force the TZ
environment variable to UTC to ensure they produce the expected results.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-09-16 13:51:50 +02:00
Alberto Escolar Piedras
6ce257cc76 lib/libc/Kconfig: Fix libC depends with NATIVE_APPlICATION
NATIVE_APPlICATION (old native_posix) does not support bulding with the
any other library than the host libC (EXTERNAL_LIBC).

MINIMAL_LIBC_SUPPORTED defaulted to y always, and instead the depends
was set in the MINIMAL_LIBC choice.
This lead to the right library selected, but an incorrectly set
MINIMAL_LIBC_SUPPORTED.
Many tests filter based on MINIMAL_LIBC_SUPPORTED, so they were
not filtered out appropriately.

Let's place the depends in the right place to avoid this problem.
Also remove a redundant depends on for PICOLIBC and NEWLIB_LIBC
which already have the dependency in their respective _SUPPORTED
option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-16 13:51:50 +02:00
Jamie McCrae
9a722f7983 doc: services: device_mgmt: mcumgr: Add enum mgmt to table
Adds enum mgmt to the table of supported services

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-16 13:51:38 +02:00
Robert Lubos
937d4b6f67 samples: net: http_client: Fix busy-looping in case of errors
The http_client sample ignored connect() errors and attempted to run
HTTP query even if the connection failed.

Additionally, in case the query failed, the sample called `exit(1)`
directly, causing busy-looping in the sample. This prevented the logger
output from being printed.

Both of those issues made the sample behavior very confusing when it
encountered connection problems. The sample did not print any output at
all (due to busy looping) or printed several connect failures (due to
ignoring connect() results). This commit fixes those problems.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-16 13:51:21 +02:00
Mathieu Choplain
3328d7cb01 drivers: adc: stm32: don't fail init if pinctrl is not provided
Commit 47187a9ec9 made the `pinctrl` property
of STM32 ADCs optional, to allow usage of internal channels without wasting
GPIO pins. However, the driver was not adapted to support this new usecase.

(The real bug comes from commit 93956b2073,
that transitioned from a custom `stm32_dt_pinctrl_configure` function to
the standard `pinctrl_apply_state`, without accounting for the fact that
the former returns 0 when pinctrl is empty, but the latter returns -ENOENT)

Modify the driver to work even if no `pinctrl` is present on the ADC node.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-16 13:50:42 +02:00
Anas Nashif
0bca19588a tests: remove misnamed platforms from platform_exclude
Few tests with wrongly names platforms. This section is now being
verified for correctness like all others.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-16 10:07:51 +02:00
Anas Nashif
02bca9f6f6 twister: abort on unrecognised platforms
identify misnamed platforms and abort.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-16 10:07:51 +02:00
Johan Hedberg
d33dbdb6f9 doc: modules: Document conventions for auto-generated Kconfig options
Document the recommended practice regarding having default definitions for
module-specific Kconfig symbols.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-16 10:07:13 +02:00
Johan Hedberg
bdcd54e4ca modules: Kconfig: Provide default definitions for modules with blobs
There are HCI drivers which reference the module-specific Kconfig symbols
which are auto-generated when the modules are present. Provide default
definitions for these symbols in case the modules are missing, so that
compliance checking doesn't stumble over seemingly non-existent Kconfig
options.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-16 10:07:13 +02:00
Maureen Helm
13ff70a6f9 drivers: sensor: tdk: Refactor cmake and kconfig to vendor subdirectory
Refactors the cmake and kconfig bits of the tdk sensor drivers into the
vendor subdirectory to make them consistent with other vendor-sorted
sensor drivers. The tdk driver implementations were previously moved
into the vendor subdirectory in commit
41f1c3a2b7.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-09-16 10:06:03 +02:00
Benjamin Cabé
9a16b93868 samples: hello_world: use zephyr:code-sample directive
Adds missing code-sample directive to the Hello World sample in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 10:05:18 +02:00
Benjamin Cabé
f1374b7fa6 doc: misc Sphinx/ReST lint fixes
fixed some ReST/Sphinx lint issues missed in earlier cleanups
prior to introducing Sphinx-linter in compliance check

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 10:05:18 +02:00
Hake Huang
7f63faa4f5 twister: hwmap: add script parameter support
for pre/post/post_flash script, add timeout as param

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-09-16 10:03:53 +02:00
Guennadi Liakhovetski
1dde70637d Intel: ACE: move hpsram_mask to a data section
On platforms with enforced memory access modes, .text is read-only.
Move hpsram_mask to a cached data section to fix PTL.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-16 10:03:26 +02:00
Sean Madigan
aa67cb238a bluetooth: shell: Add CS to BT shell with set default settings command
Use a new file and command for this where all CS commands
can live.

Added support for bt_cs_set_default_settings command.

Added test case where shell is built with CS to ensure code
is built in CI.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-09-16 10:02:58 +02:00
Sean Madigan
aedb330c70 bluetooth: host: Add support for CS set default settings
Added support for a new API for setting default channel
sounding settings, this is mainly a wrapper around the HCI
command.

For this add a new module for channel sounding, where new
channel sounding APIs will go.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-09-16 10:02:58 +02:00
Sean Madigan
7dff1c1374 bluetooth: kconfig: Add channel sounding kconfigs
Add new controller and host kconfigs for Bluetooth 6.0
Channel Sounding.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-09-16 10:02:58 +02:00
Yong Cong Sin
475ff826d6 drivers: intc: plic: fix IRQ on every hart regardless of mapping
Allow IRQs to work on every hart regardless of the mapping
of the contexts.

Add a test to validate the hart-context mapping.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-16 10:02:08 +02:00
TOKITA Hiroshi
8b066bcfe7 dts: bindings: clock: renesas_ra: Change _ to - in property name
`-` is preferred over `_` in devicetree property names.
Since, change `clk_src`, `clk_div`, and `clk_out_div` to
`clk-src`, `clk-div`, and `clk-out-div`.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-16 09:59:55 +02:00
Benjamin Cabé
83bdc7f1d9 doc: doxygen: add kconfig_dep alias
This new alias provides a handy shortcut for listing the Kconfig options
that are required for a given symbol to be available.

Fixes #76578

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 09:57:16 +02:00
Daniel Leung
da5f7e1816 xtensa: mpu: update hardware if manipulating current domain
If adding/removing to the domain of the current running
thread, we need to update the hardware MPU regions or else
the addition or removal would not be reflected to current
running thread.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-16 09:55:53 +02:00
Daniel Leung
6bd0dcf920 xtensa: mpu: make sure write to MPU regions is atomic
This adds a spinlock to make sure writing to hardware MPU
regions is atomic, and cannot be interrupted until all
regions are written to hardware.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-16 09:55:53 +02:00
Vinayak Kariappa Chettimada
50b07f9480 Bluetooth: Controller: Add missing branch prediction in lll_scan_aux
Add missing branch prediction likely/unlikely hint.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-13 17:29:53 -05:00
Vinayak Kariappa Chettimada
176d8ff760 Bluetooth: Controller: Define a macro to validate aux offset value
Define a macro to validate aux offset value as it is checked
both in LLL and ULL execution contexts.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-13 17:29:53 -05:00
Vinayak Kariappa Chettimada
9fa18600ee Bluetooth: Controller: Fix hang due to loop in node_rx list
Fix Controller hang due to infinite looping caused by
duplicate node_rx enqueued in auxiliary context.

When LLL scheduling is not applied due to invalid aux offset
then ULL scheduling too would skip setting up the reception
after similarly checking the validity of aux offset required
to schedule the reception of auxiliary PDU. This check in
ULL was after the received node_rx being enqueued into the
auxiliary context causing a loop in the list of node_rx.

Dequeue of a list with a loop of node_rx caused an infinite
loop execution in the Controller.

Regression introduced in commit 3590bd648f ("Bluetooth:
Controller: Fix missing invalid aux offset check").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-13 17:29:53 -05:00
Vinayak Kariappa Chettimada
437bfa5b1a Bluetooth: Controller: Infinite loop assertion on node_rx release
Add assertion check to catch infinite loop due to incorrect
node_rx release.

If same node_rx is released twice then it can lead to
infinite looping when releaseing link or node_rx buffers.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-13 17:29:53 -05:00
Benjamin Cabé
86af9c4b07 samples: arch: fix toctree hierarchy
fix glob pattern so that samples' hierarchy is not lost.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:38:19 -05:00
Benjamin Cabé
f4717acd99 samples: arch: use zephyr:code-sample directive
Adds missing code-sample directive to all the arch samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:38:19 -05:00
Benjamin Cabé
c53e8e7086 boards: doc: reference tfm_ipc sample using zephyr:code-sample: role
tfm_ipc sample is now using the zephyr:code-sample directive so it should
be referenced with the respective role, not :ref: anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:35:37 -05:00
Benjamin Cabé
fd4f3ce246 scripts: compliance: add sphinx-lint linter
ReStructuredText can sometimes be tricky to get right, especially for
folks that might be more familiar with Markdown.

This adds a Sphinx/RST linter to the compliance check script to help
catch common issues that can easily go unnoticed and cause rendering
issues.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 11:43:04 -05:00
Benjamin Cabé
88983f71d8 doc: releases: fix kconfig role typo in mbedtls section
trivial typo fix where single backticks should be used instead of double
for the sphinx role kconfig:option

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 11:42:51 -05:00
Benjamin Cabé
6cf5ac5879 doc: guidelines: drop mention of "any" links
Commit 204860857e (PR #41061) dropped
support for "any" as the default role, so this should be dropped from
the documentation guidelines as well.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 11:42:51 -05:00
Benjamin Cabé
df294e34e1 doc: sphinx-lint: fix bad usage of "default role"
Fixes bad usage of single backticks in lieu of double backticks for
rendering inline literals, or simple '*' for italics.

When appropriate, a better construct than double backticks has been
selected (ex. :file:, :kconfig:option:, :c:func:, ...), or proper :ref:
have been used if the original intention was to have a link.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 11:42:51 -05:00
Emil Gydesen
49bd80828d Bluetooth: VOCS: Replace bools with atomic
Replace the booleans used by the VOCS client to use
an atomic value instead.

The flags are modified to be used in a way that prevents
race conditions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-13 11:38:27 -05:00
Sylvio Alves
aa3dd674a9 soc: esp32xx: update flash initialization
Rework how flash is initialized in esp32 SoC.
"esp_flash_app_init()" will make sure proper cache handling
will be set in place.i

Fixes #77551

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-13 11:36:58 -05:00
Jukka Rissanen
9cb3490762 samples: net: http_server: Add information about overlays
Enhance documentation and add overlay information to readme file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 11:34:40 -05:00
Benjamin Cabé
171f687136 samples: tfm_integration: use zephyr:code-sample directive
Adds missing code-sample directive to all the tfm_integration samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 11:33:54 -05:00
Anuj Pathak
1471c2f814 drivers: led: lp5562: Add PM Device support
- Add PM_DEVICE support for power management

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-13 13:43:33 +02:00
Anuj Pathak
c13eabb059 drivers: led: lp5562: Add enable-gpios control
- Add handling of enable-gpios control on init

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-13 13:43:33 +02:00
Anuj Pathak
ac4c497467 dts: bindings: lp5562: Add enable-gpios property
- Driver is enabled/disabled using a EN/VCC GPIO
- Updated release notes to reflect the same

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-13 13:43:33 +02:00
Bas van Loon
77779f321d dts: stm32h7: Add missing ITCM memory to stm32h743.dtsi.
The ITCM is available on all STM32H75x/74x couple to the M7 core.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2024-09-13 13:43:24 +02:00
Benjamin Cabé
d7e031c4d3 samples: doc: clean-up table of contents for board samples
Board samples were listed in a very flat way before.
This commit introduces the appropriate toctrees to fix this.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
b1063c26c6 samples: boards: ti: use zephyr:code-sample directive
Adds missing code-sample directive to all the TI samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
ce4217475b samples: boards: enjoydigital: group Enjoydigital board samples
Group all Enjoydigital board samples in samples/boards/enjoydigital to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
1c63f92a94 samples: boards: nuvoton: group Nuvoton board samples
Group all Nuvoton board samples in samples/boards/96boards to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
6daefeb159 samples: boards: raspberrypi: group Raspberry Pi board samples
Group all Raspberry Pi board samples in samples/boards/raspberrypi to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
62a3db704a samples: boards: google: group Google board samples
Group all Google board samples in samples/boards/google to
keep samples/boards/ organized by vendor
Added zephyr-code-sample directive to twinkie sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
0cfadc1d83 samples: boards: phytec: group Phytec board samples
Group all Phytec board samples in samples/boards/phytec to
keep samples/boards/ organized by vendor
Added zephyr-code-sample directive to mesh badge

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
e2c1b93a5c samples: boards: intel: group Intel board samples
Group all Intel board samples in samples/boards/intel to
keep samples/boards/ organized by vendor
Added missing code-sample directive to the code relocation sample.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
b363ff12f1 samples: boards: quicklogic: group quicklogic board samples
Group all Quicklogic board samples in samples/boards/quicklogic to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
28fe72ea5e samples: boards: stm32: group STM32 board samples
Group all STM32 board samples in samples/boards/st to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
a755f0e54a samples: boards: stm32: use zephyr:code-sample directive
Adds missing code-sample directive to all the STM32 samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
b3edf89213 samples: boards: microchip: group Microchip board samples
Group all Microchip board samples in samples/boards/96boards to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
2f868b2673 samples: boards: 96boards: use zephyr:code-sample directive
Adds missing code-sample directive to all the 96boards samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
a89ed6595b samples: boards: 96boards: group 96boards board samples
Group all 96boards board samples in samples/boards/96boards to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
cfd35d0c2c samples: boards: bbc_microbit: use zephyr:code-sample directive
Adds missing code-sample directive to all the micro:bit samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
fc059d1d7a samples: boards: bbc: group BBC board samples
Group all Phytec board samples in samples/boards/bbc to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
0eea948480 samples: boards: nxp: use zephyr:code-sample directive
Adds missing code-sample directive to all the NXP samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
52ee62d962 samples: boards: nxp: group NXP board samples
Group all NXP board samples in samples/boards/nxp to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
9849845ca3 samples: boards: nrf: group Nordic board samples
Group all Nordic board samples in samples/boards/nordic to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
91b9109562 samples: boards: nrf: use zephyr:code-sample directive
Adds missing code-sample directive to all the nRF samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
b93395fceb samples: boards: espressif: group Espressif board samples
Group all Microchip board samples in samples/boards/espressif to
keep samples/boards/ organized by vendor

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Benjamin Cabé
36db5a0e66 samples: boards: espressif: use zephyr:code-sample directive
Adds missing code-sample directive to all the ESP32 samples in
preparation for upcoming changes to the Zephyr documentation that will
be leveraging the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-13 13:43:09 +02:00
Jamie McCrae
7c3fe8feca west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  e890df7ab975da181a9f3fb3abc470bf935625ab

Brings following Zephyr relevant fixes:
  - e890df7a boot: zephyr: Add ESP32C2/ESP8684 support
  - 5d5f0492 bootutil: Fix AES and SHA-256 contexts not zeroized
    with mbedTLS
  - ca06b9fe boot: zephyr: Add fallback to USB DFU
  - 43a49a3b bootutil: Add better mode selection checks
  - 956311d2 boot: Make boot_enc_valid take slot instead of image
    index
  - 242db1a9 boot: zephyr: boards: Add nrf54l15dk configuration
  - 651775b5 boot: zephyr: board: Fix nrf54l15pdk Kconfig fragment
  - a3762626 boot: zephyr: MCXN947 currently only does not support
    swap mode

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-13 13:42:47 +02:00
Reto Schneider
db7a3901bd cmake: modules: dts: Restore gen_defines.py warnings
Ever since 059aae7c91 (cmake: modules:
dts: make Device Tree error messages more visible, PR #76472), warnings
generated by gen_defines.py got only printed when the exit code signaled
an error.

Without this patch, the warning gets swallowed and the build continues:

```
$ west build --pristine --board nrf54l15pdk/nrf54l15/cpuapp \
  samples/userspace/hello_world_user
<snip>
-- Found BOARD.dts:
<snip>/boards/nordic/nrf54l15pdk/nrf54l15pdk_nrf54l15_cpuapp.dts
-- Generated zephyr.dts: <snip>/build/zephyr/zephyr.dts
<snip>
```

With this patch, the behavior is back to how it was before
059aae7c91:
```
$ west build --pristine --board nrf54l15pdk/nrf54l15/cpuapp \
  samples/userspace/hello_world_user
<snip>
-- Found BOARD.dts: <snip>/nrf54l15pdk/nrf54l15pdk_nrf54l15_cpuapp.dts
unit address and first address in 'reg' (0x5004c000) don't match for
/soc/peripheral@50000000/vpr@4c000/mailbox@1
-- Generated zephyr.dts: <snip>zephyr/build/zephyr/zephyr.dts
<snip>
```

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-13 13:42:40 +02:00
Rubin Gerritsen
7b117630ea samples: bluetooth: direction_finding_connectionless_rx: Fix sync timeout
The sync timeout is in 10 ms units. The sync_create_timeout_ms variable
already takes into account that we want to have a timeout of at least
7 events.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-13 13:42:33 +02:00
Kapil Bhatt
be295a7f02 drivers: nrfwifi: Get RTS threshold
Add api support to get RTS threshold.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-13 13:42:26 +02:00
Kapil Bhatt
6c6f5beee7 hostap: Add rts threshold get api support
Add api to get rts threshold.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-13 13:42:26 +02:00
Jukka Rissanen
d7bef35ecd manifest: net-tools: Update net-setup to add multi interface config
Update net-setup script and config to support creation of
multiple network interfaces in the host.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Jukka Rissanen
9327bfa1f6 doc: releases: migration-guide-4.0: Add missing bridge GH links
The two Ethernet bridge sections were missing GH links.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Jukka Rissanen
cd4b854c89 net: bridge: Ignore promisc mode errors for native-sim
We do not need promiscuous mode setting in host side when testing
bridging with native-sim, so just ignore errors in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Jukka Rissanen
98a21a823c drivers: eth: native_sim: Fix error output when creating interface
The return value already contains the errno so use it when printing
the error message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Jukka Rissanen
0aaf0aa976 doc: net: Add info how to test Ethernet bridging with native-sim
Add instructions how to test Ethernet bridging when using
native-sim board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-13 13:42:20 +02:00
Yangbo Lu
42b7a9708a boards: nxp: imx95_evk: remove redundant CONFIG_PINCTRL in defconfig
Removed redundant CONFIG_PINCTRL in defconfig which was
selected by driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-13 13:42:13 +02:00
Yangbo Lu
4ea483a173 boards: nxp: imx95_evk: improve doc
Improved doc with using exact board name and some fix-up.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-13 13:42:13 +02:00
Yangbo Lu
e9a41edc8b boards: nxp: imx95_evk: remove empty cmake files
Removed empty cmake files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-13 13:42:13 +02:00
Lukasz Mrugala
f78949b18c scripts: twister: Process KeyboardInterrupt Hardening
If you interrupt process() operation, we want Twister
to exit as gracefully as it can. This avoids the
UnboundLocalError that could appear e.g.
when interrupting the operation via SIGINT.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-13 13:42:05 +02:00
Tomasz Moń
4c6b1e5a65 usb: device_next: uac2: Support multiple sample rates
Add callbacks for setting and getting the sample rate. The callbacks are
optional if all Clock Source entities support only one sample rate.

This commit results in working High-Speed operation with Windows UAC2
driver when the Clock Source is host-programmable. Windows UAC2 driver
won't work if setting sample rate fails even if Clock Source supports
only one sample rate.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-13 09:21:58 +02:00
Tomasz Moń
57666d3eff drivers: udc_dwc2: Send isochronous data on next SOF
Do not schedule isochronous data on current frame. While doing so can
work at Full-Speed, it is pretty much impossible to do it quickly enough
at High-Speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-13 09:21:58 +02:00
Tomasz Moń
d5aa42f93a usb: device_next: uac2: Write feedback as soon as possible
Queue explicit feedback write once the previous one finishes in order to
make it possible to cope with 8x faster High-Speed pace. This matches
the originally intended behavior described in comment.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-13 09:21:58 +02:00
Tomasz Moń
2551ddca11 usb: device_next: uac2: Support High-Speed operation
Generate Full-Speed and High-Speed descriptors based on full-speed and
high-speed instance properties. Use appropriate descriptor set based on
active speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-13 09:21:58 +02:00
Emil Lindqvist
ca41413038 mbedtls: add ability to use custom memory section for mbedtls heap
This commit introduces the option to place the mbed TLS heap in a custom
memory section. The heap might be quite large depending on concurrent
TLS connections, thus it might be needed to place this manually

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-13 09:18:11 +02:00
Tu Nguyen Van
8233aa122a west.yaml: pickup the change in hal_nxp
pickup the change in hal_nxp about add support
the missing features and remove the unsupported bits

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-09-13 09:18:05 +02:00
Damian Nikodem
8c997b35ab driver: ssp: add support for blob30 on PTL
Adding support for SSP blob handling in version 3_0 for PTL.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-09-13 09:17:56 +02:00
Sreeram Tatapudi
c61e06739c soc: infineon: cat1b: Enable flash memory caching
Enable flash memory caching

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-09-13 09:17:50 +02:00
Tomi Fontanilles
1379554e11 modules: mbedtls: add Kconfig option for MBEDTLS_X509_CRT_WRITE_C
And fix `X509` -> `X.509`.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-13 09:17:44 +02:00
Yong Cong Sin
035c822253 arch: riscv: fill all IRQ stacks with 0xAA
Fill the memory of all CPU's IRQ stack with 0xAA on init, so
that `z_stack_space_get` can calculate the remaining space
correctly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-13 09:17:34 +02:00
Tom Chang
0726198776 mgmt: ec_host_cmd: npcx: workaround for backend SHI
There is an issue on the SHI hardware peripheral to detect CS
rising/failing with bits CSnFE/CSnRE in the EVSTAT2 register in
npcx9m7fb chip. This commit workarounds it by using MIWU to detect the
CS rising and failing.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-09-13 09:17:23 +02:00
Tom Chang
f2e11e424e dts: npcx: change the default memory configuration of npcx9m7fb
The internal flash size of npcx9m7fb is 512KB. Reduce the default
Code RAM size from 320KB to 256KB because the Code RAM size is limited
by FLASH_SIZE/2 in the Chromebook EC application.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-09-13 09:17:23 +02:00
Michal Smola
684a27d8ef soc: mcxc: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Generic hook infrastrucutre was added to Zephyr, but NXP MCXC SoCs
were not updated accordingly.
Use generic hook infrastrucutre for MCXC SoCs.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-13 09:17:14 +02:00
Jacob Winther
b211e1b3a3 boards: nrf52840 common partition dtsi
Add common default flash partition layout for nrf52840 as many boards
have used identical flash layouts.

The default flash layout was updated to remove scrach in 2022 (9a84258)
but almost all boards were still using the previous layout, so this
updates them to the new layout with allows for larger applications.

This commit also incorporates feeedback from @nordicjm in PR #77791 to
change slot0 to 0x00077000 and slot1 to 0x00075000: "If you use swap
using move, you need a sector for the data to be moved up by, and you
need space for the swap status fields, which is about a sector, so by
making the changes here you get the full 0x65000 for an image, without
these changes you get 0x64000.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-12 17:06:34 -04:00
Tom Burdick
db22e1a3f0 tests: Fix the platform exclude board name
qemu_xtensa_dc233c didn't pan out like I expected, needed to be
qemu_xtensa/dc233c/mmu to be excluded.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-12 17:05:24 -04:00
Valerio Setti
91fa8a2b63 tests: net: socket_tls: test different TLS configurations with sockets
This commit adds a test to showcase how to configure TLS 1.2 and 1.3
socket connections against an OpenSSL server. Only a limited number
of combinations are available for now:

- TLS 1.2
	- RSA certificate and key exchange.
	- ECDSA certificate and ECDHE key exchange.

- TLS 1.3 only supports ephemeral (ECDHE) key exchange with/without
  session tickets.

Since the goal is to test TLS connection and not low level ethernet
functionalities or similar, the only supported platform is "native_sim"
where Linux sockets are used to connect to the OpenSSL server locally.

The idea is that the Zephyr application acts a client and tries to connect
to the OpenSSL server running on the same PC. For sake of simplificity a
bash script is provided to start the OpenSSL server properly.
For completeness a bash script is also provided to re-generate
certificates and keys.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 13:31:20 -04:00
Valerio Setti
6be57aaedf net: sockets_tls: add support for TLS 1.3
Enables TLS 1.3 sockets based on Mbed TLS.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 13:31:20 -04:00
Valerio Setti
33931cf8e1 mbedtls: remove unused option MBEDTLS_SSL_EXPORT_KEYS
According to Mbed TLS changelog this feature was set default ON
since 3.1.0 release, so the build symbol is no more available.
This commit removes it from Zephyr.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 13:31:20 -04:00
Ryan McClelland
f209e0aecf drivers: i3c: shell: add getmxds helper
Add a shell command for the CCC GETMXDS.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-12 13:11:37 -04:00
Ryan McClelland
10a0f01b4b drivers: i3c: add getmxds ccc helper
Add a CCC helper function for getmxds. Also include it with getting
the i3c basic info.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-12 13:11:37 -04:00
Lauren Murphy
474431b24e drivers: sensors: bme280: clang format files
Clang formats decoder and header files.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-12 13:04:18 -04:00
Lauren Murphy
3ef81feb2c drivers: sensor: bme280: use int math in decode q31 conv
Fix decoder to use integer math when converting readings to Q31.

Fixes #77295

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-12 13:04:18 -04:00
Bartosz Miller
bb3efaa3f2 tests: drivers: Verify NRF GPIO driver with GPIO_NRFX_INTERRUPT=n
Verify NRF GPIO driver with NRFX interrupts disabled.
Verify that driver handles properly 'get' and 'set' api methods.
When calling interrupt enable driver should report
'function not implemented' error.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-12 13:03:21 -04:00
Guennadi Liakhovetski
96852bc45e llext: add a test for inter-extension linking
This test uses two LLEXT objects: one of them exports a symbol and
the other one calls the exported function.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 13:02:59 -04:00
Guennadi Liakhovetski
697c5fd80e llext: test-simple: replace ARRAY_SIZE() with sizeof()
When identifying the size of an extension image we simply need its
size in bytes, not the number of array elements, that contain it.
Both happen to return the same value, because we use arrays of bytes,
but using sizeof() is clearer.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 13:02:59 -04:00
Guennadi Liakhovetski
5332393066 llext: make loader parameters "const"
LLEXT loader parameters are input-only, make them "const."

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 13:02:59 -04:00
Rubin Gerritsen
1a16ace775 unittest: Enable debug info by default
By enabling debugging information it becomes way much simpler
to find the root cause of a failing unit test as we can simply
run it with a debugger.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-12 13:02:31 -04:00
Felipe Neves
35c0cc7bf1 video: gc2145: add GC2145 sensor
support and basic controls.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-12 13:02:18 -04:00
Emil Gydesen
ae6c20d324 Bluetooth: BAP: BA: Replace bools with atomic
Replace the boolean values for the BAP Broadcast Assistant
with an atomic value. This prevents a rare, but possible,
race condition.

The busy flag has been replaced with 3 atomic values which
provide better granularity in error handling, and allows for
some concurrent write and read requests.

To describe the new behavior, the return values in the documentation
has been updated, and the error handling in the API
functions has improved.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-12 13:01:48 -04:00
Yong Cong Sin
081aa2fc94 tests: build_all: plic: install second instance to 0x8(uei)
Install the second instance to 0x8(uei), because MSI is installed
to 0x3(msi) when SMP is enabled.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-12 13:01:37 -04:00
Yong Cong Sin
3f3e37a68e drivers: intc: plic: refactor lock in plic_irq_enable_set_state()
Move the lock out from the `plic_irq_enable_set_state()` function
to cover the entire configuration process, so the whole of
enable/disable is atomic.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-12 13:01:37 -04:00
Matthew Mulloy Steinborn
f777030898 drivers: i3c: i3c_cdns Fix null pointer issue in i3c cadence driver.
Fixing a bug where during the bus_init routine, when a slave is
initialized, the target hardware can get an interrupt, and this can occur
before the target_config structure is assigned; the generic IRQ handler
attempts to use this structure to grab callback function pointers, but
with no target config it attempts to access the structure member from a
null pointer. Fix works by adding ternary operation during IRQ that first
checks if target_config is null or not.

Signed-off-by: Matthew Mulloy Steinborn <mulloystmatthew@meta.com>
2024-09-12 13:01:06 -04:00
Jonathan Rico
02c8659748 Bluetooth: Host: run clang-format on auto-init-procedures fns
Does what it says on the tin.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-12 13:00:54 -04:00
Jonathan Rico
ac8889907a Bluetooth: Host: Remove an indentation level in auto procedures
The else branch was unused.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-12 13:00:54 -04:00
Jonathan Rico
585c1f951f Bluetooth: Host: Refactor auto feature exchange
Add a bool fn so there is some room for a comment explaining why this is
not guarded by an IS_ENABLED().

Also add an optimization when building with an onboard controller.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-12 13:00:54 -04:00
Jonathan Rico
3f17bdfaf6 Bluetooth: Host: refactor 2M PHY auto-update
The code was a bit hard to read. From what I understood, the intent is
to not send the PHY update if we are already on 2M symmetric.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-12 13:00:54 -04:00
Tomasz Chyrowicz
d65fdde059 boards: nrf54h20dk: Fix settings partition
Align settings and DFU partition definition with the values, specified
by the design documentation.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-09-12 12:59:33 -04:00
Fabio Baltieri
df77d10597 ci: drop unused python exclusions
Drop some exclusions for python 3.6, this version is not tested in the
first place anyway so these are redundant.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-12 12:59:07 -04:00
Guennadi Liakhovetski
dc5f1bfb3f west: fix for Python prior to 3.10
"type | None" syntax is only available with Python from version 3.10,
fix building with earlier 3.x Python versions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-12 14:51:03 +02:00
Kyra Lengfeld
0f4fde3769 Bluetooth: Mesh: add API to set chunk send interval
This commit adds a KConfig option and an API to set the interval in
which chunks get send, in milliseconds.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2024-09-12 14:50:25 +02:00
Tu Nguyen Van
9fdf074a29 boards: nxp: s32z2xxdc2: add Lpi2c support for s32z2xxdc
Enable Lpi2c support on s32z2xxdc boards

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-09-12 14:50:15 +02:00
Tu Nguyen Van
f3b74d8ea8 dts: arm: nxp: add Lpi2c support for S32Z27x
add Lpi2c nodes to S32Z27x devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-09-12 14:50:15 +02:00
Hake Huang
826235c5c6 tests: gpio_basic_api: using header to unify tests
using arduino header to simplify test settings.
arduino_header D2 and D3 can be used by default.
alt: 118 platforms are enabled for this test.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-09-12 14:50:07 +02:00
Anas Nashif
2c4e43a7bf intel_ish: add support for running with simics
Add support for running this platform with simics.

Originally authored by: Maureen Helm

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 14:49:21 +02:00
Anas Nashif
a053f1ae05 twister: add simics as supported simulator
Enable simics as a support simulation platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 14:49:21 +02:00
Anas Nashif
e31a0908c1 cmake: add simics emu support
Add simics as a simulation platform allowing running platforms
supported in simics to be run using west or twister.

Originally authored by: Maureen Helm

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 14:49:21 +02:00
Anas Nashif
a87eec570a cmake: Add board emulator extension functions
Adds new CMake extension functions that allow setting board-specific
emulator arguments, similar to existing support for setting
board-specific runner arguments.

Originally authored by: Maureen Helm

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 14:49:21 +02:00
Benjamin Cabé
6b4ee8cd0c doc: make headings more visually identifiable
Before this change, headings in documentation pages were using the same
font family as the rest of the content, which made them blend in too
much.

This introduces a humanist font stack for the headings as well as some
minor tweaks to make the hierarchy of the document clearer through
better differentiation of the different levels (i.e. not just relying on
font size).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-12 14:49:06 +02:00
Benjamin Cabé
cbaabc2559 doc: css: fix mobile layout and increase browser compatibility
added a missing dvh causing footer to be footer to be displayed outside
of the viewport on mobile when browsing "Desktop site" version, and also
added fallback "vh" rules for slightly better browser compatibility.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-12 14:49:06 +02:00
Adam Wojasinski
3082b9c509 llext: Add aarch64 to LLEXT tests
Include `qemu_cortex_a53` (ARMv8-A ISA) target in intergation platforms
for LLEXT subsys tests.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
2e0aaecaa8 llext: Include aarch64 in LLEXT sample
Add entries in sample to test aarch64 architecture that supports
llext subsystem.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
74b562569e llext: Add RELA sections processing for AARCH64
Allow to process `RELA` sections on aarch64 platform.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
eb51529ab3 llext: Introduce AARCH64 relocation support
Adds support for all relocation type produced by GCC
on AARCH64 platform using partial linking (-r flag) or
shared link (-fpic and -shared flag).

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
a842b775bc llext: Removed unused i386 relocation name symbols
Removed arch-specific symbols that are not used. They should be placed
in arch-specific implementation for LLEXT subsystem that is currently
missing.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
44782ad2c1 llext: Move arm-specific relocation names from generic LLEXT file
Moved symbol definitions to the pleace where they are used.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
62458fe996 llext: Remove xtensa relocation names from arch agnostic LLEXT
Symbols are defined in arch specific elf.c file.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Adam Wojasinski
2ff71727f1 llext: Fix use of macro for relocation symbol index from r_info
Replace use of 32-bit architecture macro to macro arch agnostic that
is resolved in compilation.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-12 14:48:55 +02:00
Emil Gydesen
771a3d7509 Bluetooth: CSIP: Set Coordinator: Replace bools with atomic
Replace boolean flags with atomic.
This also properly add guards for the multi-device procedures
and reduce the number of places where the busy flag is set.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-12 14:48:47 +02:00
Emil Gydesen
3029916786 Bluetooth: MICP: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This prevents any race conditions with the MICP client implementation.

This also adds a missing check for the discovery procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-12 14:48:40 +02:00
Michal Smola
60c1c50895 drivers: pwm: Fix NXP TPM without combine channel feature
TMP variant without combine channel feature is used in some NXP SoCs.
Build error occurs for such socs because of accessing unavailable
struct member in hal.
Fix it by adding #if directive to check the feature presence.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-12 14:48:32 +02:00
Emil Gydesen
42602e6465 Bluetooth: TBS: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This prevents any race conditions with the implementation.

The discovery procedure is also now properly guarded with it
so that in case that any procedure is currently in progress
for the specific connection, then a new discovery procedure
cannot happen until all other procedures are finished.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-12 14:48:23 +02:00
Chris Friedt
3a07c9fbdf boards: st: nucleo_l496zg: add zephyr_udc0 and hsi48 dt nodes
Add Zephyr UDC (USB Device Class) and clk_hsi48 (hi-speed
internal 48 MHz) devicetree nodes so that the nucleo_l496zg
board works with other USB DC samples and tests.

Update the board yaml description to indicate usb and usb
device roles are supported.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-09-12 14:48:16 +02:00
Fin Maaß
6e975952f8 samples: posix: gettimeofday: add sntp resync option
add sntp resync option to sample.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-12 14:48:07 +02:00
Fin Maaß
b32a44aa7e net: config: sntp: add periodic resync option
this adds the option to have the clock periodically resynced with
the time from the sntp server, instead of just syncing at startup.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-12 14:48:07 +02:00
Alberto Escolar Piedras
0bec7a2da2 samples: nrf53_sync_rtc: Move shared memory buffer next to .data
To avoid possible linker warnings, when the linker may end up placing
this section in a segment with text and therefore with execute
permissions, with let's move it next to the .data section.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-12 14:47:57 +02:00
Alberto Escolar Piedras
ecb23433c7 boards: nrf_bsim: Move ipc backend next to .data
To avoid possible linker warnings, when the linker may end up placing
this section in a segment with text and therefore with execute
permissions, with let's move it next to the .data section.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-12 14:47:57 +02:00
Alberto Escolar Piedras
d680f0a32c arch posix/native: Let's make use of new split native simulator if
Let's make it possible to use the newly introduced definitions
for separated sub-sections for .data and .text symbols in the
NATIVE_SIMULATOR_IF (symbols visible to the runner and other
images).
Note all symbols anothed like before with just
NATIVE_SIMULATOR_IF will keep next to .text just like before.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-12 14:47:57 +02:00
Alberto Escolar Piedras
9d5a09668b native_simulator: Get latest from upstream
Align with native_simulator's upstream main
b4b9791ac822ae300363dc3ebbc7b7ac200632ce

Which includes:
* b4b9791 NATIVE_SIMULATOR_IF macros: Provide version with explicit
          section names

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-12 14:47:57 +02:00
Théo Battrel
54d1bb73dc Tests: bsim: Use correct compilation folder
If a test was written outside 'app_root' the 'app' path may contain
previous directory ('..') which would lead to the compilation file being
written outside the 'WORK_DIR'.

Fix the issue by checking if the 'app' is inside 'app_root', if it's
not, use the absolute path to the app for creating the 'this_dir'
variable.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-09-12 14:47:49 +02:00
Alberto Escolar Piedras
12ea90c8dc ci: bsim tests: Also trigger on common nordic DT changes
The bsim boards, just like the real ones, use the common
nordic DT definitions, but this were not triggering CI.
Some issues got in main due to this. Let's be sure to trigger
this workflow also when the releavnt DT files are changed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-12 14:47:42 +02:00
Adrian Warecki
311ddf90e2 ace: mm: tlb: Check tlb translation enabled before flushing cache
Before unmapping a memory page, the cache is flushed. If the given memory
page is not mapped, this operation ends with a cpu exception on the
ptl platform. Add check if tlb translation is active before flushing.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-09-12 14:47:33 +02:00
Adam Kondraciuk
cc54480381 tests: drivers: nrf_grtc: Add nRF54H20 PPR target
Add nRF54H20 cpu PPR target to GRTC tests.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-12 10:09:19 +02:00
Bartosz Miller
e9fef2a29b samples: drivers: Enable SPI MEMORY driver samples for nrfl54l15
Add SPI MEMORY driver testing for nrf54l15

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-12 10:04:12 +02:00
Pieter De Gendt
3981b22845 tests: Add a CodeChecker config file
Create a file to be used in CI or locally that lists all enabled/disabled
checks.

Can be passed as a CMake argument or set as environment variable:
CODECHECKER_CONFIG_FILE=$ZEPHYR_BASE/tests/codechecker_config.yaml

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
493cc9daea doc: develop: sca: Update CodeChecker configuration options
Put CodeChecker configuration parameters in tables for a clear overview
of all the options.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
9f2d7659b8 cmake: sca: codechecker: Add cleanup step
Add the option to remove the static code analysis reports after
parsing/storing.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
5e334425d2 cmake: sca: codechecker: Parse twister variables
If we're running in a twister context, use the information as sane
defaults for CodeChecker.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
518c818353 cmake: sca: codechecker: CMake targets instead of commands
Replace CodeChecker post build commands with regular CMake Targets.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
19a6dd8e2f cmake: sca: codechecker: Configurable variables
Add a separate variables for CodeChecker commands

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
5c9eb219be cmake: sca: codechecker: Use zephyr_get for variables
Allow setting CodeChecker cmake variables from multiple sources with
zephyr_get.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
d2bae91803 scripts: pylib: twister: Pass testsuite name to cmake
Add a CMake argument with the current testsuite name.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Pieter De Gendt
d2fb07785d cmake: Create git module
Create a CMake git module for a git_describe function.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-12 10:04:05 +02:00
Thomas Stranger
02afc352e3 boards: st: nucleo_g0b1re: update pyocd target
Update the pyocd runner configuration of the nucleo_g0b1re
to use the correct target.

Pyocd had issues only just after the release of the G0B1/C1 line.
This issue has already been fixed a few releases ago.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-12 10:03:58 +02:00
Jiafei Pan
133a5c921d samples: shell_module: add imx93 board support
Add kernel reboot support, so can use shell to verify reboot function.
uart:~$ kernel reboot cold
Known issue is imx93 currently can only support cold reboot and doen't
support warm reboot.

Updated board document.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Jiafei Pan
c2bbf1a169 dts: imx93_a55: add PSCI device node
Add PSCI device node, so can use PSCI to achieve CPU power
management.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Jiafei Pan
002ed73ff4 arm64: add sys_arch_reboot() support
If PSCI is enabled, it will leverage psci reset API to achieve system
reboot, otherwise a weak dump reboot API is provided, and platform
can override these APIs if platform specified implementation provided.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-12 10:03:52 +02:00
Wilfried Chauveau
a55bb955af scripts: twister: add type hint to twister_main.py
Twister main expects an instance of TwisterEnv. Let's the linter know
about this.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
30dc833cab scripts: twister: Use args rather than injecting members
This changes how some arguments are set in the `Handler`s.
`options`, `generator_cmd` and `suite_name_check` are now passed as
arguments to the constructor rather than injected from an other module.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
6d9e5df401 scripts: twister: TwisterEnv is always used with an options parameter
Adjusting the type hints and code accordingly.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
5ad5af3713 scripts: twisterlib: Fix warning about deprecation of truthiness
Python 3.12 warns that

> Testing an element's truth value will raise an exception in future
> versions. Use specific 'len(elem)' or 'elem is not None' test instead.
>    if elem_ts := root.find('testsuite'):

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
deeec33934 scripts: twister: Solve deprecation notice when running tests
CONF_FILE, DTC_OVERLAY_FILE and OVERLAY_CONFIG are deprecated but still
used by the tests causing warnings when running them.

This adds a test_data specific to validate the emission of the warning,
and removes the offending args from the other test_data files.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Wilfried Chauveau
28add0cd36 scripts: twister: check for deprecation notice for space-separated lists
Space separated lists are deprecated but this notice is not checked for.
extract_fields_from_arg_list also converts lists back to space-separated
lists causing a warning on get_scenario

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-09-12 10:03:44 +02:00
Mathieu Choplain
30abd595d0 boards: st: nucleo_wb09ke: add support for Nucleo-WB09KE board
This commit adds support for the ST Nucleo-WB09KE board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
2867aaaa16 boards: st: nucleo_wb05kz: add support for Nucleo-WB05KZ board
Add support for the STMicroelectronics Nucleo-WB05KZ board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
6aaa2f8be0 dts: arm: st: wb0: add DTSI for STM32WB0 series
Adds Device Tree include files for all MCUs in the STM32WB0 series.
These DTSI files only contain the supported peripherals for now.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
1530c98a77 drivers: hwinfo: stm32: mark STM32WB0 series as incompatible
The existing hwinfo driver for STM32 is incompatible with STM32WB0 series.
Prevent compiling the driver if the target's series is STM32WB0.
This fixes the build failure on the drivers.hwinfo.api test.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e322fa9781 drivers: flash: stm32: add STM32WB0 flash controller
Adds a basic driver for the STM32WB0 flash controller (read/erase/write).
Extended operations are not supported by this driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
263b03feeb drivers: gpio: stm32: add support for STM32WB0
Adds support for the STM32WB0 series in the existing STM32 GPIO driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
32a1b0cc54 drivers: intc: add STM32WB0 GPIO interrupt controller
Adds a driver for the STM32WB0 series GPIO interrupt controller.
This driver implements the STM32 GPIO INTC API, along with an extension
function used to check if a specific line is available on current board.

This also extends the GPIO INTC API to support level-sensitive interrupts,
as this feature is available on STM32WB0.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
20c45fe10a drivers: clock: add STM32WB0 clock control
Add control driver for STM32WB0 series, with support for all clock sources.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
fb224d139a include: dt-bindings: add STM32WB0 reset header
Adds the reset controller dt-bindings header for STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e32bc6e78d dts: bindings: power: add STM32WB0 power controller
Add a Device Tree binding for the STM32WB0 power controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4b357345df dts: bindings: flash: add STM32WB0 flash controller
Add the Device Tree binding for the STM32WB0 flash controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4822c0c692 dts: bindings: intc: add STM32WB0 GPIO interrupt controller
Add the Device Tree binding for the STM32WB0 GPIO interrupt controller.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
6992f4e88b dts: bindings: clock: add STM32WB0 RCC and LSI
Add the Device Tree bindings for the RCC and LSI clock of STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
16ab346f28 soc: st: stm32: add STM32WB0 series
Adds support for the STM32WB0 MCU series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
4670c3c8b4 modules: Kconfig.stm32: Add Kconfig symbols for RADIO
The RADIO and RADIO_TIMER HAL modules will be required to
implement BLE support for STM32WB0 series.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Mathieu Choplain
e3ac543879 west.yml: hal_stm32: Update to HAL integrating STM32WB0
Update the West manifest to point to an updated version of the STM32 HAL
compatible with WB0 series thank to inclusion of STM32CubeWB0 package.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-09-12 10:03:37 +02:00
Anas Nashif
ef49f031dc doc: overhaul sample criteria and expectations
overhaul sample criteria and what we expect in a sample, especially
overhaul the twister part and what should be provided for good test
coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-12 10:03:30 +02:00
Tomasz Leman
4f5f4c0389 fix: power: ace: Move HST domain suspend before IMR context save
This patch addresses an issue in the ACE platform power management code
where the HST domain suspend operation was performed after the IMR
context save. This resulted in the power management context being
restored with outdated values upon wake-up from D3 state, leading to a
failure to resume the HST domain correctly.

By moving the `pm_device_runtime_put(INTEL_ADSP_HST_DOMAIN_DEV)` call
before the IMR context save, we ensure that the HST domain is suspended
with the current context, and upon resume, the power management context
has the correct information to restore the HST domain state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-12 10:03:11 +02:00
Magdalena Pastula
495207668e samples: subsys: ipc: add testcases for icbmsg on nRF54L15
Add testcases for ICBMSG on nRF54L15 with only one endpoint,
including non-multithreading case.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-12 10:03:05 +02:00
Magdalena Pastula
5de1c092b7 ipc: align icbmsg to no-multithreading
Modify ICBMSG so that it could be used in no-multithreading
appliactions.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-12 10:03:05 +02:00
Karthikeyan Krishnasamy
12e8bc7f82 tests: posix: fs: add testsuite for open truncate
add tests for posix open() with truncate flag

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Karthikeyan Krishnasamy
063d938aa5 lib: posix:fs: handle O_TRUNC in open()
handling of O_TRUNC flag from posix open()
to zephyr filesystem flag

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Karthikeyan Krishnasamy
20288c254b include: posix: fcntl: add O_TRUNC flags for posix open()
introduction of O_TRUNC flag has conflict with libc flags,
so realtered posix open flags based on the commit
499a633976 ("posix: device_io: use mode argument correctly in open()")

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-09-12 10:02:57 +02:00
Vinayak Kariappa Chettimada
9eb35c4e24 Bluetooth: Controller: Rework FAKE_ENTROPY_NATIVE_POSIX text
Rework comment text for FAKE_ENTROPY_NATIVE_POSIX used as
entropy driver for the Controller on BOARD_NRF54L15BSIM.

Relates to commit 34b6b3d9eb ("Bluetooth: Controller:
Support FAKE_ENTROPY_NATIVE_POSIX").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-12 10:02:48 +02:00
Valerio Setti
7fadfeec7c mbedtls: do not set PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_BASIC
Mbed TLS automatically sets PSA_WANT_KEY_TYPE_[RSA/ECC]_KEY_PAIR_BASIC
whenever "_IMPORT || _EXPORT || _GENERATE || _DERIVE" operations
are set. Therefore we just set the proper actions where required.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-12 10:02:40 +02:00
Josuah Demangeon
95599968d9 MAINTAINERS: add josuah as Video collaborator
Adding myself as a collaborator for video driver category.
Add the samples/drivers/video/ to the MAINTAINERS.yml

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-11 20:22:54 -04:00
Nicolas Pitre
db9e5ec6f8 sample: demand_paging: add a demo about ondemand section usage
This sample demonstrates how demand paging can be leveraged to deal with
firmware bigger than the available RAM if XIP is not possible. Select
code can be tagged to be loaded into memory on demand, and also be
automatically evicted for more code to be executed when memory is
exhausted.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
7e847eca25 tests: demand_paging: add a test for on-demand sections
Exercises linker placement, the ondemand backing store, demand paging.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
78cd836e2f tests: demand_paging: move existing test to a mem_map subdirectory
This test concerns itself mainly with anonymous memory mappings.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
4fd3bf2060 demand_paging: add a semihosting based backing store for on-demand sections
This is especially handy for tests and validation using QEMU.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
c99371e486 arm64: demand paging is supported
Test configs for UP and SMP are also included.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
be279d878e arm64: demand_paging: add support for on-demand mappings
This makes ARM64 compatible with K_MEM_MAP_UNPAGED.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
79428bc81d arm64: demand_paging: allow page fault processing with IRQs enabled
Convention is to call k_mem_page_fault() with IRQs enabled if they were
enabled when the fault occurred.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
3e0feab245 arm64: demand_paging: add the k_mem_paging_eviction_accessed() call
Needed for the LRU eviction algorithm to be effective.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
7bd6892750 arm64: mmu: access fault handler for demand paging
This has two purposes: maintain the accessed and dirty page states, or
call the generic demand paging fault handler otherwise.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
322865773b arm64: mmu: architecture specific hooks for demand paging support
A page table entry used for demand paging is always from the last level
page table and never completely zeroed. Anything else is considered
ARCH_DATA_PAGE_NOT_MAPPED.

Loaded pages use a PTE_PAGE_DESC table entry type. Paged-out pages use a
PTE_INVALID_DESC table entry type and the physical address field is
reused to hold the backing store location token value.

ARCH_DATA_PAGE_ACCESSED corresponds to the AF flag. It is initially
unset and manually set to catch when pages are being accessed and
eventually do something about it.

ARCH_DATA_PAGE_DIRTY corresponds to the lack of the AP_RO flag.
Similarly to the AF flag, pages are initially made read-only to catch
writes.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Nicolas Pitre
4e0e52cbec arm64: mmu: be stricter about free page entries
Let's consider free entries as being completely zeroed. Future patches
for demand paging support will populate entries and still mark them as
"invalid" which should not be considered free. Current code always clear
entries to be freed so no issues there.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-11 20:18:51 -04:00
Sadik Ozer
44e72ab024 samples: drivers: counter: Add MAX32 MCUs overlay files
This commit add MAX32 MCUs overlay file for sample/drivers/counter

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Anıl Kara
3b81b4e60d samples: drivers: counter: Enable it for MAX32 MCUs
MAX32 MCUs counter node added in main.c

Signed-off-by: Anıl Kara <anil.kara@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
6e36e9bfae tests: drivers: counter: Enable counter test for MAX32666
This commit enables counter test for MAX32666 boards.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Anıl Kara
7f5fa21333 tests: drivers: counter: Enable counter test for MAX32680EVKIT
Add overlay files are added to run counter_basic_api test on
MAX32680EVKIT.

Signed-off-by: Anıl Kara <anil.kara@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
6a34baae16 tests: drivers: counter: Enable counter test for MAX32672
This commit enables counter test for MAX32672 board.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
10f507b7e4 tests: drivers: counter: Enable counter test for MAX32670
This commit enables counter test for MAX32670 board.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
a24884a061 tests: drivers: counter: Enable counter test for MAX3290
This commit enables counter test for MAX32690evkit board.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
18c0013671 tests: drivers: counter: Enable counter test for MAX32655
This commit enables counter test for MAX32655 boards.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
8f39a5870e tests: drivers: counter: Enable counter test for MAX32662EVKIT
This commit enables counter test for MAX32662EVKIT board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
44cf5db5ab boards: arm: Add counter in MAX32662 driver list
Update MAX32662 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
ae84791896 boards: arm: Add counter in MAX32666 driver list
Update MAX32666 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
9ca489ebf4 boards: arm: Add counter in MAX32680 driver list
Update MAX32680 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
d4e04ba76d boards: arm: Add counter in MAX32672 driver list
Update MAX32672 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
22afb3b118 boards: arm: Add counter in MAX32670 driver list
Update MAX32670 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
f74a3aeccf boards: arm: Add counter in MAX32690 driver list
Update MAX32690 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
300bb22026 boards: arm: Add counter in MAX32655 driver list
Update MAX32655 board documents to include counter driver too.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
bfb21ced8d drivers: counter: Add MAX32xxx counter driver
Common counter driver based on timer for MAX32xxx MCUs
To use as wakeup source wakeup-source parameter shall be
defined as below

&lptimer0 {
	status = "okay";
	clock-source = <ADI_MAX32_PRPH_CLK_SRC_ERTCO>;
	wakeup-source;
	counter {
		status = "okay";
	};
};

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
80b7fe6595 dts: arm: adi: Add timer counter instance for MAX32662
Add counter submode for low power timer too

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
2d361871d2 dts: arm: adi: Add timer counter instance for MAX32680
Add counter submode for low power timer too

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
346796101a dts: arm: adi: Add timer counter instance for MAX32672
Add counter submode for low power timer too

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
16edf9ab84 dts: arm: adi: Add timer counter instance to MAX32670
Add counter subnode for low power timer too

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
351d0e2dab dts: arm: adi: Add timer counter instance for MAX32690
Add counter submode for low power timer too

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
083249d9e5 dts: arm: adi: Add MAX32655 timer counter instances
Add counter subnode in timer nodes.
Add coutner .yaml file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Furkan Akkiz
6ebd8dac08 dts: arm: adi: Add MAX32662 timer instances
Add timer instances of MAX32662 to dtsi file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
9fd88ec9b0 dts: arm: adi: Add MAX32666 timer instance
This commits add MAX32666 timer instances in dts file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Mert Ekren
3b39d2c548 dts: arm: adi: Add MAX32675 extra timer instance
Add MAX32675 lptimer0/1 instance in dtsi file

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-11 20:18:33 -04:00
Tahsin Mutlugun
5fd68929ff dts: arm: adi: max32680 Add extra timer peripherals
Add timer 4 and 5 into devicetree.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-11 20:18:33 -04:00
Furkan Akkiz
5d699a6b28 dts: arm: adi: Add MAX32672 timer instances
Add time instances of MAX32672 to dts file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-11 20:18:33 -04:00
Mert Ekren
334599b472 dts: arm: adi: Add MAX32670 timer instances
Add timer instances of MAX32670 to dts file

Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-09-11 20:18:33 -04:00
Furkan Akkiz
4e30a64ff0 dts: arm: adi: Add MAX32690 timer instances
Add timer instances of MAX32690 to dts file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-11 20:18:33 -04:00
Sadik Ozer
166ac001bf dts: arm: adi: Add Timer instance to MAX32655
Add timer instance in device tree
Add timer yaml file

Timer0/1/2/3 are common for MAX32xxx MCUs
MAX32655 has additional Timer4/5 which are low power timers

Co-authored-by: Mert Vatansever <mert.vatansever@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-11 20:18:33 -04:00
Krzysztof Chruściński
e96a9df6d7 samples: boards: nrf: nrfx: Fix (D)PPI dependency
Move Kconfig.zephyr above local kconfigs.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-11 20:14:30 -04:00
Krzysztof Chruściński
ffdf9a978d drivers: serial: nrfx_uarte: Use ENDTX_STOPTX short if possible
Use short which is available on some devices.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-11 20:14:30 -04:00
Krzysztof Chruściński
b7b25fe09c dts: nordic: nrf-uarte: Add endtx-stoptx-supported property
Add information to the device tree if UARTE instance has a HW feature
which is the ENDTX_STOPTX short.

Add this property to all instances in nrf54hl15, nrf54l20, nrf9280
and nrf54h20.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-11 20:14:30 -04:00
Sylvio Alves
b4117f97d3 drivers: wifi: fix esp32 build error
There is a regression caused by #76177, which
causes build to fail due to missing includes and others.
This wraps it with proper checks and fixes wifi scan call.

This also remove unused variable present in the same driver.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-11 20:14:07 -04:00
Emil Gydesen
594bef84f8 tests: Bluetooth: Fix minor issues for bap_base unit tests
An unused variable was removed and some callbacks were
corrected.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-11 14:01:46 -04:00
Emil Gydesen
069619a4ee tests: Bluetooth: BAP: Fix BT_BAP_BASE dependency for unit tests
The unit tests needed to enable the hidden Kconfig
BT_BAP_BASE. Instead of adding an additional Kconfig for this,
just enable one of the roles that enable it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-11 14:01:46 -04:00
Kapil Bhatt
e71dc74228 hostap: Fix null termination of ssid and psk
Add null termination of ssid and psk. If user pass ssid,
psk without null terminator it will add by default.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-09-11 14:01:07 -04:00
Emil Gydesen
99c86f616f tests: Bluetooth: Controller: Move controller tests to same dir
There were a couple of controller tests outside the
controller directory which have been moved there to
simplify the structure a bit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-11 14:00:53 -04:00
Tom Burdick
8c4c180575 cmake: Fix finding python in virtualenv
When running cmake directly (without west, as twister does) on nix the
CMake environment paths are set and thus it does not find the
virtualenv'ed python. Fix this by ignoring the cmake environment
variables nix sets.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-11 14:00:44 -04:00
Valerio Setti
dafb532da3 doc: new Kconfig to allow non-CS sources in psa_generate_random()
This change was done in #76408, but without documenting it.
This commit adds missing documentation.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-11 14:00:34 -04:00
Valerio Setti
d15292b8ab doc: rename Mbed TLS entropy Kconfigs
This change was done in #76408, but without documenting it.
This commit adds missing documentation.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-09-11 14:00:34 -04:00
Emil Gydesen
5e34127e4b Bluetooth: MCC: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This prevents any race conditions with the MCC implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-11 14:00:16 -04:00
Emil Gydesen
c012ece33e Bluetooth: GMAP: Replace busy bool with atomic
Replace the busy boolean flag with an atomic value.
This prevents any race conditions with the GMAP client implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-11 14:00:09 -04:00
Fabrice DJIATSA
456992ba9a tests: drivers: i2c: i2c_target_api: update i2c_target_api
- add overlays and kconfigs files for nucleo_u083rc and
stm32u083c_dk boards.
- update testcase.yaml for CI

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Fabrice DJIATSA
688c9d3101 drivers: i2c: update i2c driver to integrate stm32u0
- enabled combined interrupt configuration for stm32u0x serie.
- since stm32u0 serie doesn't support SMBUS we need to avoid
use SMBHEN and SMBDEN bits register.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Fabrice DJIATSA
662adae374 boards: st: add i2c nodes in dts and update docs
-enable i2c in nucleo_u031r8, nucleo_u083rc and stm32u083c_dk
- update documentations

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Fabrice DJIATSA
a9ccef672a dts: arm: st: u0: add i2c nodes in dtsi files
we have four i2C peripherals .
- three shared between stm32u031/73/83
- One between stm32u073/83

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Fabrice DJIATSA
4a1f39b9d3 soc: st: stm32: stm32u0x: add soc configs for i2c shared irq
check if two or three I2C instances with same irq are enabled
at same time then enable shared_interrupt handler.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-11 13:59:54 -04:00
Krzysztof Chruściński
72bfcc67cf tests: drivers: uart: uart_errors: Add missing pull up
Add missing pull up to the overlay file.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-11 13:59:29 -04:00
Luca Burelli
e6b32ab681 llext: hotfix: fix function pointer logging
Some function pointers were being passed via `%p` to LOG_DBG, and this
was causing the following issues in SOF CI with the `sparse` checker:

   subsys/llext/llext.c: error: arithmetics on pointers to functions
   subsys/llext/llext.c: error: incompatible types for operation (+)

This patch fixes the issue by casting the function pointers to void*.
Also fix a misleading error message in `llext_get_fn_table()`.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-11 13:59:02 -04:00
Martin Åberg
884a4e5a35 arch: Fix assert logic for installing shared interrupt
With this commit, it is now allowed to register any ISR and arg
combination for the same IRQ, except the case when the exact same
ISR-arg combination is already registered.

The previous assert logic had a restriction where the same ISR could not
be registered multiple times with different arguments.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-09-11 07:41:20 -04:00
Fredrik Danebjer
c9da274eb2 Bluetooth: ascs: Add dynamic ASE registration
Added option to set the ASE count through the bap API, making ASE
configuration runtime available. The upper limit of ASEs are still
bound by the Kconfig options set for ASEs.

Signed-off-by: Fredrik Danebjer <frdn@demant.com>
2024-09-11 07:41:12 -04:00
Pisit Sawangvonganan
442a0686fc style: tests: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
ead0dfc889 style: subsys: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
8e4c072991 style: soc: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
6fb4ff354b style: samples: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
6a64490c34 style: lib: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
1e58b53d2a style: kernel: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
847a4eaad2 style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
9113096389 style: boards: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Pisit Sawangvonganan
56b6ccb2f4 style: arch: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-11 07:40:35 -04:00
Jukka Rissanen
654a93fa03 samples: net: http_server: Add netusb support
Add overlay file for netusb configuration, and usb network
initialization to the code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-11 07:40:22 -04:00
Jukka Rissanen
1f627e3a1b net: mdns_responder: Set socket of service for statistics purposes
If the dispatcher is muxing the connection i.e., so there are two
services for the same port, then mark service socket descriptor
of the service with the socket number so that "net sockets" shell
command can show a proper value for it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-11 07:40:07 -04:00
Jukka Rissanen
caf9fd345f net: dns: Add per socket user data for the dispatcher
The socket services API has a limitation where the user data is shared
between file descriptors described in the same service.

This can cause problem in DNS dispatcher where each listened socket
needs to have their own dispatcher struct set as user data so that we
can map between dispatcher context and socket. Solve this by always
have a dispatcher table as user data, and then have the actual mapping
done via the dispatcher table when receiving data to the dispatcher socket.

Fixes #78146

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-11 07:40:07 -04:00
Benjamin Cabé
f8a8d86237 doc: sphinx-lint: fix missing-underscore-after-hyperlink
Fixed wrong hyperlink (missing trailing underscore).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé
aee98147d2 doc: sphinx-lint: fix dangling-hyphen
Dangling hyphens at the end of a line are usually a problem, ie. you
have an "hyphenated-word" and breaking it on two line will render it as
"hyphenated- word".
This commit fixes the few occurences of such dangling hyphens.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé
fc9e7962c2 doc: sphinx-lint: fix unbalanced-inline-literals-delimiters
used sphinx-lint to catch unbalanced inline literal markup.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé
e0bf01af79 doc: sphinx-lint: fix missing-space-before-role
used sphinx-lint to catch sphinx roles missing opening tag colon.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé
9a19cb630f doc: sphinx-lint: fix role-without-backticks
used sphinx-lint to catch sphinx roles using ticks instead of backticks

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Benjamin Cabé
2168705d0a doc: sphinx-lint: fix missing-colon-in-role
used sphinx-lint to catch sphinx roles missing a colon.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-11 07:39:30 -04:00
Chekhov Ma
ccc4357f0a drivers: gpio: pca_series: add supported device to tests/build_all
Add pcal6524, pcal6534, pca9538, pca9539 to tests/build_all/gpio

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
e79507b5e3 drivers: gpio: pca_series: handle byteorder
Add byteorder handling to support big-endian machine.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
d45497e4c8 drivers: gpio: pca_series: add api to get per-port register size
This commit add get per-port reg size api to make it more clear to
understand the design.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
5253eb1692 drivers: gpio: extend pca_series driver to pca953x and pca955x
This commit extends pca_series gpio driver to devices pca9538, pca9539,
pca9554 and pca9555.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
2e9507c3a6 boards: imx93_evk_mimx9352_a55: enable pcal6524 gpio expander
Enable pcal6524 gpio expander on i.MX 93 EVK

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Chekhov Ma
ac2d8993cc drivers: gpio: add pca_series gpio expander driver
There are numbers of drivers for different PCA(L) series chip. They
share similiar register layout and control logic. This driver intends
to unify these drivers for PCA(L)xxxx series i2c gpio expanders.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-11 09:38:04 +02:00
Benedikt Schmidt
4b657f7a2c drivers: gpio: implement possible manual reset of PCAL64XXA
Implement an option manual reset of the PCAL64XXA to allow the external
implementation of a retention of the port expander state.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Benedikt Schmidt
74476c45b0 drivers: gpio: extract method to apply initial state of PCAL64XXA
Extract method which applies the initial state in the driver
for the port expander PCAL64XXA.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-09-11 09:35:37 +02:00
Yangbo Lu
4416b0bce3 west.yml: hal_nxp: update to the latest
Updated hal_nxp to the latest:
30bdef6d s32: support LPI2C for s32z27x build with MCUX driver

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
60abb95a4f test: kernel/common: custom MAX_THREAD_BYTES for imx95 SMP
Increased the value of CONFIG_MAX_THREAD_BYTES to avoid
triggering twister failing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
33b773aab9 test: kernel/sem/sem: custom MAX_THREAD_BYTES for imx95 SMP
Increased the value of CONFIG_MAX_THREAD_BYTES to avoid
triggering twister failing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
1b2985d77e test: kernel/sem/sys_sem: custom MAX_THREAD_BYTES for imx95 SMP
Increased the value of CONFIG_MAX_THREAD_BYTES to avoid
triggering twister failing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
f45b483dbe boards: nxp: imx95_evk: add SMP variant support
There are 6 Cortex-A55 cores on i.MX95 EVK, this SMP variant will release
all the 6 cores to run Zephyr.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
24f6b072d3 boards: nxp: add imx95_evk A55 support
Added basic board support for imx95_evk A55.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
5d4537f827 soc: nxp: imx: add i.MX95 Cortex-A55 support
Added basic soc support for i.MX95 Cortex-A55.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2024-09-11 09:34:04 +02:00
Hou Zhiqiang
c3ce5617dd dts: arm64: nxp: add device tree for i.MX95 Cortex-A55
Add DTSi for i.MX95 Cortex-A55.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
e91044b1f4 boards: nxp: add imx95_evk M7 support
The IMX95LPD5EVK-19 board is a platform designed to show the most
commonly used features of the i.MX 95 automotive applications
processor. It is an entry-level development board, which helps
developers to get familiar with the processor before investing a
large amount of resources in more specific designs.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
5b6f07d1a6 soc: nxp: imx: add i.MX95 Cortex-M7 support
The i.MX95 applications processor features advanced graphics and
video cores, powerful vision and machine learning acceleration,
efficient CPU performance, real-time processing, and advanced
security with the integrated EdgeLock® secure enclave to support
energy-efficient edge computing.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
5e09d7db26 soc: nxp: imx: clang-format imx93 code files
clang-format imx93 code files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
d7fab01b6c soc: nxp: imx: create new directory for imx93
Created new directory for imx93 under imx9, as imx93
is one soc of imx9 series.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
20cde899bf dts: arm64: nxp: add device tree for i.MX95 Cortex-M7
Added device tree file for i.MX95 Cortex-M7 and added i.MX95
clock ID header file.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
5bec2a3dde driver: pinctrl: add SCMI-based pinctrl driver for NXP i.MX SoCs
On some i.MX SoCs, such as i.MX95, the System Manager is running on a
Cortex-M core to manage the hardware resources and provide services for
SCMI requests.

So add the SCMI-based pinctrl driver to support these i.MX SoCs.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-11 09:34:04 +02:00
Yangbo Lu
4f99a57b81 drivers: mbox: make mbox_nxp_imx_mu use PRE_KERNEL_1 init level
The MU init should be very early for some platforms. For examples,
i.MX95 is using MU for ARM SCMI. It should be initialzied early
for next power, pinctrl, clock etc. management.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-09-11 09:34:04 +02:00
Andrej Butok
7ff43f227c boards: nxp: Add uart-mcumgr for nxp boards
Adds "chosen,uart-mcumgr" for nxp boards that support
the secondary bootloader partitioning.
Fixes the subsys\mgmt\mcumgr\smp_svr sample.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-11 09:31:48 +02:00
Adam Kondraciuk
bae4ff6cf0 drivers: timer: grtc: Switch GRTC clock source to LFXO
GRTC needs to use direct clock source path instead of system clock path
to support ELV mode for nRF54L targets.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-11 09:30:48 +02:00
Yong Cong Sin
ee08ebd9ca devicetree: add DT_INST_NUM_IRQS()
Add `DT_INST_NUM_IRQS()` to get the number of interrupt lines
of the current `DT_DRV_COMPAT`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-11 09:30:17 +02:00
Michal Smola
707844ca56 boards: frdm_mcxc242: Add i2c support
frmd_mcxc242 supports i2c, but it is not enabled.
Enable i2c and configure it to read accelerometer sensor on the board.
Update board documentation. Test it using sample.sensor.accel_polling.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-11 09:29:31 +02:00
Sylvio Alves
6654c2a2f6 boards: esp32-based: update documentation
This PR updates all Espressif board names to meet its
original value. It also update reference links, re-organize
entries and removes unused content.

This also fixes bootloader information regarding a few boards.
IDF Bootloader was removed and these boards kept that info.
This updated it accordingly with the Simpleboot Bootloader.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-10 21:52:49 -04:00
Daniel DeGrasse
c8161dc53d modules: lvgl: provide alignment definition
For some systems, the display peripheral or GPU requires that buffers be
aligned on a boundary for optimal performance. We already align display
buffers using CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE, but some applications
will rely on the definition of LV_ATTRIBUTE_MEM_ALIGN. Provide this
definition so those buffers will be aligned as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-10 21:52:35 -04:00
Ryan McClelland
0469de9626 drivers: i3c: shell: add ccc deftgts command
Add a command for the ccc deftgts to the i3c shell.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 21:52:18 -04:00
Ryan McClelland
e31a96cbda drivers: i3c: add ccc deftgts
Add support the ccc deftgts. This also includes a function to check if
there is a secondary controller on the bus, and will transmit deftgts
after initialization or a hotjoin event.

This also adds dynamic_addr to the config_target in order to retrieve
the currently configured dynamic address to be used with deftgts.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 21:52:18 -04:00
Jukka Rissanen
dcb71a754f net: http_server: Enable v4-to-v6 mapping by default
Fixing the regression caused by 3949873886 ("Allow service to be
created with NULL host"). If the host parameter is null when creating
the HTTP service, the IPv6 socket is created by default. This can cause
issues if both IPv4 and IPv6 are enabled, like in HTTP server sample,
and the HTTP client connection is done by IPv4.
To fix this, we need to enable IPv4-to-IPv6 mapping in order to allow
IPv6 socket to serve a IPv4 connection. Allow also user to override this
if needed.

Fixes #78112

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-10 21:51:54 -04:00
Jukka Rissanen
61c135e531 net: if: Fix rejoining IPv6 multicast group
The code was checking IPv4 address instead of IPv6.
Print also IPv6 address when rejoining the group.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-10 21:51:39 -04:00
Nicolas Pitre
1e4fd23e58 kernel: mmu: install demand mappings for the on-demand linker sections
This sets initial unpaged mappings for __ondemand_func code and
__ondemand_rodata variables. To achieve this, we have to augment the
backing store API.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-10 17:17:30 -04:00
Nicolas Pitre
cbbd8579b8 linker: introduce on-demand linker section tags
This provides __ondemand_func and __ondemand_rodata tags for annotating
functions and read-only data that should be loaded on demand so not to
exhaust all available RAM. The demand paging mechanism will be leveraged
to load so designated code/data as needed and to evict it from memory
when unused.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-10 17:17:30 -04:00
Raffael Rostagno
bd3b731ddc soc: esp32c2: esp8684: Console baudrate from device tree
Get console baudrate property from device tree to allow
proper configuration for 26 and 40 Mhz devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-09-10 17:17:17 -04:00
Ryan McClelland
9d345fc447 drivers: i3c: add support for setaasa initialization
Adds a new DTS prop for i3c devices as support for the CCC SETAASA
requires prior knowledge of the target if it supports it according
to i3c spec v1.1.1 section 5.19.3.23.

This will be used as an optimization for bus initialization.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-10 17:17:04 -04:00
Tom Burdick
73cde7242e rtio: Disable xtensa dc233c
This particular qemu platform seems to run into a strange TLB exception
with unclear cause. Disable the test suite on xtensa qemu for the time
being.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-10 17:16:50 -04:00
Laurentiu Mihalcea
3f2790b89c soc: imx9: remove custom linker script
The custom linker script was required because SOF needed
some extra linker sections. Other than that, the custom linker
script was identical to the common architecture script. This
commit removes the custom linker script because:

	* keeping the custom linker script in sync with the
	common one is troublesome.

	* application-specific linker sections shouldn't be
	included in the generic soc linker script. Instead,
	they should be handled at the application level
	(i.e: via cmake commands if additional sections are
	needed or via a new, custom linker script if more
	changes are needed)

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-10 12:41:02 -04:00
Tom Burdick
4dc082da37 rtio: Fix dc233c tlb exception
It appears some strangeness occurs around the consume semaphore today
that causes a TLB exception on qemu_xtensa_dc233. Unclear *why* just yet
but this fixes things in CI today.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-10 12:40:21 -04:00
Tobias Pisani
73c8235881 west: runners: Implement the west rtt command for jlink
Moves the telnet client into runners/core.py as well, as this is now shared
between openocd and jlink.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Tobias Pisani
18f45b5f06 west: runners: Implement the west rtt command for openocd
This was non-trivial, as openocd is a bit weird to work with. Using only
commands passed with '-c' arguments, I couldn't get it to reliably resume
(or just not halt) the target when started. I tried using the 'sleep'
command, and various 'configure -event XX { resume }' events, but nothing
panned out, as it seems to always halt after all `-c` commands have been
run.

To avoid that, this waits for the TCL RPC port to be up, and sends a
resume command there. This works reliably.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Tobias Pisani
b3b8360f39 west: runners: Add west rtt command with pyocd implementation
This command runs separately from a debug server, instead of attaching
to a running server. This is both the easiest out of the box experience,
and also should be possible to implement consistently for most runners.

This commit includes an initial implementation for pyocd.

Signed-off-by: Tobias Pisani <mail@topisani.dev>
2024-09-10 12:39:42 -04:00
Neil Chen
74bb5b334d boards: frdm_mcxa156: add frdm_mcxa156 board
add frdm_mcxa156 board support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
810e6a19c3 drivers: flash: support flash driver for MCXA156
Add MCXA156 romapi support in flash driver

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
4af2180731 drivers: gpio_mcux: update gpio_mcux driver for MCXA156
Fix compiler warning issue(unused variable 'config',
uninitialized variable 'int_status')

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
9ee6717125 drivers: syscon: update syscon driver for MCXA156
Add MCXA port and lpuart clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
f11e4b6b90 drivers: syscon: clang-format syscon driver
clang-format syscon driver

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
fb65babc6a soc: mcxa156: add SOC support for MCXA56
Add MCXA156 support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
b593e054b1 include: pinctrl: Support MCXA in pinctrl_soc_kinetis_common.h
Add bitfield IBE to support MCXA

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
dcc63a5164 dts: mcxa156: add dts for MCXA156
add dts for MCXA156

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Neil Chen
2b53e0f453 manifest: update HAL NXP manifest
add mcxa156 romapi driver support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-09-10 12:39:18 -04:00
Reto Schneider
dd37de8839 tests: drivers: dma: Enable for board sim3u1xx_dk
This allows to run the test 'chan_blen_transfer' and 'loop_transfer' on
the sim3u1xx_dk board.

The functionality tested in `chan_link_transfer` and `scatter_gather` is
not (yet) supported by the Si32 DMA driver, and those tests therefore
not enabled.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-10 12:38:36 -04:00
Reto Schneider
57064f7e08 boards: silabs: sim3u1xx_dk: Declare DMA support
This allows the users to know about the supported features and to run
(some of) the tests/drivers/dma tests on this board.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-10 12:38:36 -04:00
Reto Schneider
9d3ac80429 drivers: dma: Add initial SiM3U1xx support
This supports the minimum of what is required to allow the AES hardware
to be used (memory to peripheral, peripheral to memory).

In addition, to pass some of the existing unit tests, it also supports
memory to memory operators.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-10 12:38:36 -04:00
Reto Schneider
3bc3ca8620 dts: arm: silabs: sim3u: Add DMA support node
This is needed for Si32 DMA driver support.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-10 12:38:36 -04:00
Reto Schneider
f84e2f2c2b dts: bindings: dma: Add initial Si32 binding
This is needed for Si32 DMA driver support.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-09-10 12:38:36 -04:00
Bernhard Krämer
2ef0e37c62 boards: teensy4: Fix pinmux settings for LPSPI3
Was interfering with LPUART6, which is the chosen terminal output.

Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
2024-09-10 12:38:20 -04:00
Mark Wang
f378de7e46 drivers: udc: mcux: move isr context codes to work context
Move the transfer process codes to work context becuase
it lock the mutex, move bus reset process codes too
because it calls some common udc apis (they may add
mutex lock in future).

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-09-10 12:38:03 -04:00
Jukka Rissanen
b9a3edc43a tests: net: cm: Increase event wait time
This was seen in CI

START - test_cycle_ready_CC

  Assertion failed at ...tests/net/conn_mgr_monitor/src/main.c:262:
    cycle_ready_ifaces: (stats.conn_count_gen not equal to 1)
    NET_EVENT_L4_CONNECTED should be fired when connectivity is gained.
FAIL - test_cycle_ready_CC in 0.015 seconds

As the event wait timeout is very short (1ms) by default, increase
it to 10ms so that we will not miss the event.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-10 12:37:38 -04:00
Fabio Baltieri
e2bfd83522 samples: usb/mass: fix board name for adafruit_feather_nrf52840_sense
The Adafruit feather boards have been converted to variants, use the
correct board name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-10 12:36:16 -04:00
Duy Nguyen
5ff44120e1 Kconfig: Fix issue in KConfig of Renesas modules
Add condition for KConfig Renesas FSP hal module
Move the DUAL_BANK_MODE from SOC to flash driver KCONFIG

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-09-10 14:42:55 +01:00
Federico Di Gregorio
6d868e5074 boards: opta: enable ethernet and RNG
Features enabled by this commit:

* RNG
* Ethernet port (shell sample works without changes)

Also fixed flash addresses in docs and added the default
mapping between inputs and GPIO pins.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-09-10 14:42:33 +01:00
Declan Snyder
d931f0b7c0 soc: imxrt: Fix flexspi xip configuration issue
Fix flexspi xip configuration issue regarding code relocation
due to the order of kconfig defaults being sourced

The flexspi setup was not being relocated to an on chip location

Also remove rt1060 conf file in flash common test which changes the
code relocation location to RAM, just keep as ITCM for all M7 which
as of now all have ITCM from NXP with flexspi.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-10 14:42:15 +01:00
Fabio Baltieri
e28e93ada4 charger: bq25180: set a default constant-charge-voltage-max-microvolt
Set a default value for constant-charge-voltage-max-microvolt, matching
the device hardware default, this ensure compatibility with existing
applications that did not specify the recently introduced property.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-10 14:41:47 +01:00
Tomasz Moń
7282e4ee3d tests: usb: uac2: test High-Speed only instance
Add and verify against reference descriptors a High-Speed only 192 kHz
24-bit stereo headphones with explicit feedback UAC2 instance.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-10 14:41:32 +01:00
Tomasz Moń
dd4ec82477 tests: usb: uac2: test High-Speed descriptor macros
Generate and test both Full-Speed and High-Speed descriptors against
reference values. Verify that IAD, interface and endpoint descriptors
are not shared between Full-Speed and High-Speed descriptor sets because
the number of non-UAC2 interfaces can be different at different speeds
and thus the assigned interface numbers and endpoint numbers can differ.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-10 14:41:32 +01:00
Tomasz Moń
de8710bf46 usb: device_next: uac2: Handle speed properties
Generate full and high speed descriptors based on UAC2 instance
properties. Fail the build if an instance does not have speed properties
or if the instance with given speed property exceeds the bandwidth
available at the selected speed.

Remove obsolete no longer used macros to determine offsets inside
complete UAC2 descriptors blob. Only speed-specific descriptors arrays
are supported.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-10 14:41:32 +01:00
Tomasz Moń
462077b2f2 tests: usb: uac2: Add speed properties to UAC2 instances
Add full-speed property to build all configuration and to UAC2
descriptor tests because this is what the tests were written for
(UAC2 class originally was full-speed only and there were no speed
properties available).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-10 14:41:32 +01:00
Tomasz Moń
67cd569216 samples: usb: uac2: Add full-speed instance property
The samples were written when UAC2 class supported only full-speed and
it was not clear how the high-speed would be supported.

Add the full-speed property so the samples can work with updated UAC2
implementation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-10 14:41:32 +01:00
Luca Burelli
dfef264bed tests/llext: add init_fini test
Add a test to check the proper support of ELF init arrays, using
the new llext_bootstrap function in place of llext_entry in the
LLEXT test suite.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-10 14:41:17 +01:00
Luca Burelli
92385a90d8 tests/llext: refactor: rename perm_setup to test_setup, add test_cleanup
This commit renames the perm_setup callback to test_setup and provides
the extension as an additional parameter. It also adds a test_cleanup
callback that is called after each test completes.

Setup and cleanup functions are now called regardless of whether
CONFIG_USERSPACE is enabled or not.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-10 14:41:17 +01:00
Luca Burelli
2d322725d3 tests/llext: refactor: simplify test case definition
This patch refactors the macro for test case definition to simplify the
generic case. By using variable macro arguments and default-0 fields,
the most common case does not require arguments at all and tests that
have special requirements can be defined with only the necessary fields.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-10 14:41:17 +01:00
Jacob Winther
67fbbaedc5 boards: adafruit feather nrf52840 update UF2
Add support for flashing the Adafruit Feather nrf52840 Express
using UF2 over USB.

Also standardise on using the UF2 variant, so add a non UF2 variant
of the Sense board, so it can be flashed using the SWD headers.

Created flash dtsi files for both SWD and UF2. These are actually identical
for many other boards and should probably be moved to common in future.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-10 14:41:06 +01:00
Jacob Winther
dcb05ce31e boards: adafruit feather nrf52840 convert to variants
Update both versions of adafruit feather nrf52840 to be variants rather
than separate boards. The aim is to provide a more consistent approach
and to remove some unnecessary Kconfig redundancy.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-10 14:41:06 +01:00
Jacob Winther
91cbbe88a3 boards: adaftuit feather nrf52840 Kconfig updates
Remove unnecessary Kconfig options.
Simplify configuration by removing custom Kconfig option.
Make Kconfig generic for all boards by moving usb selection to
board_defconfig.

These changes should enable the boards to become variants instead.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-10 14:41:06 +01:00
Jacob Winther
3138f0124a boards: adafruit feather nrf52840 remove bossac
Remove bossac support for UF2 as it isn't neccessary.

Based on xiao_ble.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-09-10 14:41:06 +01:00
Tahsin Mutlugun
98638a2653 tests: drivers: spi: spi_loopback: Enable DMA tests for MAX32 boards
Define DMA channels for MAX32 boards and add a new test case so that
DMA-based SPI transfers are tested.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-10 14:39:51 +01:00
Tahsin Mutlugun
6b14bbc13c drivers: spi: spi_max32: Add DMA support
Add DMA support to MAX32 SPI driver.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-10 14:39:51 +01:00
Tahsin Mutlugun
bb57bc98b9 manifest: hal_adi: Update to fix SPI build errors when DMA is enabled
Update hal_adi to include the fix for build errors encountered when
building SPI loopback test with DMA enabled on MAX32662.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-10 14:39:51 +01:00
Grzegorz Swiderski
1f8d1b705c modules: hal_nordic: nrfx: Add nrfx_config_ext.h
Taking a cue from `nrfx/templates`, introduce this file so that it can
be overridden out-of-tree to add external nRF product definitions.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-10 14:39:22 +01:00
Jordan Yates
632d6b9416 sensor: bme680: only read compensation params once
Only read the compensation parameters from the chip on first power up,
as they are static on the device.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-10 11:44:30 +02:00
Jordan Yates
5953a26dc6 sensor: bme680: support power domains
Support the BME680 being on a power domain, which may not be powered at
boot. For example, Nordic Thingy53.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-10 11:44:30 +02:00
Pisit Sawangvonganan
ecbcb5b80f drivers: can: shell: use shell_fprintf_normal instead of shell_fprintf
Due to the introduction of `shell_xxx_impl` wrapper functions in
PR #75340 and rename to `shell_fprintf_xxx` in PR #77192 we can minimize
caller overhead by eliminating direct `color` parameter passing.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-10 11:44:23 +02:00
Nicolas Pitre
6b3fff3a2f kernel: mmu: make demand paging work on SMP
This is the minimum for demand paging to work on SMP systems.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-10 11:44:16 +02:00
Maochen Wang
a206ab0ac3 drivers: wifi: nxp: add Kconfig to enable Wi-Fi features
Add some default Wi-Fi Kconfig for NXP driver.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-10 11:44:03 +02:00
Maochen Wang
4a4d955acd samples: net: wifi: add missing config for rd_rw612_bga board
Add missing macro config for rd_rw612_bga board.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-10 11:44:03 +02:00
Maochen Wang
55ee1ae4a9 drivers: wifi: nxp: update the correct Macro config.
For Soft-AP case, use CONFIG_WIFI_NM_HOSTAPD_AP to replace the
CONFIG_WIFI_NM_WPA_SUPPLICANT macro.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-10 11:44:03 +02:00
Yong Cong Sin
ff2cbf9445 debug: symtab: add shell command
Implement shell commands to access the symbol table.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-10 11:43:55 +02:00
Abderrahmane Jarmouni
f7de44dfaf drivers: display: stm32_ltdc: fix return value
Blanking On/Off calls should not return 0 when there is no panel
controller to forward them to, instead they should return ENOSYS to
signal to the application that they were not actually executed.

"device_is_ready" does check for null, but also for
"dev->state->initialized == false", so we need to isolate the
"dev == NULL" case.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-10 11:43:48 +02:00
Yong Cong Sin
26d75ab796 arch: riscv: optionally stores a pointer to csf in struct arch_esf
The callee-saved-registers can be helpful to debug the state of
a core upon an exception, however, currently there's no way to
access that information in user-implemented
`k_sys_fatal_error_handler()`, even though the csf is already stored
in the stack.

This patch conditionally add a `csf` member in the `arch_esf` when
`CONFIG_EXTRA_EXCEPTION_INFO=y`*, which the `_isr_wrapper` would update
when a fatal error occurs before invoking `z_riscv_fatal_error_csf()`.

Functions such as `k_sys_fatal_error_handler()` would then be able
to access the callee-saved-registers at the time of exception via
`esf->csf`.

* For SoCs that select `RISCV_SOC_HAS_ISR_STACKING`, the
  `SOC_ISR_STACKING_ESF_DECLARE` has to include the `csf` member,
  otherwise the build would fail.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-10 11:43:40 +02:00
Shrek Wang
1968220838 samples: net: vlan: Add IPv6 prefix config to each vlan-iface
Without the IPv6-prefix set, the net_if_ipv6_addr_onlink() check
will always fail. The packets with DIP in the local link will go
to 'try_send' code branch, which is not expected.

Signed-off-by: Shrek Wang <shrek.wang@nxp.com>
2024-09-10 11:43:32 +02:00
Shrek Wang
54942ec9a8 net: Add ipv6 prefix mask function
Use the IPv6 unicast address and the prefix-len to get the IPv6
network address.

Signed-off-by: Shrek Wang <shrek.wang@nxp.com>
2024-09-10 11:43:32 +02:00
Karol Lasończyk
45dd395900 manifest: Update hal_nordic with nrfx changes
Moving hash to include new radio symbols from hal_nordic/nrfx.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-10 11:43:25 +02:00
Robert Lubos
ac51e30957 tests: net: lib: lwm2m: content_link_format: Update BS discovery test
Align bootstrap discovery tests case with the enabler version reporting
changes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-10 11:43:18 +02:00
Robert Lubos
e6f942f238 net: lwm2m: Fix enabler version reporting during bootstrap discovery
LwM2M 1.1 specification mentions that the enabler version format was
specified wrongly in LwM2M 1.0 specification, and servers only "may"
accept the old format, which no longer seems to be the case for Leshan.

The URI reference ("</>;") before the enabler version is now mandatory,
if it's missing the bootstrap discovery fails with Leshan. Another
problem are quotes around the enabler version, which seems to be
conditionally accepted only for LwM2M version 1.0. Therefore, keep the
quotes only for that version, to prevent any potential issues with other
servers.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-10 11:43:18 +02:00
Robert Lubos
3e5b878102 samples: net: lwm2m_client: Remove unneeded Security object instance
The second Security object instance for bootstrap case isn't really
needed, as the bootstrap server creates own Security object instances
anyway. As that object instance had no Short Server ID assigned, it
caused failures during bootstrap discovery.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-10 11:43:18 +02:00
Alberto Escolar Piedras
c297e2df67 manifest: Update nRF hw models to latest
Update the HW models module to:
d2a119a9c7600ce06033a794de042e0ad9a38702

Including the following:
d2a119a 54 ECB/CCM tests: Add BLE spec examples and more printouts
17692a6 54 CCM: Correct variable names
16629b5 RRAMC: Add backwards compatible command line aliases for flash_*
52cbc36 54 AAR, CCM, ECB: Fix reset values and ECB key endianess
d51acf4 RADIO: Implement TASK_SOFTRESET
8285509 54 ECB: Correct t_ECB
4f70fba 54: AAR/CCM: Route tasks to the appropriate module
895eabb RADIO: Warn only once about TASK_SOFTRESET not being implemented

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-10 11:43:08 +02:00
Evgeniy Paltsev
71e862e79c MWDT: linker: fix regresion
Fixes commit 5badbfe2a2 ("cmake: move
toolchain_ld_baremetal to linker properties.") which broke build for
ARC MWDT toolchain.

Fixes failure:
```
lldac: error: cannot open ,--orphan-handling=warn: No such file or
  directory
ninja: build stopped: subcommand failed.
```

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-09-10 11:43:01 +02:00
Maciej Perkowski
c743821f96 twister: fix dts path for module
Fixes twister with modules (TypeError for undefined dts_root)

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-09-10 11:42:51 +02:00
Marek Matej
a3f71f13bf boards: espressif: Use default partition tables
Include the predefined partition table in the Espressif boards.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-09 18:42:01 -04:00
Marek Matej
7ad79a838b dts: espressif: Partition tables
Add general purpose partition tables to prevent
putting copied version of the same table into the
every ESP32 board dts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-09 18:42:01 -04:00
Jonathan Rico
01354c0045 Bluetooth: conn: move auto-init procedures to system workqueue
`conn_auto_initiate()` starts a bunch of controller procedures (read: HCI
commands) that are fired off right after connection establishment.

Right now, it's called from the RX context, which is the same context where
resources (cmd & acl buffers) are freed. This not ideal.

But the procedures are all async, so it should be fine to schedule this
function on the system workqueue, where we have less risk of deadlocks.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-09-09 18:41:45 -04:00
Daniel Leung
5ec60249ed x86: skip printing args when unwinding stack
On 32-bit x86, it was supposed to print the first argument to
the function during stack trace. However, it only works when
code optimizations are totally disabled (i.e. -O0). As such,
printing the args is not meaningful to aid with debugging.
So change it to simply print the function address, the same
as x86 64-bit.

Also, since unwind_stack() has exactly one caller, make it
ALWAYS_INLINE to skip a function call.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-09 18:41:04 -04:00
Richard Wheatley
968f674c66 drivers: serial: ambiq uart update
The number of modules is different for each soc.
There is a macro in the HAL that should have been used.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-09-09 18:40:46 -04:00
Margherita Milani
5032f099c6 drivers: sensor: add apds9253 driver
Add all the necessary files to add apds9253 Avago sensor driver.

Sensor available at https://docs.broadcom.com/doc/APDS-9253-001-DS

Signed-off-by: Margherita Milani <margherita.milani@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-09-09 13:56:17 -04:00
Riadh Ghaddab
12a437c4c9 pm: policy: change the policy event handling
Some events needs to be handled with a very low latency constraint.
If the system is in deep sleep, exit latency from this low level state
exceeds sometimes the maximum latency constraint of these events.

Before suspending the system, select which events is happening sooner,
kernel events or normal events.
CPU will be up just before the next event occurs taking into account the
exit latency of the current power state

Change also the policy event API to take as argument absolute time in HW
cycles instead of time in us

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2024-09-09 13:56:04 -04:00
Sylvio Alves
8233b70ece espressif: clean up unused code
Remove all entries that as not being used.
This also update hal to re-enable warning flags
as such as -Wno-unused-variable.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-09-09 13:55:39 -04:00
Pisit Sawangvonganan
d207edb1cf shell: rename shell_xxx_impl wrapper functions to shell_fprintf_xxx
Since the `_impl` naming convention is intended for internal use only,
renaming these functions to the `shell_fprintf_xxx` variant is
more suitable for calls outside the module:
- `shell_info_impl` to `shell_fprintf_info`
- `shell_print_impl` to `shell_fprintf_normal`
- `shell_warn_impl` to `shell_fprintf_warn`
- `shell_error_impl` to `shell_fprintf_error`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-09-09 13:55:31 -04:00
Emil Gydesen
79fa6b3f54 Bluetooth: ISO: Update includes for ISO files
Updates the includes for ISO file so that it conforms to
IWYU (include what you use).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-09 13:55:20 -04:00
Andriy Gelman
08996a63b0 drivers: can_mcp251xfd: Forward error and remove done label
Currently if initializing one of the registers fails, the return
error gets overwritten by can_set_timing(). Fix by forwarding the
error directly. Also remove unnecessary done label.

Fixes #73586.

Original patch by melvinvdb from #73714.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-09 13:55:14 -04:00
Andriy Gelman
59bdb49901 drivers: can_mcp251xfd: Delay initialization after reset
Mcp251xfd devices occasionally fail to initialize after board
resets. It was experimentally found that adding a 5ms delay fixes
the problem.

Fixes #73586.

Original patch by melvinvdb from #73714.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-09 13:55:14 -04:00
Lyle Zhu
8113ff7e9c bluetooth: AVDTP: Check buffer len before pulling data
Check the remaining buffer length is not less than
required data length before pulling data from the
buffer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-09-09 13:54:56 -04:00
Grzegorz Swiderski
b97300e414 Revert "drivers: cache: nrf: enable CACHE_NRF_PATCH_LINEADDR for nRF92"
This reverts commit a2bb323861.

nRF9280 does not suffer from the same bit 28 hardware bug as nRF54H20.
This workaround must be disabled to make the DCACHE function properly.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
26c99a6f36 soc: nordic: Extend address validation for Haltium platform
VPR addresses are platform-dependent, so let's use a common symbol -
CONFIG_NRF_PLATFORM_HALTIUM - to cover both nRF54H and nRF92 series.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
3b56ef0de1 soc: nordic: nrf92: Update supported NRFS services
PMIC service should be supported on Application and Radiocore, whereas
DVFS service is currently unsupported.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
57ce595ac1 soc: nordic: nrf92: Set PPR hart ID to processor ID
Booting VPRs requires changing the default value of CONFIG_RV_BOOT_HART.
This must be reverted (back to zero) for a future nRF9230 SoC revision,
which will align more closely with the RISC-V spec.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
17a7735b1f snippets: Support nordic-ppr and nordic-ppr-xip on nRF92
Add overlays for booting PPR on the `nrf9280pdk/nrf9280/cpuapp` target.
They are identical to the nRF54H ones because of similar DT structure.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski
5cb49dcd94 modules: hal_nordic: Add NRFX_GPIOTE131_CHANNELS_USED mask
GPIOTE131 channels are reserved in the same way as the GPIOTE130 ones.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Benjamin Cabé
db503f8c23 doc: css: stick footer at bottom
Make actual document take all vertical space available so that footer is
always at the bottom, even when the page has very little content.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:54:15 -04:00
Benjamin Cabé
4e132c2b42 doc: Rework footer
There is likely no need for the footer to be so prominently asking folks
to report issues with a page based on the number of issues that have
been reported in the past year or so.

This change makes the footer less crowded and saves some vertical space.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:54:15 -04:00
Benjamin Cabé
d5694cd9d8 doc: css: drop Breathe rules
We have dropped Breathe so these rules are just bloating the
CSS file.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:54:15 -04:00
Karol Lasończyk
aca6b2ab22 soc: nrf: Update systemoff sequence for nRF54L15
Production version of the nRF54L15 SoC needs reset reason
to be cleared before going into system off.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-09 13:54:05 -04:00
Guennadi Liakhovetski
be041b14fe Intel: ADSP: move HPSRAM mask into assembly
Assembly in power_down() in power_down.S already defines data and
code to be locked in cache when powering down SRAM. Instead of adding
another such location in power.c, move the hpsram_mask[] array into
power_down.S.  This fixes hard to debug failures when shutting down
the ADSP.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-09 13:53:56 -04:00
Benjamin Cabé
dcd91a92bc doc: _extensions: :zephyr-app:'s should be valid paths
Add a check so that we hopefuly keep all zephyr-app-commands free of
references to non-existing paths.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:53:47 -04:00
Benjamin Cabé
25fa25a5a9 doc: :zephyr-app: should point to existing in-tree folders
As there is no check (yet!) in the directive, many
.. zephyr-app-commands:: in the documentation are pointing to
non-existing sample applications, which is problematic for users who
typically expect to just copy-paste the commands and have them work.

This commit fixes all offending references to point to existing samples,
or converts them to simple ":app:" instead of ":zephyr-app:" when the
intent wasn't to refer to in-tree samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:53:47 -04:00
Benjamin Cabé
7b19f6607c maintainers: add kartben as Documentation Infrastructure maintainer
Adding myself as a co-maintainer for documentation infrastructure.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:53:38 -04:00
Abderrahmane Jarmouni
a46cef4422 boards: move stm32f103_mini to others
move stm32f103_mini board from ST to Others as it is not an official
ST board.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-09 15:25:31 +03:00
Abderrahmane Jarmouni
4e537c2620 doc: releases: migration-guide-4.0: note about stm32 boards flashing
STM32CubeProgrammer is now selected as the default runner for all STM32
official boards when 'west flash' is invoked.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-09 15:25:31 +03:00
Abderrahmane Jarmouni
05a96526a5 boards: stm32: doc: update flashing section
Update all STM32 official boards Doc Flashing section.
Correct some typos and remove outdated information.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-09 15:25:31 +03:00
Abderrahmane Jarmouni
e17e54c48f boards: stm32: add flashing with stm32cubeprog for all
Add STM32CubeProgrammer where it is not available, & make it
default flashing method by placing it 1st in board.cmake

Before this change, the west runner that's selected when calling
'westflash' without the '--runner ...' option is kind of arbitrary
& depends on which runner is 1st in board.cmake file.

Another reason this change is needed is that STM32CubeProg is the only
available way to check/modify Option Bytes, and to flash code to
external Flash on many STM32 boards.

This change does not affect 'west debug' behavior, which defaults to
the debugger (OpenOCD/JLink) that is included first in board.cmake

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-09 15:25:31 +03:00
Abderrahmane Jarmouni
b42549f071 doc: flash_debug: document stm32cubeprogrammer
Document STM32CubeProgrammer installation & usage with Zephyr.

Signed-off-by: Abderrahmane Jarmouni <git@jarmouni.me>
2024-09-09 15:25:31 +03:00
Jordan Yates
d1abe40fb0 flash: nrf_qspi_nor: wait for erase to complete
Wait until the erase operation triggered by `qspi_erase` completes
before returning. This aligns with the behaviour of other flash drivers
like `spi_nor` and `soc_flash_nrf`.

A delay is added to the `qspi_wait_while_writing` to prevent the check
from monopolising the CPU.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-09 15:25:16 +03:00
Martin Koehler
22a615b3e6 usb: cdc_acm: Fix tx false data drop logging
cdc_acm_fifo_fill() logged warnings about dropped data
when they in fact just couldn't be sent (due to connection
of filled buffer). Not being able to send (all) data is
a valid behaviour and data isn't dropped. Return value
shows how many data was accepted (which can be zero).

Logging will now instead only inform data can't be sent
due to the respective issue (connection not ready/ buffer full).

Signed-off-by: Martin Koehler <koehler@metratec.com>
2024-09-09 15:24:37 +03:00
Dmitrii Golovanov
d9f567051e ci: elasticsearch: Upload script improvements
Multiple improvements of the `upload_test_results_es.py` script:

 * JSON objects flattening.

   This feature allows `twister.json` file preprocessing to simplify
   its Elasticsearch index structure for complex hierarhical objects,
   for example with memory footprint, or code coverage data.

   A new command line option `--flatten` is added to change testsuite data
   structure in regard of one of its list objects: either `testcases` or
   `recording`, so each item there becomes an independent data record
   inheriting all other testsuite properties, whereas the children
   object's properties are renamed with the parent object's name
   as a prefix: 'testcases_' or 'recording_' respectively.
   Only one testsuite property can be flattened this way per index upload.
   Other children objects will be treated accorging to the index structure.

   Related new command line options (with help text explanations):
    `--flatten-dict-name`,
    `--flatten-list-names`,
    `--flatten-separator`,
    `--transpose-separator`,
    `--escape-separator`

 * A new command line option `--transform` is added to allow regexp group
   parsing in string propertites extracting additional derived properties.

 * A new command line option `--exclude` is added to exclude testsuite
   properties not needed to store at Elasticsearch index.

 * Branch name `--run-branch` and Workflow ID `--run-workflow` command
   line options as additional key fields to allow data from different
   branches, workflows and triggering events in the same index.

 * A new command line option `--map-file` is added to apply
   an explicit index structure to the `twister.json` input data.

 * Add bulk operation timeout parameter for heavy/long uploads.

Other changes:
  * batch upload error handling and logging;
  * inline documentation improvements;
  * some corner case fixes on empty objects.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-09 15:24:26 +03:00
Emil Gydesen
fa0bbad205 tests: Bluetooth: Run Audio BSIM test on nrf5340bsim
Add support for running the audio BSIM tests on the
nrf5340bsim board.

This expands the tests we run in CI.

To support all tests with the hci_ipc sample for the netcore,
it is updated to support a bit more while still fitting on the
netcore on the nRF5340 series.

The behavior of advertisement seems to differ a little bit,
which required the bap_unicast_server_test.c to update how it
restarts advertisements.

Two broadcast tests that are passing on the nRF52 BSIM is also
failing due an assert. This should be investigated at a later
time.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-09 15:23:57 +03:00
Yong Cong Sin
5365421fa1 arch: riscv: use string array instead of switch statement for cause
Get rid of the switch statement and use an string array
for the cause instead. This saves about ~600 bytes.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Yong Cong Sin
7844f5aebb arch: riscv: fatal: make cause_str reusable
Rename `cause_str` to `z_riscv_mcause_str` and make it non-static,
so that it can be used in user-implemented `k_sys_fatal_error_handler`.

Also, this function should return a constant string, so add `const`
to it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Yong Cong Sin
951af0d457 arch: riscv: fatal: always print mcause & mtval
Relocate the logging of mcause & mtval from `_Fault` to
`z_riscv_fatal_error_csf` so that they are always printed
upon exception.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-09 15:23:43 +03:00
Johan Hedberg
68b8cd6d2c Bluetooth: HCI: Add definition for Bluetooth 6.0
Add a definition for HCI version 6.0, now that the new core specification
version has been released.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Johan Hedberg
131a11e61e Bluetooth: Host: Add decoding for Bluetooth HCI version 6.0
Add decoding for version 6.0, now that the new core specification has been
released.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Johan Hedberg
ceedf72c51 Bluetooth: shell: Use common HCI version decode function
There's a generally available bt_hci_get_ver_str() function, so use that
instead of defining our own.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-09-09 15:23:25 +03:00
Jamie McCrae
9354e181d6 scripts: ci: check_compliance: Add MCUboot Kconfig
Adds a Kconfig used by MCUboot to the allow list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-09 15:23:16 +03:00
Jamie McCrae
8a71f617bf tests: boot: mcuboot_data_sharing: Fix test
Fixes the test which stopped working after changes were made to
MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-09 15:23:16 +03:00
Anas Nashif
8c32a82e47 arch: arc: replace ARC_EARLY_SOC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARC.

Replace soc_early_asm_init_percpu() with platform_reset()

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif
81cf87001c arch: arm: select PLATFORM_RESET_HOOK if is PLATFORM_SPECIFIC_INIT set
Temporary until usage of PLATFORM_SPECIFIC_INIT is removed in modules.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif
f519dd1411 arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.

Replace z_arm_platform_init() with platform_reset().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Anas Nashif
e260d03686 init: introduce soc and board hooks
Introduce soc and board hooks to replace arch specific code
and replace usages of SYS_INIT for platform initialization.

include/zephyr/platform/hooks.h introduces the hooks to be implemented
by boards and SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Bjarki Arge Andreasen
736289a691 docs: release notes: Mention GNSS periodic config APIs removed
Mention that the GNSS periodic config APIs have been removed in the
release notes for 4.0

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-09 09:28:45 +02:00
Bjarki Arge Andreasen
a28ba1d1a2 drivers: gnss: api: Remove periodic configuration
The GNSS device driver API includes an API for setting the periodic
power configuration at runtime. This API is not used in-tree, and is
antithetical to the pm device subsystem.

The periodic config configures the GNSS to search for a fix for a
given amount of time, then suspend itself for a given amount of time,
and repeat this pattern. The issue with this is that both the
application and the GNSS modem itself can be in a conflicting power
state, where the device is resumed (pm device), but actually suspended.

Applications which wish to periodically resume/suspend the modem, even
in more sophisticated ways like suspended after first fix, can simply
implement this logic, using the pm_device calls and the GNSS callbacks.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-09 09:28:45 +02:00
Lukasz Mrugala
345eb8e94a scripts: twister: Elevate Status Error
Status errors previously logged an error, but didn't fail the running test.
This commit changes that
 and introduces a new StatusAttributeError to use there.

One test is modified so it follows proper status form.
One test for the new error has been added.

Status errors now will properly mark the Instance as ERROR
and not run TestCases as SKIP.
This necessitated some code layout changes in runner.py

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-09 09:28:37 +02:00
Marek Pieta
8b50d3768f drivers: usb: udc_dwc2: Notify upper layer on failed TX
Change ensures that `dwc2_handle_xfer_next` would notify upper layer if
`dwc2_tx_fifo_write` fails. This is necessary to ensure that upper layer
is aware of the failed TX for the submitted transfer. It also ensures
that the submitted transfer is removed from the TX queue.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-09-09 09:28:29 +02:00
Jukka Rissanen
da97542a6e net: dhcpv6: Do not wait forever when allocating net_pkt
As the allocation is run in system workqueue context, it can
cause problems if waiting forever when allocating net_pkt.

Fixes #77935

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-09 09:28:21 +02:00
Jukka Rissanen
254e757539 net: dhcpv4: Do not wait forever when allocating net_pkt
As the allocation is run in system workqueue context, it can
cause problems if waiting forever when allocating net_pkt.

Fixes #77935

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-09 09:28:21 +02:00
Benjamin Cabé
951b4943a9 docs: don't show doc version admonition on main
It is hard to justify keeping the version admonition/disclaimer eating
up so much real estate on all documentation pages. It was useful when
search engines tended to index old versions of the documentation and
reminding people where they "landed" was a good idea.
Now, it is just taking up space and we can safely assume that people
explicitly interested in older releases will find their way to the right
place, as our version selector is in a very similar spot to how other
projects do it.

Note that the admonition will still be included on "released" versions
of the docs, since the "there might be a more current version of this
page" admonition is actually useful to have.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 09:28:15 +02:00
Piotr Kosycarz
c0b5aeb702 boards: nordic: nrf54l15dk: enable HWFC
For both UARTs connected to debugger chip.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-09-09 09:27:39 +02:00
Henrik Brix Andersen
5b15751d0b doc: releases: migration-guide: 4.0: mention rename of net_buf header
Mention the rename of the network buffer header file.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen
83e30552ab tests: lib: net_buf: move network buffer tests to tests/lib/net_buf
Move the network buffer tests to tests/lib/net_buf as their implementation
now lives outside of the networking subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen
f86f5263b0 doc: net_buf: move the network buffer documentation to services
Move the network buffer documentation from networking to services as the
implementation now lives outside of the networking subsystem.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen
159f7dbbb1 lib: net_buf: rename header file from zephyr/net/buf.h to zephyr/net_buf.h
Move the network buffer header file from zephyr/net/buf.h to
zephyr/net_buf.h as the implementation now lives outside of the networking
subsystem.

Add (deprecated) zephyr/net/buf.h header to maintain compatibility with old
file path.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Henrik Brix Andersen
ced80b13bf lib: net_buf: move the network buffer implementation to lib
Move the net_buf implementation from the networking subsystem to a library
as they have no dependency on the networking subsystem.

Network buffers are used in subsystems outside of networking
(e.g. Bluetooth, USB).

Fixes: #36374

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Mahesh Mahadevan
cfc010ff4e samples: sensor/mcux_lpcmp: Overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
f34c78535f samples: adc_dt: Add overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
bc5c075953 samples: dac: Add overlay for FRDM MCXN947 qspi variant
- Add overlay for the FRDM MCXN947 qspi variant
- Fix the overlay file name for the default variant

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
d5ae219799 test: frdm_mcxn947_mcxn947: Add config and overlay for QSPI variant
Add config and overlay files for the QSPI variant of the
NXP FRDM-MCXN947 board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
99131b92ff boards: frdm_mcxn947: Enable CACHE64 FlexSPI cache
1. Enable CACHE64 block used by FlexSPI.
2. LPCAC cache is already enabled by SystemInit which
   is called earlier
3. Configure the FlexSPI clock when running in XIP mode
   as we cannot rely on the driver setting this up as it
   may not be enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
b32a86ad8d boards: frdm_mcxn947: Add a variant for executing from QSPI
1. The boards always boots from internal flash. However it does
have an external QSPI that can be used to store Zephyr.
Add a variant to support running Zephyr from QSPI Flash.
Running Zephyr from QSPI requires a bootloader like MCUboot
to be pogrammed to internal flash.
2. Create a common dts file to add features that are enabled for
CPU 0 that is included by both vairants i.e internal flash (default)
and QSPI variant.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
bdfd1d2e1b soc: mcx: Fix build errors when building for XIP from FlexSPI
Include compile of the flash file when FlexSPI_XIP is enabled
even when the FlexSPI driver is not enabled.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
0543dd6bd7 west.yml: Update to the NXP HAL to get fixes to CACHE64 driver
Get the fixes made to the NXP SDK CACHE64 driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Jukka Rissanen
36137bc8cc net: vlan: Fix RX debug print
The interface index and tag prints were swapped.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen
25301ace0e net: virtual: Pass status to caller when starting/stopping interface
When virtual interface is being started or stopped so when the
interface is brought up or down, check the return code and pass
it to net_if_up() or net_if_down() calls.
This helps to avoid printing success status even if the interface
up/down failed at the virtual interface level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen
5355920f98 tests: net: bridge: Update the bridging tests
Make sure that tests work after overhaul.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Jukka Rissanen
6986b1ef71 net: bridge: Overhaul the code to use virtual interfaces
The legacy bridging code prevented normal IP traffic to the
bridged Ethernet interfaces. This is not intuitive and differs
how bridging setup works in Linux. This commit changes that and
creates a separate virtual interface that is doing the actual
bridging. This enables the bridged Ethernet interfaces to work
normally and provide IP connectivity.

How this works in practice:

* User needs to enable CONFIG_NET_ETHERNET_BRIDGE
* User needs to have a device with more than one Ethernet
  interface
* After booting, the net-shell or program API can be used
  to add interfaces to the bridge like this.
     net bridge addif 1 3 2
  where the 1 is the bridge interface index and
  2 and 3 are the Ethernet interface indices.
* The bridging is then finally enabled / started when the
  bridge interface 1 is taken up
     net iface up 1
* If bridged interfaces are removed from the bridge (minimum
  of two interfaces are needed there), then the bridging is
  disabled automatically. The bridge interface stays up in
  this case and can be taken down manually.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 18:01:15 -04:00
Anas Nashif
5fdbbf7d7e uart: nrfx: fix config check
we should be checking for config, not data.

Fixes #78114

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-06 17:52:03 -04:00
Alberto Escolar Piedras
1b4c47ab28 Revert "dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg"
This reverts commit 518de763a6.

This commit switched nrf5340 devices to use the icbmsg
IPC backend.
Unfortunately this backend is not currently supported
in the nrf5340bsim target (it is not properly configured)
which results in a segfault during its initialization.
As this issue is currently blocking CI for all BT development
in Zephyr, let's revert this provisionally while we add
support for it.

See
https://github.com/zephyrproject-rtos/zephyr/issues/78099
for more info.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-06 17:51:39 -04:00
Yong Cong Sin
31ebb79c86 arch: multilevel_irq: fix interrupt bits check
The bits allocated for each aggregator level only need to be enough to
encode CONFIG_MAX_IRQ_PER_AGGREGATOR, instead of the combined number of
IRQs from all aggregators in that level.

Add additional check for L3 interrupts as well, if it is enabled.

Updated the assert in `z_get_sw_isr_table_idx()` to be more verbose.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-06 14:06:23 -05:00
Yong Cong Sin
4e54cff223 soc: qemu: riscv: update IRQ config
- Update `MAX_IRQ_PER_AGGREGATOR` to 1024 to match with the
  devicetree
- Update `2ND_LEVEL_INTERRUPT_BITS` to 11 bits to
  be able to encode the L2 IRQs.
- Update `NUM_IRQS` to 1036 (L1 has 12, L2 has 1024)

Update the `MAX_IRQ_PER_AGGREGATOR` config in testcase
accordingly, so that it won't overflow the configured bits.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-06 14:06:23 -05:00
Daniel Mangum
a80af336c2 drivers: wifi: esp_at: only log errors in active mode with full IPD
Removes constant error logging when parsing IPD headers in active mode and
waiting on remote IP and port. Currently an error message is logged for
every character in the remote IP and port until the full length obtained.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-06 12:04:49 -05:00
Shen Xuyang
bce1193e45 tests: drivers: Add overlay for test of IST3931 display driver
Add the overlay for the test of IST3931 display driver

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang
74f3bf3aa4 driver: display: Add driver for diplay controller ist3931
Add the driver of diplay controller ist3931, i2c/spi
128x64 monocolor display driver. Only the i2c mode
driver of the controller is implemented and tested.

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang
3cb1d5eb63 dts: bindings: Add dts binding of ist3931
Add dts binding for istech,ist3931

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Shen Xuyang
7cef5377c1 dts: bindings: add vendor prefix of istech
Add vendor prefix for Integrated Solutions Technology Inc.

Signed-off-by: Shen Xuyang <shenxuyang@shlinyuantech.com>
2024-09-06 12:03:57 -05:00
Emil Gydesen
fc4b21b3e2 sys: atomic: Minor upates to atomic_test* function docs
Minor updates the atomic_test* functions to indicate
that only the get/clear/set part of the functions are
atomic, and not the test part. Also made the wording
and pattern of the functions more similar.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-06 10:46:22 -05:00
Pieter De Gendt
5a3c9c914a scripts: pylib: twister: Write version to testplan.json
The twister environment version is already set, write it to the
testplan.json file.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-09-06 11:31:57 -04:00
Krzysztof Chruściński
362653d4b3 doc: services: logging: Add section for Coresight STM logging
Add section which describes how Coresight STM logging works and how
to use it. Currently this feature is supported only on nrf54h20.
However, most parts of the solution is not nrf54h20 specific and
other cores with Coresight can use it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
8d08a7a90d samples: boards: nrf: nrf_coresight_stm: Add new configurations
Add standalone STM configuration to the sample.

Add configuration which instead of STM uses local UART for logging.
This configuration can be used to compare performance and flash
usage for various logging modes.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
a21a1b073d snippets: Add nordic-log-stm for logging using STMESP
Add snippet which allows configuration of logging using STMESP
frontend using standalone mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
adcb13d293 logging: log_frontend_stmesp: Add support for standalone mode
Add support for standalone mode where data written to STMESP is
decoded on chip to a human-readable strings.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
09ab0ba20b drivers: misc: coresight: nrf_etr: Add standalone mode
Extend ETR buffer handler to support standalone mode where data from
ETR buffer is decoded and printed in human readable format on UART.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
c77a54327d tests: logging: Add test for log_frontend_stpesp_demux
Add test for message demultiplexer from STPv2 data stream generated
by STMESP frontend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
5b26b21bad logging: Add demultiplexer for log_frontend_stmesp
Add module which demultiplexes stream of log message which are
encoded into STPv2 stream by log_frontend_stmesp. There are 3 types of
messages that can be present in the stream:
- Log message (starts with DMTS32, followed by Dx and closed by FLAG)
- Tracepoint (FLAGTS or DMTS32)
- STM HW event (DMTS8 on 0x80 master and 0x00 channel)

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
ddb66e5b63 samples: boards: nrf: Add sample using Coresight STM on nrf54h20
Add sample that demonstrates logging using Coresight STM and ETR buffer
handled by the application core. Application is using sysbuild and 2
cores: cpuapp and cpurad. cpuapp is logging to STM and handling ETR buffer
where data from STM is collected and cpurad is only logging to STM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
89182f64dd snippets: Add nordic-log-stm-dict snippet
Add snippet which configures logging using Coresight STM on
nrf54h20.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
4b20c3d4d6 drivers: misc: coresight: Add nrf_etr module
Add module which is dumping data from Coresight ETR buffer. Coresight
ETR is a sink for STMESP data. This module is specific to Nordic SoC
because it does not access ETR registers. Instead it is using Nordic
specific module (Trace Buffer Monitor TBM) to monitor amount of data
in the ETR buffer (which is a circular buffer).

Data from that buffer is sent over UART (in future it may be extended
to other transports). In future, module will be extended with option
to process STM data on chip.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
46c2988a4c boards: nordic: nrf54h20dk: Add ETR buffer to the memory map
Add 4k ETR buffer to the memory map.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
3e5a66d43d dts: Add nordic,nrf-tddconf node
Add node which configures trace and debug on nrf54h20.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
f2ec240b20 dts: nordic: Add nrf-tbm (trace buffer monitor) node
Add new binding and a node to nrf54h20. Update Kconfig and nrfx_config
to include nrfx_tbm driver when node with that compatible is enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
1dcd599982 soc: nordic: nrf54h: Add STM data flushing in pre_sleep
In order to get all data from STMESP written to ETR and processed
on time we need to write dummy data before sleep.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
89ef8a097b logging: Add Coresight STMESP dictionary-based frontend
Add frontend which is using Coresight STMESP for dictionary based
logging.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
fa8e6d8701 drivers: misc: Add support for coresight STMESP
Add header with STMESP register set and set of inline functions
that can be used to write data to STMESP.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
508434b2b2 dts: nordic: nrf54h20: Add stmesp nodes
Add nodes for STMESP peripherals.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
34ab5b02ba dts: bindings: debug: Add binding for ARM STMESP
Add binding for System Trace Macrocell Extended Stimulus Port (STMESP).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
0fdf13c85c logging: Move frontends to the dedicated directory
As there are more frontends coming in the future move existing
frontend to the dedicated directory (like backends).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
fc162f74c0 debug: mipi_stp_decoder: Align naming to 2.4 standard
Align naming to STP v2.4. Changing Master to Major.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
dd38a2ccde logging: Fix string stripping Kconfig option dependency
Change to depend on LOG_DICTIONARY_DB which is broader than
LOG_DICTIONARY_SUPPORT which is set only when log_output
supports dictionary mode. However, it is possible that
log_output is not used when dictionary mode is used. Database
generation is always enabled when dictionary mode is used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
7df2d54685 tests: drivers: uart: Add test for line errors handling
Add test which validates behavior of the UART driver when there
are errors on the receiver line.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Krzysztof Chruściński
345dd11e20 drivers: serial: uart_nrfx_uarte: Fix dropping flushed data
When rx_flush() was called with NULL buffer it was an indication to
drop data from the FIFO. However, it is still important to get the
correct amount of dropped data because when PPI+TIMER are used to
count bytes those flushed bytes are also counted (because each
byte generates RXDRDY event). If those bytes are not counted then
total amount of reported bytes is not correctly aligned with bytes
counted by TIMER.

Reworking rx_flush() to correctly count number of dropped bytes and
then add this flushed bytes to the total amount of RX bytes
reported to the user in RXTO event handler.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Krzysztof Chruściński
282bc783b1 drivers: serial: uart_nrfx_uarte: Fix interrupt driven TX only mode
When interrupt driven instance is using only TX then low power mode
is automatically enabled and then TXSTOPPED interrupt is disabled in
idle so uarte_nrfx_irq_tx_ready_complete() was returning wrong value.
Adding a dedicate flag which holds information is user enabled TX
interrupt.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Krzysztof Chruściński
e48053fdb5 drivers: serial: async_to_irq: Fix initialization
Callback was set in uart_async_to_irq_rx_enable() which is only called
when RX is enabled. Callback shall be called in the init function.
uart_async_to_irq_init() signature changed to take device as the
input argument instead of data and config for the adaptation layer
(which can be retrieved from the device). Device is needed when
setting a callback during the initialization.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Krzysztof Chruściński
5ce801fa2b drivers: serial: uart_async_to_irq: Add RX error handling
Adaptation layer was not correctly handling RX error and when error
occured uart_irq_is_pending() was still returning false.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Krzysztof Chruściński
3b232d5e07 drivers: serial: uart_nrfx_uarte2: Disable RX when error is reported
According to the API specification when RX error occurs receiver
shall be disabled. Adding missing disabling to the error handler.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:10 -04:00
Chaim Zax
f54a53b4b3 drivers: ws2812_gpio: Make timing configurable and less hardware dependend
The current driver contains assembly code which is specific for the nRF51
SOC which makes it incompatible with other SOC's. This patch adds support
for other nRF SOC's as well. The timing is calucated based on the CPU clock
frequency, but can be configured manually as well if needed.

Changes have been verified on a Adafruit Feather nRF52840 Express board,
which contains a single NeoPixel RGB LED. Timings have been verified using
a scope connected to the WS1812 data line.

Signed-off-by: Chaim Zax <chaim.zax@zaxx.pro>
2024-09-06 11:31:00 -04:00
Adam Kondraciuk
be523ad396 arch: arm: cortex_m: pm_s2ram: Minor typo fix
Fix typo in `PM_S2RAM_CUSTOM_MARKING` description.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-06 11:29:06 -04:00
Adam Kondraciuk
38575f89ea drivers: timer: nrf_grtc: Add GRTC fix for app and rad cores
Currently function `z_nrf_grtc_wakeup_prepare()` should be available
only for the GRTC manager (`CONFIG_NRF_GRTC_START_SYSCOUNTER` is active).

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-06 11:29:06 -04:00
Adam Kondraciuk
ee9d23945f soc: nordic: nrf54h: poweroff: Add support for s2ram
Add functions for local domain suspend to RAM. Add matching resume
procedure. Add pm_s2ram function for determining source of reset.
Add preserving NVIC and MPU state in retained RAM when CPU is powered off
during S2RAM procedure.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-06 11:29:06 -04:00
Ryan McClelland
1ef18bd97d drivers: i3c: shell: add shell command for the ccc setaasa
Add a shell command for the CCC SETAASA.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
6a824079df drivers: i3c: add ccc setaasa helper
Add a function helper for the CCC SETAASA.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
dda3585cf6 drivers: i3c: shell: add vendor ccc shell cmds
Add vendor shell commands for ccc

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
3067b41ccc drivers: i3c: add vendor ccc helpers
Add helper commands for sending Vendor CCCs

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
2ba06ffc47 drivers: i3c: shell: set values in desc with ccc
Including setting the respective value in the i3c descriptor with
it's CCC.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
c122c53409 drivers: i3c: shell: include reattachment for setdasa
If the dynamic address is not the same as the static address during
setdasa, perform the reattachment.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
fd063dd017 drivers: i3c: shell: fix info cmd display for max_read_turnaround
Max read turnaround is only 3 bytes. Fix the zero padding.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Ryan McClelland
ff7c20e894 drivers: i3c: shell: remove bcr check for getcaps
All I3C v1.1+ devices are required to support GETCAPS. Remove BCR
check as it was the requirement for v1.0.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:28:23 -04:00
Muhammad Haziq
91b688a666 driver: wifi: esp32: add APSTA support
The ESP32 Wi-Fi driver previously did not support APSTA mode,
enabling AP mode would disable STA mode and vice versa.
Support for APSTA has been added by introducing additional
network interface: one for STA (Interface 2) and one for
AP (Interface 1). The CONFIG_ESP32_WIFI_AP_STA_MODE option in
Kconfig now allows enabling or disabling this support.

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-09-06 11:28:15 -04:00
Quy Tran
79fb5a391a drivers: flash: Add support for flash driver on MCK-RA8T1
Initial commit to support flash driver on MCK-RA8T1 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Quy Tran
beba6685af drivers: flash: Add support for flash driver on EK-RA8D1
Initial commit to support flash driver on EK-RA8D1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Quy Tran
c217dfa1ea manifest: Update commit ID for hal_renesas
Update hal_renesas commit ID for flash driver support

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-06 11:28:04 -04:00
Duy Phuong Hoang. Nguyen
e1f990c176 drivers: flash: Initial support flash driver on EK-RA8M1
Initial commit for flash driver support on board using RA8 MCUs
* drivers: flash: implementation for flash driver on EK-RA8M1
* dts: arm: add device node for flash of EK-RA8M1
* boards: arm: enable support flash driver for ek_ra8m1, update
board documentation

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-06 11:28:04 -04:00
Matt Rodgers
3af8001e0a doc: http_server: document capturing of request headers
Add documentation on new feature allowing application to access HTTP
request headers.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-06 11:27:37 -04:00
Matt Rodgers
0c8bdbc45d net: lib: http_server: allow application to access request headers
Allow application to register certain HTTP request headers to be stored
by the server. These stored headers can then be accessed from a dynamic
resource callback.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-06 11:27:37 -04:00
Florian Grandel
666559b9d9 doc: extensions: application: add build_args
The `build_args` argument was not respected when generating west
commands. This led to an error in the documentation of qemu network
setup.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-06 11:27:27 -04:00
Luca Burelli
fca654c5a7 doc: llext: add extension bringup and teardown documentation
Add documentation for the new LLEXT APIs that allow to call the
initialization and cleanup functions of an extension.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-06 11:27:15 -04:00
Luca Burelli
af302cd5fe llext: add bringup, teardown, and bootstrap APIs
llext_bringup() and llext_teardown() are intended to be used to call the
extension's own initialization and cleanup functions, respectively. They
are meant to be called by the developer after loading an extension and
before unloading it. The list of function pointers to be called is
obtained via the new llext_get_fn_table() syscall, so that they are
compatible with user mode.

llext_bootstrap() is intended to be used as the entry point for a thread
created to run an extension, in either user or kernel contexts. It will
call the extension's own initialization functions and then an additional
entry point in the same context (if desired). The same function can also
be called directly in the main thread, if only initialization is
required.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-06 11:27:15 -04:00
Luca Burelli
04d7e4f490 llext: add support for ELF init/fini arrays
Load the .preinit_array, .init_array and .fini_array sections in ELF
files. These sections are arrays of function pointers that are filled by
the compiler with the addresses of functions that need to be called at
startup or termination by the loader, such as C++ constructors and
destructors.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-06 11:27:15 -04:00
Armin Kessler
576fc209c4 drivers: video: esp32s3: add support for cam interface
Adding support for the esp32s3 LCD_CAM peripheral.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-09-06 11:26:59 -04:00
Sigurd Hellesvik
78674cc25b boards: seeed: Configure QSPI CS pin as pull-up in sleep
QSPI sleep now set QSPI CS pin to pull-up, decreasing
current consumption.

Co-authored-by: Vidar Berg <vidar.berg@nordicsemi.no>
Signed-off-by: Sigurd Hellesvik <sigurd.hellesvik@nordicsemi.no>
2024-09-06 11:26:44 -04:00
Filip Kokosinski
41f74492a7 tests: drivers.gpio.1pin: re-enable hifive1
This commit removes the `hifive1` board from the `platform_exclude` list
for the `drivers.gpio.1pin` pin.

The root cause for why this platform was disabled was fixed in the recent
Renode version upgrade in the CI image.

Fixes #69350.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-06 11:26:35 -04:00
Vinayak Kariappa Chettimada
34b6b3d9eb Bluetooth: Controller: Support FAKE_ENTROPY_NATIVE_POSIX
Add support for use of FAKE_ENTROPY_NATIVE_POSIX as entropy
driver for the Controller on BOARD_NRF54L15BSIM.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-06 11:26:19 -04:00
Adam Wojasinski
7e3580070f llext: Add filesystem based testcase to llext test suite
Extend tests with case where extension is copied from RAM buffer
into filesystem and then loaded from filesystem.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski
420891cedb llext: Add shell command for loading LLEXT from a filesystem
This patch extends LLEXT shell commands with support for loading
LLEXT from a filesystem. Use of the command requires absolute path
to the llext file.

Example use:
`llext load_llext hello_world /lfs/hello_world.llext`

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski
fc114e85dd llext: Add filesystem based extension loader
Added loader allowing to load extensions stored in a filesystem.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Adam Wojasinski
93ffeced6a llext: Add new methods to loader API
Introducing `llext_prepare()` and `llext_finalize()` APIs
that are invoked and the beginning and the end of the `llext_load()`
function.

The purpose of these functions is to bring possibility of initializing
loader before it is used and uninitialize or clean up when
it is no longer needed. Both functions are optional.

The buffer loader has been aligned to methods introduced in the patch.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-09-06 11:26:09 -04:00
Nicolas Pitre
b5addc808a llext: adjust memory permissions on MMU systems
By default, normal memory is set readable+writable and not executable.
Adjust those permissions according to each region:

	LLEXT_MEM_TEXT                  --> K_MEM_PERM_EXEC
	LLEXT_MEM_DATA, LLEXT_MEM_BSS   --> K_MEM_PERM_RW
	LLEXT_MEM_RODATA                --> K_MEM_PERM_RO aka 0

This must be done only at the end of an LLEXT load operation as memory
needs to remain RW for reloc processing, etc.

And while at it, flush/invalidate the cache accordingly.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-06 11:25:54 -04:00
Nicolas Pitre
c692136f21 mmu: introduce k_mem_update_flags()
It is sometimes necessary to modify/update memory permissions on some
pages, especially with LLEXT where some allocated segments have to be
executable.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-06 11:25:54 -04:00
Erwan Gouriou
16b194a067 boards: stm32: Remove explicit CLOCK_CONTROL setting
`CLOCK_CONTROL` subsystem being selected directly at family level,
remove it from individual board configurations.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Erwan Gouriou
0e30625eec drivers: clock_control: stm32: Default driver selection out of soc
Rather setting the driver default in soc, make it directly at symbol
level rather than soc and clean up redundant `select` occurrences.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Erwan Gouriou
1483396157 soc: stm32: Select CLOCK_CONTROL by default for whole family
CLOCK_CONTROL subsystem is expected to be enabled systematically on all
STM32 devices.
Make it a series default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-06 11:25:43 -04:00
Ryan McClelland
82f8c3e3c5 drivers: i3c: shell: add cmd for enttm
Add a shell command for the i3c ccc enttm.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland
b4d9c9dea6 drivers: i3c: add ccc enttm
Add helper function for the i3c ccc enttm

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:25:24 -04:00
Ryan McClelland
f32ad971cd drivers: i3c: shell: add i3c ccc entas
Add shell commands for the i3c ccc entas0, entas1, entas2, and entas3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Ryan McClelland
9d2dd99ee8 drivers: i3c: add i3c ccc entas
Add helper functions for the I3C CCC ENTAS0, ENTAS1, ENTAS2, and
ENTAS3.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-06 11:24:40 -04:00
Daniel DeGrasse
4658ed5652 drivers: input: input_gt911: fix OOB buffer write to touch points array
GT911 driver was reading an additional touch point into the stack
defined touch point array, causing an out-of-bounds write on the stack.
Fix this issue by adjusting the limit on the for loop, and add a note
to the driver as to why we don't need to validate the number of points
reported for future developers

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-09-06 10:13:14 -05:00
Maochen Wang
8562ae6155 hostap: fix SAP UDP RX low throughput in 5GHz
The default Max A-MPDU length is 8191 shown in the VHT Cap Info from
SAP's beacon/Assoc response, and this length is read from
hapd->iface->conf->vht_capab. It will lead to the AMPDU only contains
5 packets and the throughput is only 60Mbps for 1x1 HE case in 5GHz.
Change the default vht_capab to VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX
(1048575), and the throughput can be increased to 83Mbps.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-06 10:07:07 -05:00
Sean Nyekjaer
d218a2d73e soc: nordic: nrf52: fix used define for enabling DCDC converter
Use the correct define for checking if the DCDC converter shall be
enabled.

This resolves the opposite behavior where boards that enable the DCDC
converter uses the LDO and boards where LDO is used they enable the
DCDC.

Fixes: e189fb0720 ("soc: nordic: nrf52: add support for DT-based
regulators config")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-09-06 10:05:07 -05:00
Luca Arato
13eb7a1ee2 net: config: Fix sntp clock init Kconfig depends
Changed NET_CONFIG_CLOCK_SNTP_INIT depends on to require
POSIX_TIMERS instead of the deprecated POSIX_CLOCK

Signed-off-by: Luca Arato <luca.arato@secomind.com>
2024-09-06 10:01:22 -05:00
Lukas Gehreke
f0c8693931 drivers: usb_dc_rpi_pico: Fixed connected handling
A connected state was reported as a disconnected state.
This led to wrong reports of the connected state to all systems
relying on it.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-09-06 09:59:43 -05:00
Jukka Rissanen
6162bf91bf net: http_server: Clarify the host parameter in service define
Clarify the HTTP service definition so that the host parameter can
be set as NULL in which case the server will listen all addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen
5e7d730274 samples: net: http_server: Create service binding to all addresses
Allow user to listen all IP addresses instead of hard coded one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen
5480960fcf net: http_server: Turn off V6ONLY if IPv4-to-IPv6 mapping is enabled
Without this it is not possible to serve both IPv6 and IPv4
connections if service host is NULL.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Jukka Rissanen
3949873886 net: http_server: Allow service to be created with NULL host
Allow NULL host parameter when creating HTTP service. This means
that the socket is created without specifying binding address.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Benjamin Cabé
7e20a86e6a doc: samples: Improve code sample list styling
Make lists of code samples more compact (a lot of vertical real estate was
being wasted) and more visually appealing.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-06 09:56:13 -05:00
Benjamin Cabé
34982bb00b doc: samples: use :zephyr-app: for in-tree samples
The zephyr-app-commands directive can output a helpful hint to the user
when they are trying to build a sample that is in the Zephyr tree,
telling them to ensure they are in the root folder of the Zephyr repo.

Update all doc pages that were using :app: instead of :zephyr-app: so
that the hint is displayed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:18:05 -04:00
Benjamin Cabé
0d25e30de6 samples: subsys: use zephyr:code-sample directive
Adds missing code-sample directive to the remaining samples in
`samples/subsys` that didn't use it yet in preparation for upcoming
changes to the Zephyr documentation that will be leveraging the provided
description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:13:17 -04:00
Benjamin Cabé
b23f43c096 doc: generation: fix link to zephyr.tag
This link probably never worked. This commit fixes the relative
URL to properly point to where Doxygen docs live.

Fixes #78016.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:12:32 -04:00
Santosh Male
3e0b068fff SOC: Updated MAX IRQ num supported by Aglex5
Agilex5 device supports maximum of 274 interrupts which includes XMAC
interrupts as well.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male
60fa3181c6 CODEOWNERS: Updated coder owners file
Added smale-12048867 as code owner for dwc_xgmac ethernet controller
driver.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male
36a7a12c4e Samples: Enabled Network Shell with XGMAC ethernet.
Enabled Network shell and Ethernet L2 interface
with XGMAC driver in CLI application
Enabled MDIO shelll with dwcxgmac mdio driver.
Enabled TCP and  UDP over IPV4.

Added intel_socfpga socdk support for echo_client and
echo_server sample applications.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male
bd4defccd1 boards: arm64: Added board dts files
Updated board dts files for socdk and simics vp
with XGMAC and network configuration.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male
81b58ac35b dts: Added dwcxgmac dt nodes in soc dtsi file
Added XGMAC0, XGMAC1, XGMAC2 device nodes in
intel_socfpga_agilex5 dts file with default
parameter values and  default device node status
as 'disabled'.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Santosh Male
8467c10447 drivers: ethernet: dwc_xgmac: Added dwc-xgmac
ethernet driver

This driver is capable of supporting basic features
of synposys dwc-xgmac ethernet MAC IP. Basic features
includes,
1. Tx and Rx, multiple Tx and Rx DMA channels, multiple
   Tx and Rx queues
2. Check Sum Offloading on Tx and Rx for IPv4, IPv6,
   TCP, UDP and ICMP packets
3. 10M/100M/1G speeds, Autonegotiation, Link speed
   configuration, Promiscuous mode, Full/Half
   duplex configuration
4. Added source files for synopsys dwc xgmac mdio driver.
   synopsys dwc xgmac mdio driver fetures includes:
   It supports clause 22 of IEEE 802.3 for ethernet PHY devices
   management.
5. Extended mdio shell support for dwcxgmac mdio driver.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Emil Gydesen
c82adf5db6 tests: Bluetooth: BAP: Use fallbacks for bcast bsim tests
Use fallbacks in codec cfg functions in the BAP broadcast
babblesim tests to avoid unnecessary noise in the logs of
the tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 17:02:47 -04:00
Emil Gydesen
fcdfdae95b Bluetooth: Audio: Add to_str functions for some assigned numbers
Add to_str functions for context, parental rating, active state,
codec cap freq, codec cap frame duration,
codec cap channel count and location.

The remaining values are just numeric values and does not
need a to_str function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 17:02:41 -04:00
Dominik Chat
518de763a6 dts: nordic: nrf5340: Change nRF5340 IPC backend to icbmsg
Change the default IPC backend of nRF5340 to icbmsg.

Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
2024-09-05 17:02:31 -04:00
Cla Mattia Galliard
3552609a08 doc: kernel: fix k_poll example
Fix `k_poll()` loop example by using separate `if` blocks instead of
`if`-`else`-chain to ensure all events are handled, even if multiple are
active at the same time.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2024-09-05 17:02:18 -04:00
Michal Smola
33407bfcd6 boards: frdm_mcxc242: Add basic support for board
Add basic support for NXP frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
dd052055d8 soc: nxp mcxc: Add support for NXP MCXC series
Add initial suport for NXP MCXC series

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
427876604f dts: mcxc: Add initial support for NXP MCXC socs
Add initial support for NXP MCXC socs.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
88f838b0d2 drivers: uart: Fix build error for lpuart without modem support
LPUART without modem support is used in some NXP socs. Build error
occurs for such socs because of accessing unavailable register.
Fix it by adding #if directive for checking modem support availability.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
ecf6e347f8 include: dt-bindings: kinetis sim: Add clock sources definitions
Add OSCERCLK, MCGIRCLK, and MCGPCLK clock sources definitions
to the kinetis_sim.h in include dt-bindings.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
5ddde693f5 dts: bindings: Add binding for NXP mcxc oscillator
Devicetree binding for NXP mcxc oscillator is not available.
Add the binding to be able to configure the oscillator in devicetree.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
d913f6cc9f dts: bindings: kinetis-ftfa: Add configuration properties
Add configuration settings for the FOPT, FSEC, and flash configuration
offset to the FTFA module binding.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Michal Smola
5a6b339046 dts: bindings: nxp kinetis mcg: Add optional frequency dividers
fcrdiv and lircdiv2 dividers properties are not configurable in device
tree. Add the properties.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2024-09-05 17:01:33 -04:00
Fabian Pflug
cdfab15b99 charger: bq25180: Add threshold voltage for precharge
Charging a battery has three phases (compare Figure 8-2 in
https://www.ti.com/lit/ds/symlink/bq25180.pdf)

First is a pre-charge phase, then a constant current, then a constant
voltage phase.
During the pre-charge phase, the battery is only charged with a very low
current, to not damage the cells, because they are below a threshold,
that is considered healthy for the battery and need to be brought back
up to a healthy voltage.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug
6b2442244d charger: bq25180: add support for recharge voltage threshold
The battery charger will stop charging the battery if it believes,
that is is completely charged. If the battery drops below a certain
voltage threshold, then the battery charger starts charging the
battery again.

For the bq25180 the threshold can only be one of either 100mV or
200mV below the VSET voltage.

See table 8-16 Bit 5 in https://www.ti.com/lit/ds/symlink/bq25180.pdf

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Fabian Pflug
f698832410 charger: bq25180: add control for battery charge limit
The linear battery charger will charge the connected battery up
to a specific voltage. This is different depending on the chemistry
of the battery. Most LiPo Batteries have a nominal voltage of 4.2V,
which is why the default voltage of the bq25180 is 4.2V.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-09-05 17:01:05 -04:00
Federico Di Gregorio
d5447a310e boards: opta: initial support for M7 core
Features enabled by this commit:

* M7 core available with or without the Arduino MCU-based bootloader by
  correctly initializing the external clock source.
* All LEDs, relays and the user button are mapped into the device tree
  (samples/common/blinky works out of the box).
* USB can be used in ACM mode (samples/subsys/usb/cdc_acm works without
  changes). The default Zephyr console is configured to use cdc_acm_uart0
  that in turn is assigned to the only USB port available.

Also enable USB stack to make sure that the console is available by default
and twister builds don't fail with missing device and added the default USB
vendor (0x35d1 Finder SpA) and product (0x0164) numbers to match the ones
used in the original product.

Signed-off-by: Federico Di Gregorio <fog@dndg.it>
2024-09-05 17:00:49 -04:00
Bartosz Miller
7b06f67494 tests: drivers: Implement nrf2 clock control api tests
Implement tests for the NRF2 clock control API

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Andrzej Głąbek
0898764d31 samples: boards: nrf: Add nrf2_clock_control sample
Add a sample that presents how the custom nrf2_clock_control API
introduced for nRF54H20 can be used for the various clocks which
are supported by it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Andrzej Głąbek
7a2ce2882a drivers: clock_control: Add support for nRF54H20 clock controllers
Add custom clock_control API for nRF platforms that allows requesting
clocks with specified minimal required attributes (accuracy, precision,
and frequency). Provide an implementation of this API for FLL16M, HFXO,
HSFLL, and LFCLK controllers in the nRF54H20 SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Bjarki Arge Andreasen
fbebb5dce5 dts: bindings: add nrf-fll16m and nrf-lfclk bindings
Add bindings for nrf-fll16m and nrf-lfclk and update in-tree nodes
and boards to use them in place of the fixed-clock binding.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Andrzej Głąbek
cd89d98e44 boards: nrf54h20dk: Add parameters of mounted HFXO and LFXO
These parameters will be used by the clock controller drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Andrzej Głąbek
9ab7fc90cd dts: nordic: nrf54h20: Add nodes representing HFXO and LFXO
The HFXO and LFXO oscillators have properties which need to be
specified in the devicetree. These properties are used by clock
controllers, which get these properties from the devicetree.

The BICR also contains these properties. For now, the properties
are duplicated in the bicr node in the devicetree.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Andrzej Głąbek
b0316c2c1d dts: nordic: nrf54h20: Add references to clock controllers
Add references to clock controllers so users can obtain
those for particular peripherals with DT macros like
DT_CLOCK_CTRL()

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Emil Lindqvist
5520486e38 modem_cellular: adjust CMUX max frame size for LARA-R6
It has been observed that using a CMUX max frame size of 127
causes FCS errors; smaller or larger works. This commit sets the max
frame size to the modem's default value.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-05 16:58:44 -04:00
Emil Lindqvist
621338ec78 modem_cellular: add U-Blox LARA-R6 and implement change of baudrate
U-Blox LARA-R6 was added to modem_cellular, and an additional state
was introduced where the UART baudrate is changed if the modem supports
it

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2024-09-05 16:58:44 -04:00
Benjamin Cabé
d1858d2074 samples: bluetooth: Use "Bluetooth LE" terminology
Replace occurrences of "BLE" by the recommended "Bluetooth LE" term.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
Benjamin Cabé
d23d19d7f0 samples: bluetooth: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
Erwan Gouriou
853b6feb52 drivers: stm32: Make some config symbols menuconfig symbols
Move some STM32 drivers  related Kconfig symbols from `config`
to `menuconfig` when driver options depends on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-05 16:58:04 -04:00
Johann Fischer
9816e87e56 boards: rpi_pico: add usbd test feature
Add usbd test feature for the RPI PICO board.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-05 16:57:46 -04:00
Johann Fischer
c41071d2ac drivers: udc: add UDC driver for RP2040 USB device controller
This driver is mostly rewritten from scratch, with some parts borrowed
from the usb_dc_rpi_pico driver implemented by Pete Johanson.
This driver does not use any function from RPI PICO HAL and actually
could be furter improved to not use any defines or types from the HAL as
they are confusing and overdo it with volatile qualifiers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-05 16:57:46 -04:00
Johann Fischer
a10f2e87cc dts: rp2040: fix USB controller base address
Fix USB controller base address.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-05 16:57:46 -04:00
Jeppe Odgaard
40cae2d281 dts: arm: st: stm32h5: fix spi 1-3 clocks
The STM32 SPI driver, `spi_ll_stm32.c`, reads the clock frequency via
`clock_control_get_rate()`. The first `clocks` index is used as subsystem
argument if there is no second index, but this is not the source clock for
SPI 1, 2, and 3.
This causes the prescaler value calculation to be incorrect, resulting in a
frequency potentially above the `spi-max-frequency` value.

Add clock source for SPI instances 1, 2 and 3, that matches the default
clock configuration register reset value, which resolves the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-05 16:57:32 -04:00
Marcin Szymczyk
161149ba01 soc: nordic: add enabled instances validation for nRF54L series
Align verification macros to nRF54L series specific instances.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-09-05 16:57:19 -04:00
Tomasz Leman
d389c95935 soc: intel_adsp: ace: Configurable SRAM retention mode and cleanup
This commit introduces a new Kconfig option `CONFIG_SRAM_RETENTION_MODE`
that allows the configuration of SRAM retention mode during the
initialization phase of the firmware boot-up process. By default, the
retention mode is enabled to maintain the existing behavior. However,
this option provides the flexibility to disable the retention mode if
needed, without modifying the Zephyr codebase.

The SRAM initialization functions `hp_sram_init` and `lp_sram_init` in
`sram.c` have been updated to conditionally set the retention mode based
on the value of this Kconfig option.

Additionally, an unused macro `DELAY_COUNT` has been removed from
`sram.c` to clean up the code.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-09-05 16:56:56 -04:00
Johann Fischer
251670133b doc: process for adding a maintainer if the candidate does not have a role
There is no clear way for a candidate to assume the role of Maintainer
if the candidate is neither a Contributor nor a Collaborator. To avoid
disputes and confusion, candidates who are neither Contributors nor
Collaborators must be approved by the TSC before they can assume the
role of Maintainer.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-09-05 16:56:44 -04:00
Alberto Escolar Piedras
11cde13b94 board: nrf54l15bsim: Disable native_posix entropy seeding
Let's disable the default seeding done by the native_posix
entropy driver to allow the normal simulation initialization
of the random number generation to take place.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-05 16:56:33 -04:00
Alberto Escolar Piedras
e58a491900 entropy: native_posix: Add kconfig to not seed by default
Provide a new kconfig option which can be used to disable
the default seeding of the host standard library random
generator by this driver.
This allows some other component to do so without this component
default initialization interfering.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-05 16:56:33 -04:00
Josuah Demangeon
0ac91da3a4 drivers: video: introduce CONFIG_VIDEO_LOG_LEVEL
Zephyr drivers have typically one log level defined per class. The video
drivers were making exception. This adds the missing log level for video
drivers.

Since all headers had to be modified, this also:

- Update the log initialization to the new syntax from 5e34681

- Sort the #include list to something like #41543

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-09-05 13:11:35 -05:00
Rubin Gerritsen
fe72c4b447 Bluetooth: Document parallel scanner and initiator param selection
When scanning and connecting in parallel with
CONFIG_BT_SCAN_AND_INITIATE_IN_PARALLEL enabled, a Bluetooth controller
may choose different scheduling approaches based upon the provided
parameters.

Nordic's SoftDevice Controller performs better when both roles
use the same scan window and scan interval. To help customers
choosing the right configuration, this should be documented.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-09-05 12:56:35 -05:00
Emil Gydesen
8f76cdd891 Bluetooth: TBS: Fix issues with lookup_inst_by_uri_scheme
The function took the uri as a `char *` but is in fact
not a null terminated string so change the type to uint8_t *.

Add a check fro uri_len == 0 before doing uri_len - 1

Changed the found check to just check the first octet rather
than the more costly strlen.

Fixed the type of the iterator

Add a break in the loop as we only need to find one ":"

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:51:44 -05:00
Fabrice DJIATSA
52cb8c07d1 dts: arm: st: h7: remove unnecessary inclusions
since stm32h7.dtsi is already include in st/h7/stm32h743.dtsi
we don't need to include here again.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-05 12:50:26 -05:00
Tom Burdick
1c29f98e68 i2c: nrf_twi: Add cast to const buffer pointers
A warning was issued in the build as the rtio tx and tiny_tx buffer
pointers are now labeled const. The internal API expects mutable buffers
so an explicit cast is needed here to avoid the warning.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-09-05 12:41:45 -05:00
Florian Grandel
2d8b272ab5 tools: net-tools: place net-tools inside tools
Updates references to the net-tools project  to refer to the correct
placement of net-tools under tools.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-05 12:34:09 -05:00
Jakub Michalski
8b8b0a0b4a docs: add information about main(int, char **)
Add information about main(int, argc **) in places where the documentation
stated that only parameterless main could be used

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Jakub Michalski
5b1f6f3004 samples: add bootargs sample
Add bootargs sample

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Jakub Michalski
f568e2d3ca zefi: add bootargs support
Add bootargs support to zefi. This implements
get_bootargs() when both efi and bootargs are
selected in config.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Jakub Michalski
3b58d066e4 zefi: include autoconf.h
Zefi was only including include/zephyr but not the generated include
directory that contains autoconf.h. This commit fixes that.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Jakub Michalski
0cf726b8ef arch/x86: multiboot: add bootargs support
Add bootargs support for multiboot. This
implements get_bootargs() when multiboot and
bootargs are selected in config.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Jakub Michalski
49fc106c60 kernel: add bootargs support
Add support for passing args to main(). The
content of bootargs is taken from get_bootargs()
which should be implemented for each loader and
then its split into args and passed to main.

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Grzegorz Ferenc
1f13c8dddd doc: optimization: link to sysbuild commands
Added links pointing to the Dedicated image build targets
from Optimization tools page for ram_report, rom_report, footprint,
puncover, and pahole.
Reported by @markaj-nordic.

Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
2024-09-05 11:49:10 -05:00
Luis Ubieda
64a038aca3 spi: all: Add default iodev_submit to drivers without native support
So that all SPI drivers are compatible with RTIO APIs.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-05 11:44:32 -05:00
Luis Ubieda
3efc69ebd3 spi: rtio: Add default iodev_submit handler
To emulate SPI RTIO behavior for drivers that do not have native
support yet.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-05 11:44:32 -05:00
Luis Ubieda
022fb83b32 tests: spi: loopback: Set ZTest thread priority to positive
To allow being preempted by RTIO Workqueue in the SPI RTIO default
iodev_submit.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-09-05 11:44:32 -05:00
Fin Maaß
fae1fe8c1f shell: kernel: do a cold reboot by standard
do a cold reboot by default if no option is provided
for `kernel reboot`, instead of requiring to
type `kernel reboot cold`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-09-05 11:33:22 -05:00
Adrian Friedli
afcc13a084 net: fix compiler warning -Wtype-limits
Move the lower bounds check of the enum value to a BUILD_ASSERT and make
sure the enum type is an unsigned integer.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
2024-09-05 11:31:30 -05:00
Fabrice DJIATSA
4677920956 soc: st: stm32: add soc for stm32u073
select soc for stm32u073 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-05 12:25:43 +01:00
Fabrice DJIATSA
af7a690743 dts: arm: st: u0: add stm32u073 dtsi files
provide support for the STM32U073 series


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-05 12:25:43 +01:00
Philip-Dylan Gleonec
7c698d4736 boards: adafruit: feather_m0_basic_proto: add GPIO references
Add a description of the feather connector GPIOs. This enables a
featherwing shield to reference the GPIO by its label.

Signed-off-by: Philip-Dylan Gleonec <philip-dylan@gleonec.bzh>
2024-09-05 12:25:29 +01:00
Philip-Dylan Gleonec
62fab317dd boards: adafruit: feather_m0_basic_proto: define feather_spi bus
Define the feather_spi SPI bus, which points to the corresponding
SERCOM. This bus label can be used by the featherwing family of
shields.

Signed-off-by: Philip-Dylan Gleonec <philip-dylan@gleonec.bzh>
2024-09-05 12:25:29 +01:00
Vinayak Kariappa Chettimada
2eafc826e3 Bluetooth: Host: Fix unable to start scanning after scan param failure
Fix scan_update() implementation for missing flags clear
that prevented starting scanning after previous attempt to
start failed due to parameters being rejected by the
Controller.

Example, attempting to start coded PHY scanning with a
Controller implementation that does not support it can fail,
but attempting again without coded PHY scanning should
succeed.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-09-05 12:25:17 +01:00
Andrzej Kuros
226e343a36 manifest: update hal_nordic revision
This commit updates revision of hal_nordic to bring the latest changes
in the nRF IEEE 802.15.4 driver.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-09-05 12:25:00 +01:00
Emil Gydesen
57b35e1047 Bluetooth: TBS: Allow multiple callbacks for client
The TBS client callbacks are just informative so we
provide the information to multiple listeners.

To support this for the long strings, the function
handle_string_long_read was refactored.

This also allows for multiple users of the TBS client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:47 +01:00
Emil Gydesen
94e548120b Bluetooth: BAP: SD: Added missing bad code when using mod_src
When the encrypt state was changed via
bt_bap_scan_delegator_mod_src then we didn't set the bad
broadcast code correctly.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:34 +01:00
Emil Gydesen
34fa014682 tests: Bluetooth: Add test for incorrect bcode as assistant
Add a bsim test that verifies the behavior when the
assistant provides an incorrect code to the broadcast
sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:34 +01:00
Emil Gydesen
c49a058b9b Bluetooth: TBS: Fix type of uri in call_alloc
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.

Marked the type properly and added a cast when using it with
bt_tbs_remote_incoming.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:25 +01:00
Emil Gydesen
f500f7c22f Bluetooth: CAP: Fix dependency on BT_BAP_STREAM
The CAP commander used bt_audio_valid_ltv which required
BT_BAP_STREAM to be enabled, but the CAP Commander does not
need BT_BAP_STREAM to be enabled.

Moved the function to audio.c which is always compiled for
the CAP Commander, thus removing the requirement for
BT_BAP_STREAM and the accompanying bt_bap_stream.c file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:16 +01:00
Emil Gydesen
fff9c326c6 Bluetooth: TBS: Add UTF8 requirement to Kconfigs
The UTF8 implementions for both client and server
both use the utf8 API which require CONFIG_UTF8.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:07 +01:00
Emil Gydesen
b250754f5b Bluetooth: TBS: Fix type of uri in bt_tbs_valid_uri
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.

Marked the type properly and added a cast when using it with
strings.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:23:24 +01:00
Carles Cufi
9c23effb66 modules: hal_nordic: Enforce nrf-regtool exact version match
Require the presence of the nrf-regtool package as well as its exact
version, failing the build whenever the required version is not found in
the system.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-09-05 12:23:08 +01:00
John Sanpe
0cd3f56f0d board: add support for VCC-GND STM32H750VB
YD-STM23H750VB board has 128 Kbytes of flash memory, 1 Mbytes of SRAM
and 16 Mbytes onboard SPI norflash.

Signed-off-by: John Sanpe <sanpeqf@gmail.com>
2024-09-05 09:50:14 +02:00
Chris Desjardins
84572a6532 drivers: i2s: Do not ignore the return value from queue_put.
If failure occurs the caller can free the buffer.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Chris Desjardins
34f09e3bd5 drivers: i2s: Fix I2S channel count.
Fixes incorrect channel count in case of I2S format.

Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
2024-09-05 09:50:08 +02:00
Emil Gydesen
c37a48acbc Bluetooth: CAP: Revert order of CAP stream callbacks
Modify the CAP stream callbacks so that the application
callbacks are called before the CAP initiator.

This allows the application to abort/cancel a procedure
before we send out any future request.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 09:50:01 +02:00
Benjamin Cabé
55d9d1c6ba samples: led: consolidate LED samples under same directory
With over a dozen LED samples, grouping them in a common drivers/led/
folder helps keep things tidy and lays the groundwork for further
improvements in the way samples are showing up in the docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 09:49:52 +02:00
Tomi Fontanilles
b9b166c7f8 manifest: mbedtls: update to 3.6.1
Brings in Mbed TLS 3.6.1.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-05 09:49:42 +02:00
Daniel Mangum
126e3ee6c3 driver: wifi: esp_at: fix typo in CIPDINFO option
Fixes typo in the CIPDINFO option description.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-09-05 09:49:33 +02:00
Marc Herbert
c1cc11891c cmake: remove spurious parenthese just added to xt-ld/linker_flags
Fixes commit 9a9e252d16 ("cmake: linker: move toolchain_ld_<base|cpp>
to linker flag property")

Fixes failure:

```
CMake Error at zephyr/cmake/linker/xt-ld/linker_flags.cmake:32:
  Parse error.  Expected a command name, got right paren with text ")".

Call Stack (most recent call first):
  zephyr/cmake/target_toolchain_flags.cmake:42 (include)
  zephyr/cmake/modules/kernel.cmake:148 (include)
  zephyr/cmake/modules/zephyr_default.cmake:142 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boi
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-05 09:49:27 +02:00
Anas Nashif
82613fba11 doc: fix trivial typo
fix 'be build' and replace with 'be built'.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-05 09:49:18 +02:00
Tomi Fontanilles
17545c17a5 dts: arm: st: h7: fix flash on M4 board targets
The flash controller is nowadays supported on the M4 core.
Add the bank2-flash-size property to the board definitions as required
by the STM32 H7 flash driver.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 19:10:19 -04:00
Andriy Gelman
3a4f868084 drivers: uart_xmc4xxx: Forward DMA overrun errors to user
Currently DMA overrun errors are ignored. Forward the error
to the user using the UART_RX_STOPPED with UART_ERROR_OVERRUN
reason.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Andriy Gelman
e9fd49f180 drivers: dma_xmc4xxx: Clear request before callback when overrun happens
If an overrun happens the user may decide to stop the dma which
unsets the DMA line. Currently, the line is always re-enabled after the
callback.

Switch the order around to fix the problem. Also, always reset the line
even if the user doesn't provide a callback.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 19:09:49 -04:00
Xudong Zheng
30c96a9943 logging: fix color for shell log backend
This allows CONFIG_LOG_BACKEND_SHOW_COLOR to be configured when logging
to shell.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-09-04 19:07:27 -04:00
Piotr Kosycarz
f0bfaa4c19 scripts: pylib: twister: fix missing newlines at handler.log
Keep new lines at handler.log.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-09-04 19:07:19 -04:00
Emanuele Di Santo
fb7c2a79c5 boards: nordic: nrf9280pdk: correct board documentation
Remove parts of the documentation for the nrf9280pdk board
that were copy-pasted and added by mistake.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-09-04 19:07:00 -04:00
Rick Tsao
e9ff0dc35e kernel: userspace: Fix dynamic thread stack allocation for RISC-V
RISC-V use the same logic for dynamic thread stacks allocation as ARM.
This fixup reuses ARM code.

Signed-off-by: Rick Tsao <rick592@andestech.com>
2024-09-04 21:28:36 +02:00
Yuval Peress
8974c248cf rtio: Add default i2c submit handler
Use the RTIO work queue to fake the i2c submit calls for drivers which
haven't yet implemented the API. Applications can change the size of
the work queue pool depending on how much traffic they have on the buses.

Signed-off-by: Yuval Peress <peress@google.com>
2024-09-04 21:28:26 +02:00
Duy Phuong Hoang. Nguyen
bec9952ce8 driver: spi: Add initial support for spi driver on ra8
Add initial SPI driver support for RA8 MCUs

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-09-04 21:28:19 +02:00
Tahsin Mutlugun
4d5bf29315 tests: drivers: adc: Add MAX32680EVKIT overlay file
Add board overlay file for the MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
24610e2f06 tests: drivers: adc: Add MAX32 boards overlay files
Add board overlay files for the MAX32655EVKIT, MAX32655FTHR
MAX32662EVKIT, MAX32666EVKIT, MAX32666FTHR, MAX32672EVKIT
MAX32672FTHR and MAX32690EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Tahsin Mutlugun
e2b0012120 boards: adi: Enable ADC driver for MAX32680EVKIT
ADC enabled for MAX32680EVKIT

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
168c717afb boards: adi: Enable ADC driver for MAX32 boards
ADC enabled for MAX32655EVKIT, MAX32655FTHR, MAX32662EVKIT
MAX32666EVKIT, MAX32666FTHR, MAX32672EVKIT, MAX32672FTHR and
MAX32690EVKIT boards

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
d7f92d0869 dts: arm: adi: Add ADC inside devicetree
Add ADC peripheral definiton inside device tree file
Add devicetree bindings for MAX32 ADC driver.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
11a172a610 drivers: adc: Add ADC driver for MAX32xxx MCUs
Added ADC driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-09-04 21:28:08 +02:00
Furkan Akkiz
ac3f4c8dce manifest: Update hal_adi to fix ADC build warnings
Fixed build warnings of ADC for MAX32662 and MAX32672 SoCs on
hal_adi size, this commit fetches it.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-09-04 21:28:08 +02:00
Anuj Pathak
645beff897 drivers: led: lp5562: reuse engine already linked
Right now "lp5562_led_blink" unconditionally find and assign a engine
that is not executing at the moment. This is an issue, if 3 "led" are
already using an engine. That is a call to "lp5562_led_blink" could
terminate with error, even if the "led" is already using an engine.
This commit fixes this issue by adding a check to see if engine is
linked and reuse it, otherwise assign a free engine.

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-09-04 21:27:53 +02:00
Bartosz Miller
7f3c08b232 tests: drivers: Allow configurable i2c speed for bme688 test
Configure the I2C test speed with K-config
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-04 21:27:45 +02:00
Anas Nashif
8538c4ae33 sample: uart passthrough: fix filtering and twister file
sample.yml is wrong and was not scanned. Also fix filters in the file so
it can build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Anas Nashif
bbb63d8aca sample: sip_svc: fix filter and printk formatting
Rename sample.yml and fix build and filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Lucien Zhao
c5dd2c2a84 samples: sensor: mcux_acmp: add case support for RT1180-EVK
Use gpio_ad_01_acmp1_in2 as ACMP1_IN2, test case can be captured
in J45-13.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
62e5805c57 drivers: sensor: mcux_acmp: update mcux_acmp drivers
add MCUX_ACMP_HAS_HYSTCTR macro to adapt feature if IP
don't exist HYSTCTR bit

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Lucien Zhao
2680c7d020 dts: arm: nxp: nxp_rt118x: add acmp instances
enable acmp clock in rt118x/soc.c file

add instances and enable clock for rt118x

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Florian Grandel
21481dd31c doc: net: qemu: minor fixes
Adds missing preliminaries and recommends to start persistent commands
in the background.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 21:27:20 +02:00
Torsten Rasmussen
5db1f1ae8f cmake: deprecate toolchain_ld_<base|baremetal|cpp> macros
Remove the toolchain_ld_<base|baremetal|cpp> macro as all the macro
handling is now done through the use of linker properties.

Keep support for calling the old macros for out of tree toolchains
which have not been updated to the new property approach.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
5badbfe2a2 cmake: move toolchain_ld_baremetal to linker properties.
Move linker flag setting from toolchain_ld_baremetal() to linker flag
properties as to follow the principle used in previos commits and from
PR#24851.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9a9e252d16 cmake: linker: move toolchain_ld_<base|cpp> to linker flag property
Transition the linker flag for the toolchain_ld_base and
toolchain_ld_cpp macros to linker flag properties.
This work follows the toolchain abstraction started in PR#24851.

toolchain_ld_base() was intended for base linker flags, but has slowly
become a 'set-any-linker-flag-here' and thus having several
`if(<check>)` or `<func>_ifdef(<check> ...)`.

Move the check to the top-level Zephyr CMakeLists.txt file, so that it
becomes cleaner which part is responsible for setting a value, and then
move the actual value (the linker flag) definition to the linker flag
property location.

It also helps adding support for new linkers, as it becomes clearer
which linker flags Zephyr always expects, for example `base` and
`cpp_base`, as well as those settings which are targeting for a given
purpose, such as linker sort alignment.

It also makes it clearer when those are used, for example in top-level
CMakeLists.txt with CONFIG_LINKER_SORT_BY_ALIGNMENT compared to this
information being buried in a linker support macro.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
d63489195f cmake: support PROPERTY argument on zephyr_link_libraries.
To ease the use of linker flag properties and to simplify the use of
generator expression then an optional PROPERTY argument has been added
to the zephyr_link_libraries() function.

This means a call such as:
zephyr_link_libraries($<TARGET_PROPERTY:linker,<property-name>)
can instead be simplified to:
zephyr_link_libraries(PROPERTY <property-name>)

Thus making intention clearer and keeping the complexity and minimizes
the risk of typos when writing generator expressions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
1728e04b8c cmake: fix check_set_linker_property() function
Fix check_set_linker_property() to correctly handle multiple linker
flags passed on function call.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
22c45c9234 cmake: remove llvm runtime library selection from target_base.cmake
The selection of the runtime library when using LLVM has already been
done in llvm/target.cmake and passed to the toolchain_ld_base() function
through the global TOOLCHAIN_LD_FLAGS setting.

The only reason this haven't been noticed is because of CMake's built-in
symbol de-duplication feature.

Remove the redundant runtime library handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
9bb0140522 cmake: remove the use of PROPERTY_LINKER_SCRIPT_DEFINES
The support of PROPERTY_LINKER_SCRIPT_DEFINES has been broken since
the transition to CMake in 12f8f76165.

The intention was probably to allow users / projects to adjust
PROPERTY_LINKER_SCRIPT_DEFINES by setting a CMake cache variable.

The implementation tests for the CMake variable (local scope or cache)
PROPERTY_LINKER_SCRIPT_DEFINES, but it never uses such CMake variable.

Instead it uses a CMake global property named
PROPERTY_LINKER_SCRIPT_DEFINES. CMake variables and CMake global
properties are two very different things, and therefore the current
implementation has never worked. The fact that no one has never noticed
this flaw, means that the feature has never been used as intended.

Simplify the code by removing the use of the global CMake property and
instead set the value of the property on the linker script
pre-processing invocation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
048ceb3a64 cmake: toolchain: remove obsolete and unused macros
The macro `toolchain_cc_nostdinc` were made obsolete with PR#24851 and
are no longer invoked.

Remove the macro implementations.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Torsten Rasmussen
ce0ab067e6 cmake: cleanup newlib CMakeLists.txt file
Commit 282f77e732f0a4bc859f559bc5a748f953a8140c removed the only place
defining LIBC_INCLUDE_DIR. Remove the corresponding use of
LIBC_INCLUDE_DIR from newlib/CMakeLists.txt as this setting is no longer
being defined anywhere.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-09-04 21:26:59 +02:00
Benjamin Cabé
ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00
Jeppe Odgaard
20fb6b6d24 drivers: sensors: explorir_m: fix uart flush early termination
`explorir_m_uart_flush_until_end` terminates immediately if the read
variable is initially equal to `EXPLORIR_M_MAX_RESPONSE_DELAY` and
`uart_poll_in` does not read anything.

Fix this by only checking the read variable if `uart_poll_in` reads a char.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-09-04 21:26:36 +02:00
Nicolas Pitre
ef30aa8626 arm64: linker: leave app_smem before .data
Commit 87f68b4dfe ("arm64: linker: move data section between rodata
and bss") moved .data up a little too far. Keep app_smem in front of it
otherwise user memory partitions end up in general .data with no user
permissions.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-04 21:25:56 +02:00
Jordan Yates
652839aee0 mgmt: mcumgr: os_mgmt: fix millisecond return
Ensure that leading zeros are present in the milliseconds field,
otherwise a milliseconds count of 35 will appear as x.35, i.e. 350
milliseconds. With this fix, it will appear as x.035.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 07:22:05 -04:00
Attie Grande
e6dc930322 bindesc: Add support for the build version values
This patch adds bindesc support for the build version values for the
kernel and application - BUILD_VERSION and APP_BUILD_VERSION.

The kernel's BUILD_VERSION can be overridden at build time.

Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
2024-09-04 07:03:47 -04:00
Tomasz Moń
aa6319dcfd usb: device_next: msc: Allow user to sort LUNs
Modify USBD_DEFINE_MSC_LUN() to take in separate id by which the LUNs
are sorted. Previously the disk name itself was implicitly used as a
sorting key. This is a breaking change to Experimental API.

Another advantage of splitting the sorting id from disk name is the
ability to use KConfig symbols as disk name. Currently the MMC disk
driver uses KConfig symbol CONFIG_MMC_VOLUME_NAME.

Mark LUN definitions as static const because the LUNs are ending up in
ITERABLE_SECTION_ROM().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-04 07:03:06 -04:00
Karol Lasończyk
e4236be678 tests: cpp: Exclude nRF54L20 platform from cpp98 test
Exclude nRF54L20 platform as Nordic HAL is not compatible
with C++98.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
d66110bb35 boards: Add support for nRF54L20 PDK
Introduce doc and board description.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
76f8f20aa6 modules: hal_nordic: Add support for nRF54L20 SoC
Extend CMakeList and add nrfx_config with L20 peripherals' entries.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
198a005177 soc: Add support for nRF54L20 SoC
Introduce nRF54L20 entries in soc directory.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Karol Lasończyk
f5fd5c06f5 dts: Add support for nRF54L20 SoC
Introduce nRF54L20 description in dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Thomas Keller
ae04401e12 doc: rpi_pico fix I2C1 default peripheral mapping
This commit updates the board documentation to match the I2C1 default
peripheral mapping in rpi_pico-pinctrl.dtsi.

Signed-off-by: Thomas Keller <t.tschaler@gmail.com>
2024-09-04 07:01:02 -04:00
Bjarki Arge Andreasen
28b9f55a0a drivers: serial: uart_nrfx_uarte: Patch RX init
The initialization of the UARTE is attempting to handle potential
improper handover from the bootloader. This handling is additional
complexity which should be fixed in the bootloader or whatever
component is failing to deinit the UART properly.

This commit removes the handling of improper handover from the
bootloader, while additionally clearing the ERROR flag when suspending
the UARTE component.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-04 06:55:43 -04:00
Stine Åkredalen
c89bca6f3f Bluetooth: Mesh: Logic fix for recvd unseg msgs
Fixed transport layer logic causing excessive processing of
some unsegmented messages

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
2024-09-04 06:54:10 -04:00
Jordan Yates
51c0cb9f5c dts: common: nordic: default memory partitioning
Add default memory partitioning for the nRF53 and nRF91 series devices.
As these partitions refer to TF-M and the TF-M layouts cannot be
modified, use the partitioning scheme from TF-M.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:31 +02:00
Sebastian Głąb
bd936236c6 tests: drivers: mbox: mbox_error_cases: Fix for BUS FAULT on nrf54l15
mbox_error_cases tests must be run with the nordic-flpr snippet
to prevent bus fault error while accessing VPR registers.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
812ae1e243 tests: drivers: mbox: mbox_error_cases: Enable test on nRF54l15
Add overlay that enables execution of mbox_error_cases on
nrf54l15pdk/nrf54l15/cpuapp.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
06b56c7971 drivers: mbox: Fix error code in Nordic's implementation
According to the official MBOX API documentation available at
https://docs.zephyrproject.org/latest/hardware/peripherals/mbox.html
mbox_sen() shall return
-EMSGSIZE – If the supplied data size is unsupported by the driver.

Fix error code returned by the mbox_send().

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Sebastian Głąb
6e045743f8 tests: drivers: mbox: Add negative tests for MBOX driver
Add negative test cases for the MBOX driver.
Confirm that driver implementation is aligned with
the MBOX API documentation available at
https://docs.zephyrproject.org/latest/hardware/peripherals/mbox.html

Enable test execution on nRF54H20 Application and PPR cores.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-09-04 12:52:24 +02:00
Mykyta Poturai
745c9543c6 xen: Make XEN_INTERFACE_VERSION configurable
Add Kconfig option to specify Xen interface version to use. This will
make it easier to switch between different versions of Xen.

Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
2024-09-04 12:52:16 +02:00
Jordan Yates
08a7808000 zbus: separate clang-format control comments
Add a line of whitespace between `/* clang-format off */` comments and
the first line of doxygen comment blocks. Some intellisense parsers
will combine all sequential comment blocks when providing code context.
This results in the control comment appearing in the help text for
`ZBUS_CHAN_DEFINE`, for example.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:01 +02:00
Jordan Yates
1ed77cb50c zbus: remove unneeded const qualifiers
Remove `const` qualifiers on fields in structures that are only created
or instantiated as `const`.

This if primarily for consistency, in the same way that `struct device`
fields and `device->config` struct fields are not additionally marked as
`const`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:52:01 +02:00
Jordan Yates
cbc4100eda i2c: i2c_nrfx_twim: init semaphores in init function
Initialise the semaphores in the init function so that a copy of the
data structure does not need to exist in `.data`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00
Jordan Yates
4c15cd119b i2c: i2c_nrfx_twim: move msg_buf to config
This is a constant pointer, there is no need for it to be in the mutable
data struct.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-04 12:51:40 +02:00
Bartosz Miller
a49c649b90 tests: drivers: Extend coverage for NRF GRTC timer
Add more test cases for nRF GRTC timer

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-09-04 12:51:29 +02:00
Andrej Trnkóci
9ac8786bb2 fs: nvs: fix nvs static analysis error
There is asignment from size_t variable to uint8_t variable in
nvs_al_size function that can trigger static analysis error.
The problem is fixed by changing the variable to size_t type
instead of uint8_t.

Signed-off-by: Andrej Trnkóci <andrej.trnkoci@nxp.com>
2024-09-04 12:51:14 +02:00
Benjamin Cabé
66717f17da doc: remove unnecessary heading
The table of contents already has a caption so the "Sections"
heading is effectively redundant.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 12:51:06 +02:00
Benjamin Cabé
06eb2f02b8 doc: shorten descriptions of doc homepage grid items
The descriptions of the homepage grid items were too long and often
repetitive (e.g. there's no need to repeat "Zephyr" in almost every
descriptions). This commit shortens them to aim at having them fit on
two lines, three at most.

Also updated the look&feel slightly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 12:51:06 +02:00
Florian Grandel
48e49fac56 cmake: emu: qemu: pkill monitor_15_4
The IEEE 801.15.4 monitor can be started by a parameter to cmake. This
change removes a TODO to kill the monitor after qemu ends.

The change also re-assigns Ctrl-C to Ctrl-D to ensure that QEMU is not
inadvertently sending SIGINT to the surrounding ninja session (which
would leave the monitor sub-process alive).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-04 12:50:53 +02:00
Jamie McCrae
689d1edee1 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  52e2afc2f809c424b0f337f56059d1dfcc7e6d98

Brings following Zephyr relevant fixes:
  - 52e2afc2 boot_serial: Fix `format` warning
  - dd4d6541 boot_serial: Fix `incompatible-pointer-types` warning
  - 2931f9d7 booutil: swap_scratch: Do not check sectors with
    compression
  - feb9265f bootutil: loader: Add protected TLV size to image size
    check
  - 4d85e29f bootutil: loader: Remove images with conflicting flags
  - 206c7e74 bootutil: loader: Remove encrypted/compressed images
    without support
  - 0c1ddf7e zephyr: Add Kconfig for decompression
  - 91d86b8a bootutil: Add compressed image flags and TLV
  - 2939d305 bootutil: loader: Verify image header before checking
    image
  - dbb5c782 bootutil: loader: Add state to boot_is_header_valid()
    function
  - 6071ceb1 boot: Introduce the MCUBOOT_ENC_BUILTIN_KEY option
  - ab4fb329 bootutil: Fix wrong definition of find_swap_count
  - dc030555 imgtool: Add --non-bootable flag
  - aa1f9560 zephyr: prefix generated header path with `zephyr/`
  - 334d2c28 boot: main: avoid unused build warning
  - c87d41ef boot: zephyr: Fix included header
  - 034f58cb bootutil: Fix missing include
  - e2e1e945 bootutil: Fix swap move max app size calculation
  - 4f1ab9e7 bootutil: Add missing images to get maximum image
    size details
  - eaae6500 zephyr: Add support for automatically calculcating
    max sectors
  - 6fe259b1 boot: Simplify copy loop in boot_copy_region
  - 7e69047b boot: zephyr: add support for frdm-mcxn947
  - 899ade2d boot: zephyr: boards: Add mimxrt1062_fmurt6
    configuration
  - ae27bc77 boot: zephyr: boards: Add common mimxrt1050_evk
    configuration.
  - 6123e916 boot: zephyr: boards: Add mimxrt11xx configurations
  - 3f11286e boot: Remove image_index from boot_encrypt
  - 2a7565b3 bootutil: Move encryption key function to common file
  - 0e5e1a9f Reapply "boot: Add MCUBOOT_HW_KEY support for image
    encryption"
  - ef598b13 imgtool: Fix getpub fails for ed25519 key
  - 8456464c zephyr: Fix issue with sysbuild if something else is
    named mcuboot
  - d09112ac boot: Reduce repeating code in
    boot_decrypt_and_copy_image_to_sram
  - 7f9ac979 boot: Change boot_enc_load to take slot number
    instead of image
  - 7fc3ad3d boot: zephyr: Fix RAM load chain load address
  - 49976dc6 imgtool: Bump cryptography library version
  - 33557352 boot: Move encryption context invalidation to
    boot_enc_drop.
  - 2371c0aa boot: Rename boot_enc_decrypt to boot_decrypt_key
  - 4b9d07dc boot: boot_serial: change logging to debug level
  - 7e3a1cec boot: Add missing boot_enc_init
  - 4da4a72c boot: Remove pointless slot identification
  - 08d2d94c bootutil: Keep image encrypted in scratch area
  - f515bb1c bootutil: Properly retrieve image headers after
    interrupted swap-scratch

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-04 09:59:26 +02:00
Tomi Fontanilles
03751b4553 west.yml: update hal_espressif
Update to a newer version to fix CI when updating MCUboot.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:59:26 +02:00
Tomi Fontanilles
8a5a5ec665 modules: trusted-firmware-m: pull in MCUboot fixes
Pull in fixes to update MCUboot.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:59:26 +02:00
Andriy Gelman
a861c224c5 tests: rtc_api: Add conf files for xmc4(75)_relax_kit boards
Adds conf files for xmc4(75)_relax_kits.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Andriy Gelman
d2dc2d8a0d boards: infineon: Add RTC to xmc4(75)_relax_kit boards
Adds RTC node to xmc4(75)_relax_kits.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Andriy Gelman
4ffe418253 drivers: rtc: Add RTC driver for Infineon XMC4xxx devices
Adds support for settings/getting RTC time and using alarm/update feature.
The alarm option needs all fields to be set due to a hardware limitation.

RTC shares the same interrupt with the watchdog. Thus shared
interrupts must be enabled when WDT and RTC both need to trigger the ISR.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Andriy Gelman
a761280318 tests: drivers: rtc: Fix typos
Compare tm_nsec instead of tm_yday and fix error message.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Sercan Erat
668003857a boards: rak: Change to use sw controlled cs for rak11720
Added support for newly added Ambiq spi driver sw controlled spi cs pins.

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-09-04 09:54:46 +02:00
Krzysztof Chruściński
5ac99428ea shell: backends: rtt: Set panic_mode flag
A bug was introduced when fb17d0e365 introduced host presence detection.
Panic_mode flag was added which indicates that RTT should work in
synchronous, blocking mode but it was not set when backend was switched
to panic mode.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-04 09:54:39 +02:00
Benjamin Cabé
1858c1512a include: cbprintf: drop deprecated CBPRINTF_PACKAGE_COPY_* macros
Commit bb74b4f028 deprecated a few
CBPRINTF_PACKAGE_COPY_* macros. This drops them and calls out the
change in the release notes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:54:32 +02:00
Tomi Fontanilles
938748177f boards: ezurio: fix qspi definition
Do not change the default value of `NORDIC_QSPI_NOR`. It resulted in
undefined references to the DT node `/soc/qspi@40029000/mx25r6435f@0`
when enabling the flash driver.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 09:54:25 +02:00
William Tambe
9c4a6712b2 xtensa: fix xtensa-sample-controller.ld to avoid .note.GNU-stack warnings
Prevent `warning: orphan section `.note.GNU-stack'` when building using
`west build -b xt-sim samples/hello_world`

Signed-off-by: William Tambe <williamt@cadence.com>
2024-09-04 09:54:19 +02:00
Emil Gydesen
b5ff2cc667 Bluetooth: AICS: Replace bools with atomic
Replace several bools in bt_aics_client with an atomic value.
Update how these values are modified so that we can better
prevent race conditions.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-04 09:54:05 +02:00
Kai Vehmanen
81977f2bff drivers: dma: intel_adsp_hda: fix intel_adsp_hda_unused() check
The ringbuffer availability check is subject to race with regards to
update of BF (Buffer Full) and BNE (Buffer Not Empty) bits in DGCS
register, and status of RP (Read Position) and WP (Write Position).

Following sequence is observed without this patch when
calling dma_get_status() on multiple Intel ADSP platforms:

iter 154 pending 1536 RP 768 WP 768, BNE 1, BF 1
-> dma_reload for 384
iter 155 pending 1536 RP 1152 WP 1152, BNE 1, BF 1
-> dma_reload for 384
iter 156 pending 0 RP 0 WP 0, BNE 1, BF 0

Value of pending is not expected to go from 1536 to zero if only 384
bytes have been consumed via dma_reload() since last call to
dma_get_status().

Change the logic to read DGCS register later, after the WP and RP have
been already read, and only check the BNE bit if Read and Write
Positions are equal.

Link: https://github.com/thesofproject/sof/issues/9418
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-04 09:53:57 +02:00
Francois Ramu
0fd7028eeb soc: stm32 decrease ticks per sec if sysclock is not LPTIM
Reduce the ticks per sec when the sysclock is low and
not LPTIM.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-09-04 09:53:50 +02:00
Yong Cong Sin
0fc2de4d4f MAINTAINERS: hawkBit: remove ycsin from the collaborator
Remove myself from the collaborator as there's a maintainer now.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-04 09:53:43 +02:00
Benjamin Cabé
08688b1876 doc: Check redirect entries are valid
While it's by definition not possible to check that the "source" for a
redirect entry is a valid path, the "destination" could be checked to be
pointing to an existing resource. This will also help catch potential
errors in the "source" as well since it's common to mess up the paths
for both.

Fixes #77797

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:53:35 +02:00
Benjamin Cabé
d77719ee37 doc: redirects: cleanup stale or broken entries
Fixed entries pointing to invalid destinations either due to resource
having  been removed or moved once more, or entries being plain broken
from day 1.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 09:53:35 +02:00
Andrej Butok
4df241b006 doc: release: 4.0: Add note about .elf flash support
Added note about enabled support for the flashing of
.elf files for jlink, pyocd and linkserver runners.
By commits:
- e767ac0703
- c1fe3150e9
- 3f5fc42fba

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-09-04 09:53:28 +02:00
Maciej Panek
532b279ef0 net: l2: ethernet: check if the dev->api not NULL
adds a check for Ethernet driver's API not being NULL
in ethernet_mcast_monitor_cb

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maciej Panek
a452aa5763 net: l2: ethernet: check if the dev->api->send method not NULL
adds a check for "send" method in Ethernet driver's API
not being NULL in ethernet_send

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maciej Panek
62df6108c7 net: l2: ethernet: check if the dev->api->get_capabilities method not NULL
Adds missing checks for get_capabilities method not being NULL.
Fixes crash with netusb and possibly other drivers.

Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
2024-09-04 09:53:20 +02:00
Maochen Wang
d5a5f072a9 drivers: wifi: nxp: link the library of hostap
When build with the psa_crypto_driver, it will try to include common.h
of mbedtls, but actually include the common.h from hostap, and causes
build error of undefined symbol. Now link the library of hostap to use
the header file in /utils path, to fix the build error.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-04 09:53:12 +02:00
Maochen Wang
a7e97e8799 hostap: fix build error of common.h
When build with the psa_crypto_driver, it will try to include common.h
of mbedtls, but actually include the common.h from hostap, and causes
build error of undefined symbol. Use zephyr_interface_library_named
to define hostap, and other modules needs to link the library of hostap
when wants to use the header file in /utils path, such as the common.h.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-04 09:53:12 +02:00
chao an
5831d91ad9 arm/gicv3: set routing affinity before enable IRQ
In corner case, the pending ISR will be triggered immediately
after enable the IRQ, this PR will setting CPU affinity first
to avoid routing the unexpected IRQ to other CPUs.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-04 09:53:04 +02:00
Alberto Escolar Piedras
1dd139f857 manifest: Update nRF hw models to latest
Update the HW models module to:
4b0b020e25dbf1a11ccccf7b7741d6ca991ba9e4

Including the following:
* 4b0b020 54L CLOCK: Generate XOSTARTED event
* 79287fb hal: RADIO: support also triggering TASK_SOFTRESET from HAL

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras
c2c17ea733 boards: nrf54l15bsim: Compare it to the DK instead of the PDK
The nrf54l15dk is now avaliable in the tree.
Let's compare the simulated board to this one instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras
8a7c16c9da boards: nrf54l15_bsim: Update docs including AAR,CCM, ECB
These peripherals are now included. Let's mention them
and remove the warning about them being missing.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Alberto Escolar Piedras
b03db5e4c9 boards: nrf54l15_bsim: Actively set psa-rng to disabled
This target does not yet support the PSA random generator.
Lets explicitly set it to disabled, to even if the
SOC definition sets it to "okay" it is not built in
by default.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:57 +02:00
Jiafei Pan
eb4d1ef170 board: imx93_evk: fix document introduced by hwmv2
Fixed board name according to hwmv2 update, and also updated the demo
log.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-09-04 09:52:50 +02:00
Alberto Escolar Piedras
f2711b20b6 boards: nrf54l15bsim: DTS cleanup
Remove 3 delete-node directives which do not apply to this
SOC.
They made it in originally thru a copy paste mistake
from the nrf5340bsim dts file.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-04 09:52:40 +02:00
Daniel Leung
11e5a0de1d boards: xtensa/sample_controller: no HAL for xcc or xt-clang
Xtensa toolchains also contain a profile for sample_controller.
So if compiling for it, skip the Xtensa HAL module in Zephyr
tree so the toolchain can use the one included in the toolchain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-04 09:52:31 +02:00
Marco Widmer
ca48767be4 boards: byteSENSI-L: add gnss support
Add support for the integrated u-blox M8C GNSS module.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-09-03 14:41:08 +01:00
Erwan Gouriou
c3c7e513c4 boards: stm32 based: Remove useless CONFIG_PINCTRL assignment
PINCTRL should not be set per board, but rather depending on drivers needs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Erwan Gouriou
e6a296bbe4 boards: st: Remove useless CONFIG_PINCTRL assignment
PINCTRL should not be set per board, but rather depending on drivers needs.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Erwan Gouriou
d13f9d9b9b drivers: stm32: Select PINCTRL when required
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Vivekananda Uppunda
9679083e9f modules: hostap: Fix Kconfig parameters for build
Fix build failures when selecting WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Vivekananda Uppunda
242f7ad3b4 modules: hostap: CRYPTO_MBEDTLS_PSA should not be default selected
WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA should not be by default
selected when WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT is selcted. Enable
PSA APIs if desired separately.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Vivekananda Uppunda
f2eda942f8 modules: hostap: Set WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT as crypto
Set WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT as the default crypto
configuration. The crypto ALT implementation contains the necessary
crypto operations and also allows the user to choose PSA or non PSA
crypto operation.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2024-09-03 14:40:45 +01:00
Ren Chen
1c769c342b usb: it82xx2: fix issue with the unexpected setting of the ready bit
In the IT82xx2 chip, the ready bit is automatically cleared by
hardware. When setting other bits, there is a chance that the ready bit
hasn't been cleared yet, leading to unexpected USB transactions. This
change ensures that the ready bit is always set to '0' when setting the
endpoint control value.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Ren Chen
d410231c7c usb: it82xx2: enable RESUME interrupt
This commit enables RESUME interrupt mask.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Tomasz Moń
9f6b66f162 drivers: udc_dwc2: Enter hibernation during suspend
Save power when the bus is suspended by entering hibernation if
hibernation support is enabled and controller supports hibernation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Tomasz Moń
42f2e1c18b drivers: udc_dwc2: Add power saving related registers
Add Power and clock gating control register to register map and
appropriate bit macros. Add missing GHWCFG4, GLPMCFG and GPWRDN bits.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Krzysztof Chruściński
d8c3ae0286 drivers: counter: nrfx_timer: Add barrier when reading CC
Add barrier between triggering Capture task and reading CC as otherwise
it is possible that CC read will occur before task is triggered when
bus is busy.

Add barrier between reading previous CC value and writing the new one.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 14:40:10 +01:00
Krzysztof Chruściński
dc711d721e Revert "tests: drivers: counter: basic_api: Tweak test timing"
This reverts commit 331442f059.

Change was introduced because it was failing on slow core
(nrf54h20/cpuppr) however it turned out that there was a bug in the
driver and now test passes without this tweak which make the test
last twice longer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 14:40:10 +01:00
Nicolas Pitre
87f68b4dfe arm64: linker: move data section between rodata and bss
Having .data after .bss creates a big empty gap in zephyr.bin to provide
proper offset for the data section. Reversing them allows for dropping
.bss from zephyr.bin's output as it is typically done, saving precious
flash memory space.

For demonstration purpose, let's consider those changes:

|--- a/samples/hello_world/src/main.c
|+++ b/samples/hello_world/src/main.c
|@@ -6,9 +6,12 @@
|
| #include <stdio.h>
|
|+int dummybuf[1024 * 1024];
|+
| int main(void)
| {
| 	printf("Hello World! %s\n", CONFIG_BOARD_TARGET);
|+	dummybuf[0] = 42;
|
| 	return 0;
| }

Before this commit:

$ ls -l build/zephyr/zephyr.bin
-rwxr-xr-x 1 nico nico 4561908 Aug  2 15:13 build/zephyr/zephyr.bin*

After this commit:

$ ls -l build/zephyr/zephyr.bin
-rwxr-xr-x 1 nico nico 37028 Aug  2 15:17 build/zephyr/zephyr.bin*

While at it, remove some more repetitive comments with no value.
Also defaults CONFIG_LINKER_LAST_SECTION_ID to n as it otherwise screws
everything up for the same reason as above.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-03 14:40:01 +01:00
Elias Speinle
fc7e8fb862 tests: drivers: regulator: add test for mps mpm54304 driver
add test for MPS MPM54304 DC/DC step-down power module

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Elias Speinle
022cfdff98 drivers: regulator: add basic mps mpm54304 driver
add driver for Monolithic Power Systems MPM54304 with basic
functionality to enable/disable the buck regulators

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Yannis Damigos
956edd1c3d odroid_go: Enable CONFIG_ESP32_USE_UNSUPPORTED_REVISION
odroid_go is using ESP32 chip revision (1) that is unsupported,
so we need to enable 'CONFIG_ESP32_USE_UNSUPPORTED_REVISION'

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Yannis Damigos
9637071114 odroid_go: Move flash partition table to a separate file
Move flash partition table to a separate file

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Yannis Damigos
dc1353a336 boards/odroid_go: Fix update partitions size
Update partitions size to utilize the entire flash

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Lukasz Stepnicki
83e3c2eb78 drivers: watchdog: nrfx wdt without IRQs
Add config option to build nrfx wdt driver with
NRFX_WDT_CONFIG_NO_IRQ enabled.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-03 14:39:37 +01:00
Grygorii Strashko
e638602b6a fs: fatfs: Add CONFIG_FS_MULTI_PARTITION
This option switches support for multiple volumes on the physical drive. By
default (0), each logical drive number is bound to the same physical drive
number and only a first FAT volume found on the physical drive will be
mounted.
When this function is enabled (1), each logical drive number can be bound
to arbitrary physical drive and partition listed in the VolToPart[].
The VolToPart[] is expected to be provided by Zephyr application.

For example, 2 FAT partition on SD disk ("SD" index 3) in terms of Zephyr:
   {3, 1} - mount point "/0:"
   {3, 2} - mount point "/1:"
The mount points have to be numbered in this case.

Code example of mounting a second FATFS partition places on SD-card:

static FATFS fat_fs;
static struct fs_mount_t mp = {
	.type = FS_FATFS,
	.fs_data = &fat_fs,
       .mnt_point = "/1:
};

/*
 * 2 FAT partition on SD disk
 * PARTITION.pd - Physical drive number. "SD" has index 3 in terms of
 * Zephyr (see FF_VOLUME_STRS)
 * PARTITION.pt - Partition (0:Auto detect, 1-4:Forced partition). So 1 for
 * the first FATFS partition and 2 - for second.
 */
PARTITION VolToPart[FF_VOLUMES] = {
    [0] = {3, 1},     /* "0:" ==> 1st partition on the pd#0 */
    [1] = {3, 2},     /* "1:" ==> 2nd partition on the pd#0 */
    [2] = {0, -1},     /* "2:" ==> 3rd partition on the pd#0 */
    [3] = {0, -1},
    [4] = {0, -1},
    [5] = {0, -1},
    [6] = {0, -1},
    [7] = {0, -1},
};

fs_mount(&mp);

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Grygorii Strashko
01f72f92b4 fs: fatfs: Add CONFIG_FS_FATFS_LBA64
The Kconfig option enables support for 64-bit LBA, which also allows
to enable  GUID Partition Table (GPT) support.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Michael R Rosen
cba339a6f4 dts: arm: st: correct npgios for all stm32 gpio controllers
For almost all STM32 GPIO controllers, the number of supported GPIO
pins managed by a single controller is 16 (with some exceptions for
fewer). However, the default for ngpios in the device tree bindings
for gpio-controllers is 32; leading to inaccuracies in handling GPIO
for these controllers, such as presenting too many GPIOs in the GPIO
shell. This patch redefines the default for ngpios for "st,stm32-gpio"
compatible devices to 16 and adds the correct ngpios for the few
exceptions Zephyr current supports.

Signed-off-by: Michael R Rosen <mrrosen@alumni.cmu.edu>
2024-09-03 10:44:06 +02:00
Emil Gydesen
0e4e7628fd Bluetooth: CAP: Add check for streaming state when starting unicast
When calling bt_cap_initiator_unicast_audio_start on a set of streams
that are all in the streaming state we return early with -EALREADY.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
4279cebcbd tests: Bluetooth: CAP: Ensure that unicast_start works in any state
The unicast_start procedure should take a stream in any state
and put it in the streaming state. Adds tests with streams
in various states.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
316a551ff1 Bluetooth: CAP: Remove check for ep in valid_unicast_audio_start_param
This allows the procedure to work for streams in the non-idle state,
e.g. we can start one of more streams in the codec configured
or even enabling state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
8b8f727761 Bluetooth: BAP: Add support for reconfiguring unicast group
This allows applications to modify the values set by an
existing unicast group, assuming that none of the streams in
the CIG has been connected.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:53 +02:00
Krzysztof Chruściński
175855e0d8 soc: nordic: Use 31250 Hz as system tick rate for GRTC
So far 10 kHz tick rate was used but it has 2 drawbacks:
- kernel timer precision is limited to 100 us which is worse compared
to 30 us on platforms which use RTC (which had 32768 Hz tick rate)
- GRTC has 1 MHz frequency so tick rate requires dividing by 100 during
 timeout calculation. When 31250 Hz is used (which is 1000000 / 32)
then dividing can be done with bit shifting and it is faster (> 2 times
faster on Cortex-M33 and >8 times faster on VPR - RISCV).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 10:43:30 +02:00
Troels Nilsson
63da4963a0 Bluetooth: Controller: Implement Secondary_Advertising_Max_Skip
Behaviour is unchanged for max_skip == 0

For max_skip > 0, use a slightly different calculation to ensure
we can pass LL/DDI/ADV/BV-28-C

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-09-03 10:43:20 +02:00
Troels Nilsson
e816a13b24 Bluetooth: Fix the host side not setting sec_adv_max_skip
Set sec_adv_max_skip

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-09-03 10:43:20 +02:00
Nazar Palamar
7a31df456f drivers: wifi/airoc: Update condition to enable NET_STATISTICS
Updated condition to enable NET_STATISTICS. Changed
CONFIG_NET_STATISTICS_ETHERNET to CONFIG_NET_STATISTICS_WIFI
in airoc_wifi.c

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-03 10:43:10 +02:00
Nazar Palamar
d627a30eb3 modules: hal_infineon: Remove dependency on IFX SOC for ABSTR_RTOS
Issue:
Kconfig WIFI_AIROC should not depend on infineon SOC family selection
for the connection. See issue#77012 for details.

Fix:
- update modules/hal_infineon/Kconfig to be able enable
USE_INFINEON_ABSTRACTION_RTOS for non Infineon SOC family.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-03 10:43:10 +02:00
Olivier Lesage
063991424c bluetooth: host: Ignore HCI err 0xC when setting own addr when initiating
Ignores "command disallowed" if the host privacy implementation tries
to change the device's random address while scanning or initiating.
This is not allowed by spec. It's caused by scan_update() in scan.c.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-03 10:42:56 +02:00
Félix Piédallu
d9d5043667 Bluetooth: Controller: Use BT_LLL_VENDOR_* to selectively build LLL
CONFIG_SOC_COMPATIBLE_* is not configurable but CONFIG_BT_LLL_VENDOR_* is.

This allows an alternate LLL to be built on nordic and OpenISA chips.

Signed-off-by: Félix Piédallu <felix@piedallu.me>
2024-09-03 10:42:48 +02:00
Peter Ujfalusi
9fd2e11944 drivers: dma: intel-adsp-hda: Report total_copied bytes on ACE2/3
With ACE2/3 the HDA DMA includes registers to read the Linear Link
Position.
Previous platforms (CAVS, ACE1) was able to report the LLP for GPDMA. Since
ACE2 all links are handled with HD-DMA, hence the new register has been
added for the firmware to report the LLP to the host.

Set the total_copied to 0 for older ACE1/CAVS platforms and in case of
host DMA on ACE2/3 since the informatiojn is not available.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-03 10:42:25 +02:00
Jilay Pandya
fda97de253 drivers: stepper: refactor gpio stepper driver
This commit refactors gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Jilay Pandya
28cd1c8439 stepper: fix: introduce step count check in gpio stepper
This commit introduces step count check before updating
actual position.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Jilay Pandya
95f8292329 test: drivers: stepper: add tests for stepper api
This commit adds tests for stepper api

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Sergio R. Caprile
360522a403 drivers: eth: fix stm32_hal PHY address resolution
Fixes: #77705

Fix wrong macro.
Tested with all the boards mentioned in that issue, build now works.

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
2024-09-03 10:42:07 +02:00
Junho Lee
fe24cac70b Bluetooth: Mesh: Clarify log to run out of retransmission attempt
The logs for retransmission attempts for sending segments and ack
retransmission attempts for receiving segments were the same, making it
difficult to distinguish between them. This can be solved by adding
information to the log of ack retransmission.

Signed-off-by: Junho Lee <tot0roprog@gmail.com>
2024-09-03 10:41:52 +02:00
Grzegorz Chwierut
392304706b twister: Pass device flash timeout to pytest-harness.
Pass flashing timeout to pytest-harness and use them

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-09-03 10:41:45 +02:00
Jamie McCrae
4384e4b575 tests: mgmt: mcumgr: enum_mgmt: Fix removed zcbor function
Fixes use of a function that has been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-03 10:41:11 +02:00
Magdalena Pastula
0237d375de arch: riscv: add an option for empty spurious interrupt handler
Add the possibility to disable fault handling in spurious
interrupt handler on RISCs and replacce it with an infinite loop.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-02 12:35:57 -04:00
Qiankun Li
f44146a6cd samples: net: wifi: boards: rdrw612bga: Modify CONFIG_POSIX_MAX_FDS config.
[Reproduce issue]
1. Connect In-STA to Ex-AP
   wifi connect WiFi_STA_HE_1.1.8 1234567890 3 2 2

2. Start APUT with ACS using below commands
   wifi ap enable nxp-AP 161 1234567890 3

3. Connect Ex-STA to APUT and verify association using ping traffic

4. Now start two TCP server
  zperf tcp download -I ml 5001 192.168.0.252
  zperf tcp download -I up 6002 192.168.10.1

Observed behavior:
=============

Second TCP server fails to start

[Analysis]
1. After starting uap and a tcp server,
   there is only one allocatable fd resource
   left in the fdtable.
2. When two TCP clients try to establish a connection
   with the server at the same time, the second client
   cannot be assigned an fd, resulting in a failure.

[Fix]
Increase the maximum number of open file descriptors.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2024-09-02 12:33:50 -04:00
Yong Cong Sin
3754bb27f8 Revert "arch: riscv: ARCH_STACK_PTR_ALIGN should be 4 for RV32E"
This reverts commit 87b95be52a.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Yong Cong Sin
ed8dd0fa63 arch: riscv: stacktrace: undo the fp/sp alignment check in #76045
The change of alignment check in #76045 could be wrong and
isn't unnecessary to fix the stack traces output, undo it for
now.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Matt Rodgers
989fdadfe2 net: lib: http_server: prevent falsely matching HTTP headers
Using strncasecmp to match HTTP headers can give unexpected results when
the strings to be compared match up until the end of one string, but the
other string contains additional characters. This can result in falsely
matching a HTTP header value, for example:

strncasecmp("Upgrade-Something", "Upgrade", sizeof("Upgrade") - 1) --> 0

In this case we know that both strings are NULL terminated since one is
a string literal and we have just length-checked and explicitly NULL
terminated the other. So we can just use strcasecmp without a max
length.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-02 12:33:03 -04:00
Hyunsu Yoon
db890a201a net: lwm2m: fix buffer size check for U16 resource
The lwm2m_check_buf_sizes() function was not checking resources of
type LWM2M_RES_TYPE_U16, which could lead to potential overflows
when writing larger data types into U16 resources. Add a case for
LWM2M_RES_TYPE_U16 to properly validate the buffer size.

Fixes #77016

Signed-off-by: Hyunsu Yoon <piedroconti@naver.com>
2024-09-02 12:32:50 -04:00
Øyvind Rønningstad
5a08d537fe lwm2m_senml_cbor_encode.c: Fix line lengths
clang-format made lines too long

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7b0e202282 lwm2m_senml_cbor: Regenerate zcbor code using zcbor 0.9.0
And update the patch file and shell script

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
4fa098f5d0 doc: Add sections about zcbor 0.9.0
to release notes and migration guide.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7a10226590 west.yml: Update zcbor to 0.9.0
from 0.8.2

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Jukka Rissanen
27260c818e net: dns: Add more error codes to gai_strerror()
Add more DNS error code mappings that the gai_strerror()
function can return.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:22 -04:00
Jukka Rissanen
92fda17385 net: Make sure net_buf data size is large enough for IPv6
If IPv6 is enabled, the fixed size net_buf data needs to be
large enough so that the full IPv6 header with extensions
can fit to one net_buf packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:10 -04:00
Guennadi Liakhovetski
dd50ff5585 llext: add dependencies
When an LLEXT object uses symbols of another such object, it depends
on it. Such dependencies have to be tracked to prevent their
accidental unloading. Ideally we should be able to track arbitrary
numbers of such dependencies, but this is a bit difficult. In this
first implementation we use a fixed-size array, currently consisting
of 8 entries.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
c5e305fce6 llext: fix flag evaluation for section grouping
When deciding which sections to group together, only the low 3
section attribute bits are relevant, ignore the rest.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
a8db637ead llext: export a symbol needed for immediate logging
Using the immediate logging option from LLEXT modules requires
one more symbol export.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
fe609dd8e8 llext: look for symbols in other LLEXT objects too
LLEXT objects can also export symbols for use by other such objects.
That means, that when linking an LLEXT object we have to look for
unresolved symbols in previously loaded objects too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
19ccec6a03 llext: use EXPORT_SYMBOL() universally
Replace LL_EXTENSION_SYMBOL() with EXPORT_SYMBOL() in all tests and
samples.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
bd09a5c739 llext: make EXPORT_SYMBOL() universal
Currently LLEXT has two ways to export symbols:
EXPORT_SYMBOL() to exort symbols from the main firmware to extensions
LL_EXTENSION_SYMBOL() to export symbols from extensions
but it is possible to write code, that needs to export symbols
regardless of whether it is built into the main image or an
extension. And in fact there's no real need in two distinct macros -
we can use one for both cases and recognise at build time which
direction exporting is happening. This patch extends EXPORT_SYMBOL()
to also work from extensions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
92a7c772d9 llext: remove an unused variable
Remove a loop counter, that isn't actually used for anything.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Jordan Yates
ae046fe5ea adc: adc_nrfx_saadc: support ADC_ACQ_TIME_MAX
Support the `ADC_ACQ_TIME_MAX` define in addition to
`ADC_ACQ_TIME_DEFAULT`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-02 12:31:17 -04:00
Chaitanya Tata
d1e700e9d8 samples: wifi: Add nRF70 tests to twister
Now that we have a build only mode, this ensures that nRF Wi-Fi driver
builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
a449b748cb Revert "tests: wifi: nm: exclude nrf7002dk"
This reverts commit 65af3ab34c.

Build only mode is now supported without FW blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
803f59f3e1 drivers: wifi: nrf: Add support for twister CI build
Add a mode to build the driver without FW blobs, this is mainly for
twister to run and catch any build issues without depending on any FW
blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Pavel Vasilyev
2f02474448 bluetooth: host: adv: Release buf if failed to set addr
The `bt_id_set_adv_own_addr` function itself tries to allocate a buffer
for the command and it failes due to lack of buffers, it returns error.
However, the `le_ext_adv_param_set` function doesn't handle the error
properly and keeps its own allocated buffer.

This commit releases the allocated buffer.
Partially fixes mesh in #77241.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-02 12:30:18 -04:00
Szymon Janc
ad0c1e12f6 tests: bluetooth: tester: Fix buffer sizes on nRF5340
This was affecting multiple CAP/INI/UST qualification tests.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-09-02 12:30:06 -04:00
Gerard Marull-Paretas
726c8abf32 soc: nordic: nrf54l15: add missing include
Add nrf5x binding header, as NRF5X_REG_MODE_DCDC is used in a macro
comparison. Missing header prevented evaluation to become true and so
enable DC/DC module.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-02 12:29:51 -04:00
Vinicius Miguel
0492235d0d scripts: ci: Fix crash when vendor list is malformed
Also introduces friendly error message.

Signed-off-by: Vinicius Miguel <vmiguel1@gmail.com>
2024-09-02 12:03:03 +02:00
Derek Snell
894c5c8ae5 boards: shields: add NXP vendor name to shields
Update shield doc pages to list NXP vendor name in list of shields.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-09-02 12:01:18 +02:00
Simen Eilevstjønn
2c64fe7f37 Bluetooth: Implemented new DIS characteristics
Implemented new DIS characteristics:
    - UDI for medical devices
    - IEEE 11073-20601 Regulatory Certification Data List
    - System ID

Also fixed buffer overflow bug when assigning too long DIS string literals

Signed-off-by: Simen Eilevstjønn <simen.eilevstjonn@laerdal.com>
2024-09-02 12:00:52 +02:00
Nazar Palamar
eb406f80bc driver/bluetooth / cyw208xx: enable CYW20829_BT_FW_TX10DBM_POWER
Enable CYW20829_BT_FW_TX10DBM_POWER by default to get
best user experience experience out of the box.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
c16fcf160d west.yml: Update CYW20829 Bluetooth LE fw for PAwR support
Update CYW20829 Bluetooth LE fw for PAwR support
Commit#88d2529a3c5aee2e81947553bf6cbacb4671088c

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
120274b0b6 Bluetooth: Samples: periodical_adv_rps: Added sync wait delay
Problem:
on cyw208xx devices i see sometime `Timed out while synchronizing`
error in samples periodical_adv_rps/periodical_sync_rps.

log:
<err> bt_scan: Could not lookup connection handle from PAST
<err> bt_scan: Unknown handle 0x0000 for periodic advertising report
Timed out while synchronizing
...

After investigation i can confirm, the sync was created successful,
but in application (periodical_sync_rsp) terminated the sync when the
connection is not valid.

periodical_adv_rps doesn't have any mechanism to wait for sync and after
gatt write (subevent, response_slot information) it immediately
performs disconnection.

Solution:
Added sync wait delay before make disconnection, to ensure sync
is established before disconnection.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
9a112dc474 driver/bluetooth: Add setup of PUBLIC ADDR
Added setup of PUBLIC ADDR

NOTE: By default, the CYW208xx controller sets some
hard-coded static address.

To avoid address duplication, let's always override
the default address by using the HCI command
BT_HCI_VND_OP_SET_LOCAL_DEV_ADDR. So

1. when cyw208xx_setup gets BT_ADDR_ANY from the host,
   it will overwrite the default address, and the host
   will switch to using a random address (set in the hci_init
   function).

2. If user set the static address (by using bt_id_create)
   before bt_enable, cyw208xx_setup will set user defined
   static address.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
b8690f7ea4 Bluetooth: Samples: update response_cb in periodical_adv_rps
Remove print "Failed to receive response...", if receive
BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED.

Problem: with cyw920829m2evk_02 device periodic_adv_rsp returns
multiple messages  “Failed to receive response….” in the terminal
log.

This happens because controller generates
HCI LE Periodic Advertising Response Report event for each
RspSlot. Because no RSP_DATA is observed in the OTA, which
is no scan device to transmit RSP_DATA, no RSP_DATA can be
received. Therefore, Data Status is 0xFF in all of these events,
which finally cause the messages  “Failed to receive response….”

Data_Status = 0xFF is expected because nothing is received
for that Rsp Slot.

Per spec, it’s not mandatory to generate these events,
So another vendors (e.g. Nordic)  might skip the HCI event
generation if Data_Status = 0xFF.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
5a113ca271 driver/bluetooth / cyw208xx: update condition for select PAwR FW
Select PAwR if enabled following features:
- BT_PER_ADV_RSP
- BT_PER_ADV_SYNC_RSP

Remove dependency BT_AIROC_CUSTOM for AIROC_CUSTOM_FIRMWARE_HCD_BLOB

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
261344c6c7 soc: infineon/cyw20829: Update SYS_CLOCK_HW_CYCLES_PER_SEC
Update SYS_CLOCK_HW_CYCLES_PER_SEC to 96000000

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Flavio Ceolin
4902f189ae dts: xtensa: intel_adsp: Set soft-off state as disabled
The 'soft-off' state must be used when explicitly request by calling
`pm_state_force`. Set this state as disabled in dts ensures that the
pm policy manager will not use this state.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-09-02 11:54:08 +02:00
Fabrice DJIATSA
7fd3a785a3 boards: st: add nucleo_u031r8 board support
add board support for nucleo_u031r8

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Fabrice DJIATSA
195e85c4cb dts: arm: st: add stm32u031 dtsi files
provide support for the STM32U031 serie

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Fabrice DJIATSA
21150edc05 soc: st: stm32: add soc for stm32u031
select soc for stm32u031 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-02 11:53:47 +02:00
Thomas Stranger
d09e1d6e8f samples: boards: stm32: backup_sram: add magic value
Stores a magic value togetter with the counter value, and resets the
counter in case that magic does not match.
A small magic value is not ideal, but should be good enough for the
sample and avoids pulling in a additional dependency e.g. on crc.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Thomas Stranger
cc36e40357 boards: st: stm32h5 nucleo boards: support backup sram
Mark backup sram as supported and document it.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Thomas Stranger
0e09d8903d dts: arm: st: stm32h5: add backup sram to all socs
This commit moves the backup sram definition to the
series base dtsi file, the size is overwritten for socs
which have a bigger bkpsram.

The backup SRAM is available on all stm32h5 mcus.
stm32h503/523/533 have 2k
stm32h562/563/573 have 4k

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Benjamin Cabé
f6c232ec2e samples: modules: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Also fixed a couple invalid or missing table of contents to have
proper document hierarchy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-02 11:51:37 +02:00
Erwan Gouriou
63f31261d1 boards: st: Fix arduino_gpio support
On stm32h735g_disco, `arduino_gpio` is declared while the connector is not
actually described.
On stm32h750b_dk, connector description was simply not included.

All these are blocking tests trying to make profit of arduino gpio
connectors.
Fix these.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-02 11:50:54 +02:00
Aleksander Wasaznik
2f86faffba Bluetooth: Host: Minor doc and rename for LE remote feature exchange
Rename `BT_CONN_AUTO_FEATURE_EXCH` to `BT_CONN_LE_FEATURES_EXCHANGED`,
and add some comments for readability.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-09-02 11:50:25 +02:00
Tim Lin
32a19ea28c drivers/espi: it8xxx2: Fix mask when SRAM size not the power of 2
When using the it8xxx2bx chip, because the SRAM size is 60k and
not a power of 2, using (CONFIG_SRAM_SIZE - 1) results in an
incorrect value for the h2ram base address mask.
Therefore, the mask is declared as GEMASK(19, 0) here.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-09-02 11:49:52 +02:00
Adrian Bonislawski
b9a4900c30 drivers: dma: intel_adsp_hda: change L1 exit defaults
DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be set by default
for all  Intel ACE platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-09-02 09:09:07 +02:00
Krystof Sadlik
16cdd5b852 Drivers: Counter: Added flag for counting up
Tmr and dtmr drivers were missing a flag which tells the
counter_is_conting_up function that the counter is counting up. So I've
added the flag

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-09-02 09:07:57 +02:00
Daniel Leung
060538ee28 logging: fix color being shown even if disabled
If CONFIG_LOG_BACKEND_SHOW_COLOR is disabled, error and warning
lines are still being outputted with color, which is contrary to
what the Kconfig says. So change the color settings for error
and warning lines to no color if this Kconfig is disabled.

The log_output test is also amended to account for this.
Though the test is not skipped as no color is still some colors
(... well... maybe).

Fixes #77150

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-02 09:07:19 +02:00
Quy Tran
b461a3fd53 boards: renesas: update xtal clock frequency on Renesas RA boards
- Update the wrong value of xtal frequency on EK-RA6M1
- Update documentation of EK-RA6M2 regarding to clock description

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-02 09:06:37 +02:00
Emil Gydesen
0f5d0f3555 samples: Bluetooth: ISO: Rename ISO central and peripheral
The samples had a _iso suffix, but the other ISO samples
prefix iso_.

Renames the central and peripheral sample so that they
prefix iso_ rather than suffix _iso.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-02 09:06:18 +02:00
Lyle Zhu
5eda8e7136 Driver: hci_nxp_setup: Change log message to LOG_DBG
Due to it is a normal firmware downloading sequence,
it should be a debug log instead of error log.

Change LOG_ERR to LOG_DBG for this case.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-09-02 09:05:34 +02:00
Benjamin Cabé
7cf124b4a9 samples: sensors: drop ti_hdc sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
6a5428b751 samples: sensors: drop ens210 sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
e59c38fb6f samples: sensors: drop dps310 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
7147b344a6 samples: sensors: drop dht sample as a more generic one exists
This sample adds no value compared to generic_dht_polling or
sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
5f65b30117 samples: sensors: drop bme680 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Anas Nashif
b6057cca41 MAINTAINERS: changes architecture area to be maintained
Move collaborators up to be maintainers.

Collaborators welcome :)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-31 06:49:12 -04:00
Marcio Ribeiro
baf62b7a98 soc: esp32: XIP removed from Espressif targets
The way ESP32 XIP works (with MMU and cache) does no fit the way Zephyr XIP
is implemented, causing issues related to included Zephyr linker files.
Flash code still resides in flash for execution, but MMU/Cache handles it
in such way that XIP might not (or should not) be used with current Zephyr
approach. To address this problem, XIP configuration option is being
removed from Espressif targets.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-31 06:47:52 -04:00
Marcio Ribeiro
cb583995b8 arch: riscv: imply XIP config pushed to SoC level
'imply XIP' pushed from arch/Kconfig/'config RISCV' to riscv SoCs Kconfig
files to allow riscv SoCs having XIP enabled (or not) at SoC level

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-31 06:47:52 -04:00
Florian Grandel
41cc12c79c cmake: targets: usage: add missing custom targets
Added pahole, puncover and footprint to the target documentation.

Fixes: #77563

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-31 06:46:44 -04:00
Emil Gydesen
2c6dae4364 tests: Bluetooth: Audio: Add -RealEncryption=1 to all bsim tests
Several BSIM tests did not enable -RealEncryption=1.
Since everything in LE Audio effectively requires encryption,
we should enable it, as we have seen a few tests passing before
that shouldn't, because they didn't set -RealEncryption=1.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-31 06:43:33 -04:00
Benjamin Cabé
1813982154 doc: settings: misc fixes
Fixes a couple more broken links in the settings
doc page

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:43:02 -04:00
Benjamin Cabé
cfeaf0c731 doc: settings: properly use C domain for cross referencing API
Use :c:func: to properly reference C domain functions
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:43:02 -04:00
Joerg Hofrichter
1540bd7d49 samples: modules: nanopb: display buffer content of correct size
With commit ad242b9, the buffer size was made configurable. Hence, the
corresponding definition CONFIG_SAMPLE_BUFFER_SIZE has to be used when
filling and displaying the buffer.

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
2024-08-30 11:58:50 -04:00
Vinayak Kariappa Chettimada
be7445de04 tests: bsim: Bluetooth: central_hr_peripheral_hr for nrf54l15bsim
Enable central HR peripheral HR samples for nrf54l15bsim.
RealEncryption is BabbleSIM is not enabled as nRF54L port
in Zephyr Controller is not yet supported and the test is
also not using security (SMP pairing).

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
32f07a5cb6 Revert "tests/bsim: Provisionally disable the nrf54l15 BT tests"
This reverts commit 3d729986e0.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
b505942897 Bluetooth: Controller: nrf54L15bsim: Use NRF_GRTC
Use NRF_GRTC in nrf54l15bsim board builds.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
125f39758d Bluetooth: Controller: nRF54Lx: Use SW_SWITCH_SINGLE_TIMER
Use SW_SWITCH_SINGLE_TIMER for nRF54Lx so that fast ramp
can be used, and hence support assymmetric PHYs in ACL
connections.

nRF54Lx radio domain does not have second timer instance
to efficiently implement software switch unless a second
time is used from a different power domain needed use of
PPIB for the double buffered switch timer compares.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
e642aa3513 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (4/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

Remove CMSIS interface use, was replaced with nrf_grtc,
nrf_dppic and nrf_ppib interface in previous commit.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
da6bd08df0 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (3/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
d5e75ce755 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (2/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

Remove CMSIS interface use, was replaced with nrf_grtc
interface in previous commit.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
24465ec160 Bluetooth: Controller: nRF54Lx: Use nrfx interface for bsim use (1/4)
Use nrfx interface for register access with sideeffects to
facilitate bsim use.

4 part commits:
1. Add nrf_grtc interface.
2. Remove CMSIS interface use.
3. Add nrf_grtc interface, once missing bsim port available.
4. Remove CMSIS interface use, replaced by bsim port.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
f39c27bc95 Bluetooth: Controller: nRF54Lx: Review rework GRTC support
Review rework GRTC support for nRF54Lx SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
4fb293224c samples: Bluetooth: hci_uart: Add preliminary DF support for nrf54l15pdk
Add preliminary direction finding support building hci_uart
sample for nrf54l15pdk.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
10a466f31f Bluetooth: Controller: nRF54Lx: Support Radio fast ramp up
Add support for Radio fast ramp up for nRF54Lx SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
55813ad95b Bluetooth: Controller: nRF54Lx: Use NRF_GRTC for radio scheduling
Use NRF_GRTC, Global real-time counter, instead of NRF_RTC.

NRF_GRTC is present in a different power domain in the SoC.
Also, NRF_GRTC provide microsecond resolution timing units,
in the future use of NRF_TIMER for packet timer can also be
replaced.

Use of NRF_RTC would keep Radio power domain ON in addition
to already ON NRF_GRTC's power domain, hence switch to using
NRF_GRTC on nRF54Lx SoC to have lower power consumptions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
e998593c2e Bluetooth: Controller: nRF54Lx: Port for data whitening register use
nRF54Lx have updated Data Whitening register settings, add
implementation to correctly set them up.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
01d7a5bf13 Bluetooth: Controller: Ticker support for free running counter
Add ticker implementation support for free running counter
use.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
a947d6f635 Bluetooth: Controller: Add HAL_TICKER_TICKS_TO_US_64BIT define
Add HAL_TICKER_TICKS_TO_US_64BIT define, to return
microsecond value in 64-bits.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
ded2c74a97 Bluetooth: Controller: Remove redundant HAL_TICKER_CNTR_CLK_FREQ_HZ
Remove redundant HAL_TICKER_CNTR_CLK_FREQ_HZ define.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
55b7dba8ec Bluetooth: Controller: Refactor sw_switch hal interface use
Refactor sw_switch hal interface use and document why some
PPI/DPPI channel group related subscriptions are not
disabled explicitly.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
a7fff7445c Bluetooth: Controller: Fix ext conn create when using single timer
Fix Extended Connection Creation when using single timer
feature in the Controller.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
bcd28e0a86 Bluetooth: Controller: Fix sw switch single timer for spurious TXEN/RXEN
Fix software tIFS switching using single timer from
triggering spurious TXEN/RXEN if the first remainder is
shorter than the tIFS delay calculated in the sw_switch()
function.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Vinayak Kariappa Chettimada
7fbf337e6f Bluetooth: Controller: Fix BT_CTLR_EARLY_ABORT_PREVIOUS_PREPARE depends
Fix BT_CTLR_EARLY_ABORT_PREVIOUS_PREPARE Kconfig depends on.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Marcin Wierzbicki
310570e712 tests: adc: Add overlay for UCANS32K1SIC
New file with ADC configuration for UCANS32K1SIC evb.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
bebabc775b samples: adc: Add overlay for UCANS32K1SIC
New file with ADC configuration for UCANS32K1SIC evb.
Add ucans32k1sic_s32k146 to platform_allow.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
a235230393 boards: nxp: twr_ke18f: add vref-mv value
Add vref value of 3300mV.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
da0d3726e2 boards: nxp: frdm_ke17z and frdm_ke17z512: add vref-mv value
Add vref value of 3300mV.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
0c93ac89c5 board: ucans32k1sic: Enable ADC on UCANS32K1SIC evb
Enable ADC on the UCANS32K1SIC

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
970638371c drivers: adc: adc_mcux_adc12: add API internal reference
Extend the adc_mcux_adc12 adc api to set the ref_internal to
a value of vref-mv property.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
71810a5306 drivers: adc: adc_mcux_adc12: set the vref as a property
Add the vref reference voltage in the DTS, so that the adc driver
can retrieve the value for conversion.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
53e7a9dd86 drivers: adc: adc_mcux_adc12: enable support for channel>=16 on S32K14X
Enable support for channels >= 16 on devices S32K146 and S32K148.
Channels >= 16 are encoded as 100000b..101111b in SC1[ADCH] field.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
eebaa2b270 soc: arm: nxp_s32: s32k1: add support for ADC
Add support for the Analog-to-Digital Converter (ADC).

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Richard Wheatley
cb20e865d6 drivers: adc: format ambiq adc driver
run clang-format on ambiq adc driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
725f084e09 tests: drivers: adc: adc_api: boards: add conf file
Add configuration file to adc_api test and adc sample

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
9a4091b02a boards: ambiq: add adc to apollo4p boards
Add adc to apollo4 plus boards

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
6dd54c8835 dts: arm: ambiq: add ambiq adc to dtsi file
Add Ambiq adc to apollo4 DTSI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
8561d0285d drivers: adc: update ambiq adc driver
Update Ambiq adc driver to add apollo4
fixed typ of BUMBER to NUMBER
Move buffer size prio to configuring slots
and enabling the ADC
removed #if defined(CONFIG_PM_DEVICE_RUNTIME)

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Anas Nashif
d145db01b4 twister: setup soc/arch roots based on module settings
Get data for various roots from modules and do not hardcode location
when retrieving list of boards in testplan.

Fixes #71761

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-30 11:46:41 -04:00
Chris Ruehl
8a154da914 tests: build_all: sensors: add bmp180@94, i2c.dtsi
Add bmp180 test case to tests/drivers/build_all/sensor/i2c.dtsi

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
03c942132d Drivers: Bosch bmp180 dts bindings
Add the yaml files needed for the dts binding of the Bosch bmp180 sensor.

V2 Fixup
--------
yaml fixup for complient checks
merge bmp180-i2c.yaml and bmp180.yaml

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Chris Ruehl
db5091c9f4 Drivers: Add support for Bosch bmp180 sensor
Add driver support for Bosch bmp180 pressure sensor running on i2c bus.
It pushes the driver files to the bmp180 directory under
drivers/sensor/bosch. The driver implement the Sensor API
and support channel DIE_TEMP and PRESSURE.
Driver had been tested with the NRF5340DK.

V2 fixup
---------
Drivers: Bosch bmp180 fixups for PR v2
fix BMP180 in CMakeLists.txt
rename regControl to ctrlreg
simplify the logic in set_attribute
use BMP180_GET_CMD_TEMP_DELAY

Drivers: Bosch bmp180 use system byteorder macros
To aware of ENDIANESS use the macros from byteorders.h

Drivers: Bosch bmp180 comments added to #endif
Add a comment to the #endif /* CONFIG_FOO */

Drivers: Bosch bmp180 , fix twister run error
twister report an error related to using floor() with a float
fix this using floorf() function.

Drivers: Bosch bmp180, rework review v2
fix code style issues
simplify the structure for bus and i2c.
prepare to remove the empty bmp180_i2c.c

Drivers: Bosch bmp180, remove bmp180_i2c.c
bmp180: update CMakeList.txt remove bmp180_i2c.c
bmp180: remove unused variable

fixups for complient checks

replace homebrew bitshift with byteorder.h macro
sys_get_be16 and sys_get_be24
cleanup remove unused spi.h
change struct reg16/24 to uint8_t[]
remove channel AMBIENT_TEMP
bmp180/Kconfig add missing help text
fix indent issue in bmp180_pm_action
merge BMP180_CONFIG_I2C into BMP180_INST
Move DT_DRV_COMPAT out of the header file
drop LOG_DBG() from read calibration data
remove bus_io implementation and header cleanup
move headers and structs out from bmp180.h
fix typo in comment
apply clang format changes, only if not line lenght violation
fix indent code error after joined lines
conversion from Pa to kPh was wrong, fixed it
Remove default=n from Kconfig, it is the default.
Move the conversion ready test into a function (duplicate code)
and apply retry policy
parameter naming with indicate the usage
change BMP180_INST(inst) to clang format
fix int32_t overflow in convension formular
fix wrong devider in convension formula
move BSWAP_s16 BSWAP_u16 from .h to .c

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Johan Hedberg
c15957e753 Bluetooth: drivers: Add module blobs dependencies to Kconfig
Now that there is an actual Kconfig symbol generated for blobs presence,
take advantage of that and declare appropriate dependencies to it. Also add
helpful CMake output if the blobs are missing by taking advantage of the
zephyr_blobs_verify() CMake function.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Johan Hedberg
5562bb9c3a scripts: zephyr_module: Add Kconfig symbol for blobs presence
For any module that defines blobs, add a new Kconfig symbol to indicate
whether the blobs have been fetched or not. Example output for the
hal_silabs module:

   # (no blobs present)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  endmenu
  $ west blobs fetch hal_silabs
   # (blob fetching output)
  $ scripts/zephyr_module.py --kconfig-out=/dev/stdout \
    -m ../modules/hal/silabs
  menu "hal_silabs (../modules/hal/silabs)"
  osource "/Users/johedber/src/zephyr/modules/hal/silabs/zephyr/Kconfig"
  config ZEPHYR_HAL_SILABS_MODULE
  	bool
  	default y
  	select TAINT_BLOBS

  config ZEPHYR_HAL_SILABS_MODULE_BLOBS
  	bool
  	default y
  endmenu

The generated output for modules which do not define blobs is not affected.

Having this additional symbol for blobs lets us specify Kconfig
dependencies for features which require the blobs to be present.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Bjarki Arge Andreasen
ee1e517ccf ipc: icmsg: configure PBUF RX rx_buffer using kconfig
The size of the rx_buffer used by icmsg.c mbox_callback_process()
is not MISRA compliant, being "dynamically" allocated on the stack.

This commit adds a kconfig to set the size of the read buffer and
asserts that it is large enough to read all received data.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-30 11:45:38 -04:00
Emil Gydesen
303d0b786f tests: Bluetooth: BAP: Add test to test invalid bcode
Add a babblesim test for testing the behavior when providing
an invalid broadcast code as the broadcast sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 11:44:05 -04:00
Pavel Vasilyev
1fa27888f4 bluetooth: mesh: Fix proxy client compilation
When building proxy client without proxy server, it fails to find
the `identity` field in the `struct bt_mesh_subnet_keys` because the
latter only compiles when Proxy server is enabled. It should be
possible to compile Proxy Client without Proxy server.

This commit compiles the field if any of GATT features is enabled.

Fixes #75914

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-08-30 11:43:51 -04:00
Alberto Escolar Piedras
5c17f51bda Bluetooth: Controller: Initialize BIG info RFU field
The BIG info new Framing Mode field was not initialiazed, so
random garbage was being sent to the air in this field.
For the controller this field is still RFU.
The spec specifies RFU fields must be initialiazed to
0. So let's do so to avoid sending invalid data,
and avoid having random data in the air which can cause
random differences in testcases.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:40 -04:00
Luca Burelli
f889c4e288 samples/llext/modules: sample.yaml fixes
Apply cleanups suggested by Anas in a Github discussion to the
sample.yaml file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Luca Burelli
030c1c8308 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Alberto Escolar Piedras
d112549140 manifest: Update bsim to version v2.3
Includes an updated libcrypto with new APIs
for CCM packet encryption/decryption.
Also some other components have got very minor updates.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:20 -04:00
Alberto Escolar Piedras
55f9d6965a manifest: Update nRF hw models to latest
Update the HW models module to:
da5f426e7f3aff192a93e5874146260d4dcd943e

Including the following:
* 6e70c2d hal: hack: Support also AAR, CCM & ECB for 54L
* da5f426 Tests for AAR, CCM & ECB
* 03b8461 54: Added AAR, CCM & ECB models
* 2ebcc88 Add EVDMA model
* 71913e3 54: Enable AAR hal build
* 0f3a04b BLECrypt_if: Add new interfacing for latest libCrypto

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-30 11:43:08 -04:00
Emil Gydesen
494f88070f samples: Bluetooth: Add streaming callback for unicast server
The unicast server now prints when a steam enters the streaming
state.

This commit also slightly increases the metadata size to increase
interoperability with other devices such as Android.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 09:09:44 +02:00
Benedikt Spranger
d6ef80ca3b boards: st: nucleo_h745zi_q: Wire up SPI tests
The previously added overlay can now be used. Wire up SPI tests for the
Nucleo h745zi-q board.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
7775a08739 tests: drivers: spi loopback testing on the nucleo_h745zi_q boards
Connect D12(PA6) & D22(PB5) pins on the board to pass the test.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
205e971f29 boards: st: nucleo_h745zi_q: Enable SPI on Arduino extention
The board is capable to serve SPI on the Arduino extention header.
Configure and enable SPI to work on the extention.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Benedikt Spranger
5e6bbdc8e4 tests: drivers: Remove unnessesary include
The nucleo_h7X3zi overlays use memory attributes and therfore the
dedicated include file. This is unnessesary, since the memory attribute
include is already included from the underlaying CPU base file
"stm32h7.dtsi". Remove the unnessesary includes.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
2024-08-30 09:09:10 +02:00
Fin Maaß
3887f41ef9 doc: fix links to wiki
This fixes the broken links to the zephyr wiki.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-30 09:07:52 +02:00
Tom Burdick
7e9cd5e414 boards: intel: ish: Set flasher to misc-flasher
Set the intel ish board flasher to use misc-flasher.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-30 09:06:58 +02:00
Jordan Yates
ffc46baeb7 tests: rtio: test rtio_sqe_prep_callback_no_cqe
Test that SQE's created with `rtio_sqe_prep_callback_no_cqe` run, but
don't create a completion queue event.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-30 09:06:36 +02:00
Jordan Yates
559f58b710 rtio: add helper function rtio_sqe_prep_callback_no_cqe
Add a helper function that constructs a callback operation that doesn't
generate a completion queue event.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-30 09:06:36 +02:00
Marc Herbert
674cf30a00 MAINTAINERS.yml: removing marc-hb
New assignment.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-30 09:06:12 +02:00
Benjamin Cabé
bd29c5c410 doc: extensions: Add Doxygen tooltips to main documentation
Add Doxygen tooltips in the main documentation.

The tooltips are triggered when hovering over C symbols in the
documentation and display a preview of the Doxygen documentation for the
symbol.

Some shadow DOM magic is needed to style the tooltips correctly, without
affecting the rest of the page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-29 16:13:41 -04:00
Tomasz Moń
22bde52b37 dt-bindings: usb: uac2: Add configuration speed selectors
Every High-Speed capable device must be able to enumerate at Full-Speed.
The functionality at different speeds can be different. Sometimes it is
possible to support exactly the same functionality on both High-Speed
and Full-Speed, but sometimes it is not. The problem is particurarly
relevant for UAC2 because it utilizes isochronous endpoints which means
that the available bandwidth is drastically different between High-Speed
and Full-Speed.

Full-Speed isochronous endpoint can support up to 1023 bytes per frame.
Typical 48 kHz 16-bit stereo stream consumes 48 * 2 * 2 = 192 bytes per
frame. Zephyr UAC2 instances with such streams are fine to work both at
Full-Speed and High-Speed.

An example stream that is too much for Full-Speed is the sometimes used
192 kHz 24-bit stereo (whether or not it is useful is out-of-scope here,
because it should be up to application developer) which would require
192 * 3 * 2 = 1152 bytes per frame.

Because the bandwidth required for audio stream depends on three
different parameters (sample rate, bit resolution and number of
channels), the UAC2 implementation should not automatically limit
available parameters to fit bandwidth requirements.

Adding explicit full-speed and high-speed boolean options to zephyr,uac2
compatible seems to be not only the easiest solution to the problem, but
also the most flexible one. Depending on the use case, the application
developer can then decide for example:
 * to not support High-Speed at all - by having one zephyr,uac2 instance
   with full-speed property
 * to not support Full-Speed at all - by having one zephyr,uac2 instance
   with high-speed property
 * to support limited number of channels at Full-Speed and all channels
   at High-Speed - by having one zephyr,uac2 instance with full-speed
   property and separate instance with high-speed property
 * to have exactly the same functionality at both speeds - by having one
   zephyr,uac2 instance with both full-speed and high-speed properties

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-29 16:12:45 -04:00
Jordan Yates
6ad8ca9c64 boards: thingy53: define composite fuel gauge
Add a composite fuel-gauge device to the Thingy53 to enable converting
the raw voltage to a battery percentage.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
bbee47c030 tests: build_all: sensor: test composite fuel gauge
Test the composite fuel-gauge driver compiles.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
39a582a9ec fuel_gauge: composite analog fuel gauge
Construct a device that implements the fuel-gauge API from a collection
of analog sensing inputs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
597ed491c7 battery: support additional properties
Support additional properties from the linux `battery.yaml`.

The `ocv-capacity-table-0` definition differs from the Linux version as
we do not have a good way to generate variable length arrays in our
config structs, or a good way to separate out the percentage vs voltage
in the mapping.

We reduce the flexibility by enforcing a step size of 10%, which removes
the need for the percentage to be in the array and solves the variable
length problem.

To simplify the effort of defining these voltage curves, default curves
for a variety of chemistries have been added, extracted from datasheet
graphs of discharge curves from reputable manufacturers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
291fc517e3 tests: lib: interpolation: added
Add tests for the linear interpolation math functions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Jordan Yates
5cb2e019de math: interpolation: linear interpolation
Add linear interpolation function that respects floating point rounding
rules (away from zero).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Anuj Pathak
6585b4a540 samples: bluetooth: peripheral: added HRM control point support
- added support for HRM control point write

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 16:12:12 -04:00
Anuj Pathak
7e1dc5ae3e bluetooth: services: hrs: added control point write callback
- HRS control point was added to server but no write callback is
defined, this causes issues if control point characterstic is
written by the client

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 16:12:12 -04:00
Marcio Ribeiro
0705aaeb81 drivers: dac: esp32: clock initialization fix
Fixed ESP32 DAC clock initialization

Fixes: #70295

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 16:11:57 -04:00
IBEN EL HADJ MESSAOUD Marwa
2353b9391b drivers: i2s: i2s_ll_stm32: Handle single clock source
Modify the function "i2s_stm32_set_clock" to handle the case where pclk_len
it is not greater then 1 and to ensure that the freq_in
variable is correctly set in both cases.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-29 16:11:30 -04:00
Declan Snyder
630faa1592 soc: nxp: rt1011: Fix RT1011 FCB offset
RT1011 expects it's flash configuration block at a different offset than
the rest of the RT10xx series. Add default to fix the platform not
booting.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-29 16:11:18 -04:00
Fin Maaß
235033f4b7 drivers: hwinfo: litex: depend on devicetree
make litex hwinfo dependent of enabled state of device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 16:10:57 -04:00
Sylvio Alves
f099bcd497 hotfix: drivers: i2s: update esp32s3/c3 I2S dtsi
I2S driver was merged after interrupt .dtsi was changed,
causing CI to fail. This updates it accordingly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-29 16:10:28 -04:00
Marcio Ribeiro
91a1e70653 samples: drivers: i2s echo supported by esp32s3_devkitc
Added esp32s3_dedvkitc board to the i2s echo sample

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
e9a1e4056d samples: drivers: led_strip supported by esp32s3_devkitc via i2s driver
Added esp32s3_dedvkitc board supporting led_strip sample via i2s driver

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
f4e89a06f5 boards: espressif: enable support for i2s
i2s support added for:
 - esp32s3_devkitm
 - esp32s3_devkitc
 - esp32c3_devkitm

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Marcio Ribeiro
902104d795 drivers: i2s: esp32s3/esp32c3
i2s support added for esp32s3 and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Hao Luo
b532a3ea7f boards: ambiq: apollo3: add connector dtsi for apollo3 boards
Added connector dtsi files for apollo3_evb and apollo3p_evb,
and ran gpio_basic_api to test, all cases pass

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-08-29 18:06:07 +02:00
Raffael Rostagno
02af64400f boards: esp8684_devkitm: PWM sample and document update
Added sample for ESP32C2/ESP8684 SoC and updated document
indicating LEDC PWM support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 18:05:12 +02:00
Raffael Rostagno
ba078b4032 pinctrl: esp32c2: Add LEDC config
Add LEDC pinctrl configuration for ESP32C2/ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 18:05:12 +02:00
Tom Burdick
9dffac0107 llext: flush logging before unloading extensions
Extensions could have used logging, when log processing is
deferred, the logging thread can run after the extension has
been unloaded and thereby access invalid memory addresses.
Make sure to flush all logs before unloading extensions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-08-29 18:05:04 +02:00
Peter van der Perk
c09b3bcbd6 soc: nxp: rt11xx: Enable FlexIO
Zephyr already has various FlexIO drivers but imxrt11xx didn't enable
the base flexio peripheral.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-29 18:04:56 +02:00
Peter van der Perk
44f7928ecf clock: mcux_ccm: add flexio clock
Adds flexio1 and flexio2 clock definitions to get the clock rate

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-29 18:04:56 +02:00
Patryk Kuniecki
05609d0379 tests: include drivers/watchdog/wdt_basic_api on it8xxx2_evb
Due to issues with running the watchdog test in a fully
automated manner on the IT8XXX2_EVB, it was previously removed.
However, a fix has now been merged, and it should be operational
on this board once again.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2024-08-29 18:04:43 +02:00
Ha Duong Quang
725610ebe9 samples/tests: adc: enable samples/tests for s32z270
enable samples/tests adc for s32z270

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-29 18:04:36 +02:00
Ha Duong Quang
77968d4dd8 boards: s32z2xxdc2: add support for adc
Add devicetree of adc instances for s32z270.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-29 18:04:36 +02:00
Erwan Gouriou
476c028330 tests/boot: Add nucleo_wba55cg as test target
Allows testing mcuboot/mcumgr on this board.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-29 18:04:04 +02:00
Erwan Gouriou
2597a93b4b boards: nucleo_wb55cg: Set partition for swap f/w update method
Flash partition was defining a scratch area which was implying the use
of mcuboot BOOT_SWAP_USING_SCRATCH f/w update method.
By removing this partition, mcuboot will automatically use
BOOT_PREFER_SWAP_MOVE method which should be prefered as it levels
flash wear. Incidentally increase slot1 by one sector (as this is
preferred for the swap method).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-29 18:04:04 +02:00
Gang Li
e1d20235d3 drivers: wifi: nxp: change the dormant state
1) After the wifi driver successfully connects to the AP,
the dormant state should be set to OFF.
Once a deauth/disassoc frame is received or link lost occurs,
the dormant state should be set to ON.
2) Enable CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO and CONFIG_NET_CONTEXT_PRIORITY
to push high priority packets directly to network driver.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-08-29 18:03:48 +02:00
Kapil Bhatt
70be6ad8a0 hostap: Add rts threshold set api support
Add api to set rts threshold.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-29 18:03:41 +02:00
Lars Jeppesen
8c3790d9b7 drivers: adc: stm32h5x: Set option register for adc1/channel 0
The STM32H5x adc has a special option register that
needs to be set when using channel 0 on adc1.

fixes: #77618

Signed-off-by: Lars Jeppesen <lje@foss.dk>
2024-08-29 18:03:33 +02:00
Anas Nashif
a0411ad2e1 ci: use latest docker image: v0.26.14
new docker with an updated renode version and rust toolchains.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-29 18:03:18 +02:00
Nithin Ramesh Myliattil
d8e4bc7ff0 bluetooth: BAS: add gatt notify for battery level status char
gatt notification for battery level status char is added
in battery service.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-08-29 18:03:09 +02:00
Fabian Blatz
6ae753f5bd drivers: stepper: Fix missing _driver_api suffix
The gen_kobject_list.py script expects the __subystem declaration to end
with _driver_api. Adjust the stepper api and existing driver implementation
accordingly.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-29 18:03:01 +02:00
Alberto Escolar Piedras
59685b512e manifest: Update EDTT to latest version
Update the EDTT module to:
b9ca3c7030518f07b7937dacf970d37a47865a76

Including the following:
* b9ca3c7 Fix for for python >= 3.11
* fe9b1d1 Corrected ISO interval for LL/CIS/PER/BV-05-C

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-29 18:02:51 +02:00
Emilio Benavente
be0a147b73 boards: nxp: mimxrt1064: enabled pit driver
Enabled the PIT Counter Driver for the
mimxrt1064.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-08-29 18:02:43 +02:00
Efrain Calderon
40414f72e9 drivers: adc: ads1x1x: add support for RDY pin
Some hardware configuration require rely on the ALERT/RDY
pin to know when and ADC conversion is completed.

The polling thread is left as fallback, when the pin
is not defined.

Signed-off-by: Efrain Calderon <efrain.calderon.estrada@gmail.com>
2024-08-29 15:55:14 +02:00
Efrain Calderon
ce9bf1071e devicetree: introduce DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY
Add a new macro, DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY
name, evaluates to 1 if any enabled instance of `compat` has the
property or to zero if it hasn't.

This macro can be useful in drivers for a family of devices.

Signed-off-by: Efrain Calderon <efrain.calderon.estrada@gmail.com>
2024-08-29 15:55:14 +02:00
Hake Huang
8b914f6805 samples: i2s: Add i2s_codec example
This example demonstrates I2S audio playback combined with the codec
API. It can use the dmic API for audio input.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Hake Huang
446282cd22 boards: mimxrt595_evk,mimxrt685_evk: Instantiate WM8904
Add Flexcomm signal sharing configuration for the mimxrt595s/cm33 and
mimxrt685s/cm33 SoCs. Properly instantiate the I3C peripheral for
interfacing with the WM8904's control port. Modify pinctrl DTs of
mimxrt595_evk/mimxrt595s/cm33 and mimxrt685_evk/mimxrt685s/cm33.
Instantiate the WM8904 codec for said boards.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Hake Huang
6b796314fe soc: mimxrt595s/cm33, mimxrt685s/cm33: Add clock config for audio
Add clock config for Flexcomm peripherals functioning as I2S interfaces.
Add MCLK clock config for the WM8904 codec located on the mimxrt595_evk
and mimxrt685_evk boards.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Vit Stanicek
db1cb43a9d drivers: audio: Add the wm8904 driver
Add driver for the Wolfson WM8904 audio codec.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Vit Stanicek
5d8b5c0188 api: codec: Extend API
Add sample rates. Add dai_route_t enum to allow codec configuration for
duplex operation. Allow for audio inputs to be controlled. Add functions
for signal routing.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Vit Stanicek
b8466e0c95 boards: mimxrt685_evk/mimxrt685s/cm33: Enable DMIC
Enable DMIC clock in soc.c - attach to chip's audio PLL. Add pinmux
definitions for the DMIC peripheral. Add nodes to SoC's device tree for
the DMIC peripheral and its audio channels. Configure the DMIC
peripheral in board's device tree to enable audio capture.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Vit Stanicek
673b3db80a drivers: clock_control_mcux_syscon: Add I2S MCLK
Add support for the I2S MCLK signal (provided by CLOCK_GetMclkClkFreq).

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Fin Maaß
4a6dacf01b drivers: adc: tla2021: seperate thread, only when needed
only use the separate thread, when
CONFIG_ADC_ASYNC is enabled.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 15:52:46 +02:00
Karol Lasończyk
25e90e7bb0 dts: boards: Add nRF54L15 ENGA configuration
Add conditional DTS compilation in case of ENGA version.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
18086567dd tests: kernel: Add support for FLPR core in nRF54L15
Add support for production device.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
070b1a4d41 samples: drivers: mbox: Update mbox sample to work with nRF54L15
Update mbox sample configuration to work with production
board and SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
7b9b00c58b test: samples: nRF54L15 support
Commit consists of minimal set of overlays need to run tests
and samples. Additionally disables nRF54L15 platform in cpp98
tests, because unnamed unions are not supported.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
99d8549a5c drivers: misc: Add support for nRF54L15 SoC
Expand vpr_launcher to support production version of the SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
030a020028 modules: Add support for nRF54L15 SoC
Update modules to support production version of the nRF54L15 SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
abcde111b8 boards: nrf: Add nRF54L15 DK board
Add board with production version of the nRF54L15 SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
e3bcd428b3 soc: Add support for nRF54L15
Add support for production version of the device.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Karol Lasończyk
ad3ab05259 dts: Add missing PDM entries to nRF54L15 device
Add PDM instances in nRF54L15.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Raffael Rostagno
d09ad6d923 boards: esp32c6_devkitc: Add entropy support
Enable entropy (TRNG) support for esp32c6_devkitc

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 11:38:36 +02:00
Raffael Rostagno
b4148f17b7 drivers: entropy: esp32c6: Add support
Add support of entropy (TRNG) driver for ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 11:38:36 +02:00
Anuj Pathak
4c151ab67c samples: bluetooth: peripheral: updated project to use cts from tree
- removed custom cts implementation
- enabled CTS through proj.conf and used it from the tree

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 11:38:28 +02:00
Anuj Pathak
957d59814b bluetooth: services: added current time service
- added ctc implementation
- updated Kconfig & CMake files
- updated service doc

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 11:38:28 +02:00
Anuj Pathak
836514c9dd sys: timeutil: expose and use macro for base year
timeutil internally uses 1900 as base year for calculation,
that is hidden from caller context. Thus declared a macro in
the public header file, and uses that macro will let caller adjust the
calulations accordingly.

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-29 11:38:28 +02:00
Ren Chen
b90a507ba1 soc: ite: it8xxx2: support 96MHz PLL frequency and lcvco calibration
To enhance USB clock's accuracy, this change supports 96MHz PLL frequency
and LCVCO calibration.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-08-29 11:38:20 +02:00
Nicolas Pitre
cfaaf0135a sys_clock.h: remove deprecated sys_clock_timeout_end_calc()
No one has used this for a while.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-29 11:38:11 +02:00
Mark Wang
b4ddf3dec6 Bluetooth: Classic: SDP: fix that record len is SEQ32
find the headset which a2dp related record len is SEQ32,
fix sdp_client_get_total too because it doesn't handle
SEQ32 too.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-29 11:38:02 +02:00
Andrej Butok
3f5fc42fba runners: linkserver: Add .elf support to the linkserver flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the linkserver runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-29 11:37:54 +02:00
Benedikt Schmidt
c9c0c4fc2f include: zephyr: drivers: gpio: add include guard to gpio_intel.h
Add an include guard to gpio_intel.h

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-29 11:37:38 +02:00
Benedikt Schmidt
38bce0a534 include: zephyr: drivers: gpio: add missing C-linkage in headers
Add missing extern "C" statements in headers for GPIO drivers.
Fixes #77605.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-29 11:37:38 +02:00
Erwan Gouriou
40e1b890f2 boards: nucleo_wba55cg: Update blob fetch command
Following addition of a `name` to hal_stm32 module, the command to fetch
blobs that are required to build BLE applications on STM32WBA socs is now
changed from `west blob fetch stm32` to `west blob fetch hal_stm32`.
Update documentation and warn users in migration guide.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-29 11:37:30 +02:00
Erwan Gouriou
6e3e55a790 west.yml: hal_stm32: Add name to module.yml
hal_stm32 was missing a `name` in module.yml
Point to the module version where this is fixed.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-29 11:37:30 +02:00
Emil Gydesen
4b9e11cdd2 tests: Bluetooth: Add missing host features to ICS
Adds

GAP: 17b/4: LE security mode 3 level 3
GAP: 20A/6: Security Manager OOB
GAP: 23/7: Connected Isochronous Stream Terminate procedure
GAP: 27/7: Writable Appearance
GATT: 3/16: Characteristic Value Reliable Writes

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-29 11:36:56 +02:00
Emil Gydesen
d73df7477b tests: Bluetooth: Add missing ICS for LE audio
Added volume offset for CAP commander
Added gain settings for CAP commander
Added play, pause and seeking for MCS
Added program_info and metadata update for PBP
Added long read and notify for all TBS characteristics
Added TMAP CG

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-29 11:36:56 +02:00
Flavio Ceolin
874e4e2e19 intel_adsp: Add board definitions for adsp simulator
Add board definition for Intel ADSP (ACE family) simulators.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-28 16:35:55 -04:00
Daniel Leung
4cf95b1800 mm: common: reset mappings during simple mapping failures
For mapping operations in sys_mm_drv_simple_map_region() and
sys_mm_drv_simple_map_array(), when there was an error with
mapping any pages, it would simple return an error, leaving
already mapped pages still mapped. This modifies the behavior
where any failure during the whole mapping operation will
unmap the already mapped pages.

This also modifies the remapping and moving functions to
reset mappings when error is encountered.

Fixes #73121

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 16:35:43 -04:00
Pieter De Gendt
2c496c094b scripts: ci: Fix clang-format compliance for additions or removals
If a diff only has added or removed lines we need to match both '-' and '+'
characters in the hunk context.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-28 16:35:20 -04:00
TOKITA Hiroshi
1ffd746e40 dts: arm: renesas: ra4: Defining MSTP regs in devicetree
Add a definition for RA4, which was not included in #76820.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-28 14:17:49 -04:00
Dominik Lau
4ca2400af6 drivers: input: use generic touch report in stmpe811
Adds the use of generic touch reporting method for stmpe811 driver.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-28 14:02:43 -04:00
Dominik Lau
40e64f1564 drivers: input: use generic touch report in ft5336
Adds the use of generic touch reporting method for ft5336 driver.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-28 14:02:43 -04:00
Dominik Lau
74e84a9dfd drivers: input: common properties parsing for touchscreen drivers
Adds a way of reporting touchscreen events
taking common properties into account.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-28 14:02:43 -04:00
Dominik Lau
6318487336 bindings: input: add generic touch controller bindings
Adds common properties for touchscreen controllers.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-28 14:02:43 -04:00
Fin Maaß
b380c4e05d doc: releases: mention change of MCP9808
Mention change of the Microchip MCP9808 temperature sensor.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-28 14:02:16 -04:00
Fin Maaß
2293e6668a drivers: sensors: add jedec jc 42.4 compliant temperature sensor
This transforms the existing driver for the Microchip MCP9808
to be used as a generic driver to be used with  all
JEDEC JC 42.4 compliant temperature sensor chips.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-28 14:02:16 -04:00
Yong Cong Sin
f81d178b23 shell: modules: kernel: fix typo in cmd_kernel_uptime()
Caught by CI in another PR, should be 'Unsupported' instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-28 14:01:55 -04:00
Yong Cong Sin
0de487e151 doc: updated release note & migration guide for the kernel thread cmd
Added entries in the release note & migration guide about the
changes to the `kernel thread` shell command.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-28 14:01:55 -04:00
Yong Cong Sin
aca3b3602a shell: modules: kernel: add CPU mask affinity/pinning commands
Added commands to access the APIs in the kernel/cpu_mask.c

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-28 14:01:55 -04:00
Yong Cong Sin
475fc91746 shell: modules: kernel: add additional check in unwind cmd
Use `shell_strtoull()` to parse the thread ID argument for
error checking.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-28 14:01:55 -04:00
Yong Cong Sin
e3c2e8484f shell: modules: kernel: group thread-related cmds
`stacks` `threads` & `unwind` are commands related to kernel
thread, group them one level inside a main `thread` command,
and rename `threads` to `list`:

- `kernel threads` -> `kernel thread list`
- `kernel stacks` -> `kernel thread stacks`
- `kernel unwind` -> `kernel thread unwind`

Additionally, rename and mark the `thread_valid()` function
as `__maybe_unused` as it might be unused for architectures
without stackwalk implementation, and use the locked version
of the thread iterator (`k_thread_foreach()`)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-28 14:01:55 -04:00
Andrey VOLKOV
665da7354b drivers: adc: ra: rename "channels-num" to the more common "channel-count"
The "channels-num" should not be used here, other system's parts are using
"channel-count" instead for the same purpose.

Also property's description has been сorrected.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-28 14:01:46 -04:00
Johan Hedberg
d47a9e211c boards: silabs: Don't explicitly ignore bluetooth and net tags
These boards support Bluetooth, so it should be listed under "supported".
There's also no (known) good reason to explicitly skip "net" tags, so
remove that from the ignore_tags list as well. We don't particularly know
or care about relevant net tests for these boards, so "net" is left out for
now from the "supported" list.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-28 14:01:32 -04:00
Johan Hedberg
5dd980c00b boards: silabs: Disable Bluetooth for boards which lack binary blobs
These boards don't currently have the necessary binary blobs available
for Bluetooth, so keep their Bluetooth HCI DT node disabled.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-28 14:01:32 -04:00
Kapil Bhatt
6aea527c65 drivers: wifi: Add overrun count in statistics
Add overrun count in statistics. It will represent
the number of packets dropped either at received and
sent due to lack of buffer memory.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-28 13:59:59 -04:00
Kapil Bhatt
ec0b9ccbc1 hostap: Add currnet PHY rate to status
Add current PHY rate to the wifi status.
It will a TX data rate in bits per second.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-28 13:59:59 -04:00
Lucas Tamborrino
ff36d10333 drivers: dma: esp32: Handle Rx water mark interrupt
Remove water mark configuration and handle its interrupt
instead, since it is only present in ESP32S3.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-28 13:59:42 -04:00
Fabrice DJIATSA
ca22f93b53 dts: arm: st: h7: include h743.dtsi in h750.dtsi
since h750 and h743 have the same irq wkup priority,
we can add wkup interrupt in h743.dsti and simply
include the file in h750.dtsi.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-28 13:59:31 -04:00
Anas Nashif
a5e3c0a792 ci: do not run twister on some script changes
Do not run twister on some script changes that do not require a twister
run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-28 13:58:56 -04:00
Hui Bai
386263cc66 manifest: Update hostap to latest
Update hostap repo to latest in west.yml

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
Hui Bai
c2472e8bae net: l2: wifi: Fix issue command wifi connect fail.
Increase wifi connect input parameters max count to 13. Previous count
7 is not enough if other security type is supported.
When enabling softAP, the parameter cnx_params in cmd_wifi_ap_enable()
is with static key word. Then the parameter will always save
configurations of last time. Remove static keyword to eliminate effects
of configs from last tim and do memset before setting up softAP.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
Hui Bai
dbc6cdc711 modules: hostap: Supports link mode of legacy STA.
Link mode shows unknown when legacy (A or bg only) device connects to
APUT. Set the link mode to WIFI_2 when the host freq over 4000 and set
link mode to WIFI_3 when the host freq over 2000.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
Hui Bai
86feca37f1 net: l2: wifi: Increase max count of connected STA
Increase max count of CONFIG_WIFI_SHELL_MAX_AP_STA from 5 to 8. The
SoftAP of NXP wifi chip can support up to 8 stations.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
Hui Bai
d647f38e2d modules: hostap: Enable CONFIG_IEEE80211AC flag for hostapd support.
Enable CONFIG_IEEE80211AC flag for 11AC support when setting up
AP with hostapd.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
Hui Bai
2cc55bf85e modules: hostap: Add support of setting up softAP with hostapd
Added new flag CONFIG_WIFI_NM_HOSTAPD_AP for hostapd support. Once this
flag is enabled, softAP will be setup by hostapd. Both wpa_supplicant
and hostapd uses same task and eloop.
Included necessary hostapd files when compiling wifi samples if
CONFIG_WIFI_NM_HOSTAPD_AP is enabled. Added hostapd support for all
softAP command of L2 wifi shell commands.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-08-28 06:51:41 -04:00
TOKITA Hiroshi
981fb7b900 driver: clock_control: renesas_ra: Use pclkblock's clock src defaultly
When omitting the clk_src definition in a child node of a pclkblock,
it uses the source of the parent node.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-28 06:51:25 -04:00
TOKITA Hiroshi
37b24ab8b9 driver: clock_control: renesas_ra: Defining MSTP regs in devicetree
Allows MSTP register addresses to be changed in the device tree
to support different configuration SoCs.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-28 06:51:25 -04:00
Jeppe Odgaard
6446ce8982 drivers: rtc: rtc_ll_stm32: add hse clock support
Add support for HSE as the RTC clock source.

The initial implementation has the following limitations:
 - Only whole MHz HSE frequency is supported, e.g. 24.5 MHz will generate a
 compile error.
 - Frequencies equal or above 64 MHz are not supported and will generate a
   compile error.

The implementation has been tested on nucleo_h563zi with:
 - 8 MHz (via hse-bypass)
 - 25 MHz (via external crystal)

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-08-28 06:51:00 -04:00
Anke Xiao
59655d4e08 tests: drivers: add flexio pwm and spi support for ke17z
pwm: pwm_api: update testcase.yaml and add new overlay configuration
to support flexio pwm driver.
spi: spi_loopback: update testcase.yaml and add new overlay
configuration to support flexio spi driver.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
594bf682e1 boards: nxp: update pinctrl dtsi for ke17z
Add flexio pwm pinctrl configuration to support flexio pwm

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
883f36c448 soc: nxp: kinetis: ke1xz: update soc.c to add flexio clock
Add flexio clock configuration, and select the clock source.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
04ae22eb22 drivers: spi: update spi_mcux_flexio.c
After testing the flexio spi_loopback on the ke1xz platform,
it is found that the master transfer and receive are not
synchronized. So add loop code to wait for the master transfer
to complete for frdm_ke17z and frdm_ke17z512 platforms.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Anke Xiao
41f9d52c07 dts: arm: nxp: nxp_ke1xz.dtsi: add flexio information
Add flexio support for frdm_ke17z and frdm_ke17z512.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-28 06:50:50 -04:00
Andrzej Drabarek
166b9bf35a soc: polarfire: split into cpu clusters
Split Polarfire SoC into CPU clusters as they have different
capabilities.

Signed-off-by: Andrzej Drabarek <adrabarek@antmicro.com>
2024-08-28 06:50:40 -04:00
Daniel Leung
82d56e8f0b tests: thread_analyzer: test for privileged stacks usage
This adds the bits to test the displaying the usage of
privileged stacks for user threads. Note that this only
adds the printk part as this is to test the code path to
fetch usage data rather than the display part.

Also add qemu_xtensa/dc233c/mmu to platform allow list so
the privileged stack code can be tested on that platform.

This replaces mps2/an385 with qemu_x86 as an integration
platform due to the privileged stack test. Since ARM does
not currently support getting privileged stack info, test
would result in twister error due to kconfig warnings.
The board cannot be excluded since it's an integration
platform. So for now, use qemu_x86 as an integration for
32-bit testing. Once ARM has proper support, we can go
back to having mps2/an385 as an integration platform.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
96bb97a54f tests: thread_analyzer: disable QEMU icount
This disables QEMU icount for all the simulated platforms
in the allowed list. With icount enabled, the printout from
the thread analyzer would be continuous and non-stop instead
of the default once every 60 seconds. Besides, the console
harness only needs one, and these is no need to waste CPU
cycles and memory for processing the extra ones.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
0962114f2b riscv: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
bb313355f3 riscv: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack when
a thread is transitioning to user mode. This prevents
information leaking if the stack is reused, and also aids
in calculating stack space usage during system calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
55ee97c7d2 xtensa: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
1dc02fcbda xtensa: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack for
each thread during thread initialization. This prevents
information leaking if the thread stack is reused, and
also aids in calculating stack space usage during system
calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
d736af8d26 x86: implements arch_thread_priv_stack_space_get
This implements arch_thread_priv_stack_space_get() so this can
be used to figure out how much privileged stack space is used.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
fb0babacee x86: initialize privileged stack during thread init
This adds the bits to initialize the privileged stack for
each thread during thread initialization. This prevents
information leaking if the thread stack is reused, and
also aids in calculating stack space usage during system
calls.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
c25fa96a68 x86: only set psp pointer for thread stacks
Only set the privileged stack pointer for thread stacks, but
nullify the pointer for kernel-only stacks, as these stacks
do not have the reserved space. The psp pointer may point to
arbitrary memory in this case if stack is not big enough.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
d26b7d4ed1 debug: thread_analyzer: display privileged stack usage
This adds the bits to display privileged stack usage for
architectures that support obtaining this information.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
aa65842e95 debug: thread_analyzer: align output
The per-thread output after the first stack usage line is not
aligned which makes it harder to decipher the content.
So align them for easier reading.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Daniel Leung
b4c455c754 arch: add interface to get stack space of privileged stack
This adds a new arch_thread_priv_stack_space_get() interface for
each architecture to report privileged stack space usage. Each
architecture will need to implement this function as each arch
has their own way of defining privileged stacks.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 06:50:30 -04:00
Marcin Niestroj
2b9ce2eef6 samples: sockets: echo_server: fix IPPROTO_IPV6 on UDP sockets
IPPROTO_IPV6 option was set on TCP socket (besides doing it already in
tcp.c) instead of UDP. Fix that.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-28 06:50:20 -04:00
Benjamin Cabé
346031d060 ci: github: bump tj-actions/changed-files version
Bump tj-actions/changed-files to latest (v45).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
501fa47c4f ci: bsim tests: also run BabbleSim Tests on deleted files
Use correct output for the changed-files action so that bsim tests are
also run on deleted files, no just added/copied/modified/renamed

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
178e940a45 ci: doc: build documentation in CI when files are deleted
Use correct output for the changed-files action so that docs
is built in CI when relevant files are *deleted* too, not just
added/renamed/modified

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:50:10 -04:00
Benjamin Cabé
3f722e1b4d ci: github: bump dawidd6/action-download-artifact from 3 to 6
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
Benjamin Cabé
f2c5736f95 ci: github: bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
Benjamin Cabé
ae0e99d436 ci: github: bump fsfe/reuse-action from 1 to 4
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 1 to 4.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v1...v4)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-28 06:49:54 -04:00
The Nguyen
71e3a98b77 boards: renesas: add entropy support for Renesas RA8 boards
Enable support of entropy driver for ek_ra8d1 and mck_ra8t1 boards

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-08-28 06:49:46 -04:00
Tim Lin
2cce7ff4a8 Revert "drivers/interrupt: it8xxx2: Register interrupt number 0 to handle"
This reverts commit 93f2b08b460a47e17ac756b61576a05cff88d650.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-28 06:49:36 -04:00
Erik Tamlin
bb784c45dd modules: percepio: Fix python executable name
Fix python executable name in percepio module's CMakeLists.txt

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-08-28 06:49:27 -04:00
Andrej Butok
7af6396a0d boards: nxp: frdm_mcxn947: fix sysbuild mcuboot
Adds the default MCUboot operating mode when building using sysbuild.
Fix mcuboot sysbuild for frdm_mcxn947.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-28 06:49:14 -04:00
Lucas Tamborrino
ad70ff7b9d tests: boards: esp32: Use smh in cache coex test
Simplifies test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Lucas Tamborrino
adbf2192df samples: boards: esp32: spiram test
Simplifies psram test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Lucas Tamborrino
5dc545290c soc: espressif: psram as shared multi heap
Currently, if the user wants to allocate heap on external RAM
he needs to enable CONFIG_ESP_SPIRAM and set a threshold defined
with CONFIG_ESP_HEAP_MIN_EXTRAM_THRESHOLD.

This approach requires that we re-implement `k_malloc` and allocate
the memory on the proper region based on the block size.

By using the shared multi heap feature the proccess of allocating
memory from external memory becomes more fluent and simple.

The attribute SMH_REG_ATTR_EXTERNAL was added to reference the
external memory.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-27 18:37:47 -04:00
Théo Battrel
cfeb325b4f Tests: Shell: Take into account startup new line
Update `shell_backend_uart` to take into account the new line print by
`z_cursor_next_line_move`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Théo Battrel
9aba9ddd0c Shell: Remove unnecessary new lines at startup
When the shell start, it will print two lines. The reason for that
behavior is not documented. Remove that to make the code simpler and
shorter one line at a time.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Théo Battrel
e34542a3de Shell: Make full_line_cmd return false on empty lines
The fact that the function was returning `true` for empty line was an
unexpected behavior according to the name of the function itself and how
it was used elsewhere.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-27 18:37:28 -04:00
Jose Alberto Meza
e2b34b96e3 soc: microchip: mec172x: Add CPU barriers during low power entry/exit
Follow ARM architecture recommendations:
* Use Data Synchronization Barrier (DSB) instruction before WFI,
to ensure that pending memory transactions complete before
changing state.

* To guarantee pend interrupts are recognized before subsequent
operation, use ISB after CPSIE (__irq_enable)

This prevents sporadicy delayed ISRs due to continous MEC172x
entering/exiting deep sleep.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-08-27 18:37:11 -04:00
Felipe Neves
419edffabf boards: arduino_nicla_vision: add Arduino Nicla Vision
Initial board support and documentation.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-27 18:36:21 -04:00
Daniel Leung
c4e3afe621 tests: logging/dictionary: limit allowed platforms
Instead of using filter (which is expensive in terms of CI as
it needs to run cmake on everything to get the full kconfigs
before filtering can be done), change that to a curated list
of allowed platforms. This avoids the expensive filtering
operation, yet can still run on some emulated platforms to
verify the dictionary output.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-27 15:21:31 -04:00
Ian Morris
a329a0c09f drivers: sensor: tmp116: Add ability to set operating mode of TMP116/7
Adds support for setting the operating mode of the TMP116/7 sensor to
either shutdown, continuous conversion or one-shot mode.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-08-27 15:14:59 -04:00
Nicolas Pitre
6255bf1ef4 arch/arm64/mmu: allow partial unmap of block mappings again
Before commit baa70d8d36 ("arch/arm64/mmu: fix page table reference
counting part 2")  it was possible to perform a partial unmap of a block
mapping. Restore that ability and provide a test case to validate it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-27 15:14:43 -04:00
Jordan Yates
6bfd7a4302 sd: resend CMD0 before each CMD8
Resend CMD0 before each CMD8 query while initialising the card, as the
first CMD0 is not always sufficient to recover the card.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 15:14:23 -04:00
Emil Gydesen
3e9197a58a Bluetooth: Mesh: Rename mesh test primitives
Since testing.c/h was moved to mesh, all functions and
structs in those files now follow a bt_mesh_test_*
naming scheme to be consistent with the naming in Zephyr.

Due to missing includes in many files, this commit also
added some that were missing in order to build since
the order of includes have changed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 15:14:08 -04:00
Emil Gydesen
f1b182b585 Bluetooth: Mesh: Move testing.h to mesh subsys instead of include
The file is only ever used by mesh and it is even stated in the
header of the file that it is internal APIs.

The include file has been merged with the host testing.h file
as that was mesh specific as well. Similarly the testing.c
file was also moved

This is part of a process to clean up the file structure of
Bluetooth as it's a bit messy, which is evident from the
MAINTAINERS.yml file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 15:14:08 -04:00
Dmitrii Golovanov
87c1e2a40f twister: Group test plan reporting options
Re-arrange Twister command line options for test plan reporting
to a dedicated group with mutally-exclusive options to reflect
actual implementation and its dry-run execution mode.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-27 15:13:52 -04:00
Benjamin Cabé
774fd8b328 samples: cpp: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Benjamin Cabé
1b66353a8d samples: posix: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Benjamin Cabé
9902eec01b samples: application_development: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:13:43 -04:00
Dmitrii Golovanov
ec7b42a19f tests: timer_behavior: align saleae package requirements
Align python package versions to saleae/grpc/saleae.proto
new requirements.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-27 15:12:59 -04:00
Benjamin Cabé
cca08c3690 boards: samples: drop support for Google Kukui EC
Drop support for Google Kukui EC board which was used for
early Zephyr experiments but doesn't really exist anymore.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-27 15:12:44 -04:00
HaiLong Yang
1be85d1854 maintainers: update gd32 platforms maintainer
Update myself as a collaborator. Currently, I don't have much time
to work on the GD32 platform.

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2024-08-27 15:12:21 -04:00
Anas Nashif
4077249cc7 ci: rerun issue check on PR edit
Re-run issue check when a PR is updated, i.e. when someone adds
'Fixes...` to the PR body.

This is mostly for release branches and has no effect on main branch.

Also, add concurrency check in the workflow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-27 11:33:55 -04:00
Mariusz Dziębowski
b7bf2091f8 zbus: fix error on ZBUS_CHAN_DEFINE
There appear error on `ZBUS_CHAN_DEFINE` when `CONFIG_CPP`
is enabled. Error: `zephyr/zbus/zbus.h:352:9: error: designator
order for field 'zbus_channel_data::highest_observer_priority'
does not match declaration order in `zbus_channel_data`.

Solution: change order in `ZBUS_CHAN_DEFINE` macro according
to zbus_channel_data structure.

Signed-off-by: Mariusz Dziębowski <mdziebowski@meden.com.pl>
2024-08-27 10:51:15 -04:00
Ayush Singh
348388b678 drivers: cc13xx_cc26xx: pwm: Add polarity flag support
- Allow setting polarity from DT.
- At least on bcf, going from 0 to 255 causes brightness to decrease
  (although 0 is still off and 255 is still on).
- Seems to work as expcted by using TnPWML register.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-08-27 10:51:04 -04:00
Laurentiu Mihalcea
e224a41ec8 drivers: dai: sai: don't crash on underrun/overrun
TX/RX FIFO underrun shouldn't crash the RTOS when it occurs.
Also, since this can also happen under "normal" conditions
(i.e: DMA doesn't copy data fast enough from/to SAI's FIFOs)
the software should be able to recover from it.

As such:
	1) Remove `z_irq_spurious()` call.
	2) Clear error flag
	3) De-escalate error message to warning message

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-27 10:50:53 -04:00
Mathieu Choplain
e4a7c0f9ce drivers: intc: stm32: rebrand EXTI API to be hardware-agnostic
This commit rebrands the STM32 EXTI API to a more hardware-agnostic
"GPIO interrupt controller" API, in anticipation of the introduction of
new series lacking the EXTI peripheral. The GPIO and EXTI drivers are
updated to match the rebranded API.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
5cd274ce48 drivers: intc: stm32: make stm32_exti_line_t opaque
This commit makes the contents of the stm32_exti_line_t data type opaque to
the EXTI GPIO interrupt controller API users. The GPIO driver is updated
to comply with this API change.

N.B.: while some assertions are removed as part of this commit, they were
broken since forever anyways, so nothing of value is lost.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
0551825ca3 drivers: gpio: stm32: move EXTI line port configuration to proper driver
Move the functions that interact with EXTI configuration registers to
select or get the GPIO port that triggers events on a given EXTI line
to the EXTI driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
d34f5f27bf drivers: gpio: stm32: move EXTI clock initialization to proper driver
Move the EXTI clock initialization from GPIO to EXTI driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
d0f528e933 drivers: gpio: stm32: modify EXTI configuration functions
Modify all functions in the GPIO driver that interact with the EXTI
so that names, signatures and comments match what they do better.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
ea09463b7f drivers: gpio: stm32: use types with correct semantics
Use the `gpio_pin_t` type for all variables that hold a pin number (0..15).

Change all `int` to `uint32_t` instead, as signedness is unwanted.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
e4238191ab drivers: intc: stm32: rework comments in API header
Rework and enhance all comments in the EXTI driver API header.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
e2c4b3eb34 drivers: intc: stm32: reorder functions in EXTI driver
This commit reorders the functions in the EXTI driver.
Internal functions and exported functions are now grouped with each other.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
5e5974a0f9 drivers: intc: stm32: comsetic changes in EXTI driver
Update comments, rename STM32_EXTI_INIT_MACRO, correct whitespace.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
988ccae7a5 drivers: intc: stm32: use unsigned types for API
This commit changes the EXTI driver API to use unsigned types
for all parameters previously typed as `int`, as the signedness
is unneeded and unwanted.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
784d05bfa4 drivers: intc: stm32: fix assertions in EXTI driver
All assertions performed in the EXTI drivers were wrong, as they passed
values to __ASSERT_NO_MSG instead of predicates. Update all assertions
to be actually useful.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Mathieu Choplain
b1b85fcf48 drivers: intc: stm32: remove STM32_EXTI_LINE_NONE macro
The EXTI driver API defined in exti_stm32.h is reserved for exclusive usage
by the STM32 GPIO driver, which doesn't use this macro. Since there is no
usecase for it anyways, it can be removed for future-proofing.

The STM32 UART driver is an unintended user of this definition, however.
Replace it with a private #define which is more appropriate anyways.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-27 10:50:39 -04:00
Dat Nguyen Duy
8bbcab485d docs: gptp: add mention ClockSourceTime interface is supported
Update the docs to reflect that ClockSourceTime interface is supported

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-08-27 10:50:25 -04:00
Torsten Rasmussen
35e28e6315 scripts: handle auto defined ZEPHYR_<name>_MODULE settings in compliance
Update check_compliance to handle auto defined ZEPHYR_<name>_MODULE
Kconfig symbols.

check_compliance runs three levels of Kconfig check.
A basic and a full, both which uses the generated Kconfig.modules
created according to Zephyr modules present.

A Kconfig check where no Zephyr modules are sourced. This check ensures
that Zephyr Kconfig tree doesn't refer to Kconfig symbols defined in
Zephyr module's local Kconfig trees.

However, there are a few auto generated symbols which are allowed,
such as: `ZEPHYR_<name>_MODULE` and `ZEPHYR_<name>_MODULE_BLOBS`.

Therefore, when testing no blobs, filter the generated Kconfig.modules
file, so that no sourcing of extra Kconfig files are performed but
lines defining `ZEPHYR_<name>_MODULE` and `ZEPHYR_<name>_MODULE_BLOBS`
are preserved.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-27 10:50:08 -04:00
Richard Wheatley
1aebfcdb99 drivers: serial: UART PL011 Ambiq PM Fix
apollo3 driver added PM to UART for only apollo3
but defined PM function for both causing an error
in twister

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-27 10:49:38 -04:00
Emil Gydesen
095d1d75e2 MAINTAINERS: Exclude BT ISO from BT Host
Changes to ISO files should only get the BT ISO label
and not the BT host label.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-27 10:49:24 -04:00
Sven Ginka
63f8f7ff2a scripts: RISCV instruction SEPC
In RISCV "sepc" is actually the name of an instruction.
As this prevents building. We should remove the line.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2024-08-27 10:48:58 -04:00
Filip Kokosinski
77cec9d935 tests: kernel.common.stack_sentinel: exclude m2gl025_miv
This commit excludes the `m2gl025_miv` platform from running the
`kernel.common.stack_sentinel` test. It experiences the same issue as
`hifive1`, which was described in issue #66070.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-27 10:48:44 -04:00
Jordan Yates
7b4e7ff9ed flash: spi_nor: handle SPI bus power
Automatically request and release the SPI bus before talking to the
flash chip.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Jordan Yates
986fd88416 flash: spi_nor: automatically run device runtime PM
Automatically handle device runtime PM for all flash API calls.
Asynchronously release the device after a small delay to minimise power
state transitions under multiple sequential API calls (e.g. NVS).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Jordan Yates
6487a2a663 flash: spi_nor: remove SPI_NOR_IDLE_IN_DPD
Remove `SPI_NOR_IDLE_IN_DPD` to simplify the possible transition states
in the `spi_nor` driver. This option was originally added 5 years ago
when device runtime PM was in a much less mature state.

I do not believe having a separate power management implementation for
this one in-tree driver is in the interests of the project.

The behaviour of `SPI_NOR_IDLE_IN_DPD` leads to extremly suboptimal
behaviour in use cases where multiple small reads are performed
sequentially, see #69588.

Removal of this option does not break the behaviour of any existing
applications, only increases current consumption in idle by ~10uA until
device runtime PM is enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-27 07:15:28 -04:00
Szymon Janc
77cbd27a80 bluetooth: gatt: Fix ATT Read By Type by DB change unaware client
When change unaware client send ATT request it shall get Database
Out of Sync error. Reading GATT database hash is an exception here.

This was affecting GATT/SR/GAS/BV-05-C qualification test case.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-27 07:14:59 -04:00
Quy Tran
d1d42ec7f3 dts: bindings: clock: Change clock control binding for Renesas RA
Background of this modification is to make clock control
driver code provided by Renesas vendor to support for Renesas MCU
on Zephyr.

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
2bafb83771 boards: renesas: Add initial support for EK-RA4W1 board
Initial commit to support Renesas EK-RA4W1 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
6e6403d4cb soc: renesas: Add initial support for RA4W1 SOC
Initial commit to support Renesas RA4W1 SOC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
d95ebf90b9 boards: renesas: Add initial support for EK-RA4M3 board
Initial commit to support Renesas EK-RA4M3 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
41e140d781 soc: renesas: Add initial support for RA4M3 SOC
Initial commit to support Renesas RA4M3 SOC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
7638952f03 boards: renesas: Add initial support for EK-RA4M2
Initial commit to support Renesas EK-RA4M2 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
73848437b3 soc: renesas: Add initial support for RA4M2 SoC
Initial commit to support Renesas RA4M2 Soc

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
5663c885e7 boards: renesas: Add initial support for EK-RA4E2 board
Initial commit to support Renesas EK-RA4E2 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-27 07:08:19 -04:00
Quy Tran
81b83902cf soc: renesas: Add initial support for RA4E2 soc
Initial commit to support Renesas RA4E2 SoC

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-27 07:08:19 -04:00
Armando Visconti
9ea4cb96cd drivers/sensor/st: Fix wrong data byte swap for be
A 16-bit value built using byte shifts and ORs from a given
couple of lsb and msb bytes will result to be the same on both
little-endian and big-endian architectures, e.g.

    uint8_t lsb, msb;
    int16_t val;

    /* val is the same number on both le and be archs, but has
       different layout in memory */
    val = (msb << 8) | lsb;

All the xyz_raw_get() APIs of stmemsc sensor module build the sensor
data using the above method and DO NOT hence require (it actually leads
to wrong values on big-endian machines) to use any le/be swap routines,
such as sys_le16_to_cpu().

Fix #75758

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-27 07:07:52 -04:00
Emilio Benavente
cdfa11ee94 drivers: counter: mcux_lptmr: Updated lptmr to support multi instance.
Updated the counter_mcux_lptmr driver to support multiple
instances of the lptmr peripheral. Also added a new
binding property to identify if the user is using
counter-mode or pulse mode. since we were previously using the
prescaler value to check this which could be wrong
if used as a division value for getting the freq.
Added a property that allows the user to decide
what the counter value in lptmr should be divided by.
Cleaned up INIT macro for lptmr.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-08-27 12:46:11 +02:00
Lucien Zhao
edfeedfcd9 boards: nxp: mimxrt1180_evk: Set GPT2 status as ok
Set GPT2 status as ok for cm33 and cm7 core
Update feature guide description

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-27 12:46:00 +02:00
Lucien Zhao
e4341a40c3 soc: nxp: imxrt: imxrt118x: Enable GPT1/2 clock
dts: arm: nxp: mimxrt1180_evk: add GPT1/2 instance into devicetree

Enable GPT1/2 clock
Add GPT1/GPT2 instances
Set GPT2 as a counter, the default frequency is 240000000

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-27 12:46:00 +02:00
Thorsten Spätling
5ce7845f71 mipi_dbi: stm32: use proper type for timeout argument
The reset function uses uint32_t as its 2nd parameter, which leads to the
following compiler warning.

zephyr/drivers/mipi_dbi/mipi_dbi_stm32_fmc.c:176:18: warning:
  initialization of 'int (*)(const struct device *, k_timeout_t)' from
  incompatible pointer type 'int (*)(const struct device *, uint32_t)'
  {aka 'int (*)(const struct device *, unsigned int)'}
  [-Wincompatible-pointer-types]
  176 |         .reset = mipi_dbi_stm32_fmc_reset,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~

When you look at similar drivers,

/drivers/mipi_dbi/mipi_dbi_smartbond.c#L126
/drivers/mipi_dbi/mipi_dbi_nxp_lcdic.c#L561

you notice they use k_timeout_t.

So the whole fix is to correct the type.

Signed-off-by: Thorsten Spätling <thorsten.spaetling@vierling.de>
2024-08-27 12:45:48 +02:00
Tomasz Moń
0f41950564 usb: device_next: Respect granularity in UDC buf pool define
Round up buffer size used in UDC_BUF_POOL_DEFINE() to respect the
required buffer granularity. The issue was observed with UAC2 explicit
feedback data, but the problem applies to any UDC_BUF_POOL_DEFINE() use.

In order for every buffer returned by UDC_BUF_POOL_DEFINE() to be both
aligned and to have required granurality, it is required to allocate the
buffers for ROUND_UP(size, LCM(UDC_BUF_GRANULARITY, UDC_BUF_ALIGN)).
Because we do not have Least Common Multiple nor Greatest Common Divisor
compile time macros, assume that granularity is multiple of alignment.
Validate the assumption with a build time assert. When we get a target
where this assumption fails we would have to come up with a solution to
compute LCM and/or GCD at compile time.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
debc744665 drivers: udc_dwc2: Allow not-multiple-of-4 mps in DMA mode
Remove the early max packet size check on endpoint activation, because
there are valid use cases where the max packet size is not multiple of 4
and the stack won't perform multi-transaction transfers. Example use
case is UAC2 explicit feedback endpoint that has Max Packet Size equal
3 when device is operating at Full-Speed.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
0b242dea42 drivers: udc_dwc2: Do not enable inactive endpoint
Fail TxFIFO write if the endpoint is not activated, because there is
essentially no fifo assigned. Writing to not activated endpoint is
possible, but it does tend to corrupt fifo number 0 which is used for
control transfers. USB stack should not really be attempting to write to
endpoints that have not been activated (ep_enable called).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
c3daf6f220 drivers: udc_dwc2: Support isochronous endpoints
Store SOF frame number and use the information to set the Even/Odd
microframe bit when enabling isochronous endpoints. Reject received
isochronous data if number of packets received does not align with
received PID.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
de28a828c5 drivers: udc_dwc2: Unify OUT transfers in Completer and DMA mode
RxFLvl interrupt should only handle the actual data movement from RxFIFO
to the buffer. OUT transfers are completed in XferCompl handler both in
DMA and Completer mode. This reduces code size by avoiding having
separate code paths based on operating mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
31ee5d9787 drivers: udc_dwc2: Pass fifo number to tx fifo flush
Function dwc2_set_dedicated_fifo() calls dwc2_flush_tx_fifo() before the
diepctl register is written. The register will be only written after the
dwc2_set_dedicated_fifo() finishes. Solve the problem by passing fifo
number directly instead of endpoint address to dwc2_flush_tx_fifo().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
9f98ee854c drivers: udc_dwc2: Add isochronous register bit defines
Add all register bit defines necessary for isochronous transfers. Clean
up the endpoint transfer size register defines clearly separating IN and
OUT registers because they do use different bit fields. Add alternate
bit names for bits that do have different meaning based on configured
endpoint transfer type.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Chaitanya Tata
29921bbf92 manifest: hal_nordic: Pull fix for FW blobs path
Fixes west blobs fetch.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-27 12:45:35 +02:00
Pieter De Gendt
fda5ca34c2 scripts: ci: Fix clang-format notice at file beginning/end
The clang-format check outputs a git diff with surrounding context. It
naively removed the first and last 3 lines, but this does not work if
there are less lines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-27 12:45:21 +02:00
Henrik Brix Andersen
15f5e2de07 boards: st: nucleo_h723zg: enable fdcan1
Enable FDCAN1 on the ST Nucleo H723ZG development board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-27 12:45:15 +02:00
Kapil Bhatt
b9ef207ee1 net: wifi: Display rts threshold in wifi shell
Add a new offload API to get rts threshold and
display to the user in wifi shell.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-27 12:45:02 +02:00
Andrej Butok
c1fe3150e9 runners: pyocd: Add support for .elf files to the pyocd flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the pyocd runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-27 12:44:55 +02:00
Yong Cong Sin
fd1be9849c shell: shell_help: fix width for subcommands help text
The terminal offset for subcommands' help text isn't
computed correctly, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Yong Cong Sin
276ccd04e7 shell: devmem: minor optimizations
- Use `SHELL_CMD_ARG_REGISTER` for the main cmd to state the
  required number of arguments, this helps to remove the
  runtime check from the command, and also print the help
  message to the terminal when the argument count is
  unexpected.
- Some changes to the help text that hopefully makes the
  mandatory and optional arguments more obvious to the user

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Daniel DeGrasse
ff7ac415d7 drivers: mipi_dbi: nxp_lcdic: calculate reset delay correctly
Reset delay was not being calculated correctly in lcdic driver, the
ticks field needs to be accessed directly within the timeout structure
to calculate the correct delay time

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:38 +02:00
Anas Nashif
b2a9fca9c8 ci: twister: remove reference to opensearch
We have been using elasticsearch for a while now. Remove references and
old script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-27 12:44:31 +02:00
Daniel DeGrasse
138e9591f8 tests: net: wifi: exclude RW612 based boards
Exclude RW612 based boards from the WiFi testsuite, as these boards
require binary blobs be downloaded in order to build as expected

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:22 +02:00
Jilay Pandya
19203c2655 MAINTAINERS: add maintainer for stepper api and driver
This commit adds stepper api and drivers to maintainers.yml

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
179f990e46 tests: drivers: stepper: build all
This commit introduces preliminary build all test for stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Fabian Blatz
32390d55ab doc: stepper: Add Stepper motor controller documentation
Added stepper motor controller documentation entry to peripherals.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
4f36fa8010 stepper: driver: introduce gpio driver
This commit introduces a basic gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
1af0ec1d96 stepper motor controller: introduce api
This commit introduces api for stepper motor controllers

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Signed-off-by: Florian Guhl <florian.guhl@zeiss.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Emil Gydesen
eaf92a1494 tests: Bluetooth: CAP: Initiator unicast start unittests
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-26 17:27:36 -04:00
Jordan Yates
d97cc46bdd gnss: rename u-blox M10 driver to M8
The driver in tree is for u-blox M8 devices, not M10. The M10 series
devices (from Protocol Version 23.01) use a different, non backwards
compatible interface for configuring the modem behaviour.

Of the two boards tested in the original PR, the "VMU RT1170" is
explicitly listed as having a u-blox NEO-M8N modem, while I have
been unable to find any information online about the "FMURT6" board.

Leaving the naming as-is will cause problems when M10 drivers are
contributed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:27:12 -04:00
Alexi Demers
bf41e53e00 disk: disk_access: changed mutex for a spinlock
disk_access functions were called from an interupt context, thus
crashing on mutexes (no sleep is allowed in interrupt context).
The usage of a spinlock is permitted. The functions guarded by
the spinlock are executed very quickly anyway, so the spinlock
is applicable.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Alexi Demers
32481b6418 usb: fix wrong capacity report for USB mass storage device
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.

Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Lucien Zhao
15a2ec66a8 dts: arm: nxp_rt118x: Complement full LPUART/GPIO devices and ocram spaces
Complement full LPUART and GPIO devices, and ocram spaces

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-26 17:26:02 -04:00
Nicolas Pitre
c9aa98ebc0 kernel: mmu: support for on-demand mappings
This provides memory mappings with the ability to be initialized in their
paged-out state and be paged in on demand. This is especially nice for
anonymous memory mappings as they no longer have to allocate all memory
at mem_map time. This also allows for file mappings to be implemented by
simply providing backing store location tokens.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:25:41 -04:00
David T. Pocock
b2475804f8 serial: bluetooth: Print warning once when ring buffer is full
This avoids cluttering the logging subsystem.

Signed-off-by: David T. Pocock <davidtpocock@gmail.com>
2024-08-26 17:24:47 -04:00
Pisit Sawangvonganan
2f4ca35105 drivers: gpio: renesas_ra_ioport: simplify pin configuration logic
- Removed zero initialization of `pincfg` structure as all members
  are guaranteed to be set.
- Introduced `pfs_cfg` as an intermediate variable to store data in
  the CPU register instead of stack.
- Simplified pin setting logic by relying on `pfs_cfg` being
  zero-initialized, eliminating the need for explicit bit clearing.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-26 17:23:31 -04:00
Fabio Baltieri
947ff45e7a input: kbd: add power management support to all keyboard scan drivers
Add power management support to various drivers:
- gpio-kbd-matrix
- ite,it8xxx2-kbd
- nuvoton,npcx-kbd
- microchip,xec-kbd

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-26 14:45:21 -04:00
Fabio Baltieri
eff584bf2d input: kbd_matrix: add power management support
Add power management support to the keyboard matrix library. This
provides a generic pm_action function that changes the keyboard matrix
scan in two places when suspended:
- reset the state to 0 for all columns
- do not enable key press detection

This ensures that any key that was pressed when the device is suspended
is released, and no other scan happens until the device is resumed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-26 14:45:21 -04:00
Peter Mitsis
ee7bbf55e0 tests: latency_measure: Add busy threads for SMP
The latency_measure benchmark is designed for systems with a single
CPU. When the system allows for multiple CPUs, instead of forcing
a single CPU to be used via 'prj.conf', spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-26 14:45:04 -04:00
Yong Cong Sin
57651fca01 doc: releases: update changes about arch_stack_walk()
Update changes about `arch_stack_walk()` in RISCV, ARM64 & X86.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
74f46bd421 arch: riscv: stacktrace: print additional arg when fatal error
Print `sp`/`fp` in traces.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
074931057c subsys/debug: remove CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
Having `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` to select the
`CONFIG_SYMTAB` or to explicitly not print the symbol name
during exception stack unwind seems unnecessary, as the extra
code to print the symbol name is negligible when compared with
the symbol table, so just remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
ab676fdb86 arch: arm64: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Also, `EXCEPTION_STACK_TRACE_MAX_FRAMES` is unused and
made redundant after this change, so remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
06a8c35316 arch: x86: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
6fae891c7e arch: reorg the dependencies around (exception) stack trace
This commit introduces a new ARCH_STACKWALK Kconfig which
determines if the `arch_stack_walk()` is available should the
arch supports it.

Starting from RISCV, this will be able to converge the exception
stack trace implementation & stack walking features. Existing
exception stack trace implementation will be updated later.
Eventually we will end up with the following:

1. If an arch implements `arch_stack_walk()`
   `ARCH_HAS_STACKWALK` should be selected.
2. If the above is enabled, `ARCH_SUPPORTS_STACKWALK` indicates
   if the dependencies are met for arch to enable stack walking.
   This Kconfig replaces `<arch>_EXCEPTION_STACK_TRACE`
2. If the above is enabled, then, `ARCH_STACKWALK` determines
   if `arch_stack_walk()` should be compiled.
3. `EXCEPTION_STACK_TRACE` should build on top of the
   `ARCH_STACKWALK`, stack traces will be printed when it
   is enabled.
4. `ARCH_STACKWALK_MAX_FRAMES` will be removed as it is
   replaced by `ARCH_STACKWALK_MAX_FRAMES`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
e0770d4557 arch: document arch_stack_walk()
Add `arch_stack_walk()` under the `arch-interface` group and
add documentation on how to add support for it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Raffael Rostagno
3968753b63 boards: doc: esp8684_devkitm: Update with wifi support
Update board document indicating wifi support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Raffael Rostagno
91f8487845 wifi: esp32c2: Add support
Added wifi support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Raffael Rostagno
77d25a48e8 west.yml: Update for ESP32C2 wifi support
Updates hal_espressif for ESP32C2/ESP8684 wifi support

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Pieter De Gendt
1f7c9605cb scripts: Minimum clang-format version
Set the minimum supported clang-format version to v15.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-26 14:39:02 -04:00
Vinayak Kariappa Chettimada
f05d16dabb Bluetooth: Controller: Fix missing Broadcast ISO Sync MIC failure
Fix missing implementation to handle Broadcast ISO MIC
failure during Broadcast ISO establishment, and during an
already established Broadcast ISO sync.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-26 18:52:55 +02:00
Vinayak Kariappa Chettimada
d5da582e00 Bluetooth: Controller: Fix PA setup for ISO Broadcast
Fix missing PA setup for ISO Broadcast subevent transmits.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-26 18:52:42 +02:00
Reto Schneider
a6c8158da5 MAINTAINERS: Add SiM3U maintainer and collaborators
Adding myself as maintainer because my employer Husqvarna wants to
upstream SiM3U support to Zephyr, and keep it well-supported.

Adding as collaborator M1cha, because he did the initial port and
Asmellby, jerome-pouiller, and jhedberg because they take care of
all Silabs products.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
1c8a15867e boards: silabs: Add SiM3U1xx-B-DK
SiM3U1xx-B-DK is the official development kit offered by Silicon Labs.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
aa3f46cbbf drivers: serial: Add initial SiM3U1xx support
This supports polling and interrupt APIs, but not the async API.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
d8598e8a5d dts: bindings: Add Si32 UART
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
2ab246d17e drivers: gpio: Add initial SiM3U1xx support
This is just the driver for banks 0 to 3. Bank 4 will come via a
separate commit since it needs a different driver.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
bc9fc8ed91 dts: bindings: Add Si32 GPIO
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
d49cc8a56f drivers: clock_control: Add initial SiM3U1xx support
This serves two main purposes:
- change the CPU clock via devicetree nodes
- provide the APB frequency to device drivers via the clock driver
  interface

Theoretically this could also support choosing between the available
clock sources, but right now we only support LPOSC0 going into PLL0,
going into AHB.

Turning the PLL back off is also not supported since the only current
use case is to set the PLL frequency, turn it on, and switch the AHB
over to it.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
e1eeefea84 dts: bindings: Add Si32 clocks
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
5a1c4cd2e9 soc: Add initial SiM3U1xx support
This is the bare minimum and includes the SoC, pinctrl, flash and
devicetree.

I had to include the flash driver that early because I couldn't make
Zephyr compile without flash driver nodes in the device tree.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
2e1a87543c drivers: flash: Add Si32 support
Can be used only once the SiM3U SoC support has been added.

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
a6737ba864 dts: bindings: Add Si32 flash controller
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
f64182dc7d dts: bindings: Add Si32 pinctrl
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
3be0fef64a manifest: hal_silabs: Update HAL version
This bumps the hal_silabs in order to add initial support for SiM3U
SoCs.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
9673cd14f4 soc: silabs: Simplify logic
This makes it easier to add non-gecko SoCs.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Anuj Pathak
1f05d03489 Drivers: Sensor: mc3419: Moved Decimation Rate config to DT
- Similar to LPF settings decimation rate could be applied to
per instance basis, thus moved to DT prop

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
Anuj Pathak
932e207741 Drivers: Sensor: mc3419: Added LPF CutOff select using dt
For applications that rely on low noise/variance in accelerometer
sample reading. Application can take advantage of integrated LPF
Thus this PR adds LPF configuration capability to the mc3419 driver

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
Jonathan Rico
4ab8073b87 tests: Bluetooth: disable optimizations in unit test
Very very weird behavior.

Deleting the `options & BT_LE_ADV_OPT_USE_NRPA` branch in
`id.c:bt_id_set_adv_own_addr` makes the test pass. But add a log in that
branch, and you'll see that we never take it in the UT binary..

I don't have time for this, maybe some compiler guru or C language
lawyer can look at that decompiled function and figure out the root
cause.

Someone should also really fix the Bluetooth unit tests and make them
run on any Bluetooth related PR. Also nightly.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-26 18:51:11 +02:00
Johan Hedberg
5736b71193 Bluetooth: Host: Fix incorrect build assert
We want to make sure `struct closure` fits in the user data, so a user data
size of `sizeof(struct closure)` is valid.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-26 18:51:11 +02:00
IBEN EL HADJ MESSAOUD Marwa
4215078617 boards: st: Add stm32u083c_dk board support
Add board support for stm32u083c_dk

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
0b5e915b9d boards: st: Add nucleo_u083rc board support
Add board support for nucleo_u083rc

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
0cebee5ae7 drivers: clock_control: Add stm32u0 clock control support
Reuse the file clock_stm32g0.c for the STM32U0 and
rename it to clock_stm32g0_u0.c
because the G0 and U0 series share the same clock control.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
d7db52feb2 drivers: flash: flash_stm32: Fix log warning
Cast the argument to "unsigned long" to avoid the
warning

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
a0c1ca409e soc: st: stm32: Add serie stm32u0
Add STM32U0 familly support

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
1ac85d3492 drivers: hwinfo: stm32u0: Clear standby and stop flags
Add the function that clear standby and stop flags

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
ece8001d76 dts: bindings: clock: Add binding for stm32u0
Add binding "st,stm32u0-pll-clock" for U0 clocks.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
db4f90fa2a include: zephyr: Add the stm32u0 clock control and the reset register
Add the stm32u0 clock control and the RCC bus reset register offset

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
1e5b2eb235 dts: arm: st: add stm32u0 support
Provide support for the familly STM32U0 and ST32U083

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
b340abadfe west.yml: hal_stm32: Add STM32Cube package of the familly stm32u0
Add STM32U0 pinctrl.dtsi and HAL-LL files

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
Tomasz Moń
d3e1bc8b59 samples: usb: add UAC2 implicit feedback sample
The sample illustates how to achieve bidirectional asynchronous audio.
Implicit feedback is the only way to achieve asynchronous USB headset
on devices that have only one isochronous IN and one isochronous OUT
endpoint.

The sample implements stereo playback and mono recording. While it would
be possible to have stereo recording, the commonly available headsets
are mono only. The number of channels can differ between audio sink and
source because the only requirement is that the two run on same clock.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-26 11:27:30 -04:00
Lluis Campos
1973bc565f samples: subsys: nvs: Print rc on errors
So that the user gets a hint of what the problem can be.

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-08-26 17:08:32 +02:00
Sebastian Głąb
ffd065f93e tests: drivers: flash: Move negative tests to a separate project
Move negative tests for flash driver to a separate test suite.
Run negative tests only on platforms that are aligned.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-26 17:08:19 +02:00
Daekeun Kang
b24c5201a0 net: fix handle unaligned memory access in net_context_bind()
This commit addresses an issue in net_context_bind() where unaligned
memory access was not properly handled when checking for INADDR_ANY.
The problem primarily affected MCUs like ARMv6 that don't support
unaligned memory access.

- Use UNALIGNED_GET() to safely access the sin_addr.s_addr field
- Ensures correct behavior on architectures with alignment restrictions

This fix improves compatibility and prevents potential crashes or
unexpected behavior on affected platforms.

Signed-off-by: Daekeun Kang <dkkang@huconn.com>
2024-08-26 17:08:08 +02:00
Jukka Rissanen
5b41ea7863 net: ipv6: Do not print error for non-erros for incoming NS
If we receive incoming neighbor solicitation packet and drop
it for some reason, ignore some of the errors which are not
really errors so that the icmpv6 handler does not complain.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Jukka Rissanen
9c5e59085d net: ipv6: Allow incoming DAD NS message
Make sure that incoming DAD NS message is allowed in
so that we can detect duplicate address detection NS packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Nicolas Pitre
57b2eaa09b demand_paging: LRU eviction: add missing documentation
Document missing eviction algorithm interface functions, and mention LRU.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:07:49 +02:00
Reto Schneider
7f1c3d1841 twister: runner: j-link: Fix parameter passing
To specify the serial number, JLink expects either one argument
('--dev-id=xxx') or two (e.g. '--dev-id' 'xxx'), but it can not deal
with a single one that is '--dev-id xxx'.

The problem has been introduced (or just made visible?) by commit
5ee4284320 (twister: runner: j-link: use
dev-id instead of SelectEmuBySN) in PR #76931.

How to reproduce:

1. Create a HW configuration map, e.g.:

```
$ cat zephyr-hw-map-nrf52840dk-1.yml
- connected: true
  id: '683517317'
  platform: nrf52840dk/nrf52840
  product: nRF52840 DK 1
  runner: jlink
  serial: /dev/ttyACM-nrf-dk-1
```

2. Run test `logging.dictionary` with Twister:

```
$ west twister --platform nrf52840dk/nrf52840 --device-testing \
  --hardware-map zephyr-hw-map-nrf52840dk-1.yml -s logging.dictionary
```

3. The build will fail, and the `twister_harness.log` contains:

```
10:21:24.375:DEBUG:twister_harness.device.factory: Get device type
  "hardware"
10:21:24.375:DEBUG:twister_harness.device.hardware_adapter: Opening
  serial connection for /dev/ttyACM-nrf-dk-1
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  device 683517317
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  command: <snip>/bin/west flash --skip-rebuild --build-dir
  twister-out/<snip>/tests/subsys/logging/dictionary/logging.dictionary
  --runner jlink '--dev-id 683517317'
10:21:24.590:ERROR:twister_harness.device.hardware_adapter: Could not
  flash device 683517317
10:21:24.592:DEBUG:twister_harness.device.hardware_adapter: Closed
  serial connection for /dev/ttyACM-nrf-dk-1
```
(note the '--dev-id 683517317' part)

4. Running the stated `west flash` command shows the following error
   message:

```
-- west flash: using runner jlink
FATAL ERROR: runner jlink received unknown arguments: ['--dev-id
  683517317']
```

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 17:07:40 +02:00
Benjamin Cabé
b3776ca97c doc: fix issue with keydown/keyup being ignored
Ensure initial search menu visibility is properly set so that key
events don't get trapped preventing arrow key navigation on the
document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-26 11:07:30 -04:00
Lluis Campos
7075c69419 doc: esp32: Update board identifier
Clears CMake warning:
```
Deprecated BOARD=esp32_ethernet_kit specified, board automatically changed
  to: esp32_ethernet_kit/esp32/procpu.
```

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-08-26 11:06:55 -04:00
Florian Grandel
9d1874f7f9 net: capture: enable capturing of IPv6/v4 only
Net capturing would not link when either IPv6 or IPv4 was switched off
due to missing symbols. This change allows for capturing a single IP
protocol only.

To reproduce:

samples/net/sockets/http_client/prj.conf
```
-CONFIG_NET_IPV4=y
+CONFIG_NET_IPV4=n
-CONFIG_NET_CONFIG_NEED_IPV4=y
+CONFIG_NET_CONFIG_NEED_IPV4=n
+
+CONFIG_NET_CAPTURE=y
```

This will cause the following linker error:
```
.../subsys/net/lib/capture/capture.c:648:
    undefined reference to `net_if_ipv4_get_ttl'
```

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
c19feadbdb net: l2: ieee802154: 6lo_fragment: improved error message
Improved error messages, especially the fragment cache message that
occurs very often.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
d4729dfa36 net: l2: ieee802154: mgmt: improved logging
Improved debuggability of IEEE 802.15.4 network management commands.
Some of these conditions were especially hard to debug (e.g. invalid
channels due to the wrong driver being selected, conflict between
settings, ...)

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
0e6769719c samples: net: http_client/server: add IEEE 802.15.4 support
Adds overlays to support HTTP over IEEE 802.15.4 (including SubG for a
sample SoC).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
adbbf05b19 samples: net: http_client/server: add logging boilerplate
Added some additional useful logging configuration for convenience
(default: off).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
bc1b85c47f samples: net: http_client: increase resource requirements
Low throughput links (e.g. IEEE 802.15.4) require additional stack and
buffering resources. Therefore some stack and buffer pool sizes were
increased to cater for over-the-air scenarios.

Fixes: #77287

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Lucas Tamborrino
9938022eff drivers: video: ov2640: Add 240x240 video format
Add 240x240 RGB format support for OV2640.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-26 17:06:28 +02:00
Laurentiu Mihalcea
2b96bfb2e5 drivers: dma: dma_nxp_sof_host_dma: do cache WB after HOST_TO_MEMORY copy
SOF is designed with the idea that the data transfer
between the host memory and local memory is performed via
DMA. This is not true for imx platform in which the DSP
performs this operation.

Because of the aforementioned design, SOF performs a
cache invalidation operation on the destination memory
region before data is copied further down the pipeline.

For some imx platforms, the destination memory region is
cacheable. As such, some of the data transferred from the
host memory region is held entirely in cache, which means
the RAM and the cache have different data for the same
memory region.

In such cases, performing cache invalidation forces
the DSP to fetch data from RAM instead of the cache, which
means the DSP will read stale data and propagate it further
down the pipeline.

Although not optimal and mostly as a workaround to this issue,
perform a cache WB operation on the destination memory region
to make sure that the cache and the RAM hold the same data.
During the data read operation (to copy it further down the
pipeline) after the aforemention cache invalidation, the DSP
will no longer end up reading stale data.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-26 17:06:20 +02:00
Elias Speinle
c4dba39548 drivers: fpga: add driver for renesas slg471X5
add driver for renesas slg471X5

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-08-26 17:06:14 +02:00
Raffael Rostagno
2ea9483009 drivers: spi: esp32c2: esp8684: Add support
Addded support to SPI2 module for ESP32C2 and ESP8684 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 17:06:02 +02:00
Jimmy Zheng
a7096fac7d drivers: interrupt_controller: nuclei_eclic: always use clic common entry
When CONFIG_RISCV_VECTORED_MODE is disabled, CLIC claims interrupts using
CSR 'mnxti' and handles all pending interrupts before exiting the ISR.

When CONFIG_RISCV_VECTORED_MODE is enabled, all interrupts use vector mode
and are claimed automatically. The RISC-V common ISR is used for interrupts
hooked into SW ISR table, but it only handle one pending interrupt per ISR.

This commit enhances CLIC to set vector mode for direct ISRs only and use
the CLIC common entry for regular ISRs to handles multiple pending
interrupts in an ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
d55950c23f drivers: interrupt_controller: nuclei_eclic: support vector mode setting
Implement riscv_clic_irq_vector_set() for Nuclei CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
91e524862d soc: common: riscv-privileged: add riscv_clic_irq_vector_set() for clic
Introduce riscv_clic_irq_vector_set() to implement z_riscv_irq_vector_set()
for CLIC. This commit also introduces CONFIG_CLIC_SMCLICSHV_EXT to indicate
support for the smclicshv extenion and riscv_clic_irq_vector_set().

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
9ec596674b arch: riscv: add z_riscv_irq_vector_set() to set vector ISR
Introduce z_riscv_irq_vector_set() to hook into ARCH_IRQ_DIRECT_CONNECT(),
allowing users to set vector mode for a specified ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jordan Yates
2f143fb2c1 doc: add make html-live and html-live-fast
Add two new commands that automatically locally host the generated
documentation upon completion and rebuild/rehost when the input files
change without any user interaction.

For more info see: https://pypi.org/project/sphinx-autobuild/

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jordan Yates
2e99de8047 doc: conf.py: build directory from environment
Get the output directory from environment variables instead of
attempting to reparse the CLI arguments, as these can actually refer
to a program other than `sphinx-build` (for example `sphinx-autobuild`).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jamie McCrae
09a67ad678 doc: release: 4.0: Add note on new MCUmgr enum mgmt group
Adds a note about this new group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
edee1ed9a0 tests: mgmt: mcumgr: Add enum_mgmt test
Adds a test that checks the functionality of this new management
group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
4f5c6da4e5 doc: mcumgr: Add documentation for SMP group 10 (enum)
Adds documentation for enumeration management group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
e577b140c3 mgmt: mcumgr: grp: Add names to groups when Kconfig is enabled
Adds string names to the groups in MCUmgr when the enum mgmt
Kconfig is enabled to support listing names of groups

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
fc40e836d1 mgmt: mcumgr: grp: Add enumeration management group
Adds a new MCUmgr group which allows for listing which groups are
supported by the MCUmgr server by remote devices.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
b28ccc207d mgmt: mcumgr: mgmt: Add group callback function
Adds a group callback function which can be used to iterate over
all the registered MCUmgr command groups

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Raffael Rostagno
3c19c85b32 drivers: clock_control: esp32c6: Fix for USB/JTAG port
Fixes non-working JTAG port when serial USB is not enabled.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 11:05:19 -04:00
Fabrice DJIATSA
9e4c554487 dts: arm: st: remove clock node from parent node soc
Since the clock node is not a child node of the soc node,
but from the root node.
This removes the warning log at compilation.


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-26 11:05:00 -04:00
Erwan Gouriou
a078b4ee6b drivers: bluetooth: hci: Remove prompt on non user selectable symbols
Most of BT_FOO symbols that are designed to select the hci driver
implementation which will drive the comunication with controller are
selected based on device tree compatible and should not be made available
as an configurable option to the user.
To do this, remove the prompt on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-26 11:04:45 -04:00
Jilay Pandya
f29377a12c mbedtls: remove stray uses of MBEDTLS_ZEPHYR_ENTROPY
This commit replaces stray uses of MBEDTLS_ZEPHYR_ENTROPY with
MBEDTLS_ENTROPY_POLL_ZEPHYR

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-25 11:21:26 +02:00
Jilay Pandya
d08864c4b3 mbedtls: remove stray uses MBEDTLS_ENTROPY_ENABLED
This commit replaces stray uses of MBEDTLS_ENTROPY_ENABLED with
MBED_TLS_ENTROPY_C

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-25 11:21:26 +02:00
Marcin Niestroj
6b8ebeb9d1 samples: sockets: echo_server: test on native_sim/native/64
Add 64-bit platform to allowed, so it is tested by twister.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-24 19:22:42 -05:00
Declan Snyder
5f541431d6 soc: imxrtxxx: Fix flexspi boot issue
FCB was being relocated to the wrong location, and the flexspi clock
setup was not being relocated.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-24 19:22:23 -05:00
Jyri Sarha
746ddccf54 intel_adsp: debug_window: Add slot type for debug-stream transport
Add slot type for debug-stream transport over a debug window slot. For
details see src/debug/debug_stream/debug_stream_slot.h under SOF
sources [1].

[1] https://github.com/thesofproject/sof

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-08-24 19:21:57 -05:00
Anas Nashif
376085c9ed tests: kernel: add missing test call argument
Add missing param argument.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-24 07:17:15 -04:00
Josuah Demangeon
c0f8658254 drivers: video: accept VIDEO_EP_ALL where VIDEO_EP_IN/OUT is given
The current video drivers did not allow VIDEO_EP_ALL to be selected,
as used by video_stream_stop().

This adds the VIDEO_EP_ALL to each video driver that filtered endpoints.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-24 07:17:03 -04:00
Josuah Demangeon
9eb258c7f6 drivers: video: allow to specify individual ep with ID >= 0
This define the enum values so that they never clash with custom
endpoint IDs passed numerically, for devices that supports more
than one IN or OUT enpoint.

This also documents semantics for VIDEO_EP_IN/OUT/ALL/NONE,
while renaming VIDEO_EP_ANY to VIDEO_EP_ALL to remove the
ambiguity when there are several IN and/or OUT endpoints.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-24 07:17:03 -04:00
Valerio Setti
f23d800094 test: mbedtls: new test for PSA crypto initialization and RNG configuration
Add a simple test to showcase how RNG can be configured on different
platforms in order to allow Mbed TLS's PSA crypto implementation to
work properly.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
e26f00fc5f mbedtls: move entropy polling functions to a dedicated file
This commit just moves some code around. For sake of cleanliness
a new file is added to hold the entropy parsing functions
for Mbed TLS.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
5ef44fdd8c mbedtls: add new kconfig for non-CSPRNG sources in psa_generate_random()
This is meant to be used only for tests on platforms where CSPRNG
sources are not available. It should not be used in production.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
6523fb3cb0 mbedtls: improve description of PSA random number generators
Improve the description of both MBEDTLS_PSA_CRYPTO_LEGACY_RNG and
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG kconfig symbols.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
98ddf107fa mbedtls: rename CONFIG_MBEDTLS_ZEPHYR_ENTROPY and move it
- Slightly improve the name of this kconfig adding the suffix
  _POLL in order to highlight that this adds a callback
  function used to poll data.

- Description was also updated to point out that this symbols
  might not only use the (secure) entropy driver, but also
  generic number generators, some of which are not really
  secure.

- The symbol was move from Kconfig to Kconfig.tls-generic because
  this is where MBEDTLS_ENTROPY_C is located and since
  MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
  makes sense if the entropy module is also enabled), we add
  also the "depends on".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
e3e13fb40b mbedtls: rename MBEDTLS_ENTROPY_ENABLED as MBEDTLS_ENTROPY_C
ENABLED suffix does not really makes much sense for a kconfig
so it should be removed. Also other MBEDTLS symbols were recently
updated accordingly.
Moreover having it named exactly the same way as in Mbed TLS
symplifies the understanding of what this kconfig is doing.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Daniel Leung
8d53b506a2 kernel: remove deprecated macro K_THREAD_STACK_MEMBER
Remove the macro K_THREAD_STACK_MEMBER that has been
deprecated since v3.5.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:16:38 -04:00
Simone Orru
ad208e1e7c modules: mbedtls: Enable PEM writing when PEM cert format is selected
Enable the `MBEDTLS_PEM_WRITE_C` mbedtls configuration option when
`CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT` is selected.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-08-24 07:16:25 -04:00
Lucien Zhao
fd1c057f18 boards: nxp: mimxrt1180_evk: change to use hyperram as RAM region
Change to use hyperram as RAM region
Enable external mem kconfig

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00
Lucien Zhao
8077a74621 dts: arm: nxp: add ITCM/DTCM region into linker
add ITCM/DTCM region into linker file

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00
Lucien Zhao
1b90b46f75 soc: nxp: imxrt: support external memory hyperram
add xmcd data section to save xmcd data in linker.ld

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00
Anas Nashif
998f7546a8 doc: kernel: fix doxygen for K_FP_REGS
Move unrelated macro definition up to get doxygen docstring associated
with K_FP_REGS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-24 07:15:58 -04:00
Sylvio Alves
b7b03e5682 soc: esp32: kconfig: add unsupported revision config
ESP32 SoC has multiple revisions, some of which are not supported
by the current implementation, as such as REV0 and REV1. This PR
adds an option to indicate user that this is not recommended and not
supported.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-24 07:15:50 -04:00
Grzegorz Chwierut
892b25aece twister: tests: Add unit test for readline method in handler
Check if lines from serial are processed one by one
in case when was received in one buffer from redline method.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-24 07:15:17 -04:00
Grzegorz Chwierut
79ef0b6b10 twister: scripts: Split lines before processing
Readline method sometimes receives more lines in buffer.
Split them to avoid misinterpreting data in harness module.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-24 07:15:17 -04:00
Daniel Leung
8851891278 doc: clean ENABLED_SECTION option for doxygen
The ENABLED_SECTION option is not a YES/NO option but should
contain a list of section label to be processed. For example,
adding INTERNAL_HIDDEN will make doxygen to look through all
the blocks with "@cond INTERNAL_HIDDEN" and "@endcond". So
just remove the "YES" and leave it an empty list.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:15:07 -04:00
Daniel Leung
dcfdea4aed net: net_pkt: move #ifdef to before doxygen block
This moves the #ifdef to enclose the associated doxygen block.
Or else the function prototype are ignored/skipped but doxygen
still processes the block, and it will apply the documentation
to the next function in the file... and it will complain about
parameters not being found.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:14:57 -04:00
Daniel Leung
2e0a185b72 sys/poweroff: remove extra doxygen group ending command
Remove the extra doxygen group ending command "@}".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:14:57 -04:00
Daniel Leung
b678fcc5c6 serial: fix doxygen tag typo
@briref -> @brief.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:14:57 -04:00
Daniel Leung
e0de79b9a5 regulator: fix doxygen ref tag typo.
@reg -> @ref.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:14:57 -04:00
Daniel Leung
4c6033aac2 mbox: fix param typo in mbox_set_enabled_t
enables -> enabled.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:14:57 -04:00
Lucas Tamborrino
3c91c408a4 drivers: dma: esp32: Add psram support
Add support for external ram access in DMA.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-24 07:14:48 -04:00
Georges Oates_Larsen
a900d17660 net: shell: cm: Fix snprintf warnings on NEWLIBC
Building with NEWLIBC triggers warnings about
snprintf since stdio is no longer automatically
included by printk.h

This PR switches to using snprintk to avoid these
warnings.

Fixes #77330

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-08-24 07:14:32 -04:00
Patryk Biel
816708aa4d devicetree: Reduce LoRa SPI frequency to allow reliable communciation
The heltec_wireless_stick_lite_v3 board does not properly handle
receive operations when the SPI used to communicate with onboard SX1262 has
the clock frequency set too high. This causes radio recv operation to
almost always hang forever without any error, as the SX1262 module returns
0xFF00 value as the interrupt status which does not make any sense, thus
causing the LoRaWAN library to trigger RXTX timeout handler which in the
current SX1262 driver implementation is not privded. The issue occurs
almost always, sometimes allowing to receive few (3-5) tranmissions
correctly, then fail. The root of the problem is not known for sure, but it
is highly likely a board's limitation, though not confirmed by the
manufacturer.
The current SPI frequency was chosen arbitrarily based on the conducted
experiments where the 30 000 messages have been received continiously
without any problems (with 5s interval for each message).

Signed-off-by: Patryk Biel <pbiel7@gmail.com>
2024-08-24 07:14:10 -04:00
Yong Cong Sin
143b14bb4f shell: modules: kernel: print cpu_mask when available
Dump the `cpu_mask` of threads when available.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-23 15:51:01 +01:00
Sylvio Alves
2e95ac8fbe boards: dts: esp_rust: enable bluetooth peripheral
Adds BLE DTS entry to enable Bluetooth LE in esp_rust board.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-23 15:50:54 +01:00
Axel Le Bourhis
179c85aa06 tests: net: socket: udp: clear control data buffer before recvmsg
Currently, the test doesn't clear the control data buffer before
calling recvmsg. This leads to recvmsg being unable to add the new
control data, which corresponds to the current received data.
This commit aims to clear the control data buffer to match most use
cases, when the control data buffer is empty before calling recvmsg.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-08-23 15:50:37 +01:00
Axel Le Bourhis
5d643f4b00 net: sockets: Update msg_controllen in recvmsg properly
According to recvmsg man page, msg_controllen should be set to the sum
of the length of all control messages in the buffer.
This is missing from the current recvmsg implementation.
This commit aims to fix this by updating msg_controllen each time control
data are added to the buffer.
This commit also fixes cases where the msg_controllen is cleared
incorrectly.

Fixes #77303

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-08-23 15:50:37 +01:00
Grzegorz Chwierut
fcf17dd17e twister: pytest: Change the order or pytest-args
Use pytest-args parameters provided in command line after
parameters taken from yaml file. The last occurence is
considered by argparse, so parameters from command line
will be used.

Fixes: #77319

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-23 15:50:19 +01:00
Marcio Ribeiro
b9ccaaea53 drivers: spi: esp32: fix exception in mode 3 & soft-ctrld CS
Fixes division by zero exception when SPI is configured to operate in mode3
whit CS controlled by software.

Such exception occurred because data->dfs is listed as the denominator in
a division inside the spi_esp32_transfer() function which is called from
spi_esp32_configure() (before assigning a value to data->dfs) inside
transceive() in the condition where mode 3 is chosen as the SPI operating
mode and the chip select is configured to be software-controlled.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-23 15:50:03 +01:00
Karol Lasończyk
85c292ac59 soc: nordic: Move DCDC configuration to DT for nRF54L15
Moving configuration for nRF54L15 device from kconfig to dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-23 15:49:52 +01:00
Emil Dahl Juhl
bc5477ab10 drivers: led: lp5569: run clang-format
Run clang-format on drivers/led/lp5569.c to align formatting in the file.

No functional changes intended.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Emil Juhl
f53a401758 drivers: led: lp5569: add enable-gpios
The lp5569 features a double functioning pin for enable and pwm control.
The chip, however, uses the first rising edge to initialize and get ready
for i2c communication, and then the pin alters function to pwm mode.

Add support for providing enable-gpios to the lp5569 in the dts, which
will make sure to assert the pin and wait for the chip to initialize
before attempting further configuration of the chip.

Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Emil Juhl
47f9040bfa drivers: led: lp5569: add charge pump configuration
The lp5569 controller contains an internal charge pump which can be useful
for driving LEDs with a forward voltage greater than the lp5569 supply.
Taking advantage of the charge pump can alleviate the need for an external
boost converter.

Add a dts property, charge-pump-mode, to the ti,lp5569 binding with which
the cp_mode bits of the MISC register will be configured.

Following the datasheet, the possible configurations are:
    0x00 -> disabled (default)
    0x01 -> 1x mode
    0x10 -> 1.5x mode
    0x11 -> auto mode

Signed-off-by: Emil Juhl <emdj@bang-olufsen.dk>
2024-08-23 15:49:43 +01:00
Benjamin Lemouzy
635e41e70f jwt: add missing documentation
Fix some errors and add missing functions documentation.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2024-08-23 15:49:05 +01:00
Arkadiusz Cholewinski
3580d8b6d6 tests: ztest: Add ztest param test.
Introduces the test for testing the new functionality
of ztest shell.

Passing -r (repeat iter) parameter. This allows to run
a particula testcase or testsuite several times.
Passing -p (any value) parameter. This allows to provide
a parameter to a test at runtime.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Arkadiusz Cholewinski
f58a4c4b1c ztest: expand ztest functionality.
Expanding the ZTEST shell to include a command that
accepts additional parameters, such as ztest run_testcase
<suite:test> -p any_value.

Adding the new ZTEST_P macro, to create the
parameterized test.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Arkadiusz Cholewinski
6d5243cbed ztest: expand ztest_shell command
Expand ztest_shell subcommands `run-testcase`
and `run-testsuite` to include additional parameter `-r`
repeat-iter. This allows to run a particular testcase or
testsuite several times.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Chris Friedt
db44b1306f doc: posix: mark posix signals supported with undefined behaviour
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
87062af85b tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
1593954083 posix: add stubs for signal.h functions that need process support
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.

The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
b71062e9f8 posix: procN: add missing alias for getpid()
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.

So this is technically a bugfix.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Xiaolu Sun
45705a84ab logging: fix log buffer pending while it is definitely full
The buffer flags MPSC_PBUF_FULL is a shared resource to determine
whether the buffer is available. When processing drop messages,
the flag will be cleared first and then set, add spin lock protection.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2024-08-23 08:04:18 -04:00
Sylvio Alves
f94053410c MAINTAINERS: Add Espressif collaborators
Add raffarost and wmrsouza as collaborators on Espressif area.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-23 08:03:28 -04:00
Jordan Yates
18a964faaa i2c: nrfx_twi: fix RTIO utility functions
Route `configure` and `recover_bus` through the RTIO framework to avoid
race conditions. Update `RTIO_OP_I2C_RECOVER` implementation to actually
recover the bus, instead of triggering a loop.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-23 08:02:45 -04:00
Aiman Mazlan
0d796ee286 drivers: sensor: st: vl53l1x: add return to attr_set and attr_get
Incorrect value set by user when using sensor_attr_set can fail silently
since it always returns 0.
Fix by adding ret. Also added return on sensor_attr_get.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2024-08-23 08:02:23 -04:00
Torsten Rasmussen
3382e28737 tests: cmake: add test cases for CMake YAML module
This commit provides a basic set of tests for Zephyr's CMake YAML
module.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Torsten Rasmussen
105a4b5eb2 cmake: initial version of a CMake yaml module
Initial CMake yaml module to facilitate reading yaml files into CMake,
update yaml settings and write it back to a file.

The yaml module also supports creation of yaml files from scratch.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Torsten Rasmussen
9da2766846 cmake: add check_arguments_... macro to facilitate function writing
Add a new zephyr_check_arguments_required_allow_empty() macro for
function argument validation.

Zephyr already has a zephyr_check_arguments_required() for checking
required arguments, like
zephyr_check_arguments_required(foo_func <prefix> FOO BAR)
which ensures that one of FOO or BAR are given in a call like:
foo_func(BAR val)

One limitation however, is that is some cases BAR may be allowed to be
empty, so that it's still possible to know if FOO or BAR were supplied.
In most case, BAR and FOO will have values following the keyword, like:
foo_func(BAR my_bar_val)
foo_func(FOO my_foo_val)

but in cases where `my_bar_val` is a variable which may be empty, like:
set(my_bar_val)
foo_func(BAR ${my_bar_val}) # (expands to: foo_func(BAR)

then BAR was actually supplied.
To support functions where such empty expansion is allowed, then a new
helper macro `zephyr_check_arguments_required_allow_empty()` has been
implemented, as to be able to distinguish `foo_func()` from
`foo_func(BAR)` when parsing arguments.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Laurentiu Mihalcea
2a6f151524 firmware: scmi: transport.h: switch to including kernel.h
Toggling `CONFIG_USERSPACE` to `y` results in compilation
errors caused by the fact that various k_* functions don't
have their prototypes included in the SCMI sources (e.g:
`k_mutex_*`, `k_sem_*`, `k_is_pre_kernel()`).

To fix this, switch to using the `kernel.h` header instead
of `sys/mutex.h`. Previously, this worked because `sys/mutex.h`
included `kernel.h` if `CONFIG_USERSPACE` was set to `n`.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-23 08:01:51 -04:00
Rubin Gerritsen
d82424ba36 tests: bluetooth: hci_uart_async: Set thread name after creation
When running on native_posix, the thread needs to be created
before the thread name can be set.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Rubin Gerritsen
fb745f610f arch posix: Implement arch_thread_name_set()
This will update the posix thread names to match
the zephyr thread names.

This will simplify debugging as the debugger will
recognize the thread names.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Rubin Gerritsen
98a16b424a kernel: Define optional arch_thread_name_set()
The intention of this API is to allow setting the posix thread
name equal to the zephyr thread name.
By defining it as an arch interface, the implementation becomes
generic.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Anthony Giardina
8a4b3a4b61 xtensa: include xtensa-types.h for xt-clang
Newer Xtensa toolchain needs to include xtensa-types.h so that
macros in tie.h can be used without compilation errors.
The exact verison needing this is unknown but first encountered
in RJ-2023.2. Tested with older toolchain and that did not
cause any compilation errors so just include xtensa-types.h
if xt-clang is used. Haven't seen newer toolchains being
generated with xcc, so skip that for now.

Note that Zephyr SDK and the public HAL in Zephyr do not provide
this file.

Signed-off-by: Anthony Giardina <anthony.giardina@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-23 09:54:56 +02:00
Yuval Peress
bfb893a0c5 gtest: Add support for gtest 1.15.0
The gtest 1.15 has slightly different output from the original one that
was used to set up the harness. With this change we support both output
formats.

Fixes #72318

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-23 09:54:41 +02:00
Maureen Helm
e49cca2cc3 drivers: sensor: Fix adxl345 sample fetch return value
Fixes the adxl345 accelerometer driver to return zero on sample fetch
success, as specified by the sensor driver API. Prior to this change,
the driver incorrectly returned a positive non-zero value on sample
fetch success, which in turn caused a bus fault getting data with the
sensor shell.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-23 09:53:28 +02:00
Junho Lee
0f7f6edcf6 Bluetooth: Mesh: Fix uninitialized field when cancelling transfer blob
Initialize the missing chunk field when canceling a BLOB Transfer.
If you canceled a BLOB Transfer, the missing_chunk was not cleared in
the next BLOB Transfer. This can make it look like there are still
missing chunks, even though all chunks in the block have already been
received, and it does cause bugs.

Signed-off-by: Junho Lee <tot0roprog@gmail.com>
2024-08-23 09:53:09 +02:00
Anders Bjørn Nedergaard
29dc419ad2 soc: rt11xx: Fix dual core ENET PLL
IMXRT11XX secondary core should not deinit ENET PLL
as it could be configured by primary core.

Signed-off-by: Anders Bjørn Nedergaard <abn@polytech.com>
2024-08-23 09:52:28 +02:00
Hake Huang
282dc966fd boards: frdm_rw612: support latest linkserver
latest linkserver 1.6.123 use RW612:FRDM-RW612

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-08-23 09:52:12 +02:00
Karthikeyan Krishnasamy
14b3293d94 doc: posix: mark rmdir and remove as supported
Mark POSIX API rmdir and remove as supported in
POSIX options group Documentation

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
c044f0c89d tests: lib: c_lib: add test suite for remove api
Add test suite for remove of zephyr native libc

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
abf62699cb lib: libc: stdio: add support remove api
Implement remove api to zephyr's native c library

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
e8ab88bd15 tests: posix: fs: add test suite for rmdir
add test suite for POSIX API rmdir

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
f616c43c9e lib: posix: fs: add rmdir support
Implementation of rmdir, Posix style file
system API to remove directory

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Raffael Rostagno
90c6106926 drivers: esp32: Interrupts flags configuration
Allows configuring interrupts flags in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
bb746cdcc5 drivers: esp32: esp_intr_alloc return condition
Add checks to return value of esp_intr_alloc to avoid drivers init
returning 0 when interrupt allocation fails.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
0b3a34cdca drivers: esp32: Interrupts priority configuration
Allows configuring interrupts priority in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
4fc8033d88 soc: mp: esp32: Added IRQ priority and flags config
Interrupt priority and flags config for crosscore ISR
sourced from device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
3169095e57 drivers: intc: esp32: Macros for DT input validation
Adding macros to convert and validate input config from device tree
for IRQ priority and flags.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
dfbcb9dd60 dts: irq: esp32: Added priority and flags to device tree
Added IRQ priority and flags configuration to device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
f783dec97c bindings: intc: esp32: Added symbols in DT
Added symbols for IRQ priority and flags configuration
in the device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Mathieu Choplain
eaa799a9b5 tests: dma/chan_blen_transfer: move buffer to DMA-accessible memory
This commit moves the test buffer from ITCM (not accessible by DMA) to DTCM
on several NXP boards, to make the test successful.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Mathieu Choplain
3099491f3e tests: dma/chan_blen_transfer: relocate TX and RX buffers
This commit places the chan_blen_transfer DMA test's TX and RX buffers
in a separate file that gets entirely relocated. This ensures that the
buffers reside in the correct memory, without breaking other things
due to relocation of test data/code.

Fixes #75676.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Duy Phuong Hoang. Nguyen
b9f31c0e40 drivers: entropy: Initial support for trng driver of RA8
Initial commit for entropy support on RA8
- drivers: entropy: implementation for TRNG driver of RA8x1
- dts: arm: add device node for trng of RA8x1
- boards: arm: enable support zephyr_entropy for ek_ra8m1 and
update board documentation

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-22 14:24:57 -04:00
Emanuele Di Santo
b41054340d tests: arch: arm: arm_irq_vector_table: fix compilation for nRF9280
Fix compilation for nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9e1862ff66 tests: drivers: watchdog: wdt_basic_api: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9dcb3cc189 tests: drivers: watchdog: wdt_error_cases: fix compilation for nRF9280
Fix compilation by defining the watchdog flags for nRF9280 as well.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Andreas Moltumyr
9f90a3d1ad tests: drivers: adc: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
a33b0887d0 tests: lib: cpp: cxx: add nRF9280 to exclusion list
Nordic HAL is not compatible with C++98.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
d1e9ddfa01 samples: drivers: watchdog: add overlay file for nRF9280 cpuapp
Add an overlay to enable compilation.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Andreas Moltumyr
2f1a5ce104 drivers: adc: nrf: Update adc driver to support nRF9280
Expands driver to support nRF9280 similar to nRF54H20 device.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
8894559720 modules: hal_nordic: nrf: add nRF9280 support
Enable NRFS support for nRF9280, including DVFS.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
f156dd7d0c boards: nordic: add initial support for nRF9280 PDK
Add board support for Application, Radio and PPR cores
of the nRF9230 SoC / nRF9280 SiP on the nRF9280 PDK board.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
b511704dd8 scripts: west: runners: add initial nRF92 support
Add initial support flashing and erasing the application and
radio cores of the nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
c0410e1a22 drivers: serial: nrf: disable legacy shim for nRF92
Disable the legacy shim due to DPPI support currently missing.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
a2bb323861 drivers: cache: nrf: enable CACHE_NRF_PATCH_LINEADDR for nRF92
Enable CACHE_NRF_PATCH_LINEADDR for nRF92 by default,
similarly to how it's enabled for nRF54H.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
242a70b32e soc: nordic: Add initial support for nRF9280 SiP
The nRF9280 is a SiP (System-in-Package) consisting of the nRF9230 SoC
and additional components such as PMIC and others. Additionally,
the nRF9230 contains several CPUs, similarly to the nRF54h20 SoC.

Update nrfx glue, and add necessary Kconfig and initialization code
to allow building for nRF9280 targets: CPU, Radio and PPR cores.

The nRF9280 is used for all user build targets and Kconfigs,
whereas the nRF9230 is used as the build target for the MDK.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
49c79582f6 soc: nordic: common: add CAN121 to nrf54hx_nrf92x_mpu_regions.c
Add support for CAN121, if present in DT.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
0a9ad40a85 soc: nordic: move mpu_regions.c to common folder and rename
Move mpu_region.c to common folder, to re-use with nRF92.
Rename it to nrf54hx_nrf92x_mpu_regions.c to indicate
which product series it applies to.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
d4b1e1e302 dts: Add initial support for nRF9280 SiP
Add definition of the nRF9280 SiP with its Application,
Radio, and Peripheral Processor (PPR) cores and a basic set
of peripherals: GRTC, GPIOs, GPIOTE, and UARTs and few others.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Chaitanya Tata
22a1846e8e drivers: wifi: Fix AP mode build
Pass the AP mode configuration based on Zephyr's Kconfig to the OS
agnostic code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
56055ac4a8 drivers: wifi: Fix monitor mode handling
Monitor mode relies on core Wi-Fi management functions, so, the file
should be included for both system and system with raw modes.

Fix this by adding a hidden symbol.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
464cc9e161 drivers: wifi: Fix duplicate file inclusion
If Wi-Fi management is enabled, then independent of modes scan
functionality is always included.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
aef70cb94f maintainers: Add colloborators for nRF Wi-Fi
Colloborators for both Wi-Fi native driver and Wi-Fi driver in
hal_nordic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
eea8f67b91 drivers: wifi: Wait for clock divider to take effect
This is a fix from QSPI-NOR driver to wait for clock divider change to
be applied and take effect.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
ed58af2ccd drivers: wifi: Fix QSPI clock dividers
For less than 32MHz using HFCLK192M, /2 divider should be used and only
for Anamoly159 /1 divider should be used.

Without this fix 8MHz clock in DTS uses 16MHz clock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
e5a665d4aa drivers: wifi: Add tx packets drop count calculation
[SHEL-1063] Add calculation of drop packets in tx due to
lack of buffer memory.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Ajay Parida
41e29c6cad drivers: wifi: Option for PS data retrieval
SHEL-2947] Option to set either PS-poll or QoS null frame based
power save data retrieval mechanism.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Sachin D Kulkarni
1f494387b1 nrf_wifi: Remove dependency on OSAL layer handle
Removes the requirement for the different layers in the OS agnostic
parts of the driver having to maintain a handle to the OS interface
layer in order to call the OS interface calls. The OS interface layer
now maitains the handle to OS-specific ops internally and invokes the
appropriate functions.

Fixes SHEL-2639

Signed-off-by: Sachin D Kulkarni <sachin.kulkarni@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
e085d440c2 drivers: wifi: Reset interface statistics data
[SHEL-2542] When reset command is called this will
reset all statistics including firmware and host.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Kapil Bhatt
37a98bfa79 drivers: wifi: Add kconfig option to disable WMM feature
[SHEL-2054] Adding a kconfig option for WMM.
By default it will be enabled. If user needs
to disable it, set it as n.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Chaitanya Tata
2ec8bfda65 manifest: hal_nordic: Pull latest Wi-Fi OSAL
Pull latest OSAL code including FW.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-22 14:23:56 -04:00
Szymon Janc
d9f348962c tests: bluetooth: tester: Fix BTP_BAP_BROADCAST_SINK_BIS_SYNC command
After recent changes to BIS bitfield it is no longer required to adjust
BIS Index bitfield.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-22 14:23:05 -04:00
Jamie McCrae
031f9f2943 mgmt: mcumgr: grp: img_mgmt: Add optional image slot state callback
Adds an optional callback which can be used to append custom
fields to the image slot state command response

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-22 14:22:49 -04:00
Pieter De Gendt
814f79a6e4 MAINTAINERS: Add pdgendt as West collaborator
Add myself as a collaborator for the West project.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-22 14:22:22 -04:00
Benjamin Cabé
a0287cac7f scripts: coccinelle: add errno as a reserved name
errno is defined by the ISO C standard to be a modifiable lvalue of type
int, and **must not be explicitly declared**

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-22 14:21:53 -04:00
Daniel Kampert
db9b45a7b3 drivers: rtc: off-by-one error in RV-8263-C8 driver
1. tm_mon in rtc_time structure has a range [0, 11],
while the RTC expects [1, 12]. Add missing
increasing / decreasing of this value.

2. Fix typo in debug log

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-22 14:21:41 -04:00
Lucien Zhao
67a30da697 tests: drivers: i2c: support i2c_target_api cases for RT1180
Add corresponding i2c configuration for cm33/cm7 core
Test cm33/cm7 core passed on my local

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Lucien Zhao
a8e14acba4 boards: nxp: mimxrt1180_evk: add lpi2c2/3 pinmux
add lpi2c2/3 pinmux

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Lucien Zhao
e147a6e8d9 drivers: clock_control: support new i2c clock model
In RT1180, two lpi2c instances share same one clock gate

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Lucien Zhao
b919292570 dts: arm: nxp: add all the lpi2c device on device tree
add 6 lpi2c instances on device tree

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Lucien Zhao
e9e62b6aaa soc: nxp: imxrt: imxrt118x: Enable lpi2c0102/0304/0506 clock
Enable lpi2c0102/0304/0506 clock

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-22 14:21:27 -04:00
Hessel van der Molen
2590c48d40 arch: arm: cortex_m: pm_s2ram: save system_off before s2ram marking
The r0 register holds the system_off function pointer. As r0 is a scratch
register, the pointer needs to moved to a preserved register before
branching to a (custom) marker function.

Furthermore, in accordance to rule 6.2.1.2 of aapcs32, the stack pointer
needs to align on 8 bytes. Hence r0 is pushed to the stack in addition to
the lr register, before calling the public interface of checking the
s2ram marker.

Signed-off-by: Hessel van der Molen <hvandermolen@dexels.com>
2024-08-22 14:21:07 -04:00
Anas Nashif
420ffdd8a8 ci: compliance: in case of too many errors, send as a single failure
Do not try to format each single failure, this will take too long to
process and will run for hours and spam GH.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-22 14:20:50 -04:00
Maureen Helm
ceaf6055e1 boards: adi: Add max32690fthr
Adds a new board definition for the ADI MAX32690FTHR board. This board
uses the same SoC as the MAX32690EVKIT board, but with a smaller feather
form factor.

Tested on hardware with the following samples:
- samples/hello_world
- samples/basic/blinky
- samples/basic/threads
- samples/subsys/shell/shell_module
- samples/subsys/input/input_dump

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-22 14:20:43 -04:00
Peter van der Perk
d1a6b45345 soc: rt11xx: Fix bus clocking
IMXRT117X bus clock should be 240MHz and IMXRT116X should be 200MHz

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-22 14:20:26 -04:00
Daniel DeGrasse
e6a6deb4c2 doc: releases: migration-guide-4.0: document change to USDHC card detect
NXP IMX USDHC fallback card detection method changed from querying the
peripheral to simply assuming the card was present. Add a note to the
migration guide highlighting this and explaining how to restore the
previous behavior for anyone using this detection method.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-22 14:19:37 -04:00
Daniel DeGrasse
17f71e19f0 drivers: sdhc: imx_usdhc: assume card is present if no detection method
The imx USDHC driver previously queried the peripheral's internal card
detect signal to check card presence if no card detect method was
configured. However, some boards do not route the card detect signal and
do not work correctly with the DAT3 detection method supported by this
peripheral. As a fallback, assume the card is present in the slot but
log a warning to the user.

Fixes #42227

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-22 14:19:37 -04:00
Arkadiusz Cholewinski
65051c8a24 Coverage Analysis: Update Test Case Status
Modify the condition in the parse_testplan
function to align with the changes in the Status class.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-22 08:49:28 -04:00
Emilio Benavente
67b7c993e1 boards: nxp: frdm_mcxn947: Updated Init Clock for LPTMR
Updated the clocks that get initialized for the MCXN947
when using the LPTMR. The LPTMR allows the user to select
and Input clock, however said input clock must be
initialized before the user can select it.
Update description for clk-source in binding file.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-08-22 09:16:28 +02:00
Yangbo Lu
71fa64c4e7 boards: nxp: add imx93_evk M33 support
Added basic board support for imx93_evk M33.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Yangbo Lu
09d700c707 soc: nxp: imx: add i.MX93 Cortex-M33 support
Added basic soc support for i.MX93 Cortex-M33.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Yangbo Lu
e5b6fcd084 dts: arm: nxp: add device tree for i.MX93 Cortex-M33
Added basic device tree file for i.MX93 Cortex-M33.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Yangbo Lu
2a827f04b8 drivers: pinctrl_imx: support i.MX93 M33 core
Converted to use CONFIG_SOC_MIMX9352 instead of
CONFIG_SOC_MIMX9352_A55 to support also M33 core.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Yangbo Lu
250460b008 drivers: clock_control_mcux_ccm_rev2: support i.MX93 M33 core
Converted to use CONFIG_SOC_MIMX9352 instead of
CONFIG_SOC_MIMX9352_A55 to support also M33 core.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-08-22 09:15:16 +02:00
Declan Snyder
814bb2e81e soc: rw: Consolidate clock cycle kconfig.
No need for this to be expanded out so much.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
6e7f86ce86 soc: nxp: Move connectivity defaults to common
Move default of monolithic and fw loader, options, etc to the
common kconfig files rather than defaulting in soc file.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
b00d881398 soc: nxp: Consolidate ROM RAMLOADER config
Consolidate the ROM RAMLOADER config to be in one place,
add a new Kconfig file to be included by the SOCs with the feature.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
4e9227641e drivers: usb device: Remove MCUX controller type
The CONFIG_USB_MCUX_CONTROLLER_TYPE choice config
is not necessary, let's just remove it. Theoretically,
if there was an SOC with the EHCI and LPCIP3511, then
it might cause a build error, but there is no SOC
which is supported on this legacy driver that has that.

Remove all settings of it in the SOC files.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
dae9e75e04 soc: nxp: rw: Delete unused configs
Delete some unused kconfigs in RW SOC family.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
a097cdc4fe soc: nxp: Centralize flexspi related configuration
Currently this code related to how to configure the
flash size and address when using flexspi to XIP is copy
pasted in all sort of places and ways all over the tree,
let's clean this up and have single point of control over
this configuration.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
6300dc6aa7 soc: nxp: mcx: Do not use family level config
Move all dependencies of the family config to series level,
and put a disclaimer saying not to use the family config.

Change all occurrences of the family config in code to the
MCXNX4X series config.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
3c5df36dda soc: nxp: Move flexspi log level change to driver
Single point of control over this kconfig's effect.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
57d777b640 drivers: flash/memc: Source logging kconfig last
Some flash/memc drivers like flexspi will want to default the
value of the log level to off to avoid RWW hazard while XIP,
to do this, the logging template must be sourced after the driver
kconfig files so that the default value from the driver is able
to be checked, since logging template introduces an unconditional
default otherwise.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
1d3864addf soc: nxp: Remove RT1061 and RT1051 refs
NXP is not supporting these derivative parts in the zephyr upstream,
these references to them should therefore be removed in order to avoid
confusion.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
f6bfedf114 soc: nxp: imxrt: Clang format flexspi_nor_config.h
Check compliance is not allowing changes to this file
without running clang-format.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
9d9d2f8178 soc: nxp: mcx: Fix Kconfig files and MFD config
The Kconfig defaults should be in Kconfig.defconfig.

MFD should not be made dependent on the LP flexcomm being
enabled, since MFD can be for other things than just flexcomm.
Change from depends on to an if.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
5360c57dc4 soc: nxp: Do not change driver init priorities
Doesn't seem like there is any reason to be changing the
serial and ADC driver init priorities in the SOC defconfigs.
By default, clock control has priority 30, dma has priority 40,
and serial/adc have priority 50. This seems already to be the order
that is needed, and the original goal of these overrides, which
don't seem necessary anymore.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
5d954917bd soc: nxp: Move kinetis pinctrl to include/
There are some SOCs which use the same pinctrl
device, but are not really overall that similar to the kinetis
family of SOCs, so prepare to reuse this code by other SOC families.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
e2d3fe91fd soc: imxrt118x: Cleaning up kconfigs
Moving RT118x kconfigs to series level instead of family level,
and cleaning up redundant declarations, and adding missing
HAS_MCUX_FLEXSPI selection.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Pisit Sawangvonganan
6718ba6841 drivers: gpio: renesas_ra_ioport: improve device instantiation macro
Introduced `GPIO_DEVICE_INIT_RA_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-22 09:12:52 +02:00
Simon Hein
e37e3d5a85 doc: coding guidelines: Refactor the guidelines rule table
Refactor the guidelines rule table and add a zephyr rule number
to make it more clear that the coding guideline rules are a
subset of the MISRA-C:2012 rules.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-08-22 09:12:23 +02:00
Tom Burdick
f880b0164b i2c: Fix build failure with i2c_mcux_rtio driver
Build was failing due to const variable being passed as function param
accepting non-const variable discarding const qualifier. Explicitly cast
to fix the build issue.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-22 09:10:52 +02:00
Laurentiu Mihalcea
e0be5801cd drivers: dai: esai: don't reset ESAI on init
The ESAI is already reset during the config_set() function
so no need to also reset it during init().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-22 09:10:18 +02:00
Fabio Baltieri
fba0a47b0e input: pmw3610: add soft reset when no reset pin is available
The reset pin on the chip is optional, add a soft reset call when the
reset pin is not specified for the device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-21 21:06:50 -04:00
Flavio Ceolin
f0c053c0ad doc: security: Disclose CVE-2024-4785
Disclose information about published CVE.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-21 21:06:38 -04:00
Yong Cong Sin
fe94d4354a libc: common: implement multiple time functions
Implemented the following:
- `asctime_r()`
- `asctime()`
- `localtime()`
- `localtime_r()`
- `ctime()`
- `ctime_r()`

Specifically:
- the implementation of `localtime()` & `localtime_r()` simply
  wraps around the gmtime() & gmtime_r() functions, the
  results are always expressed as UTC.
- `ctime()` is equivalent to `asctime(localtime(clock))`, it
  inherits the limitation of `localtime()` as well, which only
  supports UTC results currently.

Added tests for these newly implemented functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
Yong Cong Sin
5978e5231e lib: posix: update option group of readdir_r()
`readdir_r()` belongs to the following option group

POSIX_FILE_SYSTEM_R: Thread-Safe File System

Create a new Kconfig `CONFIG_POSIX_FILE_SYSTEM_R` to compile
it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
TOKITA Hiroshi
eb675eb281 scripts: west_commands: completion: zsh: Add minimum support for sdk
Add minimum support for the `west sdk` command.
This only provides completion for the `sdk` command itself.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
85ffd1e031 scripts: west_commands: completion: fash: Add support for west sdk
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
af5850d44a scripts: west_commands: completion: bash: Add support for west sdk
Add a feature for completion of the `west sdk` command.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
TOKITA Hiroshi
b68071dc71 commands: add the 'sdk' command to manage SDK.
This command can list and install SDK.

Run 'west sdk install' to install the SDK.
Run without any parameter, installing
specified by SDK_VERSION in the source tree.
'west sdk' to show installed SDK information.

This command is just a wrapper for SDK's setup command,
but it simplifies the installation process. It will be a good
improvement for onboarding first-time users.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 16:54:56 -04:00
Jakub Topic
b824e41bf3 drivers: rtc: rv3028: adjust timing of EEPROM requests
Removes calling k_busy_wait() and uses k_msleep().

Updates polling rate of EEPROM busy status after read request to 1 ms, as
recommended by the app note.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Jakub Topic
7ff72ee55e drivers: rtc: rv3028: fix minutes alarm
Use correct value for Minutes Alarm register when disabling this alarm.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Jonathan Rico
0b3c67c31b Bluetooth: audio: Make unit tests compile
The tests manually include sources that are normally conditionally
included (ie based on kconfig values) in the stack.

The tests should be fixed by the original authors.
For now, force-on the hidden kconfig that enables the log options.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
4bdca17e21 Bluetooth: OTS: Use proper kconfig log option
`OTS_CLIENT=y` and `OTS=n` is a valid config.

Since the logs weren't conditionally included, this flew under the radar
for a while.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
3324eecbae Bluetooth: Re-organize logging Kconfig options
- got rid of "Others" menu
- JK I made a new one: "Common"
- moved all host-related opts to "Host" instead of "Others"
- moved all audio-related opts behind `if BT_AUDIO`
- moved only controller kconfig to controller/Kconfig.ll_sw_split
  - it had a dependency there already

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Jonathan Rico
f7631d4b4a Bluetooth: Conditionally include logging Kconfigs
Having all the configs be visible by default clutters the menuconfig
view. Make them visible only when the corresponding subsys or module is
enabled.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Fin Maaß
807a726a7f net: config: add missing include
this adds a missing include of zephyr/net/net_if.h

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-21 16:44:06 -04:00
Mathieu Choplain
a304f98ac1 doc: Coding guidelines: use fixed title for reference to Bluetooth APIs
Commit 698a0c3193 changed the bluetooth_api
section title, which made the reference in the Coding guidelines turn into
"API", which is confusing.

Use a fixed title for that reference to fix the issue.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-21 16:43:52 -04:00
Pieter De Gendt
8fcccf1aad scripts: ci: Fix clang-format compliance on Windows
Clang-format installs an exe instead of a python script.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-21 18:29:24 +01:00
Szymon Janc
6d19bcf333 tests: bluetooth: tester: Fix user_data size in pools
There was hardcoded value for user_data which is no longer valid.
Use proper CONFIG_BT_CONN_TX_USER_DATA_SIZE for that.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-21 18:27:37 +01:00
Armando Visconti
45ae08a379 modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.6
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.6

Requires https://github.com/zephyrproject-rtos/hal_st/pull/21

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Armando Visconti
42da38b50f tests: sensors: build_all: fix warnings on i2c
Fix warnings generated when performing sensor drivers build test
due to typos in i2c DT definition.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Jukka Rissanen
8284ea7b11 net: shell: Move bridge shell under net shell
All the network related shell activities should be under
network shell so moving it to "net bridge ..." command.
Add this information to migration guide.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-21 18:27:14 +01:00
Simon Hein
56a691078e doc: doc generation: remove breathe references
Remove the references to the breathe extension in the
Schematic of the documentation build process graph and
the filtering expected warnings section.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-08-21 18:27:04 +01:00
Jordan Yates
b3a4b15e4b sdhc: sdhc_spi: handle PM on SPI bus
Handle SPI buses that have device runtime PM enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-21 18:26:37 +01:00
Johan Hedberg
48c05bb361 doc: bluetooth: Fix external web page references
The generated HTML was broken, even though the rst files themselves
contained the correct URLs. Update to a different format which should
generate the right output.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-21 18:26:15 +01:00
Felipe Neves
3d39644a2c boards: witte_technology: linum: add initial support
To the Linum board from Witte Technology based on STM32H753xx.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-21 18:26:07 +01:00
Mark Wang
0c0c420424 drivers: udc: mcux: set high_bandwidth
set high_bandwidth and use the cfg->mps to set
ep_init.maxPacketSize because NXP MCUX controller
driver supports additional transaction bits in
maxPacketSize.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-21 18:25:30 +01:00
Johann Fischer
8617e46849 drivers: udc: do not use the MPS value directly for the endpoint size
Instead, use the helper to get the size field from the MPS value.
MPS value may contain information about additional transaction
per microframe (bits 12..11).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07bd625196 drivers: udc_dwc2: Support High-Bandwidth endpoints
Make driver aware of High-Bandwidth endpoints both in Completer and
Buffer DMA mode. In Completer mode TxFIFO must be able to hold all
packets for microframe, while in Buffer DMA mode space enough for two
packets is sufficient.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07ea4aa155 drivers: udc_dwc2: Allow larger TxFIFO writes
DMA is capable of packetizing transfers on its own and the driver
doesn't need to check available TxFIFO size when scheduling DMA
transfer.

Split packets on DWORD boundary when writing more than one packet to
TxFIFO in completer mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
b7664f27c8 usb: device_next: Make stack High-Bandwidth aware
Add macros for converting between Max Packet Size and total payload
length. Allow drivers specify whether endpoint supports high-bandwidth
interrupt and high-bandwidth isochronous transfers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
e333739f3a usb: device_next: hid: Simplify MPS less than 65 detection
Use COND_CODE_1() instead of UTIL_AND() to make it possible to only
define the HID_MPS_LESS_65_ macros up to value 64.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
60835aa393 usb: Add missing wMaxPacketSize endian conversions
wMaxPacketSize in endpoint descriptor is stored in little-endian order,
but the mps parameter passed to functions is in host order.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Fin Maaß
b7ab025bfd shell: backends: uart: add option to force tx blocking
This adds a kconfig option to force
tx blocking on serial. This way only rx
will use the interrupt.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-21 18:25:14 +01:00
Tu Nguyen Van
34206f5505 boards: nxp: s32z2xxdc2: add Flexcan support for s32z2xxdc2
Enable Flexcan support on s32z2xxdc2 boards

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Tu Nguyen Van
ee6620e15f dts: arm: nxp: add Flexcan support for S32Z27x
Add FlexCan nodes to S32Z27x devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Tu Nguyen Van
ac056bbab9 dts: arm: nxp: rename can node to canxl node
To prepare for supporting flexcan, can node should be
renamed to canxl to support both flexcan and canxl

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Ha Duong Quang
78214543d5 drivers: nxp_s32_canxl: support rxfifo on new SoC version s32ze
The received messages are put into the FIFO one by one in the
order, the hardware will return the queue index for current
message. So use the index instead of reading always from 0.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-21 11:03:34 +02:00
Joel Guittet
4c16ec1fba net: websocket: fix undefined reference
Fix undefined reference to MSG_DONTWAIT while building websocket client.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2024-08-21 08:58:57 +02:00
Dawid Niedzwiecki
befcb801b4 tests: lib: cpp: add __maybe_unused to unused variable
The foos variable is not really used. Add __maybe_unused to silence
compiler.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-21 08:58:37 +02:00
Gerard Koskamp
6f9d3bda5d drivers: mdio: shell: add support for stm32 mdio
Add support for access mdio registers with the mdio shell on stm32.

Signed-off-by: Gerard Koskamp <gerardgit@outlook.com>
2024-08-21 08:58:29 +02:00
TOKITA Hiroshi
e0c892fb07 boards: arm: Add initial support for EKRA2A1
Add support for the EK-RA2A1 board.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 08:58:17 +02:00
TOKITA Hiroshi
0877b3a354 soc: renesas: ra: Add RA2A1 SoC support
Add Support for Renesas RA2A1 SoC.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-21 08:58:17 +02:00
Jonathan Rico
6b6c4333b7 Bluetooth: doc: update kconfig docstring
CONFIG_BT_CONN_TX_USER_DATA_SIZE is now used for callbacks in the host.
We don't want to limit ourselves to that, so change the wording to be
more generic.
In the future, the plan is to not use user_data at all, removing the
need for the kconfig altogether.

Also rename the structure that was referenced in the docstring.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-20 19:58:39 -04:00
Flavio Ceolin
32cf0e0f9f intel_adsp: ace: Fix undefined reference
/zephyr/soc/intel/intel_adsp/ace/power.c:46:9: warning: implicit
declaration of function 'cache_data_flush_range'; did you mean
'sys_cache_data_flush_range'? [-Wimplicit-function-declaration]
   46 |         cache_data_flush_range((__sparse_force void *)
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         sys_cache_data_flush_range

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-20 19:43:37 -04:00
Flavio Ceolin
8fb592dfff soc: intel_adsp: DCACHE_LINE_SIZE was not defined
The symbol DCACHE_LINE_SIZE was not being defined in Intel ADSP
targets.

It fixes the following problem:

/zephyr/soc/intel/intel_adsp/ace/power.c:30:29: error:
'CONFIG_DCACHE_LINE_SIZE' undeclared here (not in a function); did you
mean 'XCHAL_DCACHE_LINESIZE'?  30 | uint8_t
adsp_pending_buffer[CONFIG_DCACHE_LINE_SIZE]
__aligned(CONFIG_DCACHE_LINE_SIZE);

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-20 19:43:37 -04:00
Dat Nguyen Duy
b7b17fa0eb dts: nxp_rt1010: mark edma channel has separate interrupt entry
In SoC imxrt1010, edma channel has separate interrupt entry,
not like the rest of in-tree imxrt SoC series

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2024-08-20 19:43:05 -04:00
Jordan Yates
cc84a87e4b sdhc: sdhc_spi: log message on power state change
Add a basic log message when power is applied or removed from the SDHC
card.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-20 19:42:37 -04:00
Jordan Yates
2c52f9ee6e disk: sdmmc: power off card in DISK_IOCTL_CTRL_DEINIT
Power off the SD card in `DISK_IOCTL_CTRL_DEINIT`, instead of only
waiting for the card to be idle then doing nothing. This is a safer
state for `DISK_IOCTL_CTRL_DEINIT`, which is documented as preparing the
disk to be removed from the system. It also has the advantage of
lowering power consumption while de-initialized.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-20 19:42:37 -04:00
Łukasz Duda
6eb1e652de net: openthread: Fix the handling of address state changes
This commit ensures that the state of the address can be changed from
the Deprecated state to the Preferred state.

Additionally, an issue with improper memory comparison size for the mesh
local prefix has been fixed.

Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
2024-08-20 19:42:13 -04:00
Pieter De Gendt
dde46a94ba scripts: ci: compliance: ClangFormat only check .c/.h files
The clang format compliance check should only be applied to .c and .h
files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-20 19:07:48 -04:00
Andrej Butok
e767ac0703 runners: jlink: Add support for .elf files to the jlink flash command
The .bin & .hex build output is optional and can be disabled by
CONFIG_BUILD_OUTPUT_BIN/HEX.
Add support for the mandatory .elf build output
to the jlink runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-20 18:59:26 -04:00
Nithin Ramesh Myliattil
baa5683e59 bluetooth: BAS: add battery level status char to bas service
Added the battery level status char to bas service
as per bas_1.1 spec. Added BSIM test for BAS service
to test the NTF/INDs of BAS characteristics.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2024-08-20 18:59:14 -04:00
Benjamin Cabé
b3ae323add doc: zephyr_domain: Cross reference relevant API in code samples
Auto-add references to doxygen at the bottom of Code samples' README
Fixes #77149.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-20 18:58:55 -04:00
Benjamin Cabé
fd613436d5 samples: doc: fix wrong relevant_apis references
Remove references to invalid Doxygen groups.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-20 18:58:55 -04:00
Muhammad Haziq
5ef05081af net: dhcpv4_server: dns server option
dhcv4 server was not providing the dns server details to the
client because dns option was handled. Added the dns server
option to be send to the client as response form dhcpv4 server

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-08-20 18:58:40 -04:00
Chaitanya Tata
2e3778a845 modules: hostap: Fix build error
Remove obsolete variable.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 18:58:20 -04:00
Chaitanya Tata
2e52f0d154 drivers: wifi: Fix build error with conn_mgr
Fix the binding to the connection manager.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 18:58:08 -04:00
Pieter De Gendt
862c16aa5b scripts: Remove duplicate clang-format pip package
clang-format runs in CI and is needed for compliance.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-20 18:57:57 -04:00
Szymon Janc
4216bed418 tests: bluetooth: Fix line endings for imported ICS configuration
Unfortunatelly new Qualification Workspace is not able to properly import
ICS if file is UNIX line endings.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-20 18:57:43 -04:00
Jan Müller
c910520f4d Bluetooth: Host: Rework enabling of scanner
To make the scanner module more understandable and more streamlined, I
reworked the update mechanism of the scanner. The scanner tracks now the
parameters that were used to enable it and the reason why it is running.
This facilitates state logic and allows other modules to "start the
scanner", altough it is already running.
This is mostly a refactoring and not a functional change.

Added a test to verify the behavior.

Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no>

add to task
2024-08-20 14:54:25 -04:00
Maciej Perkowski
ed97f4f7d5 docs: twister: Add section explaining how to choose platform scope
A common question is how twister decides on which platform to run
a given test. Added section is meant to explain those rules.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-08-20 14:54:08 -04:00
Marcio Ribeiro
f86314ecb6 logging: startup: esp32: startup log messages format unification
Unification of startup log messages format while using SIMPLEBOOT.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-20 14:53:42 -04:00
Michael Arnold
5ee4284320 twister: runner: j-link: use dev-id instead of SelectEmuBySN
The serial number for debugger selection over USB
can be selected with the dev-id. This change
reflects also more the workflow of west flash
with J-Link.
The usage of SelectEmuBySN breaks the support for
J-Link over IP with twister.

Signed-off-by: Michael Arnold <marnold@baumer.com>
2024-08-20 14:52:48 -04:00
Krzysztof Chruściński
0e9d2b8821 sys: sys_heap: Use empty sys_heap_validate if validation is disabled
sys_heap_validate() is in sys_heap.h API but it is available only when
CONFIG_SYS_HEAP_VALIDATE=y. Add empty implementation if option is
disabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-20 14:52:41 -04:00
Ricardo Rivera-Matos
04dae3acbf drivers: haptics: drv2605: Hard codes open loop mode for LRA mode
Enables open loop operation when initializing into LRA mode. Open loop
operation is enabled by default for ERM mode. This is hard coded for LRA
mode because calibration is currently unsupported.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
6825fc3a9d drivers: haptics: drv2605: Introduces overdrive clamp prop
Adds "vib-overdrive-mv" device tree property to configure the overdrive
clamp at initialization.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
38b827d18d drivers: haptics: drv2605: Introduces rated voltage prop
Adds support for boot time configuration of the rated voltage at
initialization via "vib-rated-mv" devicetree property.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
857b9df26e drivers: haptics: drv2605: Pick up property defaults from DT
Adds the default value for the existing properties to the device tree
and fall back on those values at initialization if necessary.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
7d58579a17 dts: bindings: drv2605: Requires actuator-mode prop
Requires the actuator-mode property to be set as there is no safe
default value.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
51340b879c drivers: haptics: drv2605: Drops unused drv2605_pm_state
Removes an unused enum defining the DRV2605 power states. This enum is
dead code so it is being removed.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
d5134ef0e3 drivers: haptics: drv2605: Drops ti prefix from DT props
Removes the "ti_" prefix form the the device tree properties.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
9dc17f76c2 dts: haptics: drv2605: Documents GPIOs
Documents the enable GPI and the input/trigger GPI in the dt bindings.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Francois Ramu
62f9b53960 boards: st: stm32 disco kit with quad-spi flash supports reset cmd
Add the support of the reset-cmd property for the stm32h7 disco kits
where the quad-spi flash is mt25ql512ab
This device accepts the SPI_NOR_CMD_RESET_En/SPI_NOR_CMD_RESET_MEM

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-20 14:52:14 -04:00
Francois Ramu
103f3b04f3 drivers: flash: stm32 qspi driver sends the reset cmd
Use the define to send the reset cmd at quad-flash init :
SPI_NOR_CMD_RESET_EN followed by SPI_NOR_CMD_RESET_MEM
when the st,stm32-qspi-nor has the <reset-cmd> property set.
Reports the jedecID correctly.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-20 14:52:14 -04:00
Mark Wang
f82b4ff6b2 drivers: udc: mcux: ehci: enable the cache maintenance
MCUX ehci controller driver support cache maintenance if
USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE is enabled.
Enable USB_DEVICE_CONFIG_BUFFER_PROPERTY_CACHEABLE if
CONFIG_UDC_BUF_FORCE_NOCACHE is false and CONFIG_NOCACHE_MEMORY
is true.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-20 14:51:55 -04:00
Fabrice DJIATSA
fe82353b82 drivers: display: use zephyr reset api for diyplay
Replace direct HAL api by zephyr reset api framework for display
peripheral block reset.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-20 14:50:57 -04:00
Fabrice DJIATSA
07cdebaf8e dts: arm: st: add reset control for display peripheral
add reset control registers information (on RCC_BUS_RSTR LTDCRST bit)
for display peripheral reset.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-20 14:50:57 -04:00
Maureen Helm
af57912af5 boards: adi: apard32690: Configure pmod spi pins
Configures pins for the SPI instance attached to the Pmod connector to
enable using this board with the pmod_acl shield.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-20 14:49:08 -04:00
Maureen Helm
64225c3db0 boards: shields: Add Pmod ACL sensor module
Adds a new shield definition for the Digilent Pmod ACL module. This
module provides support for an ADI ADXL345 3-axis accelerometer over a
Pmod SPI connector.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-20 14:49:08 -04:00
Kyra Lengfeld
0a7908588c Bluetooth: Mesh: add Kconfig options for BLOB chunk size
The MBT server, as the MBT client currently sets the maximum chunk size
according to maximum supported segments in the accesss layer. This might
be suboptimal for some use cases.
The added Kconfig options give customers the option to fine tune it
themselves.

Future work will include addition of an API for the customer to modify
it also during runtime.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2024-08-20 14:45:57 +02:00
Chang An
e8db417a00 LE Audio: add conn parameter for bt_vcp_vol_rend_cb
Add conn parameter to status/flags callbacks of bt_vcp_vol_rend_cb
to differentiate between remote and local changes.

Signed-off-by: Chang An <chang.an_1@nxp.com>
2024-08-20 14:45:35 +02:00
Yong Cong Sin
44c070fdcd subsys/profiling: fix extra frame in the traces
Check if the frame is within the text address before saving
into the buffer, this eliminates the extra, uninitialized frame
at the end of the unwind.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
55c7b9fad6 MAINTAINERS: add an entry for profiling/perf
Add an entry for the profiling tool.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
42362c6fcc subsys/profiling: relocate stack unwind backends
Relocate stack unwind backends from `arch/` to perf's
`backends/` folder, just like logging/shell/..

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
74537fc87a subsys/profiling: SYS_INIT not required
The timer & dwork can be statically initialized,
SYS_INIT is not strictly required.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
af7eb76ba4 subsys/profiling: shell cmd function should be static
These shell cmd function should be static.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
e330971ec5 subsys/profiling: kill timer in a single place
Currently, the timer is stopped:
- in the timer handler, when the buffer is full, or
- in work handler, when time's up

In any cases, the work handler is bounded to run to print
the message, so we can kill the timer there instead.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
d68642c732 subsys/profiling: add some util cmds
Added:
- `clear` to discard the buffer without printing
- `info` to print info about the buffer and if the
  profiler is running

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
8fc6d8adf2 subsys/profiling: use a more universal message when perf is running
"Perf is already running" works for `record` but is a little
strange when doing `printbuf`, so remove the "already" to
make it more universal.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
d4cd1be390 subsys/profiling: reset buf_full flag when we empty the buf
The `buf_full` flag is set when it is full, but dumping the
buf currently only resets the `idx`, this means that the perf
command only works when the buffer hasn't been full before.

Reset the flag when we clear the buffer.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
f213b5b95f subsys/profiling: remove unused declaration
`PERF_EVENT_TRACING_BUF_OVERFLOW` isn't used, remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
0065a81a38 subsys/profiling: remove cmd_perf as it is not doing anything
`cmd_perf` isn't doing anything meaningful, remove it so that
the help message will be printed when invoked. Updated
the help message of the main command.

```
uart:~$ perf
perf - Lightweight profiler
Subcommands:
  record    : Start recording for <duration> ms on <frequency> Hz
             Usage: record <duration> <frequency>

  printbuf  : Print the perf buffer
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Yong Cong Sin
cd3b8dd938 subsys/profiling: no need to explicitly set idx to 0
static perf_data is zero-initialized by default, there's no
need to explicitly set `idx` to `0`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-20 14:45:23 +02:00
Torsten Rasmussen
cdd3e6fa84 cmake: support list mode in Zephyr-sdk module package
Introduce list mode in Zephyr-sdk module package.

The list mode allows to list all Zephyr SDK's found in the system
without loading any of them.

Signature of the list mode is:
> find_package(Zephyr-sdk COMPONENTS LIST)

Will print valid Zephyr SDKs and their path, as well as defining the
following corresponding CMake lists:
- Zephyr-sdk      : List of Zephyr SDKs' version
- Zephyr-sdk_DIRS : List of Directories with a valid Zephyr SDK.
Each entry in Zephyr-sdk corresponds to the same entry index in the
Zephyr-sdk_DIRS list.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-20 14:45:09 +02:00
Torsten Rasmussen
32c33aeca8 cmake: minor cleanups of the FindZephyr-sdk.cmake module
Minor cleanup of the FindZephyr-sdk.cmake module.
- Honor the QUIET flag on find_package(Zephyr-sdk QUIET)
  Do not print messages when caller has specified QUIET in the
  'find_package()' call.
- include Zephyr extensions CMake module.
  FindZephyr-sdk.cmake uses zephyr_get() from extensions.cmake, and
  therefore the proper thing to do is to include said module in order
  to have the package re-usable.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-20 14:45:09 +02:00
Aytürk Düzen
5f00c18005 tests: bluetooth: tester: add nrf54h20 configs
Added:
nrf54h20dk_nrf54h20_cpuapp.overlay: Choose uart136 hwfc 115200
nrf54h20dk_nrf54h20_cpuapp.conf

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-08-20 14:44:44 +02:00
Henrik Brix Andersen
e60da1bd64 drivers: can: fake: install default core clock delegate at driver init
Install the default delegate for reporting the CAN core clock frequency at
driver instance initialization. This allows using the default clock
configuration when not using ztest.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-08-20 10:34:07 +02:00
Aleksander Wasaznik
a8a000dcb6 Bluetooth: byteorder.h: Add big-endian macros
This patch contains big-endian version of the macros present in that
file. The new code is formatted by clang-format, which is why the
formatting is different.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-08-20 10:33:59 +02:00
Pisit Sawangvonganan
b7d55d8ec6 style: tests: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
8f197c955d style: subsys: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
daae40811e style: soc: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
7906d33c45 style: samples: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
57b5f7193b style: lib: crc: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
ef639efb38 style: kernel: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
1bcae0ea9f style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Pisit Sawangvonganan
535b854d87 style: boards: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Jonathan Rico
cbb62333aa Bluetooth: L2CAP: remove commented-out assert
This assert cannot be turned on, as `pdu` will be NULL sometimes. This
is okay, it just means that the current channel doesn't have anything to
send and that we should probably try another one.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-20 10:33:31 +02:00
Jonathan Rico
c98bc820a3 Bluetooth: Host: remove outdated comment
This comment refers to an old piece of code that never got in main.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-20 10:33:31 +02:00
Dino Li
b9d8e9a634 it8xxx2/espi: disable IBF interrupt by calling interrupt controller API
Disable input buffer full interrupt for 60h/64h and 62h/66 ports by
calling interrupt controller API. The API has barrier mechanism to
ensure that a thread's requirement to disable peripheral interrupt
takes effect before enabling CPU interrupt. Therefore, the disabling
operation does not occur in ISR and results in interrupt 0 symptom.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-08-20 10:33:19 +02:00
Peter Ujfalusi
85758444f7 intel_adsp: clk: Configure correct cardinal clock divider for PTL
The Audio integration PLL is faster on PTL compared to earlier ACE
platforms: 442.368 MHz instead 393.216 MHz, however the default
divider remained 16, which will result incorrect cardinal clock speed.

Change the divider to 18 in order to get correct 24.576 MHz cardinal
clock.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-08-20 10:33:04 +02:00
Zhengwei Wang
4a7adb3d9d drivers: spi: pm: Add power management support for Ambiq Apollo3 SoCs SPI
Add power management support for Apollo3/Apollo3P SPI, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Zhengwei Wang
2cbf3b9365 drivers: i2c: pm: Add power management support for Ambiq Apollo3 SoCs I2C
Add power management support for Apollo3/Apollo3P I2C, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Zhengwei Wang
03a1fe6cd7 drivers: serial: pm: Add power management support for Apollo3 SoCs UART
Add power management support for Apollo3/Apollo3P UART, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Zhengwei Wang
1eb831efc3 soc: ambiq: Add power management support for Apollo3 SoCs
This commit adds support for the power management for
Apollo3/Apollo3P SoCs

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Joseph Liu
3b9a16daa2 MAINTAINERS: Add Nuvoton NPCM Platform for Nuvoton NPCM family
Add 'Nuvoton NPCM Platform' section for Nuvoton NCPM family of
processors.

Signed-off-by: Joseph Liu <kwliu@nuvoton.com>
2024-08-20 10:32:43 +02:00
Joseph Liu
2f19327ccb boards: arm: add npcm400 evb board
Add initial support for npcm400 evaluation board

Signed-off-by: Tyrone Ting <kfting@nuvoton.com>
Signed-off-by: James Chiang <cpchiang1@nuvoton.com>
Signed-off-by: Joseph Liu <kwliu@nuvoton.com>
2024-08-20 10:32:43 +02:00
Joseph Liu
3fb70c677a soc: arm: add nuvoton npcm400 support
Add initial support for nuvoton npcm400, which is a chip
family of Satellite Management Controller(SMC).

Add ecst python scripts to append the header used by ROM Code

Signed-off-by: Tyrone Ting <kfting@nuvoton.com>
Signed-off-by: James Chiang <cpchiang1@nuvoton.com>
Signed-off-by: Joseph Liu <kwliu@nuvoton.com>
2024-08-20 10:32:43 +02:00
Ha Duong Quang
3d384f5d1e boards: s32ze: enable NET_L2_ETHERNET when dummy L2 is disabled
Enable CONFIG_NET_L2_ETHERNET only when dummy L2 layer is not used.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
0135e7433b drivers: nxp_s32_netc_psi_vsi: update to RTD 2.0.0
Config to enable VLAN promiscuous and untagged.

Config to enable SI message interrupt.

Fix the build warning.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
3bff3168f5 drivers: spi_nxp_s32: update to RTD 2.0.0
Update to use rtd function to upadte Keep CS asserted
after the next transfer.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
b000ac7cf6 drivers: can_nxp_s32_canxl: Update to RTD 2.0.0
Create the set FD mode function because the old
RTD function is updated to static.

Fix the build warning by update the type of buffidx
and u32SysStatus arguments in the callback function
to uint32_t.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
dcc4b9c5ec drivers: uart_nxp_s32_linflexed: update to RTD 2.0.0
Update user_data pointer to 'const void (*)' type

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
d1ab07ba4a clock: update clock sources for RTD 2.0.0
Update clock sources for RTD 2.0.0.
Update core clock to 1GHz.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Daniel Kampert
e5d4b66b93 drivers: rtc: Wrong alarm mask in rtc_alarm_get_time
Fixing 3 issues:

1. The mask can be wrong if the alarm register is
set to a MAX value because the alarm bit is the
highest in the alarm register. The mask is now
generated by checking the AE_x bits in the time
registers.

2. Fixing possible NULL pointer exception in
alarm_set_time API. timeptr can be set to NULL
with mask 0 in the alarm_set_time function.
The regs variable for the I2C communication
is written with the correct value from timeptr
only when the right bit in the mask is set.

3. rv8263c8_alarm_set_time() now resets the
alarm status.

4. Interrupts are now enabled by using
rv8263c8_alarm_set_time() rather than when
setting an alarm callback.

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-20 10:32:06 +02:00
Georges Oates_Larsen
ebc7a4a2c8 net: shell: add conn_mgr shell commands
Adds commands for triggering conn_mgr functions and
tweaking conn_mgr connectivity flags.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-08-20 10:31:55 +02:00
Thao Luong
4cebe5354f drivers: adc: initialize to add ADC driver
Add minimal ADC driver code for EK-RA8M1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-08-20 10:31:43 +02:00
Benedikt Schmidt
d7fa28bf72 drivers: gpio: improve logging of PCAL64XXA
Improve logging of the driver for the port expander PCAL64XXA.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-20 10:31:27 +02:00
Sebastian Głąb
1a48a0174f tests: drivers: flash: common: Increase test coverage
Add functional test for flash_erase().
Add negative tests for flash_read(), flas_write(), flash_erase(),
flash_fill() and flash_flatten().
Add functional test for flash page layout.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-20 10:31:11 +02:00
Chaitanya Tata
58b6bd6621 modules: hostap: Fix MbedTLS configs
For Wi-Fi Enterprise testing these configurations are necessary.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 10:30:55 +02:00
Chaitanya Tata
e0ac3ec126 modules: hostap: Fix heap requirements for Enterprise
For Enterprise crypto MbedTLS needs more heap either separate pool or
libc heap, based on experiments 55000 was arrived for a successful
WPA2-EAP-TLS association.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 10:30:55 +02:00
Maochen Wang
1db73c3d4f wifi: Add WPA2 EAP-TLS support
Add basic WPA2 EAP-TLS support.
Also, add test infrasturcture esp. the certification handling,
non-certificate credentials are take as runtime input and certificated
are build time input for testing.

A real application can set certificates at runtime too.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 10:30:55 +02:00
Maochen Wang
789f4f79e0 hostap: rename WIFI_SECURITY_TYPE_EAP
Keep WIFI_SECURITY_TYPE_EAP, and define WIFI_SECURITY_TYPE_EAP_TLS
same value as WIFI_SECURITY_TYPE_EAP to make it backwards
compatible. Ready to support more EAP type in the comming PR.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-20 10:30:55 +02:00
Maochen Wang
0a951e2174 hostap: Support flushing PMKSA cache entries
Support flushing PMKSA cache entries in the reconnection
failed case of WPA3 SAE.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-20 10:30:55 +02:00
Maochen Wang
1a547dd40e hostap: Support getting Wi-Fi connection parameters recently used
Support saving and getting Wi-Fi connection parameters recently used.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-20 10:30:55 +02:00
Daniel DeGrasse
744f67c587 tests: fs: fat_fs_api: add support for testing SDMMC devices
Add support for testings SDMMC devices using the fat_fs_api test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-20 10:30:41 +02:00
Daniel DeGrasse
179f254c7e tests: fs: fat_fs_api: wipe partition header before test
Wipe partition header prior to fatfs testsuite starting. This insures
that the disk will be in an unformatted state at the start of the test,
so the first fs_mount() calls will fail as expected.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-20 10:30:41 +02:00
Jukka Rissanen
f93e19276e doc: tracing: net: Add information for network tracing
Add a simple documentation page that describes the network
tracing support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Jukka Rissanen
0b985acbd7 net: tracing: Add TX time tracing
TX time tracing tells how long it took from network packet
creation to when the stack got rid of it.
So the network stack allocates net packet, this is the
start time. The end time is when the packet is fully processed (sent)
by the network device driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Jukka Rissanen
a679dd9578 net: tracing: Add RX time tracing
RX time tracing tells how long it took from network packet
creation to when the stack got rid of it.
So the network device driver allocates net packet, this is the
start time. The end time is when the packet is fully processed.
Currently the limitation is that the RX time duration is used
for network packets that are tied to an open socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Jukka Rissanen
4911a4f8de net: tracing: Add net_send_data function tracing
Trace when a network packet is sent.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Jukka Rissanen
ea2ff40558 net: tracing: Add net_recv_data function tracing
Trace when a network packet has been received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Jukka Rissanen
491e12be2b net: tracing: Have a separate Kconfig option for socket API tracing
This is done for preparation to adding more network code tracing
to the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-19 21:50:21 -04:00
Tomi Fontanilles
4ea0e88687 scripts: ci: check_compliance: allow Kconfig references with '(' and '.'
For regexes such as `CONFIG_DEBUG_(OPTIMIZATIONS|INFO)` and
to be able to use `.*` as this syntax is used in the Kconfig search.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-19 21:50:10 -04:00
Paulo Santos
57e3877ac7 doc: kernel: iterable_sections: fix documentation typo
The docs for the iterable sections has a minor typo when
describing how to add the structs to the linker, repeating
'place the' twice.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2024-08-19 21:49:25 -04:00
Paulo Santos
eeb933b531 samples: drivers: adc: adc_sequence: fix adc_sequence channel vref info.
Fix wrong usage of channel adc_raw_to_millivolts on the sequence sample.

Signed-off-by: Paulo Santos <pauloroberto.santos@edge.ufal.br>
2024-08-19 17:23:32 -04:00
Ioannis Damigos
782967a1e3 gpio_smartbond: Fix port_set_masked_raw
Writing directly to Px_DATA_REG modifies pins which are not
indicated by mask, causing gpio_basic_api test to fail.

Use Px_SET_DATA_REG and Px_RESET_DATA_REG to modify only
pins indicated by mask.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
82d17f1f2c gpio_smartbond: Remove pdc entry only if it exists
Remove pdc entry only if index exists when CONFIG_PM
is set.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
df86860319 gpio_smartbond: Set pin to input when it is configured as GPIO_DISCONNECTED
Set pin to input with no resistors selected when it is configured as
GPIO_DISCONNECTED.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
bacd6c31d6 entropy_smartbond: Clear pending interrupts after disabling TRNG
Clear pending interrupts after disabling TRNG to avoid
smartbond_trng_isr getting called with TRNG disabled

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Arkadiusz Cholewinski
150a7cd810 twister: Add Nuvoton to manufacturer
Expand manufacturer table in hardwarempa.py to include Nuvoton.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-19 17:22:42 -04:00
Farah Fliss
ad254b06c8 drivers: input: gt911: Add support for multitouch events
The gt911 can recognize up to 5 touch points at a time.
Add code to support these multi-touch events.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-08-19 15:25:51 -04:00
Farah Fliss
bd658642e1 drivers: input: gt911: Fix coding style
Coding style was incorrect. Fix it.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
2024-08-19 15:25:51 -04:00
Farah Fliss
70664a0320 drivers: input: gt911: Run clang-format
Ran clang-format on the gt911 driver file  before
making any changes.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
2024-08-19 15:25:51 -04:00
Lucas Tamborrino
327c405266 boards: espressif: Add esp32c3_rust board
ESP32-C3-DevKit-RUST-1 is a ESP32C3 based board
that includes a builtin LED, button, WS2812,
temperature and humidity sensor (SHTC3) and a IMU
(ICM42670).

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-19 15:19:02 -04:00
Anke Xiao
33317a4a68 tests: subsys: pm: add ke17z test support
Update power_mgmt_soc testcase.yaml to support test for frdm_ke17z
and frdm_ke17z512 platforms.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:33 -04:00
Anke Xiao
df2858944a soc: nxp: kinetis: ke1xz: add support cpu power states
Enable the NXP Kinetis Low Power Timer (LPTMR) timer driver when
power management is enabled.
When the NXP KE1xZ SoC series is using the Arm SysTick as hardware
timer, the cycles/second will always be equal to the CPU core clock
frequency.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:33 -04:00
Anke Xiao
8628fa26c7 boards: nxp: add lptmr counter and timer features for KE17Z
Add LPTMR driver counter support for NXP frdm_ke17z and frdm_ke17z512
boards, tested 'drivers.counter.basic_api' case.
Enable cpu power states and determine the default
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC from devicetree when using the
Arm SysTick hardware timer.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:33 -04:00
Anke Xiao
17ee197635 dts: arm: nxp: nxp_ke1xz.dtsi: add lptmr support
Add lptmr support for ke17z, add related configuration for lptmr
driver.
Add supported CPU power states for idle, stop, partial stop 1, and
partial stop 2.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:33 -04:00
Fredrik Gihl
9eaf488907 drivers: sensor: tmp114: Add support for OVERSAMPLING attr
Tmp114 has an average function, according to the datasheet this is
default disabled. Add attribute to enable this feature.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2024-08-19 15:18:25 -04:00
Anke Xiao
fc770b757c boards: nxp: frdm_ke17z: enable wdog driver
Enable wdog32 driver for frdm_ke17z and frdm_ke17z512 to test
drivers.watchdog case.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:18 -04:00
Anke Xiao
1b0a7420d0 dts: arm: nxp: nxp_ke1xz.dts: add wdog support
Add wdog32 support and select 128K LPO clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:18:18 -04:00
Sadik Ozer
f419a6778f boards: arm: adi: Enable display for MAX32690EVKIT board
MAX32690EVKIT board has CFAF128128B1-0145T display which
is 128x128 graphic display.
The pins goes to display is not standard SPI interface, it requires
SPI bitbanging to drive display.

This commit enables mpi dbi display support with LVGL graphic library
Pin connection of display is 3wire mode

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-19 15:18:09 -04:00
Sadik Ozer
3b4ba70d10 boards: arm: adi: Enable display for MAX32680EVKIT board
MAX32680EVKIT board has CFAF128128B1-0145T display which
is 128x128 graphic display.
This commit enables mpi dbi display support with LVGL graphic library
Pin connection of display is 3wire mode

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-19 15:18:09 -04:00
Sadik Ozer
390a6be08c boards: arm: adi: Enable display for MAX32672EVKIT board
MAX32672EVKIT board has CFAF128128B1-0145T display which
is 128x128 graphic display.
This commit enable mpi dbi display support with LVGL graphic library.
Pin connection of display is 3wire mode

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-19 15:18:09 -04:00
Sadik Ozer
d42301bc8c drivers: spi: Fix twister build issue
Update spi_bitbang_transceive_async function parameter to it match
with correct one that declared in struct

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-19 15:18:09 -04:00
Sadik Ozer
ff311dcb41 drivers: mpi_dbi: Fix wrong bit index for 3wire mode
BIT(8) will generate mask for 9th bit. Index starts from 0.

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-19 15:18:09 -04:00
Nicolas Pitre
2a41d85709 k_mem_map: move some assertions to unconditional checks
Dynamic memory allocation depends on various factors and many are
only known at runtime depending on application inputs.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-19 15:17:48 -04:00
Anke Xiao
2a1b924aa0 boards: nxp: frdm_ke17z512: update dts to update bus_clk divider
Update the bus_clk divider value from 4 to 2 for frdm_ke17z512
platform. The bus and flash clocks are raised to 16Mhz to ensure
that `tests.kernel.timer.timer_jitter_drift` sample passes.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-19 15:17:32 -04:00
Jakub Topic
f395519104 drivers: rtc: rv3028: preserve CLKOUT when enabling callbacks
This commit addresses an issue where enabling the alarm or update
callbacks unexpectedly disabled the RTC's programmable clock output
during runtime.

The interrupt configuration has been moved to the driver's init
function.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-19 15:17:22 -04:00
Emil Gydesen
73a4e92e06 MAINTAINERS: Add missing exclude of mesh for Bluetooth Host
include/zephyr/bluetooth/mesh/ was missing from the exclusion
files for Bluetooth Host, and include/zephyr/bluetooth/audio/
was there twice.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-19 15:16:55 -04:00
Gerard Marull-Paretas
cfe5bd9224 device: remove support for deprecated init levels
EARLY, APPLICATION and SMP levels are no longer support for device
drivers as 2 releases have happened since its deprecation. Add a
validation macro so that compilation fails if the given level is not
valid.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-19 10:10:18 -04:00
Gerard Marull-Paretas
07f3ac95be sys: util: remove deprecated ceiling_fraction
It has been deprecated for 2 releases, so the time to remove it has
come.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-19 10:10:18 -04:00
Gerard Marull-Paretas
fd4ec84fc6 arch: arm: remove deprecated cmsis.h
Compatible headers have already been kept for 2 releases, so the time to
remove them has come.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-19 10:10:18 -04:00
Laurentiu Mihalcea
402c12fa2a doc: add SCMI documentation
Add documentation page for SCMI.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-19 10:05:16 -04:00
Laurentiu Mihalcea
6b689d0207 firmware: scmi: add support for pinctrl protocol
This includes helper function for pin configuration
and a DT binding for the pinctrl DT node.

There's two important notes to be made regarding this
protocol:

* pinctrl drivers have no subsytem API to implement as opposed
to clock control drivers. Because of this (and the fact that
`pinctrl_configure_pins()` doesn't require a `struct device`
handle) the pinctrl driver consists only of a helper function,
which implements the `PINCTRL_CONFIGURE_PINS` command.
Additionally, the `scmi_protocol` structure is defined inside
the pinctrl helpers source file to avoid redundant code
(otherwise, each SCMI-based pinctrl driver would have to define
it its source file).

* each vendor may have their own set of pin propeties and DT
representations for them. Because of this, there can't be a
generic, SCMI-based pinctrl driver. As such, each vendor who
wants to use the SCMI support for pinctrl operations will have
to implement their pinctrl driver (which, to put it simply,
revolves around implemeting `pinctrl_configure_pins()`) and
make use of the pin configuration function introduced in this
commit. Moreover, this means that each vendor will have control
over the way their pin properties are encoded in the
`scmi_pinctrl_settings` structure.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-19 10:05:16 -04:00
Laurentiu Mihalcea
350e36a47a firmware: scmi: add support for clock management protocol
This includes:
	1) Source containing helper functions, each
	implementing a command from the clock management
	protocol.

	2) A clock controller driver making use of said
	helper functions and implementing the clock
	subsystem API.

	3) A DT binding for clock protocol node.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-19 10:05:16 -04:00
Laurentiu Mihalcea
413c77cf4e firmware: introduce SCMI core support
Introduce core support for ARM's SCMI (System Control and
Management Interface). This includes:

* shared memory (SHMEM) driver. This consists of a suite
of functions used to interact with the shared memory area.

* shared memory and doorbell-based transport layer driver.
Data is passed between platform and agent via shared
memory. Signaling is done using polling (PRE_KERNEL) and
doorbells (POST_KERNEL). This makes use of Zephyr MBOX API
(for signaling purposes) and the SHMEM driver (for polling
and data transfer).

* core driver - acts as glue between transport and protocol
layers. Provides synchronized access to transport layer
channels and channel assignment/initialization.

* infrastructure for creating SCMI protocols

This is based on ARM's SCMI Platform Design Document: DEN0056E.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-19 10:05:16 -04:00
Balsundar Ponnusamy
0f7349d3ca tests: drivers: dma: scatter_gather: adding agilex5 board support
added overlay and conf file for agilex5 board

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2024-08-19 10:02:53 -04:00
Balsundar Ponnusamy
b05ae3de0c CODEOWNERS: updated codeowner for DMA AXI driver
updated codeowners file

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2024-08-19 10:02:53 -04:00
Balsundar Ponnusamy
ff9c2f47d3 dts: arm64: intel: add dts node for dma controller for agilex5
add dts support for dma to accomodate dma driver bringup on agilex5

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2024-08-19 10:02:53 -04:00
Balsundar Ponnusamy
3ab212c1db drivers: dma: add dma driver for designware axi DMA controller
Adding dma driver source for designware axi dma controller

Signed-off-by: Balsundar Ponnusamy <balsundar.ponnusamy@intel.com>
2024-08-19 10:02:53 -04:00
Ali Hozhabri
4067b0d311 boards: shields: Add X-NUCLEO-WB05KN1 BLE expansion board
Add support for X-NUCLEO-WB05KN1 which is a BLE expansion board based on
the BLUENRG-LPS.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-08-19 10:02:42 -04:00
Morihisa Momona
9afc79d16a wifi: airoc: join/leave of multicast address
Add the support of join and leave of multicast address group.

Signed-off-by: Morihisa Momona <morihisa.momona@infineon.com>
2024-08-19 10:02:25 -04:00
Morihisa Momona
ba3d49f38f wifi: airoc: FIX interface up (in softap)
When creating softap, interface is not recognized as up.

Signed-off-by: Morihisa Momona <morihisa.momona@infineon.com>
2024-08-19 10:02:25 -04:00
Morihisa Momona
f95c878493 wifi: airoc: FIX Security modes of SoftAP
Updated security modes verification in ap_enable.
SoftAP supports following modes:
 - No security (WHD\_SECURITY\_OPEN)
 - WPA2-PSK security (WHD_SECURITY_WPA2_AES_PSK)
 - WPA3-SAE security (WHD_SECURITY_WPA3_SAE)

Signed-off-by: Morihisa Momona <morihisa.momona@infineon.com>
2024-08-19 10:02:25 -04:00
Morihisa Momona
6b21699f50 wifi: airoc: FIX connection to AP with open security
STA fails to connect AP, of which security is open.

Signed-off-by: Morihisa Momona <morihisa.momona@infineon.com>
2024-08-19 10:02:25 -04:00
Andries Kruithof
1f1241af8f Bluetooth: Audio: tests: remove code duplication
The function interval_to_sync_timeout was copied several places.
Made it into a common function and removed duplicate code

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-08-19 10:02:11 -04:00
Andries Kruithof
98e7362891 Bluetooth: Audio: CAP: Remove unused globals from babblesim test
The CAP acceptor test had some unused globals, which are removed

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-08-19 10:02:11 -04:00
Andries Kruithof
b7f5e7eb9e Bluetooth: Audio: CAP: refactoring babblesim test for acceptor
The babblesim tests for the CAP acceptor test have been refactored
for improved readability

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-08-19 10:02:11 -04:00
Fin Maaß
f775ab4975 drivers: watchdog: litex: add litex watchdog
this adds a driver for the litex watchdog.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-19 10:02:01 -04:00
Fin Maaß
c3752bf442 soc: riscv: litex: soc.h: add litex_write64
add function for a 64-bit write in litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-19 10:02:01 -04:00
Mike Banducci
0d9a5e6f19 samples: flash: Exclude the stm32h755xx/m4 from flash samples
Exclude the nucleo_h755i_q m4 core from the flash_shell samples,
as the m4 core in stm32h7 parts does not have flash support in Zephyr.

Signed-off-by: Mike Banducci <michael.banducci@sandc.com>
2024-08-19 10:01:39 -04:00
Mike Banducci
88954c3fd9 boards: stm32: Add nucleo_h755zi_q support
Add support for the ST nucleo h755zi_q board which
uses an stm32h755 in the st nucleo-144 board
format.

Signed-off-by: Mike Banducci <michael.banducci@sandc.com>
2024-08-19 10:01:39 -04:00
Mike Banducci
5a8e60b12e soc: stm32: Add support for the stm32h755
Add support for the stm32h755 which is a close relative of
the stm32h745 with additional cryptography and hashing
peripherals.

Signed-off-by: Mike Banducci <michael.banducci@sandc.com>
2024-08-19 10:01:39 -04:00
Sebastian Głąb
4a9ca27060 samples: drivers: mbox: Disable UART Flow Control on nrf54h20 and nrf54l15
Nrf54h20dk and nrf54l15 have UART Flow Control enabled
by default on all cores.
It's a source of problem when mbox sample is run in Twister.
Twister opens serial port only on host core,
thus nobody confirms reception of logs from remote core.
As a result, remote core stucks on printing boot banner.

Twister fails sample due to the timeout while waiting for messages
from remote to host.

Disable Flow Control on remote core when mbox sample is executed
on nrf54h20 or nrf54l15.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-19 10:01:00 -04:00
Grzegorz Chwierut
7cca59c81a twister: pytest: Allow using pytest-args from command file and yaml
Extend pytest-args from configuration yaml file with args
from command line instead of overwriting.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-19 10:00:47 -04:00
Krystof Sadlik
777be46e1a tests: build_all: sensors: Added fxls8974
Added fxls8974 to build_all tests

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Krystof Sadlik
bc4eebfae7 Samples: Sensor: Added mimxrt1040 config, and fxls8974
Added mimxrt1040_evk to inregration platforms, so that fxls8974 is tested,
and added config for mimxrt1040_evk to sensor_shell

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Krystof Sadlik
913d6a3e55 dts: bindings: Added bindings for the fxls8974 accelerometer
Added bindings to enable fxls8974 accelerometer

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Krystof Sadlik
99235d6516 boards: mimxrt1040_evk: Added pinctrl for fxls8974
Added fxls8974 pinctrl to the dts file

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Krystof Sadlik
928d025201 drivers: sensor: fxls8974: Added driver for this accelerometer
Added driver for the fxls8974 accelerometer which is present on the
mimxrt1040_evk board.

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Chun-Chieh Li
087680a49c boards: nuvoton: numaker_pfm_m467: add usbd
Add usbd test feature for the numaker_pfm_m467 board

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-19 10:00:07 -04:00
Chun-Chieh Li
9cf4e1aae5 drivers: usb: udc: change numaker m46x usbd clock source to hirc48m
Change NuMaker M463/M467 series USBD clock source to HIRC48M.
This makes core-clock and its clock source PLL not required
to be multiple of 48MHz.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-19 10:00:07 -04:00
Chun-Chieh Li
3b1d2bb286 soc: nuvoton: numaker: m46x: fix hirc48m typo
Fix typo on HIRC48M. This clock source is required by:
- USB 1.1 OTG PHY
- USBD
- USBH
- OTG

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-19 10:00:07 -04:00
Chun-Chieh Li
86c991ed03 drivers: usb: udc: add NuMaker series USBD controller driver
Add UDC driver for Nuvoton NuMaker series USBD controller

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-19 10:00:07 -04:00
Thao Luong
8a475e5431 soc: renesas: ra: Sort MCU in soc.yml
Sort RA MCU follow device series.

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-08-19 09:59:27 -04:00
Quy Tran
95b4a7996d MAINTAINERS: Update Renesas RA platform files for RA6 boards
Change the Renesas RA platform files so that it includes s the RA6 boards

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Quy Tran
370bd31d2a dts: bindings: clock: Change clock control binding for Renesas RA
Background of this modification is to make clock control
driver code provided by Renesas vendor to support for Renesas MCU
on Zephyr.

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Quy Tran
516794843d boards: renesas: Add initial support for FPB-RA6E2 board
Add initial support for Renesas FPB-RA6E2 board

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
f80e5dc0fd boards: renesas: Initial support Renesas EK-RA6M4 board
- Initial support for EK-RA6M4 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
5f4b9bb0d9 soc: renesas: Add initial support for RA6M4 SoC
- Initial support for RA6M4 SoC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
7c67fa131f boards: renesas: Initial support Renesas EK-RA6M2 board
- Initial support for EK-RA6M2 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
5f53861508 soc: renesas: Add initial support for RA6M2 SoC
- Initial support for RA6M2 SoC

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Danh Doan <danh.doan.ue@bp.renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
1e20f0cc22 boards: renesas: Initial support Renesas EK-RA6M1 board
- Initial commit to support EK-RA6M1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
26159f4ad7 soc: renesas: Add initial support for RA6M1 SOC
- Initial commit to support RA6M1 SOC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
7118473d72 boards: renesas: Add initial support for EK-RA6E2 board
Initial support for Renesas EK-RA6E2 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
5f454da371 soc: renesas: Add initial support for RA6E2 SOC
Initial support for Renesas RA6E2 SOC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
3c2909af24 board: renesas: Add initial support for RA6E1 SoC
Initial commit to support FPB-RA6E1 SoC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
ed0bdfbee6 soc: renesas: Add initial support for RA6E1 SoC
Initial commit to support RA6E1 SoC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: default avatarQuy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
b257bdec63 boards: renesas: Add initial support Renesas EK-RA6M3 board
Initial commit to support EK-RA6M3 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: default avatarQuy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
300382aab2 soc: renesas: Add initial support for RA6M3 SoC
Initial commit to support RA6M3 SoC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
6d316d0cc9 boards: renesas: Add initial support for EK-RA6M5 board
Initial commit to support Renesas EK-RA6M5 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
c9ba4bf234 soc: renesas: Add initial support for RA6M5 SoC
Initial commit to support RA6M5 SoC

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
7060672c37 drivers: serial: Initial support for SCI UART
First commit to support serial driver running on r_sci_uart for Renesas
RA devices.

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
922ee61b8d drivers: gpio: Update gpio driver for Renesas RA series
Background of this modification is to make gpio driver code
provided by Renesas vendor to be an official support for Renesas
MCU on Zephyr

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-19 09:59:27 -04:00
Duy Phuong Hoang. Nguyen
ffad404a6a drivers: pinctrl: Update pinctrl driver name for Renesas RA series
Update pinctrl driver which used for Renesas RA series with
PFS secure register

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-08-19 09:59:27 -04:00
Rex Chen
1b8fa46ac1 hostap: add 11v BTM query support
Add 11v BTM query L2 layer cmd support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-08-19 09:58:40 -04:00
Rex Chen
ff7bb3e85c hostap: add pwe config for station
Add pwe config for station connect cmd.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-08-19 09:58:01 -04:00
Maxime Vincent
a08335b317 soc: arm: nxp: add lpc55x26 SCTimer support
Add support for the LPC55x26 SCTimer peripheral

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-08-19 09:57:28 -04:00
Maxime Vincent
af5aabf245 soc: arm: nxp: add lpc55x26 support
Add basic support for the LPC55x26 SoCs

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-08-19 09:57:28 -04:00
Gerard Marull-Paretas
e28232d515 doc: extensions: drop warnings_filter
This extension was created to overcome C domain/Breathe limitations.
This is no longer needed as we link directly to Doxygen pages.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-19 09:57:05 -04:00
Helmut Lord
15c4df0aaa input: double tap
Added input double tap psuedo device

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2024-08-19 09:56:26 -04:00
Gang Li
d3815dae43 sample: net: wifi: reduce timeout for ICMP probe sent by server
DHCPv4 server will probe the offered IP address (send ICMP echo request)
and wait for 1s (default) before offering the address. STA sends out DHCP
discover, but gets no response. Windows automatically assigns the network
card an IP address of 169.254.xx.xx.
So set timeout for ICMP probe sent by the server to 100ms.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-08-19 09:56:14 -04:00
Jonathan Rico
6fa6c4c256 Bluetooth: L2CAP: Downgrade user_data API error to a warning
When user_data is not zeroed-out, the API returns an error. Downgrade
the API error to a warning log instead.

Introducing this check (#76489) broke a few PTS tests, as user_data is
not initialized by `net_buf_alloc()`. Doing so is in discussion:

https://github.com/zephyrproject-rtos/zephyr/issues/77088

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-19 09:55:49 -04:00
Jonathan Rico
454aadcd7a Bluetooth: L2CAP: Mention recv() callback is mandatory
It is already checked against `NULL` in the codepaths that take the
`ops` struct as a parameter.

Add a note in the documentation to make the requirement official.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-19 09:55:36 -04:00
Jonathan Rico
6a3602a306 net: buf: Clear user_data on allocation
For two reasons:
- prevent exposing the previous user's info to the new user
- make NULL checks on user_data work

Since we don't really have a field that specifies what part of the
user_data array is valid, we have to rely on other checks.

Such a check, if user_data contains a callback, is comparing against
NULL before calling said callback.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-19 09:55:24 -04:00
Chris Friedt
1c28ded7c3 scripts: ci: guideline_check: mitigate excessive false positives
In order to reduce excessive false positives for Coding
Guidelines checks in CI, maintain a list of paths that are
marked "safe" for reserved names to be implemented or declared.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-19 09:51:34 -04:00
Luc BEAUFILS
ad3e941ad3 drivers: add SSD1327 display controller driver
Implements the driver for the OLED SSD1327 controller.
This driver is based on the ssd1306 driver due to their similarities.
Only the SPI control bus is supported.

Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
2024-08-17 08:56:24 -04:00
Jonas Remmert
88c7a2103b doc: boards: pollux: revise debug instructions
Revise and simplify build and debug instructions by documenting the regular
Zephyr way with west.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-08-17 08:56:13 -04:00
Jonas Remmert
a79b9a369c doc: boards: pollux: reformat tables in documentation
Some tables used more than 120 characters per line. This commit compresses
the formatting of the tables in the documentation.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2024-08-17 08:56:13 -04:00
Miguel Gazquez
c04352aa98 boards: stm32l562e-dk: add st7789v screen controller
This commit add the description of the fmc in the SoC stm32l5, and the
description of the screen controller st7789v in the board stm32l562e-dk.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-08-17 08:56:04 -04:00
Miguel Gazquez
c8c526313a drivers: display: st7789v: add support for BGR565
Add support for BGR565 pixel format in the st7789v driver.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-08-17 08:56:04 -04:00
Miguel Gazquez
8d74553053 drivers: mipi_dbi: add driver for st,stm32-fmc
Add support for using the stm32 fmc to interact with a display
controller, using Intel 8080 protocol with a 16 bits parallel bus.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-08-17 08:56:04 -04:00
Miguel Gazquez
40e9061330 dts: bindings: add DT binding for MIPI DBI API on stm32 fmc
This commit add a binding for using the stm32 fmc with the MIPI DBI API.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-08-17 08:56:04 -04:00
Raffael Rostagno
7debafe22e dts: pinctrl: esp32s3: Support for SDHC
Added pinctrl and dts settings for SDHC

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-17 08:55:37 -04:00
Raffael Rostagno
847832d8f7 sdhc: esp32: Register writing macros cleanup
Macros to write specific peripheral registers were removed as a
compile flag was added to hal_espressif requesting struct bitfields
to have strict volatile access (thus 32-bit access), allowing for
the cleanup.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-17 08:55:37 -04:00
Raffael Rostagno
1857197422 sdhc: esp32: Clock control setting from DTS
Enable SDIO clock using clock control subsystem instead of
low level functions.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-17 08:55:37 -04:00
0e3d9cc2cc drivers: mipi_dbi: lower ROM usage by switching reset time to k_timeout_t
Calling k_msleep() leads to a int64_t division, causing udivdi3 and
similar to be linked in.

Keep the outer API the same, but switch to k_timeout_t before passing
to the inner API. This saves 1916 B of ROM.

Signed-off-by: Michael Hope <mlhx@google.com>
2024-08-17 08:55:28 -04:00
Sean Madigan
2a46edeaed bluetooth: controller: kconfig: select power control for plm
Path loss monitoring does not work without LE Power Control
also enabled in the controller, so update the dependencies
in the kconfigs so path loss monitoring selects power
control.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-08-17 08:55:13 -04:00
Sean Madigan
022d339f67 tests: bluetooth: shell: Add test case to build shell with plm
Path loss monitoring was not being enabled anywhere, meaning
that issues could be merged in without catching the issue.

This commit adds a test case to build the shell with path
loss monitoring enabled to catch issues.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-08-17 08:55:13 -04:00
Sean Madigan
2e7c488484 bluetooth: host: conn: Fix renamed callback_list
callback_list was renamed to conn_cbs in commit 3eb975d.

However plm callback was missed due to it not being built
anywhere.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-08-17 08:55:13 -04:00
Tom Burdick
caa0c0a467 rtio: Split the rx and tx buffer unions
Transmit/write buffers are expected to be constant values given to the
operation to transmit but not mutate. Seperate the OP_TX and OP_RX
operation description unions.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-17 08:55:01 -04:00
Jordan Yates
7598330a74 sd: lower log level for boot message
This log message does not need to be repeated 10 times at the INFO level
when the same information is provided after all the retries are done:
```
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Legacy card detected, no CMD8 support
<inf> sd: Card does not support CMD8, assuming legacy card
```
to
```
<inf> sd: Card does not support CMD8, assuming legacy card
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-17 08:54:51 -04:00
Eric Southam
97d9876e82 doc: gsg: Update index.rst for macOS
Added python-tk to the brew install statement.
In order to use the zephyr gui tools python must also have the
"tkinter" (python tk interface) tools available.

tkinter is NOT part of 'python3' through homebrew on macOS.

fixes #76811

Signed-off-by: Eric Southam <eric.southam@lvt.com>
2024-08-17 08:54:36 -04:00
Tomi Fontanilles
26c17efb6f xtensa: arch: put the top-level xtensa_apis group into arch-interface
It needs to be long to some group to not show up in the topmost
`Modules` list.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-17 08:53:24 -04:00
Tomi Fontanilles
0846032301 pm: put back s2ram to subsys_pm Doxygen group
3506a7925a originally put it, and
24082d582f removed it.
The `pm_s2ram` group needs to belong to some group to not show up in
the topmost `Modules` list.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-17 08:53:24 -04:00
Henrik Brix Andersen
cce7e9a706 github: hello_world_multiplatform: run on Ubuntu 24.04
Run the multi-platform Hello World build on Ubuntu 24.04.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-08-16 14:09:01 -04:00
Lucas Tamborrino
ca31dbc0bc drivers: sensor: icm42670: Add I2C bus support
Add bus interface so the driver can support both
SPI and I2C bus.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-16 14:08:44 -04:00
Raffael Rostagno
5a69cc03cf boards: esp8684_devkitm: Add support
Add support for board esp8684_devkitm

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
0d274a1d7e drivers: uart: esp32c2: Add support
Add UART support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
c1f8948e76 drivers: counter: esp32c2: Add support
Add counter support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
cc2e0f2131 drivers: gpio: esp32c2: Add support
Add gpio support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
8a48cd1130 drivers: pinctrl: esp32c2: Add support
Add pinctrl support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
0db07994c6 drivers: timer: esp32c2: Add support
Add timer support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
78832ab78f drivers: intc: esp32c2: Added support
Added support for ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
782ccf2e99 drivers: hwinfo: esp32c2: Add support
Add hwinfo support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
15aefe63e0 drivers: entropy: esp32c2: Add support
Add entropy support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
4ac8a75d6a drivers: clock_control: esp32c2: Add support
Support for ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
fad55d18ad soc: esp32c2: Add support to ESP32C2 and ESP8684
Files for SoC support: ESP32C2 and ESP8684 (same core).
Basic device tree configuration.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Raffael Rostagno
b4b4d7ccd0 west.yml: Update for ESP32C2 and ESP8684
HAL update for ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-16 14:08:22 -04:00
Benjamin Cabé
cb3ddf43e0 doc: extensions: fix kconfig extension in parallel build environment
kconfig options should be *merged* instead of *appended*, otherwise
search index can be huge, among other side effects.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-16 14:07:37 -04:00
Emil Gydesen
6956674201 tests: Bluetooth: BAP: Add -RealEncryption=1 to enc broadcast test
The shell script did not provide -RealEncryption=1 which then never
really did proper encryption, which is the point of the test.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-16 14:07:15 -04:00
Benjamin Cabé
3735ae94a1 profiling: doc: clean up grammar/spelling
Clean up documentation pages for the new perf tool
as they contained several typos, grammar errors, and
duplicated content between main doc page and sample
page

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-16 16:30:07 +01:00
Sadik Ozer
420f230b9f drivers: spi: Select PINCTRL for MAX32 MCUs
PINCTRL require to be selected for SPI

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-16 16:29:55 +01:00
Sadik Ozer
b4b946eaad drivers: i2c: Select PINCTRL for MAX32 MCUs
PINCTRL require to be selected for I2C

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-16 16:29:55 +01:00
Marek Sroka
226e381d6e drivers: pwm: pwm_stm32: Add error log for 16-bit timer buffer overflow
If the value in the period_cycles variable exceeds UINT16_MAX, a 16-bit
timer will return an error code 134. An error message was added to
indicate that the value does not fit into the 16-bit timer register.
An error message advising developers to reduce the value to 16-bit
simplifies the process, allowing them to understand immediately that
reducing the value will resolve the issue.

Signed-off-by: Marek Sroka <m.sroka14@gmail.com>
2024-08-16 16:29:49 +01:00
Jonathan Rico
80a92f51a5 Bluetooth: Host: Add missing bt_tx_irq_raise()
Trigger the TX processor on connection teardown.

When a disconnection happens before the controller has acknowledged some
ACL fragments the host has sent, we run `process_unack_tx()` to free
those unacknowledged buffers and their associated TX contexts.

The problem is that the TX processor still holds a reference to the conn
object. That reference is not released until the TX processor is
triggered again and figures out that the connection is invalid.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-16 16:29:41 +01:00
Jonathan Rico
043de7da2a Bluetooth: Host: Add disconnection during TX fragmentation test
Verifies that we don't leak connection references when the peer goes out
of range whilst we are fragmenting and sending data to the controller.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-16 16:29:41 +01:00
Pisit Sawangvonganan
9347887b33 wifi: esp32: update link_mode to reflect actual negotiated PHY mode
Updated `link_mode` assignment to reflect the actual negotiated PHY mode
by using `esp_wifi_sta_get_negotiated_phymode`.

Since `ap_info.phy_11b` ... `ap_info.phy_11ax` represent the access point
capabilities and not the actual current link mode.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-16 16:29:36 +01:00
Vinayak Kariappa Chettimada
3590bd648f Bluetooth: Controller: Fix missing invalid aux offset check
Fix missing invalid aux offset check that was being caught
in a development assertion check. If aux offset where less
than the PDU time of the primary channel PDU, radio was
redundantly being setup delayed for reception that was
being caught in an assertion check.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-16 16:29:28 +01:00
Vinayak Kariappa Chettimada
521ea5561a Bluetooth: Controller: Add assertion checks for delayed radio start
Add assertion checks for delayed radio start.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-16 16:29:28 +01:00
Johann Fischer
f851cad162 usb: device_next: add device configuration change notification
Notify only if the device configuration has changed. Pass only the
configuration value as the message status, the actual device speed can
be obtained with usbd_bus_speed().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-16 08:50:25 -04:00
Krzysztof Chruscinski
cd3dae7c2c soc: arm: nordic_nrf: timing: Fix wrapping
Fix wrapping case for SoC with 32 bit TIMER.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-16 08:50:13 -04:00
Georgij Cernysiov
b8bf23b707 drivers: flash: stm32 ospi: remove not required setting of writeoc
Remove dead code. The write opcode instruction
is set based on dev_data a couple of lines after.

This was supposed to be in the merged "memory map
support for other modes" PR.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-16 08:49:51 -04:00
Dmitrii Golovanov
b8bed5b077 twister: Fix TypeError at get_installed_packages
Fix confusing `TypeError: 'type' object is not subscriptable`
at _get_installed_packages() if twister runs on python version < 3.9

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-16 08:49:33 -04:00
Alberto Escolar Piedras
1aaea30adb tests/net/lib/lwm2m: Switch description to native_sim
native_posix is deprecated, let's switch the
description & comments to refer to native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
4ea6cdf7db tests/misc/check_init_priorities: Fix integration_platforms list
Fix what seems like a silly mistake in the integration
platforms list.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
3976dce591 tests/kernel thread_apis: Switch native_posix to native_sim in comment
native_posix is being deprecated, let's update a comment

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
53a47a2e1a tests/kernel/context: Correct dependency
An ifdef should have been also checking for native_sim,
let's correct it.

Note: By now native_sim builds with "native_posix compatibility mode"
enabled, which sets BOARD_NATIVE_POSIX to avoid breaking all this kind
of dependencies. But that will stop soon.
So let's fix the dependencies.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
12d37484fa tests/bluetooth/shell: Switch tests from native_posix to native_sim
A few tests were only allowed for native_posix, but we are
deprecating it. Let's switch them to native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
f32eb18a0c tests/drivers/tee/optee: Switch from native_posix to native_sim
native_posix is being deprecated, let's switch this test to native_sim
instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Alberto Escolar Piedras
dbf31d7a91 tests/drivers disk_access: Switch from native_posix to native_sim
native_posix is being deprecated, let's switch this test to native_sim
instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
cyliang tw
5025487dd0 soc: nuvoton: numaker: add poweroff for m2l31x
Add support of sys_poweroff API on m2l31x series.
It could support SPD0~2 standby or DPD0~1 deep power down mode.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-16 11:20:26 +01:00
Théo Battrel
f3dcaaee35 Tests: Bluetooth: Add another ISO frag test
This test create a setup where an ISO broadcaster will send fragmented
data and get stopped after sending the first fragment and repeating that
operation multiple time to verify that buffers are not leaked.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-16 11:20:14 +01:00
Théo Battrel
3a098c9f61 Bluetooth: Host: Unref ISO fragments after disconnection
When sending data using ISO and the data is fragmented, if the
connection is cut before all the fragments are sent, the data buffer
will be leaked.

Fix the issue by unref'ing the buffer when ISO is not in a connected
state.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-16 11:20:14 +01:00
Théo Battrel
70696f5b0f Bluetooth: Host: Free ISO TX context
When disconnected while sending data, if ISO doesn't get the number of
completed packets it will not call `process_unack_tx` and thus will leak
TX context.

Fix that by setting the connection state in ISO disconnection which will
trigger a call to `process_unack_tx`.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-16 11:20:14 +01:00
Gerard Marull-Paretas
2bdf2b7cc3 boards: remove IPM_NRFX default from nRF5340 based boards
This option is not required, IPM_NRFX is enabled based on DT status.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-16 11:20:08 +01:00
Gerard Marull-Paretas
f1fc468e99 samples: remove redundant CONFIG_MBOX_NRFX_IPC=y
It is no longer needed, Kconfig option is enabled based on DT status.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-16 11:20:08 +01:00
Gerard Marull-Paretas
12199258d8 boards: remove MBOX_NRFX_IPC default from nRF5340 based boards
It is no longer needed, Kconfig option is enabled based on DT status.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-16 11:20:08 +01:00
Gerard Marull-Paretas
8e7919cf65 drivers: mbox: nrfx_ipc: enable based on DT status
Enable the driver using the standard mechanism used everywhere else in
the tree. It is possible here as it is a singleton, so there's no
dependency on nrfx instantiation magic.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-16 11:20:08 +01:00
Andries Kruithof
363133e62c tests: Bluetooth: Allow BT_BAP_BASS_MAX_SUBGROUPS larger than 1
The BAP scan delegator test does not compile when
BT_BAP_BASS_MAX_SUBGROUPS is larger than 1.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-08-16 11:19:58 +01:00
Alberto Escolar Piedras
ad0a1c76bd shell: Correct one comment
The comment should refer to the architecture, not one particular
board. Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:21:18 +01:00
Alberto Escolar Piedras
0be493ca7a boards/native/nrf_bsim/common/cmdline.h: Update comments
Replace native_posix w native_sim in the comments,
and account for the fact that we have several nrf bsim targets now

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:21:18 +01:00
Alberto Escolar Piedras
17369f6209 unit_testing: Correct one comment refering to native_posix
It should have reffered to the architecture,
not one of its board's name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:21:18 +01:00
Alberto Escolar Piedras
4ea61a794b docs: boards native: Remove mentions of native_posix
native_posix is deprecated. Let's remove its mentions
from the general docs and figures.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:21:18 +01:00
Alberto Escolar Piedras
05f5390b92 twister tests: Use native_sim instead of native_posix
native_posix is deprecated. native_sim should be used in its place.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:21:08 +01:00
Alberto Escolar Piedras
0e8eeb37fd drivers/flash/flash_simulator: Remove reference to native_posix
Remove references to native_posix as the it is being deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:20:58 +01:00
Alberto Escolar Piedras
23d4a14398 drivers/eeprom/eeprom_simulator: Remove reference to native_posix
Remove references to native_posix as the it is being deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:20:58 +01:00
Alberto Escolar Piedras
12c5cf4ce2 drivers/display/display_sdl: Remove reference to native_posix
Remove references to native_posix as the it is being deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:20:58 +01:00
Alberto Escolar Piedras
767149129a drivers can_native_linux: Remove reference to native_posix
Remove references to native_posix as the it is being deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 09:20:58 +01:00
Henrik Brix Andersen
9584008d9f net: buf: deprecate special putter and getter functions
Deprecate the net_buf_put() and net_buf_get() functions.

Special handling of net_bufs in k_fifos is no longer needed after commit
3d306c181f, since these actions are now
atomic regardless of any net_buf fragments.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-16 09:55:11 +02:00
Henrik Brix Andersen
69fe9b0c50 net: buf: remove use of special putter and getter functions
Convert users of net_buf_put() and net_buf_get() functions to use
non-wrapped putters and getters k_fifo_put() and k_fifo_get().

Special handling of net_bufs in k_fifos is no longer needed after commit
3d306c181f, since these actions are now
atomic regardless of any net_buf fragments.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-16 09:55:11 +02:00
Chekhov Ma
cb47ed206b boards: imx93_evk: document the configuration of board muxes
Document the added board level driver to control EXP_SEL muxes

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-08-16 09:51:51 +02:00
Chekhov Ma
10e4d091a2 boards: imx93_evk: add board.c to control board muxes
i.MX 93 EVK has a series of digital MUXes controlled by ADP5585 GPIO
expander. This commit adds board level initialization to such MUXes to
control these MUXes.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-08-16 09:51:51 +02:00
Henrik Brix Andersen
6925692902 usb: msosv2: add additional MSOSv2 descriptors
Add additional Microsoft OS 2.0 USB descriptor structures. These are
documented in the Microsoft OS 2.0 Descriptors Specification.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-16 09:50:25 +02:00
Emil Gydesen
9014bb66a6 Bluetooth: Logging: Fix typo Voluem -> Volume
Fix a small typo.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-16 09:50:03 +02:00
Fabio Baltieri
7e65299a7e MAINTAINERS: add duda-patryk to Google Platforms collabs
Add Patryk to the Google Platforms area as collaborator.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-15 21:57:18 +01:00
Lucien Zhao
3f96bfbe2d boards: nxp: add mimxrt1180_evk board
Support rgpio/lpuart peripherals
Support linkserver/jlink debug ways
Test cases: hello_world; button; blinky; synchronization; philosophers

There is one limitation with flashing and debugging the SoC's second
core(M7) that will be addressed with furture submission

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
e073c92da3 drivers: pinctrl: update pinctrl/pinctrl_imx.c
Add code enable rt1180 iomuxc clock

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
ad0a066f4f drivers: gpio: update rgpio driver code
RGPIO model on RT1180 is same with igpio, however,
current driver can't support.

Update gpio driver to support gpio pad control

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
222162dc5e drivers: clock_control: update clock_control/clock_control_mcux_ccm_rev2.c
Due to two lpuart instance use common clock root,
update driver to support new feature for RT1180.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
8782ab935d dts: arm: nxp: add dts files for RT1180
The offset of the peripheral is abstracted so that
the peripheral can be defined in RT118x.dtsi,that
is a common dtsi file for RT1180.

Due to cm33 core, add ns/s files which are served
on different status for cm33 core.

Add rt118x_cm7 dtsi file

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Lucien Zhao
d7c9bd88ca soc: nxp: imxrt: add imxrt118x series and update related files
Add new RT118x device, due to structure is different from rt11xx series.
Boot header also differ from rt10xx and rt11xx, so add support for boot
container.

define new container name and new container tag

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-15 14:51:02 -04:00
Benjamin Cabé
45ccd4a769 drivers: display: ssd1306: do not re-declare errno
errno is a reserved macro. Use ret instead.
Fixes a bug introduced with commit
bfb541ccbe.

Fixes #76751.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-15 14:50:41 -04:00
Marek Pieta
cd931fdb73 drivers: usb: common: nrf_usbd_common: Handle USB SoF IRQ first
The processing order is relevant if the IRQ handler call is delayed and
multiple interrupts are pending. Handle USB SoF before other interrupts
to ensure that it would be reported before other USB events (e.g. before
completed USB data transfers).

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2024-08-15 14:50:25 -04:00
Tahsin Mutlugun
1dbfa7f39c tests: i2c: i2c_target_api: Add MAX32 boards to testcase.yaml
Enable single role I2C target API tests for MAX32 boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Tahsin Mutlugun
7237debe70 tests: i2c: i2c_target_api: Add configuration for MAX32666EVKIT
Enable I2C target API tests for MAX32666EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
01f9b9f0ec tests: drivers: i2c: Add MAX32675EVKIT overlay file
Enable I2C test for MAX32675EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Furkan Akkiz
c33f99351f tests: drivers: i2c: Enable i2c driver tests for max32662evkit board
Enable I2C test for MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-15 14:50:13 -04:00
Tahsin Mutlugun
aa394e0004 tests: i2c: i2c_target_api: Assign DMA channels to MAX32 I2C nodes
Add DMA channels to test overlay files as DMA support is now available
for MAX32 I2C driver.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Tahsin Mutlugun
04e8570266 drivers: i2c: i2c_max32: Add DMA support for controller mode
MAX32 I2C peripheral can benefit from DMA transfers. This patch adds
DMA support for transactions made in controller mode.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
b4278bff4f boards: adi: Add I2C to MAX32675EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Tahsin Mutlugun
8d2393bde3 boards: adi: Add I2C to the list of drivers for MAX32666 boards
Add I2C to .yaml and .rst files for MAX32666EVKIT and MAX32666FTHR.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-15 14:50:13 -04:00
Furkan Akkiz
acb1200575 boards: adi: Add I2C to MAX32662EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' file of MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
066a43b1d7 boards: adi: Add DMA to MAX32675EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
3002840e03 dts: arm: adi: Add MAX32675 DMA instance and binding file
Add DMA0 node to MAX32675 dtsi file and add binding file for DMA slots.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Furkan Akkiz
bd20604b94 boards: adi: Add DMA to MAX32666EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
5617287105 boards: adi: Add DMA driver in MAX32666FTHR driver list
Add DMA in supported driver list

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Mert Ekren
68d09a88f9 dts: Add MAX32666 DMA nodes and bindings
Insert dma0 in MAX32666 devicetree and add devicetree bindings
for MAX32 DMA driver.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-15 14:50:13 -04:00
Furkan Akkiz
ec2c378675 boards: adi: Add DMA to MAX32662EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-15 14:50:13 -04:00
Furkan Akkiz
32bf51b438 dts: arm: adi: Add MAX32662 DMA instance and binding file
Add DMA0 node to MAX32662 dtsi file and add binding file for DMA slots.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-15 14:50:13 -04:00
Daniel Leung
2f314a1269 tests: thread_analyzer: limit platforms to run on
This adds platform_allow to limit the scope of platforms to
build and run. This avoids the need to constantly nudge
the platform filter lists to exclude platforms which fail
to build or run due to incompatible kconfigs.

Fixes #76945

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-15 14:50:03 -04:00
Sudan Landge
b3fe647eaf arch: arm: cortex_a_r: Fix restore of registers while exiting exception
This commit fixes potential unpredictable behavior, caused by using
the ^ form of ldmia instruction, while exiting an exception in SMP
mode on Cortex-A/R.

Change:
Use "pop" instead of "ldmia" to restore user mode registers while
exiting from an exception via `z_arm_cortex_ar_exit_exc`.

Reason for change:
Processor mode is always set to system (MODE_SYS) before calling
`z_arm_cortex_ar_exit_exc` and hence, the user mode register can be
accessed directly without the ^ form of the instruction. Also, LDMIA
instruction is UNPREDICTABLE in SYStem mode.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-08-15 12:10:42 -04:00
Sudan Landge
6d8deac010 arch: arm: cortex_a_r: Fix usage of stmdb while entering an exception
This commit fixes the unpredictable behavior, caused by using the
^ form of stmdb instruction, while entering an exception in SMP mode
on Cortex-A/R.

Change:
Use "push" instead of "stmdb" to store user mode registers on
stack while entering an exception in SYStem mode.

Reason for change:
As reported in discussion/#75339, processor is already in SYS mode
after entering `z_arm_cortex_ar_enter_exc()` in an exception and
using stmdb is UNPREDICTABLE in system mode. Also, the user mode
register can be accessed directly without the ^ form of the
instruction. The solution suggested to fix this is to use
`stmdb sp!, {r0-r3, r12, lr}` which can save the user registers,
update the SP and avoid an extra instruction.
We use "push {}" instruction instead since it is the preferred
mnemonic over `stmdb`.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-08-15 12:10:42 -04:00
Dominik Lau
2f64e7c5ba boards/st/stm32f429i_disc1: add pyocd support
This commit enables pyOCD support for the STM32F429I Discovery board.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-15 12:10:23 -04:00
Sylvio Alves
d3541febcf boards: esp32: revert HEAP size to integer number
The commit ad63ca284e replaced
default value of 65535 to UINT16_MAX. That change might cause
confusion as it suggests that the HEAP size is limited to UINT16_MAX.

For this particular scenario, 65535 bytes is a resonable amount of
HEAP to allow both Wi-Fi and BT working in coexistance, which could be
increased as per application.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-15 12:00:06 -04:00
Przemyslaw Bida
a923a4afec net: openthread: Fix missing dependency for OT diag shell.
Commit fixes missing dependency for `ot diag cw` command for nrf5xx
by adding default vale to `NRF_802154_CARRIER_FUNCTIONS`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-08-15 11:59:45 -04:00
Bjarki Arge Andreasen
3f681806ef drivers: rtc: fake: Patch alarm and update fakes
The RTC alarm and update fakes where not defined correctly. This
commit adjusts them to match the RTC API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-15 11:59:34 -04:00
Raffael Rostagno
6279793fda boards: esp32c6_devkitc: Test files for power management
Config files for pm testing

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Raffael Rostagno
6c6fa9aaf0 samples: pm: esp32: Enable pull-down for simple testing
Sample was modified to enable pull-down when using EXT1 pins for
wake-up on deep sleep sample in order to simplify testing in case
user doesn't notice external pull-down will be needed otherwise.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Raffael Rostagno
b12336c80e pm: clock_control: esp32c6: Peripherals clock init review
Clock is disabled at startup for LP core peripherals, greatly
improving power consumption in deep sleep mode.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Raffael Rostagno
3ee2a62a55 pm: esp32c6: Power management support
Power management support (light/deep sleep) for ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-15 11:59:08 -04:00
Stan Skowronek
f74592dcde arch: arm: Use voting lock for multi-core boot race condition
Port of similar change in arm64 that eliminates exclusive load/store
instructions, which may not work when MMU/MPU/cache are disabled.

Based on: 7904c6f0f3

Signed-off-by: Stan Skowronek <stan@corellium.com>
2024-08-15 11:58:01 -04:00
Gerard Marull-Paretas
bb7fa56611 doc: doxygen: update doxygen awesome to v2.3.3
It includes some tiny fixes for newer Doxygen versions.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Gerard Marull-Paretas
d1d6dea989 doc: doxygen: remove redundant footer file
It is not used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Gerard Marull-Paretas
e8a3304ba4 doc: doxygen: upgrade to 1.12.0
Update to latest Doxygen version.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Tim Lin
50a23a6195 drivers/espi: it8xxx2: Fix H2RAM address mask size to match SRAM size
The base address of H2RAM can be as large as KB(CONFIG_SRAM_SIZE), so
the mask for the H2RAM address should be (KB(CONFIG_SRAM_SIZE)-1).
This PR corrects the size of the mask.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-15 12:40:33 +02:00
Alberto Escolar Piedras
70b46c6573 toolchain/gcc.h: Link to instructions on deprecation
Let's link from the deprecated instructions,
To increase visibility and hopefully avoid developers forgetting to
do so.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-15 12:40:16 +02:00
Alberto Escolar Piedras
57358e61aa cmake: deprecated.cmake: Link to deprecation instructions
Let's link to the deprecated instructions.
To increase visibility and hopefully avoid developers forgetting to
do so.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-15 12:40:16 +02:00
Alberto Escolar Piedras
50145bbf61 Kconfig: Link to deprecation instructions
Let's link from the deprecated instructions.
To increase visibility and hopefully avoid developers forgetting to
do so.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-15 12:40:16 +02:00
Alberto Escolar Piedras
e60ad59e9f docs: api_lifecycle: Use a better release as example for deprecation
1.16 was not meant to be a release, and 1.14 was long ago.
Let's use as example something much more recent.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-15 12:40:16 +02:00
Alberto Escolar Piedras
3f48089874 docs: api_lifecycle: Change where to list deprecated items
When deprecating APIs,
let's tell users to add to one GitHub issue tracking all
deprecated APIs meant to be removed,
so the process is simpler and hopefully developers do it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-15 12:40:16 +02:00
Francois Ramu
e7b267d727 tests: drivers: clock control of stm32wba serie
Add the nucleo_wba55 target for running the test clock
configuration. HSI must not be disabled

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-15 10:20:11 +01:00
Florian Weber
97832dc5eb rtio: memory block allocation
fixes the issue that ENOMEM is not returned if there is not enough memory

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2024-08-15 10:17:38 +01:00
Gang Li
cb1c377e7c hostap: add SAE_PWE_EARLY_EXIT Kconfig
In order to mitigate side channel attacks, even if the PWE is found the WPA
supplicant goes through full iterations, but in some low-resource systems
this can be intensive, so, add an option to exit early.
Note that this is highly insecure and shouldn't be used in production

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-08-15 10:17:28 +01:00
Chaitanya Tata
69ad8937b1 manifest: hostap: Pull fix for SAP
SAP build fails due to missing WPA supplicant driver OP.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-15 10:17:21 +01:00
Chaitanya Tata
6b79e34b95 modules: hostap: Convert WPA cli to selectable option
This should be configurable by applications in case a full CLI interface
to the WPA supplicant is needed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-15 10:17:21 +01:00
Luis Ubieda
12152443b6 doc: releases: bluetooth: host: Add entry of UATT MTU APIs
Referencing bt_gatt_get_uatt_mtu added, marked as experimental.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-15 10:17:13 +01:00
Luis Ubieda
09e2c73531 samples: bluetooth: mtu_update: Modified Sample to use UATT MTU
To demonstrate the usage of the UATT MTU API to determine if a payload
with its associated length can be sent over a GATT notification.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-15 10:17:13 +01:00
Luis Ubieda
75f70c4636 tests: bsim: bluetooth: Refactor MTU Update test
To isolate Central and Peripheral in two separate builds.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-15 10:17:13 +01:00
Luis Ubieda
775cd201c3 bluetooth: host: Add API to get a connection's UATT MTU
Similar to bt_att_get_mtu but only considering the Unenhanced ATT
channel.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-15 10:17:13 +01:00
Mark Wang
564f348612 drivers: udc: mcux: support the UDC_EVT_SOF
Enable the MCUX USB controller driver sof, then
convert it to zephyr UDC_EVT_SOF event.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-15 10:17:00 +01:00
Pisit Sawangvonganan
14c6925596 ztest: replace shell_fprintf(sh, SHELL_ERROR, ...) with shell_error
Replace `shell_fprintf(sh, SHELL_ERROR, ...)` with
`shell_error(sh, ...)` since it brings the same underlying
action with less typing.

Note: `shell_error` already concatenates `\n` to format strings,
so we remove `\n` from the original code.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-15 10:16:36 +01:00
Pisit Sawangvonganan
347c56c600 ztest: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in `subsys/testsuite/ztest/src/ztest.c` file.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-15 10:16:36 +01:00
Declan Snyder
96d25bf903 MAINTAINERS: Remove DT bindings area
Now that the dts/bindings filter has been removed from
Devicetree Binding area, this area serves no real purpose.

Move the include/dt-bindings files to their respective areas.

Fix some of the orphaned dts/bindings paths.

Add regex filter for any binding with "zephyr" in the name to be
in the devicetree area.

Fix the imx_spc.h file being in it's own pm/ folder instead of
power/ like the other power related headers.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-15 10:16:21 +01:00
Daniel Kampert
f849140de7 drivers: sensor: Add attribute for gain and resolution
- Add SENSOR_ATTR_GAIN and SENSOR_ATTR_RESOLUTION
- Remove SENSOR_ATTR_GAIN from tsl2540 header

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-15 10:16:12 +01:00
Dmitrii Golovanov
a4cb802d54 twister: DeviceHandler improve DUT selection
Improve DUT selection at DeviceHandler: for each DUT it counts
how many test instances have been failed on it during the current
twister execution, so the next available DUT will be chosen
ordering the eligible DUTs by less failures occured so far.

The new selection mechanism should increase chances to retry failed
tests on different DUTs, for instance to resolve ploblems when some
DUTs have connectivity or HW issues slowing down test plan execution,
or even block the execution when only one test suite runs whereas
the same first DUT candidate in the list is not working and others
were not chosen.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Dmitrii Golovanov
ab9cb5f8b2 twister: PyTest plugin's DUT release sequence change
Change Twister PyTest plugin's test finalizing sequence to release
the DUT it is used as the very last operation, after the Test Instance
status becomes fully updated from the execution results.

This also fix a race condition possible when pytest plugin releases
the DUT and it becomes acquired by another test while the current test
is not yet finalized completely.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Dmitrii Golovanov
c5e8ac7cbf twister: DeviceHandler count test failures on DUTs
Twister DeviceHandler - add test failure counter for how many
test instances have been failed on each DUT (Device Under Test)
when it executes the current test plan.
Output DUT falure counter summary at the end of Twister run.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Dmitrii Golovanov
bd6e1a2da4 twister: DeviceHandler make DUT counter increment atomic
Twister DeviceHandler - make DUT use counter increment
operation atomic.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Dmitrii Golovanov
21f4ec8b14 twister: Fix DeviceHandler exit on exception at 'flash before'
Fix Twister DeviceHandler exit on SerialException when
it connects to the serial device in 'flash before' mode.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Dmitrii Golovanov
44852d05ec twister: Improve DUT release at DeviceHandler
Several improvements at Twister DeviceHandler when it releases
current DUT (Device Under Test):

 - release the exact DUT which is used for the test instance
   instead of all configured DUTs which happened to have
   the same serial device configured.

 - Twister PyTtest harness plugin adjustment to the above.

 - additional debug logging to track DUT waiting/retain/release.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-15 10:15:41 +01:00
Mahesh Mahadevan
d27facff57 soc: rw6xx: Add support to wakeup from an external pin
Add support to wakeup from an external pin

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-08-15 10:15:28 +01:00
Mahesh Mahadevan
197e939a11 dts: nxp: Add support to wakeup from a pin input
Some SoC's allow wakeup from an external pin

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-08-15 10:15:28 +01:00
Neil Chen
f1948ecc9a samples: shared_mem: support shared_mem for frdm_mcxn236 board
disable sramx, support sample example shared_mem for frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
dad8b212ba tests: userspace: support userspace example for frdm_mcxn236 board
disable sramx, support userspace example for frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
8c38621568 tests: drivers: uart: add uart_async_api support for frdm_mcxn236 board
add uart_async_api test support for frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
488ed025c9 tests: drivers: spi: add spi test support for frdm_mcxn236 board
add spi test support for frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
a5811de9e2 tests: drivers: i2c: add i2c test support for frdm_mcxn236 board
add i2c test support for frdm_mcxn236 board

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
a42e10fb73 boards: frdm_mcxn236: add frdm_mcxn236 board
add frdm_mcxn236 board support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
fd7139e9da drivers: watchdog/usb: Update CONFIG_SOC_SERIES_MCXNX4X name
Change CONFIG_SOC_SERIES_MCXNX4X name to CONFIG_SOC_SERIES_MCXNX

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
19d6217118 drivers: timer: remove fsl_power.h for MCXN236
remove fsl_power.h in os_timer driver for MCXN236

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
007499ac41 soc: mcxn23x: add SOC support for MCXN23x
Change mcx series to "mcxn" and add MCXN23x support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Neil Chen
4e8efc79c9 dts: mcxn23x: add dts for MCXN23x
add dts for MCXN23x

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-08-15 10:15:12 +01:00
Parthiban Nallathambi
17f11332a9 dts: bindings: fix typo in icm42688
accelerometer range is not suffixed with 'G' in the header
and also in the usages, but bindings use with suffix 'G'.
remove the suffix 'G' to have same reference.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-08-14 19:07:20 -07:00
Andrey VOLKOV
213da72d06 timer: cortex_m_systick: use direct interrupt handler instead of C-function
The current driver implements the global defined "systick" interrupt
callback "sys_clock_isr" as a standard C function with an argument.
However, ARM's direct interrupt handlers do not have any arguments;
they must be declared as "void handler(void)".

Additionally, the direct handler should include some missing special
header/footer.

Fixes: #75693

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-14 15:57:15 -05:00
Andrey VOLKOV
98439c4166 timer: cortex_m_systick: add new generic file 'cortex-m-systick.yaml'
Relocate common properties from dedicated SOC's related
Cortex-M SysTick DTS files into the new generic
'cortex-m-systick.yaml' one.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-14 15:57:15 -05:00
Andrey VOLKOV
59db014f43 timer: cortex_m_systick: minor refactoring
Replace useless "TICKLESS" define by
IS_ENABLED(CONFIG_TICKLESS_KERNEL) one, and replace error-prone
'cycle_t' pseudotype defs by real typedefs.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2024-08-14 15:57:15 -05:00
Maochen Wang
05d5044a38 soc: rw6xx: Enable NXP_WIFI_MONOLITHIC feature
The monolithic feature allows to link the binary blobs with
the application during the build.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-14 15:54:50 -05:00
Maochen Wang
dbb5fef25c mcux: add Kconfig to configure NXP WiFi monolithic feature
The monolithic feature allows to link the binary blobs with
the application during the build.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-14 15:54:50 -05:00
Thao Luong
8bcfbf4d80 drivers: i2c: Add I2C driver support for Renesas RA8 devices
Add implemetation of I2C driver use IIC Master for Renesas RA8 devices

Signed-off-by: Ha Nguyen <ha.nguyen.fz@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 15:53:50 -05:00
Maxime Vincent
3a895ecea8 soc: arm: nxp lpc55xx: fix nxp,ctimer-pwm init procedure (attach clock)
Add clock init for nxp-ctimer-pwm DTS nodes.

Signed-off-by: Maxime Vincent <maxime@veemax.be>
2024-08-14 15:52:36 -05:00
Adrian Bonislawski
784bc06e7e soc: intel_adsp: ace: set xtensa ccount per platform
XTENSA_CCOUNT_HZ is no longer common to ACE soc series
This will fix Hz value for ACE30 platform

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-08-14 15:51:55 -05:00
Ryan Erickson
bbcf23e95e drivers: modem: cellular: hl7800 fix enter cmux
The OK response should be processed before entering CMUX mode.

Use UART ISR mode by default.

Fix warnings and errors produced by the sample.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2024-08-14 15:51:04 -05:00
Alex Fabre
84889d4783 drivers: eth: fix stm32_hal PHY address resolution
When the PHY is hardware designed to communicate on address '1', the mdio
node of the device tree is labeled 'ethernet-phy@1'.
Therefore, STM32 HAL must adapt to resolve the appropriate DT node:
'ethernet_phy_1'.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-08-14 15:50:24 -05:00
Pisit Sawangvonganan
e6ca8d9d12 modem: modem_cellular: streamline instance configuration with new macro
Introduced `MODEM_CELLULAR_DEFINE_INSTANCE` macro to streamline
the definition and initialization of modem cellular instances.

This macro enables passing parameters that vary among modems, including:
`power_pulse_duration_ms`, `reset_pulse_duration_ms`, `startup_time_ms`,
`shutdown_time_ms`, `autostarts`, `init_chat_script`, `dial_chat_script`
and `periodic_chat_script`.

This will reduce the number of redundant lines in the code, aiming for
improved maintainability.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 14:46:00 -04:00
Pisit Sawangvonganan
1f2c898788 modem: modem_cellular: consolidated user pipe data in to single macro
Introduced the `MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES` macro to
consolidate multiple user pipe data definitions into a single macro call.

This will reduce the number of redundant lines in the code, aiming for
improved maintainability.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 14:46:00 -04:00
Sadik Ozer
568abf12b7 tests: drivers: spi: Remove duplicate properties
SPI pins are defined in board.dts file to simplify usage
so that no need to redefine it in overlay files

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-14 14:45:27 -04:00
Sadik Ozer
d0d1a85e2d boards: adi: Define default SPI pins for MAX32 boards
Define SPI pins to simplify SPI usage

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
5f5473ed33 tests: drivers: spi: Enable spi driver tests for max32662evkit board
Enable SPI test for MAX32662EVKIT.
SRAM size increased to get enough space for SPI test image

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
f89633d198 boards: arm: adi: Add SPI to MAX32662EVKIT board driver list
Add SPI into 'index.rst' and '.yaml' file of MAX32662EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
bc754b4f4e dts: arm: adi: Add MAX32662 SPI instances
Add SPI instances of MAX32662 to dtsi file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Sadik Ozer
5952603173 tests: drivers: spi: spi_loopback: Add MAX32666FTHR
Enable SPI test for MAX32666FTHR board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-14 14:45:27 -04:00
Sadik Ozer
86d69adf6c boards: arm: Add SPI driver in MAX32666FTHR driver list
Add SPI in supported driver list

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-14 14:45:27 -04:00
Sadik Ozer
10475e4b11 dts: arm: adi: Add MAX32666 SPI instances
This commits add MAX32666 SPI instances in dts file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
52006222c4 tests: drivers: spi: Add MAX32675EVKIT overlay file
Enable SPI test for MAX32675EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
1cffd2ba22 boards: arm: adi: Add SPI to MAX32675EVKIT board driver list
Add SPI into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
b0cab6474c dts: arm: adi: Add MAX32675 SPI instance and binding file
Add SPI nodes to MAX32675 dtsi file and add binding

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
2b3c730f0a tests: drivers: spi: spi_loopback: Add MAX32680EVKIT
Enable SPI test for MAX32680EVKIT board.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
1eb1b263c0 boards: arm: Add SPI driver in MAX32680EVKIT driver list
Add SPI in supported driver list.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
ea088fc420 dts: arm: adi: Add MAX32680 SPI instances
This commit adds MAX32680 SPI instances in dtsi file.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
d6d47c7ebe tests: drivers: spi: Add MAX32672 boards overlay file
Enable SPI test for MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
ce99d95d5b boards: arm: adi: Add SPI to MAX32672 boards driver list
Add SPI into 'index.rst' and '.yaml' file of MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Furkan Akkiz
097a1fcc02 dts: arm: adi: Add MAX32672 SPI instances
Add SPI instances of MAX32672 to dtsi file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
f5b34e9bd3 tests: drivers: spi: Add MAX32670EVKIT overlay file
Enable SPI test for MAX32670EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
28938bb958 boards: arm: adi: Add SPI to MAX32670EVKIT board driver list
Add SPI into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Mert Ekren
cac7b9470e dts: arm: adi: Add MAX32670 SPI instance and binding file
Add SPI nodes to MAX32670 dtsi file and add binding

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
f55f93075c tests: drivers: spi: spi_loopback: Add MAX32655 boards
Add MAX32655FTHR and MAX32655EVKIT board configuration for SPI loopback
test. Supports interrupt and asynchronous transfers as well as 16-bit
frames.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
33ee9cdd2b boards: arm: Include SPI in MAX32655 boards documentation
Add SPI to the list of supported peripherals for MAX32655FTHR and
MAX32655EVKIT boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Tahsin Mutlugun
15f099594f dts: Add MAX32655 SPI nodes and bindings
Insert spi0 and spi1 in MAX32655 devicetree and add devicetree bindings
for MAX32 SPI driver.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 14:45:27 -04:00
Jiafei Pan
7380e287ef dts: binding: refine nxp rdc property
Define rdc property in a yaml file and include it in the peripheral's
dts binding.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-08-14 14:43:46 -04:00
Henrik Brix Andersen
ec85b0b4ef dts: arm: nxp: lpc55sxx: fix sram node address
Add missing "0" to the SRAM devicetree node addresses.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-14 14:43:24 -04:00
Carles Cufi
26ed19baeb boards: nordic: nrf54l15pdk: Default to nrfutil runner
nrfutil is becoming the default tool for flashing Nordic devices.
Default to it for the nRF54L15.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-14 14:42:57 -04:00
Nikodem Kastelik
6b7558a9bf samples: boards: nrf: system_off: add support for retained_mem
Now the sample can showcase RAM retention using retained_mem driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-14 12:35:17 -04:00
Nikodem Kastelik
d7e16a0197 tests: drivers: retained_mem: api: add nrf54l15 support
As nRF54L15 supports retained_mem driver,
this test should be executed on this target.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-14 12:35:17 -04:00
Nikodem Kastelik
44e89e649c boards: nordic: nrf54l15pdk: add retained_mem to supported drivers
This driver is now supported on nRF54L15 device.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-14 12:35:17 -04:00
Nikodem Kastelik
022e81e8d2 drivers: retained_mem: nrf: implement using nrfx_ram_ctrl helper
Now retained_mem driver can utilize nrfx_ram_ctrl helper
for nRF devices. It provides abstraction over various RAM retention
peripherals like POWER, VMC or MEMCONF.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-14 12:35:17 -04:00
Félix Piédallu
61e5958eff log: formatting: Add configuration for blue DBG log
It's usual to show debug logs as blue.
Showing dbg and info with different colors are good,
but it's preferable to keep info logs with default
color.

Signed-off-by: Félix Piédallu <felix@piedallu.me>
2024-08-14 12:35:01 -04:00
Jordan Yates
a390f450ec sensor: voltage_divider: don't pulse enable pin
Don't pulse the enable pin on boot if the device is going to immediately
go into suspend mode via `zephyr,pm-device-runtime-auto`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-14 12:34:45 -04:00
Charles Dias
0be1f31e16 drivers: video: stm32_dcmi: add set and get ctrl
Add set_ctrl and get_ctrl functions.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-08-14 12:34:13 -04:00
Aleksander Wasaznik
8b4907ee97 Bluetooth: bsim: deduplicate compile scripts
Some tests have a compile script for that test alone, named
`_compile.sh` or `_build.sh`. These scripts are useful for developers to
avoid compiling the world. But these scripts were not run in the CI.

These scripts were previously not suitable for running in the CI because
would put the artefact in the source directory, but this is no longer
the case, and the CI could run these scripts now.

This commit renames any `<test>/test_scripts/_compile.sh` and
`<test>/test_scripts/_build.sh` to `<test>/compile.sh`. The test runner
in CI will ignores any file named `compile.sh`, so there is no need for
a underscore prefix.

This fits into and extends the hierarchical structure of `compile.sh`
chain that starts at `:/test/bsim/compile.sh`, the CI build script tree.

The newly moved scripts now become a part of the build script tree,
called from a `compile.sh` where a duplicate set of build commands was
before. The sub scripts use `run_in_background` to preserve the
parallelism as it was before this change.

This removes an error-prone duplication and makes the CI test all the
build scripts.

Tests that did not have any compile script are not given one for now.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-08-14 12:33:53 -04:00
Grzegorz Chwierut
913434e83d twister: pytest: Capture and log error messages from subprocess
Updated the Pytest-Harness methods to capture and log error messages from
the subprocess, when pytest command fails.
Ensured that error messages are logged with `--inline-log` option
and placed in twister log reports.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-14 12:33:27 -04:00
Tahsin Mutlugun
99603e4c38 drivers: gpio: gpio_max32: Fix high-impedance setting
Put disconnected GPIOs to high impedance state by setting their
direction to input and pad control to none.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-14 12:33:16 -04:00
Alberto Escolar Piedras
c071cd72ca rtio: Fix if def for native targets
Z_SPIN_DELAY already behaves differently in
POSIX arch based targets and real targets
there is no need to ifdef around it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-14 12:32:47 -04:00
Emil Gydesen
053347375b arch: arm: Fix missing include for sys_define_gpr_with_alias
The sys_define_gpr_with_alias macro was defined by arch.h,
but was used by the two exception.h files that did not include it.

Attempting to include arch.h from exception.h would resolve
in a recursive include, so the macro was simply moved to the
files that used it.

An alternative could have been to define a new file that defined it,
that could have been included by exception.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-14 09:16:26 -04:00
Ederson de Souza
fe573ebec6 tests/misc/llext-edk: Do run the test, instead of only building it
As commit 6a1d9877ef ("cmake: Add LL_EXTENSION_BUILD to EDK flags")
made clear, only building an application with the EDK is not enough to
prevent regressions. This patch address that by also running the
application using the extension built with the EDK.

To provide a more comprehensive test, the application runs the extension
code on both kernel and user space, using a parameter sent by the
application. Assertions on the output from the application are used to
ensure expected results.

For now, tests only run on qemu_cortex_r5, but this can be expanded in
the future.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-08-14 09:15:40 -04:00
Ederson de Souza
1893a12d37 twister/pytest: Inform pytest which platform a test is being done for
While the option to inform pytest about which platform a test is for
(platform being the board, such as mps2/an385) is available, it wasn't
being used. This patch fixes that, by building a pytest command which
includes the platform.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-08-14 09:15:40 -04:00
Ederson de Souza
55613d035b twister/pytest: Add unlaunched_dut fixture
Add a new fixture, `unlaunched_dut`, which is basically the `dut`
one, but without launching the device - thus also not building the
application. It is useful for tests who need a finer control of
the building of the application, before the dut can be launched
to run it.

It will be used on a future patch, which will use it to enable LLEXT EDK
tests.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2024-08-14 09:15:40 -04:00
David Leach
e4cc0f2780 manifest: hal_nxp: Update to SDK 2.16.000
Updated mcux portion of NXP HAL to mcux SDK v2.16.000

Update MIMX9352 part numbers

Signed-off-by: David Leach <david.leach@nxp.com>
2024-08-14 09:15:31 -04:00
Evgeniy Paltsev
e8a375ec23 MAINTAINERS: add evgeniy-paltsev as a co-maintainer for ARC/Synopsys
As discussed internally, add evgeniy-paltsev as a co-maintainer for
ARC and Synopsys areas.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-08-14 09:15:18 -04:00
Evgeniy Paltsev
8841f3bde5 MAINTAINERS: add missing ARC interrupt controller
Add missing path for ARC classic interrupt controller to
ARC architecture entry in MAINTAINERS

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-08-14 09:15:18 -04:00
Evgeniy Paltsev
3231042080 MAINTAINERS: migrate arc timer driver from CODEOWNERS
Migrate drivers/timer/*arcv2* from CODEOWNERS to MAINTAINERS
by adding it to ARC architecture entry

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-08-14 09:15:18 -04:00
Evgeniy Paltsev
7aaab61084 MAINTAINERS: migrate dts/arc/ from CODEOWNERS
* migrate dts/arc/ from CODEOWNERS to MAINTAINERS
* drop iriszzw as not working in Synopsys anymore

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-08-14 09:15:18 -04:00
Brett Witherspoon
a0f36d59b7 drivers: video: video_stm32_dcmi: Prevent out of bounds memory access
The frame event callback unconditionally copies into the enqueued video
buffer. The driver only supports fixed length frames, so reject enqueued
buffers that are not large enough to prevent invalid memory access.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
2024-08-14 09:14:56 -04:00
Seppo Takalo
1cd6b5f1c1 net: lwm2m: remove deprecated APIs and confs
Remove deprecated APIs and configs:
* CONFIG_LWM2M_RD_CLIENT_SUPPORT
* lwm2m_get_u64()
* lwm2m_set_u64()

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-14 09:14:43 -04:00
Johan Hedberg
640151be62 doc: bluetooth: Fix auto-pts references
The auto-pts project is now days hosted under an independent organization
instead of the intel one.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-14 09:14:29 -04:00
Dmitrii Golovanov
0728358422 twister: Fix reporting filter status type mismatch
Fix after #71401 merge at Twister Reporting:
 * filter status value type mismatch;
 * tesplan.json generation incorrect error logs.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-14 09:14:19 -04:00
Alberto Escolar Piedras
f5f5937657 subsys/bluetooth: Correct BT_HCI_VS_EXT_DETECT default
native_sim should be treated as native_posix.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-14 09:14:10 -04:00
Alberto Escolar Piedras
ad0fc3b5b1 drivers/bluetooth/userchan: Fix dependency
The driver can run in either native_posix or native_sim.
Let's make sure to set the dependencies acordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-14 09:14:10 -04:00
Erik Tamlin
858a687052 manifest: update percepio
Update the percepio module to use TraceRecorder v4.9.2.hotfix1

Signed-off-by: Erik Tamlin <erik.tamlin@percepio.com>
2024-08-14 10:47:58 +01:00
Jonathan Rico
73572e4151 Bluetooth: L2CAP: Initialize private channel object members
We own those fields, so we should initialize them before use.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-14 10:47:49 +01:00
Seppo Takalo
b5ac5f7eba net: lwm2m: Send is only supported on LwM2M 1.1
LwM2M SEND functionality is defined in LwM2M v1.1
So quard the condition with protocol version, not
server object version.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-14 10:47:24 +01:00
Jun Lin
1aff275642 soc: npcx: scfg: select host interface type in global
The Host Interface Type in the DEVCNT register sets the HIF type
(either eSPI or LPC).
Currently, it is configured in the host-interface-related drivers like
eSPI or SHI. However, some I/O pads sourced from VHIF in the other
modules such as GPIO and I3C also rely on this field. It might be
problematic when using those I/Os without enabling eSPI or SHI drivers.
This commit moves the setting from the specific drivers to the global
system initialization function scfg_init().

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-08-14 10:47:15 +01:00
Anas Nashif
2bdc874e3b manifest: update with SOF upstream
Sync with upstream: b2521eaa7

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-14 10:47:07 +01:00
Vinayak Kariappa Chettimada
85790c95a9 Bluetooth: Controller: Introduce EVENT_MAFS_MIN_US value
Introduce Controller dependent EVENT_MAFS_MIN_US value to
use as the value when populating the aux offset between
Extended Advertising primary and auxiliary channel PDUs.

This can be used as workaround for peers having difficulty
receiving Extended Advertising PDUs with near 300 us MAFS
values used in aux offset calculations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:46:48 +01:00
Tomi Fontanilles
69d1acce3e MAINTAINERS: add tomi-font as collaborator to relevant areas
Propose myself as collaborator to areas I have contributed to lately
in order to more easily follow/take part in them and help in those
where there was no collaborator.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-14 10:46:40 +01:00
Tomi Fontanilles
08e7239f90 MAINTAINERS: unify TF-M entries
Merge "TF-M integration" into "West project: trusted-firmware-m".
The former was a superset of the latter.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-14 10:46:40 +01:00
Tomi Fontanilles
ff715c24bf MAINTAINERS: unify Mbed TLS entries
Merge "Mbed TLS" into "West project: mbedtls".
Also, change the label to a more fitting one.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-14 10:46:40 +01:00
Duy Nguyen
a95cade729 driver: serial: Convert Kconfig of renesas RA8 to rsource
Change Kconfig of renesas RA8 to rsource

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Nguyen
22e42e7176 tests: Skip CPP98 for Renesas device using FSP hal
As Renesas Hal is not compatitble with C++98 we use
filter CONFIG_HAS_RENESAS_RA_FSP to skip the test

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Nguyen
68d5af801c manifest: Update commit ID to support new renesas hal
This update is to support new version of renesas hal

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Phuong Hoang. Nguyen
93f69cd8bc boards: renesas: add support for mck_ra8t1 board
Initial commit for MCK-RA8T1 board

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Phuong Hoang. Nguyen
356d331db5 soc: renesas: add support for RA8T1 SoC
Initial commit to support RA8T1 SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Phuong Hoang. Nguyen
f75c7ae24c boards: renesas: Support Renesas EK-RA8D1 board
Initial support for EK-RA8D1 board this commit
only support basic GPIO and Serial driver for
RA8D1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Duy Phuong Hoang. Nguyen
fbb7d503c5 soc: renesas: Add support for RA8D1 SoC
Initial commit to suppor RA8D1 SoC
This is deveop base on RA8M1 so it will have similar stucture and
feature

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-14 10:46:27 +01:00
Vinayak Kariappa Chettimada
4dbfb22a7e Bluetooth: Controller: Relax radio packet pointer assignment deadline
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
642d4be940 Bluetooth: Controller: Fix regression using speed optimization
Fix regression using speed optimization introduced in
commit 1b7fe792e0 ("Bluetooth: Controller: Support Link
Time Optimizations (LTO)").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
b9a7a64563 Bluetooth: Controller: nRF51x: Fix regression in encrypted connection
Fix regression in encrypted connection introduced in
commit f3deccda91 ("Bluetooth: Controller: CCM read data
to early when DF enabled on PHY 1M").

Due to this nRF51x SoC hang waiting to encrypt and/or
check MIC.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
40b71c9773 Bluetooth: Controller: Fix PDU length in case of ISR latency issue
In case of ISR latencies, if packet pointer has not been
set on time then we do not want to check uninitialized
length in rx buffer that did not get used by Radio DMA.
This would help us in detecting radio ready event being
set? We can not detect radio ready if it happens twice
before Radio ISR executes after latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
e36ddffa7a Bluetooth: Controller: Fix empty PDU buffer overrun under ISR latency
Only 3 bytes (PDU_EM_LL_SIZE_MAX) is required for empty PDU
transmission, but in case of Radio ISR latency if rx packet
pointer is not setup then Radio DMA will use previously
assigned buffer which can be this empty PDU buffer. Radio
DMA will overrun this buffer and cause memory corruption.
Any detection of ISR latency will not happen if the ISR
function pointer in RAM is corrupted by this overrun.
Increasing ISR latencies in OS and CPU usage in the
ULL_HIGH priority if it is same as LLL priority in
Controller implementation then it is making it tight to
execute Controller code in the tIFS between Tx-Rx PDU's
Radio ISRs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
8ef919a7a4 Bluetooth: Controller: Fix ISR profiling for single timer use
Fix ISR profiling when using single timer for tIFS radio
switching wherein in the timer is cleared on every radio
end. Hence, the captured timer value is the latency and
does not required the radio end timestamp to be subtracted.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
53b6bc56fc Bluetooth: Controller: Verbose radio is ready assertion
Provide Radio ISR latency in microseconds when asserting due
to high ISR latency.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
409402f0cc Bluetooth: Controller: Add ISR profiling using ticker ticks
Add ISR profiling using ticker ticks, hence profile ISR
CPU use outside radio events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
56ca9b873d Bluetooth: Controller: Use uint16_t to store ISR profiling value
Use uint16_t to store ISR profiling value to avoid overflow
in case of higher latencies.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
Vinayak Kariappa Chettimada
90bc2b2064 Bluetooth: Controller: Fix in-system ISR profiling for adv and conn
Fix in-system ISR profiling for advertiser and connection
role for the missing implementation when there is CRC error.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-14 10:45:59 +01:00
BH Li
9402115d9b tests: drivers: adc: add conf file and overlay to adc_api
Add configuration file to adc_api sample

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
BH Li
9f25337a1d samples: drivers: adc: add conf file and overlay to adc_dt
Add configuration file to adc_dt sample

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
BH Li
9384e48f8a boards: ambiq: add adc to apollo3 and 3 plus boards
Add adc to apollo3 and 3 plus boards

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
BH Li
41381fa707 dts: arm: ambiq: add ambiq adc to dtsi file
Add Ambiq adc to DTSI

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
BH Li
2f40168287 drivers: adc: add ambiq adc driver
Add Ambiq adc driver

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
BH Li
c61792cd7c dts: bindings: adc: add ambiq adc
Add Ambiq adc binding

Signed-off-by: BH Li <bli@ambiq.com>
2024-08-14 10:45:47 +01:00
Emil Gydesen
ba62c8d876 Bluetooth: BAP: Support setting different values per dir in CIG
The interval and latency for a CIG are set for each direction now,
allowing applications to use e.g. 10ms for sink ASEs and 7.5ms for
source ASEs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-14 09:42:16 +02:00
Flavio Ceolin
e00746f9b3 scripts: hardenconfig: Improve deprecated and experimental detection
Gets experimental and deprecated symbols directly from Kconfig instead
of rely on hardened.csv.

This way we keep the tool consistent with Zephyr's code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-14 09:41:00 +02:00
Reto Schneider
9aa2f5ffb0 drivers: serial: Add name to choice symbol
Add name to choice symbol, so that default value can be changed
downstream.

Developed-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-14 09:40:34 +02:00
Reto Schneider
b03fcfa0cf net: lib: lwm2m: Add name to choice symbol
Add name to choice symbol, so that default value can be changed
downstream.

Developed-by: Andreas Rudolf <andreas.rudolf@husqvarnagroup.com>

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-14 09:40:34 +02:00
Pisit Sawangvonganan
d5a458df2e net: l2: ppp: ensure proper null-termination in ppp_fsm_close
- Remove the `strlen`, as it is unnecessary for safe copying.
- Limit the `strncpy` to `sizeof(fsm->terminate_reason) - 1`
  to ensure the last byte is reserved for null-termination.
- Add an explicit null terminator to guarantee correct string termination.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 09:40:23 +02:00
Pisit Sawangvonganan
c20126f950 drivers: serial: ns16550: apply __maybe_unused to ns16550_out,inword
Instead of disabling code with a specific compilation switch, enable it
and apply `__maybe_unused` in the `ns16550_outword` and `ns16550_inword`
functions to make the codebase cleaner.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 09:40:00 +02:00
Pisit Sawangvonganan
e868b6b49d drivers: serial: ns16550: fix typo
Correct the following typo in Kconfig and
the corresponding function.
- Kconfig.it8xxx2 from `BUADRATE` to `BAUDRATE`
- Correspoding function from `burdrate` to `baudrate`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-14 09:40:00 +02:00
TOKITA Hiroshi
fab42c1176 tests: drivers: wdt_basic_api: Correct rpi_pico configuration
The max window time of RaspberryPi Pico WDT is 8,388,607 us(0x7FFFFF),
But 20,000ms have been set.

Correcting the value to 8,000ms to pass the test.

This was a problem that was discovered because the fix in
ccedcd1ac0 now properly handles the error.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-14 09:39:29 +02:00
Tom Finet
5e834cc4b6 net: capture: Add packet capture stats for dropped packets
Cloning a packet for a capture may fail due to insufficient memory.
In such a case, the networking statistics should be updated
to reflect this processing error. This commit updates the processing
error count on the capture tunnel network interface because this is
the interface that the captured packet would have been assigned to.

Signed-off-by: Tom Finet <tomfinet@outlook.com>
2024-08-14 09:39:09 +02:00
Charles Dias
1ed9eb6125 drivers: video: ov2640: fix vertical flip
Fix the vertical flip instruction into ov2640_set_vertical_flip
function.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2024-08-14 09:38:39 +02:00
Daniel Leung
b0185189ad xtensa: mmu: fix page table initialization
xtensa_mmu_init() is called really early in the boot process
where the _kernel struct has not yet been initialized, and
thus we cannot use it to determine if the current CPU is
the boot CPU. In some cases, this may skip the call to
initialize the page tables which leaves us with incorrect
page table entries. Fix it by using a static variable to
determine whether the page tables have been initialized so
we only do it once per boot.

Fixes #76909

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-14 09:36:19 +02:00
Krzysztof Gawryś
dfcc3b6db4 RP2040: clock control: support PLL On/Off
Simple improvement that adds control over SYS and USB PLLs in RPi Pico
(RP2040) MCU.

Signed-off-by: Krzysztof Gawryś <kgawrys@concisesoftware.com>
2024-08-13 18:29:03 -04:00
Mikhail Kushnerov
4f89e3ca35 samples: profiling: Add sample for perf tool
The operation of perf tool can be checked using this sample.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
090a1331c9 doc: profiling: Add doc for perf tool
Add doc for profiling perf tool

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
8a76048ea4 scripts: profiling: Add stackcollapse script
Samples, that were obtained by profiling perf tool, can be be translated
into flamegraph using stackcollapse.py script.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
140f9a57b7 arch: x86: ia32: Implement perf stack thrace func
Implement stack trace function for x86_32 arch, that get required
thread register values and unwind stack with it.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
1588390907 arch: x86: intel64: make perf stack thrace func
Implement stack trace function for x86_64 arch, that get required
thread register values and unwind stack with it.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
a74474c1f9 arch: riscv: Implement perf stack thrace func
Implement stack trace function for riscv arch, that get required
thread register values and unwind stack with it.

Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Mikhail Kushnerov
e50d1190fa profiling: Add perf tool
Add profiling subsystem.

Add perf util based on periodic stack unwinding. Perf from Linux
was taken as a reference.

The operation of module is based on frame pointer usage and saving
registers during interruption handling.
The unwinding function stay in timer as expiry functioin so is called
during interruption handling. Thus the function have access to saved
registers (program counter and frame pointer in particular) of the current
thread and use it to unwind the thread stack.
Timer starting and results printing function are made as shell commands
for conveniency.

Originally-by: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
Signed-off-by: Mikhail Kushnerov <m.kushnerov@yadro.com>
2024-08-13 18:28:44 -04:00
Andy Sinclair
66f386593e maintainers: Change regulator maintainer to gmarull
Regulator maintainer changed from aasinclair to gmarull

Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
2024-08-13 18:28:24 -04:00
Sadik Ozer
4df17deb74 dts: arm: adi: Enable sysclk for MAX32690
MAX32690 support sysclk div property
This commit enables this feature

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-13 18:21:57 -04:00
Raffael Rostagno
a205fe9155 samples: esp32c3: Move config files from boards to socs
Move samples config files from 'boards' to 'socs' in order to
remove multiple files with the same configuration and render
available samples for new boards. Only changed sample files
which are not board or hardware specific.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Raffael Rostagno
708783a93e boards: esp32c3_devkitc: Added support
Add support to esp32c3_devkitc-02

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Bjarki Arge Andreasen
65af3ab34c tests: wifi: nm: exclude nrf7002dk
The nrf7002dk board's wifi chip requires blobs to build wifi driver.
Therefore it can not be built by CI. Exclude the board and its
variants from the wifi test suite.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Bjarki Arge Andreasen
e8f37c7640 boards: nordic: nrf7002dk: add docs
Add documentation to nrf7002dk board

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Bjarki Arge Andreasen
12559fe6fc boards: nordic: add nrf7002dk
Add nrf7002dk board.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-13 18:21:01 -04:00
Gerard Marull-Paretas
8cf0d0b0c6 soc: nordic: introduce CONFIG_NRF_PLATFORM_HALTIUM
Some new Nordic nRF SoCs are based on a common platform, named
'Haltium'. Introduce a selectable Kconfig option available for series to
flag they are part of such common platform. This will allow to easily
enable common code shared across all Haltium based products.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-13 18:19:51 -04:00
Murali Karicheri
7baf026adf drivers: flash: stm32h7: ignore STRBERR during flash write
When application code runs from M4 (resides on lower 896KiB of
the internal flash of bank2) and it does write to a block in
the upper 128KiB, write fails sometime (for example failed
1 out of 10 block write based on the tests) due to STRBERR.
As per technical reference manual section 4.7.4 of
STM32H745/755 SoC, application may ignore this error and
continue with write. So check for the flag and return okay
status for write(). Based on our tests, the application write
succeeds even when this error happens and match with document
description. So igoring this error flag is okay during write.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-08-13 18:19:41 -04:00
Muhammad Haziq
9958a2e3c3 net: wifi: replace (1 << xyz) with BIT(xyz)
Refactor (1 << xyz) to use the BIT(xyz) macro.
The change aims to enhance code readability.

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-08-13 18:19:33 -04:00
Flavio Ceolin
f284091073 xtensa: core: Remove constant branch
is_dblexc is constant for targets without MMU. There is no need
to check it when building without MMU.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-13 18:18:53 -04:00
Flavio Ceolin
b9a0f0039f dma: emul: Fix pm action signature
The signature for dma_emul pm action callback is wrong.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-13 18:18:44 -04:00
Jonathan Rico
e1ac3866ee Bluetooth: L2CAP: document memset requirement
The `struct bt_l2cap_le_chan` and `struct bt_l2cap_br_chan` objects
should be memset before passing them to the stack.

This was not stated anywhere, but all the in-tree users are doing it, so
it must be API.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-13 18:18:34 -04:00
Alberto Escolar Piedras
bb9704a422 arch posix: Cleanup old code
When the native simulator use was introduced,
the POSIX architecture and SOC were split in 2 versions:

One was the old version, which remained used by native_posix and the
other NATIVE_APPLICATION based targets.
The new version was a shim on top of the native simulator threading
and CPU start/stop emulation.

This was done to ensure no regressions were introduced in the old
targets while the native simulator was tested and matured.

The old SOC code was removed a small while after, and all
NATIVE_APPLICATION targets moved to use the shim version on top of the
native simulator.

Now we remove also the old arch code, so native_posix and its
NATIVE_APPLICATION kin, also use the native simulator NCT component
instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:25 -04:00
Alberto Escolar Piedras
0d25e0b655 doc: release notes & migration guide: mention native_posix deprecation
Mention that native_posix is being deprecated in favour of native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras
84ce8221bb native_posix docs: Warn users about the deprecation
So they switch to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras
b969dc93fc native_posix: deprecate with planned removal for 4.2
native_posix has been replaced with native_sim.
Users have been encouraged to switch since 3.6.

We deprecate it now, and plan to remove it in 4.2.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:10 -04:00
Alberto Escolar Piedras
e3da5c3d39 Bluetooth: Mesh: Fix build warning with gcc 13
gcc 13 thinks  max_adv_duration may be used unitialized
and warns accordingly (see below)
It seems the reason is the goto, which confuses it.
In any case, pacifying this warning is trivial,
so let's just do so.

The warning:
```
In function ‘gatt_proxy_advertise’,
inlined from ‘bt_mesh_proxy_adv_start’ at
subsys/bluetooth/mesh/proxy_srv.c:1214:9:
subsys/bluetooth/mesh/proxy_srv.c:842:44: error: ‘max_adv_duration’ may
be used uninitialized [-Werror=maybe-uninitialized]
subsys/bluetooth/mesh/proxy_srv.c: In function ‘bt_mesh_proxy_adv_start’
zephyr/subsys/bluetooth/mesh/proxy_srv.c:786:17: note:
‘max_adv_duration’ was declared here
  786 |         int32_t max_adv_duration;
      |                 ^~~~~~~~~~~~~~~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-13 18:18:00 -04:00
Emil Gydesen
7331b071eb Bluetooth: Audio: Fix double "not" in bcast immediate get
The description of ENODATA had an extra "not".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-13 18:17:51 -04:00
Marcin Niestroj
878640fa08 json: support parsing and serializing 'int64_t'
Up to now there was only support for parsing/encoding 32-bit integer
numbers, with no support for larger ones.

Introduce support for 'int64_t' type, so that large numbers can be
serialized into JSON payloads.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-13 14:58:06 +02:00
Georgij Cernysiov
5246c16109 drivers: flash: stm32 ospi correct memory map return code
Use ENOTSUP instead of EIO to signal about not
supported configuration.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov
a1e39d0b64 drivers: flash: stm32 ospi reword memory map log output
Add more clarity to memory map log output.

Use LOG_DBG instead of LOG_INF to signal about
memory map mode being enabled.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Georgij Cernysiov
f4b63f9644 drivers: flash: stm32 ospi extend memory map modes support
Extend memory map support to QUAD, DUAL, SPI modes.

Allow custom write opcode usage and SFDP:BFP read opcode.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-08-13 14:57:59 +02:00
Grygorii Strashko
965ca96c77 testsuite: coverage: fix arm64 build with gcov enabled
On ARM64 the build will fail with coverage and GCOV enabled:

  CONFIG_COVERAGE=y
  CONFIG_COVERAGE_GCOV=y
  CONFIG_FORCE_COVERAGE=y

west build -b rpi_5 -p always samples/hello_world -- \
 -DCONFIG_COVERAGE=y -DCONFIG_FORCE_COVERAGE=y

Failure:
 "linker_zephyr_pre0.cmd:181: undefined symbol `__gcov_bss_end' referenced
in expression"

Fix build of ARM64 platforms with coverage and GCOV enabled by adding for
ARM64 the same gcov linker sections as it is done for ARM.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-08-13 14:57:50 +02:00
Aleksander Wasaznik
5783d4873a Bluetooth: GATT: Document bt_gatt_attr
Improve the documentation of `bt_gatt_attr`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-08-13 14:57:26 +02:00
Piotr Kosycarz
2fd7ab7b97 testsuite: coverage: allow disabled multithreading
k_sched* are not avaliable when there is CONFIG_MULTITHREADING=n

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-08-13 14:57:18 +02:00
Conor Paxton
22df8459fa boards: beaglev_fire: update readme with correct openocd args
The debug instructions for launching OpenOCD were missing an argument.
Add the argument.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-08-13 14:56:55 +02:00
Conor Paxton
70d93618da boards: mpfs_icicle: update readme with correct openocd args
The debug instructions for launching OpenOCD were missing an argument.
Add the argument.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2024-08-13 14:56:55 +02:00
Johan Kraft
e8c3154ee1 doc: Added Percepio Tracealyzer guide on Tracing page
The Tracing page did not cover the Percepio Tracealyzer support.
Added a guide for Tracealyzer with a screenshot (like SystemView has).
Moved the three tools to a common subsection for better overview.
(Updated with kartben patch.)

Signed-off-by: Johan Kraft <johan.kraft@percepio.com>
2024-08-13 14:56:47 +02:00
Armando Visconti
9a5f145c7a sample: board: add STWIN.box sample for testing sensors
Add sample to test STWIN.box board sensors.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti
f36b887837 boards: st: steval_stwinbx1: Improve sensor support
Add few other sensors support to steval_stwinbx1 board:

 - IIS2MDC: 3-axis magnetometer
 - ISM330DHCX: IMU, 3D accelerometer and 3D gyroscope
 - IIS2DLPC: 3-axis accelerometer
 - IIS2ICLX: 2-axis digital inclinometer

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti
a47b88c09b drivers/sensor/st: iis2iclx: (fix) convert range into mg
Fix the sensor range setting at runtime which is currently returning error,
converting the SI (ms2) value passed thru SENSOR_ATTR_FULL_SCALE in mg (and
not in g) as this is the unit used in the driver internals.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Armando Visconti
c6f8d37056 drivers/sensor/st: iis2iclx: fix odr setting
Do not fail when requested rate passed in SENSOR_ATTR_SAMPLING_FREQUENCY
is not matching any of the odr values supported by sensor. Instead, round
it up to the next one.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-13 14:56:39 +02:00
Maciej Baczmanski
23ba68a45d kconfig: openthread: Add 1.4 version
This commit adds thread 1.4 version.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-08-13 14:56:30 +02:00
Francois Ramu
48b84d2c65 drivers: counter: stm32 counter timer exclude stm32 devices without APB2
The STM32 devices like stm32F0/G0/C0 which have a f0-rcc compatible
does not have APB2 prescaler : do not try to set it.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-13 14:56:22 +02:00
Krzysztof Chruściński
e18254901c logging: When strings are stripped keep source name pointers
90ab94f61d added a change that source name pointers were not stored
in the const data structure associated with a logging source. That was
done because those string pointers were invalid (on purpose pointing to
non-existing memory) and reading those strings could lead to a fault.
However, those pointers are used by scripts which are building the
dictionary database and after this change script was no longer
able to retrieve source names from elf file and database was incomplete.

This patch brings back storing of source name string pointers but in
API for reading those source names guards are added to not return
invalid addresses.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-13 14:56:14 +02:00
Dawid Niedzwiecki
c2151ad1e3 ztest: undefine _POSIX_C_SOURCE before defining it
Undefine _POSIX_C_SOURCE before defining it to avoid double
definition

The previous version, changed in this PR
https://github.com/zephyrproject-rtos/zephyr/pull/70363, did the undef.
Make sure to do the same for all files in the current dir.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-13 14:56:06 +02:00
Fabio Baltieri
73b6bf2651 MAINTAINERS: add intc_gic drivers to the ARM platform area
Add drivers/interrupt_controller/intc_gic* to the ARM platform area so
they get assigned to the ARM platform maintainers directly.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-13 14:55:59 +02:00
Tim Lin
9bcf33bbc4 drivers/pinctrl: it8xxx2: Fix I2C5 pin leakage
When setting these pins as I2C alternate mode and then setting
GCR7 or func3-ext of GPIO extended, it will cause leakage.
In order to prevent leakage, it must be set to GPIO INPUT mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-13 14:55:34 +02:00
Anke Xiao
5368d7d0df boards: nxp: frdm_ke17z512: enable RTC driver
Enable RTC driver to test 'drivers.counter.basic_api' sample.
Select clock-source to LPO clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao
20820b40fa dts: arm: nxp: add rtc support for ke17z512
Add RTC driver support for NXP frdm_ke17z512, rtc doesn't exist on
frdm_ke17z board, delete rtc node from its dtsi file.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao
7c7760f4cd drivers: counter: update counter_mcux_rtc.c
Set LPO 1KHZ clock for RTC if clock source 'LPO' is selected.
The frdm_ke17z512 has no 32KHZ OSC, the RTC clock comes from SOSC,
RTC_CLKIN, LPO 1KHZ. But usually the SOSC is connected with 8MHZ
oscilator, so only 1kHZ LPO is usable.
Update the nxp,kinetis-rtc.yaml to select RTC clock source.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:13 +01:00
Anke Xiao
6987120cc8 tests: drivers: pwm: add pwm configuration for mke17z
Add pwm configuration for frdm_ke17z and frdm_ke17z512 boards.
Set the alias of pwm-0 to ftm2 and test the pwm_api sample.
Update the ftm and pwt configuration to test pwm_loopback sample.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Anke Xiao
a2890affd4 boards: nxp: frdm_ke17z and frdm_ke17z512: add ftm and pwt pwm support
Add ftm pinctrl configuration, and enable ftm2 to support pwm-led.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Anke Xiao
9491e726ff drivers: pwm: update pwm_mcux_pwt.c
Skip period and pulse width capture configurations that
specific flags are not supported on ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Anke Xiao
bbdb5aa575 dts: nxp: nxp_ke1xz.dtsi: add PWT and FTM drivers support
Add pwt and ftm drivers support for MKE17Z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:50:06 +01:00
Raffael Rostagno
cd27198727 intc: esp32c6: Fix for interrupt controller
Fixes repeated allocation of interrupt sources by successive calls
to esp_intr_alloc or esp_intr_enable for the same source.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 09:49:49 +01:00
Anke Xiao
f333c700df tests: drivers: adc_api: add support for ke17z and ke17z512
Add ADC configuration for the NXP FRDM-KE17Z and FRDM-KE17Z512 boards.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:49:40 +01:00
Anke Xiao
8249f40d85 boards: nxp: add adc support for frdm_ke17z and frdm_ke17z512
Enabled adc driver support for ke17z and ke17z512.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:49:40 +01:00
Anke Xiao
54c4f6c8fe soc: nxp: kinetis: ke1xz: add adc0 clock source configuration
If the adc0 node is set to 'okay', the function 'CLOCK_SetIpSrc'
is called to enable the adc0 clock.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:49:40 +01:00
Anke Xiao
f21d473523 dts: nxp: nxp_ke1xz.dtsi: add adc driver support
Added ADC0 driver support for ke1xz, disabled by default.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-13 09:49:40 +01:00
Benjamin Cabé
162fa760e9 doc: zephyr_domain: Show code samples after doxygengroups
Minor cosmetic update post Breathe removal

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Gerard Marull-Paretas
ea14a07952 doc: enable doxybridge
Enable the doxybridge extension.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-08-13 09:49:21 +01:00
Gerard Marull-Paretas
c8c3a3b322 doc: extensions: add doxybridge
Add an initial version of doxybridge, an extension that allows to use
Sphinx C domain to automatically reference Doxygen pages.

It also introduces minimal support for `.. doxygengroup` directive,
which effectively links to the group's Doxygen page.

Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Gerard Marull-Paretas
259db8c090 doc: deactivate breathe extension
Deactivate breathe extension from docs.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-08-13 09:49:21 +01:00
Benjamin Cabé
385f8e127d doc: Use basic ..doxygengroup syntax
Do not pass options to doxygengroup to rationalize
usage and be less dependent on Breathe.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Benjamin Cabé
f2227bbd51 samples: drivers: clock_control_litex: clean up use of c domain roles
Simplify how the code sample refers to C objects to be less dependant on
Breathe.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-13 09:49:21 +01:00
Benjamin Gwin
47a0813561 drivers: serial: pl011: Fix ignored const qualifiers
When trying to build Zephyr with -Wignored-qualifiers this leads to a
compiler warning like:

zephyr/drivers/serial/uart_pl011_registers.h:40:1: error: type
qualifiers ignored on function return type [-Werror=ignored-qualifiers]

Since the return value is copied by the caller, making it const has no
effect and the compiler warns that this is being ignored. This enables
applications to build with additional compiler warnings turned on.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
2024-08-12 19:25:34 -04:00
Ricardo Rivera-Matos
9c7514cf9b MAINTAINERS: Adds entry haptics subsystem
Adds an entry to the MAINTAINERS file claiming maintenance of the
haptics subsystem.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-12 19:25:17 -04:00
Matt Rodgers
3e7d9b55a4 samples: net: http_server: sent net stats to client via websocket
Added a websocket connection sending network statistics to a client, to
demonstrate how this can be used to push data to the client as an
alternative to GET requests triggered by a Javascript timer.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-12 19:25:05 -04:00
Matt Rodgers
24b4ccbc92 samples: net: http_server: use JSON payload for dynamic POST
Accept JSON payload including LED number and state, to demonstrate JSON
parsing and allow control of multiple LEDs if the board supports this.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-12 19:25:05 -04:00
Matt Rodgers
8a8f2814cd samples: net: http_server: demonstrate dynamic GET and POST
Previously the dynamic resource in the http_server sample simply echo'd
the received data back to the sender. This doesn't demonstrate how the
dynamic handlers would be used in a more typical use case, where the
application may need to wait for the full request before acting on it or
creating a response.

Therefore two new dynamic resources have bee added: a '/led' resource
which can be used to control the board's LED (if present) via a POST
request, and a '/uptime' resource which can be used to query the kernel
uptime via a GET request.

The static resources are updated with some javascript to support
demonstrating the new dynamic resouces via a web browser.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-12 19:25:05 -04:00
Kyra Lengfeld
c756fef2cc MAINTAINERS: Bluetooth Mesh: add myself as contributer
Added KyraLengfeld as contributer in BT mesh.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2024-08-12 19:24:51 -04:00
Parthiban Nallathambi
77c500863a MAINTAINERS: add parthitce as colloborator for lz4
Navin-Shankar is not part of Linumiz or Zephyr RTOS projects
anymore. Adding parthitce as colloborator for LZ4.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-08-12 19:24:15 -04:00
Parthiban Nallathambi
f8c51d70c4 samples: add steps to add lz4 into west manifest
lz4 is moved as optional module, add step in README to add
as project filter to include into west manifest.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/65127

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-08-12 19:24:15 -04:00
Parthiban Nallathambi
a65096fc37 samples: move lz4 into modules
all the external modules related samples are part of samples/modules,
whereas lz4 is in parent. move it to sample/modules/compression/lz4

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-08-12 19:24:15 -04:00
Parthiban Nallathambi
7e45c3bef9 lz4: update to release version v1.10.0
LZ4 is a fast compression and only of it's kind available
in Zephyr RTOS manifest. But it wasn't maintained to sync
with mainline version. This commit together with [1] PR
help updating to latest mainline release version of LZ4.

[1]: https://github.com/zephyrproject-rtos/lz4/pull/2

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-08-12 19:24:15 -04:00
Armin Kessler
237c49acb8 drivers: dma: esp32: added support for multiple descriptors
Previously, configuring the GDMA was limited to a single descriptor,
restricting memory transfers to a maximum of 4kB.
This update introduces support for multiple descriptors, enabling users
to define multiple dma_blocks. The maximum number of descriptors can be
configured via the CONFIG_DMA_ESP32_DESCRIPTOR_NUM option.
Additionally, the dma_get_status() function now reports the index of the
currently processed descriptor
through the status.read_position and status.write_position fields.

Signed-off-by: Armin Kessler <ake@espros.com>
2024-08-12 19:23:38 -04:00
Krzysztof Chruściński
009d02c0e1 doc: services: debugging: Add Coresight Trace Deformatter documentation
Add documenation for Coresight Trace Deformatter.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-12 19:23:19 -04:00
Krzysztof Chruściński
287583be36 tests: debug: Add test for Coresight Trace Deformatter
Add test suite.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-12 19:23:19 -04:00
Krzysztof Chruściński
530b8ccbed debug: coresight: Add coresight_trace_deformatter
Add module which decodes data encoded using Coresight Trace
Formatter.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-12 19:23:19 -04:00
Lukasz Mrugala
306dba1d91 scripts: twister: Elevate status errors
Incorrect status assignments were previously just warnings in logs.
Now they are elevated to errors.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-08-12 19:23:07 -04:00
Lukasz Mrugala
f429b33d63 scripts: twister: Bring 3.7 changes into the new status system
Some 3.7 changes still used string statuses.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-08-12 19:23:07 -04:00
Lukasz Mrugala
212f48c146 scripts: twister: Unify Twister Statuses
Various different Statuses were joined into a single class,
TwisterStatus. This change anticipates further streamlining
of the Twister's approach to Status.

Code guarding Twister's Properties was shortened to a
value check only.

QEMUOutputStatus was left separate, as doubts were cast
whether it should remain a status. Leaving it separate makes
its removal easier.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-08-12 19:23:07 -04:00
Lukasz Mrugala
6f452e81f7 scripts: twister: Remove unused statuses
TestInstanceStatus of TIMEOUT and FLASH were never really used.
They were checked for, but never assigned.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-08-12 19:23:07 -04:00
Lukasz Mrugala
5c6c44a247 scripts: twister: Isolate statuses into a separate class
Now statuses are not just a str that can be easily mistyped
or assigned wrong. Now they are an Enum.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-08-12 19:23:07 -04:00
Manuel Argüelles
2786cb9512 drivers: intc: gic: implement set pending interrupt
Implement a function to set pending interrupts for Arm GIC.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-12 15:54:42 +02:00
Yago Fontoura do Rosario
42c8732dda Bluetooth: Gatt: Make CCC_STORE_MAX configurable
- Made CCC_STORE_MAX configurable under the BT_SETTINGS
- Added a buffer overflow check on ccc_save

Fixes: #76838

Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
2024-08-12 15:54:28 +02:00
Jan Peters
b8bef42add device_dt_metadata: handle dt_meta being NULL
Using  DEVICE_DEFINE, a device without a corresponding DT node can be
defined (for example CRYPTO_MTLS), Z_DEVICE_INIT() does not initialize
dt_meta for such devices, leaving the field as NULL.
device_get_dt_nodelabels() and functions calling it have to handle
dev->dt_meta == NULL to prevent fatal errors.

Signed-off-by: Jan Peters <peters@kt-elektronik.de>
2024-08-12 15:54:22 +02:00
Robert Lubos
086faa56aa net: lib: http_server: Clear http1_headers_sent flag on new request
http1_headers_sent flag has to be cleared when entering
HTTP_SERVER_REQUEST_STATE and not only on the client init. Otherwise,
serving multiple HTTP1 POST requests over the same connection does not
work as intended (headers were not sent for the second and further
requests).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-12 15:54:03 +02:00
Grzegorz Swiderski
f2dc4a0ecf cmake: Adjust LMA for user-specified sections
Fixes #64149

Add support for a new Kconfig symbol: BUILD_OUTPUT_ADJUST_LMA_SECTIONS.
This is supplemental to the existing BUILD_OUTPUT_ADJUST_LMA setting,
which normally adjusts all output sections' LMA by the provided offset.
Defining the new symbol will narrow down the set of applicable sections
to a user-specified CMake list of name patterns.

Example usage:

DT_CHOSEN_Z_FLASH = zephyr,flash
DT_CHOSEN_Z_SRAM = zephyr,sram
config BUILD_OUTPUT_ADJUST_LMA
        default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) - \
                 $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))"

config BUILD_OUTPUT_ADJUST_LMA_SECTIONS
        default "*;!bss;!noinit"

Supported values for BUILD_OUTPUT_ADJUST_LMA_SECTIONS are aligned with
objcopy, since this feature has only been supported with GNU binutils
thus far.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-08-12 15:53:42 +02:00
Teresa Zepeda Ventura
75023042e8 boards: sparkfun: Add support for Sparkfun Thing Plus Matter board
Added support for the  Sparkfun Thing Plus Matter MGM240P board.
For more information about this board please check:
https://www.sparkfun.com/products/20270

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-08-12 15:14:56 +02:00
Teresa Zepeda Ventura
403d0d6045 drivers: pinctrl: gecko: add support for a single usart
Added support for SoCs with a single usart

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-08-12 15:14:56 +02:00
Teresa Zepeda Ventura
1f9f335882 soc: silabs: add configuration for silabs soc EFR32MG24B020F1536IM40
Added configurations and dts for soc part number EFR32MG24B020F1536IM40

Signed-off-by: Teresa Zepeda Ventura <teresa.zvent@gmail.com>
2024-08-12 15:14:56 +02:00
Jamie McCrae
d4a29becf4 soc: espressif: Add default MCUboot mode to sysbuild
Adds the default MCUboot operating mode when building for these
SoCs using sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-12 15:14:45 +02:00
Jamie McCrae
6a474bf938 boards: nxp: Add default MCUboot mode to sysbuild
Adds the default MCUboot operating mode when building for these
boards using sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-12 15:14:45 +02:00
Jamie McCrae
cee15b5e5a scripts: ci: check_compliance: Add MCUboot symbols to allow list
Adds new symbols used in sysbuild for configuring MCUboot to the
allow list

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-12 15:14:45 +02:00
Jamie McCrae
9566aa5b00 sysbuild: Add MCUboot operating mode
Adds a sysbuild Kconfig to select the operating mode of MCUboot
which is then propagated to the MCUboot and application images

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-12 15:14:45 +02:00
Manuel Argüelles
206f2fd8f8 tests: drivers: counter: bump prescaler for nxp_sys_timer
Increase the counter timer prescaler for some instances of NXP System
Timer Module, so that late alarms and short relative alarms are
excercised.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-12 15:14:34 +02:00
Manuel Argüelles
c27a8e158a drivers: counter: nxp_sys_timer: support late and short alarms
Support short relative and late alarms for NXP System Timer Module
counter driver. The late alarm detection algorithm applied, is based on
existing counter drivers.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-12 15:14:34 +02:00
TOKITA Hiroshi
3cccad53dc soc: renesas: ra: Do not enable SOC_OPTION_SETTING_MEMORY globally
RA4M1-specific options were being applied system-wide because
conditions were not set properly.
This change fixes this problem.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-08-12 15:14:24 +02:00
Tomi Fontanilles
76b73838ed modules: mbedtls: remove Kconfig options for TLS 1.0 and 1.1
Support for those has been removed from Mbed TLS a while ago:
https://github.com/Mbed-TLS/mbedtls/issues/4286

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-12 15:14:15 +02:00
Glenn Andrews
b649efe6dd doc: PM: Fix dereference in 'services/pm/device_runtime'
See https://github.com/zephyrproject-rtos/zephyr/issues/76741

Fixes the dereference of the PM action in the doc.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-08-12 15:14:06 +02:00
Gerard Marull-Paretas
1c689fce18 dts: bindings: nordic,nrf-pinctrl: remove pinctrl nordic,clock-enable
Property is no longer used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-12 12:58:58 +02:00
Gerard Marull-Paretas
746133a24a dts: nordic: nrf54h20: add nordic,clockpin-enable settings
Define which signals require CLOCKPIN enablement at SoC dts files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-12 12:58:58 +02:00
Gerard Marull-Paretas
f463e6d88a soc: nordic: pinctrl: rework nordic,clock-enable
Instead of forcing users to provide this setting, allow to describe
which signals require CLOCKPIN enablement at device nodes. This is later
captured by the pinctrl macros and applied in the pinctrl driver. Note
that name has been adjusted to nordic,clockpin-enable to avoid confusion
with clock related settings.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-12 12:58:58 +02:00
Niklas Fabian
72f90ee063 logging: fs backend: optional append to latest file
Make appending to the newest log file in the fs logging backend optional.
By default, if there is still free space in the latest log file,
the fs logging backend appends to it on startup. This is useful for saving
space and avoiding the removal of older log files, if the maximum number
of log files has been reached. The drawback of this behavior is,
that log files that got appended can not be decoded, if the firmware
has changed between startups, for instance by an update,
since the log_dictionary.json used for decoding has also changed.
Therefore, it may be desirable to deactivate appending to log files.

Signed-off-by: Niklas Fabian <niklas.fabian@lemonbeat.com>
2024-08-12 12:44:11 +02:00
Krzysztof Chruściński
04a930fe74 drivers: serial: nrfx_uarte: Optimize code size
Code size can significantly reduced (220 bytes per instance) if data
structure (stored in RAM) is not initilized (can be moved to .bss).
Data for asynchronous API had two fields which can easily be moved
to the configuration structure (which is in ROM) because they do not
change duing runtime.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-12 12:44:02 +02:00
Krzysztof Chruściński
78ba6082d9 drivers: serial: nrfx_uarte: Optimize static peripheral configuration
When runtime configuration is not enable then we can determine at
compile time what are the hardware settings. Function which
translates zephyr values to nRF register values is not needed as
macros can do that at compile time.

This optimization saves almost 400 bytes of code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-12 12:44:02 +02:00
Jiafei Pan
52f26689c4 board: imx8mn_evk: enable ENET ethernet on Cortex-A Core
Enabled ENET ethernet port on Cortex-A Core for imx8mn EVK board.
Updated document for supported features.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-08-12 12:43:54 +02:00
Jiafei Pan
f8f359d2c8 board: imx8mm_evk: enable ENET ethernet on Cortex-A Core
Enabled ENET ethernet port on Cortex-A Core for imx8mm EVK board.
Updated suported featues in board document.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-08-12 12:43:54 +02:00
Jiafei Pan
f690b823f9 dts: binding: ethernet-phy: add 1G fixed-link support
Added 1G link support for fixed-link.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-08-12 12:43:54 +02:00
Jiafei Pan
f498644106 drivers: eth: phy: add AR8031 PHY driver
Add PHY driver support for Qualcomm AR8031, it can use fixed link
or use auto negotiation.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-08-12 12:43:54 +02:00
Anas Nashif
f53d5d5712 arch: move custom arch call Kconfigs
Move from kernel/ to arch/ and have all those Kconfigs in one place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-12 12:43:36 +02:00
Anas Nashif
a91c6e56c8 arch: use same syntax for custom arch calls
Use same Kconfig syntax for those  custom arch call.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-12 12:43:36 +02:00
Anas Nashif
7f52fc4188 arch: custom cpu_idle and cpu_atomic harmonization
custom arch_cpu_idle and arch_cpu_atomic_idle implementation was done
differently on different architectures. riscv implemented those as weak
symbols, xtensa used a kconfig and all other architectures did not
really care, but this was a global kconfig that should apply to all
architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-12 12:43:36 +02:00
Fin Maaß
e6235f49a7 drivers: ethernet: eth_xmc4xxx: fix get_phy
This fixes the eth_xmc4xxx_get_phy function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-12 12:43:24 +02:00
Dawid Niedzwiecki
f39d8bbe2c arm: clear UNALIGN_TRP bit in CCR register
Clear the UNALIGN_TRP bit in the CCR register, if the config
CONFIG_TRAP_UNALIGNED_ACCESS is not set.

Despite the fact that the reset value of UNALIGN_TRP is 0, always clear
the bit. It is useful in double image systems. The new image can't rely
on settings left by the previous image.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-12 12:43:16 +02:00
Luca Burelli
e3cd6fc1c2 llext-edk: fix: add compile definitions to the generated EDK
The LLEXT EDK was not exporting common Zephyr compile definitions
("-Dxxx" flags). This patch adds the compile definitions before the
other compile flags, as it is done in the Zephyr build system.

This patch also adds to this list the "-DLL_EXTENSION_BUILD" flag,
instead of providing a special case at a later stage.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-12 12:43:09 +02:00
Luca Burelli
c77bcd2cf8 llext-edk: (refactor) unify variable names
The variable llext_edk_cflags was used in the main CMakeLists.txt file,
while llext_cflags was used in the llext-edk.cmake file. This commit
unifies the variable names to use llext_edk_cflags in both files.

No logic changes are introduced by this commit.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-12 12:43:09 +02:00
Alberto Escolar Piedras
ee08327b4c Bluetooth: drivers: userchan: Fix gcc 13 overflow warning
gcc 13 produces a build warning (see below), as it seems to
believe the number of read bytes may overflow the frame_size
type.
Let's increase the frame_size bitwidth to avoid this.
(Any 32bit type, signed or unsigned, avoids this warning)

The build warning:
```
In file included from /usr/include/features.h:502,
                 from bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from include/stdint.h:9,
                 from zephyr/include/zephyr/types.h:11,
                 from zephyr/include/zephyr/kernel_includes.h:21,
                 from zephyr/include/zephyr/kernel.h:17,
                 from zephyr/drivers/bluetooth/hci/userchan.c:9:
In function ‘read’,
    inlined from ‘rx_thread’ at drivers/bluetooth/hci/userchan.c:201:9:
/usr/include/i386-linux-gnu/bits/unistd.h:28:10: warning: ‘__read_alias’
specified size between 4294902273 and 4294967295 exceeds maximum object
size 2147483647
[-Wstringop-overflow=]
   28 |   return __glibc_fortify (read, __nbytes, sizeof (char),
      |          ^~~~~~~~~~~~~~~
drivers/bluetooth/hci/userchan.c: In function ‘rx_thread’:
drivers/bluetooth/hci/userchan.c:187:32: note: destination object allocated
  here
  187 |                 static uint8_t frame[512];
      |                                ^~~~~
/usr/include/i386-linux-gnu/bits/unistd-decl.h:29:16: note: in a call to
  function
‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
   29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void
      |                ^~~~~~~~~~~~~~~~~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-12 12:43:01 +02:00
Giancarlo Stasi
19c67d55b2 debug: tracing: Add Segger RTT init mode configuration
Allows RTT inizialization function to either init Cntrol Block always
or initialize only after checking it it's not already initialized by
another program, typically by a bootloader.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2024-08-12 10:14:34 +02:00
Giancarlo Stasi
2f8af56042 drivers: console: rtt_console: use Segger recommended write API
Use recommended write API that internally locks RTT usage and checks
if the RTTcontrol block initialization is done.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2024-08-12 10:14:34 +02:00
Giancarlo Stasi
711ed082a2 debug: tracing: Add Segger RTT linker section options
Allows optionally placing Segger RTT data either in a specific
linker section that is located at RAM start, or in a specific linker
section defined by a memory region in DTS, as third and fourth
alternative to the DTCM section or the default data section.
This is useful to share the fixed address for different programs,
typically bootloader and application, and have seamless logging.

Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
2024-08-12 10:14:34 +02:00
Yong Cong Sin
5107320075 arch: common: isr_tables: add shell command
Add a shell command to dump the isr_tables.

```CONFIG_SYMTAB=n
uart:~$ isr_table sw_isr_table
_sw_isr_table[1035]

   7: 0x800056e2(0)
  11: 0x80005048(0x80008148)
  22: 0x800054ee(0x80008170)
```

```CONFIG_SYMTAB=y
uart:~$ isr_table sw_isr_table
_sw_isr_table[1035]

   7: timer_isr(0)
  11: plic_irq_handler(0x80008188)
  22: uart_ns16550_isr(0x800081b0)
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-12 10:10:57 +02:00
Yong Cong Sin
d6e0b43006 drivers: intc: plic: print ISR(ARG) in shell cmd
Print the ISR & its ARG along with the IRQ and Hits in
`plic stats get <intc>` command, i.e.

```CONFIG_SYMTAB=n
uart:~$ plic stats get interrupt-controller@c000000
   IRQ        Hits	ISR(ARG)
    10         541	0x800054ee(0x80008170)
```

```CONFIG_SYMTAB=y
uart:~$ plic stats get interrupt-controller@c000000
   IRQ        Hits	ISR(ARG)
    10         114	uart_ns16550_isr(0x80008230)
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-12 10:10:57 +02:00
Jonathan Rico
8a2fe27c00 Bluetooth: Host: Free ACL RX fragments on disconnection
This function call frees the buffer kept by the host for reassembling L2CAP
PDUs into.

Without this call, the current buffer will eventually be
leaked, leading to a non-functional host due to lack of RX buffers.

The effect is worse when host flow control is not enabled, as the RX
buffer pool is shared with events, which means communication with the
controller is essentially dead.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-12 10:10:48 +02:00
Jonathan Rico
5a4fdfbf3e Bluetooth: hci_common: Add assert on buf allocation
`net_buf_alloc(K_FOREVER)` can now return NULL if running in the system
workqueue. `bt_hci_evt_create()` is called in that context in a few cases.

Since we can't really do anything about it, add a (default-on) assert.

This should ideally never fail. I saw it fail because of a leak in the ACL
buffer pool, which is also shared with events when host flow control is not
enabled.

In that particular case, the host is rendered non-functional, so trying to
recover using error handling is futile.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-12 10:10:48 +02:00
Jonathan Rico
e489ec2b95 Bluetooth: L2CAP: Add re-assembly stress test
Add a test that verifies no resources are leaked when re-assembling L2CAP
PDUs over an unreliable channel (ie. lots of disconnects).

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-12 10:10:48 +02:00
Maochen Wang
6d01073e79 manifest: Update hostap to remove els_pkc header file
Remove wpa_supp_els_pkc_mbedtls_config.h, as this header file
contains PSA_CRYPTO_DRIVER_ELS_PKC, and ELS-PKC is a proprietary
component of nxp to provides HW acceleration for psa-apis.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-12 10:10:29 +02:00
Sadik Ozer
37ffa074d0 boards: adi: Enable watchdog driver for MAX32690EVKIT
Watchdog enabled for MAX32690EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
de1d376c24 boards: adi: Enable watchdog driver for MAX32680EVKIT
Watchdog enabled for MAX32680EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
f66877d065 boards: adi: Enable watchdog driver for MAX32672 boards
Watchdog enabled for MAX32672EVKIT and MAX32672FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
56393b9a44 boards: adi: Enable watchdog driver for MAX32670EVKIT
Watchdog enabled for MAX32670EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
b7960d4777 boards: adi: Enable watchdog driver for MAX32666 boards
Watchdog enabled for MAX32666EVKIT and MAX32666FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
61140fa5f5 boards: adi: Enable watchdog driver for MAX32662EVKIT
Watchdog enabled for MAX32662EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
e3ba874f77 boards: adi: Enable watchdog driver for MAX32655 boards
Watchdog enabled for MAX32655EVKIT and MAX32655FTHR boards

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
cfcfea4a26 dts: arm: adi: Add watchdog inside devicetree
Add watchdog peripheral definiton inside device tree file
Add watchdog binding file

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Mert Vatansever <Mert.Vatansever@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
a6ae4f9221 drivers: watchdog: Add watchdog driver for MAX32xxx MCUs
Added watchdog driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Mert Vatansever <Mert.Vatansever@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Richard Wheatley
5ab83d8fee drivers: spi: remove old ambiq mspi
Remove the old Ambiq MSPI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-11 19:18:09 -05:00
Richard Wheatley
188fc58c72 drivers: update AMBIQ drivers to use proper base address
REG_X_BASEADDR will be removed from all hal files.
This forces the use of the peripheral base address
Define MSPI_PORT macro for chip drivers

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-11 19:18:09 -05:00
Raffael Rostagno
6710fdf8a1 boards: doc: esp32c6_devkitc: Update for USB CDC
Board document update indicating USB CDC serial port support

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 19:16:35 -05:00
Raffael Rostagno
3dc2e83c7a usb: esp32c6: Add support for USB serial port
Device tree configuration for USB serial node and clock control
fix for proper device initialization.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 19:16:35 -05:00
Marcio Ribeiro
4bdcf44a8c cleanup: soc: esp32: IDF_TARGET parameters removal
IDF_TARGET parameters removed from soc/Kconfig and landed on Espressif hal

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-11 19:16:04 -05:00
Jordan Yates
15aab68d29 boards: nordic: nrf9161dk: remove duplicate flash
Remove the flash node defined in the default `v0.9.0` variant before
adding a new node for the `v0.7.0` variant. Fixes two instances of
`jedec,spi-nor` being present in the final dts.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-11 10:33:53 +02:00
Raffael Rostagno
eca1112d5b tools: esp32: Update for esp32c2
Added argument to support custom baud rate on ESP monitor
for ESP32C2 and ESP8684.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 10:32:59 +02:00
Benjamin Cabé
4458a05ec2 fs: fuse: ensure S_IFxxx macros are available
set _XOPEN_SOURCE appropriately to avoid compilation errors
due to missing S_IFxxx macros on some systems.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-11 10:32:20 +02:00
Alberto Escolar Piedras
40eae69e58 tests: debug/thread_analyzer: Fix platform filter
Today the thread analyzer depends on !ARCH_POSIX,
so this filter needs to filter any board for this architecture
not just native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-11 10:30:49 +02:00
Alberto Escolar Piedras
a747d1a747 MAINTAINERS: Update release notes owners for 4.0
As mentioned in the TSC Meeting of 7 August 2024
* Mahesh Mahadevan (mmahadevan108)
* Dan Kalowsky (dkalowsk)
will be the release managers for 4.0.

Let's update the MAINTAINERS files accordingly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-09 11:42:39 -07:00
Richard Wheatley
777882d9b1 tests: drivers: rtc: rtc_api: boards: add conf file
Add configuration file to rtc_api

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
5beb73ae40 boards: ambiq: apollo4p_evb: add rtc to apollo4p_evb
Add RTC to apollo4 plus board

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
16a2f862ea dts: arm: ambiq: add ambiq rtc to dtsi file
Add Ambiq RTC to DTSI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
0a945cbdec drivers: rtc: add ambiq rtc driver
Add Ambiq RTC driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
8f2413fbe2 dts: bindings: rtc: add ambiq rtc
Add Ambiq rtc binding

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
5f70958784 zephyr: west yaml update
Updated RTC due to Errata ERR126

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Przemyslaw Bida
bd05d0032c net: openthread: Clean not used defines in OT platform.
Remove unused `DEVICE_NAME` from OT `ble.c`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-08-09 17:58:24 +01:00
Lasse Fröhner
710c89ed11 fix: initialize gpio_keys input from pin state
Some kind of race condition caused the gpio_keys input module to
occasionally miss an event after boot. This is fixed by initializing the
pin state variable in the input_gpio_keys module.

Related to https://github.com/starcopter/bms-firmware/issues/6

Signed-off-by: Lasse Fröhner <lasse@starcopter.com>
2024-08-09 17:58:16 +01:00
Daniel Leung
2ef8c4e74f tests: debug/thread_analyzer: add some build tests
Add some build tests for thread_analyzer to catch build issues
at CI.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-09 17:58:03 +01:00
Erwan Gouriou
eec1044309 MAINTAINERS.yml: Add mathieuchopstm as STM32 collaborator
Will help on STM32 reviews.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-09 17:57:41 +01:00
Jasper Jonker
300f4e4c72 doc: net: mqtt: Add info for mosquitto >= 2.0
Provide information how to configure mosquitto >= 2.0
for the mqtt publisher sample. Secondly, how to
configure ethernet interface in case the board is
connected directly to the host computer through LAN.

Signed-off-by: Jasper Jonker <jjasper.jonker@gmail.com>
2024-08-09 17:57:31 +01:00
Lukasz Fundakowski
857adb28e3 twister: Fix failing tests on CI with Python 3.12
This change is removing some deprecation warnings
which for some reason causing failing tests with
Python 3.12 on CI #76877.

Also, it fixes warnings from pytest like:
PytestCollectionWarning: cannot collect test class 'TestPlan'
because it has a __init__ constructor
(from: scripts/tests/twister/test_testplan.py)

Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
2024-08-09 09:27:59 -04:00
Pieter De Gendt
6a101ae962 scripts: ci: check_compliance.py: Add clang-format check
Add a new compliance check that reports any clang-format issues on
the git diff and prints a warning.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-09 08:41:33 -04:00
Pieter De Gendt
f21c97a9c5 scripts: ci: check_compliance.py: Allow multiline annotations
Encode annotation message to allow multiline messages.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-09 08:41:33 -04:00
Yuval Peress
690134356c i2c_emul: Add support for CONFIG_I2C_TARGET_BUFFER_MODE
Add emulation and test to support the buffered target mode.

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-09 08:40:51 -04:00
Yuval Peress
81f163e6fb i2c: Add/update utility inline functions
- Change the argument for i2c_is_read_op to a const pointer
- Add function i2c_is_stop_op to test if a message has a stop flag.

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-09 08:40:51 -04:00
Yuval Peress
c394b2e6f8 test: Add i2c emulation for targets
Update i2c_emul.c to support i2c_target_register and i2c_target_unregister
function calls as well as support address forwarding in emulation.
Address forwarding helps us test IPCs in native sim. Instead of having to
emulate 2 separate cores, we can forward read/write requests from one bus
to another bus (effectively creating a loop). This way the same image can
simulate both the controller and the target.

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-09 08:40:51 -04:00
Pedro Kaj Kjellerup Nacht
c68d67aefb github: workflows: Add Scorecards badge
Add the OpenSSF Scorecards badge to README.rst

Signed-off-by: Pedro Kaj Kjellerup Nacht <pedro.k.night@gmail.com>
2024-08-09 08:40:05 -04:00
Pedro Kaj Kjellerup Nacht
a69044ff1d github: workflows: Create scorecards.yml
Adds the OpenSSF Scorecard GitHub Action

Signed-off-by: Pedro Kaj Kjellerup Nacht <pedro.k.night@gmail.com>
2024-08-09 08:40:05 -04:00
Benjamin Bigler
744b21c738 modules: mbedtls: add x509write.c source file
Add x509write.c source file which was added in mbedtls 3.6

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-08-09 08:39:39 -04:00
Keith Short
da4f4e8748 ztest: Replace PRINT with PRINT_DATA
The testsuite subsystem provides the macro PRINT_DATA() which can be
overridden using CONFIG_ZTEST_TC_UTIL_USER_OVERRIDE. Switch all calls of
PRINT() to PRINT_DATA withing the testsuite subsystem.

Signed-off-by: Keith Short <keithshort@google.com>
2024-08-09 08:39:18 -04:00
Keith Short
82a2a16649 ztest: Fix formatting
Run clang-format on some ztest files.

Signed-off-by: Keith Short <keithshort@google.com>
2024-08-09 08:39:18 -04:00
Keith Short
d8bc125469 ztest: fix compliance issue
Check compliance flagged an UNNESSARY_INT error.

Signed-off-by: Keith Short <keithshort@google.com>
2024-08-09 08:39:18 -04:00
Mirko Covizzi
b75c59115f clang-format: add SpaceBeforeInheritanceColon False
For clang-format to adhere to checkpatch, this flag needs to be set.

Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
2024-08-09 08:37:54 -04:00
Nick Ward
8cbe13aeaa doc: release-notes-4.0: LwM2M location object change
Added changelog for breaking changes to location object.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-08-09 08:37:25 -04:00
Nick Ward
e738bca67f net: lwm2m: location object: make optional resources optional
Provides the user control over whether the altitude, radius,
or speed resources are in use.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-08-09 08:37:25 -04:00
Dmitrii Golovanov
889950843f tests: timer: behavior_external: fix MAX_STD_DEV
Fix `MAX_STD_DEV` calculation at the timer behavior external test.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-09 08:37:14 -04:00
Dmitrii Golovanov
d2ff869a1d tests: timer: behavior: fix MAX_STD_DEV recording
Fix misaligned name change for `MAX_STD_DEV` value.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-08-09 08:37:14 -04:00
Pisit Sawangvonganan
edbf8efeab net: wifi_utils: correct channel scan range in Wi-Fi 6GHz
Introduce `wifi_utils_get_next_chan_6g` to get the next
valid Wi-Fi 6GHz channel.

This commit addresses the proper handling of cases when
`chan_start` is not 1.

Fix #74063

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-09 08:36:22 -04:00
Armin Brauns
ede19a4337 drivers: mcp23xxx: add support for open-drain chip variants
Pin definitions should correctly reflect the actual drive mode of the GPIO
controller, either push-pull or open drain.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-09 09:55:30 +02:00
Armin Brauns
054cc09c88 drivers: add bindings for all existing mcp23xxx variants
This allows getting rid of the ngpios property, which is implicit in the
part number. It also prepares for configuring pins as open-drain on
supporting chips in the next commit.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-09 09:55:30 +02:00
Armin Brauns
75b3bf5b6c drivers: remove legacy mcp23s17 driver
This chip is handled by the more generic mcp23xxx driver, which will get a
microchip,mcp23s17 compatible binding in the next commit.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-09 09:55:30 +02:00
Torsten Rasmussen
756869c9d7 scripts: support soc/boards in Zephyr modules
Extend check_compliance with support for soc and boards defined Zephyr
modules.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-09 09:55:18 +02:00
Juliane Schulze
932306a6e5 drivers: vcnl36825t: fix power consumption issues
- apply correct order to suspend/resume when using continuous mode
- unset LPEN (low-power-enable) bit on suspend (causing excessive
  current draw)
- fix a starting issue which lead to higher power consumption

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-08-09 09:55:07 +02:00
Sadik Ozer
88c18cb1dc boards: arm: Enable TRNG driver for MAX32666 boards
TRNG enabled for MAX32666EVKIT and MAX32666FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-09 09:55:01 +02:00
Furkan Akkiz
0b27b8437a tests: drivers: gpio: Enable gpio driver tests for max32666evkit board
Enable gpio driver test for MAX32666EVKIT

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-09 09:55:01 +02:00
Sadik Ozer
275932b3ea boards: Add max32666evkit board
Add MAX32666EVKIT board file and documentation
For more information about this board please check
https://www.analog.com/

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-09 09:55:01 +02:00
Sadik Ozer
7475666ac9 tests: drivers: gpio: Enable gpio driver tests for max32666fthr board
Enable gpio driver test for max32666fthr

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-09 09:55:01 +02:00
Sadik Ozer
e3d457714b boards: Add MAX32666FTHR board
Add MAX32666FTHR board
For more information about this board please check
https://www.analog.com/

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-09 09:55:01 +02:00
Sadik Ozer
6b41240038 soc: Add the MAX32666 SoC
Add MAX32666 Kconfig and dts files

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-09 09:55:01 +02:00
Jason Yu
aa8c0f0f73 mcxn947: touch: Enable touch panel on frdm_mcxn947
- Enable the touch panel of lcd_par_s035

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2024-08-09 09:54:51 +02:00
Jason Yu
3b82edbf71 shields: lcd_par_s035: Add touch and LVGL
- Add touch info in dts
 - Add LVGL configuration

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2024-08-09 09:54:51 +02:00
Jason Yu
83c801965e dts: nxp,lcd-8080: Add dts binding for nxp lcd 8080 interface gpio
- Currently this interface is used by panel LCD-PAR-S035

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2024-08-09 09:54:51 +02:00
Robin Carrupt
80aa24ad95 sensor/ntc_thermistor: Corrected the type of adc values to accept 16 bits
The NTC thermistor sensor in drivers/sensor/ntc_thermistor/ntc_thermistor.c
cannot work with a 16-bit ADC.
The voltage becomes negative if the ADC raw value is 0x8000 or higher.

To correct this, I changed the types in the
ntc_thermistor_data struct from int16_t to int32_t.

This also corrects a potential problem at line 53
where we transform an int16_t into an int32_t.

Fixes: #75203
Signed-off-by: Robin Carrupt <robincarrupt@gmail.com>
2024-08-09 09:54:43 +02:00
Marek Matej
795ac34f29 soc: espressif: Use WiFi config file
Add config file to host WiFi specific settings.
Introduce CONFIG_ESP_WIFI_MAX_THREAD_PRIO to be used
as a cap for the LL driver runtime.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-08-09 09:54:36 +02:00
Marek Matej
5a227da8cd manifest: update hal_espressif
Update ESP32 hal to support latest changes.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-08-09 09:54:36 +02:00
Krzysztof Chruściński
70260720e9 tests: ipc: pbuf: Disable data cache management
Packet buffer is designed to run writer and reader code on two CPUs.
The write function cannot be preempted by the read function in a CPU,
or the cache management could result in data corruption. In the tests,
the reader and the writer are executed on a single CPU. Disable data
cache management to prevent potential data corruption.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-09 09:54:29 +02:00
Flavio Ceolin
ea36f0c0a5 security: Update information for CVE-2023-4262
This CVE was rejected after further analysis.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-09 09:54:22 +02:00
Victor Chavez
3ee6fa8c07 logging: Optimize ble notification size
Reduce the size of the ble notification if the length of
the line output is less than the current mtu size.

Signed-off-by: Victor Chavez <vchavezb@protonmail.com>
2024-08-09 09:54:14 +02:00
Chris Friedt
2aa31a3695 tests: posix: one tier0 platform per arch for integration tests
Add one tier0 platform per supported architecture.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-08 20:23:36 -04:00
Matt Rodgers
d28080e277 doc: fix code samples in dns_sd documentation so that they compile
Macros for registering TCP and UDP services accept a port as a number,
not a pointer. Also added missing parameter to UDP service macro, and
missing type of bar_txt

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-08 20:23:00 -04:00
Matt Rodgers
9de1342f99 net: dns-sd: include iterable_sections.h header
Service registration macros in dns_sd.h require iterable_sections.h to
compile.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-08 20:23:00 -04:00
Robert Lubos
d5fc86ed0a tests: net: mqtt: Make publisher/subscriber test suites self contained
The MQTT publisher/subscriber/pubsub tests suites are currently
depending on an external MQTT broker being available. In result, the
test suites cannot be executed in twister and need to be run manually,
which makes them kind of pointless from the CI perspective.

This commit reworks the tests, so that they no longer rely on an
external broker being available, but rather implement minimalistic
broker functionality for test purposes only. This will make the tests
self contained, and thus executable in the CI.

Since it makes not point to duplicate the effort between the test
suites, the test suites have been merged into a single mqtt_client test
suite.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-08 20:22:33 -04:00
Robert Lubos
71375d1414 tests: net: mqtt: Group existing MQTT 3.1.1 test suites
Currently existing tests suites verify MQTT 3.1.1 functionality,
therefore group them together under "mqtt/v3_1_1" directory, so
that the test base can be extended easily in the future with MQTT 5.0
tests without collision.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-08 20:22:33 -04:00
Lukasz Majewski
b0e0bbfe5d drivers: ethernet: tc6: Combine read chunks into continuous net buffer
Up till now the size of net buffer chunk was set to only 64B. This
approach was acceptable for IPv4 support as all headers would fit into
64B of allocated continuous memory.

With enabled support for IPv6 one would observe following errors when
Neighbor Discovery [ND] is performed:

net_pkt: Uncontiguous data cannot be linearized
net_ipv6_nd: DROP: NULL NA header
net_icmpv6: ICMPv6 handling failure (-5)

As some IPv6 headers span on multiple 64B net_pkt buffer instances.

To fix this error - the received chunks are stored to large enough single
net_pkt buffer fragment.

Signed-off-by: Stefan Bigler <linux@bigler.io>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-08-08 20:21:58 -04:00
Stefan Bigler
52a35edb49 drivers: ethernet: Continue transmission when setting mac or promisc mode
To change mac or enable/disable promiscous mode transmit/receive does not
need to be disabled.
Disabling and enabling again leads to not transmitting anything afterwards.

Signed-off-by: Stefan Bigler <linux@bigler.io>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-08-08 20:21:58 -04:00
Stefan Bigler
fef277af42 drivers: ethernet: lan865x: Enable all multicast MAC addr for IPv6
Up till now the configuration of LAN865x was NOT allowing any
multicast frames to be received.

However, those are required for correct handling of IPv6's Neighbor
Discovery [ND] protocol.

This patch - by setting all bits in hash enable register - allows
all muticast MAC addresses to be recived.

Of course - more granular approach to specify set of addresses to
be allowed would be better and will be added in the future.

Signed-off-by: Stefan Bigler <linux@bigler.io>
[Cleanup + modified comment]
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-08-08 20:21:58 -04:00
Lukasz Majewski
155fa2e9c9 drivers: ethernet: tc6: Add comment regarding RFA bit set in OA_CONFIG0
Add extra information regarding the case when ZAREFE (0b01) combination
is set for RFA in OA_CONFIG0 register.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-08-08 20:21:58 -04:00
Lukasz Majewski
209093d28e drivers: ethernet: lan865x: Update SPEC_ADD1_BOTTOM register comment
The current commit required some clarification.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-08-08 20:21:58 -04:00
Pisit Sawangvonganan
721ee31c36 net: wifi: shell: enhance consistency in code style
Enhancing code consistency provides cognitive leverage with
the following changes:
- Unified the order of declaration for `opt`, `opt_index`,
  `state`, and `long_options`.
- Unified the wrapping of `getopt_long` calls, regardless of
  the length of the `options` string.
- Renamed `option_index` to `opt_index` for consistency.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-08 20:21:13 -04:00
Pisit Sawangvonganan
2ef08cee38 net: wifi: shell: use getopt_state for safer optarg access
Using `getopt_state` to access `optarg` and also `optopt` offers
a better alternative to direct global access.

See e145eb9201 for the previous change related to this.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-08 20:21:13 -04:00
Pisit Sawangvonganan
5af4e9df2f net: wifi: shell: apply struct option as static const
This change marks the remaining instance of the `struct option` as
`static const`.

The rationale is that `struct option` is a read-only variable.
By using `static const`, we ensure immutability, leading to usage of only
the `.rodata` section and a reduction in the `.data` area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-08 20:21:13 -04:00
Pisit Sawangvonganan
e87d508ae5 net: wifi: shell: manual code formatting
Various manual code formatting adjustments, including:
- Wrapping lines in the `long_options` declaration to prevent them
  from extending too far to the right.
- Adding missing `{` and `}` in the `if` statement in
  `cmd_wifi_set_rts_threshold`.
- Aligning `SHELL_CMD_ARG` in `wifi_commands` with previous declarations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-08 20:21:13 -04:00
Ricardo Rivera-Matos
0c7e87714d samples: drv2605: Adds a DRV2605 sample application
Adds a sample application for the DRV2605 haptic driver IC.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-08 15:57:12 +02:00
Ricardo Rivera-Matos
a774cbc61a tests: build_all: Adds Haptics build test
Adds Haptics build test

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-08 15:57:12 +02:00
Ricardo Rivera-Matos
b5a5bddf60 haptics: Introduces support for DRV2605 Haptic Driver
Adds support for the DRV2605 haptic driver.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-08 15:57:12 +02:00
Ricardo Rivera-Matos
ab6a738d83 dts: haptics: Adds the DRV2605 devicetree bindings
Adds the devicetree bindings for the DRV2605 haptic driver IC.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-08 15:57:12 +02:00
Ricardo Rivera-Matos
977c70a6c0 haptics: Introduces a haptics API
Introduces a haptics API for use with LRA driver ICs to
create haptic feedback events.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2024-08-08 15:57:12 +02:00
Kai Vehmanen
2fcdbba534 intel_adsp/ace: power: pad the hpsram_mask passed to power_down
The power_down() function will lock dcache for the hpsram_mask
array. On some platforms, the dcache lock will fail if the array
is on cache line that can be used for window register context
saves.

Work around this by aligning and padding the hpsram_mask to cacheline
size.

Link: https://github.com/thesofproject/sof/issues/9268
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-08-08 15:38:58 +02:00
Flavio Ceolin
0205c7d511 pm: Remove deprecated symbol references
Do not reference PM_DEVICE_RUNTIME_EXCLUSIVE

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-08 15:38:04 +02:00
Seppo Takalo
e3100c6f3a net: lwm2m: Allow SenML-CBOR floats decoded as int
SenML is technically a JSON based format which can
be encoded as a CBOR. SenML-CBOR specification in
RFC 8428 section 6 states that numbers can be decoded
as an integer.

Also RFC 7049 section 4.2 states that JSON numbers
without fractional part can be decoded as an integer.

I have seen with one commercial LwM2M platform that
the decoder  they use, sends floating point values as
integers, if there is no fractional part.

So LwM2M engine cannot assume from the path that
the incomming number is either float or int. Accept both.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-08 15:37:56 +02:00
Tomi Fontanilles
2249b87b5e drivers: hwinfo: add the HWINFO_HAS_DRIVER Kconfig option
Introduce a Kconfig option to signal whether a HW info driver is
available when HWINFO is enabled.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-08-08 15:37:40 +02:00
Konrad Derda
5e4e63ba8f net: ipv6: route: get nexthop's LL address only if relevant
This commit moves reading nexthop's LL address only if it's supported
by a given neighbor and can be used for routing between interfaces.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-08-08 15:37:32 +02:00
Jordan Yates
5d87cd654f sdhc: sdhc_spi: compile-time determine if sdhc_ones needed
Use the new `SPI_MOSI_OVERRUN_DT` macro to determine at compile-time
whether the 512 byte array of `sdhc_ones` is required.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-08 06:17:45 -04:00
Jordan Yates
2709879c06 spi: expose overrun-character property from dt
Expose the new common property `overrun-character` from the devicetree
nodes, falling back to the `SPI_MOSI_OVERRUN_UNKNOWN` value.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-08 06:17:45 -04:00
Jordan Yates
76d43a8f62 dts: spi: move overrun-character from Nordic to base
Move the `overrun-character` property from the common Nordic SPI
binding to the `spi-controller` base binding. This gives users of the
SPI interface a way to query what the default value is at compile-time,
and potentially avoid allocation of large constant buffers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-08 06:17:45 -04:00
Pisit Sawangvonganan
dcd0a2756d drivers: spi: remove '&' when assigning init_fn
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/spi`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-08 06:08:04 -04:00
Anke Xiao
e69bfa5e7d tests: drivers: spi: add configuration for ke17z to test loopback
Add spi configurations of NXP frdm_ke17z and frdm_ke17z512 boards,
tested spi_loopback sample for lpspi drivers.
Update the "HAS_MCUX_*" kconfig to "DT_HAS_*" in testcase.yaml

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-08 06:07:51 -04:00
Anke Xiao
f1ef690224 boards: nxp: enable lpspi and edma driver for ke17z
Enable lpspi and edma driver for frdm_ke17z and frdm_ke17z512.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-08 06:07:51 -04:00
Anke Xiao
f253d36f5d soc: nxp: kinetis: ke1xz: enable spi clock
Add lpspi clock configuration for frdm_ke17z and frdm_ke17z512.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-08 06:07:51 -04:00
Anke Xiao
878d417020 dts: arm: nxp: nxp_ke1xz.dtsi: add lpspi and dma support
Add spi and dma dts configurations information for frdm_ke17z and
frdm_ke17z512 boards.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-08 06:07:51 -04:00
Dino Li
c3a4a1a0f6 drivers: intc_ite_it8xxx2: disable debug mode then reset for tests
After flashed EC image, we needed to manually press the reset button
on it8xxx2_evb. Now, without pressing the button, we can disable
debug mode and trigger a watchdog hard reset for running tests.

After flash EC, running below tests can pass (without pressing the button):
west build -p always -b it8xxx2_evb tests/drivers/watchdog/wdt_basic_api
west build -p always -b it8xxx2_evb tests/kernel/timer/timer_api
west build -p always -b it8xxx2_evb tests/kernel/fatal/exception

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2024-08-08 06:07:35 -04:00
Jonathan Rico
58ec51616d Bluetooth: host: fix incorrect ISO HCI fragmentation logic
Don't push the TS flag on `buf` itself.

This messes up the MTU calculations: a packet that would exactly fit the
MTU and has a timestamp would be unnecessarily fragmented.

The MTU check is done on `buf` as a whole. At the point where the
fragmentation length is decided, `buf` includes one extra byte to pass the
TS bit around. That byte shouldn't count towards the MTU.

Instead, infer the presence of the timestamp by inspecting the amount of
headroom that the buffer has. This works because we always reserve
enough memory to push the timestamp, but not always push a timestamp on
the buffer. #tightlycoupled

This method is slightly uglier IMO, but eases MTU confusion and doesn't
rely on user_data.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-08 06:07:08 -04:00
Jonathan Rico
76ece09cb4 Bluetooth: Host: Add ISO HCI fragmentation test
Purpose is to verify we don't fragment ISO SDUs when they should fit the
controller's MTU.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-08 06:07:08 -04:00
Richard Wheatley
4af3d1005b drivers: pinctrl: updated to add interrupt direction
Updated to add pinctrl interrupt direction

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-08 06:06:21 -04:00
Richard Wheatley
2db45fca9c soc: ambiq: apollo4x: pinctrl updates
Updated to add more pinctrl facilities

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-08 06:06:21 -04:00
Richard Wheatley
edcfef92a5 drivers: pinctrl: updated to add interrupt direction
Updated to add pinctrl interrupt direction

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-08 06:06:21 -04:00
Manuel Argüelles
f89a2def84 tests: drivers: spi: remove overlay for mr_canhubk3
This overlay is no longer needed, as presently there are more test
scenarios covering all combinations of DMA and SPY_ASYNC support for
LPSPI peripheral.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-08 06:06:03 -04:00
Manuel Argüelles
fc9a6685f1 soc: nxp: s32: s32k3: add missing EDMA kconfig option
This option is used by some tests to filter by EDMA support.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-08 06:06:03 -04:00
Manuel Argüelles
903f591317 west: pull fixes for mr_canhubk3 dma driver
Update manifest to pull fixes for mr_canhubk3 DMA driver.

Fixes #76708

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-08-08 06:06:03 -04:00
Sadik Ozer
c44abdf5b7 boards: adi: Enable TRNG driver for MAX326662EVKIT
TRNG enabled for MAX32662EVKIT board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-07 19:04:26 -04:00
Furkan Akkiz
2c703e7547 tests: drivers: gpio: Enable gpio driver tests for max32662evkit board
Enable gpio driver test for MAX32662EVKIT

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-07 19:04:26 -04:00
Sadik Ozer
fa0d08c70a boards: Add MAX32662EVKIT board
Add MAX32662EVKIT board files
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-07 19:04:26 -04:00
Sadik Ozer
7323757e36 soc: Add the MAX32662 SoC
Add MAX32662 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-07 19:04:26 -04:00
Sadik Ozer
a091a5b301 manifest: Update hal_adi to remove .shared section
The .shared and .mailbox sections are for the dual-core parts
and do not exist for the MAX32662

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-07 19:04:26 -04:00
Krzysztof Chruściński
5bd6050241 testsuite: busy_sim: Add alarm cancelation to stop function
Without cancelation next start may return error.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-07 19:04:04 -04:00
Krzysztof Chruściński
42f003cebd testsuite: busy_sim: Allow running with timer random generator
Allow to run with timer random generator which does not need any
entropy device.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-07 19:04:04 -04:00
Krzysztof Chruściński
28b4bab01c kernel: fatal: Fix NO_OPTIMIZATIONS build
When logging is on and optimization and multithreading is off then
build fails to link because unoptimized compiler/linker seems to not
look beyond the function and it fails trying to link k_thread_name_get.
Reworking the code to make it known to the compiler without optimization
that k_thread_name_get is not needed and not logging current thread
name in that case.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-07 19:03:40 -04:00
Francois Ramu
c8e1fdf296 soc: stm32 devices have lower tick with lower sysclock
For stm32 platforms where the sysclock is less or equal to
32MHz, the Ticks per second is reduced to 8000 (instead of
10000).

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-07 19:03:18 -04:00
Benedikt Schmidt
d561b50695 tests: drivers: flash: stm32: add nucleo_f746zg
Add the nucleo_f746zg to the tests for the flash driver.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-07 19:02:49 -04:00
Benedikt Schmidt
f8399bd773 drivers: flash: implement RDP for STM32F7
Implement the readout protection for the STM32F7 series.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-07 19:02:49 -04:00
Benedikt Schmidt
db2261b6f5 drivers: flash: reduce redundancy in RDP implementation on STM32
Reduce the redundancy in the readout protection implementation
on STM32 MCUs.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-07 19:02:49 -04:00
Kapil Bhatt
2f088fabc2 net: wifi: Add Current PHY rate
Current PHY rate
It represents the current PHY rate of transfer
of data in bits per second. It will a TX data rate.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-07 19:02:32 -04:00
Kapil Bhatt
459a63b137 net: wifi: Add over run count statistics
Over run count
It represents the number of packets dropped either at
received and sent due to lack of buffer memory to retain
all packets on the network interface.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-07 19:02:32 -04:00
Glenn Andrews
15db23223a samples: SMF: LVGL: SMF-based Calculator
This sample crates a touchscreen desk calculator based on
the sample state machine in _Practical UML Statecharts in
C/C++_ by Miro Samek.

Sample should build and run on any touchscreen-enabled
board with sufficient resources.

Tested on `disco_l475_iot1` board with
`adafruit_2_8_tft_touch_v2` touchscreen.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-08-07 19:02:15 -04:00
Grzegorz Swiderski
56d241bd48 soc: nordic: Validate PPR CLIC address
Add a missing entry in `validate_base_addresses.c`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-08-07 19:01:55 -04:00
Grzegorz Swiderski
79b0154f5e dts: nordic: Remove cpu property from VPR nodes
It's a superfluous value which used to be required by tooling, but now
we can remove it.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-08-07 19:01:55 -04:00
Grzegorz Swiderski
fa2240ba31 dts: nordic: nrf54h20: Fix PPR CLIC address
Between SoC revisions, the address was moved from 0x5F909000 in the
global domain, to 0xF0000000 in PPR's private address space.

Move the corresponding DT node out of `cpuppr_vpr` range to a separate
bus node, which is considered inaccessible to all cores but `cpuppr`.
This is expressed by selectively leaving out the `simple-bus` compatible
and `ranges` property, i.e., they're only set in `nrf54h20_cpuppr.dtsi`.

This lets the interrupt controller node remain visible at system level,
for the purpose of describing IRQ mappings between cores in devicetree.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-08-07 19:01:55 -04:00
Dawid Niedzwiecki
a6b409f02a boards: google_dragonclaw: enable rng module
Enable the rng module for the google_dragonclaw board by default.

The RNG module is always used anyway and it helps with running tests
that needs entropy.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-07 19:01:36 -04:00
Alvis Sun
421ca39cf0 divers: clock_control: npcx: HFCBCD3 in CDCG is only available in npcx4
As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-08-07 19:01:18 -04:00
Yong Cong Sin
87b95be52a arch: riscv: ARCH_STACK_PTR_ALIGN should be 4 for RV32E
Stack alignment for RV32E is 4 bytes

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-07 19:00:53 -04:00
Yong Cong Sin
0787744684 tests: arch: common: stack_unwind: add qemu_riscv32e
qemu_riscv32e uses a different ISA and is kinda special, add it
to the testcase for better coverage.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-07 19:00:53 -04:00
Herman Berget
af314643a3 manifest: Update hal_nordic with nonsecure PPIB fix
Secure PPIB instances were accessed even when building for nonsecure

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2024-08-07 08:40:28 -07:00
Anas Nashif
d590c18672 intel_adsp: ace: call soc_num_cpus_init early
Restore order of execution. Code that was run in EARLY init level is now
too late.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-07 13:50:53 +02:00
Anas Nashif
c79bbfadbb xtensa: move arch_kernel_init code into prep_c
arch_kernel_init() was misused for all architecture initialization code
that is done in prep_c and prior to cstart on other architectures.
arch_kernel_init() is late in the init process and comes after EARLY
init level, making xtensa have a very special boot path.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-07 13:50:53 +02:00
Anas Nashif
dbfbf0edba xtensa: adapt soc code to use prep_c
Many xtensa target jump from soc code directly into cstart and depend on
architecture code being initialized in arch_kernel_init(). Instead of
jumping to cstart, jump to newly introduced prep_c similar to all other
architectures, where common platfotm initialization will happen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-07 13:50:53 +02:00
Anas Nashif
42396735bf xtensa: introduce prep_c for xtensa
xtensa is the only architecutre doing thing differently and introduces
inconsistency in the init process and dependencies as we attemp to
cleanup init levels and remove misused of SYS_INIT.

Introduce prep_c for this architecture and align with other
architectures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-07 13:50:53 +02:00
Anas Nashif
299dddfdce xtensa: remove mention of crt0-app.S
crt0-app.S does not exist, remove it from comments to avoid confusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-07 13:50:53 +02:00
Gerard Marull-Paretas
dbb5e57555 samples: drivers: mbox: fix nRF54H20 cpuapp<>cpuflpr channel regex
Bellboard channel used by the sample is 14, not 18.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-07 13:50:44 +02:00
Dawid Niedzwiecki
ff668a6bed libc: newlib: add config to use custom sbrk
Add a config to use the custom _sbrk function, defined by a user.

It is possible that an application doesn't want to use the entire
remaining RAM for the heap.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-08-07 07:25:46 -04:00
Lukasz Stepnicki
d6ed750350 modules: hal_nordic: dvfs: added callback when scaling done
User can assign callback function to local domain dvfs handler
and get notification when scaling process is finished for
particular domain.
Reworked usage of DVFS_SERV_HDL_FREQ_CHANGE_IN_PROGRESS_BIT_POS
which was not initialized properly.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-08-07 07:18:42 -04:00
Dominik Ermel
0fbcf622f5 doc: releases: Add note for update of LittleFS
LittleFS module version has been updated from 2.8.1 to 2.9.3.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-08-07 07:18:23 -04:00
Dominik Ermel
0f9a023d7d manifest: Update LittleFS to 2.9.3 from upstream
Update Zephyr fork of LittleFS to v2.9.3.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-08-07 07:18:23 -04:00
Scott Worley
a698b77fb4 dts: microchip: mec5: Base MEC5 MEC174x, MEC1752, MECH172x DTSI files
Add the base DTSI chip files for Microchip MEC174x, MEC175x,
and MECH172x using new MEC5 HAL.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-08-07 07:18:09 -04:00
Jonathan Rico
36c9fdcb85 boards: Add support for 01space esp32c3 0.42 oled
From https://github.com/01Space/ESP32-C3-0.42LCD/

Adapted from the XIAO ESP32C3 board.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-07 07:17:54 -04:00
Marcin Niestroj
05c97732c4 boards: nucleo_h533re: configure USB
Configure USB interface in devicetree, so it can be used with USB samples.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-07 07:17:38 -04:00
Maochen Wang
5583518c78 dts: arm: nxp_rw6xx: add imu interrupts
Add imu and wakeup done interrupts.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-07 07:17:23 -04:00
Maochen Wang
e394af5b0b samples: wifi: boards: added nxp rd_rw612_bga board config
Add nxp rd_rw612_bga board config for wifi.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-07 07:17:23 -04:00
Maochen Wang
0495d890b5 dts: wifi: add nxp wifi device tree compatible
Add nxp wifi device tree yaml file.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-07 07:17:23 -04:00
Maochen Wang
4c2ce36e6f drivers: wifi: Add NXP wifi shim driver support
Add NXP wifi shim driver code.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-08-07 07:17:23 -04:00
Felipe Neves
4e0ff0cb61 samples: drivers: mbox: add samples for ESP32 and ESP32S3
devkitc and devktim boards for the mbox driver sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-07 07:17:01 -04:00
Felipe Neves
af91d06b00 drivers: mbox: mbox_esp32: add support for esp32 MBOX driver
as an alternative for IPM driver.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-07 07:17:01 -04:00
Duy Phuong Hoang. Nguyen
0c93268e52 driver: clock: Update clock control driver for RA8
This update is to support clock API for RA8
Move the clock initialize function into clock driver
Peripheral clock now has 2 more property in clock cell for enable
and disable clock to peripheral module

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-07 07:16:45 -04:00
Yiding Jia
eb351436ad drivers: pinctrl: rp2040: oe-override option
This change adds the device tree property for specifying oe-override
(output-enable override behavior), as well as defines for possible values
of the property.

RP2040 GPIOs can be configured to automatically invert the output-enable
signal from the selected peripheral function. This is useful for tasks like
writing efficient PIO code, such as in the i2c example in the rp2040
datasheet.


Signed-off-by: Yiding Jia <yiding.jia@gmail.com>
2024-08-07 07:16:28 -04:00
Derek Snell
3226d10266 samples: video: capture: leverage PXP to flip image
PXP can flip image written to the frame buffer.  Provide a mirror image
on the display by flipping the camera image horizontally.  Enabled on
boards mimxrt1066_evk and mimxrt1060_evkb.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-08-07 07:14:20 -04:00
Derek Snell
200a669dd2 drivers: display: display_mcux_elcdif: Add PXP flip feature
display_write() can leverage PXP to flip the image.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-08-07 07:14:20 -04:00
Derek Snell
2b601fa3a0 drivers: dma: dma_mcux_pxp: Add flip feature
PXP can flip an image in input buffer horizontally, vertically, or both.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-08-07 07:14:20 -04:00
Derek Snell
e950c839d6 boards: nxp: mimxrt1064_evk: enable PXP
Enable PXP in board devicetree for display samples.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-08-07 07:14:20 -04:00
Derek Snell
127ce3aee3 boards: nxp: mimxrt1060_evkb: enable dvp_fpc24_mt9m114 shield
Enable camera shield.  Tested with samples/subsys/video/capture.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-08-07 07:14:20 -04:00
Konrad Sikora
f3af39b4d7 drivers: sensor: Fix DHT20 build failure with CRC configured
Fixes the build error: 'crc' undeclared for
DHT20 sensor with CONFIG_DHT20_CRC option enabled.

Signed-off-by: Konrad Sikora <kontakt@konradsikora.pl>
2024-08-07 07:14:11 -04:00
Łukasz Duda
fb71ca2237 net: openthread: Handle deprecated IPv6 addresses correctly
This commit fixes an issue where deprecated IPv6 addresses were not
being correctly marked. In some cases, deprecated addresses might have
been used as source addresses.

Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
2024-08-07 07:13:54 -04:00
Ryan McClelland
e12602ae02 i3c: drivers: check for reserved addresses for i2c scan
According to 5.1.2.2.5 I3C Target Address Restrictions in the I3C
v1.1.1 specification. Certain addresses are not allowed. These are
all marked as reserved in the address map. Print "RS" if they are
reserved and skipped.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-08-07 07:13:42 -04:00
Chaitanya Tata
3409f16604 modules: hostap: Fix interface registration to NM
Wi-Fi shell now uses _sta/_ap APIs to getch specific inteface types, so,
by default register as a Station.

This needs more work to handle multiple modes and mode switching.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-07 07:13:27 -04:00
Chaitanya Tata
bf4d8cc2cc drivers: wifi: nrf: Fix build error in utils
When Wi-Fi utils is enabled it causes build error due to missing rename
in a couple of places.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-07 07:13:27 -04:00
Chaitanya Tata
8c3f1cf662 drivers: wifi: nrf: Fix include path for version
The version header is generated during build and generated path included
already has "zephyr" directory.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-07 07:13:27 -04:00
Sadik Ozer
3240b034fe boards: adi: Enable TRNG driver for MAX326675EVKIT
TRNG enabled for MAX32675EVKIT board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:18:02 -04:00
Sadik Ozer
c07f8bab58 tests: drivers: gpio: Enable gpio driver tests for max32675 board
Enable gpio driver test for max32675evkit board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:18:02 -04:00
Sadik Ozer
50b45b3010 boards: Add MAX32675EVKit board
Added MAX32675EVKit board
For more information about this board please check
https://www.analog.com/

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:18:02 -04:00
Sadik Ozer
a055587721 soc: Add the MAX32675 SoC
Add MAX32675 Kconfig and dts files

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:18:02 -04:00
Johann Fischer
5ddaa3b1a1 drivers: udc: add opaque pointer to store upper layer private data
Add an opaque pointer to store upper layer private data and initialize
it with the USB device context during controller initialization. Use the
pointer in event processing to get the correct context.

Fixes commit 48f2a4bc1a
("usb: device_next: remove initialized state checks in event processing")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-06 17:17:41 -04:00
Sylvio Alves
c374d3147b linker: esp32: fix cpp rom region
cplusplus-rom linker initialization was wrongly placed
in RAM area when it should be in ROM area.

Fixes #75853

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-06 17:17:24 -04:00
Yong Cong Sin
9698df9dc4 arch: riscv: stacktrace: fix output without ra on the stack top
Account for the scenario when we are doing `esf`-based
unwinding from a function which doesn't have any callee.
In this case the `ra` is not saved on the stack and the
second function from the top of the frame could be missing.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-06 17:17:17 -04:00
Kristoffer Rist Skøien
f36828b5d8 clang-format: IndentGotoLabels false
For clang-format to adhere to checkpatch, this flag needs to be set

Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
2024-08-06 17:17:07 -04:00
Seppo Takalo
b68477b372 net: lwm2m: Reset retry counter on update
On a successful update we should reset the retry counter, similarly
like we do on successful registration.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-06 17:16:46 -04:00
Seppo Takalo
e7b06e1c86 net: lwm2m: send REGISTRATION_TIMEOUT event on error
When socket errors call sm_handle_timeout_state() we might be
in a state where application assumes we are in registered state
but we are dropping it.
Therefore we must ensure that all registration states emit either
REGISTRATION_TIMEOUT event for application to indicate that
we have lost the connection to server.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-06 17:16:46 -04:00
Tahsin Mutlugun
c83b91a0e4 tests: drivers: dma: Add MAX32680EVKIT overlay files
Enable 'chan_blen_transfer' and 'loop_transfer' tests for MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
c2326ca55a tests: drivers: dma: Add MAX32672 boards overlay files
Enable 'chan_blen_transfer' and 'loop_transfer' tests for MAX32672 boards.

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Mert Ekren
481d4a472c tests: drivers: dma: Add MAX32670 overlay files
Enable 'chan_blen_transfer' and 'loop_transfer' tests for MAX32670EVKIT.

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
185f328135 tests: drivers: dma: Add MAX32690 overlay files
Enable 'chan_blen_transfer' and 'loop_transfer' tests for MAX32690EVKIT.

Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Sadik Ozer
3a7260dab3 tests: drivers: dma: Add MAX32655 board overlay files
Add MAX32655EVKIT and FTHR board overlay files to dma tests.

Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Co-authored-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
c7ea289ea2 boards: arm: adi: Add DMA to MAX32690EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Tahsin Mutlugun
0c6342e36b boards: arm: adi: Add DMA to MAX32680EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files and enable dma0 instance.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
aac7c09cb7 boards: arm: adi: Add DMA to MAX32672 boards driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Mert Ekren
8819180c48 boards: arm: adi: Add DMA to MAX32670EVKIT board driver list
Add DMA into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-06 17:16:35 -04:00
Jason Murphy
fb1fb2747c boards: arm: enable DMA on MAX32655 boards
Enable DMA peripheral support on MAX32655EVKIT and FHTR boards.

Co-Authored-By: Sadik Ozer <sadik.ozer@analog.com>
Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-08-06 17:16:35 -04:00
Jason Murphy
364af34de0 drivers: dma: Add MAX32655 DMA driver
Add DMA driver for MAX32655 MCU

Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Jason Murphy <jason.murphy@analog.com>
2024-08-06 17:16:35 -04:00
Tahsin Mutlugun
910d88741a dts: arm: adi: Add MAX32680 DMA instance and binding file
Add DMA0 node to MAX32680 dtsi file and add binding file for DMA slots.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
b64c0b829a dts: arm: adi: Add MAX32672 DMA instance and binding file
Add DMA0 node to MAX32672 dtsi file and add binding file for DMA slots.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Mert Ekren
fd52e38aef dts: arm: adi: Add MAX32670 DMA instance and binding file
Add DMA0 node to MAX32670 dtsi file and add binding file for DMA slots.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-06 17:16:35 -04:00
Furkan Akkiz
53cb59cfc4 dts: arm: adi: Add MAX32690 DMA instance and binding file
Add DMA0 node to MAX32690 dtsi file and add binding file for DMA slots.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-06 17:16:35 -04:00
Sadik Ozer
def2dcb70b dts: arm: adi: max32: Add MAX32 DMA driver bindings
Add MAX32 DMA driver bindings and DMA instance for MAX32655 MCU.

Co-authored-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-06 17:16:35 -04:00
Pisit Sawangvonganan
253d216589 net: ip: utils: revise data type declarations in z_impl_net_addr_ntop
Revise data type declarations to avoid implicit/explicit casts:
- Changed `unsigned char` to `uint8_t` for `zeros` array
  to match with `longest`.
- Declared variables `i`, `j`, and `pos` as `int` to use the same type.
- Cast `value` to `uint16_t` instead of `uint32_t` since
  `value` is `uint16_t`.
- Moved `bh` and `bl` declarations to narrow the scope of variables.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-06 17:15:50 -04:00
Pisit Sawangvonganan
71877efe27 net: ip: utils: simplify logic in z_impl_net_addr_ntop
Simplify high and low byte conversion by removing redundant checks,
since `net_byte_to_hex` already takes care of zero padding.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-06 17:15:50 -04:00
Pisit Sawangvonganan
dd864dbda0 net: ip: utils: simplify logic in net_byte_to_hex
Replace the loop with direct high and low nibble extraction,
and ensure the padding and zero suppression logic is simplified.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-06 17:15:50 -04:00
Tobias Frauenschläger
f4202faad5 Add: Support for pyOCD for STM32H43 nucleo board
Updated `board.cmake` and documentation.

Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com>
2024-08-06 17:15:34 -04:00
Roman Studenikin
edf09ca7f9 testsuite: coverage: Correct value of GCOV_COUNTERS for gcc 14
number of counters have changed in gcc 14 by commit
https://github.com/gcc-mirror/gcc/commit/08a52331803

Specifically, a new counter was added in gcc/gcov-counter.def:
```
/* Conditions.  The counter is interpreted as a bit-set.  */
DEF_GCOV_COUNTER(GCOV_COUNTER_CONDS, "conditions", _ior)
```

which in turn updates the value of GCOV_COUNTERS that is defined in
gcov-io.h like this:
```
enum {
GCOV_COUNTERS
};
```

Signed-off-by: Roman Studenikin <srv@meta.com>
2024-08-06 17:15:22 -04:00
Nicolas Pitre
be119d7d8c demand_paging: LRU eviction: avoid ping pong deadlock loop
If only 2 page frames are queued and code executing in one frame is
making an access to memory in the second frame then the access will trap
and k_mem_paging_eviction_accessed() will be called to move that frame
to the end of the queue ... marking the new head frame unaccessible.
But that newly unaccessible frame contains the code that has yet to be
resumed to perform its memory access. Since it is now unaccessible, a
trap is triggered, the frame is moved to the end of the queue and the
new head frame (the one we trapped for initially) is marked unaccessible.
Execution is resumed with the memory access which is unaccessible again
and the cycle repeats infinitely.

Fix this by not marking the new head unaccessible if there is only one
queued frame left in the queue.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-06 17:15:15 -04:00
Richard Wheatley
f36bd0a075 tests: drivers: rtc: rtc_api: test_update_callback
Add skip for when no update callback is defined
in driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-06 17:14:39 -04:00
Arkadiusz Balys
2de6274119 drivers: flash: Do not select NRFX_RRAMC while building with TF-M
RRAMC peripheral is a secure-only peripheral, and the application
cannot use it directly. While building an application with TF-M
enabled and SOC_FLASH_NRF_RRAM the NRFX_RRAMC selection must
be forbidden.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-08-06 15:42:44 +01:00
Anas Nashif
edb71f0ba1 manifest: add mcuboot to bootloader group
Add mcuboot to bootloader group to allow filter where needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-06 08:47:01 -04:00
Anas Nashif
a9babb5a83 twister: tests: use platforms that do not depend on a HAL
Do not depend on platforms that need a HAL. This should speed things up
and should resolve issues where runner did not have enough space to deal
with all HALs.
t
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-06 08:47:01 -04:00
Anas Nashif
4f60d593f3 ci: twister: blackbox: do not fetch optional modules
Do not fetch optional modules while running this action.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-06 08:47:01 -04:00
Gerard Marull-Paretas
ec95cbb74a samples: drivers: mbox: add support for nrf54h20dk cpuapp<>cpuflpr
Add support for testing IPC between cpuapp<>cpuflpr. Some adjustments
have been done to be able to support two different remote targets for
the nrf54h20dk cpuapp.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
85fb9db4c3 samples: sysbuild: hello_world: add cpuapp/cpuflpr+xip configuration
So that xip board variant can be easily tested.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
2f399b8896 samples: sysbuild: hello_world: add cpuapp/cpuflpr configuration
So that a hello world that runs on cpuapp/cpuflpr cores can be easily
tested.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
8dcc2e05cc snippets: nordic-flpr-xip: add support for nrf54h20dk
Add support for nRF54H20.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
3bf9e84ddc snippets: nordic-flpr-xip: move vevif enablement to nRF54L15DK overlay
Other platforms, e.g. nRF54H20 do not need this.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
d9fc08eca4 snippets: nordic-flpr: add support for nrf54h20dk
Provide overlay to mark uart135 as reserved (used by FLPR).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
7f49621131 snippets: nordic-flpr: move vevif enablement to nRF54L15DK overlay
Other platforms using FLPR, e.g. nRF54H20 do not need this.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
371acf4ea4 boards: nrf54h20dk: add xip variant for cpuflpr
While executing from MRAM will likely never happen in practice for the
FLPR core, add such variant for testing.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
e290dfe399 boards: nrf54h20dk: add cpuflpr target
Add a new board target to build for the FLPR core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
beb5d72548 boards: nrf54h20dk: add cpuapp/cpuflpr IPC configuration
Add IPC configuration to allow communicating between cpuapp and cpuflpr
cores.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
dd58aa1351 boards: nrf54h20dk: add FLPR code partition in MRAM1X
Add a new 48K partition for FLPR in the MRAM1X region.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
6ba48daa6e boards: nrf54h20dk: shrink cpuapp slot0 partition
So that we have an extra 48K for the FLPR core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
9e7b055f63 boards: nrf54h20: define FLPR memory layout within RAM21 region
Define the FLPR memory layout:

- 46K for code data
- 1K/1K for IPC between cpuapp/cpuflpr

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
d838a1f069 boards: nrf54h20dk: push dma_fast_region area to the end of the region
So that we can use the first 48K for FLPR.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
00ed91fb94 modules: hal_nordic: add support for nRF54H20 FLPR
Add necessary HAL glue code to support nRF54H20.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
4bc55acaff soc: nordic: vpr: allow building VPR launcher for FLPR
VPR launcher can also be used for FLPR.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
3f3ffb91ad soc: nordic: nrf54h20: define CPUFLPR core
So that FLPR core can be used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
009f3e3669 dts: riscv: nordic: nrf54h20: introduce cpuflpr
Add a new base devicetree file for the FLPR core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
c2ddba98a0 dts: nordic: nrf54h20: define cpuflpr VEVIF TX instance
Define the FLPR VEVIF instance (used to send _tasks_).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
d8c84309e0 dts: nordic: nrf54h20: define cpuflpr VEVIF RX instance
Define the FLPR VEVIF instance (used to receive _tasks_).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
d77ee01d10 dts: nordic: nrf54h20: define FLPR CLIC instance
Define the FLPR CLIC instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
b5522411e3 dts: nordic: nrf54h20: define cpuflpr_vpr coprocessor
Add a new entry for the FLPR co-processor instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
d3ab37ceab dts: nordic: nrf54h20: define cpuflpr
Define the FLPR VPR CPU instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
2d2db37c09 modules: hal_nordic: require nrf-regtool 5.6.0
This is required since NRF_FUN_POS (pinctrl) has changed its position
from 17 to 18 (a value hardcoded in the nrf-regtool as well).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
5e3188605e drivers: pinctrl: nrf: add support for nordic,clock-enable
Driver will be capable of retrieving such property from DT and apply it
accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
b57481ab18 boards, tests: nrf54h20: add nordic,clock-enable property
Applies to:

- UART/E (TXD)
- SPIM (SCK, MOSI)
- SPIS (SCK, MISO)
- TWIM (SDA, SCL)

Except fast-instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
0e93eb3ad1 dts: bindings: pinctrl: nrf: add nordic,clock-enable
On new SoCs, certain pins need to enable the clock setting on the pin
for it to work properly. For now, this has been handled internally in
the pinctrl driver, however, it appears to be an instance-specific
property (e.g. UARTE/SPIM instances in the fast domain do not require
such setting). Move the configuration of this settings to DT, the best
place where to have instance-specific hardware settings.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
65b45e5760 drivers: serial: nrfx_uarte: add support for arbitrary peripheral clock
Some UARTE instances may be clocked at higher speeds than 16MHz, so the
baudrate setting needs to be scaled accordingly. This patch parses the
`clocks` property and obtains the clock-frequency property of the
associated clock, assuming it is a fixed-clock. We should ideally have a
proper clock control subsystem where frequency can be queried using an
API, but we're far from there.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
7c011741fa dts: nordic: nrf54h20: set clocks for uart120 instance
UARTE120 is clocked by HFSFLL120 instance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
2552978df3 dts: nordic: nrf54h20: define hsfll120 instance
HSFLL120 is a clock used by fast peripherals, and it is controlled by
the system controller. From an application perspective, it is a fixed
clock. Note that it has multiple outputs (clk_main @ 320MHz, and
clk_main2|4 which provide the main clock divided by 2 and 4,
respectivelu). Only the main frequency is represented for now.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
a41a22f3e1 dts: bindings: clock: fixed-clock: include base.yaml
Include base.yaml, so that properties like `clocks` can be optionally
set.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Gerard Marull-Paretas
c2cbbd7238 dts: nordic: nrf54h20: fix uarte120 IRQ
It's 230, not 229.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 14:32:40 +02:00
Damian Nikodem
ed31037d5f drivers: ssp: fix program of MLCS register
Programming of the MLCS register was performed on the incorrect bits.
Additionally, saving the new version did not erase the previously set
value, which could result in an incorrect register value.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2024-08-06 10:28:16 +02:00
Chaitanya Tata
65bdf6564b samples: net: wifi: Fix stack sizes
Wi-Fi sample is stack heavy, so, by default increase the stack sizes to
work with any driver, esp. those use WPA supplicant like nRF Wi-Fi.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Chaitanya Tata
bf4f51a7c6 samples: net: wifi: Fix scan results dropping
Wi-Fi shell prints scan results to the console taking time and this puts
pressure on net_mgmt Queue, so, increase both timeout and Queue depth to
handle crowded Wi-Fi channel (~200 APs).

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Chaitanya Tata
051c63f6a9 boards: shields: Add nRF70 series EKs (Evaluation kits)
These shields in the Arduino form factor can be mounted on supported
boards and can provide Wi-Fi6 capability.

Base shield is nRF7002, with variants as nRF7001 (2.4GHz only) and
nRF7000 (dual band scan only).

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Chaitanya Tata
638ce2fbfd drivers: wifi: Add nRF70 Wi-Fi driver
Driver for Nordic nRF70 Wi-Fi6 companion chipset, depends on
hal_nordic/nrf_wifi for OS agnostic part of the driver.

This supports (Q)SPI interface to communicate from host to chip.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Chaitanya Tata
d1f2e7d6e7 manifest: hal_nordic: Pull nRF70 OSAL driver
This pulls in OS agnostic parts of the nRF70 Wi-Fi driver.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Chaitanya Tata
1d18144e64 dts: bindings: wifi: Add nRF70 Wi-Fi support
Add necessary bindings for the nRF70 Wi-Fi chips from Nordic
semiconductors ASA.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-06 10:27:21 +02:00
Fabio Baltieri
9036400ad0 west.yml: remove two redundant repo-path
The repo-path field is meant to override the repository name if it's
different than the module name, drop two cases where repo-path has no
effect.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-06 09:19:56 +01:00
Shang Xiangyao
fae0f5bb77 drivers: input: cst816s: add cst816d support
The CST816D touch chip is similar to the CST816S, with the primary
difference being the chip ID. This commit extends the existing
CST816S driver to support the CST816D by adding its chip ID. There
are no other modifications.

Signed-off-by: Shang Xiangyao <shxyke@gmail.com>
2024-08-06 09:19:49 +01:00
Tahsin Mutlugun
11dc47da24 tests: i2c: i2c_target_api: Remove unneeded properties in I2C nodes
For commonly-accessible I2C nodes, status and pinctrl are now set in
board dts. Remove these properties from test overlay files.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-06 09:19:42 +01:00
Tahsin Mutlugun
771d8b51a3 boards: adi: Enable commonly used I2C nodes by default
Enable commonly-used I2C in ADI MAX32 boards by default to access I2C
functionality without having to create an additional overlay file.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-06 09:19:42 +01:00
Georges Oates_Larsen
1c79445059 net: net_if: fix net_if_send_data for offloaded ifaces
Some offloaded ifaces have an L2, but lack support for
net_l2->send. This edge case is not handled by
net_if_send_data, resulting in a NULL dereference under
rare circumstances.

This patch expands the offloaded iface guard in
net_if_send_data to handle this edge case.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-08-06 09:19:36 +01:00
Matt Rodgers
e4dff4ad14 samples: net: coap_download: Add sample application for coap_client API
Added a sample application demonstrating how to use the coap_client API
to download a resource via GET request.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-06 09:19:15 +01:00
Gerard Marull-Paretas
3029bb1fbf boards: nrf5340dk: create shared files for LEDs/buttons/connector
It looks like both cpuapp/cpunet cores share the same definitions for
LEDs, buttons and Arduino connector. This patch puts these repeated
definitions into a single shared file.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:19:05 +01:00
Benjamin Cabé
43b948f9a8 net: ptp: Properly handle second overflow/underflow
Fixes issues with net_ptp_time arithmetic where second
overflow/underflow would not be handled properly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2024-08-06 09:17:26 +01:00
Benjamin Cabé
dff19c3ac6 net: ptp: Adjust clock using correct offset
Offset should be *subtracted* from current clock value, not added.
This was causing clock to accumulate error instead of actually
"converging".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-06 09:17:26 +01:00
Katarzyna Giądła
8753534077 tests: subsys: storage: flash_map: Extend timeout storage.flash_map.mpu
The test `storage.flash_map.mpu` for `nrf52840dk/nrf52840` fails
althought the output is correct. Time to test execution is not enough.
This change extend test execution timeout.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2024-08-06 09:17:20 +01:00
Gerard Marull-Paretas
a1fda68003 doc: releases: migration-guide: add nRF52/53 regulator changes
Inform users about Kconfig options deprecation and show what is the
alternative with some examples.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
d11db98d42 dts: bindings: regulator: add nordic,nrf91x-regulators
To describe nRF91X specific REGULATORS IP.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
9d72903840 drivers: usb: use DT regulator properties
Instead of CONFIG_SOC_DCDC_NRF52X[_HV], about to be deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
1eddb047f9 soc: nordic: nrf53: deprecate SOC_DCDC_NRF53X*
Regulators can now be configured using DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
4d56244faf boards: nrf53*: use DT to configure regulators
Instead of board level options selecting SOC_DCDC_NRF53X*.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
2c3270db43 soc: nordic: nrf53: allow configuring regulators using DT
Instead of Kconfig options which are about to be deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
7feacc62d1 dts: arm: nordic: nrf5340: instantiate regulators
Instantiate all available regulators: VREGMAIN, VREGRADIO and VREGH.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
e5e01a7f33 dts: bindings: regulator: add nordic,nrf53x-regulator-hv
nRF53X HV regulator differs from eg nRF52X as it offers a silent mode
option. For this reason, a new compatible is used, even if now such
capability is not exposed yet.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
8d6695030f dts: bindings: regulator: add nordic,nrf53x-regulators
nRF53X regulator IP is specific to that series, eg, not equal to nRF91X.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
aaacd682cc soc: nordic: nrf52: deprecate SOC_DCDC_NRF52X[_HV]
Main supply can now be configured using DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
9097d5dac5 boards: nrf52*: use DT to configure regulators
Instead of board level options selecting SOC_DCDC_NRF52X or
SOC_DCDC_NRF52X_HV.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
e189fb0720 soc: nordic: nrf52: add support for DT-based regulators config
In addition to Kconfig options (soon to be deprecated), allow
configuring the regulators using DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
af0353210c dts: arm: nordic: nrf52x: instantiate regulators
The SoC main supply is part of the POWER IP block. The POWER IP is a
kind of multi-purpose block, so each of its functions is described as a
child node in DT, like similar other MFD. This allows to have specific
properties, e.g. for DC/DC mode.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Gerard Marull-Paretas
02a30c1c2b dts: bindings: regulator: add nordic,nrf5[2]x-regulator[-hv]
Some Nordic SoCs, like nRF52 contain an internal regulator for the main
SoC supply. Depending on the SoC, the regulator can have multiple
configurations (e.g. single/double stage), which mainly depends on
supporting "high-voltage" mode or not (VDDH pin supply). This patch adds
bindings for nRF5X regulator and nRF52X HV regulator.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-06 09:17:10 +01:00
Jordan Yates
bdcd5d00d0 scripts: twister: twisterlib: cwd relative path
When presenting an example of how to run a failing test case with
`west build`, provide the source dir path relative to the current
working directory, not the zephyr root directory.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-05 18:41:14 -04:00
Fengming Ye
86b5b59928 net: wifi: shell: add DPP commands
DPP shell command handler will parse user args to params in enum
and send l2 mgmt DPP requests.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-08-05 18:40:17 -04:00
Fengming Ye
1640826fc5 net: wifi_mgmt: add hostap DPP support
Add wifi l2 mgmt dpp handlers.
Add wifi subcommand dpp to call l2 mgmt dpp handlers.

DPP l2 handlers will parse params to hostap wpa_cli format args
and send wpa_cli commands to hostap.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-08-05 18:40:17 -04:00
Ravi Dondaputi
37491cb0f7 wifi: utils: Get correct channel count
For 2.4GHz and 6GHz bands, while counting the channels in configured
range, start of the range is being counted twice. Correct this
by advancing the index by 1 while counting channels in range.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-08-05 18:39:58 -04:00
Pavlo Yadvychuk
76de42f707 boards: WeAct: Add STM32F405 Core board
The WeAct STM32F405 Core Board is an extremely low cost and bare-bones
development board featuring the STM32F405RG, 64-pin variant of
the STM32F405x series.

Signed-off-by: Pavlo Yadvychuk <pyadvichuk@gmail.com>
2024-08-05 18:39:46 -04:00
Flavio Ceolin
1fe98407ce espi: ite: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
15ac8407a6 i2c: ite: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
90870eb9b1 entropy: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
cbb9613d83 dai: intel/ssp: Use proper flexible array
Use proper flexible array instead of a GNU extension.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Flavio Ceolin
4eb3db13bc sys: util: Add macro to declare flexible arrays
Flexible arrays are arrays declared without a specific size, e.g:
uint8_t my_array[];

They are widely used as as last member in structs that are dynamically
allocated.

Since C99 they are part of the C standard, but for historical reasons
many places still use an older GNU extension that is declare zero
length arrays.

Although zero length arrays are flexible arrays, we can't blindly
replace [0] with [] because of some syntax limitations. This macro
workaround these limitations while get rid of this non standard
extension.

Using true flexible arrays allows the compiler to calculate the size
of the array better and improve potential issue checking.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-08-05 18:38:42 -04:00
Tomasz Chyrowicz
4c541eb216 scripts: nrf_common: Use cfg for SUIT paths
It is safer to base the SUIT artifacts path on the path of the
configuration file than the HEX file that is being flashed.
The latter may be overriden by several scripts that merge/transform the
final firmware image.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-08-05 18:38:23 -04:00
David van Rijn
f65fe18273 net: lwm2m: Fix c++ cupport for lwm2m.h
lwm2m.h was missing the extern "C" block
and it used a forward declaration to an enum,
which is illegal in c++.

Signed-off-by: David van Rijn <david@refractor.dev>
2024-08-05 18:37:59 -04:00
Declan Snyder
d4d56de4d4 drivers: bt_nxp: Use DT code partition if needed
Remove the logic from the board level about overriding the
flash load size and instead just select to use the DT code
partition if app is not expected to be able to occupy the
whole flash space because of the firmware image being
loaded separately.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-05 18:37:35 -04:00
Patryk Biel
59eb3eac92 lora: driver: sx12xx: fix driver recv func when RX error occurs
The sx12xx driver does not provide RxError event handler therefore
when such error occurs, the driver does not handle it at all.
As a result, when the lora_recv function is called with infinite timeout,
it never returns as it waits on k_poll forever, with radio operation mode
set to STDBY_RC. Therefore, once the rx error occurs, radio is no longer
able to receive any subsequent incoming transmission. Fix it by adding
RxError event handler which releases modem usage and signals error
allowing lora_recv to return with a value indicating receive error.
Tested on lora e5 mini by transmitting multiple LoRa messages over a
short period of time that caused CRC error, thus RX errors.
Once the fix is applied, the descibed behaviour no longer occurs despite
the CRC errors caused by test.

Signed-off-by: Patryk Biel <pbiel7@gmail.com>
2024-08-05 18:37:11 -04:00
Manuel Argüelles
3208b54759 mailmap: missing entry for Manuel Argüelles
Map contributions done using my private email address to my current
work email address.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-05 18:36:50 -04:00
frei tycho
3603d831fd Bluetooth: Controller: change condition in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-08-05 16:30:13 +02:00
Luis Ubieda
f0dae15356 boards: croxel: cx1825: Add sensor aliases
To work with Sensor Samples without additional tweaks.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-05 16:29:51 +02:00
Li Long
85ccb24881 modules: hostap: src: add get_version cmd support
Add get_version cmd support for "wifi version" cmd input

Signed-off-by: Li Long <li.long@nxp.com>
2024-08-05 16:29:43 +02:00
Guotao Zhang
28093cc4ef Bluetooth: tester: Increase the adv buf size to consider the extend adv
[Description]
Device hang is observed when LE Scan
[Root Cause]
For le_ext_adv_report, Data[i] of one adv report is 0-229,
for the adv_buf of saving, it just is 73 bytes, so sometimes
the bytes of adv report is more than the adv_buf, resulted hang
[Fix]
consider the le ext adv case.
[Testing]
After modified, Device hang is not observed after stress
testing with LE Scan

Signed-off-by: Guotao Zhang <guotao.zhang@nxp.com>
2024-08-05 16:29:36 +02:00
Kapil Bhatt
cd14be6073 net: wifi: Add reset command for Wi-Fi statistics
Add "reset" as a subcommand of wifi statistics.
Also add help option in statistics command.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-05 16:29:21 +02:00
Kapil Bhatt
3d38b5e094 wifi_mgmt: Add new API to reset Wi-Fi statistics
Add a new offload API to reset Wi-Fi statistics from
the Wi-Fi driver.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-05 16:29:21 +02:00
Grzegorz Chwierut
eff7f4d56a twister: pytest: Use configured shell prompt in pytest-harness
Read CONFIG_SHELL_PROMPT_UART from config file and use them
in shell fixture in pytest-harness package.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-05 16:29:13 +02:00
Grzegorz Chwierut
8e7cda75cc twister: pytest: Move helper methods to pyteste-harness package
Moved helper methods from tests/boot/with_mcumgr to pytest-harness
package. It can be reused by other tests.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-05 16:29:13 +02:00
Fin Maaß
c0396a9c5c drivers: ethernet: litex: add phy
add phy for litex liteeth ethernet.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 16:29:06 +02:00
Fin Maaß
4436a15f34 drivers: mdio: litex: add mdio driver
add a mdio driver for litex liteeth.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 16:29:06 +02:00
Morten Priess
ca1ceeffa4 Bluetooth: controller: Notify when BIG create fails due to timeout
When periodic scanning reaches timeout and BIGinfo has not yet been
received, notify with BT_HCI_ERR_CONN_FAIL_TO_ESTAB for sync receiver.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:58 +02:00
Morten Priess
64faceea72 Bluetooth: controller: Stop Sync ISO ticker when establishment fails
When an ISO stream fails to sync to a broadcaster within the first 6
events, the establishment fails (as expected). However, it did not stop
the ticker, and subsequently it was impossible to establish a new sync
after this.

Make asynchronous call to ticker_stop when establishment fails, and exit
done handling. Cleanup is handled via ll_rx_dequeue().

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:58 +02:00
Morten Priess
0e6bb8aa96 Bluetooth: controller: Fix number of handles in le_big_sync_established
Use lll->stream_count instead of lll->num_bis for returning the correct
number of handles.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:58 +02:00
Morten Priess
3b14cd4891 Bluetooth: controller: Add lll_sync_iso_flush interface to LLL
When the ISO sync receiver has been disabled (terminted), ULL now calls
lll_sync_iso_flush in lower link layer, to allow cleanup and releasing
of resources.

Make sure ISO sync LLL flush is also called when terminating a stream
from local side (app). Add blocking mayfly call to lll_sync_iso_flush in
ll_big_sync_terminate.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:44 +02:00
Morten Priess
a0e108d56b Bluetooth: controller: Send TX PDU release with no DP to vendor function
If a race condition occurs between stopping CIS stream and tearing down
data path, releasing TX PDUs was not possible for vendor data path, as
the DP configuration is gone.

In that case, call a new vendor specific function for cleaning up and
returning PDUs to correct pool.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:35 +02:00
Morten Priess
056387b5aa bluetooth: controller: Add LLCP TX to tx_ack FIFO size
The MFIFO holding TX nodes on the ack path back to the host was only
sized to hold the possible number of ACL TX nodes. However, additional
TX nodes are allocated for LLCP and use the same FIFO.

By adding LLCP_TX_CTRL_BUF_COUNT to the size, the FIFO will be able to
hold the worst-case number of TX nodes.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2024-08-05 16:28:27 +02:00
Vinayak Kariappa Chettimada
404ed809ed Bluetooth: Controller: BT_TICKER_REMAINDER_SUPPORT conditional
Added BT_TICKER_REMAINDER_SUPPORT conditional compilation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-05 16:28:18 +02:00
Vinayak Kariappa Chettimada
134251bb11 Bluetooth: Controller: Rename to BT_TICKER_START_REMAINDER
Rename to BT_TICKER_START_REMAINDER better reflect what it
means in terms of providing remainder parameter to ticker
start interface.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-05 16:28:18 +02:00
Johann Fischer
6c779908fa samples: net: remove wpanusb sample
Clean up before deprecating legacy device support.
The Linux kernel driver for this example has never been upstreamed or
implemented upstream. In general, 15.4 development does not seem to be a
big success, but if it comes up again, the protocol used by the example
will need to be redesigned anyway.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Johann Fischer
4dd1681fab samples: usb: remove hid sample
Clean up before deprecating legacy device support. This sample does not
contain anything special that is not present in the hid-mouse or
hid-keyboard samples. It also makes no sense to port it to a new stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Johann Fischer
cd9dff7d8c samples: usb: remove cdc_acm_composite sample
Clean up before deprecating legacy device support. Remove
cdc_acm_composite sample, which is not much different than cdc_acm, but
uses two virtual UART interfaces.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Johann Fischer
b50646b338 sample: usb: cdc_acm: remove configuration overlays
Clean up before deprecating legacy device support. Remove configuration
overlay for DFU and MSC, which does not add much value since we have
dedicated samples anyway.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-05 16:28:09 +02:00
Troels Nilsson
a9f80e2c12 Bluetooth: Controller: Fix scoring for scan_aux events
Score was never increased for scan_aux events since they are
one-shot events; Fixed by keeping the scan_aux score as part
of the scan structure

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-08-05 16:27:50 +02:00
Vinayak Kariappa Chettimada
313fe30be4 Bluetooth: Controller: Rework related to separate SDU interval support
Review rework related to separate SDU interval for C_to_P
and P_to_C support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-05 16:27:43 +02:00
Vinayak Kariappa Chettimada
fe556f5cd6 Bluetooth: Controller: Separate SDU interval for C_to_P and P_to_C
Support for separate SDU interval for C_to_P and P_to_C
directions when setting CIG parameters.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-05 16:27:43 +02:00
Fabian Pflug
ac8e578456 drivers: sensor: tmag5273: Add support for tmag3001
The TMAG3001 is quite similar to the tmag5273 and can be used with just
some small modifications.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-08-05 16:27:25 +02:00
Mathieu Choplain
059aae7c91 cmake: modules: dts: make Device Tree error messages more visible
This commit modifies the DTS cmake module to capture `stderr`
output of the `gen_defines.py` script and `dtc` program during
their execution. The messages can then be printed as CMake
`message`s, which improves QoL when debugging device tree
errors, and reduces the risk of introducing malformed DTS,
as the warning/error messages are made much more visible.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-05 16:27:17 +02:00
Torsten Rasmussen
e8e5169f95 cmake: remove the use of SOURCES in tests
Setting SOURCES before calling find_package() was deprecated in #51049.

Cleanup usage of SOURCES and instead use the proper target_sources()
CMake function.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-05 16:27:09 +02:00
Torsten Rasmussen
b939e720a6 tests: source Zephyr before project() call
Fixes: #73831

find_package(Zephyr) should be called before first project() call.

Zephyr package will test and force-set the correct toolchain, especially
the C compiler.
The project() will also set the C compiler, if not set already.

If project() is called first, then conflict arises on the C compiler
selection and thus the following message is seen:
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_C_COMPILER= /usr/bin/gcc

This cache deletion results in other errors, such as a missing BOARD
setting.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-05 16:27:09 +02:00
Apoorv Singh
e02a5fb139 soc: nxp:imxrt Register log module to soc.c
Previously, the `soc.c` files for the IMXRT11xx, IMXRT5xx/CM33, and
IMXRT6xx/CM33 did not register the log module. This caused build
errors when DEBUG logging was enabled, as the `power.c` file attempted
to access a non-existent SOC log module for debug messages.

This commit fixes the issue by registering the log module in the
`soc.c` files for the specified SoCs, thereby resolving the build
errors.

Signed-off-by: Apoorv Singh <apoorv.singh@gin.de>
2024-08-05 16:26:58 +02:00
Apoorv Singh
8cc8a4f909 soc: nxp: imxrt: Fix formatting in soc.c files
Fix formatting for `soc.c` files for the IMXRT11xx, IMXRT5xx/CM33, and
IMXRT6xx/CM33 by running 'clang-format'.

Signed-off-by: Apoorv Singh <apoorv.singh@gin.de>
2024-08-05 16:26:58 +02:00
Emil Gydesen
bd4385656b MAINTAINERS: Remove generic Bluetooth group
The group covered way to many files with way too few
people. The content of the group has been split into
several other groups where we can better assign the
correct people.

This also creates 2 new groups for Bluetooth ISO and
Bluetooth qualification.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-05 16:26:45 +02:00
Manuel Argüelles
5305aa615b samples: drivers: counter: alarm: enable on s32z2xxdc2
Enable alarm sample on s32z2xxdc2 boards.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-05 07:35:57 -05:00
Manuel Argüelles
67264e3fb9 boards: nxp: mr_canhubk3: enable STM counter
Enable the two available System Timer Module instances on this board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-05 07:35:57 -05:00
Manuel Argüelles
896d8d6896 drivers: counter: nxp: convert STM to native driver
Convert NXP System Timer Module driver to a native driver.

Timer prescaler in tests is updated because short relative alarms
sometimes give false positives.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-05 07:35:57 -05:00
Fin Maaß
8f9148eff8 mgmt: hawkbit: move to zephyr kernel heap
switch to kernel heap from the libc, as there
is now a `k_realloc()` available.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 11:32:49 +02:00
Yong Cong Sin
8e1ac56847 lib: posix: mutex: stubs remaining of _POSIX_THREAD_PRIO_PROTECT
Create stub functions for the remaining of
`_POSIX_THREAD_PRIO_PROTECT` option group.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-08-05 11:32:43 +02:00
Yong Cong Sin
0c4870a0f0 lib: posix: mutex: implement pthread_mutexattr_setprotocol
Implement and test `pthread_mutexattr_setprotocol()`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-08-05 11:32:43 +02:00
Yong Cong Sin
50f47a44b7 lib: posix: mutex: check args of pthread_mutexattr_getprotocol
Perform arguments checking in the
`pthread_mutexattr_getprotocol()` function.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-08-05 11:32:43 +02:00
Ryan McClelland
5690088a5c drivers: i3c: only configure tsco for rev 1p4 and above
Adjusting T_sco is only support by revision 1p4 and above. Also,
correct the T_sco default time from 10ns to 8ns.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-08-05 11:32:36 +02:00
Ryan McClelland
853f306b83 drivers: i3c: add i3c hdr ddr inline helper func
Add I3C High Data Rate Double Data Rate Mode inline helper functions.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-08-05 11:32:29 +02:00
Bartlomiej Buczek
18ed02e643 tests: adc_api: add channel for nrf54 targets
add channel in overlay of nrf54 targets to increase test coverage.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-08-05 11:32:23 +02:00
Alessandro Manganaro
4fc77248de drivers: bluetooth: hci: Fix stm32wb BLE behavior
Enabling BT_HCI_SETUP for STM32WB55 to have a
correct and proper initialization procedure to fix
#75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-08-05 11:32:17 +02:00
Alessandro Manganaro
7ca2072ed0 drivers: bluetooth: hci: Fix stm32wb BLE behavior
Implementing HCI setup function to have a correct and proper
initialization procedure to fix #75318 issue

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-08-05 11:32:17 +02:00
Tom Finet
c1235bb4fb net: http: fix %d format string to %zu
Fixes logging of size_t variable to work on both 32
and 64 bit platforms.

Signed-off-by: Tom Finet <tomfinet@outlook.com>
2024-08-05 11:32:08 +02:00
Josuah Demangeon
911abc33e6 samples: move video from subsys to drivers
"Video subsystem for Zephyr" is actually only defined as a driver
and the examples actually include <zephyr/drivers/video.h>.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-05 10:17:35 +02:00
Yong Cong Sin
2ccfe8202d lib: posix: add stubs for thread-safe grp & pwd functions
Create stubs for getpwnam_r, getpwuid_r, getgrgid_r
& getgrnam_r.

These functions are in the _POSIX_THREAD_SAFE_FUNCTIONS
option group.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-08-05 10:17:27 +02:00
Yong Cong Sin
b7ad4c53b0 posix: fs: implement readdir_r
Add implementation for `readdir_r()`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-08-05 10:17:27 +02:00
Gerard Marull-Paretas
33d92b4acd doc: getting_started: remove global Python setup
As it was already outlined, installing Python dependencies at a system
level or user level can be dangerous. For this reason, the default setup
instructions already pointed users to use Python virtual environments. On
newer Ubuntu installations (23.04 onwards) system-level pip installs are
not allowed. Let's make Zephyr _Python-safe_ as well by removing dangerous
instructions.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-05 10:17:17 +02:00
Guru Mehar Rachaputi
f20ac87536 tests: bsim: set log level from command-line argument
Implementation to take command-line arguments to set log level in run
time for bsim module. Set default log level if no log level is passed
at runtime

Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
2024-08-05 10:16:36 +02:00
Aleksandar Stanoev
52ffbd85c8 bluetooth: shell: Add shell commands for LE Connection Subrating
Add commands to allow requesting a subrate change via the BT shell.
A new build configuration has been added to ensure this is tested in CI.

Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
2024-08-05 10:16:27 +02:00
Aleksandar Stanoev
db9bcdc05e bluetooth: host: Add support for LE Connection Subrating
Adds support for LE Connection Subrating as defined in Core 5.4
Vol 6, Part B, Section 5.1.19.
As this is primarily a controller feature, the host support is mostly
a wrapper around the relevant HCI commands.

Note that subrating provides a new method to update the connection's
peripheral latency and supervision timeout alongside subrating parameters.

Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
2024-08-05 10:16:27 +02:00
Aleksandar Stanoev
c417bd224e bluetooth: Add Kconfig for LE Connection Subrating
Add separate Kconfig to be used by the host LE Subrating implementation.

Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
2024-08-05 10:16:27 +02:00
Tom Burdick
71bf36387c rtio: Enable submit/consume semaphores by default
The default behavior for thread pending of completions should use
semaphores rather than yield/wait looping when multithreading is
available.

Disable by default only when multithreading isn't available.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-05 10:16:12 +02:00
Fin Maaß
f4a7d24858 boards: litex: activate sfdp runtime
Enable CONFIG_SPI_NOR_SFDP_RUNTIME
by default, as we don't provide
infos about the flash.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-05 10:15:57 +02:00
Benedikt Streicher
ed018f82f5 soc: ti: simplelink: cc13x2_cc26x2: allow basic BT without zepyhr stack
Allow developer to use the baremetal Bluetooth functionalities of the
CC13X2 and CC26X2 series SoCs without having to use the full Zephyr
Bluetooth stack.

Signed-off-by: Benedikt Streicher <streicher.b@posteo.de>
2024-08-04 16:25:01 -05:00
Julia Azziz
e7cfb05c72 drivers: adc: fix missing ref_internal in adc_sam0
The .ref_internal field in the adc_driver_api
struct was previously unset.
Now it's set to the proper value, 1 V.

Signed-off-by: Julia Azziz <juliaazziz7@gmail.com>
2024-08-04 16:20:16 -05:00
Carles Cufi
fc75601265 actions: manifest: Update to include fix to impostor commits.
More details in:
https://github.com/zephyrproject-rtos/action-manifest/pull/13

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-03 14:07:42 -04:00
11046 changed files with 359428 additions and 103164 deletions

View file

@ -46,6 +46,7 @@ ForEachMacros:
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SEM_LOCK'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
@ -79,6 +80,8 @@ ForEachMacros:
- 'HTTP_SERVER_CONTENT_TYPE_FOREACH'
- 'HTTP_SERVICE_FOREACH'
- 'HTTP_SERVICE_FOREACH_RESOURCE'
- 'I3C_BUS_FOR_EACH_I3CDEV'
- 'I3C_BUS_FOR_EACH_I2CDEV'
IfMacros:
- 'CHECKIF'
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
@ -93,11 +96,18 @@ IncludeCategories:
- Regex: '.*'
Priority: 3
IndentCaseLabels: false
IndentGotoLabels: false
IndentWidth: 8
InsertBraces: true
SpaceBeforeInheritanceColon: False
SpaceBeforeParens: ControlStatementsExceptControlMacros
SortIncludes: Never
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
- COND_CODE_0
- COND_CODE_1
- IF_DISABLED
- IF_ENABLED
- LISTIFY
- STRINGIFY
- Z_STRINGIFY

21
.codechecker.yml Normal file
View file

@ -0,0 +1,21 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2024, Basalte bv
analyzer:
# Start by disabling all
- --disable-all
# Enable the sensitive profile
- --enable=sensitive
# Disable unused cases
- --disable=boost
- --disable=mpi
# Many identifiers in zephyr start with _
- --disable=clang-diagnostic-reserved-identifier
- --disable=clang-diagnostic-reserved-macro-identifier
# Cleanup
- --clean

View file

@ -2,12 +2,20 @@ name: Backport Issue Check
on:
pull_request_target:
types:
- edited
- opened
- reopened
- synchronize
branches:
- v*-branch
jobs:
backport:
name: Backport Issue Check
concurrency:
group: backport-issue-check-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'

View file

@ -13,7 +13,7 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ github.event.workflow_run.id }}

View file

@ -8,6 +8,8 @@ on:
- "west.yml"
- "subsys/bluetooth/**"
- "tests/bsim/**"
- "boards/nordic/nrf5*/*dt*"
- "dts/*/nordic/**"
- "tests/bluetooth/common/testlib/**"
- "samples/bluetooth/**"
- "boards/posix/**"
@ -16,6 +18,7 @@ on:
- "include/zephyr/arch/posix/**"
- "scripts/native_simulator/**"
- "samples/net/sockets/echo_*/**"
- "modules/mbedtls/**"
- "modules/openthread/**"
- "subsys/net/l2/openthread/**"
- "include/zephyr/net/openthread.h"
@ -34,7 +37,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
@ -75,6 +78,7 @@ jobs:
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci
@ -85,7 +89,7 @@ jobs:
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
- name: Check common triggering files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
id: check-common-files
with:
files: |
@ -98,9 +102,12 @@ jobs:
include/zephyr/arch/posix/
scripts/native_simulator/
tests/bsim/*
boards/nordic/nrf5*/*dt*
dts/*/nordic/
modules/mbedtls/**
- name: Check if Bluethooth files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
id: check-bluetooth-files
with:
files: |
@ -109,7 +116,7 @@ jobs:
subsys/bluetooth/
- name: Check if Networking files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
id: check-networking-files
with:
files: |
@ -122,7 +129,7 @@ jobs:
include/zephyr/net/ieee802154*
- name: Check if UART files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
id: check-uart-files
with:
files: |
@ -132,10 +139,10 @@ jobs:
- name: Update BabbleSim to manifest revision
if: >
steps.check-bluetooth-files.outputs.any_changed == 'true'
|| steps.check-networking-files.outputs.any_changed == 'true'
|| steps.check-uart-files.outputs.any_changed == 'true'
|| steps.check-common-files.outputs.any_changed == 'true'
steps.check-bluetooth-files.outputs.any_modified == 'true'
|| steps.check-networking-files.outputs.any_modified == 'true'
|| steps.check-uart-files.outputs.any_modified == 'true'
|| steps.check-common-files.outputs.any_modified == 'true'
run: |
export BSIM_VERSION=$( west list bsim -f {revision} )
echo "Manifest points to bsim sha $BSIM_VERSION"
@ -146,17 +153,17 @@ jobs:
make everything -s -j 8
- name: Run Bluetooth Tests with BSIM
if: steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
if: steps.check-bluetooth-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true'
run: |
tests/bsim/ci.bt.sh
- name: Run Networking Tests with BSIM
if: steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
if: steps.check-networking-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true'
run: |
tests/bsim/ci.net.sh
- name: Run UART Tests with BSIM
if: steps.check-uart-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
if: steps.check-uart-files.outputs.any_modified == 'true' || steps.check-common-files.outputs.any_modified == 'true'
run: |
tests/bsim/ci.uart.sh

View file

@ -12,7 +12,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -62,6 +62,7 @@ jobs:
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config --global update.narrow true

View file

@ -14,7 +14,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false

View file

@ -41,6 +41,7 @@ jobs:
git config --global user.name "Github Actions"
git remote -v
git rebase origin/${BASE_REF}
git clean -f -d
source zephyr-env.sh
# debug
ls -la

View file

@ -38,7 +38,7 @@ jobs:
run: |
pip3 install setuptools
pip3 install wheel
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint clang-format unidiff sphinx-lint
pip3 install west
- name: west setup
@ -52,6 +52,7 @@ jobs:
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
(echo "::error ::Merge commits not allowed, rebase instead";false)
git rebase origin/${BASE_REF}
git clean -f -d
# debug
git log --pretty=oneline | head -n 10
west init -l . || true
@ -94,16 +95,23 @@ jobs:
exit 1;
fi
warns=("ClangFormat")
files=($(./scripts/ci/check_compliance.py -l))
for file in "${files[@]}"; do
f="${file}.txt"
if [[ -s $f ]]; then
errors=$(cat $f)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=${f}::$errors"
exit=1
results=$(cat $f)
results="${results//'%'/'%25'}"
results="${results//$'\n'/'%0A'}"
results="${results//$'\r'/'%0D'}"
if [[ "${warns[@]}" =~ "${file}" ]]; then
echo "::warning file=${f}::$results"
else
echo "::error file=${f}::$results"
exit=1
fi
fi
done

View file

@ -26,13 +26,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v4

View file

@ -17,7 +17,7 @@ env:
# The latest CMake available directly with apt is 3.18, but we need >=3.20
# so we fetch that through pip.
CMAKE_VERSION: 3.20.5
DOXYGEN_VERSION: 1.9.6
DOXYGEN_VERSION: 1.12.0
# Job count is set to 2 less than the vCPU count of 16 because the total available RAM is 32GiB
# and each sphinx-build process may use more than 2GiB of RAM.
JOB_COUNT: 14
@ -29,7 +29,7 @@ jobs:
if: >
github.repository_owner == 'zephyrproject-rtos'
outputs:
file_check: ${{ steps.check-doc-files.outputs.any_changed }}
file_check: ${{ steps.check-doc-files.outputs.any_modified }}
steps:
- name: checkout
uses: actions/checkout@v4
@ -37,7 +37,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Check if Documentation related files changed
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
id: check-doc-files
with:
files: |
@ -62,20 +62,13 @@ jobs:
if: >
github.repository_owner == 'zephyrproject-rtos' &&
( needs.doc-file-check.outputs.file_check == 'true' || github.event_name != 'pull_request' )
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
runs-on: ubuntu-22.04
timeout-minutes: 90
concurrency:
group: doc-build-html-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: install-pkgs
run: |
sudo apt-get update
@ -101,6 +94,7 @@ jobs:
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git rebase origin/${BASE_REF}
git clean -f -d
git log --graph --oneline HEAD...${PR_HEAD}
- name: cache-pip
@ -192,8 +186,7 @@ jobs:
if: |
github.event_name != 'pull_request' &&
github.repository_owner == 'zephyrproject-rtos'
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
runs-on: ubuntu-22.04
container: texlive/texlive:latest
timeout-minutes: 120
concurrency:
@ -205,12 +198,6 @@ jobs:
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Print cloud service information
run: |
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
- name: checkout
uses: actions/checkout@v4

View file

@ -21,16 +21,20 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
id: download-artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}
if_no_artifact_found: ignore
- name: Load PR number
if: steps.download-artifacts.outputs.found_artifact == 'true'
run: |
echo "PR_NUM=$(<pr_num/pr_num)" >> $GITHUB_ENV
- name: Check PR number
if: steps.download-artifacts.outputs.found_artifact == 'true'
id: check-pr
uses: carpentries/actions/check-valid-pr@v0.14.0
with:
@ -38,12 +42,15 @@ jobs:
sha: ${{ github.event.workflow_run.head_sha }}
- name: Validate PR number
if: steps.check-pr.outputs.VALID != 'true'
if: |
steps.download-artifacts.outputs.found_artifact == 'true' &&
steps.check-pr.outputs.VALID != 'true'
run: |
echo "ABORT: PR number validation failed!"
exit 1
- name: Uncompress HTML docs
if: steps.download-artifacts.outputs.found_artifact == 'true'
run: |
tar xf html-output/html-output.tar.xz -C html-output
if [ -f api-coverage/api-coverage.tar.xz ]; then
@ -51,6 +58,7 @@ jobs:
fi
- name: Configure AWS Credentials
if: steps.download-artifacts.outputs.found_artifact == 'true'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_PR_ACCESS_KEY_ID }}
@ -58,6 +66,7 @@ jobs:
aws-region: us-east-1
- name: Upload to AWS S3
if: steps.download-artifacts.outputs.found_artifact == 'true'
env:
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
run: |

View file

@ -24,7 +24,7 @@ jobs:
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}

View file

@ -26,7 +26,7 @@ jobs:
group: zephyr-runner-v2-linux-x64-4xlarge
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -93,3 +93,32 @@ jobs:
. .venv/bin/activate
pip3 install awscli
aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/
- name: Transform Footprint data to Twister JSON reports
run: |
shopt -s globstar
export ZEPHYR_BASE=${PWD}
python3 ./scripts/footprint/pack_as_twister.py -vvv \
--plan ./scripts/footprint/plan.txt \
--test-name='name.feature' \
./footprint_data/*/footprints/*/*/
- name: Upload to ElasticSearch
env:
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
ELASTICSEARCH_INDEX: ${{ vars.FOOTPRINT_TRACKING_INDEX }}
run: |
pip3 install -U elasticsearch
run_date=`date --iso-8601=minutes`
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--flatten footprint \
--flatten-list-names "{'children':'name'}" \
--transform "{ 'footprint_name': '^(?P<footprint_area>([^\/]+\/){0,2})(?P<footprint_path>([^\/]*\/)*)(?P<footprint_symbol>[^\/]*)$' }" \
--run-id "${{ github.run_id }}" \
--run-attempt "${{ github.run_attempt }}" \
--run-workflow "footprint-tracking:${{ github.event_name }}" \
--run-branch "${{ github.ref_name }}" \
-i ${ELASTICSEARCH_INDEX} \
./footprint_data/**/twister_footprint.json
#

View file

@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
@ -46,6 +46,7 @@ jobs:
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git rebase origin/${BASE_REF}
git clean -f -d
git log --graph --oneline HEAD...${PR_HEAD}
- name: Set up Python

View file

@ -26,7 +26,7 @@ jobs:
west init -l . || true
- name: Manifest
uses: zephyrproject-rtos/action-manifest@v1.3.0
uses: zephyrproject-rtos/action-manifest@v1.3.1
with:
github-token: ${{ secrets.ZB_GITHUB_TOKEN }}
manifest-path: 'west.yml'

View file

@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04]
steps:
- name: checkout

View file

@ -21,7 +21,7 @@ jobs:
echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
uses: fsfe/reuse-action@v4
with:
args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx

61
.github/workflows/scorecards.yml vendored Normal file
View file

@ -0,0 +1,61 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecards supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '43 7 * * 6'
push:
branches:
- main
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed for Code scanning upload
security-events: write
# Needed for GitHub OIDC token if publish_results is true
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
# Publish results to OpenSSF REST API for easy access by consumers.
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
sarif_file: results.sarif

View file

@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-20.04]
steps:
- name: checkout
@ -43,6 +43,7 @@ jobs:
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git rebase origin/${BASE_REF}
git clean -f -d
git log --graph --oneline HEAD...${PR_HEAD}
- name: Set up Python ${{ matrix.python-version }}

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-pr-message: 'This pull request has been marked as stale because it has been open (more
than) 60 days with no activity. Remove the stale label or add a comment saying that you

View file

@ -25,7 +25,7 @@ jobs:
runs-on:
group: zephyr-runner-v2-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
outputs:
subset: ${{ steps.output-services.outputs.subset }}
@ -77,6 +77,7 @@ jobs:
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci,+optional
@ -129,7 +130,7 @@ jobs:
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.13.20240601
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.14.20240823
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
@ -185,9 +186,11 @@ jobs:
git config --global user.name "Zephyr Builder"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git clean -f -d
git log --pretty=oneline | head -n 10
fi
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
west init -l . || true
west config manifest.group-filter -- +ci,+optional
@ -201,6 +204,8 @@ jobs:
run: |
cmake --version
gcc --version
cargo --version
rustup target list --installed
ls -la
echo "github.ref: ${{ github.ref }}"
echo "github.base_ref: ${{ github.base_ref }}"
@ -310,7 +315,7 @@ jobs:
if: success() || failure()
steps:
# Needed for opensearch and upload script
# Needed for elasticearch and upload script
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Checkout
uses: actions/checkout@v4
@ -324,7 +329,7 @@ jobs:
path: artifacts
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Upload to opensearch
name: Upload to elasticsearch
run: |
pip3 install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.

View file

@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04]
steps:
- name: checkout

View file

@ -21,7 +21,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.13
@ -43,6 +43,8 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH
west init -l . || true
# we do not depend on any hals, tools or bootloader, save some time and space...
west config manifest.group-filter -- -hal,-tools,-bootloader
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'

View file

@ -29,13 +29,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, macos-14, windows-2022]
exclude:
- os: macos-14
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v4

14
.gitignore vendored
View file

@ -59,6 +59,17 @@ venv
.clangd
new.info
# Cargo drops lock files in projects to capture resolved dependencies.
# We don't want to record these.
Cargo.lock
# Cargo encourages a .cargo/config.toml file to symlink to a generated file. Don't save these.
.cargo/
# Normal west builds will place the Rust target directory under the build directory. However,
# sometimes IDEs and such will litter these target directories as well.
target/
# CI output
compliance.xml
_error.types
@ -76,6 +87,7 @@ tags
BinaryFiles.txt
BoardYml.txt
Checkpatch.txt
ClangFormat.txt
DevicetreeBindings.txt
GitDiffCheck.txt
Gitlint.txt
@ -90,4 +102,6 @@ MaintainersFormat.txt
ModulesMaintainers.txt
Nits.txt
Pylint.txt
SphinxLint.txt
TextEncoding.txt
YAMLLint.txt

View file

@ -61,6 +61,7 @@ Lixin Guo <lixinx.guo@intel.com>
Łukasz Mazur <lukasz.mazur@hidglobal.com>
Manuel Argüelles <manuel.arguelles@nxp.com>
Manuel Argüelles <manuel.arguelles@nxp.com> <manuel.arguelles@coredumplabs.com>
Manuel Argüelles <manuel.arguelles@nxp.com> <marguelles.dev@gmail.com>
Marc Herbert <marc.herbert@intel.com> <46978960+marc-hb@users.noreply.github.com>
Marin Jurjević <marin.jurjevic@hotmail.com>
Mariusz Ryndzionek <mariusz.ryndzionek@firmwave.com>

View file

@ -152,6 +152,7 @@ zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler-cpp,
# Extra warnings options for twister run
if (CONFIG_COMPILER_WARNINGS_AS_ERRORS)
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,warnings_as_errors>>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler,warnings_as_errors>>)
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:$<TARGET_PROPERTY:asm,warnings_as_errors>>)
zephyr_link_libraries($<TARGET_PROPERTY:linker,warnings_as_errors>)
endif()
@ -360,8 +361,21 @@ zephyr_compile_options(
$<$<COMPILE_LANGUAGE:ASM>:-D_ASMLANGUAGE>
)
# @Intent: Set fundamental linker specific flags
toolchain_ld_base()
find_package(Deprecated COMPONENTS toolchain_ld_base)
if(DEFINED TOOLCHAIN_LD_FLAGS)
zephyr_ld_options(${TOOLCHAIN_LD_FLAGS})
endif()
zephyr_link_libraries(PROPERTY base)
zephyr_link_libraries_ifndef(CONFIG_LINKER_USE_RELAX PROPERTY no_relax)
zephyr_link_libraries_ifdef(CONFIG_LINKER_USE_RELAX PROPERTY relax)
# Sort the common symbols and each input section by alignment
# in descending order to minimize padding between these symbols.
zephyr_link_libraries_ifdef(CONFIG_LINKER_SORT_BY_ALIGNMENT PROPERTY sort_alignment)
toolchain_ld_force_undefined_symbols(
_OffsetAbsSyms
@ -369,13 +383,37 @@ toolchain_ld_force_undefined_symbols(
)
if(NOT CONFIG_NATIVE_BUILD)
# @Intent: Set linker specific flags for bare metal target
toolchain_ld_baremetal()
find_package(Deprecated COMPONENTS toolchain_ld_baremetal)
zephyr_link_libraries(PROPERTY baremetal)
# Note that some architectures will skip this flag if set to error, even
# though the compiler flag check passes (e.g. ARC and Xtensa). So warning
# should be the default for now.
#
# Skip this for native application as Zephyr only provides
# additions to the host toolchain linker script. The relocation
# sections (.rel*) requires us to override those provided
# by host toolchain. As we can't account for all possible
# combination of compiler and linker on all machines used
# for development, it is better to turn this off.
#
# CONFIG_LINKER_ORPHAN_SECTION_PLACE is to place the orphan sections
# without any warnings or errors, which is the default behavior.
# So there is no need to explicitly set a linker flag.
if(CONFIG_LINKER_ORPHAN_SECTION_WARN)
zephyr_link_libraries(PROPERTY orphan_warning)
elseif(CONFIG_LINKER_ORPHAN_SECTION_ERROR)
zephyr_link_libraries(PROPERTY orphan_error)
endif()
endif()
if(CONFIG_CPP AND NOT CONFIG_MINIMAL_LIBCPP AND NOT CONFIG_NATIVE_LIBRARY)
# @Intent: Set linker specific flags for C++
toolchain_ld_cpp()
if(CONFIG_CPP)
if(NOT CONFIG_MINIMAL_LIBCPP AND NOT CONFIG_NATIVE_LIBRARY)
find_package(Deprecated COMPONENTS toolchain_ld_cpp)
endif()
zephyr_link_libraries(PROPERTY cpp_base)
endif()
# @Intent: Add the basic toolchain warning flags
@ -1613,11 +1651,14 @@ endif()
if(CONFIG_BUILD_OUTPUT_ADJUST_LMA)
math(EXPR adjustment "${CONFIG_BUILD_OUTPUT_ADJUST_LMA}" OUTPUT_FORMAT DECIMAL)
set(args_adjustment ${CONFIG_BUILD_OUTPUT_ADJUST_LMA_SECTIONS})
list(TRANSFORM args_adjustment PREPEND $<TARGET_PROPERTY:bintools,elfconvert_flag_lma_adjust>)
list(TRANSFORM args_adjustment APPEND +${adjustment})
list(APPEND
post_build_commands
COMMAND $<TARGET_PROPERTY:bintools,elfconvert_command>
$<TARGET_PROPERTY:bintools,elfconvert_flag_final>
$<TARGET_PROPERTY:bintools,elfconvert_flag_lma_adjust>${adjustment}
${args_adjustment}
$<TARGET_PROPERTY:bintools,elfconvert_flag_infile>${KERNEL_ELF_NAME}
$<TARGET_PROPERTY:bintools,elfconvert_flag_outfile>${KERNEL_ELF_NAME}
)
@ -2133,12 +2174,15 @@ endif()
set(llext_edk_file ${PROJECT_BINARY_DIR}/${CONFIG_LLEXT_EDK_NAME}.tar.xz)
# TODO maybe generate flags for C CXX ASM
zephyr_get_compile_definitions_for_lang(C zephyr_defs)
zephyr_get_compile_options_for_lang(C zephyr_flags)
# Filter out non LLEXT and LLEXT_EDK flags - and add required ones
llext_filter_zephyr_flags(LLEXT_REMOVE_FLAGS ${zephyr_flags} llext_edk_cflags)
llext_filter_zephyr_flags(LLEXT_EDK_REMOVE_FLAGS ${llext_edk_cflags} llext_edk_cflags)
llext_filter_zephyr_flags(LLEXT_REMOVE_FLAGS ${zephyr_flags} llext_filt_flags)
llext_filter_zephyr_flags(LLEXT_EDK_REMOVE_FLAGS ${llext_filt_flags} llext_filt_flags)
set(llext_edk_cflags ${zephyr_defs} -DLL_EXTENSION_BUILD)
list(APPEND llext_edk_cflags ${llext_filt_flags})
list(APPEND llext_edk_cflags ${LLEXT_APPEND_FLAGS})
list(APPEND llext_edk_cflags ${LLEXT_EDK_APPEND_FLAGS})
@ -2162,7 +2206,7 @@ add_custom_command(
-DAPPLICATION_SOURCE_DIR=${APPLICATION_SOURCE_DIR}
-DINTERFACE_INCLUDE_DIRECTORIES="$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>"
-Dllext_edk_file=${llext_edk_file}
-Dllext_cflags="${llext_edk_cflags}"
-Dllext_edk_cflags="${llext_edk_cflags}"
-Dllext_edk_name=${CONFIG_LLEXT_EDK_NAME}
-DWEST_TOPDIR=${WEST_TOPDIR}
-DZEPHYR_BASE=${ZEPHYR_BASE}
@ -2189,3 +2233,12 @@ add_subdirectory_ifdef(
CONFIG_MAKEFILE_EXPORTS
cmake/makefile_exports
)
toolchain_linker_finalize()
yaml_context(EXISTS NAME build_info result)
if(result)
build_info(zephyr version VALUE ${PROJECT_VERSION_STR})
build_info(zephyr zephyr-base VALUE ${ZEPHYR_BASE})
yaml_save(NAME build_info)
endif()

View file

@ -188,6 +188,7 @@
/drivers/dai/intel/ssp/ @kv2019i @marcinszkudlinski @abonislawski
/drivers/dai/intel/dmic/ @marcinszkudlinski @abonislawski
/drivers/dai/intel/alh/ @abonislawski
/drivers/dma/dma_dw_axi.c @pbalsundar
/drivers/dma/*dw* @tbursztyka
/drivers/dma/*dw_common* @abonislawski
/drivers/dma/*sam0* @Sizurka
@ -209,6 +210,8 @@
/drivers/ethernet/*adin2111* @GeorgeCGV
/drivers/ethernet/*oa_tc6* @lmajewski
/drivers/ethernet/*lan865x* @lmajewski
/drivers/ethernet/dwc_xgmac @Smale-12048867
/drivers/ethernet/dwc_xgmac/dwc_xgmac @Smale-12048867
/drivers/ethernet/phy/ @rlubos @tbursztyka @arvinf @jukkar
/drivers/ethernet/phy/*adin2111* @GeorgeCGV
/drivers/mdio/*adin2111* @GeorgeCGV
@ -367,7 +370,6 @@
/drivers/timer/*rcar_cmt* @aaillet
/drivers/timer/*esp32_sys* @uLipe
/drivers/timer/*sam0_rtc* @bendiscz
/drivers/timer/*arcv2* @ruuddw
/drivers/timer/*xtensa* @dcpleung
/drivers/timer/*rv32m1_lptmr* @mbolivar
/drivers/timer/*nrf_rtc* @anangl
@ -395,7 +397,6 @@
/drivers/wifi/eswifi/ @loicpoulain @nandojve
/drivers/wifi/winc1500/ @kludentwo
/drivers/virtualization/ @tbursztyka
/dts/arc/ @abrodkin @ruuddw @iriszzw @evgeniy-paltsev
/dts/arm/acsip/ @NorthernDean
/dts/arm/aspeed/ @aspeeddylan
/dts/arm/atmel/ @galak @nandojve

View file

@ -260,6 +260,20 @@ config LINKER_USE_PINNED_SECTION
Requires that pinned sections exist in the architecture, SoC,
board or custom linker script.
config LINKER_USE_ONDEMAND_SECTION
bool "Use Evictable Linker Section"
depends on DEMAND_MAPPING
depends on !LINKER_USE_PINNED_SECTION
depends on !ARCH_MAPS_ALL_RAM
help
If enabled, the symbols which may be evicted from memory
will be put into a linker section reserved for on-demand symbols.
During boot, the corresponding memory will be mapped as paged out.
This is conceptually the opposite of CONFIG_LINKER_USE_PINNED_SECTION.
Requires that on-demand sections exist in the architecture, SoC,
board or custom linker script.
config LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
bool "Generic sections are present at boot" if DEMAND_PAGING && LINKER_USE_PINNED_SECTION
default y
@ -275,7 +289,7 @@ config LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
config LINKER_LAST_SECTION_ID
bool "Last section identifier"
default y
default y if !ARM64
depends on ARM || ARM64 || RISCV
help
If enabled, the last section will contain an identifier.
@ -822,6 +836,23 @@ config BUILD_OUTPUT_ADJUST_LMA
default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_M4))-\
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))"
config BUILD_OUTPUT_ADJUST_LMA_SECTIONS
def_string "*"
depends on BUILD_OUTPUT_ADJUST_LMA!=""
help
This determines the output sections to which the above LMA adjustment
will be applied.
The value can be the name of a section in the final ELF, like "text".
It can also be a pattern with wildcards, such as "*bss", which could
match more than one section name. Multiple such patterns can be given
as a ";"-separated list. It's possible to supply a 'negative' pattern
starting with "!", to exclude sections matched by a preceding pattern.
By default, all sections will have their LMA adjusted. The following
example excludes one section produced by the code relocation feature:
config BUILD_OUTPUT_ADJUST_LMA_SECTIONS
default "*;!.extflash_text_reloc"
config BUILD_OUTPUT_INFO_HEADER
bool "Create a image information header"
help
@ -932,6 +963,8 @@ config DEPRECATED
help
Symbol that must be selected by a feature or module if it is
considered to be deprecated.
When adding this to an option, remember to follow the instructions in
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html#deprecated
config WARN_DEPRECATED
bool

File diff suppressed because it is too large Load diff

View file

@ -10,12 +10,9 @@
</p>
</a>
<a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
<a
href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
<img
src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/74"><img src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
<a href="https://scorecard.dev/viewer/?uri=github.com/zephyrproject-rtos/zephyr"><img src="https://api.securityscorecards.dev/projects/github.com/zephyrproject-rtos/zephyr/badge"></a>
<a href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain"><img src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>
The Zephyr Project is a scalable real-time operating system (RTOS) supporting

View file

@ -53,6 +53,8 @@ config ARM64
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
select BARRIER_OPERATIONS_ARCH
select ARCH_HAS_DIRECTED_IPIS
select ARCH_HAS_DEMAND_PAGING
select ARCH_HAS_DEMAND_MAPPING
help
ARM64 (AArch64) architecture
@ -81,6 +83,7 @@ config X86
select ARCH_IS_SET
select ATOMIC_OPERATIONS_BUILTIN
select ARCH_SUPPORTS_COREDUMP
select ARCH_SUPPORTS_COREDUMP_PRIV_STACKS
select ARCH_SUPPORTS_ROM_START if !X86_64
select CPU_HAS_MMU
select ARCH_MEM_DOMAIN_DATA if USERSPACE && !X86_COMMON_PAGE_TABLE
@ -89,12 +92,14 @@ config X86
select ARCH_HAS_TIMING_FUNCTIONS
select ARCH_HAS_THREAD_LOCAL_STORAGE
select ARCH_HAS_DEMAND_PAGING if !X86_64
select ARCH_HAS_DEMAND_MAPPING if ARCH_HAS_DEMAND_PAGING
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
select NEED_LIBC_MEM_PARTITION if USERSPACE && TIMING_FUNCTIONS \
&& !BOARD_HAS_TIMING_FUNCTIONS \
&& !SOC_HAS_TIMING_FUNCTIONS
select ARCH_HAS_STACK_CANARIES_TLS
select ARCH_SUPPORTS_MEM_MAPPED_STACKS if X86_MMU && !DEMAND_PAGING
select ARCH_HAS_THREAD_PRIV_STACK_SPACE_GET if USERSPACE
help
x86 architecture
@ -111,17 +116,18 @@ config RISCV
bool
select ARCH_IS_SET
select ARCH_SUPPORTS_COREDUMP
select ARCH_SUPPORTS_COREDUMP_PRIV_STACKS
select ARCH_SUPPORTS_ROM_START if !SOC_FAMILY_ESPRESSIF_ESP32
select ARCH_SUPPORTS_EMPTY_IRQ_SPURIOUS
select ARCH_HAS_CODE_DATA_RELOCATION
select ARCH_HAS_THREAD_LOCAL_STORAGE
select ARCH_HAS_STACKWALK
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
select USE_SWITCH_SUPPORTED
select USE_SWITCH
select SCHED_IPI_SUPPORTED if SMP
select ARCH_HAS_DIRECTED_IPIS
select BARRIER_OPERATIONS_BUILTIN
imply XIP
select ARCH_HAS_THREAD_PRIV_STACK_SPACE_GET if USERSPACE
help
RISCV architecture
@ -136,6 +142,7 @@ config XTENSA
select ARCH_MEM_DOMAIN_DATA if USERSPACE
select ARCH_HAS_DIRECTED_IPIS
select THREAD_STACK_INFO
select ARCH_HAS_THREAD_PRIV_STACK_SPACE_GET if USERSPACE
help
Xtensa architecture
@ -146,6 +153,7 @@ config ARCH_POSIX
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
select ARCH_HAS_CUSTOM_BUSY_WAIT
select ARCH_HAS_THREAD_ABORT
select ARCH_HAS_THREAD_NAME_HOOK
select NATIVE_BUILD
select HAS_COVERAGE_SUPPORT
select BARRIER_OPERATIONS_BUILTIN
@ -181,8 +189,9 @@ config BIG_ENDIAN
Little-endian architecture is the default and should leave this option
unselected. This option is selected by arch/$ARCH/Kconfig,
soc/**/Kconfig, or boards/**/Kconfig and the user should generally avoid
modifying it. The option is used to select linker script OUTPUT_FORMAT
and command line option for gen_isr_tables.py.
modifying it. The option is used to select linker script OUTPUT_FORMAT,
the toolchain flags (TOOLCHAIN_C_FLAGS, TOOLCHAIN_LD_FLAGS), and command
line option for gen_isr_tables.py.
config LITTLE_ENDIAN
# Hidden Kconfig option representing the default little-endian architecture
@ -414,10 +423,17 @@ config FRAME_POINTER
Select Y here to gain precise stack traces at the expense of slightly
increased size and decreased speed.
config ARCH_STACKWALK
bool "Compile the stack walking function"
default y
depends on ARCH_HAS_STACKWALK
help
Select Y here to compile the `arch_stack_walk()` function
config ARCH_STACKWALK_MAX_FRAMES
int "Max depth for stack walk function"
default 8
depends on ARCH_HAS_STACKWALK
depends on ARCH_STACKWALK
help
Depending on implementation, this can place a hard limit on the depths of the stack
for the stack walk function to examine.
@ -599,6 +615,14 @@ config SIMPLIFIED_EXCEPTION_CODES
down to the generic K_ERR_CPU_EXCEPTION, which makes testing code
much more portable.
config EMPTY_IRQ_SPURIOUS
bool "Create empty spurious interrupt handler"
depends on ARCH_SUPPORTS_EMPTY_IRQ_SPURIOUS
help
This option changes body of spurious interrupt handler. When enabled,
handler contains only an infinite while loop, when disabled, handler
contains the whole Zephyr fault handling procedure.
endmenu # Interrupt configuration
config INIT_ARCH_HW_AT_BOOT
@ -658,23 +682,24 @@ config ARCH_SUPPORTS_COREDUMP
config ARCH_SUPPORTS_COREDUMP_THREADS
bool
config ARCH_SUPPORTS_COREDUMP_PRIV_STACKS
bool
config ARCH_SUPPORTS_ARCH_HW_INIT
bool
config ARCH_SUPPORTS_ROM_START
bool
config ARCH_SUPPORTS_EMPTY_IRQ_SPURIOUS
bool
config ARCH_HAS_EXTRA_EXCEPTION_INFO
bool
config ARCH_HAS_GDBSTUB
bool
config ARCH_HAS_STACKWALK
bool
help
This is selected when the architecture implemented the arch_stack_walk() API.
config ARCH_HAS_COHERENCE
bool
help
@ -698,6 +723,11 @@ config ARCH_SUPPORTS_MEM_MAPPED_STACKS
help
Select when the architecture supports memory mapped stacks.
config ARCH_HAS_THREAD_PRIV_STACK_SPACE_GET
bool
help
Select when the architecture implements arch_thread_priv_stack_space_get().
#
# Other architecture related options
#
@ -763,6 +793,13 @@ config ARCH_HAS_DEMAND_PAGING
This hidden configuration should be selected by the architecture if
demand paging is supported.
config ARCH_HAS_DEMAND_MAPPING
bool
help
This hidden configuration should be selected by the architecture if
demand paging is supported and arch_mem_map() supports
K_MEM_MAP_UNPAGED.
config ARCH_HAS_RESERVED_PAGE_FRAMES
bool
help
@ -788,7 +825,7 @@ config CPU_CACHE_INCOHERENT
help
This hidden configuration should be selected when the CPU has
incoherent cache. This applies to intra-CPU multiprocessing
incoherence and makes only sense when MP_NUM_CPUS > 1.
incoherence and makes only sense when MP_MAX_NUM_CPUS > 1.
config CPU_HAS_ICACHE
bool
@ -994,7 +1031,7 @@ config CACHE_DOUBLEMAP
point to the same cached/uncached memory at different locations.
This applies to intra-CPU multiprocessing incoherence and makes only
sense when MP_NUM_CPUS > 1.
sense when MP_MAX_NUM_CPUS > 1.
config CACHE_MANAGEMENT
bool "Cache management features"
@ -1078,9 +1115,28 @@ config TOOLCHAIN_HAS_BUILTIN_FFS
help
Hidden option to signal that toolchain has __builtin_ffs*().
config ARCH_CPU_IDLE_CUSTOM
bool "Custom arch_cpu_idle implementation"
default n
config ARCH_HAS_CUSTOM_CPU_IDLE
bool
help
This options allows applications to override the default arch idle implementation with
a custom one.
config ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
bool
help
This options allows applications to override the default arch idle implementation with
a custom one.
config ARCH_HAS_CUSTOM_SWAP_TO_MAIN
bool
help
It's possible that an architecture port cannot use _Swap() to swap to
the _main() thread, but instead must do something custom. It must
enable this option in that case.
config ARCH_HAS_CUSTOM_BUSY_WAIT
bool
help
It's possible that an architecture port cannot or does not want to use
the provided k_busy_wait(), but instead must do something custom. It must
enable this option in that case.

View file

@ -343,6 +343,15 @@ config ARC_NORMAL_FIRMWARE
resources of the ARC processors, and, therefore, it shall avoid
accessing them.
config ARC_VPX_COOPERATIVE_SHARING
bool "Cooperative sharing of ARC VPX vector registers"
select SCHED_CPU_MASK if MP_MAX_NUM_CPUS > 1
help
This option enables the cooperative sharing of the ARC VPX vector
registers. Threads that want to use those registers must successfully
call arc_vpx_lock() before using them, and call arc_vpx_unlock()
when done using them.
source "arch/arc/core/dsp/Kconfig"
menu "ARC MPU Options"
@ -374,7 +383,9 @@ config ARC_EXCEPTION_STACK_SIZE
endmenu
config ARC_EARLY_SOC_INIT
bool "Make early stage SoC-specific initialization"
bool "Make early stage SoC-specific initialization [DEPRECATED]"
select SOC_RESET_HOOK
select DEPRECATED
help
Call SoC per-core setup code on early stage initialization
(before C runtime initialization). Setup code is called in form of

View file

@ -227,4 +227,8 @@ static int init_dcache(void)
return 0;
}
SYS_INIT(init_dcache, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
void arch_cache_init(void)
{
init_dcache();
}

View file

@ -26,6 +26,7 @@ SECTION_VAR(BSS, z_arc_cpu_sleep_mode)
.align 4
.word 0
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
/*
* @brief Put the CPU in low-power mode
*
@ -48,7 +49,9 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
sleep r1
j_s [blink]
nop
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
/*
* @brief Put the CPU in low-power mode, entered with IRQs locked
*
@ -56,6 +59,7 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
*
* void arch_cpu_atomic_idle(unsigned int key)
*/
SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
#ifdef CONFIG_TRACING
@ -70,3 +74,4 @@ SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
sleep r1
j_s.d [blink]
seti r0
#endif

View file

@ -54,7 +54,7 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
}
/* need to be executed on every core in the system */
int arc_irq_offload_init(void)
void arch_irq_offload_init(void)
{
IRQ_CONNECT(IRQ_OFFLOAD_LINE, IRQ_OFFLOAD_PRIO, arc_irq_offload_handler, NULL, 0);
@ -64,8 +64,4 @@ int arc_irq_offload_init(void)
* with generic irq_enable() but via z_arc_v2_irq_unit_int_enable().
*/
z_arc_v2_irq_unit_int_enable(IRQ_OFFLOAD_LINE);
return 0;
}
SYS_INIT(arc_irq_offload_init, POST_KERNEL, 0);

View file

@ -238,7 +238,7 @@ int arc_core_mpu_buffer_validate(const void *addr, size_t size, int write)
* This function provides the default configuration mechanism for the Memory
* Protection Unit (MPU).
*/
static int arc_mpu_init(void)
void arc_mpu_init(void)
{
uint32_t num_regions = get_num_regions();
@ -246,7 +246,6 @@ static int arc_mpu_init(void)
if (mpu_config.num_regions > num_regions) {
__ASSERT(0, "Request to configure: %u regions (supported: %u)\n",
mpu_config.num_regions, num_regions);
return -EINVAL;
}
/* Disable MPU */
@ -278,10 +277,7 @@ static int arc_mpu_init(void)
/* Enable MPU */
arc_core_mpu_enable();
return 0;
}
SYS_INIT(arc_mpu_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif /* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_COMMON_INTERNAL_H_ */

View file

@ -814,7 +814,7 @@ int arc_core_mpu_buffer_validate(const void *addr, size_t size, int write)
* This function provides the default configuration mechanism for the Memory
* Protection Unit (MPU).
*/
static int arc_mpu_init(void)
void arc_mpu_init(void)
{
uint32_t num_regions;
uint32_t i;
@ -826,7 +826,7 @@ static int arc_mpu_init(void)
__ASSERT(0,
"Request to configure: %u regions (supported: %u)\n",
mpu_config.num_regions, num_regions);
return -EINVAL;
return;
}
static_regions_num = 0U;
@ -851,7 +851,7 @@ static int arc_mpu_init(void)
MPU_DYNAMIC_REGION_AREAS_NUM) {
LOG_ERR("not enough dynamic regions %d",
dynamic_regions_num);
return -EINVAL;
return;
}
dyn_reg_info[dynamic_regions_num].index = i;
@ -886,10 +886,8 @@ static int arc_mpu_init(void)
/* Enable MPU */
arc_core_mpu_enable();
return 0;
return;
}
SYS_INIT(arc_mpu_init, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif /* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V4_INTERNAL_H_ */

View file

@ -23,6 +23,8 @@
#include <zephyr/arch/arc/cluster.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
/* XXX - keep for future use in full-featured cache APIs */
#if 0
@ -113,6 +115,9 @@ static void dev_state_zero(void)
#endif
extern FUNC_NORETURN void z_cstart(void);
extern void arc_mpu_init(void);
extern void arc_secureshield_init(void);
/**
* @brief Prepare to and run C code
*
@ -121,6 +126,10 @@ extern FUNC_NORETURN void z_cstart(void);
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
#ifdef CONFIG_ISA_ARCV3
arc_cluster_scm_enable();
#endif
@ -130,6 +139,15 @@ void z_prep_c(void)
dev_state_zero();
#endif
z_data_copy();
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
#ifdef CONFIG_ARC_MPU
arc_mpu_init();
#endif
#ifdef CONFIG_ARC_SECURE_FIRMWARE
arc_secureshield_init();
#endif
z_cstart();
CODE_UNREACHABLE;
}

View file

@ -16,8 +16,9 @@
#include <zephyr/arch/cpu.h>
#include <swap_macros.h>
#include <zephyr/arch/arc/asm-compat/assembler.h>
#ifdef CONFIG_ARC_EARLY_SOC_INIT
#include <soc_ctrl.h>
#if defined(CONFIG_SOC_RESET_HOOK)
GTEXT(soc_reset_hook)
#endif
GDATA(z_interrupt_stacks)
@ -112,8 +113,8 @@ done_icache_invalidate:
done_dcache_invalidate:
#ifdef CONFIG_ARC_EARLY_SOC_INIT
soc_early_asm_init_percpu
#ifdef CONFIG_SOC_RESET_HOOK
bl soc_reset_hook
#endif
_dsp_extension_probe

View file

@ -48,7 +48,7 @@ static void sjli_table_init(void)
/*
* @brief initialization of secureshield related functions.
*/
static int arc_secureshield_init(void)
void arc_secureshield_init(void)
{
sjli_table_init();
@ -60,9 +60,4 @@ static int arc_secureshield_init(void)
*
*/
__asm__ volatile("sflag 0x20");
return 0;
}
SYS_INIT(arc_secureshield_init, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

View file

@ -19,10 +19,15 @@
#include <zephyr/arch/arc/v2/mpu/arc_core_mpu.h>
#endif
#if defined(CONFIG_ARC_DSP) && defined(CONFIG_DSP_SHARING)
#if defined(CONFIG_ARC_VPX_COOPERATIVE_SHARING) || defined(CONFIG_DSP_SHARING)
#include <zephyr/arch/arc/v2/dsp/arc_dsp.h>
static struct k_spinlock lock;
#endif
#if defined(CONFIG_ARC_VPX_COOPERATIVE_SHARING)
static struct k_sem vpx_sem[CONFIG_MP_MAX_NUM_CPUS];
#endif
/* initial stack frame */
struct init_stack_frame {
uintptr_t pc;
@ -320,3 +325,65 @@ void arc_dsp_enable(struct k_thread *thread, unsigned int options)
k_spin_unlock(&lock, key);
}
#endif /* CONFIG_ARC_DSP && CONFIG_DSP_SHARING */
#if defined(CONFIG_ARC_VPX_COOPERATIVE_SHARING)
int arc_vpx_lock(k_timeout_t timeout)
{
k_spinlock_key_t key;
unsigned int id;
key = k_spin_lock(&lock);
id = _current_cpu->id;
#if (CONFIG_MP_MAX_NUM_CPUS > 1) && defined(CONFIG_SCHED_CPU_MASK)
__ASSERT(!arch_is_in_isr() && (_current->base.cpu_mask == BIT(id)), "");
#endif
k_spin_unlock(&lock, key);
/*
* It is assumed that the thread is (still) pinned to
* the same CPU identified by <id>.
*/
return k_sem_take(&vpx_sem[id], timeout);
}
void arc_vpx_unlock(void)
{
k_spinlock_key_t key;
unsigned int id;
key = k_spin_lock(&lock);
#if (CONFIG_MP_MAX_NUM_CPUS > 1) && defined(CONFIG_SCHED_CPU_MASK)
__ASSERT(!arch_is_in_isr() && (_current->base.cpu_mask == BIT(id)), "");
#endif
id = _current_cpu->id;
k_spin_unlock(&lock, key);
/*
* It is assumed that this thread is (still) pinned to
* the CPU identified by <id>, and that it is the same CPU
* used by arc_vpx_lock().
*/
k_sem_give(&vpx_sem[id]);
}
void arc_vpx_unlock_force(unsigned int id)
{
__ASSERT(id < CONFIG_MP_MAX_NUM_CPUS, "");
k_sem_give(&vpx_sem[id]);
}
static int arc_vpx_sem_init(void)
{
for (unsigned int i = 0; i < CONFIG_MP_MAX_NUM_CPUS; i++) {
k_sem_init(vpx_sem, 1, 1);
}
return 0;
}
SYS_INIT(arc_vpx_sem_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS);
#endif

View file

@ -9,11 +9,9 @@
#ifdef CONFIG_IRQ_OFFLOAD
int arc_irq_offload_init(const struct device *unused);
static inline void arc_irq_offload_init_smp(void)
{
arc_irq_offload_init(NULL);
arch_irq_offload_init();
}
#else

View file

@ -166,11 +166,14 @@ config RUNTIME_NMI
needed, enable this option and attach it via z_arm_nmi_set_handler().
config PLATFORM_SPECIFIC_INIT
bool "Platform (SOC) specific startup hook"
bool "Platform (SOC) specific startup hook [DEPRECATED]"
select DEPRECATED
help
The platform specific initialization code (z_arm_platform_init) is
executed at the beginning of the startup code (__start).
This option is deprecated, use SOC_RESET_HOOK instead.
config FAULT_DUMP
int "Fault dump level"
default 2

View file

@ -93,6 +93,14 @@ config CPU_CORTEX_R7
help
This option signifies the use of a Cortex-R7 CPU
config CPU_CORTEX_R8
bool
select CPU_AARCH32_CORTEX_R
select ARMV7_R
select ARMV7_R_FP if CPU_HAS_FPU
help
This option signifies the use of a Cortex-R8 CPU
config CPU_CORTEX_R52
bool
select CPU_AARCH32_CORTEX_R

View file

@ -26,5 +26,6 @@ extern void __start(void);
#define BOOT_PARAM_UDF_SP_OFFSET 16
#define BOOT_PARAM_SVC_SP_OFFSET 20
#define BOOT_PARAM_SYS_SP_OFFSET 24
#define BOOT_PARAM_VOTING_OFFSET 28
#endif /* _BOOT_H_ */

View file

@ -217,3 +217,7 @@ int arch_icache_flush_and_invd_range(void *start_addr, size_t size)
}
#endif
void arch_cache_init(void)
{
}

View file

@ -49,6 +49,7 @@ _skip_\@:
#endif /* CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK */
.endm
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
SECTION_FUNC(TEXT, arch_cpu_idle)
#ifdef CONFIG_TRACING
push {r0, lr}
@ -68,6 +69,9 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
bx lr
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
#ifdef CONFIG_TRACING
push {r0, lr}
@ -93,3 +97,4 @@ SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
_irq_disabled:
bx lr
#endif

View file

@ -147,8 +147,9 @@ bool z_arm_fault_undef_instruction_fp(void)
* the FP was already enabled then this was an actual undefined
* instruction.
*/
if (__get_FPEXC() & FPEXC_EN)
if (__get_FPEXC() & FPEXC_EN) {
return true;
}
__set_FPEXC(FPEXC_EN);
@ -162,8 +163,9 @@ bool z_arm_fault_undef_instruction_fp(void)
struct __fpu_sf *spill_esf =
(struct __fpu_sf *)_current_cpu->fp_ctx;
if (spill_esf == NULL)
if (spill_esf == NULL) {
return false;
}
_current_cpu->fp_ctx = NULL;

View file

@ -339,6 +339,15 @@ z_arm_cortex_ar_irq_done:
str r0, [r2, #___cpu_t_nested_OFFSET]
/* Do not context switch if exiting a nested interrupt */
cmp r0, #0
/* Note that this function is only called from `z_arm_svc`,
* while handling irq_offload, with below modes set:
* ```
* if (cpu interrupts are nested)
* mode=MODE_SYS
* else
* mode=MODE_IRQ
* ```
*/
bhi __EXIT_INT
/* retrieve pointer to the current thread */

View file

@ -18,6 +18,27 @@
ubfx \rreg0, \rreg0, #0, #24
.endm
/*
* Get CPU logic id by looking up cpu_node_list
* returns
* reg0: MPID
* reg1: logic id (0 ~ CONFIG_MP_MAX_NUM_CPUS - 1)
* clobbers: reg0, reg1, reg2, reg3
*/
.macro get_cpu_logic_id reg0, reg1, reg2, reg3
get_cpu_id \reg0
ldr \reg3, =cpu_node_list
mov \reg1, #0
1: ldr \reg2, [\reg3, \reg1, lsl #2]
cmp \reg2, \reg0
beq 2f
add \reg1, \reg1, #1
cmp \reg1, #CONFIG_MP_MAX_NUM_CPUS
bne 1b
b .
2:
.endm
.macro get_cpu rreg0
/*
* Get CPU pointer.
@ -33,8 +54,7 @@
*/
srsdb sp!, #MODE_SYS
cps #MODE_SYS
stmdb sp, {r0-r3, r12, lr}^
sub sp, #24
push {r0-r3, r12, lr}
/* TODO: EXTRA_EXCEPTION_INFO */
mov r0, sp

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -21,29 +22,13 @@
#include <zephyr/linker/linker-defs.h>
#include <zephyr/sys/barrier.h>
#include <zephyr/arch/arm/cortex_a_r/lib_helpers.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
#if defined(CONFIG_ARMV7_R) || defined(CONFIG_ARMV7_A)
#include <cortex_a_r/stack.h>
#endif
#if defined(__GNUC__)
/*
* GCC can detect if memcpy is passed a NULL argument, however one of
* the cases of relocate_vector_table() it is valid to pass NULL, so we
* suppress the warning for this case. We need to do this before
* string.h is included to get the declaration of memcpy.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnonnull"
#endif
#include <string.h>
#if defined(CONFIG_SW_VECTOR_RELAY) || defined(CONFIG_SW_VECTOR_RELAY_CLIENT)
Z_GENERIC_SECTION(.vt_pointer_section) __attribute__((used))
void *_vector_table_pointer;
#endif
#ifdef CONFIG_ARM_MPU
extern void z_arm_mpu_init(void);
extern void z_arm_configure_static_mpu_regions(void);
@ -51,38 +36,6 @@ extern void z_arm_configure_static_mpu_regions(void);
extern int z_arm_mmu_init(void);
#endif
#if defined(CONFIG_AARCH32_ARMV8_R)
#define VECTOR_ADDRESS ((uintptr_t)_vector_start)
static inline void relocate_vector_table(void)
{
write_sctlr(read_sctlr() & ~HIVECS);
write_vbar(VECTOR_ADDRESS & VBAR_MASK);
barrier_isync_fence_full();
}
#else
#define VECTOR_ADDRESS 0
void __weak relocate_vector_table(void)
{
#if defined(CONFIG_XIP) && (CONFIG_FLASH_BASE_ADDRESS != 0) || \
!defined(CONFIG_XIP) && (CONFIG_SRAM_BASE_ADDRESS != 0)
write_sctlr(read_sctlr() & ~HIVECS);
size_t vector_size = (size_t)_vector_end - (size_t)_vector_start;
(void)memcpy(VECTOR_ADDRESS, _vector_start, vector_size);
#elif defined(CONFIG_SW_VECTOR_RELAY) || defined(CONFIG_SW_VECTOR_RELAY_CLIENT)
_vector_table_pointer = _vector_start;
#endif
}
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif /* CONFIG_AARCH32_ARMV8_R */
#if defined(CONFIG_CPU_HAS_FPU)
static inline void z_arm_floating_point_init(void)
@ -147,10 +100,12 @@ extern FUNC_NORETURN void z_cstart(void);
*/
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
/* Initialize tpidruro with our struct _cpu instance address */
write_tpidruro((uintptr_t)&_kernel.cpus[0]);
relocate_vector_table();
#if defined(CONFIG_CPU_HAS_FPU)
z_arm_floating_point_init();
#endif
@ -160,6 +115,9 @@ void z_prep_c(void)
z_arm_init_stacks();
#endif
z_arm_interrupt_init();
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
#ifdef CONFIG_ARM_MPU
z_arm_mpu_init();
z_arm_configure_static_mpu_regions();

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -12,6 +13,56 @@
#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/sys/util.h>
#include <zephyr/linker/linker-defs.h>
#if defined(CONFIG_AARCH32_ARMV8_R)
#define VECTOR_ADDRESS ((uintptr_t)_vector_start)
static inline void relocate_vector_table(void)
{
write_sctlr(read_sctlr() & ~HIVECS);
write_vbar(VECTOR_ADDRESS & VBAR_MASK);
barrier_isync_fence_full();
}
#else
#if defined(__GNUC__)
/*
* GCC can detect if memcpy is passed a NULL argument, however one of
* the cases of relocate_vector_table() it is valid to pass NULL, so we
* suppress the warning for this case. We need to do this before
* string.h is included to get the declaration of memcpy.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnonnull"
#endif /* __GNUC__ */
#include <string.h>
#define VECTOR_ADDRESS 0
void __weak relocate_vector_table(void)
{
#if defined(CONFIG_XIP) && (CONFIG_FLASH_BASE_ADDRESS != 0) || \
!defined(CONFIG_XIP) && (CONFIG_SRAM_BASE_ADDRESS != 0)
write_sctlr(read_sctlr() & ~HIVECS);
size_t vector_size = (size_t)_vector_end - (size_t)_vector_start;
(void)memcpy(VECTOR_ADDRESS, _vector_start, vector_size);
#endif
}
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#endif /* !CONFIG_AARCH32_ARMV8_R */
void z_arm_relocate_vector_table(void)
{
relocate_vector_table();
}
/**
*

View file

@ -1,6 +1,7 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright (c) 2019 Stephanos Ioannidis <root@stephanos.io>
* Copyright 2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -30,8 +31,8 @@ GDATA(z_arm_sys_stack)
GDATA(z_arm_fiq_stack)
GDATA(z_arm_abort_stack)
GDATA(z_arm_undef_stack)
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
GTEXT(z_arm_platform_init)
#if defined(CONFIG_SOC_RESET_HOOK)
GTEXT(soc_reset_hook)
#endif
/**
@ -200,23 +201,62 @@ EL1_Reset_Handler:
#endif /* CONFIG_DCLS */
ldr r0, =arm_cpu_boot_params
#if CONFIG_MP_MAX_NUM_CPUS > 1
get_cpu_id r1
/*
* This code uses voting locks, like arch/arm64/core/reset.S, to determine primary CPU.
*/
ldrex r2, [r0, #BOOT_PARAM_MPID_OFFSET]
cmp r2, #-1
bne 1f
strex r3, r1, [r0, #BOOT_PARAM_MPID_OFFSET]
cmp r3, #0
/*
* Get the "logic" id defined by cpu_node_list statically for voting lock self-identify.
* It is worth noting that this is NOT the final logic id (arch_curr_cpu()->id)
*/
get_cpu_logic_id r1, r2, r3, r4 // r1: MPID, r2: logic id
add r4, r0, #BOOT_PARAM_VOTING_OFFSET
/* signal our desire to vote */
mov r5, #1
strb r5, [r4, r2]
ldr r3, [r0, #BOOT_PARAM_MPID_OFFSET]
cmn r3, #1
beq 1f
/* some core already won, release */
mov r7, #0
strb r7, [r4, r2]
b _secondary_core
/* suggest current core then release */
1: str r1, [r0, #BOOT_PARAM_MPID_OFFSET]
strb r7, [r4, r2]
dmb
/* then wait until every core else is done voting */
mov r5, #0
2: ldrb r3, [r4, r5]
tst r3, #255
/* wait */
bne 2b
add r5, r5, #1
cmp r5, #CONFIG_MP_MAX_NUM_CPUS
bne 2b
/* check if current core won */
dmb
ldr r3, [r0, #BOOT_PARAM_MPID_OFFSET]
cmp r3, r1
beq _primary_core
/* fallthrough secondary */
1:
dmb ld
/* loop until our turn comes */
_secondary_core:
dmb
ldr r2, [r0, #BOOT_PARAM_MPID_OFFSET]
cmp r1, r2
bne 1b
bne _secondary_core
/* we can now move on */
/* we can now load our stack pointer values and move on */
ldr r4, =arch_secondary_cpu_init
ldr r5, [r0, #BOOT_PARAM_FIQ_SP_OFFSET]
ldr r6, [r0, #BOOT_PARAM_IRQ_SP_OFFSET]
@ -266,9 +306,9 @@ _primary_core:
msr CPSR_c, #(MODE_SYS | I_BIT | F_BIT)
mov sp, r10
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
#if defined(CONFIG_SOC_RESET_HOOK)
/* Execute platform-specific initialisation if applicable */
bl z_arm_platform_init
bl soc_reset_hook
#endif
#if defined(CONFIG_WDOG_INIT)
@ -280,4 +320,6 @@ _primary_core:
bl z_arm_tcm_disable_ecc
#endif
bl z_arm_relocate_vector_table
bx r4

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Arm Limited (or its affiliates). All rights reserved.
* Copyright (c) 2023, 2024 Arm Limited (or its affiliates).
* SPDX-License-Identifier: Apache-2.0
*/
@ -51,6 +51,7 @@ struct boot_params {
char *udf_sp;
char *svc_sp;
char *sys_sp;
uint8_t voting[CONFIG_MP_MAX_NUM_CPUS];
arch_cpustart_t fn;
void *arg;
int cpu_num;
@ -64,6 +65,7 @@ BUILD_ASSERT(offsetof(struct boot_params, abt_sp) == BOOT_PARAM_ABT_SP_OFFSET);
BUILD_ASSERT(offsetof(struct boot_params, udf_sp) == BOOT_PARAM_UDF_SP_OFFSET);
BUILD_ASSERT(offsetof(struct boot_params, svc_sp) == BOOT_PARAM_SVC_SP_OFFSET);
BUILD_ASSERT(offsetof(struct boot_params, sys_sp) == BOOT_PARAM_SYS_SP_OFFSET);
BUILD_ASSERT(offsetof(struct boot_params, voting) == BOOT_PARAM_VOTING_OFFSET);
volatile struct boot_params arm_cpu_boot_params = {
.mpid = -1,
@ -75,7 +77,7 @@ volatile struct boot_params arm_cpu_boot_params = {
.sys_sp = (char *)(z_arm_sys_stack + CONFIG_ARMV7_SYS_STACK_SIZE),
};
static const uint32_t cpu_node_list[] = {
const uint32_t cpu_node_list[] = {
DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_PATH(cpus), DT_REG_ADDR, (,))};
/* cpu_map saves the maping of core id and mpid */
@ -137,10 +139,14 @@ void arch_cpu_start(int cpu_num, k_thread_stack_t *stack, int sz, arch_cpustart_
arm_cpu_boot_params.arg = arg;
arm_cpu_boot_params.cpu_num = cpu_num;
/* we need the barrier here to make sure the above changes to
* arm_cpu_boot_params are completed before we set the mpid
*/
barrier_dsync_fence_full();
/* store mpid last as this is our synchronization point */
arm_cpu_boot_params.mpid = cpu_mpid;
barrier_dsync_fence_full();
sys_cache_data_invd_range(
(void *)&arm_cpu_boot_params,
sizeof(arm_cpu_boot_params));

View file

@ -41,6 +41,11 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table)
GTEXT(z_arm_cortex_ar_exit_exc)
SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, z_arm_cortex_ar_exit_exc)
/* Note:
* This function is expected to be *always* called with
* processor mode set to MODE_SYS.
*/
/* decrement exception depth */
get_cpu r2
ldrb r1, [r2, #_cpu_offset_to_exc_depth]
@ -51,7 +56,6 @@ SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, z_arm_cortex_ar_exit_exc)
* Restore r0-r3, r12, lr, lr_und and spsr_und from the exception stack
* and return to the current thread.
*/
ldmia sp, {r0-r3, r12, lr}^
add sp, #24
pop {r0-r3, r12, lr}
rfeia sp!
#endif

View file

@ -110,3 +110,7 @@ int arch_icache_flush_and_invd_range(void *start_addr, size_t size)
{
return -ENOTSUP;
}
void arch_cache_init(void)
{
}

View file

@ -53,6 +53,7 @@ void z_arm_cpu_idle_init(void)
} while (false)
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
void arch_cpu_idle(void)
{
#if defined(CONFIG_TRACING)
@ -96,7 +97,9 @@ void arch_cpu_idle(void)
__enable_irq();
__ISB();
}
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
void arch_cpu_atomic_idle(unsigned int key)
{
#if defined(CONFIG_TRACING)
@ -135,3 +138,4 @@ void arch_cpu_atomic_idle(unsigned int key)
__enable_irq();
#endif
}
#endif

View file

@ -58,7 +58,7 @@ BUILD_ASSERT(!(CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE &
(CONFIG_CORTEX_M_NULL_POINTER_EXCEPTION_PAGE_SIZE - 1)),
"the size of the partition must be power of 2");
static int z_arm_debug_enable_null_pointer_detection(void)
int z_arm_debug_enable_null_pointer_detection(void)
{
z_arm_dwt_init();
@ -118,7 +118,4 @@ static int z_arm_debug_enable_null_pointer_detection(void)
return 0;
}
SYS_INIT(z_arm_debug_enable_null_pointer_detection, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif /* CONFIG_NULL_POINTER_EXCEPTION_DETECTION_DWT */

View file

@ -743,7 +743,7 @@ static inline bool z_arm_is_pc_valid(uintptr_t pc)
return true;
}
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay)
#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm))
/* Is it in the ITCM */
if ((((uintptr_t)&__itcm_start) <= pc) && (pc < ((uintptr_t)&__itcm_end))) {
return true;
@ -1192,5 +1192,7 @@ void z_arm_fault_init(void)
#endif /* CONFIG_BUILTIN_STACK_GUARD */
#ifdef CONFIG_TRAP_UNALIGNED_ACCESS
SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;
#else
SCB->CCR &= ~SCB_CCR_UNALIGN_TRP_Msk;
#endif /* CONFIG_TRAP_UNALIGNED_ACCESS */
}

View file

@ -27,6 +27,11 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
* r0: address of the system_off function
*/
push {r4-r12, lr}
/* Move system_off to protected register. */
mov r4, r0
/* Store CPU context */
ldr r1, =_cpu_context
mrs r2, msp
@ -71,7 +76,7 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
* Call the system_off function passed as parameter. This should never
* return.
*/
blx r0
blx r4
/*
* The system_off function returns here only when the powering off was
@ -81,9 +86,10 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
/*
* Reset the marking of suspend to RAM, return is ignored.
*/
push {r0}
bl pm_s2ram_mark_check_and_clear
pop {r0}
/* Move system_off back to r0 as return value */
mov r0, r4
pop {r4-r12, lr}
bx lr
@ -93,11 +99,14 @@ GTEXT(arch_pm_s2ram_resume)
SECTION_FUNC(TEXT, arch_pm_s2ram_resume)
/*
* Check if reset occurred after suspending to RAM.
* Store LR to ensure we can continue boot when we are not suspended
* to RAM. In addition to LR, R0 is pushed too, to ensure "SP mod 8 = 0",
* as stated by ARM rule 6.2.1.2 for AAPCS32.
*/
push {lr}
push {r0, lr}
bl pm_s2ram_mark_check_and_clear
cmp r0, #0x1
pop {lr}
pop {r0, lr}
beq resume
bx lr

View file

@ -20,6 +20,8 @@
#include <kernel_internal.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/sys/barrier.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
#if defined(__GNUC__)
/*
@ -181,6 +183,10 @@ extern FUNC_NORETURN void z_cstart(void);
*/
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
relocate_vector_table();
#if defined(CONFIG_CPU_HAS_FPU)
z_arm_floating_point_init();
@ -193,6 +199,13 @@ void z_prep_c(void)
#else
z_arm_interrupt_init();
#endif /* CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER */
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
#ifdef CONFIG_NULL_POINTER_EXCEPTION_DETECTION_DWT
z_arm_debug_enable_null_pointer_detection();
#endif
z_cstart();
CODE_UNREACHABLE;
}

View file

@ -24,8 +24,8 @@ GDATA(z_interrupt_stacks)
#if defined(CONFIG_DEBUG_THREAD_INFO)
GDATA(z_sys_post_kernel)
#endif
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
GTEXT(z_arm_platform_init)
#if defined(CONFIG_SOC_RESET_HOOK)
GTEXT(soc_reset_hook)
#endif
#if defined(CONFIG_INIT_ARCH_HW_AT_BOOT)
GTEXT(z_arm_init_arch_hw_at_boot)
@ -93,8 +93,8 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
bl arch_pm_s2ram_resume
#endif /* CONFIG_PM_S2RAM */
#if defined(CONFIG_PLATFORM_SPECIFIC_INIT)
bl z_arm_platform_init
#if defined(CONFIG_SOC_RESET_HOOK)
bl soc_reset_hook
#endif
#if defined(CONFIG_INIT_ARCH_HW_AT_BOOT)

View file

@ -12,6 +12,34 @@
LOG_MODULE_REGISTER(elf, CONFIG_LLEXT_LOG_LEVEL);
#define R_ARM_NONE 0
#define R_ARM_PC24 1
#define R_ARM_ABS32 2
#define R_ARM_REL32 3
#define R_ARM_COPY 20
#define R_ARM_GLOB_DAT 21
#define R_ARM_JUMP_SLOT 22
#define R_ARM_RELATIVE 23
#define R_ARM_CALL 28
#define R_ARM_JUMP24 29
#define R_ARM_TARGET1 38
#define R_ARM_V4BX 40
#define R_ARM_PREL31 42
#define R_ARM_MOVW_ABS_NC 43
#define R_ARM_MOVT_ABS 44
#define R_ARM_MOVW_PREL_NC 45
#define R_ARM_MOVT_PREL 46
#define R_ARM_ALU_PC_G0_NC 57
#define R_ARM_ALU_PC_G1_NC 59
#define R_ARM_LDR_PC_G2 63
#define R_ARM_THM_CALL 10
#define R_ARM_THM_JUMP24 30
#define R_ARM_THM_MOVW_ABS_NC 47
#define R_ARM_THM_MOVT_ABS 48
#define R_ARM_THM_MOVW_PREL_NC 49
#define R_ARM_THM_MOVT_PREL 50
#define OPCODE2ARMMEM(x) ((uint32_t)(x))
#define OPCODE2THM16MEM(x) ((uint16_t)(x))
#define MEM2ARMOPCODE(x) OPCODE2ARMMEM(x)

View file

@ -42,3 +42,7 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
offload_routine = NULL;
k_sched_unlock();
}
void arch_irq_offload_init(void)
{
}

View file

@ -9,6 +9,7 @@ zephyr_library_sources(
irq_init.c
irq_manage.c
prep_c.c
reboot.c
reset.S
reset.c
switch.S
@ -28,6 +29,7 @@ if(${SRAM_LENGTH} GREATER 11 OR ${KERNEL_VM_LENGTH} GREATER 11)
zephyr_cc_option(-mcmodel=large)
endif()
zephyr_library_sources_ifdef(CONFIG_LLEXT elf.c)
zephyr_library_sources_ifdef(CONFIG_FPU_SHARING fpu.c fpu.S)
zephyr_library_sources_ifdef(CONFIG_ARM_MMU mmu.c mmu.S)
zephyr_library_sources_ifdef(CONFIG_ARM_MPU cortex_r/arm_mpu.c)

View file

@ -161,6 +161,14 @@ config ARM64_EXCEPTION_STACK_TRACE
help
Internal config to enable runtime stack traces on fatal exceptions.
config ARCH_HAS_STACKWALK
bool
default y
depends on FRAME_POINTER
help
Internal config to indicate that the arch_stack_walk() API is implemented
and it can be enabled.
config ARM64_SAFE_EXCEPTION_STACK_SIZE
int "The stack size of the safe exception stack"
default 4096

View file

@ -13,7 +13,7 @@
#include <zephyr/arch/cpu.h>
_ASM_FILE_PROLOGUE
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
GTEXT(arch_cpu_idle)
SECTION_FUNC(TEXT, arch_cpu_idle)
#ifdef CONFIG_TRACING
@ -25,7 +25,9 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
wfi
msr daifclr, #(DAIFCLR_IRQ_BIT)
ret
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
GTEXT(arch_cpu_atomic_idle)
SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
#ifdef CONFIG_TRACING
@ -41,3 +43,5 @@ SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
msr daifclr, #(DAIFCLR_IRQ_BIT)
_irq_disabled:
ret
#endif

515
arch/arm64/core/elf.c Normal file
View file

@ -0,0 +1,515 @@
/*
* Copyright (c) 2024 BayLibre SAS
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/llext/elf.h>
#include <zephyr/llext/llext.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/byteorder.h>
LOG_MODULE_REGISTER(elf, CONFIG_LLEXT_LOG_LEVEL);
#define R_ARM_NONE 0
#define R_AARCH64_NONE 256
/* Static data relocations */
#define R_AARCH64_ABS64 257
#define R_AARCH64_ABS32 258
#define R_AARCH64_ABS16 259
#define R_AARCH64_PREL64 260
#define R_AARCH64_PREL32 261
#define R_AARCH64_PREL16 262
/* Static relocations */
#define R_AARCH64_MOVW_UABS_G0 263
#define R_AARCH64_MOVW_UABS_G0_NC 264
#define R_AARCH64_MOVW_UABS_G1 265
#define R_AARCH64_MOVW_UABS_G1_NC 266
#define R_AARCH64_MOVW_UABS_G2 267
#define R_AARCH64_MOVW_UABS_G2_NC 268
#define R_AARCH64_MOVW_UABS_G3 269
#define R_AARCH64_MOVW_SABS_G0 270
#define R_AARCH64_MOVW_SABS_G1 271
#define R_AARCH64_MOVW_SABS_G2 272
#define R_AARCH64_MOVW_PREL_G0 287
#define R_AARCH64_MOVW_PREL_G0_NC 288
#define R_AARCH64_MOVW_PREL_G1 289
#define R_AARCH64_MOVW_PREL_G1_NC 290
#define R_AARCH64_MOVW_PREL_G2 291
#define R_AARCH64_MOVW_PREL_G2_NC 292
#define R_AARCH64_MOVW_PREL_G3 293
#define R_AARCH64_LD_PREL_LO19 273
#define R_AARCH64_ADR_PREL_LO21 274
#define R_AARCH64_ADR_PREL_PG_HI21 275
#define R_AARCH64_ADR_PREL_PG_HI21_NC 276
#define R_AARCH64_ADD_ABS_LO12_NC 277
#define R_AARCH64_LDST8_ABS_LO12_NC 278
#define R_AARCH64_TSTBR14 279
#define R_AARCH64_CONDBR19 280
#define R_AARCH64_JUMP26 282
#define R_AARCH64_CALL26 283
#define R_AARCH64_LDST16_ABS_LO12_NC 284
#define R_AARCH64_LDST32_ABS_LO12_NC 285
#define R_AARCH64_LDST64_ABS_LO12_NC 286
#define R_AARCH64_LDST128_ABS_LO12_NC 299
/* Masks for immediate values */
#define AARCH64_MASK_IMM12 BIT_MASK(12)
#define AARCH64_MASK_IMM14 BIT_MASK(14)
#define AARCH64_MASK_IMM16 BIT_MASK(16)
#define AARCH64_MASK_IMM19 BIT_MASK(19)
#define AARCH64_MASK_IMM26 BIT_MASK(26)
/* MOV instruction helper symbols */
#define AARCH64_MASK_MOV_OPCODE BIT_MASK(8)
#define AARCH64_SHIFT_MOV_OPCODE (23)
#define AARCH64_SHIFT_MOV_IMM16 (5)
#define AARCH64_OPCODE_MOVN (0b00100101)
#define AARCH64_OPCODE_MOVZ (0b10100101)
/* ADR instruction helper symbols */
#define AARCH64_MASK_ADR_IMMLO BIT_MASK(2)
#define AARCH64_MASK_ADR_IMMHI BIT_MASK(19)
#define AARCH64_SHIFT_ADR_IMMLO (29)
#define AARCH64_SHIFT_ADR_IMMHI (5)
#define AARCH64_ADR_IMMLO_BITS (2)
#define AARCH64_PAGE(expr) ((expr) & ~0xFFF)
enum aarch64_reloc_type {
AARCH64_RELOC_TYPE_NONE,
AARCH64_RELOC_TYPE_ABS,
AARCH64_RELOC_TYPE_PREL,
AARCH64_RELOC_TYPE_PAGE,
};
/**
* @brief Function computing a relocation (X in AArch64 ELF).
*
* @param[in] reloc_type Type of relocation operation.
* @param[in] loc Address of an opcode to rewrite (P in AArch64 ELF).
* @param[in] sym_base_addr Address of the symbol referenced by relocation (S in AArch64 ELF).
* @param[in] addend Addend from RELA relocation.
*
* @return Result of the relocation operation (X in AArch64 ELF)
*/
static uint64_t reloc(enum aarch64_reloc_type reloc_type, uintptr_t loc, uintptr_t sym_base_addr,
int64_t addend)
{
switch (reloc_type) {
case AARCH64_RELOC_TYPE_ABS:
return sym_base_addr + addend;
case AARCH64_RELOC_TYPE_PREL:
return sym_base_addr + addend - loc;
case AARCH64_RELOC_TYPE_PAGE:
return AARCH64_PAGE(sym_base_addr + addend) - AARCH64_PAGE(loc);
case AARCH64_RELOC_TYPE_NONE:
return 0;
}
CODE_UNREACHABLE;
}
/**
* @brief Handler for static data relocations.
*
* @param[in] rel Relocation data provided by ELF
* @param[in] reloc_type Type of relocation operation.
* @param[in] loc Address of an opcode to rewrite (P in AArch64 ELF).
* @param[in] sym_base_addr Address of the symbol referenced by relocation (S in AArch64 ELF).
*
* @retval -ERANGE Relocation value overflow
* @retval 0 Successful relocation
*/
static int data_reloc_handler(elf_rela_t *rel, elf_word reloc_type, uintptr_t loc,
uintptr_t sym_base_addr)
{
int64_t x;
switch (reloc_type) {
case R_AARCH64_ABS64:
*(int64_t *)loc = reloc(AARCH64_RELOC_TYPE_ABS, loc, sym_base_addr, rel->r_addend);
break;
case R_AARCH64_ABS32:
x = reloc(AARCH64_RELOC_TYPE_ABS, loc, sym_base_addr, rel->r_addend);
if (x < 0 || x > UINT32_MAX) {
return -ERANGE;
}
*(uint32_t *)loc = (uint32_t)x;
break;
case R_AARCH64_ABS16:
x = reloc(AARCH64_RELOC_TYPE_ABS, loc, sym_base_addr, rel->r_addend);
if (x < 0 || x > UINT16_MAX) {
return -ERANGE;
}
*(uint16_t *)loc = (uint16_t)x;
break;
case R_AARCH64_PREL64:
*(int64_t *)loc = reloc(AARCH64_RELOC_TYPE_PREL, loc, sym_base_addr, rel->r_addend);
break;
case R_AARCH64_PREL32:
x = reloc(AARCH64_RELOC_TYPE_PREL, loc, sym_base_addr, rel->r_addend);
if (x < INT32_MIN || x > INT32_MAX) {
return -ERANGE;
}
*(int32_t *)loc = (int32_t)x;
break;
case R_AARCH64_PREL16:
x = reloc(AARCH64_RELOC_TYPE_PREL, loc, sym_base_addr, rel->r_addend);
if (x < INT16_MIN || x > INT16_MAX) {
return -ERANGE;
}
*(int16_t *)loc = (int16_t)x;
break;
default:
CODE_UNREACHABLE;
}
return 0;
}
/**
* @brief Handler for relocations using MOV* instructions.
*
* @param[in] rel Relocation data provided by ELF
* @param[in] reloc_type Type of relocation operation.
* @param[in] loc Address of an opcode to rewrite (P in AArch64 ELF).
* @param[in] sym_base_addr Address of the symbol referenced by relocation (S in AArch64 ELF).
*
* @retval -ERANGE Relocation value overflow
* @retval 0 Successful relocation
*/
static int movw_reloc_handler(elf_rela_t *rel, elf_word reloc_type, uintptr_t loc,
uintptr_t sym_base_addr)
{
int64_t x;
uint32_t imm;
int lsb = 0; /* LSB of X to be used */
bool is_movnz = false;
enum aarch64_reloc_type type = AARCH64_RELOC_TYPE_ABS;
uint32_t opcode = sys_le32_to_cpu(*(uint32_t *)loc);
switch (reloc_type) {
case R_AARCH64_MOVW_SABS_G0:
is_movnz = true;
case R_AARCH64_MOVW_UABS_G0_NC:
case R_AARCH64_MOVW_UABS_G0:
break;
case R_AARCH64_MOVW_SABS_G1:
is_movnz = true;
case R_AARCH64_MOVW_UABS_G1_NC:
case R_AARCH64_MOVW_UABS_G1:
lsb = 16;
break;
case R_AARCH64_MOVW_SABS_G2:
is_movnz = true;
case R_AARCH64_MOVW_UABS_G2_NC:
case R_AARCH64_MOVW_UABS_G2:
lsb = 32;
break;
case R_AARCH64_MOVW_UABS_G3:
lsb = 48;
break;
case R_AARCH64_MOVW_PREL_G0:
is_movnz = true;
case R_AARCH64_MOVW_PREL_G0_NC:
type = AARCH64_RELOC_TYPE_PREL;
break;
case R_AARCH64_MOVW_PREL_G1:
is_movnz = true;
case R_AARCH64_MOVW_PREL_G1_NC:
type = AARCH64_RELOC_TYPE_PREL;
lsb = 16;
break;
case R_AARCH64_MOVW_PREL_G2:
is_movnz = true;
case R_AARCH64_MOVW_PREL_G2_NC:
type = AARCH64_RELOC_TYPE_PREL;
lsb = 32;
break;
case R_AARCH64_MOVW_PREL_G3:
is_movnz = true;
type = AARCH64_RELOC_TYPE_PREL;
lsb = 48;
break;
default:
CODE_UNREACHABLE;
}
x = reloc(type, loc, sym_base_addr, rel->r_addend);
imm = x >> lsb;
/* Manipulate opcode for signed relocations. Result depends on sign of immediate value. */
if (is_movnz) {
opcode &= ~(AARCH64_MASK_MOV_OPCODE << AARCH64_SHIFT_MOV_OPCODE);
if (x >= 0) {
opcode |= (AARCH64_OPCODE_MOVN << AARCH64_SHIFT_MOV_OPCODE);
} else {
opcode |= (AARCH64_OPCODE_MOVZ << AARCH64_SHIFT_MOV_OPCODE);
/* Need to invert immediate value for MOVZ. */
imm = ~imm;
}
}
opcode &= ~(AARCH64_MASK_IMM16 << AARCH64_SHIFT_MOV_IMM16);
opcode |= (imm & AARCH64_MASK_IMM16) << AARCH64_SHIFT_MOV_IMM16;
*(uint32_t *)loc = sys_cpu_to_le32(opcode);
if (imm > UINT16_MAX) {
return -ERANGE;
}
return 0;
}
/**
* @brief Handler for static relocations except these related to MOV* instructions.
*
* @param[in] rel Relocation data provided by ELF
* @param[in] reloc_type Type of relocation operation.
* @param[in] loc Address of an opcode to rewrite (P in AArch64 ELF).
* @param[in] sym_base_addr Address of the symbol referenced by relocation (S in AArch64 ELF).
*
* @retval -ERANGE Relocation value overflow
* @retval 0 Successful relocation
*/
static int imm_reloc_handler(elf_rela_t *rel, elf_word reloc_type, uintptr_t loc,
uintptr_t sym_base_addr)
{
int lsb = 2; /* LSB of X to be used */
int len; /* bit length of immediate value */
int shift = 10; /* shift of the immediate in instruction encoding */
uint64_t imm;
uint32_t bitmask = AARCH64_MASK_IMM12;
int64_t x;
bool is_adr = false;
enum aarch64_reloc_type type = AARCH64_RELOC_TYPE_ABS;
uint32_t opcode = sys_le32_to_cpu(*(uint32_t *)loc);
switch (reloc_type) {
case R_AARCH64_ADD_ABS_LO12_NC:
case R_AARCH64_LDST8_ABS_LO12_NC:
lsb = 0;
len = 12;
break;
case R_AARCH64_LDST16_ABS_LO12_NC:
lsb = 1;
len = 11;
break;
case R_AARCH64_LDST32_ABS_LO12_NC:
len = 10;
break;
case R_AARCH64_LDST64_ABS_LO12_NC:
lsb = 3;
len = 9;
break;
case R_AARCH64_LDST128_ABS_LO12_NC:
lsb = 4;
len = 8;
break;
case R_AARCH64_LD_PREL_LO19:
case R_AARCH64_CONDBR19:
type = AARCH64_RELOC_TYPE_PREL;
bitmask = AARCH64_MASK_IMM19;
shift = 5;
len = 19;
break;
case R_AARCH64_ADR_PREL_LO21:
type = AARCH64_RELOC_TYPE_PREL;
is_adr = true;
lsb = 0;
len = 21;
break;
case R_AARCH64_TSTBR14:
type = AARCH64_RELOC_TYPE_PREL;
bitmask = AARCH64_MASK_IMM14;
shift = 5;
len = 14;
break;
case R_AARCH64_ADR_PREL_PG_HI21_NC:
case R_AARCH64_ADR_PREL_PG_HI21:
type = AARCH64_RELOC_TYPE_PAGE;
is_adr = true;
lsb = 12;
len = 21;
break;
case R_AARCH64_CALL26:
case R_AARCH64_JUMP26:
type = AARCH64_RELOC_TYPE_PREL;
bitmask = AARCH64_MASK_IMM26;
shift = 0;
len = 26;
break;
default:
CODE_UNREACHABLE;
}
x = reloc(type, loc, sym_base_addr, rel->r_addend);
x >>= lsb;
imm = x & BIT_MASK(len);
/* ADR instruction has immediate value split into two fields. */
if (is_adr) {
uint32_t immlo, immhi;
immlo = (imm & AARCH64_MASK_ADR_IMMLO) << AARCH64_SHIFT_ADR_IMMLO;
imm >>= AARCH64_ADR_IMMLO_BITS;
immhi = (imm & AARCH64_MASK_ADR_IMMHI) << AARCH64_SHIFT_ADR_IMMHI;
imm = immlo | immhi;
shift = 0;
bitmask = ((AARCH64_MASK_ADR_IMMLO << AARCH64_SHIFT_ADR_IMMLO) |
(AARCH64_MASK_ADR_IMMHI << AARCH64_SHIFT_ADR_IMMHI));
}
opcode &= ~(bitmask << shift);
opcode |= (imm & bitmask) << shift;
*(uint32_t *)loc = sys_cpu_to_le32(opcode);
/* Mask X sign bit and upper bits. */
x = (int64_t)(x & ~BIT_MASK(len - 1)) >> (len - 1);
/* Incrementing X will either overflow and set it to 0 or
* set it 1. Any other case indicates that there was an overflow in relocation.
*/
if ((int64_t)x++ > 1) {
return -ERANGE;
}
return 0;
}
/**
* @brief Architecture specific function for relocating partially linked (static) elf
*
* Elf files contain a series of relocations described in a section. These relocation
* instructions are architecture specific and each architecture supporting extensions
* must implement this.
*
* The relocation codes for arm64 are well documented
* https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst#relocation
*
* @param[in] rel Relocation data provided by ELF
* @param[in] loc Address of an opcode to rewrite (P in AArch64 ELF)
* @param[in] sym_base_addr Address of the symbol referenced by relocation (S in AArch64 ELF)
* @param[in] sym_name Name of symbol referenced by relocation
* @param[in] load_bias `.text` load address
* @retval 0 Success
* @retval -ENOTSUP Unsupported relocation
* @retval -ENOEXEC Invalid relocation
*/
int arch_elf_relocate(elf_rela_t *rel, uintptr_t loc, uintptr_t sym_base_addr, const char *sym_name,
uintptr_t load_bias)
{
int ret = 0;
bool overflow_check = true;
elf_word reloc_type = ELF_R_TYPE(rel->r_info);
switch (reloc_type) {
case R_ARM_NONE:
case R_AARCH64_NONE:
overflow_check = false;
break;
case R_AARCH64_ABS64:
case R_AARCH64_PREL64:
overflow_check = false;
case R_AARCH64_ABS16:
case R_AARCH64_ABS32:
case R_AARCH64_PREL16:
case R_AARCH64_PREL32:
ret = data_reloc_handler(rel, reloc_type, loc, sym_base_addr);
break;
case R_AARCH64_MOVW_UABS_G0_NC:
case R_AARCH64_MOVW_UABS_G1_NC:
case R_AARCH64_MOVW_UABS_G2_NC:
case R_AARCH64_MOVW_UABS_G3:
case R_AARCH64_MOVW_PREL_G0_NC:
case R_AARCH64_MOVW_PREL_G1_NC:
case R_AARCH64_MOVW_PREL_G2_NC:
case R_AARCH64_MOVW_PREL_G3:
overflow_check = false;
case R_AARCH64_MOVW_UABS_G0:
case R_AARCH64_MOVW_UABS_G1:
case R_AARCH64_MOVW_UABS_G2:
case R_AARCH64_MOVW_SABS_G0:
case R_AARCH64_MOVW_SABS_G1:
case R_AARCH64_MOVW_SABS_G2:
case R_AARCH64_MOVW_PREL_G0:
case R_AARCH64_MOVW_PREL_G1:
case R_AARCH64_MOVW_PREL_G2:
ret = movw_reloc_handler(rel, reloc_type, loc, sym_base_addr);
break;
case R_AARCH64_ADD_ABS_LO12_NC:
case R_AARCH64_LDST8_ABS_LO12_NC:
case R_AARCH64_LDST16_ABS_LO12_NC:
case R_AARCH64_LDST32_ABS_LO12_NC:
case R_AARCH64_LDST64_ABS_LO12_NC:
case R_AARCH64_LDST128_ABS_LO12_NC:
overflow_check = false;
case R_AARCH64_LD_PREL_LO19:
case R_AARCH64_ADR_PREL_LO21:
case R_AARCH64_TSTBR14:
case R_AARCH64_CONDBR19:
ret = imm_reloc_handler(rel, reloc_type, loc, sym_base_addr);
break;
case R_AARCH64_ADR_PREL_PG_HI21_NC:
overflow_check = false;
case R_AARCH64_ADR_PREL_PG_HI21:
ret = imm_reloc_handler(rel, reloc_type, loc, sym_base_addr);
break;
case R_AARCH64_CALL26:
case R_AARCH64_JUMP26:
ret = imm_reloc_handler(rel, reloc_type, loc, sym_base_addr);
/* TODO Handle case when address exceeds +/- 128MB */
break;
default:
LOG_ERR("unknown relocation: %llu\n", reloc_type);
return -ENOEXEC;
}
if (overflow_check && ret == -ERANGE) {
LOG_ERR("sym '%s': relocation out of range (%#lx -> %#lx)\n", sym_name, loc,
sym_base_addr);
return -ENOEXEC;
}
return 0;
}

View file

@ -21,6 +21,8 @@
#include <zephyr/sys/poweroff.h>
#include <kernel_arch_func.h>
#include "paging.h"
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_ARM64_SAFE_EXCEPTION_STACK
@ -194,9 +196,13 @@ static void esf_dump(const struct arch_esf *esf)
LOG_ERR("x16: 0x%016llx x17: 0x%016llx", esf->x16, esf->x17);
LOG_ERR("x18: 0x%016llx lr: 0x%016llx", esf->x18, esf->lr);
}
#endif /* CONFIG_EXCEPTION_DEBUG */
#ifdef CONFIG_EXCEPTION_STACK_TRACE
static void esf_unwind(const struct arch_esf *esf)
#ifdef CONFIG_ARCH_STACKWALK
typedef bool (*arm64_stacktrace_cb)(void *cookie, unsigned long addr, void *fp);
static void walk_stackframe(arm64_stacktrace_cb cb, void *cookie, const struct arch_esf *esf,
int max_frames)
{
/*
* For GCC:
@ -218,30 +224,61 @@ static void esf_unwind(const struct arch_esf *esf)
* + +-----------------+
*/
uint64_t *fp = (uint64_t *) esf->fp;
unsigned int count = 0;
uint64_t *fp;
uint64_t lr;
LOG_ERR("");
for (int i = 0; (fp != NULL) && (i < CONFIG_EXCEPTION_STACK_TRACE_MAX_FRAMES); i++) {
lr = fp[1];
#ifdef CONFIG_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(lr, &offset);
if (esf != NULL) {
fp = (uint64_t *) esf->fp;
} else {
return;
}
LOG_ERR("backtrace %2d: fp: 0x%016llx lr: 0x%016llx [%s+0x%x]",
count++, (uint64_t) fp, lr, name, offset);
#else
LOG_ERR("backtrace %2d: fp: 0x%016llx lr: 0x%016llx",
count++, (uint64_t) fp, lr);
#endif
for (int i = 0; (fp != NULL) && (i < max_frames); i++) {
lr = fp[1];
if (!cb(cookie, lr, fp)) {
break;
}
fp = (uint64_t *) fp[0];
}
}
void arch_stack_walk(stack_trace_callback_fn callback_fn, void *cookie,
const struct k_thread *thread, const struct arch_esf *esf)
{
ARG_UNUSED(thread);
walk_stackframe((arm64_stacktrace_cb)callback_fn, cookie, esf,
CONFIG_ARCH_STACKWALK_MAX_FRAMES);
}
#endif /* CONFIG_ARCH_STACKWALK */
#ifdef CONFIG_EXCEPTION_STACK_TRACE
static bool print_trace_address(void *arg, unsigned long lr, void *fp)
{
int *i = arg;
#ifdef CONFIG_SYMTAB
uint32_t offset = 0;
const char *name = symtab_find_symbol_name(lr, &offset);
LOG_ERR(" %d: fp: 0x%016llx lr: 0x%016lx [%s+0x%x]", (*i)++, (uint64_t)fp, lr, name,
offset);
#else
LOG_ERR(" %d: fp: 0x%016llx lr: 0x%016lx", (*i)++, (uint64_t)fp, lr);
#endif /* CONFIG_SYMTAB */
return true;
}
static void esf_unwind(const struct arch_esf *esf)
{
int i = 0;
LOG_ERR("");
LOG_ERR("call trace:");
walk_stackframe(print_trace_address, &i, esf, CONFIG_ARCH_STACKWALK_MAX_FRAMES);
LOG_ERR("");
}
#endif
#endif /* CONFIG_EXCEPTION_DEBUG */
#endif /* CONFIG_EXCEPTION_STACK_TRACE */
#ifdef CONFIG_ARM64_STACK_PROTECTION
static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, uint64_t far)
@ -287,8 +324,9 @@ static bool z_arm64_stack_corruption_check(struct arch_esf *esf, uint64_t esr, u
static bool is_recoverable(struct arch_esf *esf, uint64_t esr, uint64_t far,
uint64_t elr)
{
if (!esf)
if (!esf) {
return false;
}
#ifdef CONFIG_USERSPACE
for (int i = 0; i < ARRAY_SIZE(exceptions); i++) {
@ -337,6 +375,12 @@ void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf)
}
#endif
if (IS_ENABLED(CONFIG_DEMAND_PAGING) &&
reason != K_ERR_STACK_CHK_FAIL &&
z_arm64_do_demand_paging(esf, esr, far)) {
return;
}
if (GET_EL(el) != MODE_EL0) {
#ifdef CONFIG_EXCEPTION_DEBUG
bool dump_far = false;
@ -345,8 +389,9 @@ void z_arm64_fatal_error(unsigned int reason, struct arch_esf *esf)
dump_esr(esr, &dump_far);
if (dump_far)
if (dump_far) {
LOG_ERR("FAR_ELn: 0x%016llx", far);
}
LOG_ERR("TPIDRRO: 0x%016llx", read_tpidrro_el0());
#endif /* CONFIG_EXCEPTION_DEBUG */

View file

@ -23,3 +23,7 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
: [svid] "i" (_SVC_CALL_IRQ_OFFLOAD),
"r" (x0), "r" (x1));
}
void arch_irq_offload_init(void)
{
}

View file

@ -11,6 +11,7 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel/mm/demand_paging.h>
#include <kernel_arch_func.h>
#include <kernel_arch_interface.h>
#include <kernel_internal.h>
@ -21,8 +22,10 @@
#include <zephyr/linker/linker-defs.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/util.h>
#include <mmu.h>
#include "mmu.h"
#include "paging.h"
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
@ -139,6 +142,12 @@ int arm64_mmu_tables_total_usage(void)
static inline bool is_free_desc(uint64_t desc)
{
return desc == 0;
}
static inline bool is_inval_desc(uint64_t desc)
{
/* invalid descriptors aren't necessarily free */
return (desc & PTE_DESC_TYPE_MASK) == PTE_INVALID_DESC;
}
@ -203,8 +212,10 @@ static void debug_show_pte(uint64_t *pte, unsigned int level)
if (is_block_desc(*pte)) {
MMU_DEBUG("[Block] ");
} else {
} else if (!is_inval_desc(*pte)) {
MMU_DEBUG("[Page] ");
} else {
MMU_DEBUG("[paged-out] ");
}
uint8_t mem_type = (*pte >> 2) & MT_TYPE_MASK;
@ -216,6 +227,7 @@ static void debug_show_pte(uint64_t *pte, unsigned int level)
MMU_DEBUG((*pte & PTE_BLOCK_DESC_AP_ELx) ? "-ELx" : "-ELh");
MMU_DEBUG((*pte & PTE_BLOCK_DESC_PXN) ? "-PXN" : "-PX");
MMU_DEBUG((*pte & PTE_BLOCK_DESC_UXN) ? "-UXN" : "-UX");
MMU_DEBUG((*pte & PTE_SW_WRITABLE) ? "-WRITABLE" : "");
MMU_DEBUG("\n");
}
#else
@ -231,8 +243,15 @@ static void set_pte_table_desc(uint64_t *pte, uint64_t *table, unsigned int leve
static void set_pte_block_desc(uint64_t *pte, uint64_t desc, unsigned int level)
{
if (desc) {
desc |= (level == XLAT_LAST_LEVEL) ? PTE_PAGE_DESC : PTE_BLOCK_DESC;
if (level != XLAT_LAST_LEVEL) {
desc |= PTE_BLOCK_DESC;
} else if (!IS_ENABLED(CONFIG_DEMAND_PAGING) || (desc & PTE_BLOCK_DESC_AF) != 0) {
desc |= PTE_PAGE_DESC;
} else {
/*
* Demand paging configured and AF unset: leave the descriptor
* type to "invalid" as in arch_mem_page_out().
*/
}
*pte = desc;
debug_show_pte(pte, level);
@ -373,6 +392,11 @@ static void del_mapping(uint64_t *table, uintptr_t virt, size_t size,
continue;
}
if (step != level_size && is_block_desc(*pte)) {
/* need to split this block mapping */
expand_to_table(pte, level);
}
if (is_table_desc(*pte, level)) {
subtable = pte_desc_table(*pte);
del_mapping(subtable, virt, step, level + 1);
@ -380,12 +404,6 @@ static void del_mapping(uint64_t *table, uintptr_t virt, size_t size,
continue;
}
dec_table_ref(subtable);
} else {
/*
* We assume that block mappings will be unmapped
* as a whole and not partially.
*/
__ASSERT(step == level_size, "");
}
/* free this entry */
@ -657,6 +675,8 @@ static uint64_t get_region_desc(uint32_t attrs)
/* AP bits for Data access permission */
desc |= (attrs & MT_RW) ? PTE_BLOCK_DESC_AP_RW : PTE_BLOCK_DESC_AP_RO;
desc |= (IS_ENABLED(CONFIG_DEMAND_PAGING) && (attrs & MT_RW)) ?
PTE_SW_WRITABLE : 0;
/* Mirror permissions to EL0 */
desc |= (attrs & MT_RW_AP_ELx) ?
@ -664,6 +684,11 @@ static uint64_t get_region_desc(uint32_t attrs)
/* the access flag */
desc |= PTE_BLOCK_DESC_AF;
if (IS_ENABLED(CONFIG_DEMAND_PAGING) && (attrs & MT_PAGED_OUT) != 0) {
/* set it up for demand paging like arch_mem_page_out() */
desc &= ~PTE_BLOCK_DESC_AF;
desc |= PTE_BLOCK_DESC_AP_RO;
}
/* memory attribute index field */
mem_type = MT_TYPE(attrs);
@ -686,17 +711,20 @@ static uint64_t get_region_desc(uint32_t attrs)
case MT_NORMAL_NC:
case MT_NORMAL:
/* Make Normal RW memory as execute never */
if ((attrs & MT_RW) || (attrs & MT_P_EXECUTE_NEVER))
if ((attrs & MT_RW) || (attrs & MT_P_EXECUTE_NEVER)) {
desc |= PTE_BLOCK_DESC_PXN;
}
if (((attrs & MT_RW) && (attrs & MT_RW_AP_ELx)) ||
(attrs & MT_U_EXECUTE_NEVER))
(attrs & MT_U_EXECUTE_NEVER)) {
desc |= PTE_BLOCK_DESC_UXN;
}
if (mem_type == MT_NORMAL)
if (mem_type == MT_NORMAL) {
desc |= PTE_BLOCK_DESC_INNER_SHARE;
else
} else {
desc |= PTE_BLOCK_DESC_OUTER_SHARE;
}
}
/* non-Global bit */
@ -755,6 +783,12 @@ static void invalidate_tlb_all(void)
: : : "memory");
}
static inline void invalidate_tlb_page(uintptr_t virt)
{
/* to be refined */
invalidate_tlb_all();
}
/* zephyr execution regions with appropriate attributes */
struct arm_mmu_flat_range {
@ -844,8 +878,9 @@ static void setup_page_tables(struct arm_mmu_ptables *ptables)
uintptr_t max_va = 0, max_pa = 0;
MMU_DEBUG("xlat tables:\n");
for (index = 0U; index < CONFIG_MAX_XLAT_TABLES; index++)
for (index = 0U; index < CONFIG_MAX_XLAT_TABLES; index++) {
MMU_DEBUG("%d: %p\n", index, xlat_tables + index * Ln_XLAT_NUM_ENTRIES);
}
for (index = 0U; index < mmu_config.num_regions; index++) {
region = &mmu_config.mmu_regions[index];
@ -1067,6 +1102,10 @@ static int __arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flag
entry_flags |= MT_RW_AP_ELx;
}
if (IS_ENABLED(CONFIG_DEMAND_PAGING) && (flags & K_MEM_MAP_UNPAGED) != 0) {
entry_flags |= MT_PAGED_OUT;
}
return add_map(ptables, "generic", phys, (uintptr_t)virt, size, entry_flags);
}
@ -1329,8 +1368,9 @@ void z_arm64_thread_mem_domains_init(struct k_thread *incoming)
{
struct arm_mmu_ptables *ptables;
if ((incoming->base.user_options & K_USER) == 0)
if ((incoming->base.user_options & K_USER) == 0) {
return;
}
ptables = incoming->arch.ptables;
@ -1346,3 +1386,311 @@ void z_arm64_swap_mem_domains(struct k_thread *incoming)
}
#endif /* CONFIG_USERSPACE */
#ifdef CONFIG_DEMAND_PAGING
static uint64_t *get_pte_location(struct arm_mmu_ptables *ptables,
uintptr_t virt)
{
uint64_t *pte;
uint64_t *table = ptables->base_xlat_table;
unsigned int level = BASE_XLAT_LEVEL;
for (;;) {
pte = &table[XLAT_TABLE_VA_IDX(virt, level)];
if (level == XLAT_LAST_LEVEL) {
return pte;
}
if (is_table_desc(*pte, level)) {
level++;
table = pte_desc_table(*pte);
continue;
}
/* anything else is unexpected */
return NULL;
}
}
void arch_mem_page_out(void *addr, uintptr_t location)
{
uintptr_t virt = (uintptr_t)addr;
uint64_t *pte = get_pte_location(&kernel_ptables, virt);
uint64_t desc;
__ASSERT(pte != NULL, "");
desc = *pte;
/* mark the entry invalid to the hardware */
desc &= ~PTE_DESC_TYPE_MASK;
desc |= PTE_INVALID_DESC;
/* store the location token in place of the physical address */
__ASSERT((location & ~PTE_PHYSADDR_MASK) == 0, "");
desc &= ~PTE_PHYSADDR_MASK;
desc |= location;
/*
* The location token may be 0. Make sure the whole descriptor
* doesn't end up being zero as this would be seen as a free entry.
*/
desc |= PTE_BLOCK_DESC_AP_RO;
*pte = desc;
MMU_DEBUG("page_out: virt=%#lx location=%#lx\n", virt, location);
debug_show_pte(pte, XLAT_LAST_LEVEL);
sync_domains(virt, CONFIG_MMU_PAGE_SIZE, "page_out");
invalidate_tlb_page(virt);
}
void arch_mem_page_in(void *addr, uintptr_t phys)
{
uintptr_t virt = (uintptr_t)addr;
uint64_t *pte = get_pte_location(&kernel_ptables, virt);
uint64_t desc;
__ASSERT((phys & ~PTE_PHYSADDR_MASK) == 0, "");
__ASSERT(pte != NULL, "");
desc = *pte;
__ASSERT(!is_free_desc(desc), "");
/* mark the entry valid again to the hardware */
desc &= ~PTE_DESC_TYPE_MASK;
desc |= PTE_PAGE_DESC;
/* store the physical address */
desc &= ~PTE_PHYSADDR_MASK;
desc |= phys;
/* mark as clean */
desc |= PTE_BLOCK_DESC_AP_RO;
/* and make it initially unaccessible to track unaccessed pages */
desc &= ~PTE_BLOCK_DESC_AF;
*pte = desc;
MMU_DEBUG("page_in: virt=%#lx phys=%#lx\n", virt, phys);
debug_show_pte(pte, XLAT_LAST_LEVEL);
sync_domains(virt, CONFIG_MMU_PAGE_SIZE, "page_in");
invalidate_tlb_page(virt);
}
enum arch_page_location arch_page_location_get(void *addr, uintptr_t *location)
{
uintptr_t virt = (uintptr_t)addr;
uint64_t *pte = get_pte_location(&kernel_ptables, virt);
uint64_t desc;
enum arch_page_location status;
if (!pte) {
return ARCH_PAGE_LOCATION_BAD;
}
desc = *pte;
if (is_free_desc(desc)) {
return ARCH_PAGE_LOCATION_BAD;
}
switch (desc & PTE_DESC_TYPE_MASK) {
case PTE_PAGE_DESC:
status = ARCH_PAGE_LOCATION_PAGED_IN;
break;
case PTE_INVALID_DESC:
status = ARCH_PAGE_LOCATION_PAGED_OUT;
break;
default:
return ARCH_PAGE_LOCATION_BAD;
}
*location = desc & PTE_PHYSADDR_MASK;
return status;
}
uintptr_t arch_page_info_get(void *addr, uintptr_t *phys, bool clear_accessed)
{
uintptr_t virt = (uintptr_t)addr;
uint64_t *pte = get_pte_location(&kernel_ptables, virt);
uint64_t desc;
uintptr_t status = 0;
if (!pte) {
return ARCH_DATA_PAGE_NOT_MAPPED;
}
desc = *pte;
if (is_free_desc(desc)) {
return ARCH_DATA_PAGE_NOT_MAPPED;
}
switch (desc & PTE_DESC_TYPE_MASK) {
case PTE_PAGE_DESC:
status |= ARCH_DATA_PAGE_LOADED;
break;
case PTE_INVALID_DESC:
/* page not loaded */
break;
default:
return ARCH_DATA_PAGE_NOT_MAPPED;
}
if (phys) {
*phys = desc & PTE_PHYSADDR_MASK;
}
if ((status & ARCH_DATA_PAGE_LOADED) == 0) {
return status;
}
if ((desc & PTE_BLOCK_DESC_AF) != 0) {
status |= ARCH_DATA_PAGE_ACCESSED;
}
if ((desc & PTE_BLOCK_DESC_AP_RO) == 0) {
status |= ARCH_DATA_PAGE_DIRTY;
}
if (clear_accessed) {
desc &= ~PTE_BLOCK_DESC_AF;
*pte = desc;
MMU_DEBUG("page_info: virt=%#lx (clearing AF)\n", virt);
debug_show_pte(pte, XLAT_LAST_LEVEL);
sync_domains(virt, CONFIG_MMU_PAGE_SIZE, "unaccessible");
invalidate_tlb_page(virt);
}
return status;
}
#define MT_SCRATCH (MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE)
void arch_mem_scratch(uintptr_t phys)
{
uintptr_t virt = (uintptr_t)K_MEM_SCRATCH_PAGE;
size_t size = CONFIG_MMU_PAGE_SIZE;
int ret = add_map(&kernel_ptables, "scratch", phys, virt, size, MT_SCRATCH);
if (ret) {
LOG_ERR("add_map() returned %d", ret);
} else {
sync_domains(virt, size, "scratch");
invalidate_tlb_page(virt);
}
}
static bool do_mem_page_fault(struct arch_esf *esf, uintptr_t virt)
{
/*
* The k_mem_page_fault() code expects to be called with IRQs enabled
* if the fault happened in a context where IRQs were enabled.
*/
if (arch_irq_unlocked(esf->spsr)) {
enable_irq();
}
bool ok = k_mem_page_fault((void *)virt);
disable_irq();
return ok;
}
/* Called from the fault handler. Returns true if the fault is resolved. */
bool z_arm64_do_demand_paging(struct arch_esf *esf, uint64_t esr, uint64_t far)
{
uintptr_t virt = far;
uint64_t *pte, desc;
uintptr_t phys;
/* filter relevant exceptions */
switch (GET_ESR_EC(esr)) {
case 0x21: /* insn abort from current EL */
case 0x25: /* data abort from current EL */
break;
default:
return false;
}
/* make sure the fault happened in the expected range */
if (!IN_RANGE(virt,
(uintptr_t)K_MEM_VIRT_RAM_START,
((uintptr_t)K_MEM_VIRT_RAM_END - 1))) {
return false;
}
virt = ROUND_DOWN(virt, CONFIG_MMU_PAGE_SIZE);
pte = get_pte_location(&kernel_ptables, virt);
if (!pte) {
/* page mapping doesn't exist, let the core code do its thing */
return do_mem_page_fault(esf, virt);
}
desc = *pte;
if ((desc & PTE_DESC_TYPE_MASK) != PTE_PAGE_DESC) {
/* page is not loaded/mapped */
return do_mem_page_fault(esf, virt);
}
/*
* From this point, we expect only 2 cases:
*
* 1) the Access Flag was not set so we set it marking the page
* as accessed;
*
* 2) the page was read-only and a write occurred so we clear the
* RO flag marking the page dirty.
*
* We bail out on anything else.
*
* Fault status codes for Data aborts (DFSC):
* 0b0010LL Access flag fault
* 0b0011LL Permission fault
*/
uint32_t dfsc = GET_ESR_ISS(esr) & GENMASK(5, 0);
bool write = (GET_ESR_ISS(esr) & BIT(6)) != 0; /* WnR */
if (dfsc == (0b001000 | XLAT_LAST_LEVEL) &&
(desc & PTE_BLOCK_DESC_AF) == 0) {
/* page is being accessed: set the access flag */
desc |= PTE_BLOCK_DESC_AF;
if (write) {
if ((desc & PTE_SW_WRITABLE) == 0) {
/* we don't actually have write permission */
return false;
}
/*
* Let's avoid another fault immediately after
* returning by making the page read-write right away
* effectively marking it "dirty" as well.
*/
desc &= ~PTE_BLOCK_DESC_AP_RO;
}
*pte = desc;
sync_domains(virt, CONFIG_MMU_PAGE_SIZE, "accessed");
/* no TLB inval needed after setting AF */
/* tell the eviction algorithm about it */
phys = desc & PTE_PHYSADDR_MASK;
k_mem_paging_eviction_accessed(phys);
return true;
}
if (dfsc == (0b001100 | XLAT_LAST_LEVEL) && write &&
(desc & PTE_BLOCK_DESC_AP_RO) != 0 &&
(desc & PTE_SW_WRITABLE) != 0) {
/* make it "dirty" i.e. read-write */
desc &= ~PTE_BLOCK_DESC_AP_RO;
*pte = desc;
sync_domains(virt, CONFIG_MMU_PAGE_SIZE, "dirtied");
invalidate_tlb_page(virt);
/* this also counts as an access refresh */
phys = desc & PTE_PHYSADDR_MASK;
k_mem_paging_eviction_accessed(phys);
return true;
}
return false;
}
#endif /* CONFIG_DEMAND_PAGING */

View file

@ -126,6 +126,14 @@
*/
#define PTE_PHYSADDR_MASK GENMASK64(47, PAGE_SIZE_SHIFT)
/*
* Descriptor bits 58 to 55 are defined as "Reserved for Software Use".
*
* When using demand paging, RW memory is marked RO to trap the first write
* for dirty page tracking. Bit 55 indicates if memory is actually writable.
*/
#define PTE_SW_WRITABLE (1ULL << 55)
/*
* TCR definitions.
*/

12
arch/arm64/core/paging.h Normal file
View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2024 BayLibre SAS
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef Z_ARM64_PAGING_H
#define Z_ARM64_PAGING_H
bool z_arm64_do_demand_paging(struct arch_esf *esf, uint64_t esr, uint64_t far);
#endif /* Z_ARM64_PAGING_H */

View file

@ -16,6 +16,8 @@
#include <kernel_internal.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
extern void z_arm64_mm_init(bool is_primary_core);
@ -30,6 +32,10 @@ __weak void z_arm64_mm_init(bool is_primary_core) { }
*/
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
/* Initialize tpidrro_el0 with our struct _cpu instance address */
write_tpidrro_el0((uintptr_t)&_kernel.cpus[0]);
@ -52,6 +58,9 @@ extern FUNC_NORETURN void arch_secondary_cpu_init(void);
void z_arm64_secondary_prep_c(void)
{
arch_secondary_cpu_init();
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
CODE_UNREACHABLE;
}

35
arch/arm64/core/reboot.c Normal file
View file

@ -0,0 +1,35 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/reboot.h>
#include <zephyr/drivers/pm_cpu_ops.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_PM_CPU_OPS_PSCI
void __weak sys_arch_reboot(int type)
{
unsigned char reset_type;
if (type == SYS_REBOOT_COLD) {
reset_type = SYS_COLD_RESET;
} else if (type == SYS_REBOOT_WARM) {
reset_type = SYS_WARM_RESET;
} else {
LOG_ERR("Invalid reboot type");
return;
}
pm_system_reset(reset_type);
}
#else
void __weak sys_arch_reboot(int type)
{
LOG_WRN("%s is not implemented", __func__);
ARG_UNUSED(type);
}
#endif

View file

@ -4,8 +4,5 @@
# Needed to separate definitions in common Xen headers
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-D__ASSEMBLY__>)
# Xen interface version used in headers for correct definition
zephyr_compile_options(-D__XEN_INTERFACE_VERSION__=0x00040e00)
zephyr_library_sources(hypercall.S)
zephyr_library_sources(enlighten.c)

View file

@ -25,3 +25,11 @@ config XEN_DOM0LESS
help
Configures Zephyr as DomU, that can be started on Dom0less
setup.
config XEN_INTERFACE_VERSION
hex "Xen interface version"
default 0x00040e00
depends on XEN
help
Xen interface version to use. This is the version of the
interface that Zephyr will use to communicate with the hypervisor.

View file

@ -42,7 +42,7 @@ static int xen_map_shared_info(const shared_info_t *shared_page)
return HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp);
}
static int xen_enlighten_init(void)
int xen_enlighten_init(void)
{
int ret = 0;
shared_info_t *info = (shared_info_t *) shared_info_buf;
@ -66,5 +66,3 @@ static int xen_enlighten_init(void)
return 0;
}
SYS_INIT(xen_enlighten_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

View file

@ -28,8 +28,13 @@ extern "C" {
#ifndef _ASMLANGUAGE
extern void xen_enlighten_init(void);
static ALWAYS_INLINE void arch_kernel_init(void)
{
#ifdef CONFIG_XEN
xen_enlighten_init();
#endif
}
static inline void arch_switch(void *switch_to, void **switched_from)

View file

@ -17,6 +17,11 @@ if(CONFIG_GEN_ISR_TABLES)
)
endif()
zephyr_library_sources_ifdef(
CONFIG_ISR_TABLE_SHELL
isr_tables_shell.c
)
zephyr_library_sources_ifdef(
CONFIG_MULTI_LEVEL_INTERRUPTS
multilevel_irq.c

View file

@ -30,3 +30,10 @@ config LEGACY_MULTI_LEVEL_TABLE_GENERATION
help
A make-shift Kconfig to continue generating the multi-level interrupt LUT
with the legacy way using DT macros.
config ISR_TABLE_SHELL
bool "Shell command to dump the ISR tables"
depends on GEN_SW_ISR_TABLE
depends on SHELL
help
This option enables a shell command to dump the ISR tables.

View file

@ -0,0 +1,67 @@
/*
* Copyright (c) 2024 Meta Platforms.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/debug/symtab.h>
#include <zephyr/shell/shell.h>
#include <zephyr/sw_isr_table.h>
static void dump_isr_table_entry(const struct shell *sh, int idx, struct _isr_table_entry *entry)
{
if ((entry->isr == z_irq_spurious) || (entry->isr == NULL)) {
return;
}
#ifdef CONFIG_SYMTAB
const char *name = symtab_find_symbol_name((uintptr_t)entry->isr, NULL);
shell_print(sh, "%4d: %s(%p)", idx, name, entry->arg);
#else
shell_print(sh, "%4d: %p(%p)", idx, entry->isr, entry->arg);
#endif /* CONFIG_SYMTAB */
}
static int cmd_sw_isr_table(const struct shell *sh, size_t argc, char **argv)
{
shell_print(sh, "_sw_isr_table[%d]\n", IRQ_TABLE_SIZE);
for (int idx = 0; idx < IRQ_TABLE_SIZE; idx++) {
dump_isr_table_entry(sh, idx, &_sw_isr_table[idx]);
}
return 0;
}
#ifdef CONFIG_SHARED_INTERRUPTS
static int cmd_shared_sw_isr_table(const struct shell *sh, size_t argc, char **argv)
{
shell_print(sh, "z_shared_sw_isr_table[%d][%d]\n", IRQ_TABLE_SIZE,
CONFIG_SHARED_IRQ_MAX_NUM_CLIENTS);
for (int idx = 0; idx < IRQ_TABLE_SIZE; idx++) {
for (int c = 0; c < z_shared_sw_isr_table[idx].client_num; c++) {
dump_isr_table_entry(sh, idx, &z_shared_sw_isr_table[idx].clients[c]);
}
}
return 0;
}
#endif /* CONFIG_SHARED_INTERRUPTS */
SHELL_STATIC_SUBCMD_SET_CREATE(isr_table_cmds,
SHELL_CMD_ARG(sw_isr_table, NULL,
"Dump _sw_isr_table.\n"
"Usage: isr_table sw_isr_table",
cmd_sw_isr_table, 1, 0),
#ifdef CONFIG_SHARED_INTERRUPTS
SHELL_CMD_ARG(shared_sw_isr_table, NULL,
"Dump z_shared_sw_isr_table.\n"
"Usage: isr_table shared_sw_isr_table",
cmd_shared_sw_isr_table, 1, 0),
#endif /* CONFIG_SHARED_INTERRUPTS */
SHELL_SUBCMD_SET_END);
SHELL_CMD_ARG_REGISTER(isr_table, &isr_table_cmds, "ISR tables shell command",
NULL, 0, 0);

View file

@ -11,9 +11,12 @@
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/util.h>
BUILD_ASSERT((CONFIG_NUM_2ND_LEVEL_AGGREGATORS * CONFIG_MAX_IRQ_PER_AGGREGATOR) <=
BIT(CONFIG_2ND_LEVEL_INTERRUPT_BITS),
BUILD_ASSERT(CONFIG_MAX_IRQ_PER_AGGREGATOR < BIT(CONFIG_2ND_LEVEL_INTERRUPT_BITS),
"L2 bits not enough to cover the number of L2 IRQs");
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
BUILD_ASSERT(CONFIG_MAX_IRQ_PER_AGGREGATOR < BIT(CONFIG_3RD_LEVEL_INTERRUPT_BITS),
"L3 bits not enough to cover the number of L3 IRQs");
#endif /* CONFIG_3RD_LEVEL_INTERRUPTS */
/**
* @brief Get the aggregator that's responsible for the given irq
@ -85,7 +88,8 @@ unsigned int z_get_sw_isr_table_idx(unsigned int irq)
table_idx -= CONFIG_GEN_IRQ_START_VECTOR;
__ASSERT_NO_MSG(table_idx < IRQ_TABLE_SIZE);
__ASSERT(table_idx < IRQ_TABLE_SIZE, "table_idx(%d) < IRQ_TABLE_SIZE(%d)", table_idx,
IRQ_TABLE_SIZE);
return table_idx;
}

View file

@ -92,8 +92,8 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *),
for (i = 0; i < shared_entry->client_num; i++) {
client = &shared_entry->clients[i];
__ASSERT(client->isr != routine && client->arg != param,
"trying to register duplicate ISR/arg pair");
__ASSERT((client->isr == routine && client->arg == param) == false,
"ISR/arg combination is already registered");
}
shared_entry->clients[shared_entry->client_num].isr = routine;

View file

@ -19,12 +19,16 @@ static ALWAYS_INLINE void mips_idle(unsigned int key)
__asm__ volatile("wait");
}
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
void arch_cpu_idle(void)
{
mips_idle(1);
}
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
void arch_cpu_atomic_idle(unsigned int key)
{
mips_idle(key);
}
#endif

View file

@ -48,3 +48,7 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
irq_unlock(key);
}
void arch_irq_offload_init(void)
{
}

View file

@ -11,6 +11,8 @@
#include <kernel_internal.h>
#include <zephyr/irq.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
static void interrupt_init(void)
{
@ -44,9 +46,15 @@ static void interrupt_init(void)
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
z_bss_zero();
interrupt_init();
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
z_cstart();
CODE_UNREACHABLE;

View file

@ -7,6 +7,7 @@
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
void arch_cpu_idle(void)
{
/* Do nothing but unconditionally unlock interrupts and return to the
@ -14,7 +15,9 @@ void arch_cpu_idle(void)
*/
irq_unlock(NIOS2_STATUS_PIE_MSK);
}
#endif
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
void arch_cpu_atomic_idle(unsigned int key)
{
/* Do nothing but restore IRQ state. This CPU does not have any
@ -22,3 +25,4 @@ void arch_cpu_atomic_idle(unsigned int key)
*/
irq_unlock(key);
}
#endif

View file

@ -41,3 +41,7 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
irq_unlock(key);
}
void arch_irq_offload_init(void)
{
}

View file

@ -21,6 +21,8 @@
#include <zephyr/linker/linker-defs.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <zephyr/platform/hooks.h>
#include <zephyr/arch/cache.h>
/**
* @brief Prepare to and run C code
@ -30,6 +32,10 @@
void z_prep_c(void)
{
#if defined(CONFIG_SOC_PREP_HOOK)
soc_prep_hook();
#endif
z_bss_zero();
z_data_copy();
/* In most XIP scenarios we copy the exception code into RAM, so need
@ -44,6 +50,9 @@ void z_prep_c(void)
*/
z_nios2_dcache_flush_all();
#endif
#endif
#if CONFIG_ARCH_CACHE
arch_cache_init();
#endif
z_cstart();
CODE_UNREACHABLE;

View file

@ -21,10 +21,12 @@ endif()
if(CONFIG_NATIVE_APPLICATION)
zephyr_include_directories(
nsi_compat/
${ZEPHYR_BASE}/scripts/native_simulator/common/src/include/
)
zephyr_library_sources(
posix_core.c
posix_core_nsi.c
nsi_compat/nsi_compat.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nct.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nce.c
${ZEPHYR_BASE}/scripts/native_simulator/common/src/nsi_host_trampolines.c
)

View file

@ -14,6 +14,10 @@ void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
{
posix_irq_offload(routine, parameter);
}
void arch_irq_offload_init(void)
{
}
#endif
void arch_irq_enable(unsigned int irq)

View file

@ -1,26 +0,0 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef NSI_COMMON_SRC_INCL_NCE_IF_H
#define NSI_COMMON_SRC_INCL_NCE_IF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Native simulator CPU start/stop emulation module interface */
void *nce_init(void);
void nce_terminate(void *this);
void nce_boot_cpu(void *this, void (*start_routine)(void));
void nce_halt_cpu(void *this);
void nce_wake_cpu(void *this);
int nce_is_cpu_running(void *this);
#ifdef __cplusplus
}
#endif
#endif /* NSI_COMMON_SRC_INCL_NCE_IF_H */

View file

@ -1,19 +0,0 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*
* Note: This is a provisional header which exists to allow
* old POSIX arch based boards (i.e. native_posix) to provide access
* to the host C library as if the native simulator trampolines
* existed.
*
* Boards based on the native simulator do NOT use this file
*/
#ifndef ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H
#define ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H
#include "../scripts/native_simulator/common/src/include/nsi_host_trampolines.h"
#endif /* ARCH_POSIX_CORE_NSI_COMPAT_NSI_HOST_TRAMPOLINES_H */

View file

@ -1,15 +0,0 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ARCH_POSIX_CORE_NSI_SAFE_CALLL_H
#define ARCH_POSIX_CORE_NSI_SAFE_CALLL_H
#include "nsi_tracing.h"
#include "posix_arch_internal.h"
#define NSI_SAFE_CALL PC_SAFE_CALL
#endif /* ARCH_POSIX_CORE_NSI_SAFE_CALLL_H */

View file

@ -1,22 +0,0 @@
/*
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ARCH_POSIX_CORE_NSI_TRACING_H
#define ARCH_POSIX_CORE_NSI_TRACING_H
#ifdef __cplusplus
extern "C" {
#endif
void nsi_print_error_and_exit(const char *format, ...);
void nsi_print_warning(const char *format, ...);
void nsi_print_trace(const char *format, ...);
#ifdef __cplusplus
}
#endif
#endif /* ARCH_POSIX_CORE_NSI_TRACING_H */

View file

@ -1,539 +0,0 @@
/*
* Copyright (c) 2017 Oticon A/S
* Copyright (c) 2023 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Here is where things actually happen for the POSIX arch
*
* We isolate all functions here, to ensure they can be compiled as
* independently as possible to the remainder of Zephyr to avoid name clashes
* as Zephyr does provide functions with the same names as the POSIX threads
* functions
*/
/**
* Principle of operation:
*
* The Zephyr OS and its app run as a set of native pthreads.
* The Zephyr OS only sees one of this thread executing at a time.
* Which is running is controlled using {cond|mtx}_threads and
* currently_allowed_thread.
*
* The main part of the execution of each thread will occur in a fully
* synchronous and deterministic manner, and only when commanded by the Zephyr
* kernel.
* But the creation of a thread will spawn a new pthread whose start
* is asynchronous to the rest, until synchronized in posix_wait_until_allowed()
* below.
* Similarly aborting and canceling threads execute a tail in a quite
* asynchronous manner.
*
* This implementation is meant to be portable in between POSIX systems.
* A table (threads_table) is used to abstract the native pthreads.
* And index in this table is used to identify threads in the IF to the kernel.
*
*/
#include <pthread.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "posix_core.h"
#include "posix_arch_internal.h"
#define PREFIX "POSIX arch core: "
#define ERPREFIX PREFIX"error on "
#define NO_MEM_ERR PREFIX"Can't allocate memory\n"
#define PC_ENABLE_CANCEL 0 /* See Note.c1 */
#define PC_ALLOC_CHUNK_SIZE 64
#define PC_REUSE_ABORTED_ENTRIES 0
/* tests/kernel/threads/scheduling/schedule_api fails when setting
* PC_REUSE_ABORTED_ENTRIES => don't set it by now
*/
static int threads_table_size;
struct threads_table_el {
enum {NOTUSED = 0, USED, ABORTING, ABORTED, FAILED} state;
bool running; /* Is this the currently running thread */
pthread_t thread; /* Actual pthread_t as returned by native kernel */
int thead_cnt; /* For debugging: Unique, consecutive, thread number */
/* Pointer to the status kept in the Zephyr thread stack */
posix_thread_status_t *t_status;
};
static struct threads_table_el *threads_table;
static int thread_create_count; /* For debugging. Thread creation counter */
/*
* Conditional variable to block/awake all threads during swaps()
* (we only need 1 mutex and 1 cond variable for all threads)
*/
static pthread_cond_t cond_threads = PTHREAD_COND_INITIALIZER;
/* Mutex for the conditional variable posix_core_cond_threads */
static pthread_mutex_t mtx_threads = PTHREAD_MUTEX_INITIALIZER;
/* Token which tells which process is allowed to run now */
static int currently_allowed_thread;
static bool terminate; /* Are we terminating the program == cleaning up */
static void posix_wait_until_allowed(int this_th_nbr);
static void *posix_thread_starter(void *arg);
static void posix_preexit_cleanup(void);
extern void posix_arch_thread_entry(void *pa_thread_status);
/**
* Helper function, run by a thread is being aborted
*/
static void abort_tail(int this_th_nbr)
{
PC_DEBUG("Thread [%i] %i: %s: Aborting (exiting) (rel mut)\n",
threads_table[this_th_nbr].thead_cnt,
this_th_nbr,
__func__);
threads_table[this_th_nbr].running = false;
threads_table[this_th_nbr].state = ABORTED;
posix_preexit_cleanup();
pthread_exit(NULL);
}
/**
* Helper function to block this thread until it is allowed again
* (somebody calls posix_let_run() with this thread number
*
* Note that we go out of this function (the while loop below)
* with the mutex locked by this particular thread.
* In normal circumstances, the mutex is only unlocked internally in
* pthread_cond_wait() while waiting for cond_threads to be signaled
*/
static void posix_wait_until_allowed(int this_th_nbr)
{
threads_table[this_th_nbr].running = false;
PC_DEBUG("Thread [%i] %i: %s: Waiting to be allowed to run (rel mut)\n",
threads_table[this_th_nbr].thead_cnt,
this_th_nbr,
__func__);
while (this_th_nbr != currently_allowed_thread) {
pthread_cond_wait(&cond_threads, &mtx_threads);
if (threads_table &&
(threads_table[this_th_nbr].state == ABORTING)) {
abort_tail(this_th_nbr);
}
}
threads_table[this_th_nbr].running = true;
PC_DEBUG("Thread [%i] %i: %s(): I'm allowed to run! (hav mut)\n",
threads_table[this_th_nbr].thead_cnt,
this_th_nbr,
__func__);
}
/**
* Helper function to let the thread <next_allowed_th> run
* Note: posix_let_run() can only be called with the mutex locked
*/
static void posix_let_run(int next_allowed_th)
{
PC_DEBUG("%s: We let thread [%i] %i run\n",
__func__,
threads_table[next_allowed_th].thead_cnt,
next_allowed_th);
currently_allowed_thread = next_allowed_th;
/*
* We let all threads know one is able to run now (it may even be us
* again if fancied)
* Note that as we hold the mutex, they are going to be blocked until
* we reach our own posix_wait_until_allowed() while loop
*/
PC_SAFE_CALL(pthread_cond_broadcast(&cond_threads));
}
static void posix_preexit_cleanup(void)
{
/*
* Release the mutex so the next allowed thread can run
*/
PC_SAFE_CALL(pthread_mutex_unlock(&mtx_threads));
/* We detach ourselves so nobody needs to join to us */
pthread_detach(pthread_self());
}
/**
* Let the ready thread run and block this thread until it is allowed again
*
* called from arch_swap() which does the picking from the kernel structures
*/
void posix_swap(int next_allowed_thread_nbr, int this_th_nbr)
{
posix_let_run(next_allowed_thread_nbr);
if (threads_table[this_th_nbr].state == ABORTING) {
PC_DEBUG("Thread [%i] %i: %s: Aborting curr.\n",
threads_table[this_th_nbr].thead_cnt,
this_th_nbr,
__func__);
abort_tail(this_th_nbr);
} else {
posix_wait_until_allowed(this_th_nbr);
}
}
/**
* Let the ready thread (main) run, and exit this thread (init)
*
* Called from arch_switch_to_main_thread() which does the picking from the
* kernel structures
*
* Note that we could have just done a swap(), but that would have left the
* init thread lingering. Instead here we exit the init thread after enabling
* the new one
*/
void posix_main_thread_start(int next_allowed_thread_nbr)
{
posix_let_run(next_allowed_thread_nbr);
PC_DEBUG("%s: Init thread dying now (rel mut)\n",
__func__);
posix_preexit_cleanup();
pthread_exit(NULL);
}
/**
* Handler called when any thread is cancelled or exits
*/
static void posix_cleanup_handler(void *arg)
{
/*
* If we are not terminating, this is just an aborted thread,
* and the mutex was already released
* Otherwise, release the mutex so other threads which may be
* caught waiting for it could terminate
*/
if (!terminate) {
return;
}
#if POSIX_ARCH_DEBUG_PRINTS
posix_thread_status_t *ptr = (posix_thread_status_t *) arg;
PC_DEBUG("Thread %i: %s: Canceling (rel mut)\n",
ptr->thread_idx,
__func__);
#endif
PC_SAFE_CALL(pthread_mutex_unlock(&mtx_threads));
/* We detach ourselves so nobody needs to join to us */
pthread_detach(pthread_self());
}
/**
* Helper function to start a Zephyr thread as a POSIX thread:
* It will block the thread until a arch_swap() is called for it
*
* Spawned from posix_new_thread() below
*/
static void *posix_thread_starter(void *arg)
{
int thread_idx = (intptr_t)arg;
PC_DEBUG("Thread [%i] %i: %s: Starting\n",
threads_table[thread_idx].thead_cnt,
thread_idx,
__func__);
/*
* We block until all other running threads reach the while loop
* in posix_wait_until_allowed() and they release the mutex
*/
PC_SAFE_CALL(pthread_mutex_lock(&mtx_threads));
/*
* The program may have been finished before this thread ever got to run
*/
/* LCOV_EXCL_START */ /* See Note1 */
if (!threads_table) {
posix_cleanup_handler(arg);
pthread_exit(NULL);
}
/* LCOV_EXCL_STOP */
pthread_cleanup_push(posix_cleanup_handler, arg);
PC_DEBUG("Thread [%i] %i: %s: After start mutex (hav mut)\n",
threads_table[thread_idx].thead_cnt,
thread_idx,
__func__);
/*
* The thread would try to execute immediately, so we block it
* until allowed
*/
posix_wait_until_allowed(thread_idx);
posix_thread_status_t *ptr = threads_table[thread_idx].t_status;
posix_arch_thread_entry(ptr);
/*
* We only reach this point if the thread actually returns which should
* not happen. But we handle it gracefully just in case
*/
/* LCOV_EXCL_START */
posix_print_trace(PREFIX"Thread [%i] %i [%lu] ended!?!\n",
threads_table[thread_idx].thead_cnt,
thread_idx,
pthread_self());
threads_table[thread_idx].running = false;
threads_table[thread_idx].state = FAILED;
pthread_cleanup_pop(1);
return NULL;
/* LCOV_EXCL_STOP */
}
/**
* Return the first free entry index in the threads table
*/
static int ttable_get_empty_slot(void)
{
for (int i = 0; i < threads_table_size; i++) {
if ((threads_table[i].state == NOTUSED)
|| (PC_REUSE_ABORTED_ENTRIES
&& (threads_table[i].state == ABORTED))) {
return i;
}
}
/*
* else, we run out table without finding an index
* => we expand the table
*/
threads_table = realloc(threads_table,
(threads_table_size + PC_ALLOC_CHUNK_SIZE)
* sizeof(struct threads_table_el));
if (threads_table == NULL) { /* LCOV_EXCL_BR_LINE */
posix_print_error_and_exit(NO_MEM_ERR); /* LCOV_EXCL_LINE */
}
/* Clear new piece of table */
(void)memset(&threads_table[threads_table_size], 0,
PC_ALLOC_CHUNK_SIZE * sizeof(struct threads_table_el));
threads_table_size += PC_ALLOC_CHUNK_SIZE;
/* The first newly created entry is good: */
return threads_table_size - PC_ALLOC_CHUNK_SIZE;
}
/**
* Called from arch_new_thread(),
* Create a new POSIX thread for the new Zephyr thread.
* arch_new_thread() picks from the kernel structures what it is that we need
* to call with what parameters
*/
int posix_new_thread(void *ptr)
{
int t_slot;
t_slot = ttable_get_empty_slot();
threads_table[t_slot].state = USED;
threads_table[t_slot].running = false;
threads_table[t_slot].thead_cnt = thread_create_count++;
threads_table[t_slot].t_status = ptr;
/*
* Note: If you are here due to a valgrind reported memory leak in
* pthread_create() please use the provided valgrind.supp suppression file.
*/
PC_SAFE_CALL(pthread_create(&threads_table[t_slot].thread,
NULL,
posix_thread_starter,
(void *)(intptr_t)t_slot));
PC_DEBUG("%s created thread [%i] %i [%lu]\n",
__func__,
threads_table[t_slot].thead_cnt,
t_slot,
threads_table[t_slot].thread);
return t_slot;
}
/*
* Initialize the posix architecture
*
* Prepare whatever needs to be prepared to be able to start threads
*/
void posix_arch_init(void)
{
thread_create_count = 0;
currently_allowed_thread = -1;
threads_table = calloc(PC_ALLOC_CHUNK_SIZE,
sizeof(struct threads_table_el));
if (threads_table == NULL) { /* LCOV_EXCL_BR_LINE */
posix_print_error_and_exit(NO_MEM_ERR); /* LCOV_EXCL_LINE */
}
threads_table_size = PC_ALLOC_CHUNK_SIZE;
PC_SAFE_CALL(pthread_mutex_lock(&mtx_threads));
}
/*
* Free any allocated memory by the posix core and clean up.
* Note that this function cannot be called from a SW thread
* (the CPU is assumed halted. Otherwise we will cancel ourselves)
*
* This function cannot guarantee the threads will be cancelled before the HW
* thread exists. The only way to do that, would be to wait for each of them in
* a join (without detaching them, but that could lead to locks in some
* convoluted cases. As a call to this function can come from an ASSERT or other
* error termination, we better do not assume things are working fine.
* => we prefer the supposed memory leak report from valgrind, and ensure we
* will not hang
*/
void posix_arch_clean_up(void)
{
if (!threads_table) { /* LCOV_EXCL_BR_LINE */
return; /* LCOV_EXCL_LINE */
}
terminate = true;
#if (PC_ENABLE_CANCEL)
for (int i = 0; i < threads_table_size; i++) {
if (threads_table[i].state != USED) {
continue;
}
/* LCOV_EXCL_START */
if (pthread_cancel(threads_table[i].thread)) {
posix_print_warning(
PREFIX"cleanup: could not stop thread %i\n",
i);
}
/* LCOV_EXCL_STOP */
}
#endif
free(threads_table);
threads_table = NULL;
}
void posix_abort_thread(int thread_idx)
{
if (thread_idx == currently_allowed_thread) {
PC_DEBUG("Thread [%i] %i: %s Marked myself "
"as aborting\n",
threads_table[thread_idx].thead_cnt,
thread_idx,
__func__);
} else {
if (threads_table[thread_idx].state != USED) { /* LCOV_EXCL_BR_LINE */
/* The thread may have been already aborted before */
return; /* LCOV_EXCL_LINE */
}
PC_DEBUG("Aborting not scheduled thread [%i] %i\n",
threads_table[thread_idx].thead_cnt,
thread_idx);
}
threads_table[thread_idx].state = ABORTING;
/*
* Note: the native thread will linger in RAM until it catches the
* mutex or awakes on the condition.
* Note that even if we would pthread_cancel() the thread here, that
* would be the case, but with a pthread_cancel() the mutex state would
* be uncontrolled
*/
}
int posix_arch_get_unique_thread_id(int thread_idx)
{
return threads_table[thread_idx].thead_cnt;
}
/*
* Notes about coverage:
*
* Note1:
*
* This condition will only be triggered in very unlikely cases
* (once every few full regression runs).
* It is therefore excluded from the coverage report to avoid confusing
* developers.
*
* Background: This arch creates a pthread as soon as the Zephyr kernel creates
* a Zephyr thread. A pthread creation is an asynchronous process handled by the
* host kernel.
*
* This architecture normally keeps only 1 thread executing at a time.
* But part of the pre-initialization during creation of a new thread
* and some cleanup at the tail of the thread termination are executed
* in parallel to other threads.
* That is, the execution of those code paths is a bit indeterministic.
*
* Only when the Zephyr kernel attempts to swap to a new thread does this
* architecture need to wait until its pthread is ready and initialized
* (has reached posix_wait_until_allowed())
*
* In some cases (tests) threads are created which are never actually needed
* (typically the idle thread). That means the test may finish before this
* thread's underlying pthread has reached posix_wait_until_allowed().
*
* In this unlikely cases the initialization or cleanup of the thread follows
* non-typical code paths.
* This code paths are there to ensure things work always, no matter
* the load of the host. Without them, very rare & mysterious segfault crashes
* would occur.
* But as they are very atypical and only triggered with some host loads,
* they will be covered in the coverage reports only rarely.
*
* Note2:
*
* Some other code will never or only very rarely trigger and is therefore
* excluded with LCOV_EXCL_LINE
*
*
* Notes about (memory) cleanup:
*
* Note.c1:
*
* In some very rare cases in very loaded machines, a race in the glibc pthread_cancel()
* seems to be triggered.
* In this, the cancelled thread cleanup overtakes the pthread_cancel() code, and frees the
* pthread structure before pthread_cancel() has finished, resulting in a dereference into already
* free'd memory, and therefore a segfault.
* Calling pthread_cancel() during cleanup is not required beyond preventing a valgrind
* memory leak report (all threads will be canceled immediately on exit).
* Therefore we do not do this, to avoid this very rare crashes.
*/

View file

@ -57,3 +57,8 @@ int posix_arch_get_unique_thread_id(int thread_idx)
{
return nct_get_unique_thread_id(te_state, thread_idx);
}
int posix_arch_thread_name_set(int thread_idx, const char *str)
{
return nct_thread_name_set(te_state, thread_idx, str);
}

Some files were not shown because too many files have changed in this diff Show more